:root {
  color-scheme: light;
  --bg: #f3f1ea;
  --card: #fffdf8;
  --ink: #1d2430;
  --muted: #667085;
  --line: #e4ddcf;
  --accent: #0f6b4c;
  --accent-soft: #e7f4ee;
  --danger: #9f2d2d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #17342b;
  color: #f7f3ea;
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
}

.eyebrow, .back {
  margin: 0 0 4px;
  color: #d5e6dc;
  font-size: 13px;
}

.back { text-decoration: none; }

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logout-form {
  margin: 0;
  display: inline;
}

.date-button, .sheet-head button, .back-link {
  border: 0;
  border-radius: 999px;
  background: #f4e7c5;
  color: #17342b;
  padding: 8px 14px;
  font: inherit;
  text-decoration: none;
}

.match-list, .detail {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 12px;
}

.match-card {
  display: block;
  margin-bottom: 12px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.match-meta, .teams, .odds-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.match-meta {
  color: var(--muted);
  font-size: 13px;
}

.teams {
  align-items: center;
  margin: 10px 0;
  font-size: 18px;
  font-weight: 700;
}

.score {
  color: var(--danger);
  font-variant-numeric: tabular-nums;
}

.odds {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.odds section {
  padding: 8px;
  background: var(--accent-soft);
  border-radius: 12px;
}

.odds h2 {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--accent);
}

.odds p {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.empty {
  padding: 32px 8px;
  text-align: center;
  color: var(--muted);
}

.modal[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 5;
}

.backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgb(16 24 20 / 45%);
}

.sheet {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 20px 20px 0 0;
}

.sheet-head { padding: 16px 16px 0; }

.sheet-head h2 { margin: 0; font-size: 18px; }

.wheels {
  position: relative;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  height: 220px;
  margin: 8px 12px 0;
}

.wheel {
  height: 220px;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}

.wheel::-webkit-scrollbar { display: none; }

.wheel-pad,
.wheel button {
  height: 44px;
  scroll-snap-align: center;
}

.wheel-pad { pointer-events: none; }

.wheel button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #98a2b3;
  font: inherit;
  font-size: 18px;
}

.wheel button[aria-selected="true"] {
  color: var(--ink);
  font-weight: 700;
}

.wheel-window {
  position: absolute;
  right: 8px;
  left: 8px;
  top: 88px;
  height: 44px;
  border-top: 1px solid #c9d7cf;
  border-bottom: 1px solid #c9d7cf;
  pointer-events: none;
}

.sheet-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px 16px;
}

.sheet-actions button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  padding: 8px 12px;
}

.panel {
  margin-bottom: 16px;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.panel h2 { margin: 0 0 10px; font-size: 16px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

th, td {
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th { color: var(--muted); font-weight: 600; }

.admin {
  width: min(960px, 100%);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 0;
}

.admin-grid div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.admin-grid dt { color: var(--muted); }
.admin-grid dd { margin: 0; font-variant-numeric: tabular-nums; }

.form-row, .checks, .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 12px;
}

.hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.hint-inline {
  color: var(--muted);
  font-size: 0.92rem;
}

.step-title {
  margin: 18px 0 8px;
  font-size: 1rem;
  font-weight: 600;
}

.step-title:first-of-type {
  margin-top: 8px;
}

.form-row label, .checks label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.league-checks {
  max-height: 220px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 6px 10px;
}

.season-checks {
  max-height: 160px;
  margin-top: 8px;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
}

.league-checks .league-empty {
  color: var(--muted);
  grid-column: 1 / -1;
}

.selected-leagues {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  min-height: 28px;
}

.selected-leagues .chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f8fa;
  font-size: 0.9rem;
}

.selected-leagues .chip button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 2px;
  font: inherit;
  line-height: 1;
}

input[type="date"],
input[type="number"],
input[type="text"],
select {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 6px 8px;
}

.actions button, .form-row button, .db-match-toolbar button {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #f7f3ea;
  font: inherit;
  padding: 8px 14px;
}

.actions button:disabled, .form-row button:disabled, .db-match-toolbar button:disabled {
  opacity: 0.45;
}

#stop {
  background: var(--danger);
}

progress {
  width: 100%;
  height: 10px;
  margin-top: 12px;
  accent-color: var(--accent);
}

.log {
  min-height: 220px;
  max-height: 360px;
  margin: 12px 0 0;
  padding: 12px;
  overflow: auto;
  white-space: pre-wrap;
  background: #17342b;
  color: #f7f3ea;
  border-radius: 12px;
  font-size: 13px;
}

.missing-odds-kinds {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.missing-odds-kind-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.missing-odds-kind-label {
  min-width: 4.5em;
  font-weight: 600;
}

.missing-odds-kinds button {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #f7f3ea;
  font: inherit;
  padding: 8px 14px;
}

.missing-odds-kinds button:disabled {
  opacity: 0.45;
}

.missing-odds-table-wrap {
  margin-top: 10px;
  max-height: 320px;
  overflow: auto;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  background: #fff;
}

.missing-odds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.missing-odds-table th,
.missing-odds-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
}

.missing-odds-table th {
  position: sticky;
  top: 0;
  background: #f7f7f7;
  font-weight: 600;
}

.missing-odds-table td.empty {
  color: var(--muted);
  text-align: center;
  white-space: normal;
}

@media (max-width: 720px) {
  .admin-grid { grid-template-columns: 1fr; }
}

.board {
  --bg: #f3f3f3;
  --card: #fff;
  --ink: #222;
  --line: #e5e5e5;
  --accent: #e10600;
  background: #f3f3f3;
  overflow-x: hidden;
  max-width: 100vw;
}

.board .topbar {
  background: #e10600;
  color: #fff;
  /* 高于下方吸顶白底，避免滚动时白色盖住红顶栏 */
  z-index: 50;
}

.board .back,
.board .date-button,
.board .day-nav {
  background: transparent;
  color: #fff;
  border: 1px solid rgb(255 255 255 / 55%);
}

.score-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.score-title { text-align: center; }

.score-title h1 { font-variant-numeric: tabular-nums; }

.score-title .top-actions { justify-content: center; margin-top: 6px; }

.filters {
  position: sticky;
  top: 76px;
  z-index: 1;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
}

.chips button {
  flex: none;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  background: #fff;
  color: #444;
  font: inherit;
  font-size: 13px;
  padding: 4px 10px;
  max-width: 100%;
}

.chips button.on {
  border-color: #e10600;
  background: #fff1f0;
  color: #e10600;
}

.league-query-layout {
  display: block;
  width: 100%;
}

.league-nav {
  display: none;
}

.league-chrome {
  position: sticky;
  top: var(--league-topbar-offset, 57px);
  z-index: 20;
  background: #f5f5f5;
  border-bottom: 1px solid #ececec;
}

.context-bar {
  background: #fff;
  border-bottom: 1px solid #eee;
}

.context-bar-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 10px 12px 6px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.context-bar-btn:hover {
  background: #fafafa;
}

.context-bar-main {
  min-width: 0;
}

.context-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #222;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-meta {
  margin: 0;
  padding: 0 12px 10px;
  color: #888;
  font-size: 12px;
  line-height: 1.4;
  min-height: 0;
}

.context-meta:empty {
  display: none;
}

.context-meta a {
  color: #e10600;
}

.context-bar-action {
  flex: none;
  color: #e10600;
  font-size: 13px;
  font-weight: 600;
}

.round-bar {
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.round-bar .round-chips,
#round-filters.round-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 8px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.round-bar .round-chips::-webkit-scrollbar {
  height: 4px;
}

.round-bar .round-chips::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 2px;
}

.round-bar .round-chips button {
  flex: none;
  white-space: nowrap;
}

.filter-toolbar {
  display: block;
  padding: 8px 12px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  background: #fff;
  color: #444;
  font: inherit;
  font-size: 13px;
  padding: 5px 12px;
  cursor: pointer;
}

.filter-toggle.on {
  border-color: #e10600;
  color: #e10600;
  background: #fff1f0;
}

.filter-summary {
  color: #888;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-panel {
  display: none;
  max-height: min(42vh, 360px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid #eee;
  background: #fff;
}

.filter-panel.is-open {
  display: block;
}

.league-season-list .score-row {
  grid-template-columns: 92px 1fr;
}

/* 可搜索联赛/赛季选择器 */
.league-picker {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.league-picker[hidden] {
  display: none !important;
}

.league-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.league-picker-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(480px, 100%);
  max-height: min(78vh, 640px);
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.18);
}

body.picker-open {
  overflow: hidden;
}

.league-picker-header {
  display: grid;
  grid-template-columns: 56px 1fr 40px;
  align-items: center;
  gap: 4px;
  padding: 10px 8px 8px;
  border-bottom: 1px solid #eee;
}

.league-picker-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

.league-picker-back,
.league-picker-close {
  border: 0;
  background: transparent;
  color: #666;
  font: inherit;
  font-size: 14px;
  padding: 8px;
  cursor: pointer;
}

.league-picker-back:hover,
.league-picker-close:hover {
  color: #e10600;
}

.league-picker-search-wrap {
  padding: 8px 12px;
  border-bottom: 1px solid #f0f0f0;
}

.league-picker-search {
  width: 100%;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fafafa;
  font: inherit;
  font-size: 14px;
  padding: 8px 10px;
}

.league-picker-search:focus {
  border-color: #e10600;
  outline: none;
  background: #fff;
}

.league-picker-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 16px;
}

.league-picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  color: #222;
  font: inherit;
  font-size: 14px;
  text-align: left;
  padding: 12px 14px;
  cursor: pointer;
}

.league-picker-item:hover {
  background: #f7f7f7;
}

.league-picker-item.on {
  border-left-color: #e10600;
  background: #fff1f0;
  color: #e10600;
}

.league-picker-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.league-picker-count {
  flex: none;
  color: #999;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.league-picker-item.on .league-picker-count {
  color: #e10600;
}

.league-picker-empty {
  margin: 0;
  padding: 24px 16px;
  color: #999;
  font-size: 13px;
  text-align: center;
}

@media (min-width: 769px) {
  .league-query-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: start;
    min-height: calc(100vh - var(--league-topbar-offset, 57px));
  }

  .league-nav {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: var(--league-topbar-offset, 57px);
    height: calc(100vh - var(--league-topbar-offset, 57px));
    background: #fff;
    border-right: 1px solid #e5e5e5;
    overflow: hidden;
  }

  .league-nav-title {
    flex: none;
    padding: 12px 14px 8px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    border-bottom: 1px solid #eee;
  }

  .league-tree {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0 16px;
  }

  .league-nav-empty {
    margin: 0;
    padding: 10px 14px;
    color: #999;
    font-size: 13px;
  }

  .league-nav-league {
    display: grid;
    grid-template-columns: 14px 1fr auto;
    gap: 6px;
    align-items: center;
    width: 100%;
    border: 0;
    background: transparent;
    color: #222;
    font: inherit;
    font-size: 14px;
    text-align: left;
    padding: 8px 12px;
    cursor: pointer;
  }

  .league-nav-league:hover {
    background: #f7f7f7;
  }

  .league-nav-item.active > .league-nav-league,
  .league-nav-item.open > .league-nav-league {
    color: #e10600;
  }

  .league-nav-caret {
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid #999;
    transition: transform 0.15s ease;
  }

  .league-nav-item.open > .league-nav-league .league-nav-caret {
    transform: rotate(90deg);
    border-left-color: #e10600;
  }

  .league-nav-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .league-nav-count {
    color: #999;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
  }

  .league-nav-seasons {
    display: flex;
    flex-direction: column;
    padding: 0 0 4px;
  }

  .league-nav-season {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: 0;
    border-left: 3px solid transparent;
    background: transparent;
    color: #444;
    font: inherit;
    font-size: 13px;
    text-align: left;
    padding: 6px 12px 6px 32px;
    cursor: pointer;
  }

  .league-nav-season span {
    color: #999;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
  }

  .league-nav-season:hover {
    background: #f7f7f7;
  }

  .league-nav-season.on {
    border-left-color: #e10600;
    background: #fff1f0;
    color: #e10600;
  }

  .league-nav-season.on span {
    color: #e10600;
  }

  .league-query-main .filters {
    width: 100%;
    top: auto;
    position: static;
  }

  .league-query-main .score-list {
    width: 100%;
    margin: 0;
  }

  .league-picker {
    align-items: center;
  }

  .league-picker-panel {
    border-radius: 12px;
    max-height: min(70vh, 560px);
  }

  .context-bar-action {
    display: none;
  }

  .standings-toolbar {
    display: none;
  }
}

@media (max-width: 768px) {
  .league-nav {
    display: none !important;
  }
}

.score-list {
  width: min(860px, 100%);
  margin: 0 auto;
  background: #fff;
  overflow-x: hidden;
}

.score-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  color: inherit;
  text-decoration: none;
  max-width: 100%;
}

.score-side {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  color: #888;
  font-size: 12px;
}

.score-side > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-main {
  min-width: 0;
  overflow: hidden;
}

.league-badge {
  align-self: flex-start;
  max-width: 100%;
  overflow: hidden;
  padding: 1px 4px;
  border-radius: 2px;
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.score-teams span:first-child,
.score-teams span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-teams span:first-child { text-align: right; }
.score-teams span:last-child { text-align: left; }

.board .score {
  min-width: 44px;
  color: #888;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

.board .score.finished { color: #e10600; }

.half {
  min-height: 16px;
  margin: 2px 0 0;
  color: #999;
  font-size: 12px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crown {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  margin-top: 6px;
  color: #555;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  max-width: 100%;
}

.crown .crown-line {
  display: grid;
  grid-template-columns: 1.2em 1.2em 1.2em repeat(3, minmax(0, 1fr));
  gap: 4px;
  align-items: center;
  min-width: 0;
}

.crown i {
  color: #e10600;
  font-style: normal;
  flex: none;
  font-weight: 700;
}

.crown em {
  color: #999;
  font-style: normal;
  font-size: 11px;
}

.crown em.crown-co {
  color: #666;
  font-weight: 600;
}

.crown b {
  min-width: 0;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}

.crown b.line {
  background: #fff3cd;
  border-radius: 3px;
  padding: 1px 3px;
}

.crown b.up {
  color: #0072b2;
}

.crown b.down {
  color: #e69f00;
}

.crown .arrow {
  display: inline;
  margin-left: 2px;
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .score-top {
    gap: 4px;
    padding: 10px 8px;
  }

  .score-top .day-nav {
    padding: 6px 8px;
    font-size: 12px;
  }

  .score-title h1 {
    font-size: 18px;
  }

  .score-title .top-actions {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  .score-title .date-button {
    padding: 4px 8px;
    font-size: 12px;
  }

  .filters {
    top: 70px;
  }

  .chips {
    gap: 6px;
    padding: 8px 10px;
  }

  .chips button {
    font-size: 12px;
    padding: 4px 8px;
  }

  .score-row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 6px;
    padding: 10px;
  }

  .score-teams {
    gap: 4px;
    font-size: 14px;
  }

  .board .score {
    min-width: 40px;
    font-size: 16px;
  }

  .crown {
    margin-top: 8px;
  }
}

.match-head {
  padding: 16px 12px 12px;
  background: #fff;
  text-align: center;
}

.head-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: #888;
  font-size: 13px;
}

.head-teams { margin-top: 12px; font-size: 18px; }

.head-teams .score { font-size: 28px; }

.odds-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #fff;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.odds-tabs.tabs-4 {
  grid-template-columns: repeat(4, 1fr);
}

.odds-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #666;
  font: inherit;
  padding: 10px 0;
}

.odds-tabs button.on {
  border-bottom-color: #e10600;
  color: #e10600;
  font-weight: 700;
}

.odds-scroll {
  overflow-x: auto;
  background: #fff;
}

.index-table { min-width: 560px; }
.index-table.xq-index-std { min-width: 320px; }
.index-table.xq-index-htft { min-width: 0; width: 100%; }
.index-table.xq-index-stack { min-width: 0; width: 100%; }

.index-table th,
.index-table td {
  text-align: center;
  white-space: nowrap;
  padding: 8px 6px;
  font-size: 13px;
}

.index-table .company {
  text-align: left;
  max-width: 5.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  vertical-align: middle;
  border-right: 1px solid #f0f0f0;
}

.index-table .odds-phase {
  color: #888;
  font-size: 12px;
  font-weight: 600;
  width: 1.8em;
  padding-left: 4px;
  padding-right: 4px;
}

.index-table tr.odds-row-open td {
  border-bottom: 0;
  padding-bottom: 4px;
}

.index-table tr.odds-row-live td {
  padding-top: 4px;
  border-bottom: 1px solid #eee;
}

.index-table .odds-change-cell {
  vertical-align: middle;
  border-left: 1px solid #f0f0f0;
}

.index-table .up { color: #0072b2; }
.index-table .down { color: #e69f00; }
.index-table .arrow { margin-left: 2px; font-size: 14px; font-weight: 700; }

.index-table td.odds-tap-cell {
  cursor: pointer;
}

.index-table td.odds-tap-cell:hover,
.index-table td.odds-tap-cell:focus-visible {
  background: #eef6ff;
}

.index-table td.odds-tap-cell:active {
  background: #dcecff;
}

.index-table td.odds-pack {
  font-size: 11px;
  white-space: normal;
  line-height: 1.35;
  max-width: 11em;
  text-align: left;
}

.index-table td.htft-cell {
  white-space: normal;
  padding: 6px 4px;
  text-align: left;
  vertical-align: middle;
}

.htft-matrix {
  width: 100%;
  max-width: 280px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.htft-matrix th,
.htft-matrix td {
  border: 1px solid #e8e8e8;
  padding: 5px 4px;
  text-align: center;
  white-space: nowrap;
}

.htft-matrix thead th,
.htft-matrix tbody th {
  background: #f7f7f7;
  color: #666;
  font-weight: 600;
  font-size: 11px;
}

.htft-matrix .htft-corner {
  font-size: 10px;
  color: #999;
  font-weight: 500;
}

.htft-matrix .up { color: #0072b2; }
.htft-matrix .down { color: #e69f00; }
.htft-matrix .arrow { margin-left: 1px; font-size: 10px; font-weight: 700; }

.htft-history-list {
  display: grid;
  gap: 10px;
}

.htft-history-item {
  padding: 6px 0;
  border-bottom: 1px dashed #eee;
}

.htft-history-item:last-child {
  border-bottom: 0;
}

.htft-history-time {
  margin-bottom: 4px;
  color: #888;
  font-size: 12px;
}

.htft-stat {
  display: inline-block;
  margin: 0 8px 4px 0;
  font-size: 12px;
  color: #444;
}

.htft-stat-note {
  display: inline-block;
  color: #888;
  font-size: 12px;
}

.same-htft-row .score-main {
  gap: 6px;
}

.same-htft-matrix {
  margin-top: 4px;
}

.same-htft-matrix .htft-matrix {
  max-width: 100%;
}

.odds-change-btn {
  border: 1px solid #ccc;
  border-radius: 2px;
  background: #fff;
  color: #666;
  font: inherit;
  font-size: 12px;
  padding: 2px 8px;
  cursor: pointer;
}

.odds-change-btn.on {
  border-color: #e10600;
  color: #e10600;
}

.odds-history-row td {
  background: #fafafa;
  padding: 8px !important;
  white-space: normal !important;
}

.odds-history-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.odds-history-chart-wrap {
  position: relative;
  width: 100%;
  height: 200px;
}

.odds-history-chart-wrap.asian {
  height: 320px;
}

.odds-history-chart {
  width: 100% !important;
  height: 100% !important;
}

.odds-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.odds-history-table th,
.odds-history-table td {
  border-bottom: 1px solid #eee;
  padding: 4px 6px;
  text-align: center;
}

.odds-history-table .htft-history-cell {
  text-align: left;
  font-size: 11px;
}

body.sheet-open {
  overflow: hidden;
}

.same-odds-modal {
  z-index: 20;
}

.same-odds-sheet {
  max-height: 78vh;
}

.same-odds-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 8px;
  border-bottom: 1px solid #eee;
}

.same-odds-sheet-head h2 {
  margin: 0;
  font-size: 17px;
}

.same-odds-sheet-head button {
  border: 0;
  background: transparent;
  color: #1a73e8;
  font: inherit;
  font-weight: 600;
  padding: 6px 4px;
  cursor: pointer;
}

.same-odds-sheet-body {
  overflow-y: auto;
  padding: 10px 12px 20px;
  -webkit-overflow-scrolling: touch;
}

.same-odds-sheet-body .same-odds-condition {
  margin: 0 0 8px;
}

.same-odds-sheet-body .query-summary {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.5;
  color: #333;
  word-break: break-word;
}

.same-odds-results {
  max-height: none;
}

.detail { width: min(860px, 100%); margin: 0 auto; padding-top: 0; padding-bottom: 24px; }

.board .admin {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 0 0 24px;
}

.board .panel {
  margin: 8px 0 0;
  padding: 12px;
  background: #fff;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #eee;
}

.board .panel h2 {
  margin: 0 0 10px;
  color: #e10600;
  font-size: 15px;
}

.board .admin-grid div {
  border-bottom-color: #eee;
}

.board .actions button,
.board .form-row button,
.board .db-match-toolbar button {
  border: 1px solid #e10600;
  border-radius: 2px;
  background: #fff;
  color: #e10600;
}

.board #stop {
  border-color: #222;
  background: #fff;
  color: #222;
}

.board progress { accent-color: #e10600; }

.board .log {
  background: #fafafa;
  color: #222;
  border: 1px solid #e5e5e5;
  border-radius: 0;
}

.board select {
  border: 1px solid #e5e5e5;
  background: #fff;
  color: #222;
  font: inherit;
  padding: 6px 8px;
}

.query-summary {
  margin: 8px 12px;
  color: #444;
  font-variant-numeric: tabular-nums;
}

.condition {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.condition label { display: flex; align-items: center; gap: 6px; }

.condition .remove {
  border: 1px solid #222;
  border-radius: 2px;
  background: #fff;
  color: #222;
  font: inherit;
  padding: 6px 10px;
}

.data-range {
  margin: 4px 0 0;
  color: var(--muted, #666);
  font-size: 12px;
}

.date-picker-label {
  position: relative;
  overflow: hidden;
}

.date-picker-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.odds-block {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #ececec;
  border-radius: 10px;
  background: #fff;
}

.odds-block h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
}

.odds-company-toggle {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.odds-company-toggle:disabled {
  cursor: default;
}

.odds-company-toggle:not(:disabled):hover .odds-company-name {
  color: #1565c0;
}

.odds-company-name {
  font-size: 14px;
  font-weight: 650;
}

.odds-company-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  font-size: 12px;
  color: #888;
}

/* ===== 联赛赛季查询：视图切换 / 积分榜 / 统计 / 赔率覆盖 ===== */

.league-query-main .filters {
  position: static;
  top: auto;
  background: #fff;
}

.view-tabs {
  display: flex;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 10px 12px 8px;
  background: #fff;
}

@media (min-width: 769px) {
  .view-tabs {
    padding: 10px 12px 8px;
  }
}

.view-tabs button {
  flex: none;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  background: #fff;
  color: #444;
  font: inherit;
  font-size: 13px;
  padding: 5px 14px;
  cursor: pointer;
}

.view-tabs button.on {
  border-color: #e10600;
  background: #e10600;
  color: #fff;
}

.filters-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #f0f0f0;
}

.filters-inline input[type="search"] {
  flex: 1 1 140px;
  min-width: 120px;
  border: 1px solid #e5e5e5;
  background: #fff;
  font: inherit;
  font-size: 13px;
  padding: 5px 8px;
}

.filters-inline .date-range {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #666;
  font-size: 13px;
}

.filters-inline .date-range input[type="date"] {
  border: 1px solid #e5e5e5;
  background: #fff;
  font: inherit;
  font-size: 13px;
  padding: 4px 6px;
}

.filters-inline select {
  border: 1px solid #e5e5e5;
  background: #fff;
  font: inherit;
  font-size: 13px;
  padding: 5px 6px;
  min-width: 92px;
  flex: none;
}

.filters-inline input:focus,
.filters-inline select:focus {
  border-color: #e10600;
  outline: none;
}

.coverage-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 10px;
  border-top: 1px solid #f0f0f0;
  color: #888;
  font-size: 12px;
}

.team-filter-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
  margin: 0;
  padding: 6px 12px;
  border: 0;
  border-bottom: 1px dashed #f5c2be;
  border-radius: 0;
  background: #fff1f0;
  color: #e10600;
  font-size: 13px;
}

.team-filter-chip button {
  border: 0;
  background: transparent;
  color: #e10600;
  font: inherit;
  cursor: pointer;
  padding: 0 4px;
}

.league-season-list .score-row {
  grid-template-columns: 92px minmax(0, 1fr) auto;
}

.score-extra {
  display: flex;
  align-items: center;
}

.coverage-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.coverage-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e0e0e0;
}

.coverage-dots i.on {
  background: #e10600;
}

.coverage-dots.legend i {
  background: #e10600;
}

.standings-wrap {
  width: min(860px, 100%);
  margin: 12px auto;
  padding: 0;
  overflow: hidden;
}

@media (min-width: 769px) {
  .standings-wrap {
    width: 100%;
    margin: 12px 0;
  }
}

.standings-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 0 12px 8px;
}

.standings-expand {
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  background: #fff;
  color: #666;
  font: inherit;
  font-size: 12px;
  padding: 4px 10px;
  cursor: pointer;
}

.standings-expand:hover {
  border-color: #e10600;
  color: #e10600;
}

.standings-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.standings-table.standings-compact {
  min-width: 0;
}

.standings-table.standings-compact .standings-extra {
  display: none;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.standings-table th,
.standings-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #f0f0f0;
  text-align: center;
  white-space: nowrap;
}

.standings-table thead th {
  position: sticky;
  top: 0;
  background: #fafafa;
  color: #666;
  font-weight: 600;
}

.standings-table .ta-left {
  text-align: left;
}

.standings-table td.team-name {
  font-weight: 600;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.standings-row {
  cursor: pointer;
}

.standings-row:hover {
  background: #fff7f5;
}

.standings-table td.points {
  font-weight: 700;
  color: #e10600;
}

.stats-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  width: min(860px, 100%);
  margin: 12px auto;
}

@media (min-width: 769px) {
  .stats-view {
    margin: 12px 0;
  }
}

.stat-card {
  border: 1px solid #ececec;
  border-radius: 10px;
  background: #fff;
  padding: 12px 14px;
}

.stat-card h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #666;
}

.stat-big {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stat-line {
  margin: 4px 0 0;
  color: #666;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.stat-bar {
  display: flex;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  background: #f0f0f0;
  margin: 4px 0 6px;
}

.stat-bar i {
  height: 100%;
}

.stat-bar.wdl .w { background: #e10600; }
.stat-bar.wdl .d { background: #9aa3ad; }
.stat-bar.wdl .l { background: #1a73e8; }

.team-prob-view {
  width: min(860px, 100%);
  margin: 12px auto;
}

@media (min-width: 769px) {
  .team-prob-view {
    width: 100%;
    margin: 12px 0;
  }
}

.team-prob-view .stats-view {
  width: 100%;
  margin: 10px 0 0;
}

.team-prob-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #444;
}

.team-prob-toolbar select {
  flex: 1;
  max-width: 280px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  padding: 6px 8px;
}

.team-prob-compare {
  color: #888;
}

.score-top {
  margin: 0;
  padding: 0;
  list-style: none;
}

.score-top li {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px dashed #f0f0f0;
  font-variant-numeric: tabular-nums;
}

.score-top li:last-child {
  border-bottom: 0;
}

/* 统计卡片内的排行列表：自上而下逐行展示 */
.stat-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stat-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dashed #f0f0f0;
  font-variant-numeric: tabular-nums;
}

.stat-list li:last-child {
  border-bottom: 0;
}

.diff-row {
  display: grid;
  grid-template-columns: 44px 1fr 32px;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.diff-label {
  text-align: right;
  color: #666;
}

.diff-track {
  height: 10px;
  border-radius: 5px;
  background: #f0f0f0;
  overflow: hidden;
}

.diff-track i {
  display: block;
  height: 100%;
  background: #0f6b4c;
}

.diff-count {
  color: #444;
}

/* ===== 移动端适配：联赛赛季查询 ===== */

@media (max-width: 768px) {
  .league-chrome {
    top: var(--league-topbar-offset, 57px);
  }

  .context-bar {
    padding: 10px 12px;
  }

  .context-title {
    font-size: 14px;
  }

  /* 视图切换铺满一行 */
  .view-tabs {
    padding: 8px 12px;
  }

  .view-tabs button {
    flex: 1;
    padding: 6px 10px;
  }

  /* 过滤器：搜索独占一行，日期与排序换行排布 */
  .filters-inline {
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
  }

  .filters-inline input[type="search"] {
    flex: 1 1 100%;
  }

  .filters-inline .date-range {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12px;
  }

  .filters-inline .date-range input[type="date"] {
    flex: 1 1 104px;
    min-width: 0;
    padding: 4px 4px;
    font-size: 12px;
  }

  .filters-inline select {
    flex: none;
    font-size: 12px;
    padding: 4px 4px;
  }

  .team-filter-chip {
    padding: 5px 12px;
    font-size: 12px;
  }

  /* 比赛行：隐藏联赛徽标（上下文条已展示），留给对阵与覆盖点 */
  .league-season-list .score-row {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 6px;
    padding: 9px 10px;
  }

  .league-season-list .score-row .league-badge {
    display: none;
  }

  .league-season-list .score-row .score-side {
    font-size: 11px;
  }

  .coverage-dots {
    gap: 3px;
  }

  .coverage-dots i {
    width: 5px;
    height: 5px;
  }

  .coverage-legend {
    font-size: 11px;
    padding: 6px 12px 10px;
  }

  /* 积分榜：默认精简列，展开后横滑全表 */
  .standings-wrap {
    width: auto;
    margin: 10px 0;
  }

  .standings-table:not(.standings-compact) {
    min-width: 560px;
  }

  .standings-table {
    font-size: 12px;
  }

  .standings-table th,
  .standings-table td {
    padding: 6px 6px;
  }

  .standings-table td.team-name {
    max-width: 150px;
  }

  .team-prob-view {
    width: auto;
    margin: 10px 12px;
  }

  /* 统计卡片：单列更紧凑 */
  .stats-view {
    grid-template-columns: 1fr;
    gap: 8px;
    width: auto;
    margin: 10px 12px;
  }

  .stat-card {
    padding: 10px 12px;
  }

  .stat-big {
    font-size: 24px;
  }
}

@media (max-width: 360px) {
  .standings-table:not(.standings-compact) {
    min-width: 520px;
    font-size: 11px;
  }

  .league-season-list .score-row {
    grid-template-columns: 64px minmax(0, 1fr) auto;
  }
}

.odds-expand-hint {
  color: #1565c0;
  font-weight: 600;
}

.odds-block[data-expanded="1"] .odds-expand-hint {
  color: #666;
}

.odds-history {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e5e5e5;
}

.odds-table-wrap {
  overflow-x: auto;
}

.odds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.odds-table th,
.odds-table td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
}

.odds-table th {
  color: #666;
  font-weight: 600;
  background: #fafafa;
}

.odds-summary-table th[scope="row"] {
  width: 3.5em;
  color: #444;
  background: transparent;
  font-weight: 650;
}

.odds-summary-table .odds-opening th[scope="row"] {
  color: #777;
  font-weight: 600;
}

.odds-summary-table .up {
  color: #c62828;
  font-weight: 650;
}

.odds-summary-table .down {
  color: #2e7d32;
  font-weight: 650;
}

.odds-arrow {
  margin-left: 2px;
  font-size: 11px;
  font-weight: 700;
}

.odds-table tbody tr:last-child td {
  border-bottom: 0;
}

.odds-tap-hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: #888;
}

.odds-summary-table tr.odds-tap-row[data-kind] {
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.odds-summary-table tr.odds-tap-row[data-kind]:hover,
.odds-summary-table tr.odds-tap-row[data-kind]:focus-visible {
  background: #eef6ff;
}

.odds-summary-table tr.odds-tap-row[data-kind]:active {
  background: #dcecff;
}

.odds-summary-table tr.odds-tap-row[data-kind] th,
.odds-summary-table tr.odds-tap-row[data-kind] td {
  padding-top: 10px;
  padding-bottom: 10px;
}

.odds-summary-table tr.odds-tap-row[data-kind] th[scope="row"]::after {
  content: " 查同赔";
  font-size: 11px;
  font-weight: 500;
  color: #1a73e8;
}

.same-odds-condition {
  margin: 0 0 8px;
  font-size: 13px;
  color: #555;
  word-break: break-word;
}

.same-htft-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 8px;
}

.same-htft-form label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.same-htft-form button {
  border: 1px solid #222;
  border-radius: 2px;
  background: #fff;
  color: #222;
  font: inherit;
  padding: 6px 12px;
  cursor: pointer;
}

#same-odds-panel .query-summary {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.5;
  color: #333;
  word-break: break-word;
}

.htft-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
  margin-top: 8px;
}

.htft-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #444;
}

.htft-grid input {
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .htft-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 24px 0;
  background:
    radial-gradient(circle at top left, #d8efe4 0, transparent 42%),
    linear-gradient(160deg, #f3f1ea, #e7efe9);
}

.login-card {
  width: min(400px, 100%);
  margin-top: auto;
  margin-bottom: auto;
  padding: 28px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(23, 52, 43, 0.08);
}

.login-eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.login-hint {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.login-error {
  margin: 0 0 12px;
  color: var(--danger);
  font-size: 14px;
}

.login-card form {
  display: grid;
  gap: 14px;
}

.login-card label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

.login-card input[type="text"],
.login-card input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.login-submit {
  margin-top: 4px;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.guest-link {
  display: block;
  margin-top: 16px;
  text-align: center;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
}

.sync-log-table-wrap {
  overflow-x: auto;
}

.sync-log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.sync-log-table th,
.sync-log-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
}

.sync-log-table th {
  background: #f7f7f7;
  font-weight: 600;
}

.sync-log-table td.message {
  min-width: 180px;
  white-space: normal;
  word-break: break-all;
}

.sync-log-table td.empty {
  color: var(--muted);
  text-align: center;
  white-space: normal;
}

.sync-log-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #eee;
  color: #555;
}

.sync-log-status.success {
  background: #e6f6ec;
  color: #0a7f3f;
}

.sync-log-status.failed {
  background: #fdeceb;
  color: #b42318;
}

.sync-log-status.empty {
  background: #fff4e5;
  color: #b26a00;
}

.sync-log-status.not_run {
  background: #eef0f3;
  color: #5b6573;
}

.sync-log-pager {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.guest-notice {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.guest-row {
  cursor: default;
  text-decoration: none;
}

.db-match-toolbar,
.db-match-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.db-match-toolbar {
  margin-bottom: 8px;
}

.db-match-toolbar button.on {
  border-color: #e10600;
  color: #e10600;
}

.db-match-list {
  width: 100%;
  margin: 0;
}

.db-match-list .empty {
  margin: 0;
  padding: 24px 12px;
}

.db-match-list.managing .score-row {
  grid-template-columns: 28px 92px minmax(0, 1fr) auto;
  cursor: pointer;
}

.db-match-list .score-row.selected {
  background: #fff7f6;
}

.db-match-check {
  display: flex;
  align-items: center;
  justify-content: center;
}

.db-match-check input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.db-match-list .score-side a {
  color: inherit;
}

.db-match-log {
  max-height: 160px;
  margin: 8px 0 0;
  padding: 8px 10px;
  overflow: auto;
  border-radius: 6px;
  background: #f6f7f8;
  color: #444;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

@media (max-width: 768px) {
  .db-match-list.managing .score-row {
    grid-template-columns: 28px 60px minmax(0, 1fr) auto;
  }
}

.site-beian {
  flex: none;
  width: 100%;
  margin: 8px 0 0;
  padding: 8px 16px 20px;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.site-beian a {
  color: inherit;
  text-decoration: none;
}
