﻿:root {
  --ink: #1c2730;
  --muted: #66727d;
  --line: #d9e1e6;
  --surface: #ffffff;
  --page: #f5f7f3;
  --mint: #bfe5dd;
  --aqua: #cfeeed;
  --lemon: #fff36a;
  --rose: #f6d6d9;
  --wheat: #f6e8b8;
  --gold: #f0b900;
  --sage: #a9d68d;
  --blue: #b8c9e8;
  --green: #dcebd3;
  --accent: #146c5f;
  --accent-strong: #0e5148;
  font-family:
    "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 6px 0 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  font-size: 32px;
}

h2 {
  font-size: 22px;
}

p {
  margin: 6px 0 0;
  color: var(--muted);
}

.top-actions,
.leaderboard-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.leaderboard-actions {
  margin-left: auto;
}

.primary-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: white;
  background: var(--accent);
  cursor: pointer;
  white-space: nowrap;
}

.primary-action:hover {
  background: var(--accent-strong);
}

.tabs {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.tab {
  min-width: 96px;
  min-height: 40px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.tab:last-child {
  border-right: 0;
}

.tab.is-active {
  color: white;
  background: var(--accent);
}

.view {
  display: none;
  margin-top: 20px;
}

.view.is-active {
  display: block;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin: 0 0 14px;
}

.summary-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(112px, auto);
  gap: 10px;
}

.summary-pill {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--surface);
}

.summary-pill span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.summary-pill strong {
  display: block;
  margin-top: 3px;
  font-size: 19px;
}

.table-frame,
.matrix-scroll {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
}

th:last-child,
td:last-child {
  border-right: 0;
}

tr:last-child td {
  border-bottom: 0;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #20313d;
  background: #d1e7ce;
  font-weight: 800;
}

.leaderboard-table th,
.leaderboard-table td {
  height: 54px;
  padding: 9px 10px;
}

.rank {
  width: 58px;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
}

.person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 128px;
}

.avatar {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  color: #172029;
  background: var(--aqua);
  font-weight: 800;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.score-big {
  font-size: 26px;
  font-weight: 900;
}

.score-chip {
  display: inline-flex;
  min-width: 34px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #eef4f2;
  font-weight: 800;
}

.score-chip.exact {
  color: #4a3300;
  background: var(--lemon);
}

.score-chip.hit {
  color: #073f37;
  background: #c6e8df;
}

.score-chip.miss {
  color: #7b3030;
  background: #f6dddd;
}

.round-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.round-medal {
  font-size: 16px;
  line-height: 1;
}

.matrix-pager {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
  overflow-x: auto;
  padding-bottom: 2px;
  scroll-padding-inline: 12px;
}

.matrix-date-button {
  min-width: 64px;
  min-height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
}

.matrix-date-button.is-active {
  color: white;
  border-color: var(--accent);
  background: var(--accent);
  font-weight: 800;
}

.score-matrix {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.score-matrix col.member-col {
  width: 104px;
}

.score-matrix col.match-col {
  width: auto;
}

.score-matrix th,
.score-matrix td {
  min-width: 0;
  height: 46px;
  padding: 5px 3px;
  text-align: center;
  font-size: 13px;
}

.score-matrix .name-col {
  text-align: left;
  background: var(--surface);
}

.score-matrix thead .name-col {
  background: #d1e7ce;
}

.date-row th {
  height: 44px;
  font-size: 18px;
  background: #cfe7cf;
}

.result-row td {
  background: var(--lemon);
  font-size: 16px;
  font-weight: 800;
}

.player-name-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.score-matrix .avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
}

.player-name-cell strong {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
  white-space: nowrap;
}

.prediction {
  display: block;
  font-size: 13px;
  line-height: 1.05;
}

.points {
  display: inline-flex;
  min-width: 24px;
  height: 22px;
  align-items: center;
  justify-content: center;
  margin-top: 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  font-size: 15px;
  font-weight: 800;
}
.match-cell.is-pending-recent {
  box-shadow: inset 0 0 0 2px #f59e0b;
}

.match-cell.is-pending-recent .prediction,
.match-cell.is-pending-recent .points {
  color: #7c2d12;
}

.pending-note {
  color: #a35200;
  font-size: 12px;
  font-weight: 700;
}

.player-row-0 td {
  background: var(--mint);
}

.player-row-1 td {
  background: var(--rose);
}

.player-row-2 td {
  background: var(--wheat);
}

.player-row-3 td {
  background: var(--gold);
}

.player-row-4 td {
  background: var(--sage);
}

.player-row-5 td {
  background: var(--blue);
}

.player-row-6 td {
  background: var(--green);
}

.player-row-7 td {
  background: #cfd7f1;
}

.score-matrix .matrix-leader td {
  background: #e8f5ec;
}
@media (max-width: 600px) {
  .score-matrix {
    font-size: 12px;
  }

  .score-matrix col.member-col {
    width: 76px;
  }

  .score-matrix th,
  .score-matrix td {
    height: 42px;
    padding: 4px 2px;
    font-size: 12px;
  }

  .score-matrix .name-col {
    padding-left: 5px;
  }

  .score-matrix .avatar {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
  }

  .player-name-cell {
    gap: 3px;
  }

  .player-name-cell strong {
    font-size: 14px;
  }

  .prediction {
    font-size: 12px;
  }

  .points {
    min-width: 20px;
    height: 20px;
    margin-top: 3px;
    border-radius: 7px;
    font-size: 14px;
  }
}
.editor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.editor-grid.compact {
  grid-template-columns: minmax(180px, 1.1fr) minmax(130px, 0.6fr) minmax(240px, 1.4fr) auto;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: #fbfcfd;
}

select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: #fbfcfd;
}

input:focus {
  outline: 2px solid rgba(20, 108, 95, 0.24);
  border-color: var(--accent);
}

select:focus {
  outline: 2px solid rgba(20, 108, 95, 0.24);
  border-color: var(--accent);
}

.editor-submit {
  align-self: end;
}

.detail-table .odds {
  white-space: nowrap;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.person-tile {
  display: flex;
  min-height: 92px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
}

.person-tile strong {
  display: block;
  font-size: 18px;
}

.person-tile span {
  color: var(--muted);
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  border-radius: 8px;
  padding: 12px 14px;
  color: white;
  background: #1f2d36;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 1100px) {
  .app-shell {
    width: min(100% - 20px, 1480px);
    padding-top: 14px;
  }

  .topbar,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  h1 {
    font-size: 26px;
  }

  .tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
  }

  .tab {
    min-width: 0;
  }

  .leaderboard-actions {
    width: 100%;
    margin-left: 0;
  }

  .leaderboard-actions .primary-action {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 10px;
  }

  .summary-strip {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editor-grid,
  .editor-grid.compact {
    grid-template-columns: 1fr;
  }

  .leaderboard-table,
  .leaderboard-table thead,
  .leaderboard-table tbody,
  .leaderboard-table tr,
  .leaderboard-table th,
  .leaderboard-table td {
    display: block;
  }

  .leaderboard-table thead {
    display: none;
  }

  .leaderboard-table tbody {
    display: grid;
    gap: 10px;
    padding: 10px;
    background: #eef4f2;
  }

  .leaderboard-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px;
    grid-template-areas:
      "member total"
      "third first-two"
      "day day";
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
  }

  .leaderboard-table td {
    height: auto;
    padding: 0;
    border: 0;
  }


  .leaderboard-table .member-cell {
    grid-area: member;
    min-width: 0;
  }

  .leaderboard-table .person {
    min-width: 0;
    gap: 8px;
  }

  .leaderboard-table .avatar {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .leaderboard-table .score-big {
    grid-area: total;
    align-self: center;
    text-align: right;
    font-size: 26px;
  }

  .leaderboard-table td[data-label="淘汰赛"],
  .leaderboard-table td[data-label="小组赛"],
  .leaderboard-table td[data-label="当日"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 34px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #f6faf8;
    font-weight: 800;
  }

  .leaderboard-table td[data-label="淘汰赛"] {
    grid-area: third;
  }

  .leaderboard-table td[data-label="小组赛"] {
    grid-area: first-two;
  }

  .leaderboard-table td[data-label="当日"] {
    grid-area: day;
  }

  .leaderboard-table td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  .leaderboard-table .member-cell::before,
  .leaderboard-table .score-big::before {
    content: none;
  }

  .leaderboard-table .score-chip {
    min-width: 30px;
    height: 26px;
  }
}

.day-board {
  display: grid;
  gap: 18px;
}

.day-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.day-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: #d1e7ce;
}

.day-title h3 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.day-title span {
  color: var(--muted);
  font-weight: 700;
}

.day-table {
  min-width: 0;
}
.leaderboard-table {
  table-layout: fixed;
}

.leaderboard-table th:nth-child(1),
.leaderboard-table .member-cell {
  width: 136px;
}

.leaderboard-table th:nth-child(2),
.leaderboard-table .score-big {
  width: 64px;
}

.leaderboard-table th:nth-child(3),
.leaderboard-table th:nth-child(4),
.leaderboard-table th:nth-child(5),
.leaderboard-table td[data-label="淘汰赛"],
.leaderboard-table td[data-label="小组赛"],
.leaderboard-table td[data-label="当日"] {
  width: 68px;
}

.leaderboard-table .score-big,
.leaderboard-table td[data-label="淘汰赛"],
.leaderboard-table td[data-label="小组赛"],
.leaderboard-table td[data-label="当日"] {
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .leaderboard-table {
    table-layout: auto;
  }

  .leaderboard-table th:nth-child(1),
  .leaderboard-table th:nth-child(2),
  .leaderboard-table th:nth-child(3),
  .leaderboard-table th:nth-child(4),
  .leaderboard-table th:nth-child(5),
  .leaderboard-table .member-cell,
  .leaderboard-table .score-big,
  .leaderboard-table td[data-label="淘汰赛"],
  .leaderboard-table td[data-label="小组赛"],
  .leaderboard-table td[data-label="当日"] {
    width: auto;
  }
}


/* Mobile leaderboard: keep the five-column table compact. */
@media (max-width: 1100px) {
  .table-frame {
    overflow: hidden;
  }

  #matchesView .table-frame {
    overflow-x: auto;
  }

  .leaderboard-table {
    display: table;
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 13px;
  }

  .leaderboard-table thead {
    display: table-header-group;
  }

  .leaderboard-table tbody {
    display: table-row-group;
    padding: 0;
    background: transparent;
  }

  .leaderboard-table tr {
    display: table-row;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .leaderboard-table th,
  .leaderboard-table td {
    display: table-cell;
    height: 42px;
    padding: 6px 3px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-align: center;
    vertical-align: middle;
  }

  .leaderboard-table th:last-child,
  .leaderboard-table td:last-child {
    border-right: 0;
  }

  .leaderboard-table th:nth-child(1),
  .leaderboard-table .member-cell {
    width: 30%;
  }

  .leaderboard-table th:nth-child(2),
  .leaderboard-table .score-big {
    width: 14%;
  }

  .leaderboard-table th:nth-child(3),
  .leaderboard-table th:nth-child(4),
  .leaderboard-table th:nth-child(5),
  .leaderboard-table td[data-label="淘汰赛"],
  .leaderboard-table td[data-label="小组赛"],
  .leaderboard-table td[data-label="当日"] {
    width: 18.6%;
  }

  .leaderboard-table .member-cell {
    text-align: left;
  }

  .leaderboard-table .person {
    min-width: 0;
    gap: 5px;
  }

  .leaderboard-table .avatar {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    border-width: 1px;
  }

  .leaderboard-table .person strong {
    min-width: 0;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .leaderboard-table .score-big {
    font-size: 13px;
    font-weight: 800;
    text-align: center;
  }

  .leaderboard-table td[data-label="淘汰赛"],
  .leaderboard-table td[data-label="小组赛"],
  .leaderboard-table td[data-label="当日"] {
    min-height: 0;
    padding: 6px 3px;
    border-radius: 0;
    background: transparent;
    font-weight: 800;
  }

  .leaderboard-table td[data-label]::before {
    content: none;
  }

  .leaderboard-table .score-chip {
    display: inline;
    min-width: 0;
    height: auto;
    color: inherit;
    background: transparent;
    border-radius: 0;
    font-weight: 800;
  }
}


/* Final mobile leaderboard table override: neutralize old card rules. */
@media (max-width: 1100px) {
  .leaderboard-table .member-cell,
  .leaderboard-table .score-big,
  .leaderboard-table td[data-label="淘汰赛"],
  .leaderboard-table td[data-label="小组赛"],
  .leaderboard-table td[data-label="当日"] {
    display: table-cell;
    height: 42px;
    padding: 6px 3px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
  }

  .leaderboard-table .member-cell {
    width: 30%;
    text-align: left;
  }

  .leaderboard-table .score-big {
    width: 14%;
    font-size: 13px;
  }

  .leaderboard-table td[data-label="淘汰赛"],
  .leaderboard-table td[data-label="小组赛"],
  .leaderboard-table td[data-label="当日"] {
    width: 18.6%;
  }

  .leaderboard-table td[data-label="当日"] {
    border-right: 0;
  }
}


.summary-strip:empty {
  display: none;
}


.secondary-action {
  color: var(--accent);
  border: 1px solid var(--accent);
  background: #ffffff;
}

.secondary-action:hover {
  color: #ffffff;
  background: var(--accent-strong);
}

@media (max-width: 1100px) {
  .top-actions {
    flex-wrap: wrap;
  }

  .top-actions .primary-action {
    flex: 1 1 130px;
    padding: 0 10px;
  }
}

.version-footer {
  margin-top: 18px;
  color: #98a3aa;
  font-size: 12px;
  line-height: 1;
}

.matrix-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 180px));
  justify-content: end;
  gap: 10px;
  margin-top: 14px;
}

.matrix-actions .primary-action {
  width: 100%;
}

.result-check-status {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fbfcfd;
  font-size: 13px;
}

.result-check-status strong {
  display: block;
  margin-bottom: 4px;
}

.result-check-status ul {
  margin: 6px 0 0 18px;
  padding: 0;
}

.result-check-status li + li {
  margin-top: 2px;
}

.result-check-status.is-error {
  border-color: #f4c2c2;
  color: #8a1f1f;
  background: #fff6f6;
}

.entry-modal {
  position: fixed;
  inset: 0;
  z-index: 32;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(13, 25, 34, 0.54);
}

.entry-modal.is-visible {
  display: flex;
}

.entry-modal__panel {
  width: min(760px, 100%);
  max-height: min(92vh, 980px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface);
  box-shadow: 0 18px 60px rgba(10, 22, 30, 0.28);
}

.entry-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.entry-modal__head strong {
  font-size: 20px;
}

.entry-modal__close {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  cursor: pointer;
}

.entry-form {
  display: grid;
  gap: 12px;
}

.entry-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.entry-section__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.entry-section__head > span {
  display: inline-flex;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--accent);
  font-weight: 800;
}

.entry-section h3 {
  margin: 0;
  font-size: 16px;
}

.entry-section p {
  margin-top: 2px;
  font-size: 12px;
}

.entry-date-field {
  max-width: 220px;
}

.entry-match-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.entry-match-item,
.entry-result-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #ffffff;
}

.entry-match-item strong,
.entry-result-row strong {
  display: block;
  line-height: 1.25;
}

.entry-match-item span,
.entry-result-row span {
  color: var(--muted);
  font-size: 12px;
}

.member-combobox {
  position: relative;
}

.member-select-button {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--ink);
  background: #ffffff;
  cursor: pointer;
}

.member-select-button::after {
  content: "⌄";
  margin-left: auto;
  color: var(--muted);
}

.member-select-list {
  position: absolute;
  z-index: 4;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #ffffff;
  box-shadow: 0 12px 36px rgba(10, 22, 30, 0.16);
}

.member-select-list.is-open {
  display: grid;
  gap: 4px;
}

.member-option {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.member-option:hover,
.member-option.is-active {
  background: #eef7f4;
}

.member-option .avatar,
.member-select-button .avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}

#predictionRawText {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  background: #ffffff;
}

.entry-result {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f6faf8;
}

.entry-result h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.entry-result-grid {
  display: grid;
  gap: 8px;
}

.entry-result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.result-entry-panel {
  width: min(520px, 100%);
}

.recent-odds-panel {
  width: min(560px, 100%);
}

.result-entry-panel .entry-actions {
  grid-template-columns: 1fr;
}

.result-match-preview {
  display: grid;
  gap: 2px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.result-match-preview strong {
  line-height: 1.25;
}

.result-match-preview span {
  color: var(--muted);
  font-size: 12px;
}

.result-score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.result-score-grid label {
  display: grid;
  gap: 6px;
}

.result-score-grid label > span {
  min-height: 20px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-score-grid input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.result-winner-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.result-winner-options label {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.result-winner-options input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.recent-odds-grid {
  display: grid;
  gap: 10px;
}

.recent-odds-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.recent-odds-row input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
}

.entry-result-score {
  min-width: 58px;
  border-radius: 8px;
  padding: 6px 8px;
  text-align: center;
  font-weight: 800;
  background: #ffffff;
}

.entry-warning {
  margin-top: 10px;
  color: #8a5b00;
  font-size: 13px;
}

.entry-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.entry-actions .primary-action {
  width: 100%;
}

.entry-actions .confirm-action {
  border-color: #2563eb;
  color: #ffffff;
  background: #2563eb;
}

.entry-actions .confirm-action:hover {
  background: #1d4ed8;
}

.entry-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

@media (max-width: 700px) {
  .entry-modal {
    align-items: stretch;
    padding: 10px;
  }

  .entry-modal__panel {
    max-height: none;
  }

  .entry-actions .primary-action,
  .matrix-actions .primary-action {
    width: 100%;
  }

  .matrix-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}
.image-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(13, 25, 34, 0.54);
}

.image-modal.is-visible {
  display: flex;
}

.image-modal__panel {
  width: min(960px, 100%);
  max-height: min(88vh, 980px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
  box-shadow: 0 18px 60px rgba(10, 22, 30, 0.28);
}

/* Geist visual refresh, based on Vercel design.md / design.dark.md. */
:root {
  --ink: #171717;
  --muted: #666666;
  --line: #0000001a;
  --surface: #ffffff;
  --page: #fafafa;
  --panel: #ffffff;
  --panel-muted: #f2f2f2;
  --accent: #171717;
  --accent-strong: #4d4d4d;
  --focus: #006bff;
  --success: #007a55;
  --warning: #a35200;
  --danger: #d8001b;
  --chip: #f2f2f2;
  --chip-hit: #ebfff5;
  --chip-exact: #fff4cf;
  --chip-miss: #ffeeef;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.12);
  --radius-control: 6px;
  --radius-panel: 8px;
  --radius-modal: 12px;
  font-family:
    "Geist Sans", "Inter", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

body {
  background:
    linear-gradient(#ffffff, #fafafa 220px),
    var(--page);
  font-size: 14px;
  line-height: 1.5;
}

h1,
h2,
h3,
strong,
th,
.score-big,
.points {
  font-weight: 600;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  font-size: 32px;
  line-height: 40px;
}

h2 {
  font-size: 20px;
  line-height: 26px;
}

p,
.eyebrow,
.version-footer {
  color: var(--muted);
}

.eyebrow {
  color: var(--secondary, var(--muted));
  font-size: 12px;
  font-weight: 600;
}

.primary-action,
.tab,
button,
input,
select,
textarea {
  border-radius: var(--radius-control);
}

.primary-action {
  min-height: 40px;
  border: 1px solid var(--accent);
  color: var(--surface);
  background: var(--accent);
  font-size: 14px;
  font-weight: 500;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.primary-action:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.secondary-action {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

.secondary-action:hover {
  color: var(--ink);
  border-color: #00000036;
  background: var(--panel-muted);
}

.tabs {
  border-color: var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.tab {
  color: var(--muted);
  border-color: var(--line);
  font-size: 14px;
  font-weight: 500;
}

.tab:hover {
  color: var(--ink);
  background: var(--panel-muted);
}

.tab.is-active,
.matrix-date-button.is-active {
  color: var(--surface);
  border-color: var(--accent);
  background: var(--accent);
}

.table-frame,
.matrix-scroll,
.day-section,
.editor-grid,
.person-tile,
.summary-pill,
.entry-section,
.entry-result,
.result-check-status,
.result-match-preview,
.entry-match-item,
.entry-result-row {
  border-color: var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: none;
}

.table-frame,
.day-section,
.editor-grid,
.entry-modal__panel,
.image-modal__panel {
  box-shadow: var(--shadow-sm);
}

th,
td {
  border-color: var(--line);
}

thead th,
.score-matrix thead .name-col,
.day-title {
  color: var(--ink);
  background: var(--panel-muted);
}

.day-title {
  min-height: 50px;
}

.day-title h3 {
  font-size: 20px;
  line-height: 26px;
}

.leaderboard-table td,
.score-matrix td,
.detail-table td {
  background: var(--surface);
}

.score-big {
  font-size: 22px;
}

.avatar {
  border: 1px solid var(--line);
  background: var(--panel-muted);
  box-shadow: none;
}

.score-chip,
.points {
  border-radius: 9999px;
  background: var(--chip);
  font-weight: 600;
}

.score-chip.exact {
  color: var(--warning);
  background: transparent;
}

.score-chip.hit {
  color: var(--success);
  background: transparent;
}

.score-chip.miss {
  color: var(--danger);
  background: transparent;
}

.matrix-date-button {
  color: var(--muted);
  border-color: var(--line);
  background: var(--surface);
  font-weight: 500;
}

.matrix-date-button:hover {
  color: var(--ink);
  background: var(--panel-muted);
}

.result-row td {
  color: #171717;
  background: #fff4cf;
}

.player-row-0 td,
.player-row-1 td,
.player-row-2 td,
.player-row-3 td,
.player-row-4 td,
.player-row-5 td,
.player-row-6 td,
.player-row-7 td {
  background: var(--surface);
}

.player-row-0 .name-col { box-shadow: inset 3px 0 #0090ff; }
.player-row-1 .name-col { box-shadow: inset 3px 0 #f97ea7; }
.player-row-2 .name-col { box-shadow: inset 3px 0 #ffa600; }
.player-row-3 .name-col { box-shadow: inset 3px 0 #46a758; }
.player-row-4 .name-col { box-shadow: inset 3px 0 #12a594; }
.player-row-5 .name-col { box-shadow: inset 3px 0 #8e4ec6; }
.player-row-6 .name-col { box-shadow: inset 3px 0 #8f8f8f; }
.player-row-7 .name-col { box-shadow: inset 3px 0 #006bff; }

.score-matrix .matrix-leader td {
  background: #f0f7ff;
}

input,
select,
textarea,
#predictionRawText,
.result-score-grid input,
.member-select-button {
  border-color: var(--line);
  color: var(--ink);
  background: var(--surface);
}

input:hover,
select:hover,
textarea:hover,
#predictionRawText:hover,
.member-select-button:hover {
  border-color: #00000036;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.member-select-button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--focus);
}

input:focus,
select:focus,
textarea:focus,
#predictionRawText:focus {
  outline: 0;
  border-color: var(--focus);
}

.entry-modal,
.image-modal {
  background: rgba(0, 0, 0, 0.48);
}

.entry-modal__panel,
.image-modal__panel {
  border-radius: var(--radius-modal);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.entry-modal__close {
  border-color: var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
}

.entry-section__head > span {
  color: var(--surface);
  background: var(--accent);
}

.entry-actions .confirm-action {
  border-color: var(--focus);
  background: var(--focus);
}

.entry-actions .confirm-action:hover {
  border-color: #0059ec;
  background: #0059ec;
}

.toast {
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  color: var(--surface);
  background: var(--ink);
  box-shadow: var(--shadow-md);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ededed;
    --muted: #a0a0a0;
    --line: #ffffff21;
    --surface: #000000;
    --page: #000000;
    --panel: #0a0a0a;
    --panel-muted: #1a1a1a;
    --accent: #ededed;
    --accent-strong: #a0a0a0;
    --focus: #47a8ff;
    --chip: #1a1a1a;
    --chip-hit: #0b3b2e;
    --chip-exact: #361900;
    --chip-miss: #440d13;
    --shadow-sm: 0 2px 4px rgba(255, 255, 255, 0.06);
    --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.6);
  }

  body {
    background: var(--page);
  }

  .primary-action,
  .tab.is-active,
  .matrix-date-button.is-active {
    color: #000000;
  }

  .secondary-action:hover,
  .tab:hover,
  .matrix-date-button:hover {
    background: var(--panel-muted);
  }

  .result-row td {
    color: #ffe9ad;
    background: #2a1700;
  }

  .score-matrix .matrix-leader td {
    background: #06193a;
  }

  .player-row-0 td,
  .player-row-1 td,
  .player-row-2 td,
  .player-row-3 td,
  .player-row-4 td,
  .player-row-5 td,
  .player-row-6 td,
  .player-row-7 td,
  .leaderboard-table td,
  .score-matrix td,
  .detail-table td {
    background: var(--surface);
  }
}

@media (max-width: 700px) {
  h1 {
    font-size: 28px;
    line-height: 34px;
  }

  .matrix-actions {
    grid-template-columns: 1fr;
  }

  .primary-action {
    min-height: 40px;
  }
}

.image-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.image-modal__head strong {
  font-size: 18px;
}

.image-modal__close {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  cursor: pointer;
}

.image-modal p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.image-modal img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef4f2;
}

.image-modal__download {
  width: 100%;
  margin: 0 0 12px;
  text-decoration: none;
}

.result-entry-panel {
  width: min(480px, calc(100vw - 24px));
  max-height: min(82dvh, 720px);
  padding: 18px;
}

.result-entry-panel .entry-modal__head {
  margin-bottom: 12px;
}

.result-entry-panel .entry-modal__head strong {
  font-size: 22px;
  line-height: 28px;
}

.result-entry-panel .entry-form {
  gap: 10px;
}

.result-entry-panel .entry-section {
  padding: 12px;
}

.result-entry-panel .entry-section__head {
  margin-bottom: 10px;
}

.result-entry-panel .entry-section__head > span {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  color: #ffffff;
  background: #171717;
  font-size: 16px;
}

.result-entry-panel .entry-section h3 {
  font-size: 18px;
  line-height: 24px;
}

.result-entry-panel .entry-section p {
  font-size: 13px;
  line-height: 18px;
}

#resultMatchSelect {
  width: 100%;
  min-height: 48px;
  border-radius: 6px;
  padding: 0 14px;
  font-size: 16px;
  font-weight: 700;
}

.result-match-preview {
  margin-top: 8px;
  padding: 12px 14px;
}

.result-match-preview strong {
  font-size: 16px;
}

.result-match-preview span {
  font-size: 13px;
}

.result-score-grid {
  gap: 12px;
}

.result-score-grid input {
  height: 48px;
  border-radius: 6px;
  font-size: 22px;
}

@media (max-width: 700px) {
  .entry-modal {
    align-items: center;
    padding: 12px;
  }

  .entry-modal__panel {
    max-height: calc(100dvh - 24px);
  }

  .result-entry-panel {
    width: min(500px, calc(100vw - 18px));
    max-height: calc(100dvh - 46px);
    padding: 16px;
  }

  .result-entry-panel .entry-modal__head strong {
    font-size: 21px;
  }
}







#matchEditSelect {
  min-height: 54px;
  font-size: 15px;
  padding-block: 8px;
}

@media (max-width: 720px) {
  #matchEditSelect {
    min-height: 58px;
    font-size: 16px;
  }
}

/* v72: 决赛竞猜与六列排行榜 */
.leaderboard-table {
  table-layout: fixed;
}

.leaderboard-table th:nth-child(1),
.leaderboard-table .member-cell {
  width: 30%;
}

.leaderboard-table th:nth-child(2),
.leaderboard-table .score-big {
  width: 12%;
}

.leaderboard-table th:nth-child(3),
.leaderboard-table td[data-label="决赛"] {
  width: 12%;
}

.leaderboard-table th:nth-child(4),
.leaderboard-table td[data-label="淘汰赛"] {
  width: 17%;
}

.leaderboard-table th:nth-child(5),
.leaderboard-table td[data-label="小组赛"] {
  width: 16%;
}

.leaderboard-table th:nth-child(6),
.leaderboard-table td[data-label="当日"] {
  width: 13%;
}

.leaderboard-table td[data-label="决赛"] {
  font-weight: 800;
  color: #8a5a00;
  text-align: center;
}

.leaderboard-table thead th {
  text-align: center;
}

.final-picks-head {
  margin-bottom: 14px;
  align-items: flex-end;
}

.decimal-setting {
  position: relative;
  flex: 0 0 auto;
}

.decimal-setting .secondary-action {
  min-width: 92px;
}

.decimal-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  width: 132px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(18, 26, 33, 0.16);
}

.decimal-menu[hidden] {
  display: none;
}

.decimal-menu button {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.decimal-menu button:last-child {
  border-bottom: 0;
}

.decimal-menu button:hover,
.decimal-menu button.is-selected {
  background: #eef5ed;
}

.decimal-menu button.is-selected::after {
  content: "\2713";
  margin-left: 10px;
  color: var(--accent);
}

.final-picks-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 5px 14px rgba(25, 45, 55, 0.07);
}

.final-picks-header,
.final-pick-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.05fr) minmax(105px, 0.8fr) minmax(105px, 0.8fr) minmax(70px, 0.55fr) minmax(250px, 1.5fr);
}

.final-picks-header {
  color: var(--ink);
  background: #d1e7ce;
  font-weight: 800;
}

.final-picks-header > div,
.final-pick-cell {
  min-width: 0;
  border-right: 1px solid var(--line);
  padding: 13px 16px;
}

.final-picks-header > div:last-child,
.final-pick-cell:last-child {
  border-right: 0;
}

.final-pick-row {
  min-height: 72px;
  border-top: 1px solid var(--line);
}

.final-pick-row:first-child {
  border-top: 0;
}

.final-pick-cell {
  display: flex;
  align-items: center;
}

.final-pick-member {
  gap: 12px;
}

.final-pick-member strong,
.final-pick-team strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.final-pick-member strong {
  font-size: 17px;
}

.final-pick-team {
  justify-content: center;
  font-size: 17px;
}

.final-pick-team.is-out {
  color: #8a9298;
  background: #f0f1f1;
}

.final-pick-comment {
  color: #46545f;
  font-size: 14px;
  line-height: 1.55;
}

.final-pick-score {
  justify-content: center;
  color: #8a5a00;
  font-size: 18px;
}

.final-picks-note {
  margin-top: 12px;
  font-size: 13px;
}

body.visitor-mode .final-pick-member {
  justify-content: center;
}

body.visitor-mode .final-pick-member strong {
  display: none;
}

body.visitor-mode .final-picks-header,
body.visitor-mode .final-pick-row {
  grid-template-columns: 76px minmax(100px, 0.8fr) minmax(100px, 0.8fr) minmax(68px, 0.5fr) minmax(230px, 1.5fr);
}

body.visitor-mode .leaderboard-table th:nth-child(1),
body.visitor-mode .leaderboard-table .member-cell {
  width: 70px !important;
  min-width: 70px;
  max-width: 70px;
}

body.visitor-mode .leaderboard-table th:nth-child(2),
body.visitor-mode .leaderboard-table .score-big,
body.visitor-mode .leaderboard-table th:nth-child(3),
body.visitor-mode .leaderboard-table td[data-label="决赛"],
body.visitor-mode .leaderboard-table th:nth-child(6),
body.visitor-mode .leaderboard-table td[data-label="当日"] {
  width: 15%;
}

body.visitor-mode .leaderboard-table th:nth-child(4),
body.visitor-mode .leaderboard-table td[data-label="淘汰赛"],
body.visitor-mode .leaderboard-table th:nth-child(5),
body.visitor-mode .leaderboard-table td[data-label="小组赛"] {
  width: 20%;
}

@media (max-width: 720px) {
  .tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .tab {
    min-width: 0;
    padding-inline: 6px;
  }

  .leaderboard-table th:nth-child(1),
  .leaderboard-table .member-cell {
    width: 28%;
  }

  .leaderboard-table th:nth-child(2),
  .leaderboard-table .score-big,
  .leaderboard-table th:nth-child(3),
  .leaderboard-table td[data-label="决赛"] {
    width: 12%;
  }

  .leaderboard-table th:nth-child(4),
  .leaderboard-table td[data-label="淘汰赛"] {
    width: 18%;
  }

  .leaderboard-table th:nth-child(5),
  .leaderboard-table td[data-label="小组赛"] {
    width: 16%;
  }

  .leaderboard-table th:nth-child(6),
  .leaderboard-table td[data-label="当日"] {
    width: 14%;
  }

  .final-picks-header {
    display: grid;
  }

  .final-picks-header,
  .final-pick-row,
  body.visitor-mode .final-picks-header,
  body.visitor-mode .final-pick-row {
    grid-template-columns: minmax(72px, 0.85fr) minmax(52px, 0.6fr) minmax(52px, 0.6fr) 42px minmax(105px, 1.45fr);
  }

  body.visitor-mode .final-picks-header,
  body.visitor-mode .final-pick-row {
    grid-template-columns: 48px minmax(52px, 0.65fr) minmax(52px, 0.65fr) 42px minmax(112px, 1.6fr);
  }

  .final-picks-header > div {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 4px;
    text-align: center;
    font-size: 12px;
    line-height: 1.2;
  }

  .final-pick-row {
    min-height: 68px;
  }

  .final-pick-cell {
    min-height: 68px;
    padding: 8px 4px;
    border-right: 1px solid var(--line);
  }

  .final-pick-member {
    justify-content: flex-start;
    gap: 6px;
  }

  .final-pick-member .avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    flex: 0 0 32px;
    aspect-ratio: 1;
  }

  .final-pick-member strong {
    font-size: 13px;
  }

  .final-pick-team {
    justify-content: center;
    text-align: center;
    font-size: 14px;
    line-height: 1.35;
  }

  .final-pick-team strong {
    white-space: normal;
  }

  .final-pick-score {
    justify-content: center;
    font-size: 15px;
  }

  .final-pick-comment {
    align-items: center;
    padding-inline: 7px;
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  body.visitor-mode .final-pick-member {
    justify-content: center;
  }

  body.visitor-mode .final-pick-member .avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    flex: 0 0 34px;
  }

  body.visitor-mode .leaderboard-table th:nth-child(1),
  body.visitor-mode .leaderboard-table .member-cell {
    width: 54px !important;
    min-width: 54px;
    max-width: 54px;
  }

  body.visitor-mode .leaderboard-table th:nth-child(2),
  body.visitor-mode .leaderboard-table .score-big,
  body.visitor-mode .leaderboard-table th:nth-child(3),
  body.visitor-mode .leaderboard-table td[data-label="决赛"],
  body.visitor-mode .leaderboard-table th:nth-child(6),
  body.visitor-mode .leaderboard-table td[data-label="当日"] {
    width: 17%;
  }

  body.visitor-mode .leaderboard-table th:nth-child(4),
  body.visitor-mode .leaderboard-table td[data-label="淘汰赛"],
  body.visitor-mode .leaderboard-table th:nth-child(5),
  body.visitor-mode .leaderboard-table td[data-label="小组赛"] {
    width: 22%;
  }
}

@media (prefers-color-scheme: dark) {
  .final-picks-header {
    background: #29342e;
  }

  .final-pick-team.is-out {
    color: #7f898f;
    background: #222629;
  }

  .final-pick-comment {
    color: #c5cdd2;
  }
}

.avatar-placeholder {
  display: inline-grid;
  place-items: center;
  background: #111;
  color: #fff;
  font-weight: 800;
}

.detail-table { table-layout: fixed; }
.detail-table th:nth-child(1),
.detail-table .stage-cell { width: 92px; white-space: nowrap; text-align: center; }
.detail-table th:nth-child(2),
.detail-table .date-cell { width: 76px; white-space: nowrap; text-align: center; }
.detail-table th:nth-child(4),
.detail-table .odds { width: 116px; white-space: nowrap; text-align: center; }
.detail-table .match-name-cell { width: auto; }
.detail-table th,
.detail-table td { padding-top: 13px; padding-bottom: 13px; line-height: 1.35; }
@media (max-width: 720px) {
  .detail-table { min-width: 0; }
  .detail-table th:nth-child(1),
  .detail-table .stage-cell { width: 64px; }
  .detail-table th:nth-child(2),
  .detail-table .date-cell { width: 54px; }
  .detail-table th:nth-child(4),
  .detail-table .odds { width: 90px; }
  .detail-table th,
  .detail-table td { padding: 10px 8px; }
}

body.visitor-mode [data-admin-only] {
  display: none !important;
}

body.visitor-mode .leaderboard-table .person,
body.visitor-mode .score-matrix .player-name-cell {
  justify-content: center;
}

body.visitor-mode .leaderboard-table .person strong,
body.visitor-mode .score-matrix .player-name-cell strong {
  display: none !important;
}

body.visitor-mode .leaderboard-table .member-cell,
body.visitor-mode .score-matrix .name-col {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
}

body.visitor-mode .leaderboard-table .avatar,
body.visitor-mode .score-matrix .avatar {
  margin: 0 auto;
}

@media (max-width: 720px) {
  body.visitor-mode .leaderboard-table .member-cell,
  body.visitor-mode .score-matrix .name-col {
    width: 58px;
    min-width: 58px;
    max-width: 58px;
  }
}

body.visitor-mode .leaderboard-table {
  table-layout: fixed;
}

body.visitor-mode .leaderboard-table th:nth-child(1),
body.visitor-mode .leaderboard-table .member-cell {
  width: 76px !important;
  min-width: 76px;
  max-width: 76px;
  text-align: center;
}

body.visitor-mode .leaderboard-table th:nth-child(2),
body.visitor-mode .leaderboard-table .score-big,
body.visitor-mode .leaderboard-table th:nth-child(5),
body.visitor-mode .leaderboard-table td[data-label="当日"] {
  width: 17%;
}

body.visitor-mode .leaderboard-table th:nth-child(3),
body.visitor-mode .leaderboard-table th:nth-child(4),
body.visitor-mode .leaderboard-table td[data-label="淘汰赛"],
body.visitor-mode .leaderboard-table td[data-label="小组赛"] {
  width: 23%;
}

body.visitor-mode .leaderboard-table .person {
  width: 100%;
}

@media (max-width: 720px) {
  body.visitor-mode .leaderboard-table th:nth-child(1),
  body.visitor-mode .leaderboard-table .member-cell {
    width: 56px !important;
    min-width: 56px;
    max-width: 56px;
  }

  body.visitor-mode .leaderboard-table th:nth-child(2),
  body.visitor-mode .leaderboard-table .score-big,
  body.visitor-mode .leaderboard-table th:nth-child(5),
  body.visitor-mode .leaderboard-table td[data-label="当日"] {
    width: 18%;
  }

  body.visitor-mode .leaderboard-table th:nth-child(3),
  body.visitor-mode .leaderboard-table th:nth-child(4),
  body.visitor-mode .leaderboard-table td[data-label="淘汰赛"],
  body.visitor-mode .leaderboard-table td[data-label="小组赛"] {
    width: 23%;
  }
}

@media (max-width: 720px) {
  .final-picks-head {
    align-items: flex-end;
  }

  .decimal-setting .secondary-action {
    min-width: 82px;
    min-height: 42px;
    padding-inline: 12px;
  }
}

/* Keep v72 visitor leaderboard widths after legacy visitor rules. */
body.visitor-mode .leaderboard-table th:nth-child(1),
body.visitor-mode .leaderboard-table .member-cell {
  width: 70px !important;
  min-width: 70px;
  max-width: 70px;
}

body.visitor-mode .leaderboard-table th:nth-child(2),
body.visitor-mode .leaderboard-table .score-big,
body.visitor-mode .leaderboard-table th:nth-child(3),
body.visitor-mode .leaderboard-table td[data-label="决赛"],
body.visitor-mode .leaderboard-table th:nth-child(6),
body.visitor-mode .leaderboard-table td[data-label="当日"] {
  width: 15%;
}

body.visitor-mode .leaderboard-table th:nth-child(4),
body.visitor-mode .leaderboard-table td[data-label="淘汰赛"],
body.visitor-mode .leaderboard-table th:nth-child(5),
body.visitor-mode .leaderboard-table td[data-label="小组赛"] {
  width: 20%;
}

@media (max-width: 720px) {
  body.visitor-mode .leaderboard-table th:nth-child(1),
  body.visitor-mode .leaderboard-table .member-cell {
    width: 54px !important;
    min-width: 54px;
    max-width: 54px;
  }

  body.visitor-mode .leaderboard-table th:nth-child(2),
  body.visitor-mode .leaderboard-table .score-big,
  body.visitor-mode .leaderboard-table th:nth-child(3),
  body.visitor-mode .leaderboard-table td[data-label="决赛"],
  body.visitor-mode .leaderboard-table th:nth-child(6),
  body.visitor-mode .leaderboard-table td[data-label="当日"] {
    width: 17%;
  }

  body.visitor-mode .leaderboard-table th:nth-child(4),
  body.visitor-mode .leaderboard-table td[data-label="淘汰赛"],
  body.visitor-mode .leaderboard-table th:nth-child(5),
  body.visitor-mode .leaderboard-table td[data-label="小组赛"] {
    width: 22%;
  }
}

