/* =========================================================
   掼事通掼蛋编排软件 · 样式
   宣纸底 / 朱红 / 墨绿 / 鎏金
   ========================================================= */

:root {
  --paper: #f4efe4;
  --paper-2: #ece5d6;
  --card: #fffdf8;
  --ink: #201d18;
  --ink-2: #4c463d;
  --muted: #857c6d;
  --red: #a5211f;
  --red-deep: #7c1412;
  --red-soft: #f6e4e1;
  --gold: #bd9a52;
  --gold-soft: #f3e9d2;
  --green: #2c6650;
  --green-soft: #e4efe8;
  --line: #e3dac9;
  --line-2: #d2c5ad;
  --shadow: 0 1px 2px rgba(60, 45, 20, .06), 0 8px 24px rgba(60, 45, 20, .06);
  --radius: 14px;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
  --font-serif: "Songti SC", "SimSun", "Source Han Serif SC", "Noto Serif SC", serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(rgba(160, 140, 100, .10) 1px, transparent 1px);
  background-size: 18px 18px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

h1, h2, h3 { font-family: var(--font-serif); font-weight: 700; letter-spacing: .01em; margin: 0; }
p { margin: 0; }

.wrap { width: min(1180px, 100% - 40px); margin: 0 auto; }

/* ---------------- 顶栏 ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(248, 244, 235, .88);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--red), var(--red-deep));
  color: #fff6e3;
  font-family: var(--font-serif);
  font-size: 21px;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(124, 20, 18, .28);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-family: var(--font-serif); font-size: 18px; letter-spacing: .04em; }
.brand-text i {
  font-style: normal;
  font-size: 9px;
  letter-spacing: .22em;
  color: var(--muted);
  margin-top: 3px;
}

.topnav { display: flex; gap: 4px; }
.topnav a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 14px;
  transition: .15s;
}
.topnav a:hover { background: rgba(165, 33, 31, .06); color: var(--red); }
.topnav a.on { color: var(--red); font-weight: 600; background: rgba(165, 33, 31, .08); }

/* ---------------- 页面容器 ---------------- */

.page { padding: 34px 0 64px; }

.page-head { margin-bottom: 26px; }
.page-head h1 { font-size: 32px; margin: 6px 0 8px; }
.page-head p { color: var(--muted); }

.crumb { font-size: 13px; color: var(--muted); display: inline-block; margin-bottom: 4px; }
.crumb:hover { color: var(--red); }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.warn { color: var(--red); }

/* ---------------- 首页 Hero ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 46px 44px;
  color: #fdf7ea;
  background:
    radial-gradient(900px 420px at 88% -30%, rgba(233, 197, 118, .30), transparent 62%),
    linear-gradient(135deg, #8d1a17 0%, #a5211f 48%, #6e1210 100%);
  box-shadow: 0 18px 40px rgba(110, 18, 16, .22);
}

.hero::after {
  content: "掼";
  position: absolute;
  right: -6px;
  bottom: -58px;
  font-family: var(--font-serif);
  font-size: 240px;
  line-height: 1;
  color: rgba(255, 244, 220, .07);
  pointer-events: none;
}

.hero-copy { position: relative; z-index: 1; max-width: 660px; }

.kicker {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .28em;
  color: #f0d6a2;
  border: 1px solid rgba(240, 214, 162, .38);
  border-radius: 99px;
  padding: 3px 12px;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.18;
  margin-bottom: 14px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .15);
}

.hero p {
  color: rgba(255, 248, 235, .82);
  font-size: 15.5px;
  line-height: 1.85;
  max-width: 620px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.hero-facts {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 34px;
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 245, 225, .16);
}
.hero-facts > div { display: flex; flex-direction: column; }
.hero-facts b {
  font-family: var(--font-serif);
  font-size: 30px;
  line-height: 1;
  color: #f2d79c;
}
.hero-facts span { font-size: 12.5px; color: rgba(255, 248, 235, .72); margin-top: 7px; }

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s, box-shadow .15s, background .15s, color .15s;
  white-space: nowrap;
  line-height: 1.2;
}

.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(160deg, #b22723, #931d1a);
  color: #fff6e6;
  box-shadow: 0 6px 16px rgba(147, 29, 26, .26);
}
.btn-primary:hover { box-shadow: 0 8px 20px rgba(147, 29, 26, .34); }

.btn-ghost {
  background: var(--card);
  border-color: var(--line-2);
  color: var(--ink-2);
}
.btn-ghost:hover { border-color: var(--red); color: var(--red); }

.btn-danger {
  background: #8e1b1b;
  color: #fff;
}
.btn-danger:hover { background: #741414; }

.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-mini { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; background: var(--card); border-color: var(--line-2); color: var(--ink-2); }
.btn-mini:hover { border-color: var(--red); color: var(--red); }
.btn-lg { padding: 13px 26px; font-size: 15px; }
.btn-block { width: 100%; }

.inline-form { display: inline; }
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink-2);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0, 0, 0, .18);
}
.link-btn:hover { color: var(--red); }
.link-btn.danger { color: #a33; }

/* ---------------- 赛事列表 ---------------- */

.section { margin-top: 40px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.section-head h2 { font-size: 22px; }
.section-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.tour-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
}

.tour-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow);
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.tour-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
  box-shadow: 0 4px 8px rgba(60, 45, 20, .06), 0 18px 36px rgba(60, 45, 20, .10);
}

.tour-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.tour-card h3 { font-size: 19px; line-height: 1.4; margin-bottom: 6px; }
.tour-meta { color: var(--muted); font-size: 13px; }
.tour-stats {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--muted);
}
.tour-stats b { font-family: var(--font-serif); font-size: 19px; color: var(--ink); margin-right: 3px; }
.tour-foot { margin-top: 14px; font-size: 12.5px; color: var(--red); }

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  font-size: 11.5px;
  padding: 3px 10px;
  font-weight: 600;
  letter-spacing: .04em;
}
.pill-setup { background: var(--gold-soft); color: #8a6a26; }
.pill-running { background: var(--green-soft); color: var(--green); }
.pill-finished { background: #e9e5de; color: #6b6459; }
.pill-off { background: #efeae3; color: #8a8177; }

/* ---------------- 空状态 ---------------- */

.empty {
  background: var(--card);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
}
.empty-icon { margin-bottom: 10px; line-height: 0; opacity: .95; }
.empty h3 { font-size: 19px; margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 460px; margin: 0 auto 18px; }

/* ---------------- 表单 ---------------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.form-card { max-width: 720px; }
.form-card.compact { padding: 20px; }
.form-card h3 { font-size: 18px; margin-bottom: 16px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.field label em { color: var(--red); font-style: normal; }
.field input[type="text"],
.field input[type="password"],
.field input[type="date"],
.field input[type="tel"],
.field select,
.field input[type="number"],
textarea {
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: #fffefb;
  padding: 11px 13px;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(165, 33, 31, .10);
}
.field input::placeholder, textarea::placeholder { color: #b3a999; }
.field input[type="file"] {
  width: 100%;
  padding: 9px 11px;
  border: 1px dashed var(--line-2);
  border-radius: 9px;
  background: #fffefb;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink-2);
}
.hint a, .link { color: var(--red); font-weight: 600; text-decoration: none; }
.hint a:hover, .link:hover { text-decoration: underline; }
.hint { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-sm { max-width: 220px; }

.radio-cards { display: grid; gap: 10px; }
.radio-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 13px 16px;
  cursor: pointer;
  background: #fffefb;
  transition: border-color .15s, background .15s;
}
.radio-card:hover { border-color: var(--line-2); }
.radio-card:has(input:checked) {
  border-color: var(--red);
  background: #fdf6f4;
  box-shadow: inset 0 0 0 1px rgba(165, 33, 31, .18);
}
.radio-card input { margin-top: 4px; accent-color: var(--red); }
.radio-card b { display: block; font-size: 14.5px; margin-bottom: 3px; }
.radio-card span { font-size: 12.5px; color: var(--muted); line-height: 1.55; }

.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 26px; }

/* ---------------- 赛事页头 ---------------- */

.tbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
}
.tbar h1 { font-size: 30px; margin: 4px 0 12px; line-height: 1.25; }
.tbar-actions { display: flex; gap: 8px; padding-bottom: 4px; flex-wrap: wrap; justify-content: flex-end; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.chip {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: var(--ink-2);
  background: rgba(255, 253, 248, .8);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 3px 11px;
}
.chip-ok { background: var(--green-soft); border-color: #c6ded1; color: var(--green); }
.chip-warn { background: var(--red-soft); border-color: #efcfca; color: var(--red); }
.chip-done { background: #eef1e6; border-color: #d8dfc7; color: #55622f; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 26px;
}
.tab {
  position: relative;
  padding: 12px 18px;
  font-size: 14.5px;
  color: var(--ink-2);
  border-radius: 8px 8px 0 0;
  white-space: nowrap;
}
.tab:hover { color: var(--red); background: rgba(165, 33, 31, .04); }
.tab.on { color: var(--red); font-weight: 600; }
.tab.on::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}

/* ---------------- 轮次条 ---------------- */

.round-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 18px;
}

.round-nav { display: flex; align-items: center; gap: 12px; }
.round-title { font-family: var(--font-serif); font-size: 17px; }
.round-title em { font-style: normal; color: var(--red); font-size: 21px; margin: 0 3px; }
.round-title .muted { font-family: var(--font-sans); font-size: 12.5px; }

.round-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------------- 提示条 ---------------- */

.next-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  background: linear-gradient(100deg, #f2f8f4, #e8f2ec);
  border: 1px solid #c8ded1;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 18px;
}
.next-banner b { display: block; color: var(--green); font-size: 15px; }
.next-banner span { font-size: 13px; color: #5d7268; }
.next-final { background: linear-gradient(100deg, #fdf4e4, #f8ecd4); border-color: #e6d2a8; }
.next-final b { color: #8a6a26; }
.next-final span { color: #8a7c5f; }

.notice {
  background: #f6f0e4;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 13.5px;
  color: #7a6c52;
  margin-bottom: 18px;
}

/* ---------------- 对阵卡片 ---------------- */

.score-form { margin-top: 4px; }

.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
}

.match {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px 12px;
  box-shadow: 0 1px 2px rgba(60, 45, 20, .04);
  transition: border-color .15s, box-shadow .15s;
}
.match:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.match.is-pending { border-style: solid; }
.match.is-pending::before {
  content: "";
  position: absolute;
  left: 0; top: 18px;
  width: 3px; height: 22px;
  border-radius: 0 3px 3px 0;
  background: var(--gold);
}

.match-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }

.board-no {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 600;
}
.board-no i {
  font-style: normal;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, #b02723, #8d1a17);
  color: #fff3de;
  border-radius: 9px;
  font-family: var(--font-serif);
  font-size: 15px;
  box-shadow: 0 2px 6px rgba(141, 26, 23, .22);
}

.state { font-size: 11.5px; border-radius: 99px; padding: 2px 9px; font-weight: 600; }
.st-pending { background: var(--gold-soft); color: #8a6a26; }
.st-done { background: var(--green-soft); color: var(--green); }
.st-bye { background: #ece8f0; color: #5b5470; }
.st-ff { background: #f0e6e4; color: #8b4a42; }

.side-row {
  display: grid;
  grid-template-columns: 42px 1fr 96px;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.dir {
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  padding: 3px 0;
  border-radius: 5px;
  letter-spacing: .06em;
}
.dir-n { background: var(--red-soft); color: var(--red); }
.dir-e { background: var(--green-soft); color: var(--green); }

.team { min-width: 0; display: flex; flex-direction: column; }
.team strong {
  font-size: 15.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.team .players { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.lv-select {
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #fffefb;
  padding: 7px 6px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
}
.lv-select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(165, 33, 31, .10); }
.lv-select.is-ff { color: var(--red); }
.lv-read {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
  min-width: 78px;
  padding: 5px 8px;
  border: 1px dashed #ddd2bb;
  border-radius: 8px;
  background: #fdfaf3;
}

.match-vs {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #c3b7a1;
  font-size: 10px;
  letter-spacing: .18em;
}
.match-vs::before, .match-vs::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.match-foot {
  margin-top: 8px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.match-foot .calc b { color: var(--ink-2); }

.match-bye { background: #faf7f1; }
.bye-body { display: flex; align-items: center; gap: 14px; padding: 10px 0 6px; }
.bye-tag {
  font-size: 11.5px;
  color: #5b5470;
  background: #ece8f0;
  border-radius: 6px;
  padding: 3px 9px;
}

/* ---------------- 保存条 ---------------- */

.save-bar {
  position: sticky;
  bottom: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding: 14px 18px;
  background: rgba(255, 253, 248, .94);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(60, 45, 20, .14);
}
.save-info { display: flex; flex-direction: column; line-height: 1.4; }
.save-info b { font-family: var(--font-serif); font-size: 16px; }
.save-info span { font-size: 12.5px; color: var(--muted); }

/* ---------------- 表格 ---------------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  background: #f6f1e6;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 12.5px;
  text-align: left;
  padding: 11px 12px;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.tbl td { padding: 10px 12px; border-bottom: 1px solid #efe8db; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #fcf9f2; }
.tbl .num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.tbl .mid { white-space: nowrap; color: var(--ink-2); }
.tbl .strong { font-weight: 800; font-size: 15px; }
.tbl .ta-r { text-align: right; }
.row-off td { color: #a49a8b; }
.row-off td b { font-weight: 500; }
.row-actions { display: flex; justify-content: flex-end; gap: 12px; }

.standings-tbl .team-cell { min-width: 180px; }
.standings-tbl .team-cell b { display: block; font-size: 14.5px; }
.standings-tbl .team-cell .players { font-size: 11.5px; color: var(--muted); }
.standings-tbl .w-rank { width: 58px; }
.standings-tbl .w-round { min-width: 78px; }

.rank { display: inline-grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.rank-1 { background: linear-gradient(150deg, #e7c56d, #c79a3c); color: #4d3a10; box-shadow: 0 2px 6px rgba(199, 154, 60, .3); }
.rank-2 { background: linear-gradient(150deg, #dfe0dc, #b9bbb5); color: #3f403c; }
.rank-3 { background: linear-gradient(150deg, #e2b48f, #c08a5e); color: #4b2f1a; }
.rank-n { background: #f0ece3; color: var(--ink-2); }

.rcell { font-size: 12px; white-space: nowrap; }
.rc-res { display: inline-block; font-weight: 700; margin-right: 4px; }
.rc-sc { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.r-win .rc-res { color: var(--green); }
.r-draw .rc-res { color: #8a6a26; }
.r-loss .rc-res { color: #a05a55; }
.r-bye { color: #6b6480; }
.r-empty { color: #c6bcaa; }

.mini-tbl th, .mini-tbl td { padding: 7px 12px; font-size: 12.5px; }

/* ---------------- 双栏 ---------------- */

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}
.side-forms { display: flex; flex-direction: column; gap: 16px; }

.round-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.round-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 13px 16px;
}
.round-item-main { display: flex; align-items: baseline; gap: 12px; }
.round-item-main b { font-family: var(--font-serif); font-size: 16px; }
.round-item-actions { display: flex; align-items: center; gap: 12px; }

.danger-card { border-color: #eccfca; background: #fffaf9; }
.danger-card h3 { color: #8e1b1b; }

/* ---------------- 提示 ---------------- */

.tip {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 22px;
  padding: 12px 16px;
  background: #f7f2e7;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}
.tip b { color: var(--ink-2); white-space: nowrap; }

.flash-stack { margin-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.flash {
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 13.5px;
  border: 1px solid;
}
.flash-ok { background: #eff7f1; border-color: #c9e0cf; color: #2f6b47; }
.flash-err { background: #fdf0ee; border-color: #efcbc5; color: #9c2a20; }

/* ---------------- 帮助页 ---------------- */

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 18px;
}
.help-grid .card h3 { font-size: 17px; margin-bottom: 12px; color: var(--red-deep); }
.steps { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 13.5px; line-height: 1.95; }
.bullets { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13.5px; line-height: 1.9; }
.help-grid p { font-size: 13.5px; color: var(--ink-2); line-height: 1.85; }
.code, pre {
  display: block;
  background: #2b2721;
  color: #f3e6c8;
  border-radius: 9px;
  padding: 10px 14px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12.5px;
  margin: 8px 0;
  overflow-x: auto;
}
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; background: #f1ebe0; padding: 1px 5px; border-radius: 4px; }

/* ---------------- 页脚 ---------------- */

.foot {
  border-top: 1px solid var(--line);
  padding: 18px 0 26px;
  font-size: 12px;
  color: var(--muted);
}
.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------------- 登录 ---------------- */

.auth-body { min-height: 100vh; display: flex; flex-direction: column; }
.auth-body main { flex: 1; }
.auth-card {
  max-width: 380px;
  margin: 56px auto 0;
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 28px 26px;
  box-shadow: 0 18px 40px rgba(90, 60, 30, .08);
}
.auth-card h1 { font-size: 22px; }
.auth-sub { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.auth-card form .btn-block { margin-top: 6px; }

@media (max-width: 720px) {
  .auth-card { margin: 28px 14px 0; padding: 22px 18px; }
}

/* =========================================================
   打印
   ========================================================= */

.print-body { background: #fff; }

.print-tools {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 18px;
}

.sheet {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto 20px;
  padding: 16mm 15mm;
  background: #fff;
  color: #111;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
  font-family: var(--font-sans);
}

.sheet-landscape { width: 297mm; min-height: 210mm; }

.sheet-head {
  text-align: center;
  border-bottom: 2px solid #111;
  padding-bottom: 10mm;
  margin-bottom: 8mm;
}
.sheet-kicker { font-size: 10px; letter-spacing: .3em; color: #777; margin-bottom: 6mm; }
.sheet-head h1 { font-size: 26px; line-height: 1.3; margin-bottom: 3mm; }
.sheet-sub { font-size: 13px; color: #333; }
.sheet-sub b { font-size: 16px; }
.dot { margin: 0 6px; color: #bbb; }

.print-tbl { width: 100%; border-collapse: collapse; }
.print-tbl th {
  font-size: 11px;
  letter-spacing: .08em;
  color: #444;
  text-align: left;
  padding: 3mm 3mm;
  border-bottom: 1.5px solid #111;
}
.print-tbl td {
  padding: 4.2mm 3mm;
  border-bottom: 1px solid #ddd;
  font-size: 13px;
  vertical-align: middle;
}
.print-tbl tr:nth-child(even) td { background: #fafafa; }

.pt-no { width: 18mm; text-align: center; }
.pt-board {
  display: inline-grid;
  place-items: center;
  width: 11mm;
  height: 11mm;
  background: #a5211f;
  color: #fff;
  border-radius: 3mm;
  font-size: 17px;
  font-weight: 700;
}
.pt-dir { width: 16mm; }
.pt-team { width: 34%; }
.pt-team b { font-size: 15px; }
.pt-players { width: 30%; font-size: 12.5px; color: #333; }
.pt-num { text-align: center; width: 16mm; }
.pt-round { text-align: center; font-size: 11.5px; white-space: nowrap; }

.print-tbl .dir-n, .print-tbl .dir-e {
  display: inline-block;
  font-size: 10px;
  padding: 1.5mm 2.5mm;
  border-radius: 2mm;
}
.print-tbl .dir-n { background: #f3dedb; color: #8d1a17; }
.print-tbl .dir-e { background: #deece4; color: #245a45; }

.print-bye {
  margin-top: 7mm;
  padding: 4mm 5mm;
  border: 1px dashed #999;
  font-size: 13px;
  border-radius: 2mm;
}

.sheet-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 10mm;
  padding-top: 4mm;
  border-top: 1px solid #ccc;
  font-size: 10px;
  color: #777;
}

.sheet-sign {
  margin-top: 2mm;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: #8b8073;
}

.sheet-meta {
  margin-top: 3mm;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #6f6455;
}

.print-stand { font-size: 11px; }
.print-stand td { padding: 2.6mm 2mm; }
.print-stand th { padding: 2.6mm 2mm; white-space: nowrap; }
.print-stand .pt-num,
.print-stand .pt-round { white-space: nowrap; padding-left: 1.6mm; padding-right: 1.6mm; }

@media print {
  @page { size: A4 portrait; margin: 10mm; }
  .no-print, .topbar, .foot, .flash-stack { display: none !important; }
  body { background: #fff !important; }
  .print-tools { display: none !important; }
  .sheet {
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }
  .print-tbl tr:nth-child(even) td { background: transparent; }
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 900px) {
  .tbar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .two-col { grid-template-columns: 1fr; }
  .hero { padding: 34px 26px; }
  .hero-facts { gap: 24px; }
  .match-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .round-bar { align-items: flex-start; }
  .save-bar { position: static; }
  .topnav a { padding: 8px 10px; font-size: 13px; }
  .tabs { gap: 0; }
  .tab { padding: 11px 13px; font-size: 13.5px; }
}

@media (max-width: 560px) {
  .wrap { width: calc(100% - 28px); }
  .hero h1 { font-size: 28px; }
  .hero-facts > div b { font-size: 24px; }
  .tbar h1 { font-size: 24px; }
  .side-row { grid-template-columns: 38px 1fr 86px; }
  .hero-actions .btn { flex: 1; }
}

/* ========== 对阵录分：紧凑表格（桌数多时一屏多录） ========== */
.score-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 18px;
}
.score-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.score-tbl thead th {
  text-align: left;
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--muted);
  font-weight: 600;
  padding: 8px 10px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.score-tbl tbody tr.srow { border-bottom: 1px solid var(--line); }
.score-tbl tbody tr.srow:last-child { border-bottom: 0; }
.score-tbl td { padding: 5px 10px; vertical-align: middle; }
.score-tbl .c-bd { width: 46px; text-align: center; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.score-tbl .c-lv { width: 92px; }
.score-tbl .c-calc { width: 200px; white-space: nowrap; }
.score-tbl .c-st { width: 64px; text-align: center; }
.score-tbl .c-team { max-width: 260px; }
.score-tbl .c-team strong { display: inline; font-weight: 600; color: var(--ink); }
.score-tbl .c-team .players { display: inline; margin-left: 6px; font-size: 12px; color: var(--muted); }
.score-tbl select.lv-select { width: 84px; height: 30px; padding: 0 4px; font-size: 13px; border-radius: 7px; background: #fffefb; }
.score-tbl .c-calc .calc { font-size: 12px; color: var(--ink-2); }
.score-tbl tr.is-pending td { background: #fffdf6; }
.score-tbl tr.is-quit td { background: var(--gold-soft); }
.score-tbl tr.is-bye td { background: var(--paper-2); }
.score-tbl .bye-tag {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 1px 6px;
  margin-left: 6px;
}
.form-edit { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft); }
.row-actions .link-btn { padding: 1px 4px; }

@media (max-width: 820px) {
  .score-tbl { font-size: 12.5px; }
  .score-tbl .c-team .players { display: none; }
  .score-tbl .c-calc { width: 120px; }
  .score-tbl thead th.c-calc { font-size: 10.5px; }
  .score-tbl .c-lv { width: 76px; }
  .score-tbl select.lv-select { width: 70px; }
}

/* =========================================================
   选手端（免登录查询）
   ========================================================= */

.player-body { background-color: var(--paper); }

.pl-top {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.pl-top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}

.pl-wrap { width: min(900px, 100% - 32px); margin: 0 auto; padding: 26px 0 36px; }

.pl-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin-bottom: 16px;
}

.pl-kicker {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: .14em;
  color: var(--gold);
  margin-bottom: 6px;
}

.pl-card h1 { font-family: var(--font-serif); font-size: 26px; margin: 0 0 4px; letter-spacing: .02em; }
.pl-card h3 { font-family: var(--font-serif); font-size: 17px; margin: 0 0 6px; }
.pl-sub { margin: 0; color: var(--muted); font-size: 13.5px; }

.pl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pl-switch select {
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 6px 10px;
  background: #fff;
  font-size: 13px;
  color: var(--ink);
  max-width: 260px;
}

.pl-form { display: flex; gap: 10px; margin-top: 16px; }
.pl-input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 10px;
}
.pl-input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.pl-tip { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.pl-empty { margin: 12px 0; color: var(--muted); font-size: 14px; }
.pl-empty-card h3 { color: var(--ink-2); }
.pl-empty-card p { margin: 0; color: var(--muted); font-size: 13.5px; }

.pl-list { display: grid; gap: 8px; margin-top: 12px; }
.pl-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.pl-item:hover { border-color: var(--red); box-shadow: var(--shadow); }
.pl-item b { font-size: 15px; }
.pl-item span { font-size: 12.5px; color: var(--muted); }

/* 队伍抬头 */
.pl-team {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 20px;
  margin-bottom: 16px;
  background: var(--card);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.pl-no {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(150deg, var(--red), var(--red-deep));
  color: #fff6e3;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  box-shadow: inset 0 0 0 1px rgba(255, 246, 227, .35);
}
.pl-team-main h2 { font-family: var(--font-serif); font-size: 22px; margin: 0 0 2px; letter-spacing: .02em; }
.pl-team-main p { margin: 0; font-size: 13.5px; color: var(--muted); }
.pl-rank { margin-left: auto; text-align: right; display: flex; flex-direction: column; gap: 1px; }
.pl-rank span { font-size: 11.5px; color: var(--muted); letter-spacing: .08em; }
.pl-rank b { font-size: 22px; color: var(--red); font-family: var(--font-serif); }
.pl-rank em { font-style: normal; font-size: 12.5px; color: var(--ink-2); }
.pl-rank .pl-of { color: var(--muted); font-size: 11.5px; }

/* 本轮对阵 */
.pl-round {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 22px;
  margin-bottom: 16px;
}
.pl-round.pl-bye { border-left-color: var(--gold); background: var(--gold-soft); }
.pl-round-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.pl-rno { font-weight: 700; font-size: 15px; }
.pl-board {
  background: var(--ink);
  color: #fff6e3;
  border-radius: 7px;
  padding: 2px 10px;
  font-size: 14px;
  letter-spacing: .04em;
}
.pl-tag {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 1px 9px;
}
.pl-tag-wait { color: var(--red); border-color: #e9c6c1; background: var(--red-soft); }

.pl-vs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: stretch;
}
.pl-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  background: var(--paper-2);
  border-radius: 12px;
}
.pl-side b { font-size: 17px; line-height: 1.35; }
.pl-side em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.pl-side strong { font-size: 30px; line-height: 1.2; color: var(--red); font-family: var(--font-serif); margin-top: 4px; }
.pl-dir { font-size: 11.5px; color: var(--muted); letter-spacing: .1em; }
.pl-mid { align-self: center; font-size: 12px; letter-spacing: .16em; color: var(--muted); }
.pl-big { font-family: var(--font-serif); font-size: 30px; color: var(--ink); margin: 6px 0 4px; }
.pl-stat { margin: 14px 0 0; font-size: 13.5px; color: var(--ink-2); }

/* 历史轮次 */
.pl-table-wrap { overflow-x: auto; margin-top: 10px; }
.pl-table { width: 100%; border-collapse: collapse; font-size: 13.5px; white-space: nowrap; }
.pl-table th {
  text-align: left;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--paper-2);
  border-bottom: 1px solid var(--line-2);
  padding: 7px 9px;
}
.pl-table td { padding: 7px 9px; border-bottom: 1px solid var(--line); }

.pl-foot { text-align: center; font-size: 12px; color: var(--muted); margin: 18px 0 0; line-height: 1.7; }

/* 登录页：裁判端标识与选手入口 */
.auth-badge {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: .12em;
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid #e9c6c1;
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 8px;
}
.auth-alt { margin: 18px 0 2px; text-align: center; font-size: 13.5px; color: var(--muted); }

@media (max-width: 640px) {
  .pl-wrap { padding: 16px 0 28px; width: min(900px, 100% - 24px); }
  .pl-card { padding: 16px; }
  .pl-team { padding: 14px; gap: 12px; }
  .pl-rank { margin-left: 0; text-align: left; width: 100%; }
  .pl-form { flex-direction: column; }
  .pl-vs { grid-template-columns: 1fr; }
  .pl-mid { display: none; }
  .pl-side strong { font-size: 26px; }
  .pl-score-row { grid-template-columns: 1fr; }
}

/* 选手端：本桌录分 */
.pl-score {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-2);
}
.pl-score-head {
  font-size: 12.5px;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 10px;
}
.pl-score-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.pl-score-row label { display: flex; flex-direction: column; gap: 6px; }
.pl-score-row label span { font-size: 12.5px; color: var(--ink-2); }
.pl-score-row select {
  width: 100%;
  padding: 12px 10px;
  font-size: 18px;
  font-family: var(--font-sans);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 10px;
}
.pl-score-row select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.pl-score-btn {
  width: 100%;
  margin-top: 14px;
  padding: 13px 16px;
  font-size: 16px;
  letter-spacing: .06em;
}
.pl-score-tip { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.pl-muted { color: var(--muted); }

/* 选手端：提交结果提示条 */
.pl-alert {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  font-size: 13.5px;
}
.pl-alert b { font-size: 14px; }
.pl-alert span { color: var(--ink-2); }
.pl-alert-ok { border-left: 4px solid var(--green); background: var(--green-soft); }
.pl-alert-ok b { color: var(--green); }
.pl-alert-bad { border-left: 4px solid var(--red); background: var(--red-soft); }
.pl-alert-bad b { color: var(--red); }

/* 比赛计分二维码 */
.qr-card { text-align: center; }
.qr-box {
  display: flex;
  justify-content: center;
  margin: 20px auto 8px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  width: fit-content;
  box-shadow: var(--shadow);
}
.qr-box img, .qr-box canvas { display: block; }
.qr-box-sm { margin: 14px auto 6px; padding: 10px; }
.qr-card-ref { border-left: 4px solid var(--green); }
.qr-url {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12.5px;
  color: var(--ink-2);
  word-break: break-all;
  margin: 8px 0 0;
}
.qr-steps {
  text-align: left;
  max-width: 520px;
  margin: 20px auto 0;
  padding-left: 20px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.9;
}
.qr-note { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }
.qr-warn {
  margin: 12px auto 0;
  max-width: 520px;
  font-size: 12.5px;
  color: #8a6a1f;
  background: #fbf2da;
  border: 1px solid #e8d5a3;
  border-radius: 10px;
  padding: 9px 12px;
  line-height: 1.7;
}

/* =========================================================
   选手端 · 逐把计分页（极简：只留本场本桌）
   ========================================================= */
.ps-body { background: var(--paper); }
.ps-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--red-deep);
  color: #fdf6e8;
  font-size: 12.5px;
  letter-spacing: .14em;
  padding: 8px 16px 7px;
}
.ps-wrap { width: min(560px, 100% - 16px); margin: 0 auto; padding: 10px 0 34px; }

.ps-top { padding: 4px 2px 8px; }
.ps-top h1 {
  font-family: var(--font-serif);
  font-size: 20px;
  margin: 0 0 3px;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps-meta { margin: 0; font-size: 12.5px; color: var(--muted); }
.ps-who { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ps-who b { font-family: var(--font-serif); font-size: 19px; }
.ps-who i {
  font-style: normal;
  font-size: 11.5px;
  color: var(--muted);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 1px 7px;
}
.ps-link { font-size: 12.5px; color: var(--red); text-decoration: none; }
.ps-who .ps-refresh { margin-left: auto; }

.ps-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 13px 14px;
  margin: 0 0 10px;
}
.ps-h2 { font-family: var(--font-serif); font-size: 15px; margin: 0 0 6px; }
.ps-refresh {
  flex: none;
  border: 1px solid var(--line-2);
  background: #fffefb;
  color: var(--red);
  font-size: 12px;
  letter-spacing: .04em;
  line-height: 1.4;
  border-radius: 7px;
  padding: 4px 11px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ps-refresh:active { background: var(--red-soft); }
.ps-refresh:disabled { opacity: .5; cursor: default; }
.ps-rule { margin: 0 0 6px; font-size: 11.5px; color: var(--muted); }
.ps-empty { margin: 4px 0; font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.ps-hint { margin: 8px 0 0; font-size: 12px; color: var(--muted); line-height: 1.7; }
.ps-hint-red { color: var(--red); }
.ps-big-note { font-family: var(--font-serif); font-size: 24px; color: var(--red); margin: 4px 0; }
.ps-locked { display: grid; gap: 4px; border-left: 4px solid var(--gold); background: var(--gold-soft); }
.ps-locked b { font-size: 15px; }
.ps-locked span { font-size: 13px; color: var(--ink-2); }

/* 姓名输入 */
.ps-name { display: grid; gap: 8px; }
.ps-name label { font-size: 12.5px; color: var(--ink-2); letter-spacing: .06em; }
.ps-name input[type=text],
.ps-input {
  width: 100%;
  font-size: 17px;
  padding: 11px 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #fffefb;
  color: var(--ink);
  font-family: var(--font-sans);
}
.ps-name input[type=text]:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }

/* 按钮 */
.ps-btn {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  font-family: var(--font-sans);
  text-align: center;
  text-decoration: none;
}
.ps-btn-blue { background: var(--green); color: #fff; margin-top: 12px; }
.ps-btn-blue:disabled { background: #a9b3ad; cursor: not-allowed; }
.ps-btn-red { background: var(--red); color: #fff; }
.ps-btn-ghost { background: #fffefb; color: var(--ink-2); border: 1px solid var(--line-2); margin-top: 10px; font-weight: 400; }

/* 赛事/同名候选 */
.ps-picks { display: grid; gap: 7px; margin: 8px 0 2px; }
.ps-pick {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #fffefb;
  text-decoration: none;
  color: var(--ink);
}
.ps-pick b { font-size: 15px; }
.ps-pick span { font-size: 12px; color: var(--muted); }

/* 座位表 */
.ps-round {
  font-family: var(--font-serif);
  font-size: 23px;
  color: var(--red);
  margin: 0 0 10px;
  letter-spacing: .02em;
}
.ps-seat {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: center;
  table-layout: fixed;
}
.ps-seat th {
  width: 56px;
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
  padding: 6px 2px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
  letter-spacing: .06em;
}
.ps-seat td {
  padding: 7px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.ps-seat tr:last-child td, .ps-seat tr:last-child th { border-bottom: 0; }
.ps-seat td:nth-child(2), .ps-seat td:nth-child(3) { color: var(--ink-2); }

/* 计分记录表 */
.ps-plays {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: center;
  table-layout: fixed;
}
.ps-plays th {
  font-weight: 400;
  font-size: 11.5px;
  color: var(--muted);
  padding: 6px 3px;
  border-bottom: 1px solid var(--line-2);
  background: var(--paper-2);
  letter-spacing: .04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ps-plays th.ps-th-name { white-space: normal; text-overflow: clip; overflow: visible; font-size: 12px; line-height: 1.3; padding: 5px 2px; }
.ps-plays th:first-child { width: 58px; }
.ps-plays th:last-child { width: 62px; }
.ps-plays td { padding: 7px 3px; border-bottom: 1px solid var(--line); }
.ps-plays tr:last-child td { border-bottom: 0; }
.ps-plays td:nth-child(2), .ps-plays td:nth-child(3) { font-weight: 700; color: var(--red); }
.ps-td-empty { color: var(--muted); font-size: 12.5px; padding: 14px 0; }
.ps-inline { display: inline; margin: 0; }
.ps-undo {
  border: 1px solid var(--line-2);
  background: #fffefb;
  color: var(--red);
  font-size: 12px;
  border-radius: 6px;
  padding: 3px 9px;
  cursor: pointer;
}

/* 录入区：姓名 + 选择打几 */
.ps-entry { padding: 12px 14px 14px; }
.ps-choose { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ps-choose th {
  font-weight: 400;
  font-size: 11.5px;
  color: var(--muted);
  text-align: left;
  padding: 0 4px 6px;
  letter-spacing: .06em;
}
.ps-choose th:first-child { width: 42%; }
.ps-choose th:last-child { text-align: right; }
.ps-choose td { padding: 5px 4px; }
.ps-choose tr:first-child td { border-bottom: 1px solid var(--line); }
.ps-cname { font-family: var(--font-serif); font-size: 16px; line-height: 1.3; white-space: normal; word-break: keep-all; }
.ps-choose td:last-child { text-align: right; }

.ps-seg { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.ps-seg.is-locked { opacity: .42; }
.ps-seg.is-locked .ps-seg-item { pointer-events: none; }
.ps-seg-item { position: relative; display: inline-block; }
.ps-seg-item input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.ps-seg-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 38px;
  padding: 0 9px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: #fffefb;
  font-size: 15px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}
.ps-seg-item.is-on span {
  background: var(--red);
  border-color: var(--red-deep);
  color: #fff;
  font-weight: 700;
}

.ps-lockform { margin: 0; }
.ps-lockform .ps-btn-red { margin-top: 2px; }

/* 提示浮窗：固定定位，不占文档高度，提交后页面不跳动 */
.ps-flash {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: 86vw;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  text-align: center;
  color: #fff;
  box-shadow: 0 8px 22px rgba(48, 24, 8, .26);
  pointer-events: none;
  animation: psFlashIn .18s ease-out;
}
.ps-flash-ok { background: #1d5e33; }
.ps-flash-bad { background: #8f2323; }
@keyframes psFlashIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* 裁判端：全桌计分总览（紧凑排版，桌多也不拉长页面） */
.rf-top { display: flex; align-items: center; gap: 8px; padding: 2px 2px 6px; }
.rf-h1 {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rf-meta { flex: none; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.rf-top .ps-refresh { flex: none; }
.rf-filter { padding: 8px 10px; }
.rf-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.rf-chip {
  border: 1px solid var(--line-2);
  background: #fffefb;
  color: var(--ink-2);
  font-size: 12px;
  border-radius: 999px;
  padding: 4px 10px;
  text-decoration: none;
  white-space: nowrap;
}
.rf-chip.is-on { background: var(--red); border-color: var(--red-deep); color: #fff; }
.rf-card { padding: 8px 10px 9px; margin-bottom: 8px; }
.rf-card.is-done { background: #f5f2ea; }
.rf-head { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.rf-no { font-family: var(--font-serif); font-size: 15px; white-space: nowrap; }
.rf-badge { font-size: 10.5px; border-radius: 999px; padding: 1px 6px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.rf-badge-todo { color: var(--red); border-color: #f0cfc9; background: #fdf1ef; }
.rf-badge-doing { color: #1d5e33; border-color: #cfe3d3; background: #eff7f0; }
.rf-badge-done { color: #7a6a3a; border-color: #e6d9b0; background: #fbf5e4; }
.rf-badge-tie { color: #fff; background: var(--red); border-color: var(--red-deep); }
.rf-note { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.rf-res { margin-left: auto; font-family: var(--font-serif); font-size: 14px; color: var(--red); white-space: nowrap; }
.rf-act { margin: 0; display: flex; }
.rf-act .ps-btn { margin-top: 0; }
.ps-btn-tiny {
  display: inline-block;
  width: auto;
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.5;
  border-radius: 6px;
  margin: 0;
  letter-spacing: 0;
}
.rf-grid { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; text-align: center; }
.rf-grid th {
  font-weight: 400;
  font-size: 11px;
  color: var(--muted);
  padding: 3px 2px;
  border-bottom: 1px solid var(--line-2);
  background: var(--paper-2);
}
.rf-grid th.rf-name { width: 42%; text-align: left; padding-left: 4px; }
.rf-grid th.rf-rescol { width: 42px; }
.rf-grid td { padding: 3px 2px; border-bottom: 1px solid var(--line); }
.rf-grid td.rf-name {
  text-align: left;
  padding-left: 4px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rf-grid td.rf-name i {
  font-style: normal;
  font-size: 10.5px;
  color: var(--muted);
  margin-right: 4px;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  padding: 0 3px;
}
.rf-grid td.rf-rescol { font-weight: 700; color: var(--red); }
.rf-grid tr:last-child td { border-bottom: 0; }
.ps-btn-sm { display: inline-block; width: auto; padding: 7px 15px; font-size: 13px; border-radius: 7px; }
.rf-tip { font-size: 11.5px; color: var(--muted); line-height: 1.7; padding: 0 4px 10px; }

/* ---------- 对阵与录分：左右两区对称表（每桌一整行） ---------- */
.board-tbl { table-layout: fixed; }
.score-tbl .c-op { width: 78px; text-align: center; white-space: nowrap; }
.board-tbl .c-bd { width: 76px; padding-left: 6px; padding-right: 6px; white-space: nowrap; }
.board-tbl .c-a { text-align: right; padding-right: 14px; }
.board-tbl .c-b { text-align: left; padding-left: 14px; }
.board-tbl .c-n {
  width: 64px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  white-space: nowrap;
}
.board-tbl .c-res {
  width: 106px;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 1px;
}
.board-tbl .c-res b { font-weight: 700; color: var(--red); }
.board-tbl tbody td { padding-top: 4px; padding-bottom: 4px; }
.bt-line { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.board-tbl .c-a .bt-line { flex-direction: row-reverse; }
.bt-p { flex: 0 0 auto; white-space: nowrap; font-weight: 600; color: var(--ink); }
.bt-s {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  color: var(--muted);
}
.bt-state { margin-left: 5px; font-size: 10.5px; font-weight: 400; color: var(--muted); }
/* 录入状态：待录浅灰、已录墨色、锁定绿底白字、弃权退赛红字 */
.bt-state.is-todo { color: #a2988a; }
.bt-state.is-done { color: var(--ink-2); }
.bt-state.is-lock {
  margin-left: 5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
}
.bt-state.is-off { color: var(--red); }
.board-tbl .is-locked td { background: #f2f7f3; }
.board-tbl .is-locked .c-res b { color: var(--green); }
.board-tbl .c-op .btn-mini.btn-danger { background: #8e1b1b; border-color: #8e1b1b; color: #fff; }
.board-tbl .c-op .btn-mini.btn-danger:hover { background: #741414; border-color: #741414; color: #fff; }
.bs-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 12px; }
.bs-teams-stack { grid-template-columns: 1fr; gap: 8px; margin: 0 0 4px; }
.bs-teams-stack .bs-team { padding: 8px 10px; }
.bs-team {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
}
.bs-pos {
  flex: none;
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 1px 5px;
}
.bs-main { min-width: 0; }
.bs-main b { display: block; font-size: 14px; color: var(--ink); }
.bs-main span { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.bs-lv { flex: none; margin-left: auto; font-family: var(--font-serif); font-size: 20px; color: var(--red); }
.notice-warn { background: var(--red-soft); border-color: #e2bdb8; color: var(--red-deep); }
.bs-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.bs-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.bs-panel h3 { font-family: var(--font-serif); font-size: 14px; margin: 0 0 8px; font-weight: 700; color: var(--ink); }
.bs-plays td { font-variant-numeric: tabular-nums; }
.bs-sel { display: flex; gap: 14px; flex-wrap: wrap; }
.bs-sel label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.bs-sel select.lv-select { width: 92px; height: 32px; padding: 0 6px; font-size: 13px; border-radius: 7px; background: #fffefb; }
.bs-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.bs-final-read { font-size: 13px; margin-top: 4px; }
.bs-final-read th { text-align: left; font-weight: 400; color: var(--muted); padding: 3px 10px 3px 0; }
@media (max-width: 860px) {
  .bs-grid { grid-template-columns: 1fr; }
  .bs-teams { grid-template-columns: 1fr; }
  .board-tbl .c-bd { width: 62px; padding-left: 4px; padding-right: 4px; }
  .board-tbl .c-a { padding-right: 8px; }
  .board-tbl .c-b { padding-left: 8px; }
  .board-tbl .c-n { width: 44px; }
  .board-tbl .c-res { width: 82px; letter-spacing: 0; }
  .score-tbl .c-op { width: 56px; }
  .board-tbl .bt-s { font-size: 10.5px; }
  .board-tbl .bt-state { margin-left: 3px; }
}

@media (max-width: 380px) {
  .ps-seg-item span { min-width: 36px; height: 36px; padding: 0 7px; font-size: 14px; }
  .ps-cname { font-size: 15px; }
  .ps-round { font-size: 20px; }
}

@media print {
  .pl-top, .pl-foot, .qr-note { display: none; }
  .qr-card { box-shadow: none; border: none; background: #fff; }
  .qr-box { box-shadow: none; }
  .ps-bar { display: none; }
  .ps-flash { display: none; }
}

/* =========================================================
   大屏投屏（对阵投屏 ?p=screen / 倒计时投屏 ?p=timer）
   深墨底 + 鎏金，字大、留白少，专供投影和大电视
   ========================================================= */
body.big-body {
  background: #15150f;
  background-image: none;
  color: #f7efdd;
}

.big-sc, .big-tm {
  min-height: 100vh;
  box-sizing: border-box;
  padding: 2.2vh 2.4vw 1.6vh;
  display: flex;
  flex-direction: column;
  gap: 1.8vh;
}

.big-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3vw;
  padding-bottom: 1.4vh;
  border-bottom: 2px solid rgba(211, 178, 106, .32);
}
.big-kicker { font-size: 13px; letter-spacing: .26em; color: #a89772; }
.big-title {
  font-size: clamp(24px, 3.2vw, 46px);
  font-weight: 700;
  line-height: 1.12;
  margin-top: .3vh;
  overflow: hidden;
  text-overflow: ellipsis;
}
.big-right { text-align: right; flex: 0 0 auto; }
.big-round { font-size: clamp(17px, 2.1vw, 30px); }
.big-round b { color: #d3b26a; font-size: 1.45em; padding: 0 .12em; }
.big-round span { font-size: .58em; color: #a89772; letter-spacing: .06em; }
.big-sub { font-size: 13px; color: #a89772; margin-top: .5vh; }
.big-clock {
  font-size: clamp(18px, 2.3vw, 30px);
  font-weight: 700;
  color: #d3b26a;
  letter-spacing: .12em;
  font-variant-numeric: tabular-nums;
  margin-top: .8vh;
}

.big-grid {
  flex: 1 1 auto;
  display: grid;
  gap: 1.6vh 1.1vw;
  align-content: start;
}
.big-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }.big-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.big-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.big-grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
/* 桌少时把卡片拉到满屏均分，别缩在顶上 */
.big-grid.is-few { grid-auto-rows: minmax(0, 1fr); }
.big-grid.is-few .big-card { justify-content: center; }
.big-grid.is-few .big-no b { font-size: clamp(32px, 4vw, 60px); }
.big-grid.is-few .big-team b { font-size: clamp(22px, 2.5vw, 42px); }
.big-grid.is-few .big-team > span:last-child { font-size: clamp(12px, 1.1vw, 17px); }

.big-card {
  background: linear-gradient(180deg, #23221a 0%, #1b1a13 100%);
  border: 1px solid rgba(211, 178, 106, .28);
  border-radius: 14px;
  padding: 1.4vh 1.2vw;
  display: flex;
  flex-direction: column;
  gap: .7vh;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}
.big-no { color: #d3b26a; letter-spacing: .12em; font-size: clamp(12px, 1.05vw, 16px); display: flex; align-items: center; gap: .1em; }
.big-no b { font-size: clamp(24px, 2.8vw, 42px); line-height: 1; padding: 0 .1em; }
.big-team { display: flex; align-items: center; gap: .7em; min-width: 0; }
.big-team b {
  font-size: clamp(17px, 1.75vw, 30px);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.big-team > span:last-child {
  font-size: clamp(11px, .95vw, 14px);
  color: #a89772;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
}
.big-dir {
  flex: 0 0 auto;
  font-size: clamp(11px, .85vw, 13px);
  line-height: 1.7;
  padding: 0 .7em;
  border-radius: 99px;
  background: rgba(176, 58, 46, .22);
  border: 1px solid rgba(224, 90, 74, .42);
  color: #f2b7a8;
  letter-spacing: .08em;
}
.big-dir.is-e {
  background: rgba(95, 140, 90, .2);
  border-color: rgba(126, 178, 112, .42);
  color: #c3e2b8;
}

.big-empty {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(18px, 2vw, 28px);
  color: #a89772;
  border: 1px dashed rgba(211, 178, 106, .28);
  border-radius: 16px;
}

.big-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2vw;
  padding-top: 1.2vh;
  border-top: 1px solid rgba(211, 178, 106, .2);
  font-size: 12.5px;
  color: #8e8570;
}
.big-brand { color: #d3b26a; }

/* ---- 倒计时投屏 ---- */
.big-tm-main {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4vw;
  flex-wrap: wrap;
}
.big-count-wrap { flex: 1 1 480px; text-align: center; }
.big-count {
  font-size: clamp(84px, 16vw, 250px);
  font-weight: 800;
  line-height: .95;
  letter-spacing: .03em;
  font-variant-numeric: tabular-nums;
  color: #f7efdd;
  text-shadow: 0 0 42px rgba(211, 178, 106, .22);
}
.big-count.is-run { color: #d3b26a; }
.big-count.is-over {
  color: #e05a4a;
  animation: big-blink 1s steps(2, end) infinite;
}
@keyframes big-blink { 50% { opacity: .35; } }
.big-count-note { margin-top: 1.2vh; font-size: clamp(13px, 1.1vw, 17px); color: #a89772; letter-spacing: .06em; }
.big-tm-ctl {
  margin-top: 2.4vh;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
}
.big-btn {
  font-family: inherit;
  background: #26251b;
  color: #f7efdd;
  border: 1px solid rgba(211, 178, 106, .35);
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.big-btn:hover { background: #332f22; border-color: #d3b26a; }
.big-btn-g { border-color: rgba(247, 239, 221, .18); color: #c9c0aa; }
.big-tm-sep { width: 1px; height: 26px; background: rgba(211, 178, 106, .22); }

/* v1.7.15 · 倒计时投屏：顶部压成一行（赛事名 + 轮次/每轮/场地 + 全屏）；开始计时后锁死，控制按钮整排隐藏 */
.big-tm .big-head.is-flat { align-items: center; gap: 1.4vw; }
.big-tm .big-head.is-flat .big-title { max-width: 46vw; }
.big-tm .big-head.is-flat .big-headmeta { margin-left: auto; }
.big-tm.is-locked .big-tm-ctl { display: none; }
.big-tm.is-locked .big-count { font-size: clamp(96px, 18vw, 280px); }
.big-tm.is-locked .big-count-note { margin-top: 1.8vh; }

.big-tm-qr {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.big-qr-box {
  background: #f7efdd;
  padding: 14px;
  border-radius: 14px;
  box-shadow: 0 6px 26px rgba(0, 0, 0, .45);
  line-height: 0;
}
.big-qr-tip { margin: 0; font-size: 15px; color: #a89772; letter-spacing: .06em; }
.big-qr-mask {
  width: min(360px, 29vw);
  min-height: 250px;
  border: 1px dashed rgba(211, 178, 106, .38);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 22px;
  text-align: center;
}
.big-qr-mask b { font-size: 19px; color: #f2b7a8; }
.big-qr-mask span { font-size: 13px; color: #a89772; line-height: 1.7; }

/* 桌多时优先保证「两名队员」完整可读：列越密字越小 */
.big-grid.cols-3 .big-team b { font-size: clamp(16px, 1.5vw, 26px); }
.big-grid.cols-4 .big-team b { font-size: clamp(15px, 1.35vw, 22px); }
.big-grid.cols-5 .big-team b { font-size: clamp(13px, 1.15vw, 19px); }
.big-grid.cols-4 .big-no b { font-size: clamp(22px, 2.2vw, 34px); }
.big-grid.cols-5 .big-no b { font-size: clamp(19px, 1.9vw, 30px); }
.big-grid.cols-4 .big-team > span:last-child,
.big-grid.cols-5 .big-team > span:last-child { display: none; }
.big-grid.cols-4 .big-card,
.big-grid.cols-5 .big-card { padding: 1.1vh .9vw; gap: .55vh; }

@media (max-width: 940px) {
  .big-grid.cols-3, .big-grid.cols-4, .big-grid.cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .big-tm-main { flex-direction: column; gap: 3vh; }
  .big-count-wrap { flex: 0 0 auto; }
  .big-qr-mask { width: 260px; }
}

/* =========================================================
   v1.7.13 · 全局紧凑层
   目的：把页头、卡片、表格行的空隙往里收，队伍多时一屏能看更多桌。
   ========================================================= */

.topbar-in { height: 52px; }
.brand-mark { width: 32px; height: 32px; font-size: 18px; border-radius: 8px; }

.page { padding: 14px 0 26px; }
.page-head { margin-bottom: 12px; }
.page-head h1 { font-size: 25px; margin: 3px 0 4px; }

/* 首页 Hero 收短一截 */
.hero { padding: 26px 30px; border-radius: 16px; }
.hero h1 { font-size: clamp(24px, 3.1vw, 36px); margin-bottom: 8px; }
.hero p { font-size: 14px; line-height: 1.7; }
.hero-actions { margin-top: 14px; }
.hero-facts { margin-top: 16px; padding-top: 12px; gap: 26px; }
.hero-facts b { font-size: 22px; }
.hero-facts span { margin-top: 3px; }

/* 赛事页头：返回 + 赛事名 + 状态 + 队伍进度 + 场地日期 + 5 个按钮，尽量挤在一行 */
.tbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 8px; }
.tbar-crumb { margin: 0; font-size: 12.5px; flex: 0 0 auto; }
.tbar-name { font-size: 20px; margin: 0; line-height: 1.25; max-width: 28vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; }
.tbar-kv { font-size: 12px; color: var(--ink-2); white-space: nowrap; flex: 0 0 auto; }
.tbar-meta { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 0; min-width: 0; }
.tbar-actions { display: flex; gap: 6px; flex: 0 0 auto; margin-left: auto; padding-bottom: 0; justify-content: flex-end; }
.tbar-actions .btn { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.tbar-main { flex: 1 1 auto; min-width: 0; }
.tbar-main h1 { font-size: 24px; margin: 2px 0 6px; }

.tabs { margin-bottom: 10px; }
.tab { padding: 8px 15px; font-size: 14px; }

/* 卡片、区块、表格行统一收紧 */
.card { padding: 16px; }
.section-head { margin-bottom: 10px; }
.section-head h2 { font-size: 19px; }
.tbl th { padding: 6px 10px; }
.tbl td { padding: 5px 10px; }
.tbl .strong { font-size: 14px; }
.round-bar { padding: 8px 12px; margin-bottom: 12px; gap: 10px; }
.next-banner { padding: 10px 16px; margin-bottom: 12px; }
.tip { margin-top: 10px; padding: 8px 12px; font-size: 12.5px; }
.empty { padding: 26px 20px; }
.flash-stack { margin-bottom: 10px; }
.btn-refresh { border-color: #cfc3a8; }

/* 排名成绩表：每队压成一行，各轮格显示「牌级比 · 胜平负 · 本轮级差分」 */
.standings-tbl .w-team { min-width: 176px; }
.standings-tbl .team-cell { min-width: 176px; white-space: nowrap; }
.standings-tbl .team-cell b { display: inline; font-size: 13.5px; }
.standings-tbl .team-cell .club { margin-left: 6px; font-size: 11px; color: var(--muted); }
.standings-tbl .rank-cell { width: 42px; }
.standings-tbl .rank { width: 22px; height: 22px; border-radius: 6px; font-size: 12px; }
.standings-tbl .w-num { width: 46px; }
.standings-tbl .w-mid { width: 54px; }
.standings-tbl .w-round { min-width: 80px; }
.standings-tbl th { padding: 4px 6px; }
.standings-tbl th .th-main { display: block; font-size: 11.5px; line-height: 1.3; }
.standings-tbl th .th-sub { display: block; font-size: 9.5px; font-weight: 400; color: var(--muted); line-height: 1.35; letter-spacing: 0; }
.standings-tbl td { padding: 4px 6px; }

.rcell { font-size: 11px; white-space: nowrap; }
.rc-lv { font-weight: 700; font-variant-numeric: tabular-nums; }
.rc-res { margin: 0 3px; font-weight: 700; }
.rc-pt { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.r-win .rc-res { color: var(--green); }
.r-draw .rc-res { color: #9a7a22; }
.r-loss .rc-res { color: var(--red); }
.r-bye .rc-lv { color: var(--ink-2); font-weight: 600; }
.r-bye .rc-pt { margin-left: 3px; }
.r-empty { color: #c9c0b2; text-align: center; }

/* =========================================================
   v1.7.14 · 对阵投屏：顶部压成 1 行，桌多时一屏装更多桌
   ========================================================= */

.big-sc { padding: 1vh 1.1vw .5vh; gap: .7vh; }

.big-head.is-flat {
  align-items: center;
  padding-bottom: .6vh;
  border-bottom: 1px solid rgba(211, 178, 106, .28);
  gap: 2vw;
}
.big-head.is-flat .big-title { font-size: clamp(18px, 1.5vw, 26px); margin: 0; max-width: 58vw; }
.big-headmeta {
  display: flex;
  align-items: baseline;
  gap: 1.1vw;
  font-size: clamp(11px, .82vw, 15px);
  color: #a89772;
  white-space: nowrap;
  flex: 0 0 auto;
}
.big-headmeta b { color: #d3b26a; font-size: 1.7em; padding: 0 .1em; }
.big-headmeta .big-of { font-size: .85em; }
.big-headmeta .big-clock { margin: 0; font-size: clamp(13px, .95vw, 18px); letter-spacing: .1em; }

.big-foot { padding-top: .6vh; font-size: clamp(10px, .72vw, 13px); }

/* 卡片：桌号跨两行占左侧窄列，南北 / 东西各占一行；卡片撑满网格行高，屏幕利用率最高 */
.big-sc .big-grid { gap: .55vh .55vw; grid-auto-rows: minmax(0, 1fr); align-content: stretch; }
.big-grid.cols-2 .big-team b { font-size: clamp(22px, 2.3vw, 36px); }
.big-grid.cols-3 .big-team b { font-size: clamp(19px, 1.85vw, 30px); }
.big-grid.cols-4 .big-team b { font-size: clamp(17px, 1.55vw, 26px); }
.big-grid.cols-5 .big-team b { font-size: clamp(15px, 1.3vw, 23px); }
.big-grid.cols-4 .big-no b, .big-grid.cols-5 .big-no b { font-size: clamp(20px, 1.7vw, 28px); }
.big-sc .big-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  align-items: center;
  column-gap: .5vw;
  row-gap: .1vh;
  padding: .35vh .5vw;
  border-radius: 10px;
}
.big-sc .big-no { grid-row: 1 / -1; align-self: center; font-size: clamp(9px, .68vw, 12px); letter-spacing: .04em; flex-direction: column; gap: .3vh; }
.big-sc .big-no b { font-size: clamp(22px, 2vw, 34px); line-height: 1; }
.big-sc .big-no i { font-style: normal; font-size: clamp(10px, .62vw, 13px); color: #a89772; letter-spacing: .1em; }
.big-sc .big-team { gap: .4em; }
.big-sc .big-team b { font-size: clamp(15px, 1.1vw, 22px); }
.big-sc .big-dir { font-size: clamp(9px, .66vw, 12px); padding: 0 .55em; line-height: 1.5; }

/* 列多时逐级收字号，俱乐部小字让位给姓名 */
.big-grid.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.big-grid.cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.big-grid.cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.big-grid.cols-9 { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.big-grid.cols-6 .big-team b { font-size: clamp(15px, 1.06vw, 21px); }
.big-grid.cols-7 .big-team b { font-size: clamp(15px, 1.05vw, 20px); }
.big-grid.cols-8 .big-team b { font-size: clamp(13px, .88vw, 17px); }
.big-grid.cols-9 .big-team b { font-size: clamp(11px, .76vw, 15px); }
/* 三字姓名两人一行要放得下：列多时方位胶囊收到最小，只留一个方位字 */
.big-grid.cols-7 .big-dir,
.big-grid.cols-8 .big-dir,
.big-grid.cols-9 .big-dir { padding: 0 .3em; font-size: clamp(8px, .58vw, 10px); }
.big-grid.cols-8 .big-card,
.big-grid.cols-9 .big-card { column-gap: .3vw; }
.big-grid.cols-8 .big-no b,
.big-grid.cols-9 .big-no b { font-size: clamp(14px, 1vw, 21px); }
.big-grid.cols-8 .big-no i,
.big-grid.cols-9 .big-no i { font-size: clamp(8px, .52vw, 10px); }

/* 顶部查找框：裁判输入姓名 / 队名 / 桌号，命中的桌高亮、其余淡出 */
.big-head.is-flat .big-title { max-width: 38vw; }
.big-tools { display: flex; align-items: center; gap: .6vw; flex: 0 1 auto; margin: 0 auto 0 0; }
.big-search { position: relative; flex: 0 1 clamp(200px, 15vw, 280px); }
.big-fs {
  flex: 0 0 auto;
  padding: .55vh .8vw;
  border-radius: 8px;
  border: 1px solid rgba(211, 178, 106, .4);
  background: rgba(255, 255, 255, .07);
  color: #f3e9d2;
  font: inherit;
  font-size: clamp(12px, .86vw, 15px);
  letter-spacing: .04em;
  cursor: pointer;
  white-space: nowrap;
}
.big-fs:hover { border-color: #d3b26a; background: rgba(255, 255, 255, .13); }
.big-search input {
  width: 100%;
  box-sizing: border-box;
  padding: .55vh .8vw;
  border-radius: 8px;
  border: 1px solid rgba(211, 178, 106, .4);
  background: rgba(255, 255, 255, .07);
  color: #f3e9d2;
  font: inherit;
  font-size: clamp(12px, .86vw, 15px);
  letter-spacing: .02em;
}
.big-search input::placeholder { color: #8b7d5f; }
.big-search input:focus { outline: none; border-color: #d3b26a; background: rgba(255, 255, 255, .12); box-shadow: 0 0 0 2px rgba(211, 178, 106, .18); }
.big-search input::-webkit-search-cancel-button { filter: invert(.7); cursor: pointer; }
.big-findtip {
  position: absolute;
  right: 0;
  top: calc(100% + .3vh);
  font-size: clamp(10px, .7vw, 13px);
  color: #d3b26a;
  white-space: nowrap;
  pointer-events: none;
}
.big-findtip.is-miss { color: #e0645c; }
.big-grid .big-card { transition: opacity .16s ease, box-shadow .16s ease; }
.big-grid .big-card.miss { opacity: .14; }
.big-grid .big-card.hit { border-color: #d3b26a; box-shadow: 0 0 0 2px rgba(211, 178, 106, .6), 0 0 26px rgba(211, 178, 106, .35); }
.big-grid .big-card.hit .big-team b { color: #ffe9b0; }
.big-grid .big-card.hit .big-no b { color: #ffe9b0; }

/* 桌数少（7～24 桌）不做铺满，改成居中卡片墙：列宽固定、行高跟内容、字号加大，四周留白对称 */
.big-grid.is-air {
  align-content: center;
  justify-content: center;
  grid-auto-rows: minmax(min-content, 15vh);
  row-gap: 1.1vh;
  column-gap: .9vw;
}
.big-grid.is-air.cols-3 { grid-template-columns: repeat(3, minmax(0, 24vw)); }
.big-grid.is-air.cols-4 { grid-template-columns: repeat(4, minmax(0, 20vw)); }
.big-grid.is-air.cols-5 { grid-template-columns: repeat(5, minmax(0, 18vw)); }
.big-grid.is-air .big-card {
  grid-template-rows: min-content min-content;
  align-content: center;
  row-gap: .9vh;
  padding: 2.2vh 1vw;
  border-radius: 12px;
}
.big-grid.is-air .big-team b { font-size: clamp(20px, 1.55vw, 28px); }
.big-grid.is-air.cols-4 .big-team b { font-size: clamp(18px, 1.32vw, 24px); }
.big-grid.is-air.cols-5 .big-team b { font-size: clamp(16px, 1.15vw, 21px); }
.big-grid.is-air .big-no b { font-size: clamp(22px, 1.9vw, 33px); }
.big-grid.is-air .big-no i { font-size: clamp(10px, .7vw, 13px); }
.big-grid.is-air .big-team { gap: .5em; }
.big-grid.is-air .big-dir { font-size: clamp(9px, .66vw, 12px); }
.big-grid.cols-6 .big-sub,
.big-grid.cols-7 .big-sub,
.big-grid.cols-8 .big-sub,
.big-grid.cols-9 .big-sub,
.big-grid.is-air .big-sub { display: none; }
.big-grid.cols-7 .big-card,
.big-grid.cols-8 .big-card,
.big-grid.cols-9 .big-card { padding: .25vh .4vw; }
