:root {
  --bg: #06122e;
  --bg2: #0a1c44;
  --panel: rgba(14, 32, 74, 0.82);
  --line: rgba(120, 160, 255, 0.16);
  --blue: #3d7fff;
  --brand: #015adc;
  --orange: #f94e00;
  --yellow: #ffd34d;
  --text: #eaf1ff;
  --dim: #8fa3cc;
  --good: #2ee6a8;
  --bad: #ff5d73;
  --shadow: 0 18px 60px rgba(1, 20, 60, 0.55);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(61, 127, 255, 0.28), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(249, 78, 0, 0.14), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}
button { font: inherit; cursor: pointer; }
.hidden { display: none !important; }

/* ---------- gate ---------- */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate-card {
  width: min(400px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.gate-logo { font-size: 26px; font-weight: 800; letter-spacing: 2px; margin-bottom: 20px; }
.gate-logo span { color: var(--orange); margin-left: 8px; font-size: 15px; letter-spacing: 6px; }
.gate-card label { display: block; font-size: 13px; color: var(--dim); margin: 14px 0 6px; }
.gate-card input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(6, 18, 46, 0.9); color: var(--text); outline: none;
}
.gate-card input:focus { border-color: var(--blue); }
.gate-error { color: var(--bad); font-size: 13px; margin-top: 12px; min-height: 18px; }
.gate-toggle { background: none; border: 0; color: var(--dim); font-size: 12px; padding: 4px 0; margin-top: 10px; text-decoration: underline; }
.btn-primary {
  width: 100%; margin-top: 18px; padding: 13px; border: 0; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--blue)); color: #fff; font-weight: 700;
}
.btn-primary:active { transform: translateY(1px); }

/* ---------- app frame ---------- */
.app { max-width: 1180px; margin: 0 auto; padding: 0 16px 60px; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 14px 4px; background: linear-gradient(180deg, var(--bg) 75%, transparent);
}
.brand { font-weight: 800; font-size: 19px; letter-spacing: 1px; }
.brand em { color: var(--orange); font-style: normal; font-size: 13px; margin-left: 8px; letter-spacing: 4px; }
.tabs { display: flex; gap: 6px; flex: 1; }
.tab {
  padding: 8px 16px; border-radius: 999px; border: 1px solid transparent;
  background: transparent; color: var(--dim); font-weight: 600;
}
.tab.active { background: rgba(61, 127, 255, 0.16); color: #fff; border-color: rgba(61, 127, 255, 0.4); }
.clock { font-variant-numeric: tabular-nums; color: var(--dim); font-size: 14px; }
.tabpage { display: none; }
.tabpage.active { display: block; }

/* ---------- round chips ---------- */
.round-chips { display: flex; gap: 10px; margin: 10px 0 18px; flex-wrap: wrap; }
.round-chip {
  padding: 10px 18px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--panel); color: var(--dim); font-weight: 700;
}
.round-chip.active { color: #fff; border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), 0 8px 24px rgba(61, 127, 255, 0.25); }
.round-chip .rc-score { display: block; margin: 2px 0 0; font-size: 12px; font-weight: 600; color: var(--yellow); opacity: 0.85; }

/* ---------- match grid ---------- */
.match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.match-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  padding: 14px 16px 16px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.match-card.done { opacity: 0.86; }
.match-card.live::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--yellow));
  animation: pulse-line 1.2s ease-in-out infinite;
}
@keyframes pulse-line { 50% { opacity: 0.35; } }
.mc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mc-court { font-weight: 800; color: var(--dim); font-size: 13px; letter-spacing: 1px; }
.mc-status { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(143, 163, 204, 0.15); color: var(--dim); }
.mc-status.live { background: rgba(249, 78, 0, 0.18); color: var(--orange); }
.mc-status.done { background: rgba(46, 230, 168, 0.14); color: var(--good); }
.mc-side { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.mc-side .who { flex: 1; min-width: 0; }
.mc-side .pair { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-side .team { font-size: 12px; color: var(--dim); }
.mc-side .setdots { font-size: 12px; color: var(--yellow); letter-spacing: 2px; }
.mc-score {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  font-size: 46px; font-weight: 800; font-variant-numeric: tabular-nums; padding: 2px 0 8px;
}
.mc-score .sep { color: var(--dim); font-size: 26px; }
.mc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.mc-btn {
  padding: 14px 8px; border-radius: 14px; border: 1px solid rgba(61, 127, 255, 0.4);
  background: linear-gradient(160deg, rgba(1, 90, 220, 0.5), rgba(61, 127, 255, 0.28));
  color: #fff; font-weight: 800; font-size: 16px;
}
.mc-btn small { display: block; font-size: 11px; font-weight: 600; color: rgba(234, 241, 255, 0.75); margin-top: 2px; }
.mc-btn:active { transform: translateY(2px) scale(0.94); }
.mc-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.mc-score.bump span { animation: mc-bump 0.55s ease; display: inline-block; }
@keyframes mc-bump { 30% { transform: scale(1.4); color: #ffd75e; text-shadow: 0 0 14px rgba(255, 200, 60, 0.9); } }
.gate-card.shake { animation: gate-shake 0.45s ease; }
@keyframes gate-shake { 20% { transform: translateX(-9px); } 45% { transform: translateX(8px); } 70% { transform: translateX(-5px); } 90% { transform: translateX(3px); } }
.mc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.mc-sets { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.mc-undo {
  padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; color: var(--dim); font-size: 12px;
}
.mc-undo:disabled { opacity: 0.3; cursor: not-allowed; }
.mc-reopen {
  padding: 5px 10px; border-radius: 8px; border: 1px solid rgba(91, 157, 255, 0.4);
  background: transparent; color: #5b9dff; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: background 0.12s ease, transform 0.12s ease;
}
.mc-reopen:hover { background: rgba(91, 157, 255, 0.12); }
.mc-reopen:active { transform: scale(0.93); }

/* ---------- pairing ---------- */
.round-block { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; margin-bottom: 16px; }
.round-title { font-weight: 800; font-size: 17px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.round-title .rt-meta { font-size: 12px; color: var(--dim); font-weight: 600; }
.pair-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pair-table th { text-align: left; color: var(--dim); font-weight: 600; font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.pair-table td { padding: 8px; border-bottom: 1px solid rgba(120, 160, 255, 0.07); }
.pair-table td.num { font-variant-numeric: tabular-nums; color: var(--dim); }
.pair-table .score { font-weight: 800; font-variant-numeric: tabular-nums; }
.pair-table select { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; }
.done-tag { color: var(--good); font-size: 12px; }

/* ---------- rank ---------- */
.rank-table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.rank-table th, .rank-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid rgba(120, 160, 255, 0.08); }
.rank-table th { color: var(--dim); font-size: 12px; font-weight: 600; }
.rank-table td { font-variant-numeric: tabular-nums; }
.rank-table .r-name { font-weight: 800; font-size: 16px; }
.rank-table .r-first { color: var(--yellow); }
.rank-note { color: var(--dim); font-size: 12px; margin-top: 12px; text-align: right; }

/* ---------- setup ---------- */
.setup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.setup-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.setup-card h3 { margin: 0 0 12px; font-size: 15px; }
.setup-card label { display: block; font-size: 12px; color: var(--dim); margin: 10px 0 5px; }
.setup-card input, .setup-card textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: rgba(6, 18, 46, 0.85); color: var(--text); outline: none; resize: vertical;
}
.setup-card input:focus, .setup-card textarea:focus { border-color: var(--blue); }
.setup-card textarea { min-height: 168px; font-family: inherit; line-height: 1.7; font-size: 13px; }
.hint { font-size: 12px; color: var(--dim); margin-top: 8px; line-height: 1.6; }
.danger-zone { margin-top: 22px; border: 1px solid rgba(255, 93, 115, 0.4); border-radius: 18px; padding: 16px 18px; }
.danger-title { color: var(--bad); font-weight: 700; font-size: 13px; margin-bottom: 10px; }
.btn-danger { padding: 10px 16px; border-radius: 12px; border: 1px solid rgba(255, 93, 115, 0.5); background: rgba(255, 93, 115, 0.12); color: var(--bad); font-weight: 700; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: rgba(6, 18, 46, 0.95); border: 1px solid var(--line); color: var(--text);
  padding: 12px 22px; border-radius: 999px; font-size: 14px; z-index: 50; box-shadow: var(--shadow);
}

/* ---------- 背景层（仅大屏页挂载） ---------- */
.bg-layer {
  position: fixed; inset: -12px; z-index: 0;
  background: url("/assets/board-cover.jpg") center / cover no-repeat;
  filter: blur(2px) saturate(1.04) brightness(1.04);
}
.bg-layer2 {
  position: fixed; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(250, 248, 255, 0.30), rgba(238, 236, 252, 0.46));
}
.board, #board-empty { position: relative; z-index: 1; }
#board-gate { z-index: 2; }

/* ---------- 玻璃液态卡（亮面） ---------- */
.glass {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.42) 58%, rgba(255, 255, 255, 0.58));
  backdrop-filter: blur(24px) saturate(1.35); -webkit-backdrop-filter: blur(24px) saturate(1.35);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 24px;
  box-shadow:
    0 26px 60px rgba(46, 32, 90, 0.30),
    inset 0 2px 0 rgba(255, 255, 255, 0.95),
    inset 0 -16px 32px rgba(255, 255, 255, 0.22);
}
.glass::before {
  content: ""; position: absolute; left: 6%; right: 6%; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
  pointer-events: none;
}

/* ---------- board ---------- */
.board { max-width: 1240px; margin: 0 auto; padding: 0 20px 34px; }

/* 顶栏 */
.bh { display: flex; justify-content: space-between; align-items: stretch; gap: 14px; padding: 20px 0 4px; flex-wrap: wrap; }
.bh-brand { padding: 18px 24px; flex: 1; min-width: 260px; }
.bh-eyebrow { font-size: 11px; letter-spacing: 5px; color: #b5811f; font-weight: 800; }
.bh-title { font-size: clamp(24px, 4vw, 40px); font-weight: 900; color: #241a0e; letter-spacing: 2px; margin-top: 6px; }
.bh-sub { font-size: 11px; letter-spacing: 6px; color: #8a7a66; font-weight: 700; margin-top: 8px; }
.bh-clock { padding: 14px 20px; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 7px; }
.bh-clock .board-clock { color: #4a3a26; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; }
.live-dot { display: inline-flex; align-items: center; gap: 8px; color: var(--bad); font-weight: 800; font-size: 13px; letter-spacing: 2px; }
.live-dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); animation: pulse-line 1.1s infinite; }

/* weather */
.bh-weather { padding: 10px 18px; display: flex; align-items: center; gap: 14px; }
.bh-weather .wx-main { display: flex; align-items: center; gap: 8px; }
.bh-weather .wx-icon { font-size: 30px; line-height: 1; }
.bh-weather .wx-temp { font-size: 26px; font-weight: 900; color: #241a0e; font-variant-numeric: tabular-nums; }
.bh-weather .wx-city { font-size: 12px; color: #4a3a26; font-weight: 800; letter-spacing: 1px; }
.bh-weather .wx-cond { font-size: 11px; color: #8a7a66; font-weight: 700; margin-top: 2px; }
.bh-weather .wx-days { display: flex; gap: 12px; border-left: 1px solid rgba(0,0,0,0.08); padding-left: 14px; }
.bh-weather .wx-day { text-align: center; font-size: 11px; color: #8a7a66; font-weight: 700; white-space: nowrap; }
.bh-weather .wx-day b { display: block; font-size: 13px; color: #4a3a26; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* standings */
.stand-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin: 18px 0 2px; }
.team-card { display: flex; align-items: center; gap: 13px; padding: 14px 16px; flex-wrap: wrap; }
.team-card.rank-1 { border-color: rgba(233, 183, 76, 0.9); }
.tc-glow { position: absolute; inset: 0; pointer-events: none; }
.team-card .tc-rank {
  position: absolute; right: 10px; top: 2px; font-size: 52px; font-weight: 900;
  color: rgba(60, 35, 10, 0.08); font-family: "Bahnschrift", "Arial Narrow", sans-serif;
}
.team-card.rank-1 .tc-rank {
  background: linear-gradient(180deg, rgba(200, 138, 22, 0.55), rgba(200, 138, 22, 0.10));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tc-abbr {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  font-weight: 900; font-size: 16px; color: #fff; letter-spacing: 1px; flex-shrink: 0;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.28), inset 0 2px 0 rgba(255, 255, 255, 0.4), 0 8px 18px rgba(96, 38, 10, 0.25);
}
.tc-info { flex: 1; min-width: 0; position: relative; }
.tc-name { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #241a0e; }
.tc-record { font-size: 12px; color: #8a7a66; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tc-record b { color: #1a120a; }
.tc-gb { font-size: 11px; color: #8a7a66; text-align: right; line-height: 1.5; position: relative; }
.tc-gb em {
  font-style: normal; font-weight: 900;
  background: linear-gradient(180deg, #d9a13c, #b06f10);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.section-title {
  font-size: 12px; color: #7d6a4d; letter-spacing: 4px; margin: 24px 0 12px; font-weight: 800;
  display: flex; align-items: center; gap: 10px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(140, 100, 50, 0.3), transparent); }

/* ---- 悬浮玻璃记分牌 ---- */
#bugs { display: grid; gap: 34px; margin-top: 6px; }
.plaque-float { position: relative; animation: float-y 7s ease-in-out infinite; }
.plaque-float:nth-child(2n) { animation-delay: -3.5s; }
@keyframes float-y { 50% { transform: translateY(-7px); } }
.plaque-float::after {
  content: ""; position: absolute; left: 10%; right: 10%; bottom: -24px; height: 30px;
  background: radial-gradient(50% 100% at 50% 0%, rgba(70, 25, 5, 0.38), transparent 72%);
  filter: blur(7px); z-index: -1;
  animation: shadow-y 7s ease-in-out infinite;
}
.plaque-float:nth-child(2n)::after { animation-delay: -3.5s; }
@keyframes shadow-y { 50% { transform: scaleX(0.84); opacity: 0.6; } }

.plaque {
  border-radius: 30px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.80), rgba(255, 255, 255, 0.5) 55%, rgba(255, 255, 255, 0.66));
  backdrop-filter: blur(28px) saturate(1.4); -webkit-backdrop-filter: blur(28px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 36px 80px rgba(96, 38, 10, 0.32),
    inset 0 2px 0 rgba(255, 255, 255, 1),
    inset 0 -20px 40px rgba(255, 255, 255, 0.28);
}
.plaque-in {
  position: relative; overflow: hidden; border-radius: inherit;
  padding: clamp(18px, 2.8vw, 30px) clamp(18px, 4vw, 46px) clamp(16px, 2.4vw, 26px);
}
.plaque-in::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(112deg, transparent 34%, rgba(255, 255, 255, 0.55) 48%, rgba(255, 255, 255, 0.75) 52%, rgba(255, 255, 255, 0.55) 56%, transparent 70%);
  background-size: 260% 100%;
  animation: sheen 8s ease-in-out infinite;
}
@keyframes sheen { 0% { background-position: 130% 0; } 55%, 100% { background-position: -130% 0; } }

.plaque-label {
  text-align: center; font-size: clamp(12px, 1.6vw, 16px); font-weight: 800; letter-spacing: 5px;
  color: #8a6a2f; margin-bottom: clamp(6px, 1.2vw, 14px);
}
.plaque-main { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(10px, 3vw, 36px); }
.pm-side { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pm-side.right { justify-content: flex-end; }
.pm-chip {
  width: clamp(44px, 6vw, 62px); height: clamp(44px, 6vw, 62px); border-radius: 16px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; font-weight: 900;
  font-size: clamp(14px, 2vw, 19px); letter-spacing: 1px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.4), 0 10px 22px rgba(96, 38, 10, 0.28);
}
.pm-pair {
  font-weight: 900; font-size: clamp(16px, 2.6vw, 26px); color: #241a0e;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px;
}
.pm-score { display: flex; align-items: baseline; gap: clamp(8px, 1.6vw, 18px); }
.gnum {
  display: inline-block; line-height: 1; font-weight: 900;
  font-size: clamp(68px, 11vw, 136px);
  font-family: "Bahnschrift", "DIN Alternate", "Arial Narrow", "PingFang SC", sans-serif;
  background: linear-gradient(180deg, #fff7d6 0%, #ffd34d 30%, #c8891a 62%, #ffdf7e 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(120, 70, 10, 0.4)) drop-shadow(0 10px 20px rgba(120, 60, 10, 0.25));
  font-variant-numeric: tabular-nums;
}
.gnum.win {
  background: linear-gradient(180deg, #fffbe9 0%, #ffe27a 34%, #e9a81f 62%, #ffd970 100%);
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 2px 0 rgba(120, 70, 10, 0.4)) drop-shadow(0 0 30px rgba(255, 190, 60, 0.85)) drop-shadow(0 12px 24px rgba(120, 60, 10, 0.3));
}
.gdash {
  font-weight: 900; font-size: clamp(34px, 5.4vw, 64px); line-height: 1;
  background: linear-gradient(180deg, #e2b45c, #8a5a10);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.plaque-period {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin: clamp(8px, 1.6vw, 16px) auto 0; width: fit-content;
  font-size: clamp(12px, 1.6vw, 15px); font-weight: 900; letter-spacing: 3px; color: #a8641a;
  background: rgba(255, 180, 60, 0.16); border: 1px solid rgba(200, 130, 20, 0.38);
  padding: 6px 16px; border-radius: 999px;
}
.plaque-period i { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); animation: pulse-line 1s infinite; }
.plaque-sets {
  text-align: center; margin-top: clamp(8px, 1.4vw, 14px);
  font-size: clamp(14px, 2vw, 20px); font-weight: 800; letter-spacing: 3px;
  color: #a87415; font-variant-numeric: tabular-nums;
}
.plaque-timer {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: clamp(8px, 1.4vw, 14px);
  font-size: clamp(14px, 2vw, 19px); font-weight: 900; letter-spacing: 2px;
  color: #b5811f; font-variant-numeric: tabular-nums;
}
.plaque-timer i { width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 10px rgba(255, 211, 77, 0.9); animation: pulse-line 1.4s infinite; }
.plaque-meta { text-align: center; margin-top: 7px; font-size: 11px; color: rgba(110, 85, 50, 0.6); letter-spacing: 2px; }

/* ---- 下钻详情 ---- */
.plaque-float, .team-card, .fin-row { cursor: pointer; }
.gnum.pop { animation: score-pop 0.9s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes score-pop {
  0% { transform: scale(1.3); }
  60% { transform: scale(0.96); }
  100% { transform: scale(1); }
}

.plaque-detail {
  margin-top: clamp(12px, 2vw, 20px); padding-top: clamp(12px, 2vw, 18px);
  border-top: 1px dashed rgba(160, 115, 55, 0.35);
  animation: drill-in 0.35s ease;
}
@keyframes drill-in { from { opacity: 0; transform: translateY(-6px); } }
.pd-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; }
.pd-team { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pd-team.right { text-align: right; }
.pd-pair { font-weight: 900; font-size: clamp(15px, 2.2vw, 20px); }
.pd-players { font-size: 12px; color: #8a7a66; letter-spacing: 1px; }
.pd-vs {
  font-weight: 900; font-size: 13px; letter-spacing: 2px; color: #b5811f;
  border: 1px solid rgba(200, 138, 22, 0.4); border-radius: 999px; padding: 4px 12px;
  background: rgba(255, 200, 90, 0.12);
}
.pd-sets { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.pd-set { animation: drill-in 0.35s ease both; }
.pd-set:nth-child(2) { animation-delay: 0.12s; }
.pd-set:nth-child(3) { animation-delay: 0.24s; }
.pd-set {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: #3a2c1e;
  background: rgba(255, 255, 255, 0.55); border: 1px solid rgba(255, 255, 255, 0.8);
  padding: 5px 12px; border-radius: 999px;
  box-shadow: 0 4px 12px rgba(96, 38, 10, 0.12);
  font-variant-numeric: tabular-nums;
}
.pd-set i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.pd-tl { list-style: none; margin: 14px auto 0; max-width: 640px; padding: 0; }
.pd-tl li {
  display: flex; gap: 12px; align-items: baseline;
  padding: 6px 4px; border-bottom: 1px solid rgba(160, 115, 55, 0.16); font-size: 13px;
}
.pd-tl li:last-child { border-bottom: 0; }
.pd-tl .t { color: #b5811f; font-weight: 700; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.pd-tl .x { color: #3a2c1e; }
.pd-dur { text-align: center; margin-top: 12px; font-size: 12px; color: #8a7a66; letter-spacing: 2px; }

/* 排名卡下钻：名单 */
.tc-caret { margin-left: 6px; color: #b5811f; font-weight: 900; }
.tc-roster {
  flex-basis: 100%; width: 100%; margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed rgba(160, 115, 55, 0.35);
  display: grid; gap: 2px; animation: drill-in 0.35s ease;
}
.roster-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 4px; font-size: 13px; border-radius: 8px;
}
.roster-row:hover { background: rgba(255, 255, 255, 0.4); }
.r-dot { width: 8px; height: 8px; border-radius: 3px; flex-shrink: 0; }
.r-name { font-weight: 800; color: #241a0e; white-space: nowrap; }
.r-players { color: #8a7a66; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-rec { color: #3a2c1e; font-variant-numeric: tabular-nums; white-space: nowrap; }
.r-rec b { color: #b5811f; }

/* FINAL 行下钻 */
.fin-row { cursor: pointer; }
.fin-row .plaque-detail { text-align: left; flex-basis: 100%; width: 100%; }

/* FINAL rows */
#final-strip { display: grid; gap: 10px; }
.fin-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 18px; font-size: 15px; }
.fin-tag {
  font-size: 10px; font-weight: 900; letter-spacing: 2px; color: #241a0e;
  background: linear-gradient(180deg, #ffe9a3, #d9a13c);
  padding: 4px 8px; border-radius: 6px;
  box-shadow: 0 2px 10px rgba(200, 138, 22, 0.4);
}
.fin-side { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; color: #3a2c1e; }
.fin-side i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.fin-win { color: #b5811f; }
.fin-score { font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: 2px; font-size: 16px; color: #1a120a; }
.fin-meta { margin-left: auto; font-size: 12px; color: #8a7a66; }

/* ticker */
.ticker { margin-top: 30px; overflow: hidden; }
.ticker-track {
  display: inline-flex; align-items: center; gap: 34px; white-space: nowrap;
  padding: 13px 0; font-size: 13px; color: #5a4a33; font-weight: 600;
  animation: ticker 42s linear infinite; will-change: transform;
}
.ticker-track b { color: #1a120a; }
.tk-sep { color: #d9a13c; font-size: 10px; }
.tk-live {
  background: linear-gradient(180deg, #ffe9a3, #d9a13c); color: #241a0e;
  font-size: 10px; font-weight: 900; padding: 3px 8px; border-radius: 5px; letter-spacing: 1px;
}
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* board 专属 gate 亮面适配 */
#board-gate .gate-card { color: #241a0e; }
#board-gate .gate-logo { color: #241a0e; }
#board-gate .gate-logo span { color: #b5811f; }
#board-gate label { color: #6b5a44; }
#board-gate input { background: rgba(255, 255, 255, 0.65); border: 1px solid rgba(160, 115, 55, 0.4); color: #241a0e; }
#board-gate .gate-error { color: #c0392b; }

@media (max-width: 640px) {
  .plaque-main { gap: 8px; }
  .pm-pair { max-width: 110px; }
  .fin-meta { margin-left: 0; width: 100%; }
}

@media (max-width: 560px) {
  .ms-score { font-size: 34px; min-width: 56px; }
  .tabs { order: 3; width: 100%; }
}

/* ---------- 大屏弹幕 ---------- */
.danmaku-layer {
  position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden;
}
.dm {
  position: absolute; left: 100vw; white-space: nowrap; font-weight: 800;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5), 0 0 14px rgba(255,255,255,0.4);
  animation: dm-fly 9s linear forwards; will-change: transform; opacity: 0.92;
}
@keyframes dm-fly {
  to { transform: translateX(calc(-100vw - 100%)); }
}
.cheer-bar {
  position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%);
  width: min(720px, 94vw); z-index: 31; border-radius: 18px;
  padding: 10px 14px; display: flex; flex-direction: column; gap: 8px;
  background: linear-gradient(120deg, rgba(255,255,255,0.86), rgba(247,245,255,0.76));
}
.board { padding-bottom: 108px; }
.cheer-presets { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.cheer-preset {
  border: none; cursor: pointer; border-radius: 18px; padding: 10px 18px;
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 76px;
  background: linear-gradient(160deg, rgba(255,255,255,0.92), rgba(240,238,252,0.85));
  box-shadow: 0 4px 14px rgba(46,32,90,0.18), inset 0 1px 0 rgba(255,255,255,0.9);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.cheer-preset b { font-size: 26px; line-height: 1.15; font-weight: 400; }
.cheer-preset span { font-size: 13px; font-weight: 800; color: #4a3d78; letter-spacing: 2px; }
.cheer-preset:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 8px 20px rgba(46,32,90,0.25); }
.cheer-preset:active { transform: scale(0.92); }
.cheer-preset.sending { opacity: 0.55; pointer-events: none; }
.cheer-preset.sent {
  background: linear-gradient(160deg, #ffe9a3, #ffc65c);
  box-shadow: 0 0 0 3px rgba(255,198,92,0.55), 0 6px 18px rgba(180,120,30,0.35);
}
.cheer-preset.sent span { color: #5c3d0e; }
.cheer-tip { min-height: 16px; font-size: 12px; color: #b3261e; text-align: center; }

/* ---------- 下钻球场动画 ---------- */
.pd-court { margin: 2px auto 6px; width: min(380px, 92%); text-align: center; }
.pd-court svg { width: 100%; display: block; }
.ct-bg { fill: rgba(255,255,255,0.4); stroke: rgba(150,100,20,0.55); stroke-width: 2; }
.ct-kitchen { fill: rgba(255,214,120,0.28); animation: ct-pulse 2.6s ease-in-out infinite; }
@keyframes ct-pulse { 0%,100% { opacity: 0.55; } 50% { opacity: 1; } }
.ct-line { stroke: rgba(150,100,20,0.6); stroke-width: 2; fill: none; }
.ct-net { stroke: #8a6530; stroke-width: 4; stroke-dasharray: 5 6; }
.ct-ball { fill: #ffcf5c; stroke: #d9a23c; stroke-width: 1.5; filter: drop-shadow(0 2px 4px rgba(150,100,20,0.5)); }
.ct-tag { font-size: 11px; letter-spacing: 0.22em; color: rgba(110,74,20,0.65); margin-top: 2px; }

/* 逐线绘制入场：外框→发球线→双Kitchen→球网→小球 依次点亮 */
.pd-court svg > * { opacity: 0; animation: ct-in 0.45s ease-out forwards; }
.pd-court svg > *:nth-child(1) { animation-delay: 0.06s; }
.pd-court svg > *:nth-child(2) { animation-delay: 0.2s; }
.pd-court svg > *:nth-child(3),
.pd-court svg > *:nth-child(4) { animation-delay: 0.36s; }
.pd-court svg > *:nth-child(5) { animation-delay: 0.52s; }
.pd-court svg > *:nth-child(6) { animation-delay: 0.68s; }
@keyframes ct-in { to { opacity: 1; } }
.ct-kitchen { animation: ct-in 0.45s 0.36s ease-out forwards, ct-pulse 2.6s 1s ease-in-out infinite; }

/* ---------- 裁判台弹幕管理 ---------- */
.cheer-admin { max-width: 720px; }
.cheer-admin-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; font-weight: 700;
}
.cheer-count { font-weight: 400; opacity: 0.7; margin-left: 6px; }
.cheer-list { max-height: 60vh; overflow-y: auto; }
.cheer-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.ci-time { font-variant-numeric: tabular-nums; opacity: 0.55; font-size: 12px; flex: none; }
.ci-text { flex: 1; word-break: break-all; }
.ci-del {
  flex: none; border: none; cursor: pointer; width: 26px; height: 26px; border-radius: 8px;
  background: rgba(255,80,80,0.15); color: #ff9d9d; font-size: 13px;
}
.ci-del:hover { background: rgba(255,80,80,0.35); }
.cheer-empty { padding: 24px; text-align: center; opacity: 0.5; }

/* ---------- DJ 台 ---------- */
.dj-panel { max-width: 860px; padding: 6px 0 14px; }
.dj-nowbar {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 14px 18px; flex-wrap: wrap;
}
.dj-now-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dj-eyebrow { font-size: 12px; letter-spacing: 2px; opacity: 0.55; font-weight: 700; flex: none; }
.dj-now-name { font-size: 18px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
.dj-now-ctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dj-stop { padding: 8px 14px; }
.dj-vol { display: flex; align-items: center; gap: 8px; font-size: 13px; opacity: 0.9; }
.dj-vol input[type="range"] { width: 130px; accent-color: var(--orange, #f94e00); }
.dj-vol span { font-variant-numeric: tabular-nums; width: 26px; text-align: right; }
.dj-hint {
  margin: 4px 18px 12px; padding: 10px 12px; font-size: 13px; line-height: 1.7;
  background: rgba(143,163,204,0.10); border-radius: 10px; opacity: 0.85;
}
.dj-hint code { background: rgba(0,0,0,0.25); padding: 1px 6px; border-radius: 6px; font-size: 12px; }
.dj-upload {
  display: flex; align-items: center; gap: 12px; padding: 0 18px 12px; flex-wrap: wrap;
}
.dj-upload input[type="file"] {
  color: var(--dim, #8f9cc4); font-size: 13px; max-width: 55vw;
}
.dj-upload-tip { font-size: 13px; opacity: 0.75; }
.dj-list { border-top: 1px solid rgba(255,255,255,0.08); }
.dj-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.dj-row.current { background: rgba(249,78,0,0.08); }
.dj-play {
  flex: none; width: 34px; height: 34px; border-radius: 10px; border: none; cursor: pointer;
  background: rgba(29,111,224,0.25); color: #cfe1ff; font-size: 14px;
}
.dj-play:hover { background: rgba(29,111,224,0.45); }
.dj-name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dj-size { font-size: 12px; opacity: 0.55; font-variant-numeric: tabular-nums; flex: none; }
.dj-del {
  flex: none; border: none; cursor: pointer; width: 28px; height: 28px; border-radius: 8px;
  background: rgba(255,80,80,0.15); color: #ff9d9d; font-size: 13px;
}
.dj-del:hover { background: rgba(255,80,80,0.35); }

/* ---------- 大屏声音解锁提示 ---------- */
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.btn-export {
  padding: 7px 16px; border-radius: 10px; cursor: pointer; font-size: 13px;
  border: 1px solid rgba(255,211,77,.5); background: rgba(255,211,77,.12); color: #ffd34d;
}
.btn-export:hover { background: rgba(255,211,77,.25); }

.audio-unlock {
  position: fixed; right: 28px; bottom: 108px; z-index: 60;
  animation: au-breathe 2.2s ease-in-out infinite;
}
.au-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-radius: 16px;
  cursor: pointer; user-select: none;
}
.au-icon { font-size: 26px; filter: drop-shadow(0 0 10px rgba(255,211,77,0.8)); }
.au-text { font-weight: 800; font-size: 15px; line-height: 1.5; }
.au-text span { font-weight: 400; font-size: 12px; opacity: 0.7; }
@keyframes au-breathe {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 0 rgba(255,211,77,0); }
  50% { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(255,211,77,0.35); }
}

/* ================= 小组赛 + 复赛 v2 组件 ================= */
.pair-no {
  display: inline-block; padding: 0 6px; border-radius: 8px;
  background: rgba(29,111,224,0.14); color: #1D6FE0;
  font-size: 11px; font-weight: 700; margin-right: 4px;
}
.pair-tbd { color: #9aa3b5; font-style: italic; }
.winner-mark { color: #0aa66a; font-weight: 800; margin-left: 4px; }
.ff-mark {
  display: inline-block; padding: 0 5px; border-radius: 6px; margin-left: 6px;
  background: rgba(228,61,48,0.12); color: #E43D30; font-size: 11px; font-weight: 700;
}
.mc-ff {
  padding: 5px 10px; border-radius: 8px; border: 1px solid rgba(228,61,48,0.35);
  background: transparent; color: #E43D30; font-size: 12px; cursor: pointer;
}
.mc-ff:disabled { opacity: 0.35; cursor: default; }
.rc-score { display: block; font-size: 11px; opacity: 0.75; font-weight: 500; margin-top: 2px; }
.empty-tip { padding: 24px; text-align: center; color: #8a93a6; }

/* 复赛区 */
.bracket-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.bracket-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.bracket-head .hint { font-size: 12px; color: #6b7385; }
.btn-primary {
  width: auto; margin-top: 0; padding: 9px 18px; border-radius: 10px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #1D6FE0, #1559b8); color: #fff;
  font-size: 14px; font-weight: 700; box-shadow: 0 6px 16px rgba(29,111,224,0.35);
}
.btn-primary:disabled { opacity: 0.4; cursor: default; box-shadow: none; }

/* 排名页：分组积分表 */
.rank-group { margin-bottom: 20px; }
.rank-group-title {
  font-size: 16px; font-weight: 800; color: #f5f8ff; margin-bottom: 8px;
  display: flex; align-items: baseline; gap: 10px;
}
.rgt-note { font-size: 12px; font-weight: 500; color: #9aa3b5; }
.rank-table { width: 100%; border-collapse: collapse; background: rgba(255,255,255,0.65); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 14px rgba(31,39,51,0.06); }
.rank-table th {
  text-align: left; padding: 8px 10px; font-size: 12px; color: #6b7385; font-weight: 600;
  background: rgba(31,39,51,0.04); border-bottom: 0;
}
.rank-table td { padding: 9px 10px; font-size: 13px; border: 0; border-top: 1px solid rgba(31,39,51,0.05); }
.r-qualify { background: rgba(232,160,32,0.12); }
.r-qualify td:first-child { font-weight: 800; }
.r-pts { font-weight: 800; color: #b07d10; }

/* 设置页：名单编辑 */
textarea.team-pairs.roster {
  width: 100%; min-height: 320px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; line-height: 1.7; padding: 12px; border-radius: 12px;
  border: 1px solid rgba(31,39,51,0.12); background: rgba(255,255,255,0.8); resize: vertical;
}
textarea.team-pairs.roster:disabled { opacity: 0.75; }
.rules-row { display: flex; gap: 16px; flex-wrap: wrap; }
.rules-row > div { display: flex; flex-direction: column; gap: 6px; }
.rules-row label { font-size: 12px; color: #6b7385; font-weight: 600; }
.rules-row input {
  width: 90px; padding: 9px 10px; border-radius: 10px; font-size: 15px; font-weight: 700;
  border: 1px solid rgba(31,39,51,0.15); background: rgba(255,255,255,0.85); text-align: center;
}

/* 大屏：小组排名卡 */
.group-card { border-radius: 16px; overflow: hidden; box-shadow: 0 8px 24px rgba(31,39,51,0.10); }
.gc-head {
  padding: 10px 16px; color: #fff; font-weight: 800; font-size: 18px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.gc-q { font-size: 11px; font-weight: 600; opacity: 0.85; letter-spacing: 1px; }
.gc-table { width: 100%; border-collapse: collapse; }
.gc-table th { padding: 6px 10px; font-size: 11px; color: #6b7385; text-align: left; font-weight: 600; }
.gc-table td { padding: 7px 10px; font-size: 13px; border-top: 1px solid rgba(31,39,51,0.05); }
.gc-first { background: rgba(232,160,32,0.14); }
.gc-first td:first-child { font-size: 15px; }
.gc-name { font-weight: 600; }
.gc-pts { font-weight: 800; color: #b07d10; }

/* 大屏：复赛对阵条 */
#bracket-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 10px; }
.bk-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px;
}
.bk-label {
  flex: 0 0 auto; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 800;
  background: rgba(31,39,51,0.08); color: #1f2733;
}
.bk-side { flex: 1; font-size: 14px; font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-side + .bk-score + .bk-side { text-align: left; }
.bk-side i { color: #9aa3b5; font-style: normal; }
.bk-win { color: #0aa66a; font-weight: 800; }
.bk-score { flex: 0 0 auto; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; color: #1f2733; }
.bk-row.live { box-shadow: 0 0 0 2px rgba(232,160,32,0.55), 0 8px 24px rgba(232,160,32,0.25); }
.fin-ff { font-style: normal; font-size: 11px; color: #E43D30; font-weight: 700; }

/* 裁判台首页判分速览卡 */
.rules-card {
  margin-bottom: 14px; padding: 14px 18px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(232,160,32,0.10), rgba(29,111,224,0.06));
  border: 1px solid rgba(232,160,32,0.35);
}
.rules-card .rc-title { font-size: 14px; font-weight: 800; color: #1f2733; margin-bottom: 8px; }
.rules-card ul { margin: 0; padding-left: 18px; }
.rules-card li { font-size: 13px; line-height: 1.85; color: #3a4356; }
.rules-card li b { color: #b07d10; }

/* ---- 裁判台备注 ---- */
.mc-notes { border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 8px; }
.mc-note { font-size: 12px; color: var(--text); opacity: 0.85; margin: 3px 0; line-height: 1.45; word-break: break-all; }
.mc-note.dim { opacity: 0.45; }
.mn-time { color: var(--yellow); margin-right: 6px; font-variant-numeric: tabular-nums; }
.mn-author { color: #7cc7ff; margin-right: 4px; }
.mc-note-input { display: flex; gap: 6px; margin-top: 6px; }
.mc-note-input input {
  flex: 1; min-width: 0; background: rgba(6, 18, 46, 0.6); border: 1px solid var(--line);
  color: var(--text); border-radius: 8px; padding: 7px 10px; font-size: 13px; outline: none;
}
.mc-note-input input:focus { border-color: var(--blue); }
.mc-note-btn {
  background: rgba(61, 127, 255, 0.15); color: #cfe3ff; border: 1px solid rgba(61, 127, 255, 0.5);
  border-radius: 8px; padding: 0 12px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.mc-note-btn:active { transform: scale(0.96); }
.mc-note-count { color: var(--yellow); font-size: 11px; margin-left: 6px; }

/* ---- 弃权按钮挪到组合名旁 ---- */
.mc-side .mc-ff {
  flex-shrink: 0; padding: 3px 9px; border-radius: 8px; font-size: 11px;
  border: 1px solid rgba(255, 93, 115, 0.5); background: rgba(255, 93, 115, 0.1);
  color: #ff8fa0; cursor: pointer;
}
.mc-side .mc-ff:disabled { opacity: 0.25; cursor: not-allowed; }
.mc-side .mc-ff:not(:disabled):active { transform: scale(0.94); }

/* ---- 暂停 ---- */
.mc-status.paused { background: linear-gradient(135deg, #ffe9a3, #ffc65c); color: #5c3d0e; box-shadow: 0 0 12px rgba(255, 198, 92, 0.5); }
.mc-cluster { display: flex; align-items: stretch; gap: 6px; flex: 1; min-width: 0; }
.mc-cluster:last-child { justify-content: flex-end; }
.mc-cluster .mc-btn { flex: 1; min-width: 0; }
.mc-pause {
  flex-shrink: 0; padding: 4px 10px; border-radius: 10px; font-size: 12px; cursor: pointer;
  border: 1px solid rgba(255, 211, 77, 0.55); background: rgba(255, 211, 77, 0.12); color: var(--yellow);
}
.mc-pause:disabled { opacity: 0.25; cursor: not-allowed; }
.mc-pause:not(:disabled):active { transform: scale(0.94); }
.mc-paused {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 10px; padding: 9px 12px; border-radius: 10px;
  background: rgba(255, 211, 77, 0.12); border: 1px solid rgba(255, 211, 77, 0.5);
  animation: pausedPulse 1.6s ease-in-out infinite;
}
.mp-txt { font-size: 13px; color: var(--yellow); }
.pause-left { font-variant-numeric: tabular-nums; font-size: 15px; }
.mc-resume {
  flex-shrink: 0; padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer;
  border: none; background: linear-gradient(135deg, #ffe9a3, #ffc65c); color: #5c3d0e;
  box-shadow: 0 2px 8px rgba(150, 100, 20, 0.3);
}
.mc-resume:active { transform: scale(0.96); }
@keyframes pausedPulse { 0%, 100% { box-shadow: 0 0 4px rgba(255, 211, 77, 0.2); } 50% { box-shadow: 0 0 18px rgba(255, 211, 77, 0.55); } }
.plaque-pause {
  margin: 6px 0 2px; padding: 6px 10px; border-radius: 8px; text-align: center;
  background: rgba(255, 211, 77, 0.15); border: 1px solid rgba(255, 211, 77, 0.6);
  color: var(--yellow); font-size: 14px; font-weight: 700;
  animation: pausedPulse 1.6s ease-in-out infinite;
}

/* ---- 双方签字确认 ---- */
.mc-confirm { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(46, 230, 168, 0.07); border: 1px solid rgba(46, 230, 168, 0.35); }
.mc-confirm-title { font-size: 12px; font-weight: 700; color: var(--good); margin-bottom: 8px; }
.mc-sign-row { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.mc-sign-row.done { font-size: 13px; color: var(--good); }
.mc-sign-input { flex: 1; min-width: 0; padding: 7px 10px; border-radius: 8px; border: 1px solid rgba(46, 230, 168, 0.4); background: rgba(255,255,255,0.06); color: #fff; font-size: 13px; outline: none; }
.mc-sign-input:focus { border-color: var(--good); box-shadow: 0 0 0 2px rgba(46, 230, 168, 0.15); }
.mc-sign-btn { flex-shrink: 0; padding: 7px 14px; border-radius: 8px; border: none; font-size: 13px; font-weight: 700; cursor: pointer; background: linear-gradient(135deg, #7ef7c6, #2ee6a8); color: #063; box-shadow: 0 2px 8px rgba(46, 230, 168, 0.3); }
.mc-sign-btn:active { transform: scale(0.95); }
.mc-confirmed { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(46, 230, 168, 0.14); border: 1px solid rgba(46, 230, 168, 0.55); font-size: 13px; font-weight: 700; color: var(--good); }
.mc-conf-names { font-weight: 400; font-size: 12px; opacity: 0.9; }
.mc-confirm-idle { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.12); }
.mc-confirm-idle .mc-confirm-title { color: rgba(255,255,255,0.35); }
.mc-sign-idle { font-size: 12px; color: rgba(255,255,255,0.35); padding: 4px 0; }
/* ---- 抽签指定出线 ---- */
.r-act { white-space: nowrap; }
.mq-set { padding: 3px 8px; font-size: 11px; font-weight: 600; border-radius: 6px; border: 1px solid rgba(176,125,16,0.42); background: rgba(232,160,32,0.16); color: #8a6510; cursor: pointer; }
.mq-set:active { transform: scale(0.94); }
.rgt-mq { margin-left: 10px; font-size: 12px; color: #ffd93d; }
.mq-clear { margin-left: 6px; padding: 1px 7px; font-size: 11px; border-radius: 6px; border: 1px solid rgba(255,255,255,.3); background: transparent; color: rgba(255,255,255,.7); cursor: pointer; }
/* ---- 女双让分徽标 ---- */
.fd-mark { display: inline-block; margin-left: 4px; padding: 0 5px; font-size: 10px; font-weight: 700; font-style: normal; line-height: 1.5; border-radius: 4px; background: linear-gradient(90deg, #ff6b9d, #ff9a8b); color: #fff; vertical-align: 1px; }

/* ===== AI 裁判监督：复核 / 下钻 / 复盘 ===== */
.audit-bar { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; flex-wrap: wrap; }
.audit-badge { padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; }
.audit-badge.pass { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.4); }
.audit-badge.fail { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.5); animation: auditblink 1s infinite alternate; }
@keyframes auditblink { from { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); } to { box-shadow: 0 0 14px 2px rgba(239, 68, 68, 0.6); } }
.audit-bad { padding: 6px 10px; margin: 6px 0; border-radius: 8px; background: rgba(239, 68, 68, 0.12); color: #fca5a5; font-size: 12px; }
tr.r-row { cursor: pointer; }
tr.r-row:hover td { background: rgba(255, 255, 255, 0.04); }
tr.r-detail td { background: rgba(56, 189, 248, 0.06); border-bottom: 1px solid rgba(56, 189, 248, 0.25); padding: 10px 14px; }
.rd-head { font-size: 13px; font-weight: 700; color: #7dd3fc; margin-bottom: 8px; }
.rd-list { display: flex; flex-direction: column; gap: 4px; }
.rd-line { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text, #e5e7eb); align-items: baseline; }
.rd-line .rd-round { font-weight: 700; color: #fbbf24; min-width: 44px; }
.rd-line .rd-court { color: var(--dim, #94a3b8); min-width: 44px; }
.rd-line .rd-vs { min-width: 150px; font-weight: 600; }
.rd-line .rd-sets { font-family: ui-monospace, monospace; color: #a5f3fc; }
.rd-line .rd-res.win { color: #4ade80; font-weight: 700; }
.rd-line .rd-res.lose { color: #f87171; }
.rd-line .rd-pts { color: var(--dim, #94a3b8); }
.rd-line.rd-empty { color: var(--dim, #94a3b8); }
.qual-review { margin: 8px 0 4px; padding: 10px 14px; border-radius: 10px; background: rgba(251, 191, 36, 0.07); border: 1px dashed rgba(251, 191, 36, 0.35); }
.qr-badge { font-size: 13px; color: #fde68a; }
.qr-formula { margin-top: 6px; font-family: ui-monospace, monospace; font-size: 14px; color: #fbbf24; font-weight: 700; }
.qr-lines { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text, #e5e7eb); }
.qr-pending { font-size: 12px; color: var(--dim, #94a3b8); }
.rv-head { margin: 22px 0 10px; font-size: 14px; font-weight: 700; color: #c4b5fd; }
.rv-card { margin-bottom: 14px; padding: 14px 16px; border-radius: 12px; background: rgba(139, 92, 246, 0.08); border: 1px solid rgba(139, 92, 246, 0.3); }
.rv-card.semi { border-color: rgba(56, 189, 248, 0.4); background: rgba(56, 189, 248, 0.07); }
.rv-card.final { border-color: rgba(251, 191, 36, 0.5); background: rgba(251, 191, 36, 0.08); }
.rv-card.third { border-color: rgba(148, 163, 184, 0.4); background: rgba(148, 163, 184, 0.07); }
.rv-title { font-size: 14px; font-weight: 800; margin-bottom: 10px; }
.rv-state { margin-left: 10px; font-size: 12px; font-weight: 500; color: var(--dim, #94a3b8); }
.rv-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rv-side { padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); font-size: 12px; }
.rv-side.empty { color: var(--dim, #94a3b8); display: flex; align-items: center; justify-content: center; }
.rv-side b { font-size: 13px; color: #f8fafc; margin-right: 8px; }
.rv-tag { font-size: 11px; color: #7dd3fc; }
.rv-record { margin: 6px 0; color: #fbbf24; font-weight: 600; }
.rv-lines { display: flex; flex-direction: column; gap: 3px; color: var(--text, #e5e7eb); }

/* ===== 大屏特效层 board-fx ===== */
#fx-stage { position: fixed; inset: 0; pointer-events: none; z-index: 9500; display: flex; align-items: center; justify-content: center; }
.fx-card { text-align: center; padding: 34px 60px; border-radius: 24px; background: rgba(15, 10, 40, 0.82); border: 1px solid rgba(255, 255, 255, 0.25); box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5), 0 0 40px rgba(139, 92, 246, 0.35); opacity: 0; transform: scale(0.8) translateY(24px); transition: all 0.5s cubic-bezier(0.2, 1.4, 0.4, 1); backdrop-filter: blur(8px); max-width: 84vw; }
.fx-card.on { opacity: 1; transform: scale(1) translateY(0); }
.fx-kicker { font-size: 16px; letter-spacing: 0.2em; color: #c4b5fd; font-weight: 700; margin-bottom: 12px; }
.fx-main { font-size: 34px; font-weight: 900; color: #fff; line-height: 1.5; }
.fx-name { display: inline-block; background: linear-gradient(120deg, #fde68a, #f59e0b, #fde68a); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: fxshine 2s linear infinite; padding: 0 6px; }
@keyframes fxshine { to { background-position: 200% center; } }
.fx-vs { color: #93c5fd; font-size: 0.7em; font-weight: 800; margin: 0 10px; }
.fx-sub { margin-top: 12px; font-size: 15px; color: #e2e8f0; }
.fx-champion { border-color: rgba(251, 191, 36, 0.7); box-shadow: 0 20px 90px rgba(0, 0, 0, 0.55), 0 0 70px rgba(251, 191, 36, 0.5); }
.fx-champion .fx-kicker { color: #fde68a; font-size: 20px; }
.fx-champion .fx-main { font-size: 46px; }
.fx-semi { border-color: rgba(56, 189, 248, 0.55); box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5), 0 0 46px rgba(56, 189, 248, 0.4); }
.fx-advance { border-color: rgba(244, 63, 94, 0.5); box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5), 0 0 46px rgba(244, 63, 94, 0.35); }
.fx-third { border-color: rgba(148, 163, 184, 0.55); }
.fx-score-btn { position: fixed; right: 22px; bottom: 22px; z-index: 9400; padding: 12px 20px; border-radius: 999px; border: none; background: linear-gradient(120deg, #f59e0b, #f43f5e); color: #fff; font-size: 15px; font-weight: 800; cursor: pointer; box-shadow: 0 8px 30px rgba(244, 63, 94, 0.45); animation: fxpulse 2s infinite; }
@keyframes fxpulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
#fx-scoreboard { position: fixed; inset: 0; z-index: 9450; background: rgba(10, 8, 30, 0.72); backdrop-filter: blur(6px); display: none; overflow-y: auto; padding: 4vh 6vw; }
#fx-scoreboard.on { display: block; }
.sb-card { max-width: 1080px; margin: 0 auto; padding: 30px 38px 50px; border-radius: 20px; color: #1e1b3a; background: rgba(255, 255, 255, 0.96); position: relative; }
.sb-card h2 { margin: 0 0 14px; font-size: 24px; }
.sb-card h3 { margin: 22px 0 10px; font-size: 18px; color: #6d28d9; }
.sb-card h4 { margin: 14px 0 8px; font-size: 14px; color: #6d28d9; }
.sb-close { position: absolute; top: 16px; right: 16px; border: none; background: #6d28d9; color: #fff; padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 700; }
.sb-podium { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 10px 0 6px; }
.sb-p1 { font-size: 22px; background: linear-gradient(120deg, #fde68a, #f59e0b); padding: 14px 22px; border-radius: 14px; color: #451a03; }
.sb-p2, .sb-p3 { font-size: 15px; padding: 10px 16px; border-radius: 12px; background: #f1f5f9; }
.sb-ko-row, .sb-round { display: flex; gap: 10px; flex-wrap: wrap; padding: 5px 0; font-size: 13px; border-bottom: 1px dashed #e2e8f0; }
.sb-r-no { font-weight: 700; color: #b45309; min-width: 46px; }
.sb-r-court { color: #64748b; min-width: 44px; }
.sb-r-vs { min-width: 190px; font-weight: 600; }
.sb-r-score { font-family: ui-monospace, monospace; color: #0e7490; }
.sb-tb { width: 100%; border-collapse: collapse; font-size: 13px; }
.sb-tb th, .sb-tb td { padding: 6px 8px; border-bottom: 1px solid #e2e8f0; text-align: left; }
.sb-tb thead th { color: #64748b; font-weight: 600; }
.sb-tb tr.top td { background: #fef3c7; font-weight: 700; }
.sb-qual { margin-top: 8px; font-size: 13px; color: #92400e; font-weight: 600; }
.sb-group { margin-bottom: 26px; }

/* ===== 记分卡：分数嵌进行式（上行=客队分，下行=主队分） ===== */
.mc-side { justify-content: space-between; gap: 10px; padding: 8px 0; }
.ms-score {
  font-size: 42px; font-weight: 800; min-width: 72px; text-align: right;
  font-variant-numeric: tabular-nums; line-height: 1; flex-shrink: 0;
}
.ms-score.bump { animation: mc-bump 0.55s ease; display: inline-block; }
.mc-side .winner-mark, .mc-side .ff-mark { flex-shrink: 0; }

/* ---------- 可访问性与小屏适配 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (max-width: 520px) {
  .match-grid { grid-template-columns: 1fr; }
  .bracket-grid { grid-template-columns: 1fr; }
  .app { padding-left: 10px; padding-right: 10px; }
}
