/* ============================================================
   闪耀小赛 · 主办运营台（亮色工作台）
   依赖 tokens.css [data-theme="desk"] + base.css 原子类
   ============================================================ */

/* ---------- 外壳 ---------- */
.desk { display: flex; min-height: 100vh; background: var(--bg); }

.rail {
  position: fixed; inset: 0 auto 0 0; width: 216px; z-index: var(--z-rail);
  display: flex; flex-direction: column;
  background: var(--panel); border-right: 1px solid var(--line);
}
.rail-brand { padding: 22px 20px 16px; display: flex; flex-direction: column; gap: 3px; }
.rail-brand b { font-family: var(--font-display); font-size: 17px; font-weight: 800; letter-spacing: -.015em; line-height: 1.25; }
.rail-brand span { font-size: 10.5px; font-weight: 650; letter-spacing: .18em; color: var(--text-3); }

.rail-nav { padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  height: 38px; padding: 0 12px; border-radius: 9px;
  color: var(--text-2); font-size: 13.5px; font-weight: 600; text-align: left;
  position: relative; transition: background var(--dur-1), color var(--dur-1);
}
.nav-item svg { flex: none; opacity: .8; }
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item.is-on { background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent); }
.nav-item.is-on svg { opacity: 1; }
.nav-item.is-on::before {
  content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--accent);
}
.nav-count { margin-left: auto; font-size: 11px; color: var(--text-3); background: var(--panel-3); border-radius: 999px; padding: 1px 7px; }
.nav-item.is-on .nav-count { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }

.rail-foot { margin-top: auto; padding: 16px 20px 20px; border-top: 1px solid var(--line); }
.rail-prog { display: flex; flex-direction: column; gap: 8px; }
.rail-note { display: flex; justify-content: space-between; margin-top: 2px; }

.desk-main { flex: 1; min-width: 0; margin-left: 216px; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: var(--z-header);
  background: color-mix(in srgb, #ffffff 88%, transparent);
  backdrop-filter: saturate(150%) blur(10px); -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: 1320px; margin: 0 auto; height: 58px; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.tb-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tb-name { font-size: 15.5px; font-weight: 750; letter-spacing: -.01em; white-space: nowrap; }
.tb-date { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.tb-right { display: flex; align-items: center; gap: 14px; }
.tb-save { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--win); }
.tb-save.is-err { color: var(--lose); }
.tb-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tb-ext { color: var(--text-2); }

.content { width: 100%; max-width: 1320px; margin: 0 auto; padding: 28px; }
.content-empty { padding: 60px 0; }

/* ---------- 页头 ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.page-head-l { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.page-title { font-family: var(--font-display); font-size: 21px; font-weight: 780; letter-spacing: -.022em; line-height: 1.2; }
.page-sub { font-size: 12.5px; color: var(--text-3); }

/* ---------- 面板 ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-1); overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 18px; border-bottom: 1px solid var(--line); min-height: 52px;
}
.sec-title { font-size: 14px; font-weight: 720; letter-spacing: -.005em; }
.panel-body { padding: 16px 18px; }
.panel-body.is-tight { padding: 10px 18px 14px; }
.sec-gap { height: 18px; }

.stack { display: flex; flex-direction: column; gap: 18px; }
.stack-3 { display: flex; flex-direction: column; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- KPI ---------- */
.kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi-cell {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-1); padding: 13px 16px 14px;
  display: flex; flex-direction: column; gap: 3px;
}
.kpi-num {
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
  font-size: 29px; font-weight: 700; letter-spacing: -.035em; line-height: 1.15;
}
.kpi-num i { font-style: normal; font-size: 14px; font-weight: 600; color: var(--text-3); letter-spacing: 0; }
.kpi-sub { font-size: 11.5px; color: var(--text-3); }

/* ---------- 今日两栏 ---------- */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 318px; gap: 18px; align-items: start; }

/* ---------- 比赛行 ---------- */
.mlist { display: flex; flex-direction: column; }
.mitem { border-bottom: 1px solid var(--line); }
.mitem:last-child { border-bottom: 0; }
.mrow {
  display: grid; grid-template-columns: 54px 42px minmax(0, 1fr) 74px 74px;
  align-items: center; gap: 12px; min-height: 46px; padding: 8px 18px;
}
.mrow.no-tag { grid-template-columns: 54px minmax(0, 1fr) 74px 74px; }
.mrow:hover { background: var(--panel-2); }
.mrow-time { font-size: 12.5px; color: var(--text-2); }
.mrow-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mrow-sub { font-size: 11px; color: var(--text-3); }
.mrow-state { justify-self: start; }
.mrow-act { justify-self: end; }

.vs { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.vs-name { font-size: 13.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.vs-name.is-win { color: var(--win); }
.vs-name.is-tbd { color: var(--tbd); font-weight: 550; }
.vs-x { font-size: 10.5px; color: var(--text-3); flex: none; }
.vs-score { margin-left: auto; font-size: 12px; color: var(--text-2); letter-spacing: .02em; }
.vs-cell { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.vs-cell .vs-name { max-width: none; }

.gtag {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 20px; padding: 0 6px; border-radius: 5px;
  font-family: var(--font-num); font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
  background: var(--panel-3); border: 1px solid var(--line); color: var(--text-2);
}
.gtag.is-stage { color: var(--text-2); background: var(--panel-2); }
.gtag.is-lg { min-width: 30px; height: 26px; font-size: 13px; }

/* ---------- 表单件 ---------- */
.field-row { display: flex; flex-direction: column; gap: 6px; }
.field-row > .field { width: 100%; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .field { width: auto; min-width: 132px; height: 34px; font-size: 12.5px; }

.seg { display: inline-flex; gap: 2px; padding: 2px; background: var(--panel-3); border: 1px solid var(--line); border-radius: 8px; }
.seg-btn { height: 28px; padding: 0 12px; border-radius: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.seg-btn:hover { color: var(--text); }
.seg-btn.is-on { background: var(--panel); color: var(--text); box-shadow: var(--shadow-1); }

/* 主按钮只做纯色，不用渐变装饰 */
.btn-primary { background: var(--accent); border-color: transparent; box-shadow: none; }
.btn-primary:hover { background: color-mix(in srgb, #000 7%, var(--accent)); filter: none; }
.btn-outline {
  background: transparent;
  border-color: var(--line-2);
  color: var(--accent);
}
.btn-outline:hover {
  background: color-mix(in srgb, var(--accent) 7%, var(--panel));
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}
.btn-soft {
  background: color-mix(in srgb, var(--accent) 7%, var(--panel));
  border-color: color-mix(in srgb, var(--accent) 26%, transparent);
  color: var(--accent);
}
.btn-soft:hover { background: color-mix(in srgb, var(--accent) 12%, var(--panel)); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }

.check { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); cursor: pointer; user-select: none; }
.check input { width: 14px; height: 14px; accent-color: var(--accent); cursor: pointer; }

.chip-accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.chip.is-xs { height: 20px; padding: 0 7px; font-size: 10.5px; }

/* ---------- 进度条 ---------- */
.bar { height: 5px; border-radius: 999px; background: var(--panel-3); overflow: hidden; flex: none; width: 100%; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--accent); transition: width var(--dur-3) var(--ease-out); }
.bar.is-done > i { background: var(--win); }
.bar.is-gold > i { background: var(--grad-gold); }

/* ---------- 小组进度 ---------- */
.gcards { display: flex; flex-direction: column; gap: 14px; }
.gcard-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
}
.gcard-title { font-size: 14px; font-weight: 720; letter-spacing: -.006em; }
.gcard .mrow { padding-left: 18px; }

.gprog { display: flex; flex-direction: column; }
.gprog-row {
  display: grid; grid-template-columns: 26px 42px minmax(0,1fr) 34px;
  align-items: center; gap: 10px; height: 44px; padding: 0 18px;
  border-bottom: 1px solid var(--line);
}
.gprog-row:last-child { border-bottom: 0; }
.gprog-n { text-align: right; color: var(--text-2); }

/* ---------- 表格 ---------- */
.tbl-wrap { overflow: auto; max-height: calc(100vh - 300px); }
.tbl-wrap.is-tall { max-height: 538px; }   /* 34 表头 + 12 × 42 行 */
.tbl-wrap.is-mid { max-height: 328px; }    /* 34 表头 + 7 × 42 行 */
.tbl-wrap.is-scroll {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 20px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 20px), transparent);
}
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th {
  position: sticky; top: 0; z-index: 1;
  height: 34px; padding: 0 12px; text-align: left; white-space: nowrap;
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3); background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}
.tbl td {
  height: 42px; padding: 0 12px; font-size: 12.5px; color: var(--text);
  border-bottom: 1px solid var(--line); vertical-align: middle;
}
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--panel-2); }
.tbl .nm { font-size: 13px; font-weight: 600; }
.tbl td .nowrap { white-space: nowrap; }
.tbl .score-cell { color: var(--text-2); letter-spacing: .04em; }
.tbl-rank td { height: 40px; }
.tbl-rank th, .tbl-rank td { padding: 0 10px; }

.rk { font-size: 12px; font-weight: 700; }
.rk-1 { color: var(--gold); }
.rk-2 { color: var(--accent); }
.rk-3, .rk-4 { color: var(--text-3); }
.rk-r1 td { background: color-mix(in srgb, var(--gold) 5%, var(--panel)); }
.rk-r1 td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.rk-r1 .nm { color: var(--gold); }
.rk-r2 td { background: color-mix(in srgb, var(--accent) 4%, var(--panel)); }
.rk-r2 td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.rk-r3 td:first-child, .rk-r4 td:first-child { box-shadow: inset 3px 0 0 var(--line-2); }
.tbl-rank tbody tr:hover td { background: var(--panel-2); }

.rank-name { display: flex; align-items: center; gap: 7px; }
.games-left { color: var(--text-3); font-weight: 600; }
.magic { display: inline-flex; align-items: baseline; gap: 6px; }
.magic-miss { font-size: 10.5px; font-weight: 650; color: var(--lose); }
.magic.is-warn > .t-num { color: var(--text); }

.rank-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rank-card { overflow: hidden; }

.rate { display: flex; align-items: center; gap: 10px; }
.rate-bar { flex: 1; min-width: 60px; }
.stage-tag { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.stage-tag .note-xs { font-size: 9.5px; font-weight: 650; letter-spacing: .04em; color: var(--text-3); }
.rate-n { width: 38px; text-align: right; font-size: 12px; color: var(--text-2); }

/* ---------- 结果录入 ---------- */
.editor {
  padding: 13px 18px 15px; background: var(--panel-2);
  border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px;
}
.ed-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ed-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px;
  min-height: 56px; padding: 9px 14px; text-align: left;
  border: 1px solid var(--line-2); border-radius: 9px; background: var(--panel);
  transition: border-color var(--dur-1), background var(--dur-1), box-shadow var(--dur-1);
}
.pick:hover { border-color: var(--line-3); background: var(--panel-3); }
.pick.is-on {
  border-color: color-mix(in srgb, var(--win) 52%, transparent);
  background: color-mix(in srgb, var(--win) 7%, var(--panel));
  box-shadow: inset 3px 0 0 var(--win);
}
.pick-name { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }
.pick-act { font-size: 10.5px; color: var(--text-3); }
.pick.is-on .pick-act { color: var(--win); font-weight: 700; }

.ed-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ed-magic { display: flex; gap: 12px; }
.ed-field { display: flex; flex-direction: column; gap: 5px; width: 126px; }
.ed-field .field { height: 32px; font-size: 12.5px; }
.ed-btns { display: flex; gap: 8px; margin-left: auto; }
.ed-hint { font-size: 11px; color: var(--text-3); }
.ed-cell { padding: 0 !important; background: var(--panel-2); }
.tbl td.ed-cell { height: auto; }

/* ---------- 成员 ---------- */
.mtr.is-open td { background: var(--panel-2); }
.mtr.is-dragging { opacity: .45; }
.mtr[draggable="true"] { cursor: grab; }
.slot-n { display: inline-block; margin-left: 2px; }
.tbl td.is-detail { height: auto; padding: 0; }

.mdetail { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 22px; padding: 16px 18px; }
.mdetail-l { display: flex; flex-direction: column; gap: 12px; }
.mdetail-r { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mfield { display: flex; flex-direction: column; gap: 5px; }
.mfield .field { height: 32px; font-size: 12.5px; }
.mfield .row .field { flex: 1; min-width: 0; }

.pets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.pet {
  display: flex; align-items: center; gap: 5px; min-width: 0;
  height: 28px; padding: 0 7px; border-radius: 6px;
  background: var(--panel); border: 1px solid var(--line); font-size: 12px;
}
.pet-i { font-size: 10px; color: var(--text-3); flex: none; }
.pet-n { flex: 1; min-width: 0; }
.pet.is-rand { border-color: color-mix(in srgb, var(--warn) 34%, transparent); background: color-mix(in srgb, var(--warn) 6%, var(--panel)); }
.pet-badge {
  flex: none; font-size: 9.5px; font-weight: 700; color: var(--warn);
  border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent);
  border-radius: 999px; padding: 0 5px; line-height: 15px;
}

.gb { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.gb-box { display: flex; flex-direction: column; gap: 5px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.gb-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-bottom: 2px; }
.gb-slot {
  display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 8px;
  border: 1px dashed var(--line-2); border-radius: 6px;
  font-size: 12px; color: var(--text-3); transition: border-color var(--dur-1), background var(--dur-1);
}
.gb-slot.is-filled { border-style: solid; background: var(--panel); color: var(--text); font-weight: 600; }
.gb-slot.is-filled[draggable="true"] { cursor: grab; }
.gb-slot.is-over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.gb-slot-i { font-size: 10px; color: var(--text-3); flex: none; }
.gb-slot-n { min-width: 0; }

/* ---------- 阶段 ---------- */
.phase-head {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) 168px auto;
  gap: 18px; align-items: center; padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}
.phase-idx { font-size: 11.5px; font-weight: 700; color: var(--text-3); align-self: start; padding-top: 4px; }
.phase-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.phase-name { font-size: 15.5px; font-weight: 750; letter-spacing: -.012em; }
.phase-desc { font-size: 12px; color: var(--text-3); }
.phase-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 1px; }
.phase-prog { display: flex; flex-direction: column; gap: 6px; }
.phase-prog-n { display: flex; align-items: baseline; gap: 2px; }
.phase-big { font-size: 20px; font-weight: 700; letter-spacing: -.03em; }
.phase-acts { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.draw-act { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.draw-gate { font-size: 10.5px; color: var(--text-3); max-width: 260px; text-align: right; line-height: 1.4; }

.sub-block { border-top: 1px solid var(--line); }
.sub-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 18px; background: var(--panel-2);
}
.sub-title { font-size: 12.5px; font-weight: 700; color: var(--text-2); }

.bracket-wrap { overflow-x: auto; border-bottom: 1px solid var(--line); }
.bracket {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(128px, 1fr);
  gap: 10px; padding: 14px 16px; min-width: max-content;
}
.bk-col { display: flex; flex-direction: column; gap: 8px; }
.bk-head { display: flex; align-items: center; gap: 7px; padding-bottom: 5px; border-bottom: 1px solid var(--line); }
.bk-k { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; color: var(--accent); }
.bk-body { display: flex; flex-direction: column; gap: 8px; }
.bk-card { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); overflow: hidden; }
.bk-card.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.bk-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 5px 9px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.bk-id { font-size: 10px; font-weight: 700; color: var(--text-3); letter-spacing: .04em; }
.bk-match { display: flex; flex-direction: column; gap: 3px; padding: 7px 9px; cursor: pointer; }
.bk-match:hover { background: var(--panel-2); }
.bk-line { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.bk-line.is-win { font-weight: 700; color: var(--win); }
.bk-n { flex: 1; min-width: 0; }
.bk-n.is-tbd { color: var(--tbd); }
.bk-s { font-size: 11.5px; color: var(--text-2); }
.bk-foot { display: flex; align-items: center; justify-content: space-between; padding: 4px 9px 6px; }

/* ---------- 数据 ---------- */
.data-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.snap, .season-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.snap:last-child, .season-row:last-child { border-bottom: 0; }
.snap-l, .season-name { font-size: 13px; font-weight: 650; }
.danger-zone { border-color: color-mix(in srgb, var(--lose) 22%, var(--line)); }
.danger-zone .panel-head { border-bottom-color: color-mix(in srgb, var(--lose) 16%, var(--line)); }
.danger-row { display: flex; align-items: center; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.danger-row:last-child { border-bottom: 0; }
.danger-t { font-size: 13px; font-weight: 650; }

/* ---------- 提示 / 空态 ---------- */
.notice {
  border: 1px solid var(--line); background: var(--panel-2);
  border-radius: 8px; padding: 9px 12px; font-size: 12px; color: var(--text-2); line-height: 1.6;
}
.notice.is-warn {
  border-color: color-mix(in srgb, var(--warn) 30%, transparent);
  background: color-mix(in srgb, var(--warn) 7%, transparent); color: var(--warn);
}
.notice b { font-weight: 700; }
.empty-t { font-size: 13.5px; font-weight: 650; color: var(--text-2); }

/* 一行式提示条（无今日赛程时替代大空态） */
.notice-line {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 18px; font-size: 12.5px; color: var(--text-2);
  background: var(--panel-2); border-bottom: 1px solid var(--line);
}
.notice-line svg { flex: none; color: var(--text-3); }

/* ---------- 抽签结果 ---------- */
.draw-kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.draw-kpi-c { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.draw-v { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.draw-v.is-bad { color: var(--lose); }
.draw-pairs { display: flex; flex-direction: column; max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.draw-pair { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.draw-pair:last-child { border-bottom: 0; }
.draw-pair .grow { text-align: left; }

/* ---------- 响应式 ---------- */
@media (max-width: 1240px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr) 280px; }
  .gb { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .rail { width: 68px; }
  .rail-brand { padding: 18px 0 14px; align-items: center; }
  .rail-brand b { display: none; }
  .rail-brand span { font-size: 9px; letter-spacing: .06em; }
  .rail-nav { padding: 8px; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item .nav-label, .nav-count { display: none; }
  .nav-item.is-on::before { left: -8px; }
  .rail-foot { display: none; }
  .desk-main { margin-left: 68px; }
  .dash-grid, .rank-grid, .data-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .content { padding: 18px; }
  .topbar-in { padding: 0 18px; }
  .kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phase-head { grid-template-columns: 20px minmax(0, 1fr); }
  .phase-prog, .phase-acts { grid-column: 2; align-items: flex-start; }
  .mdetail { grid-template-columns: minmax(0, 1fr); }
  .ed-picks { grid-template-columns: 1fr; }
}

/* 今日页「接下来要做」动作条 */
.qa-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.qa-btn {
  display: flex; align-items: center; gap: 11px; text-align: left;
  padding: 13px 15px; border-radius: 9px;
  border: 1px solid var(--line-2); background: var(--panel);
  color: var(--text); transition: border-color var(--dur-1), background var(--dur-1);
}
.qa-btn:hover { border-color: var(--accent); }
.qa-btn svg { flex: none; color: var(--accent); }
.qa-btn .qa-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qa-btn b { font-size: 13px; font-weight: 650; letter-spacing: -.01em; }
.qa-btn em { font-style: normal; font-size: 11px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qa-btn.is-primary { background: var(--grad-accent); border-color: transparent; color: #fff; }
.qa-btn.is-primary svg { color: #fff; }
.qa-btn.is-primary em { color: rgba(255,255,255,.7); }
@media (max-width: 980px) { .qa-bar { grid-template-columns: 1fr; } }

/* 安排比赛时间：实时预览 */
.sched-preview {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px;
  background: var(--panel-2); max-height: 210px; overflow-y: auto;
}
.sched-preview .sp-head { font-size: 11px; color: var(--text-3); letter-spacing: .06em; padding: 2px 0 6px; }
.sched-preview .sp-row {
  display: flex; align-items: baseline; gap: 12px; padding: 4px 0;
  border-top: 1px dashed var(--line);
}
.sched-preview .sp-row b { font-family: var(--font-num); font-size: 12px; color: var(--text); min-width: 46px; }
.sched-preview .sp-row span { font-size: 12px; color: var(--text-2); }

/* 主办工作台增强。层级沿用共享 tokens；弹窗操作与数据反馈保持可见。 */
.desk { min-height: 100dvh; }
.rail { background: var(--panel); }
.rail-brand { padding: 28px 22px 22px; }
.rail-brand b { font-size: 20px; line-height: 1.45; }
.rail-brand span { font-size: 12px; letter-spacing: .04em; color: var(--text-2); }
.rail-nav { gap: 5px; }
.nav-item { min-height: 46px; font-size: 14px; }
.nav-item.is-on { background: var(--accent); color: var(--accent-ink); }
.nav-item.is-on .nav-count { background: rgb(252 253 255 / .16); color: var(--accent-ink); }
.nav-item.is-on::before { display: none; }
.content { padding-top: 30px; padding-bottom: 48px; }
.page-title { font-size: 26px; line-height: 1.4; }
.page-sub { font-size: 14px; color: var(--text-2); line-height: 1.7; }
.page-head { align-items: center; gap: 16px; margin-bottom: 22px; }
.panel, .kpi-cell { border-radius: 16px; }
.panel-head { padding: 16px 20px; }
.panel-body { padding: 20px; }
.sec-title { font-size: 16px; }
.kpi-cell { padding: 18px 20px; }
.kpi-num { font-size: 33px; margin: 5px 0; }
.kpi-sub, .qa-btn em, .mrow-sub, .ed-hint { font-size: 12px; color: var(--text-2); }
.t-eyebrow { letter-spacing: .015em; }
.qa-btn { min-height: 76px; border-radius: 12px; }
.qa-btn b { font-size: 15px; }
.qa-btn.is-primary em { color: var(--accent-ink); opacity: .88; }
.mrow { min-height: 65px; }
.vs-name { font-size: 15px; }
.mrow-time { font-size: 14px; }
.btn { min-height: 40px; white-space: nowrap; }
.btn-sm { min-height: 36px; }
.field { min-height: 42px; font-size: 14px; }
.field::placeholder { color: var(--text-3); opacity: 1; }
.field:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.field-row > .t-eyebrow, .ed-field > .t-eyebrow { font-size: 13px; font-weight: 650; color: var(--text); }
.field-row { gap: 8px; min-width: 0; }
.grid-2 { gap: 16px; }
.schedule-search { flex: 1; min-width: 190px !important; }
.toolbar .field { min-height: 40px; }
.person-picker { display: grid; gap: 8px; min-width: 0; }
.person-picker select { width: 100%; }
.schedule-pick-list { display: grid; gap: 8px; max-height: 400px; overflow: auto; }
.schedule-pick { display: flex; gap: 12px; align-items: center; text-align: left; width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.schedule-pick:hover { background: var(--panel-2); border-color: var(--accent); }
.schedule-pick .grow { display: grid; gap: 6px; min-width: 0; }
.schedule-pick b { font-size: 15px; overflow-wrap: anywhere; }
.chip-live { background: #fae9ed; color: #97313f; border: 1px solid #e9bdc6; }
.chip-postponed { background: #fff0d6; color: #77500f; border: 1px solid #e5cfaa; }
.form-error { color: #9c2436; font-size: 14px; padding: 10px 12px; background: #fff0f1; border: 1px solid #edbdc6; border-radius: 8px; line-height: 1.6; overflow-wrap: anywhere; }
.form-error[hidden] { display: none; }
.editor { padding: 20px; gap: 18px; }
.ed-head { flex-wrap: wrap; }
.ed-picks { grid-template-columns: repeat(2,minmax(0,1fr)); }
.pick { min-height: 80px; }
.pick-act { line-height: 1.6; color: var(--text-2); font-size: 12px; }
.result-fields { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.lineup-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.lineup-title b { font-size: 16px; }
.lineup-title p { margin-top: 6px; line-height: 1.7; }
.game-editor-list { display: grid; gap: 10px; }
.game-detail { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.game-detail summary { cursor: pointer; font-size: 14px; font-weight: 700; padding: 4px 0; }
.game-detail[open] > summary { margin-bottom: 16px; }
.lineup-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0 6px; }
.lineup-side > b { display: block; margin-bottom: 10px; }
.lineup-six { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lineup-six .field { width: 100%; min-width: 0; font-size: 12px; padding: 8px; }
.ed-btns { margin-left: 0; justify-content: flex-end; flex-wrap: wrap; }
.pool-text { width: 100%; resize: vertical; min-height: 210px; line-height: 1.8; }
.pool-usage { font-size: 13px; color: var(--text-2); line-height: 1.8; overflow-wrap: anywhere; }
.round-settings { display: grid; gap: 18px; }
.round-config { padding: 18px; border: 1px solid var(--line); border-radius: 12px; }
.round-config h3 { margin: 0 0 16px; font-size: 16px; }
.draw-act { gap: 8px; flex-wrap: wrap; }
.phase-desc { max-width: 62ch; }
.sc-modal { width: min(780px,calc(100vw - 36px)); max-width: 780px; max-height: min(90dvh,1000px); display: flex; flex-direction: column; border-radius: 18px; }
.sc-modal-head, .sc-modal-foot { flex: none; }
.sc-modal-body { overflow-y: auto; overscroll-behavior: contain; }
.sc-modal-title { font-size: 18px; line-height: 1.5; }
.sc-modal-mask { z-index: var(--z-modal); }
.admin-auth { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg,#edf6fd,#e0edf9); overflow: auto; }
.auth-card { width: min(440px,100%); padding: 36px; border: 1px solid var(--line-2); border-radius: 24px; background: var(--panel); box-shadow: var(--shadow-3); }
.auth-mark { font-size: 14px; font-weight: 750; color: var(--accent); }
.auth-card h1 { font-size: 30px; margin: 12px 0; }
.auth-card p { font-size: 14px; line-height: 1.8; }
.auth-form { display: grid; gap: 18px; margin: 26px 0 12px; }
.auth-form > .btn { width: 100%; }
.auth-card > a { width: 100%; margin-top: 10px; }
@media (prefers-reduced-motion: no-preference) {

  .sc-modal { animation: desk-in 220ms var(--ease-out) both; }
  .pick, .schedule-pick, .nav-item { transition: background 160ms ease,border-color 160ms ease,transform 160ms ease; }
  .btn:active, .pick:active, .schedule-pick:active { transform: scale(.98); }
  @keyframes desk-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
}
@media (max-width: 1080px) and (min-width: 681px) {
  .nav-item { flex-direction: column; height: auto; padding: 10px 0; gap: 4px; }
  .nav-item .nav-label { display: inline; font-size: 10px; }
  .rail-nav { padding: 6px; }
}
@media (max-width: 680px) {
  .rail { top: auto; bottom: 0; width: 100%; height: 76px; border: 0; border-top: 1px solid var(--line-2); padding-bottom: env(safe-area-inset-bottom); }
  .rail-brand, .rail-foot { display: none; }
  .rail-nav { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); padding: 5px 4px; gap: 1px; }
  .nav-item { flex-direction: column; gap: 5px; padding: 8px 1px; height: 60px; border-radius: 9px; }
  .nav-item .nav-label { display: inline; font-size: 10px; white-space: nowrap; }
  .nav-count { display: none; }
  .desk-main { margin-left: 0; }
  .topbar-in { min-height: 62px; height: auto; padding: 10px 14px; gap: 8px; flex-wrap: wrap; }
  .tb-left { max-width: 100%; gap: 6px; }
  .tb-name { font-size: 14px; max-width: 175px; overflow: hidden; text-overflow: ellipsis; }
  .tb-left .chip { display: none; }
  .tb-right { margin-left: auto; gap: 7px; }
  .tb-save { font-size: 11px; }
  .tb-right .btn { min-height: 34px; padding: 0 7px; font-size: 11px; }
  .content { padding: 22px 14px 110px; }
  .page-head { align-items: flex-start; flex-direction: column; margin-bottom: 18px; }
  .page-title { font-size: 24px; }
  .page-sub { font-size: 13px; }
  .page-head > .row { width: 100%; flex-wrap: wrap; }
  .panel-head { padding: 14px; gap: 8px; flex-wrap: wrap; }
  .panel-head > .row { gap: 6px; flex-wrap: wrap; }
  .panel-body { padding: 16px 14px; }
  .kpi { gap: 10px; }
  .kpi-cell { padding: 14px; }
  .kpi-num { font-size: 27px; }
  .mrow, .mrow.no-tag { grid-template-columns: 46px minmax(0,1fr) 66px; padding: 14px 12px; gap: 10px; }
  .mrow-tag { display: none; }
  .mrow-time { font-size: 12px; align-self: start; padding-top: 5px; }
  .mrow-main { grid-column: 2; grid-row: 1; }
  .mrow-state { grid-column: 2; grid-row: 2; }
  .mrow-act { grid-column: 3; grid-row: 1 / span 2; }
  .vs { flex-wrap: wrap; gap: 4px 6px; }
  .vs-name { font-size: 14px; max-width: none; white-space: normal; overflow-wrap: anywhere; }
  .mrow-sub { margin-top: 5px; }
  .vs-score { margin-left: 0; }
  .tbl-wrap { overflow-x: auto; }
  .tbl { min-width: 650px; }
  .toolbar .field, .schedule-search { width: 100%; flex: 1 1 100%; }
  .toolbar .seg { width: 100%; }
  .seg-btn { flex: 1; min-height: 36px; }
  .gb { grid-template-columns: 1fr 1fr; gap: 10px; }
  .grid-2, .lineup-sides { grid-template-columns: minmax(0,1fr); }
  .result-fields { grid-template-columns: 1fr 1fr; }
  .editor { padding: 16px 12px; }
  .ed-picks { gap: 8px; }
  .pick { padding: 12px; }
  .pick-name { font-size: 15px; overflow-wrap: anywhere; }
  .lineup-title { align-items: flex-start; }
  .lineup-title .btn { flex: none; }
  .ed-btns { justify-content: stretch; display: grid; grid-template-columns: 1fr 1fr; }
  .ed-btns .btn-primary { grid-column: 1 / -1; }
  .sc-modal { width: calc(100vw - 20px); max-height: calc(100dvh - 24px); }
  .sc-modal-mask { padding: 10px; }
  .sc-modal-head, .sc-modal-body, .sc-modal-foot { padding: 16px; }
  .sc-modal-foot { gap: 8px; flex-wrap: wrap; }
  .sc-modal-foot .btn { flex: 1; }
  .schedule-pick { gap: 8px; padding: 12px; }
  .schedule-pick .chip { font-size: 10px; flex: none; }
  .auth-card { padding: 28px 22px; }
  .phase-head { grid-template-columns: minmax(0,1fr); }
  .phase-head > * { grid-column: 1 !important; }
  .phase-idx { display: none; }
  .phase-acts { flex-wrap: wrap; }
}


/* 文字角色。复用共享字体；中文自然重排，数字按等宽字面排列。 */
.desk, .admin-auth, .sc-modal {
  font-family: var(--font-sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
.page-title, .phase-name, .sec-title, .auth-card h1, .rail-brand b {
  font-family: var(--font-display);
}
.page-head-l { gap: 7px; }
.page-title {
  font-size: clamp(26px, 1.35rem + .7vw, 32px);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -.012em;
}
.page-sub {
  max-inline-size: 66ch;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-2);
}
.page-sub, .phase-desc, .notice, .form-error, .auth-card p {
  line-break: strict;
  word-break: normal;
  overflow-wrap: break-word;
}
.rail-brand b { font-weight: 700; line-height: 1.45; letter-spacing: -.008em; }
.rail-brand span { line-height: 1.6; letter-spacing: .02em; }
.tb-name { font-family: var(--font-display); font-weight: 600; line-height: 1.45; letter-spacing: normal; }
.sec-title, .phase-name { font-size: 17px; line-height: 1.45; font-weight: 700; letter-spacing: normal; }
.phase-desc { font-size: 14px; line-height: 1.8; margin-top: 5px; }
.phase-meta { line-height: 1.7; }
.page-sub .t-num, .kpi-num, .phase-big, .tbl .t-num, .vs-score, .bk-s, .draw-v, .mrow-time {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -.02em;
}
.kpi-num { font-size: 34px; font-weight: 600; line-height: 1.2; }
.kpi-num i { font-size: 14px; letter-spacing: normal; }
.kpi-cell > .t-eyebrow, .field-row > .t-eyebrow, .mfield > .t-eyebrow, .mfield > span {
  font-size: 13px; line-height: 1.55; font-weight: 600; letter-spacing: normal;
}
.kpi-sub, .mrow-sub, .qa-btn em, .ed-hint { font-size: 13px; line-height: 1.65; }
.qa-btn b { font-family: var(--font-display); font-size: 15px; line-height: 1.5; font-weight: 600; }
.qa-btn em { white-space: normal; overflow: visible; text-overflow: clip; }
.qa-btn .qa-t { gap: 4px; }
.vs-name, .pick-name { line-height: 1.5; font-weight: 600; letter-spacing: normal; }
.pick-act { font-size: 13px; line-height: 1.65; }
.tbl th {
  height: auto; min-height: 40px; padding-block: 11px;
  font-size: 12px; line-height: 1.5; font-weight: 600;
  letter-spacing: normal; text-transform: none; color: var(--text-2);
}
.tbl td { padding-block: 10px; font-size: 14px; line-height: 1.6; }
.tbl .nm { font-size: 14px; line-height: 1.6; }
.tbl .score-cell { font-weight: 600; letter-spacing: .01em; }
.chip, .gtag { font-weight: 600; }
.notice, .notice-line, .draw-gate { line-height: 1.75; }
.sc-modal-title { font-family: var(--font-display); font-size: 20px; line-height: 1.45; font-weight: 700; letter-spacing: -.01em; }
.sc-modal-body .t-sm, .sc-modal-body .t-xs { line-height: 1.75; }
.game-detail > p { margin-block: 12px 16px; line-height: 1.8; }
.game-detail > summary { font-size: 14px; line-height: 1.6; font-weight: 600; }
.auth-mark { display: block; font-size: 15px; line-height: 1.6; font-weight: 600; }
.auth-card h1 { margin: 14px 0 12px; font-size: 34px; line-height: 1.25; font-weight: 700; letter-spacing: -.015em; }
.auth-card p { font-size: 15px; line-height: 1.8; }
.auth-form .field { font-size: 16px; line-height: 1.5; }
@supports (text-wrap: balance) {
  .page-title, .auth-card h1 { text-wrap: balance; }
}
@supports (text-wrap: pretty) {
  .page-sub, .auth-card p { text-wrap: pretty; }
}
.admin-no-motion .sc-modal,
.admin-no-motion .pick,
.admin-no-motion .schedule-pick,
.admin-no-motion .nav-item,
.admin-no-motion .btn { animation: none !important; transition: none !important; }
@media (max-width: 680px) {
  .page-title { font-size: 26px; line-height: 1.4; }
  .page-sub { font-size: 14px; line-height: 1.8; }
  .kpi-num { font-size: 29px; }
  .auth-card h1 { font-size: 30px; line-height: 1.3; }
  .tbl td { font-size: 14px; }
  .sc-modal-title { font-size: 18px; }
}
.admin-no-motion .btn:active,
.admin-no-motion .pick:active,
.admin-no-motion .schedule-pick:active { transform: none; }

/* 排程表保留完整对阵列；窄屏只在表格区域内横向滚动。 */
.schedule-table, .tbl-wrap-schedule { min-width: 0; width: 100%; max-width: 100%; }
.tbl-wrap-schedule { overflow: auto; overscroll-behavior: contain; }
.tbl-wrap-schedule:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tbl-schedule { min-width: 920px; }
.tbl-schedule th:nth-child(4), .tbl-schedule td:nth-child(4) { min-width: 240px; }
.tbl-schedule .vs-cell .vs-name { flex: 0 0 auto; white-space: nowrap; overflow-wrap: normal; }
.schedule-scroll-hint { display: none; }
@media (max-width: 680px) {
  .schedule-scroll-hint {
    display: block; margin: 0; padding: 12px 16px;
    color: var(--text-2); background: var(--panel-2); border-bottom: 1px solid var(--line);
    font-size: 13px; line-height: 1.6;
  }
}
