/* 车队指挥台 · 纸感终端
   参考：用户确认的 04-selected-combination.png，第二稿主体与指定导航。
   保持现有模块与24列/12行/GAP7契约，仅统一视觉与操作反馈。 */
:root {
  color-scheme: dark;
  --bg: oklch(.243 .002 90);
  --bg1: oklch(.243 .002 90);
  --bg2: oklch(.268 .002 90);
  --bg3: oklch(.305 .003 90);
  --line: oklch(.42 .002 90);
  --line2: oklch(.56 .003 90);
  --ink: oklch(.94 .003 90);
  --mut: oklch(.79 .003 90);
  --dim: oklch(.67 .004 90);
  --cyan: oklch(.82 .09 205);
  --green: oklch(.79 .126 154);
  --amber: oklch(.82 .135 82);
  --red: oklch(.73 .165 25);
  --orange: var(--amber);
  --yellow: oklch(.87 .13 99);
  --violet: oklch(.78 .11 295);
  --rival: oklch(.73 .025 240);
  --sans: -apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,"PingFang SC","Microsoft YaHei",sans-serif;
  --mono: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --r: 0px;
  --frame: oklch(.67 .003 90);
  --rule: oklch(.385 .002 90);
  --gap: 7px; /* 与 WM 的网格数学一致 */
}
html,body { font-family:var(--sans); }
body.desk,body.mob { background:var(--bg); }
body.desk { height:100dvh; padding:10px; gap:8px; }
button,input,select { font:inherit; }
button { -webkit-tap-highlight-color:transparent; }
button,[role=button],select,input,a { touch-action:manipulation; }
button:disabled,[aria-disabled=true] { cursor:default; }
:focus-visible { outline:2px solid var(--cyan); outline-offset:3px; }
input:focus-visible,select:focus-visible { outline-offset:1px; }
::selection { background:color-mix(in srgb,var(--cyan) 30%,transparent); }
.sr-only { position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* 指挥席壳。时间、旗语始终在同一条视线，不额外占一行。 */
#topbar { min-height:68px; padding:10px 14px; gap:14px; background:var(--bg1); border-color:var(--line); }
.tb-l { flex:0 1 325px; gap:10px; }
.brand-mark { display:block; flex:none; width:40px; height:46px; object-fit:contain; border:0; padding:0; }
.brand-lockup { display:flex; min-width:0; flex-direction:column; gap:5px; }
.brand-lockup strong { font-size:15px; font-weight:700; letter-spacing:.04em; line-height:1.1; white-space:nowrap; }
.rname { display:block; max-width:205px; font-size:11px; line-height:1.25; color:var(--dim); }
#livetag { margin-left:auto; padding:4px 6px; border:1px solid var(--line); border-radius:0; font-family:var(--sans); font-size:10px; letter-spacing:0; color:var(--cyan); white-space:nowrap; }
.dot::after { animation:none; opacity:0; }
.tb-sp { height:30px; background:var(--line); }
#clockbar { gap:16px; }
#clockbar .big { font-size:26px; font-weight:700; letter-spacing:-.025em; }
.clk-lab { font-size:10px; letter-spacing:.03em; color:var(--dim); }
.flag { font-size:10px; letter-spacing:0; padding:4px 7px; border-radius:0; font-family:var(--sans); }
.clk-r .el { margin-top:5px; font-size:10px; }
#flags { min-height:44px; border-color:transparent; border-radius:0; background:var(--bg2); padding:8px; gap:5px; }
#flags.fg-yellow,#flags.fg-red,#flags.fg-safety { background:var(--bg2); }
#flags.fg-yellow::after { display:none; }
.fg-main { font-size:12px; letter-spacing:0; }
.fhist { min-height:28px; display:flex; align-items:center; font-size:11px; }
.tb-r { gap:7px; }
.iconbtn,.lbtn { min-height:36px; border-radius:0; background:var(--bg2); border-color:var(--line2); color:var(--mut); font-size:12px; font-weight:600; transition:background .18s,border-color .18s,color .18s; }
.iconbtn { height:44px; padding:0 12px; }
.iconbtn:hover,.lbtn:hover { background:var(--bg3); color:var(--ink); }
.iconbtn:active,.lbtn:active { background:color-mix(in srgb,var(--cyan) 12%,var(--bg2)); }
.iconbtn.on { background:color-mix(in srgb,var(--cyan) 13%,var(--bg1)); }
#gear { border-color:var(--line2); color:var(--ink); }
#synctag { min-height:44px; padding:0 9px; background:transparent; font-family:var(--sans); font-size:11px; border:1px solid var(--line); border-radius:0; }
#synctag.busy .sd::after { animation:none; }
.badge { font-family:var(--sans); font-size:10px; line-height:1.4; padding:4px 7px; border:1px solid var(--line); letter-spacing:0; }
.badge.cache { background:var(--bg2); color:var(--mut); }
.badge[data-mode=invalid],.badge[data-mode=upstream_error] { color:var(--red); border-color:color-mix(in srgb,var(--red) 45%,var(--line)); }
.badge[data-mode=degraded],.badge[data-mode=stale] { color:var(--amber); }
#fbadge { max-width:160px; text-align:center; }
.xbadge { min-height:36px; font-family:var(--sans); }
.xbadge.fresh { animation:none; }

/* 三个视角与赛事登记。单屏布局不改网格行数。 */
#pagebar { gap:10px; overflow:visible; min-height:48px; }
.pgtabs { padding:2px; gap:2px; border-color:var(--line); border-radius:0; background:var(--bg1); }
.pgtab { min-height:44px; padding:0 15px; border-radius:0; background:transparent; font:600 13px var(--sans); gap:7px; line-height:1; }
.pgtab.on { background:var(--bg3); border-color:var(--line2); color:var(--ink); }
.pgtab .pgn,.pgtab.on .pgn { background:transparent; color:var(--mut); font-size:10px; padding:0; }
.pgtab .pgw { font-size:10px; }
.pgtab [hidden] { display:none; }
.season-tools { display:flex; flex:none; align-items:center; gap:5px; }
.session-select { min-height:44px; width:135px; max-width:170px; padding:0 26px 0 10px; border:1px solid var(--line); border-radius:0; background:var(--bg1); color:var(--mut); font-size:11px; cursor:pointer; text-overflow:ellipsis; }
#season-edit { padding:0 9px; font-size:11px; background:transparent; border-color:transparent; }
#station-info { display:none; }
#pgtools { gap:5px; }
#pgtools .iconbtn { padding:0 10px; font-size:11px; }
#resetbtn { background:transparent; border-color:transparent; }
#watchwrap { min-width:80px; }
.watchbar { width:100%; min-height:44px; padding:6px 9px; border-color:var(--line); background:transparent; border-radius:0; gap:5px; }
.watchbar .wk { font-size:10px; letter-spacing:0; }
.watchbar .wbtn { display:none; }
.wchip { border-radius:0; padding:3px 6px; font-family:var(--sans); font-size:10px; }
#editnote { bottom:45px; padding:10px 15px; border-radius:0; background:var(--bg2); box-shadow:none; }

/* 模块边界明确，标题不再用字距装饰中文。 */
.mod { border-radius:0; background:var(--bg1); }
.mod.acc { border-left:1px solid var(--line); border-color:color-mix(in srgb,var(--accent) 45%,var(--line)); }
.mod-hd { min-height:37px; gap:7px; padding:7px 10px; background:var(--bg2); }
.mod-hd h3 { font-size:12px; color:var(--mut); letter-spacing:0; text-transform:none; line-height:1.3; }
.mod-hd .r { font-size:10px; color:var(--dim); }
.mod-tabs { border-color:var(--line); background:var(--bg1); }
.mod-tabs button { min-height:27px; padding:2px 7px; font-size:10px; }
.mod-sub { background:var(--bg1); font-size:10px; line-height:1.5; }
.mod-body.pad { padding:11px; }
.mod-grip { border:0; background:transparent; font-family:var(--sans); padding:0; }
.mod-x { width:30px; height:30px; line-height:28px; font-size:14px; }
.mod-step { display:none; align-items:center; gap:2px; margin-left:auto; }
.mod-step button { width:36px; height:36px; border:1px solid var(--line2); border-radius:0; background:var(--bg1); color:var(--mut); font-size:13px; }
body.editing .mod-grip { min-width:28px; min-height:30px; touch-action:none; }
body.editing .mod-hd { padding-top:3px; padding-bottom:3px; }
body.editing .mod-hd h3 { min-width:0; overflow:hidden; text-overflow:ellipsis; }
body.editing .mod-hd .r { display:none; }
body.editing .mod-step { display:flex; }
body.editing .mod-rz { width:28px; height:28px; touch-action:none; }

/* 密集信息由行分隔，身份由车号及细线编码。 */
.trow.me,.trow.rv,.frow.mine,.frow.rv,.pitq.mine,.drow.live,.prow.pmine,.prow.prv { box-shadow:none; }
.trow.me,.frow.mine,.drow.live,.prow.pmine { background:color-mix(in srgb,var(--accent) 9%,var(--bg1)); }
.trow.rv { background:color-mix(in srgb,var(--rival) 5%,var(--bg1)); }
.trow.pit,.frow.live,.pitq.live,.prow.pitrow.live { background:color-mix(in srgb,var(--orange) 10%,var(--bg1)); }
.trow.h { font-size:9px; letter-spacing:0; color:var(--dim); }
.trow>div { padding-top:5px; padding-bottom:5px; }
.trow.h>div { padding-top:7px; padding-bottom:7px; }
.c-last { font-weight:500; color:var(--mut); }
.c-team { font-size:11.5px; }
.c-drv { color:var(--ink); font-size:11px; }
.c-no { border-radius:0; }
.c-on.hot::before { content:'停 '; font-family:var(--sans); font-size:9px; }
.c-total { color:var(--yellow); }
.trow.me .c-no,.frow.mine .fno { background:var(--accent); color:var(--bg); }
.trow.rv .c-no { border:1px solid var(--rival); }
.frow.h,.pitq.h,.drow.h,.psec { font-size:10px; letter-spacing:0; text-transform:none; }
.frow .ft,.prow .pt { color:var(--mut); }
.frow .fnm { color:var(--ink); }
.rrow { border-left:1px solid var(--line); }
.rrow.live { border-left-color:var(--line); background:color-mix(in srgb,var(--orange) 9%,var(--bg1)); }
.prow { padding:10px; }
.prow .l2 { font-size:12px; line-height:1.6; }
.prow .pdetail { font-size:11px; }
.prow .ptype { border-radius:0; }
.prow.pflag { padding:8px 10px; }
.xblk,.xblk.bad,.xblk.jit { border:1px solid var(--line2); border-radius:0; }
.xblk.bad { background:color-mix(in srgb,var(--red) 7%,var(--bg1)); }

/* 控制台同一形态：车手与本棒信息为主，保留原始数据口径。 */
.pcon.off { opacity:1; }
.pcon.off .pc-pos { color:var(--dim); }
.pc-name { font-size:14px; }
.pc-drv b { font-size:17px; font-weight:650; }
.pc-pos { font-size:24px; font-weight:700; }
.pc-no { border-radius:0; }
.pc-hd { padding-top:12px; }
.pr-hero .pk { font-size:11px; letter-spacing:0; }
.pr-hero .pv { font-weight:700; }
.pr-rel .pv { font-weight:700; }
.pk { color:var(--mut); }
.pc-last { color:var(--dim); }
.pcon.inpit { background:color-mix(in srgb,var(--orange) 7%,var(--bg1)); }
.pcon.pitok { background:color-mix(in srgb,var(--green) 6%,var(--bg1)); }
.pc-spark { opacity:1; }
.pc-sk { font-size:11px; }
.pc-sum { font-size:11px; }
.pc-foot { font-size:11px; }
.drow .dn { font-size:13px; }
.drow.h .dhn { color:var(--ink); }
.drow .dlive { background:color-mix(in srgb,var(--accent) 14%,var(--bg1)); }
.dwrap.fill .drow:not(.h) { flex:0 0 auto; max-height:none; }
@container (max-width:560px) {
  .drow { padding:10px; row-gap:8px; }
  .drow .dnums { grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px 9px; }
  .drow .dnums>div { display:block; min-width:0; font-size:12px; overflow:visible; text-overflow:clip; line-height:1.4; }
  .drow .dnums>div::before { display:block; margin:0 0 3px; font-size:9px; color:var(--dim); line-height:1.3; }
  .drow.h { padding:9px 10px; }
  .drow.h .dcov { display:block; margin:3px 0 0; font-size:9px; }
}
@container (max-width:300px) {
  .drow .dnums { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* 明确空窗、缺失、推算与历史。用文字建立信任，不用装饰制造活跃。 */
.empty { padding:22px 14px; font-size:12px; color:var(--mut); line-height:1.75; }
.empty b { color:var(--ink); }
.race-empty { display:flex; min-height:100%; flex-direction:column; align-items:center; justify-content:center; gap:10px; padding:24px 18px; text-align:center; color:var(--mut); }
.empty-title,.race-empty h3 { color:var(--ink); font-size:15px; font-weight:650; line-height:1.4; }
.empty-detail,.race-empty p { max-width:56ch; color:var(--dim); font-size:12px; line-height:1.75; }
.race-empty .empty-symbol { display:flex; align-items:center; justify-content:center; width:44px; height:44px; border:1px solid var(--line2); border-radius:0; font-family:var(--mono); color:var(--dim); }
.track-note { flex:none; padding:9px 11px; color:var(--mut); background:var(--bg2); border-top:1px solid var(--line); font-size:10px; line-height:1.5; }
.track-empty { position:absolute; inset:0; place-items:center; padding:24px; max-width:100%; color:var(--dim); text-align:center; font-size:12px; line-height:1.75; }
.trkwrap { position:relative; }
.source-badge { display:inline-flex; align-items:center; border:1px solid var(--line2); border-radius:0; color:var(--mut); padding:2px 5px; font-size:10px; }
.hint { font-size:11px; line-height:1.65; }
.err { border-color:color-mix(in srgb,var(--red) 45%,var(--line)); background:color-mix(in srgb,var(--red) 7%,var(--bg1)); color:var(--red); }

/* 添加模块是可检索的工具库，所有项都是标准按钮。 */
#addpanel { width:370px; top:139px; max-height:calc(100dvh - 155px); background:var(--bg1); box-shadow:none; border-radius:0; }
.ap-hd { min-height:55px; padding:6px 12px; font-size:14px; background:var(--bg2); }
.ap-hd .lbtn { min-height:36px; font-size:11px; }
.ap-search { padding:10px; }
.ap-search input { width:100%; min-height:44px; padding:0 12px; border:1px solid var(--line2); border-radius:0; background:var(--bg); color:var(--ink); font-size:12px; }
.ap-search input::placeholder { color:var(--dim); }
.ap-body { padding:0 7px 8px; }
.ap-sec { padding:13px 8px 6px; font-size:11px; color:var(--mut); letter-spacing:0; }
.ap-it { width:100%; min-height:64px; padding:10px 8px; text-align:left; background:transparent; color:var(--ink); font-family:var(--sans); }
.ap-it .t { font-size:13px; }
.ap-it .d { font-size:11px; color:var(--dim); }
.ap-it .ic { width:28px; height:28px; background:transparent; border:0; font-size:18px; }
.ap-it .add { font-size:11px; }
.ap-it.has { opacity:.6; }

/* 详情和表单使用同一套清晰控件。 */
.sh-bg { background:oklch(.1 .005 160 / .78); }
.sh-in { background:var(--bg1); border-radius:0; border-color:var(--line2); width:640px; }
.sh-hd { min-height:64px; padding:10px 14px 10px 20px; background:var(--bg2); gap:12px; }
.sh-hd h3 { font-size:15px; line-height:1.5; }
.sh-x { display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; padding:0; border:1px solid transparent; border-radius:0; background:transparent; color:var(--mut); flex:none; font-size:19px; }
.sh-x:hover { border-color:var(--line2); background:var(--bg3); color:var(--ink); }
.sh-body { padding:16px 20px 20px; }
.sh-sec { padding:22px 20px 9px; font-size:12px; font-weight:650; letter-spacing:0; color:var(--ink); text-transform:none; }
.card { padding:12px 0; border:0; border-radius:0; border-top:1px solid var(--line); background:transparent; margin-top:10px; }
.card-hd h3 { font-size:12px; letter-spacing:0; color:var(--ink); text-transform:none; }
.card-hd .rng { font-size:10px; }
.kv { padding:10px 0; }
.kv .k { color:var(--mut); }
.kvline { padding:10px 0; }
.btn { min-height:44px; display:flex; align-items:center; justify-content:center; border-radius:0; font-size:12px; background:var(--bg2); }
#cfg-save { background:color-mix(in srgb,var(--cyan) 14%,var(--bg2)); min-height:48px; }
.cfgrow { margin:8px 20px 0; gap:8px; }
.cfgin { min-height:44px; border-radius:0; padding:10px; background:var(--bg); font-size:13px; }
.cfgdel { min-width:44px; min-height:44px; display:inline-flex; align-items:center; justify-content:center; }
.netbar,.netbar.off,.netbar.ok,.netbar.pen { background:var(--bg2); border-radius:0; box-shadow:none; }
.netbar .lbtn { min-height:44px; }
#relaybar { border-radius:0; background:var(--bg2); }
#relaybar button { min-height:44px; }
#statusbar { min-height:32px; padding:6px 12px; gap:20px; background:var(--bg1); border-radius:0; font-size:10px; }
#statusbar .sb i { color:var(--dim); font-size:10px; letter-spacing:0; }
#statusbar .sb b { font-size:11px; }
#statusbar .sb-src { font-size:10px; color:var(--dim); }

/* 原生 dialog 为赛事登记提供受约束的工作区。 */
.season-editor { margin:auto; width:min(1050px,calc(100vw - 48px)); max-height:calc(100dvh - 48px); padding:0 24px 20px; color:var(--ink); background:var(--bg1); border:1px solid var(--line2); border-radius:0; overflow:auto; box-shadow:none; }
.season-editor::backdrop { background:oklch(.1 .005 160 / .8); }
.season-head { display:flex; position:sticky; top:0; align-items:center; justify-content:space-between; gap:12px; min-height:72px; margin:0 -24px 14px; padding:12px 24px; border-bottom:1px solid var(--line); background:var(--bg2); z-index:2; }
.season-head h2 { font-size:18px; font-weight:650; }
.season-head button,.season-actions button { min-height:44px; padding:0 14px; color:var(--mut); background:var(--bg2); border:1px solid var(--line2); border-radius:0; cursor:pointer; font-size:12px; }
.season-head button:hover,.season-actions button:hover { background:var(--bg3); color:var(--ink); }
.season-rounds { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin-top:22px; }
.season-rounds fieldset { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-content:start; gap:14px 12px; min-width:0; border:1px solid var(--line2); border-radius:0; padding:16px; }
.season-rounds legend { padding:0 7px; font-size:14px; color:var(--ink); font-weight:650; }
.season-rounds label { display:flex; flex-direction:column; gap:7px; min-width:0; font-size:11px; color:var(--mut); }
.season-rounds label:nth-of-type(5) { grid-column:1 / -1; }
.season-rounds input { width:100%; min-height:44px; padding:9px 10px; border:1px solid var(--line2); background:var(--bg); border-radius:0; color:var(--ink); font-size:12px; }
.season-rounds small { font-size:10px; line-height:1.5; color:var(--dim); }
.season-source { grid-column:1 / -1; padding-top:9px; border-top:1px solid var(--line); }
.season-message { grid-column:1 / -1; color:var(--amber); font-size:12px; line-height:1.5; }
.season-message:empty { display:none; }
.season-actions { grid-column:1 / -1; display:flex; gap:9px; position:sticky; bottom:-20px; padding:14px 0; background:var(--bg1); border-top:1px solid var(--line); z-index:1; }
.season-actions button[type=submit] { background:var(--cyan); border-color:var(--cyan); color:var(--bg); font-weight:650; }

/* 门禁使用同一产品表面，不加载第三方字体。 */
.gate { background:var(--bg); }
.gate-box { max-width:360px; text-align:left; padding:28px; border:1px solid var(--line2); border-radius:0; background:var(--bg1); }
.gate-t { font-size:23px; line-height:1.3; letter-spacing:0; }
.gate-s { margin:12px 0 24px; font-size:13px; }
.gate-row input { min-height:48px; border-radius:0; }
.gate-row .lbtn { min-height:48px; border-radius:0; }
.gate-e { margin-top:14px; }

@media (max-width:1600px) {
  .tb-l { flex-basis:260px; }
  .brand-mark { width:36px; height:42px; }
  .brand-lockup strong { font-size:14px; }
  .rname { max-width:160px; }
  #livetag { font-size:9px; padding:3px 5px; }
  #topbar { gap:10px; padding:8px 11px; }
  #clockbar { gap:11px; }
  #topbar .tb-r { gap:5px; }
  #topbar .iconbtn { padding:0 10px; }
  #fbadge { max-width:120px; }
  #pagebar { gap:6px; }
  .pgtab { padding:0 11px; font-size:12px; }
  #season-edit { display:inline-flex; padding:0 5px; }
  .session-select { width:125px; }
  .watchbar { padding:6px; }
}
@media (max-width:1300px) {
  .tb-l { flex-basis:230px; }
  .brand-mark { display:block; }
  .rname { max-width:150px; }
  #synctag { padding:0 6px; }
  .fchips { display:none; }
  #pgtools .iconbtn { padding:0 8px; }
}
@media (max-height:900px) {
  body.desk #topbar { min-height:62px; padding-top:6px; padding-bottom:6px; }
  body.desk .pc-hd { padding-top:9px; }
  body.desk .pc-pos { font-size:21px; }
  body.desk .pc-drv { padding-bottom:7px; }
  body.desk .pc-foot { padding-top:5px; padding-bottom:7px; }
  body.desk .pcon.tight .pc-hd { padding-top:6px; }
  body.desk .pcon.tight .pc-pos { font-size:18px; }
  body.desk .pcon.tight .pc-drv { padding-bottom:3px; }
  body.desk .pcon.tight .pc-drv b { font-size:14px; }
  body.desk .pcon.tight .pr { padding:3px 0; }
  body.desk .pcon.tight .pc-sum { padding-top:5px; }
  body.desk .pcon.tight .pc-foot { padding:4px 10px 5px; }
}
@media (max-width:700px) {
  .season-editor { width:calc(100vw - 20px); max-height:calc(100dvh - 20px); padding:0 16px 14px; }
  .season-head { margin:0 -16px 14px; padding:12px 16px; }
  .season-head h2 { font-size:16px; }
  .season-rounds { grid-template-columns:1fr; gap:16px; }
  .season-actions { flex-wrap:wrap; bottom:-14px; }
  .season-actions button { flex:1 1 auto; }
}
body.mob { background:var(--bg); }
body.mob #topbar { padding:calc(13px + env(safe-area-inset-top)) 14px 12px; gap:10px; }
body.mob .tb-l { flex:1 1 auto; }
body.mob .brand-mark { display:block; width:36px; height:42px; }
body.mob .brand-lockup strong { font-size:15px; }
body.mob .rname { max-width:190px; }
body.mob #livetag { margin-left:0; }
body.mob .tb-r { flex:1 0 100%; gap:6px; }
body.mob #fbadge { margin-left:auto; max-width:160px; }
body.mob #clockbar { padding:10px 0; border-top:1px solid var(--line); }
body.mob #clockbar .big { font-size:30px; }
body.mob #flags { min-height:44px; }
body.mob #pagebar { padding:8px 12px 10px; gap:7px; background:var(--bg); border-bottom:1px solid var(--line); }
body.mob .pgtabs { order:1; }
body.mob .pgtab { min-height:44px; padding:0 6px; font-size:12px; }
body.mob .season-tools { order:2; flex:1 1 100%; }
body.mob .session-select { width:auto; flex:1; max-width:none; }
body.mob #season-edit { display:inline-flex; min-height:44px; }
body.mob #watchwrap { order:3; padding:0; min-width:0; }
body.mob #pgtools { order:4; gap:5px; }
body.mob #pgtools .iconbtn { min-height:44px; }
body.mob .watchbar { min-height:44px; padding:7px; gap:5px; }
body.mob .watchbar .wk { font-size:9px; }
body.mob .watchbar .wchip { font-size:10px; }
body.mob #stage { padding-top:10px; }
body.mob .mod-hd { min-height:43px; }
body.mob .mod-hd h3 { font-size:13px; }
body.mob .mod-tabs button { min-height:32px; }
body.mob.editing .mod-hd { min-height:48px; gap:5px; }
body.mob.editing .mod-step button,body.mob.editing .mod-x,body.mob.editing .mod-grip { min-width:44px; min-height:44px; }
body.mob.editing .mod-tabs { display:none; }
body.mob .pcon .mod-body { min-height:250px; }
body.mob .pc-hd { padding-top:13px; }
body.mob .pc-name { font-size:15px; }
body.mob .pc-drv b { font-size:18px; }
body.mob .sh-in { border-radius:0; max-height:90dvh; }
body.mob .sh-hd { min-height:62px; }
body.mob .sh-body { padding:14px 16px 20px; }
body.mob #addpanel { width:auto; max-height:76dvh; }
body.mob .netbar { flex-wrap:wrap; justify-content:center; bottom:12px; }
body.mob #statusbar { padding:10px; gap:10px 16px; }
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
}

/* 空窗遮蔽旧值但保留模块 DOM，下一场恢复时可直接重新渲染。 */
.mod-body[hidden],.mod-sub[hidden] { display:none!important; }
.mod>.race-empty { min-height:0; flex:1; }
.ap-copy { display:block; min-width:0; }
.ap-copy .t,.ap-copy .d { display:block; }
body.editing .mod-step { display:none; }
body.mob.editing .mod-step { display:flex; }

/* 卡片明细保持完整；屏幕不足时由整页与网格共同延长。 */
body.mob .pcon.tight .mod-body { overflow-y:visible!important; }
.strow.live { background:color-mix(in srgb,var(--accent) 9%,var(--bg1)); }
body.mob #flags:empty { display:none; }

/* 手机赛道的长宽由可见盒决定，SVG 固有长图比例不能反过来撑高 flex。 */
body.mob .trkwrap { position:relative; flex:0 0 300px; width:100%; height:300px; min-height:0; max-height:300px; overflow:hidden; padding:10px; }
body.mob .trkwrap #track { position:absolute; inset:10px; width:calc(100% - 20px); height:calc(100% - 20px); max-width:none; max-height:none; }


/* ═══ 全局终端线框合同 ═══════════════════════════════════════════════
   三项important专门覆盖旧index规则和动态内联外观；不覆盖业务颜色、显隐、宽高。
   不给#stage增加padding/border，避免网格数学和拖拽落点漂移。 */
html,body,body *,body *::before,body *::after {
  border-radius:0!important;
  box-shadow:none!important;
  background-image:none!important;
  text-shadow:none!important;
}
*::-webkit-scrollbar-thumb { border-radius:0; background:var(--line2); }
.ui-icon { display:inline-block; width:14px; height:14px; flex:0 0 14px; background-color:currentColor; vertical-align:-2px; -webkit-mask:var(--icon-url) center / contain no-repeat; mask:var(--icon-url) center / contain no-repeat; }
#topbar,#statusbar,.mod,#addpanel,.sh-in,.gate-box,.season-editor,#relaybar,.netbar {
  border:1px solid var(--frame);
  background-color:var(--bg1);
}
#pagebar { padding:0 8px; border:1px solid var(--frame); background:var(--bg1); }
#topbar { background:var(--bg1); }
.brand-mark { border-color:transparent; }
.tb-sp { height:30px; border-left:1px dashed var(--rule); width:0; background:none; }
#livetag,#fbadge,.flag,.badge,.xbadge,#synctag { background:transparent; border:1px solid var(--line2); }
#livetag.off { color:var(--red); border-color:var(--red); }
.flag.running,.badge.liveb,#synctag.ok { color:var(--green); }
.flag.pause,.xbadge.bad,#synctag.bad { color:var(--red); border-color:var(--red); }
.flag.done,.badge.cache { color:var(--mut); }
#flags { border:1px solid var(--line); background:transparent; }
#flags.fg-yellow { border-color:var(--amber); }
#flags.fg-red,#flags.fg-conflict { border-color:var(--red); }
#flags.fg-stopped { border-color:var(--red); }
#flags.fg-purple { border-color:var(--violet); }
.fchip.fg-stopped { color:var(--red); }
.fchip.fg-purple { color:var(--violet); }
#flags.fg-safety { border-color:var(--amber); }
#flags.fg-conflict { outline:1px dashed var(--red); }
.fchip,.fgsrc,.fchip.fg-green,.fchip.fg-yellow,.fchip.fg-red,.fchip.fg-safety,.fchip.fg-chequered,.fg-conflict .fgsrc { background:transparent; }
.fgsrc { border:1px solid var(--line); color:var(--mut); }
.fchip { border:1px solid transparent; }
#synctag { background:transparent; }

/* 默认控件空心；当前页用青色底线，焦点保留独立外轮廓。 */
.iconbtn,.lbtn,.btn,.session-select,.rawbar .sel,.cfgin,.ap-search input,.season-rounds input,.gate-row input,.season-head button,.season-actions button,.mod-step button,.mod-x,.sh-x {
  background-color:transparent;
  border:1px solid var(--line2);
}
.iconbtn:hover,.lbtn:hover,.btn:hover,.session-select:hover,.ap-it:hover,.season-head button:hover,.season-actions button:hover {
  color:var(--ink); border-color:var(--cyan); background-color:var(--bg3);
}
.iconbtn.on,.lbtn.on,.mod-tabs button.on { color:var(--cyan); border-color:var(--cyan); background:transparent; }
#gear,#season-edit,#resetbtn { border-color:var(--line2); }
.pgtabs { border:0; padding:0; gap:0; background:transparent; }
.pgtab,.pgtab.on { position:relative; border:0; border-right:1px dashed var(--rule); background:transparent; color:var(--mut); }
.pgtab.on { color:var(--ink); }
.pgtab.on::after { content:''; position:absolute; height:2px; left:10px; right:10px; bottom:0; background:var(--cyan); }
.pgtab:hover { background:var(--bg3); color:var(--ink); }
.pgtab .pgn,.pgtab.on .pgn,.pgtab .pgw { background:transparent; }
.watchbar { border:0; background:transparent; padding-left:10px; border-left:1px dashed var(--rule); }
.wchip { border:1px solid var(--c); color:var(--c); background:transparent; }
.wchip.none { border-color:var(--line); color:var(--dim); }
#cfg-save,.season-actions button[type=submit] { background:transparent; color:var(--cyan); border-color:var(--cyan); font-weight:700; }
#cfg-save:hover,.season-actions button[type=submit]:hover { background:var(--bg3); }

/* 标题与一条连续细线嵌合。保留原37px标题带，避免压缩内容区或改动布局。 */
.mod.acc { border-color:var(--frame); border-left-width:1px; }
.mod-hd { position:relative; isolation:isolate; border-bottom:0; background:var(--bg1); padding-left:11px; padding-right:11px; }
.mod-hd::before { content:''; position:absolute; z-index:-1; pointer-events:none; left:0; right:0; top:50%; border-top:1px solid var(--frame); }
.mod-hd h3 { max-width:70%; overflow:hidden; text-overflow:ellipsis; background:var(--bg1); padding:0 7px; margin-left:-3px; font-size:12.5px; font-weight:650; color:var(--ink); }
.mod-hd .r { background:var(--bg1); padding:0 5px; }
.mod-hd .mod-tabs,.mod-hd .mod-grip,.mod-hd .mod-x,.mod-hd .mod-step { background:var(--bg1); }
.mod-tabs { border:0; padding:0; gap:4px; }
.mod-tabs button { border:1px solid var(--line2); min-height:26px; }
.mod-sub { background:transparent; border-bottom:1px dashed var(--rule); }
body.editing .mod-hd { background:var(--bg1); }
body.editing .mod { border-color:var(--cyan); }
body.editing .mod-hd::before { border-color:var(--cyan); }
body.editing #stage::before { background:none; }
#ghost { border:1px dashed var(--cyan); background:var(--bg3); }
.mod.dragging { outline:1px solid var(--cyan); }

/* 数据行不逐格加框。仅组间实线、行间低对比虚线。 */
.trow,.frow,.rrow,.pitq,.drow,.prow,.strow,.lrow,.b5row { border-bottom:1px dashed var(--rule); }
.trow.h,.frow.h,.rrow.h,.pitq.h,.drow.h,.strow.h,.lrow.h,.b5row.h,.psec { background:var(--bg2); border-bottom:1px solid var(--line2); }
.trow.h .c-no { border-color:transparent; }
.trow.me,.trow.rv,.frow.mine,.frow.rv,.pitq.mine,.drow.live,.prow.pmine,.prow.prv,.trow.pit,.frow.live,.pitq.live,.prow.pitrow.live,.strow.live { background:transparent; }
.trow.me .c-team,.frow.mine .fnm,.drow.live .dn { color:var(--ink); font-weight:700; }
.trow.me .c-no,.frow.mine .fno,.pitq.mine .qno,.pmine .pno,.pc-no,.pr-car .pk .cno[style] { color:var(--accent); border:1px solid var(--accent); background:transparent!important; }
.trow.rv .c-no { color:var(--rival); border:1px solid var(--rival); background:transparent; }
.c-no,.frow .fno,.pitq .qno,.prow .pno,.pr-car .pk .cno { border:1px solid var(--line2); background:transparent; }
.trow.pit .c-no,.frow.live .fno,.pitq.live .qno { color:var(--amber); border-color:var(--amber); background:transparent; }
.dl,.dl-up,.dl-dn,.dl-eq,.dl-pb,.drow .dlive,.drow.h em.dest,.pr-car .pk em.cme,.pr-car .pk em.crv,.xtag,.xtag.bad,.xtag.jit,.xtag.mine,.xch,.tagp,.tags,.tagy,.tags,.mine-tag,.ptype,.prow .ptype,.prow .ptype.flag,.strow .sl { background:transparent; border:1px solid var(--line); }
.drow .dlive,.strow .sl,.mine-tag { border-color:var(--accent); color:var(--accent); }
.drow.h em.dest { color:var(--mut); border-color:var(--line2); }
.prow .ptype { color:var(--amber); border-color:var(--amber); }
.prow .ptype.flag { color:var(--mut); border-color:var(--line); }
.xbadge,.xch { color:var(--amber); border-color:var(--amber); }
.xbadge.bad,.xch.bad { color:var(--red); border-color:var(--red); }
.xblk,.xblk.bad,.xblk.jit { background:transparent; }
.xnote { background:transparent; border:1px solid var(--line2); }
.pchip { background:transparent!important; border:1px solid currentColor; }
.plegend { border-top:1px dashed var(--rule); }

/* 控制台：身份、驾驶人、计时与邻车分组；不删原字段。 */
.pc-hd { padding-bottom:7px; }
.pc-name { font-size:14px; }
.pc-drv { margin:0 12px 7px; padding:4px 0 9px; border-bottom:1px dashed var(--rule); }
.pc-drv b { font-weight:650; }
.pc-rows { padding-left:12px; padding-right:12px; }
.pr-hero { padding-top:3px; border-bottom:1px dashed var(--rule); }
.pr-hero .pv { font-size:30px; color:var(--ink); }
.pr-rel { border-bottom:1px dashed var(--rule); }
.pr-car { border-bottom:1px dashed var(--rule); }
.pr-car:last-child { border-bottom:0; }
.pr-car .pk em { border-color:var(--line2); }
.pc-spark { padding:9px 12px 4px; }
.pc-sk { gap:8px; font-size:10.5px; }
.pc-sk>span:first-child { min-width:0; }
.pc-sum { border-top:1px dashed var(--rule); padding-left:12px; padding-right:12px; }
.pc-foot { padding-left:12px; padding-right:12px; }
.pc-last { border-top:1px dashed var(--rule); margin:0 12px; padding:6px 0 9px; }
.pcon.inpit,.pcon.pitok { background:var(--bg1); border-color:var(--amber); }
.pcon.inpit .pr-hero .pv,.pcon.pitok .pr-hero .pv { color:var(--amber); }
.pc-bar,.fbar,.qbar { background:var(--bg3); }
.pc-bar i,.frow .fbar i,.pitq .qbar i,.pcon.pitok .pc-bar i { background:var(--amber); }
.pc-spark svg,.spark { border-bottom:1px solid var(--line2); }
.pc-spark svg path[fill^="url"],.spark path[fill^="url"] { fill:none; }
.pc-spark svg polyline,.spark polyline { stroke-linecap:butt; stroke-linejoin:miter; }
.pc-spark svg line,.spark line { stroke:var(--line2); stroke-opacity:.65; }
/* 估算类由数据层提供，不从正负数字猜证据等级。 */
.is-estimated .rgp,.is-estimated .rrd,.is-estimated .ram,.is-estimated .gp,.is-estimated .rd,.is-estimated .pv,.pc-sk.is-estimated b { color:var(--mut)!important; }

/* 抽屉、配置、门禁与提示均属于同一个线框系统。 */
.sh-in,.season-editor,.gate-box { background:var(--bg1); }
.sh-bg,.season-editor::backdrop { background:oklch(.1 .008 235 / .82); }
.sh-hd,.ap-hd,.season-head { position:relative; isolation:isolate; background:var(--bg1); border-bottom:1px dashed var(--rule); }
.sh-hd { position:sticky; }
.season-head { position:sticky; }
.sh-hd h3,.season-head h2 { position:relative; background:var(--bg1); padding-right:10px; }
.sh-x { background:transparent; }
.sh-sec { color:var(--ink); padding-top:19px; }
.card { border-top:0; }
.card-hd { position:relative; isolation:isolate; align-items:center; min-height:26px; }
.card-hd::before { content:''; position:absolute; left:0; right:0; top:50%; border-top:1px solid var(--line2); z-index:-1; }
.card-hd h3,.card-hd .rng { padding:0 6px; background:var(--bg1); }
.kv,.kvline,.xseg,.rawpath,.rawbar { border-bottom:1px dashed var(--rule); }
.raw,.rawjson,.rawbar,.rawpath { background:var(--bg); }
.raw { border:1px solid var(--line2); }
.tstat { border-right:1px dashed var(--rule); }
.tstat:last-child { border-right:0; }
.ap-hd { border-bottom:1px solid var(--line2); }
.ap-search { border-bottom:1px dashed var(--rule); }
.ap-sec { border-bottom:1px dashed var(--rule); margin:0 7px 4px; padding-left:0; padding-right:0; }
.ap-it { border:0; border-bottom:1px dashed var(--rule); }
.ap-it.has { opacity:.65; }
.ap-it .ic { color:var(--mut); background:transparent; }
.ap-it .add { padding-left:8px; border-left:1px dashed var(--rule); }
.season-rounds fieldset { border-color:var(--frame); }
.season-rounds legend { color:var(--ink); }
.season-source,.season-actions { border-top:1px dashed var(--rule); }
.season-actions { background:var(--bg1); }
.netbar,.netbar.off,.netbar.ok,.netbar.pen,#editnote,#relaybar { background:var(--bg1); }
.netbar { border-color:var(--amber); }
.netbar.off,.netbar.pen { border-color:var(--red); }
.netbar.ok { border-color:var(--green); }
#statusbar .sb+.sb { border-left:1px dashed var(--rule); padding-left:12px; }
#statusbar .sb-src { border-left:1px dashed var(--rule); padding-left:12px; }
#relaybar button,#editnote { border:1px solid var(--line2); }

@media (min-width:1800px) and (min-height:950px) {
  .mod-hd h3 { font-size:13px; }
  .mod-hd .r { font-size:11px; }
  .pc-pos { font-size:26px; }
  .pc-drv b { font-size:18px; }
  .pr-hero .pv { font-size:32px; }
  .pk,.pc-foot,.pc-sum { font-size:12px; }
}
@media (max-height:900px) {
  body.desk .pc-hd { padding-top:8px; padding-bottom:4px; }
  body.desk .pc-drv { margin-bottom:4px; padding-top:2px; padding-bottom:6px; }
  body.desk .pr-hero .pv { font-size:26px; }
  body.desk .pcon.tight .pc-drv { margin-bottom:2px; padding-bottom:3px; }
  body.desk .pcon.tight .pc-last { display:none; }
}
body.mob #topbar { border:1px solid var(--frame); }
body.mob #pagebar { border:1px solid var(--frame); border-top:0; }
body.mob .watchbar { border:1px dashed var(--rule); padding:7px; }
body.mob .mod-hd { background:var(--bg1); }
body.mob .mod-hd h3 { max-width:72%; font-size:13px; }
body.mob .pcon .pc-drv { margin-bottom:7px; }
body.mob .sh-in { border:1px solid var(--frame); border-bottom:0; }
body.mob #statusbar .sb { padding-left:0; border-left:0; }
body.mob #statusbar .sb-src { border-left:0; border-top:1px dashed var(--rule); padding:8px 0 0; }

/* 主卡驾驶状态与样稿一致：左侧人、右侧时长，保留全部业务ID。 */
.pc-status { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:0; margin:0 12px 7px; padding:8px 0 10px; border-bottom:1px dashed var(--rule); flex:none; min-width:0; }
.pc-driver { min-width:0; padding-right:10px; border-right:1px dashed var(--rule); }
.pc-driver>.pk { display:block; font-size:11px; line-height:1.3; margin-bottom:6px; }
.pcon .pc-status .pc-drv { margin:0; padding:0; border:0; font-size:13px; line-height:1.35; }
.pcon .pc-status .pc-drv b { font-size:18px; font-weight:650; line-height:1.2; }
.pc-status>.pr-hero { flex-direction:column; align-items:flex-end; align-self:stretch; justify-content:space-between; gap:6px; margin:0; padding:0 0 0 12px; border:0; }
.pc-status>.pr-hero .pk { align-self:flex-start; padding:0; font-size:11px; line-height:1.3; letter-spacing:0; }
.pc-status>.pr-hero .pv { font-size:28px; line-height:1.1; font-weight:700; }
.pc-status>.pr-hero .pv .u { font-size:13px; }
.pcon.tight .pc-status { padding-top:5px; padding-bottom:7px; margin-bottom:4px; }
.pcon.tight .pc-status .pc-driver>.pk { margin-bottom:4px; font-size:10px; }
.pcon.tight .pc-status .pr-hero .pk { font-size:10px; }
.pcon.tight .pc-status .pr-hero .pv { font-size:24px; }
.pcon.tight .pc-status .pc-drv b { font-size:16px; }
@media (min-width:1800px) and (min-height:950px) {
  .pc-status { padding-top:10px; padding-bottom:12px; }
  .pc-driver>.pk,.pc-status>.pr-hero .pk { font-size:12px; }
  .pcon .pc-status .pc-drv b { font-size:20px; }
  .pc-status>.pr-hero .pv { font-size:32px; }
}
@media (max-height:900px) {
  body.desk .pcon.tight .pc-status .pc-drv { margin:0; padding:0; }
  body.desk .pcon.tight .pc-status .pr-hero .pv { font-size:23px; }
  body.desk .pcon.tight .pc-status .pc-drv b { font-size:16px; }
}
body.mob .pcon .pc-status { padding-top:9px; padding-bottom:11px; }
body.mob .pcon .pc-status .pc-drv { margin:0; padding:0; }
body.mob .pcon .pc-status .pc-drv b { font-size:19px; }
body.mob .pc-status>.pr-hero .pv { font-size:30px; }

/* ═══ 已选纸感终端：实色表面、明外框、暗内线 ═══════════════════════
   不使用纹理位图、透视或损伤字形的滤镜；内容与曲线始终清晰。 */
html,body { font-variant-numeric:tabular-nums; }
.brand-lockup strong { letter-spacing:0; }
.mod-hd h3,.pgtab,.round-label,.round-button,.session-select,.pc-hd,
.pc-status .pk,.pc-sum,.pc-foot,#statusbar { font-family:var(--mono); }
#topbar { border-color:var(--frame); }
#flags { border-color:var(--line2); }
#pagebar { flex-wrap:wrap; gap:6px 8px; padding:5px 8px; }
.pgtabs { order:1; flex:none; align-self:stretch; }
.pgtab,.pgtab.on { min-height:42px; padding:0 13px; font-size:13px; font-weight:600; border-right:1px solid var(--rule); }
.pgtab:last-child { border-right:0; }
.pgtab.on { color:var(--cyan); }
.pgtab.on::after { left:9px; right:9px; height:3px; }
.season-tools { order:2; min-width:0; gap:5px; padding-left:8px; border-left:1px solid var(--line2); }
.session-select { width:205px; max-width:225px; min-height:40px; padding-left:10px; font-size:12px; color:var(--ink); border-color:var(--line2); }
#season-edit { min-height:40px; height:40px; padding:0 7px; font-size:11px; color:var(--mut); }
.round-switcher { display:flex; order:3; flex:none; align-items:center; gap:8px; min-width:0; padding-left:9px; border-left:1px solid var(--line2); }
.round-label { flex:none; color:var(--mut); font-size:11px; white-space:nowrap; }
#station-buttons { display:flex; align-items:center; gap:5px; min-width:0; }
.round-button { display:inline-flex; align-items:center; justify-content:center; min-width:34px; min-height:36px; padding:0 6px; border:1px solid var(--line2); background:transparent; color:var(--mut); font-size:12px; line-height:1; cursor:pointer; transition:color .16s,border-color .16s,background-color .16s; }
.round-button:hover { color:var(--ink); border-color:var(--cyan); background:var(--bg3); }
.round-button[aria-pressed=true] { color:var(--cyan); border-color:var(--cyan); background:transparent; }
.round-button:active { background:var(--bg3); }
.round-button:disabled { color:var(--dim); border-color:var(--rule); cursor:default; }
#watchwrap { order:4; flex:1 1 190px; min-width:150px; }
.watchbar { flex-wrap:wrap; min-height:40px; padding:4px 7px; border-left:1px solid var(--line2); }
.watchbar .wk { font-family:var(--mono); }
.wchip { font-family:var(--mono); padding:3px 5px; }
#pgtools { order:5; gap:5px; margin-left:auto; }
#pgtools .iconbtn { height:40px; min-height:40px; padding:0 9px; }

/* 第二稿是普通标题带，不引入第三稿章节编号或嵌框横线。 */
.mod-hd { min-height:36px; padding:7px 11px; border-bottom:1px solid var(--rule); }
.mod-hd::before { content:none; }
.mod-hd h3 { margin:0; padding:0; background:transparent; font-size:13px; font-weight:600; }
.mod-hd .r { padding:0; background:transparent; }
body.editing .mod-hd { border-bottom-color:var(--cyan); }
.card-hd::before { content:none; }
.card-hd { border-bottom:1px solid var(--rule); }
.card-hd h3,.card-hd .rng { padding:0; background:transparent; }
.sh-hd,.ap-hd,.season-head { border-bottom:1px solid var(--line2); }
.sh-bg,.season-editor::backdrop { background:oklch(.12 .002 90 / .86); }

/* 队色是身份，不为整张卡染色；原始ID与全部数据字段保持。 */
.pcon .pc-hd { display:flex; align-items:center; gap:7px; padding:10px 12px 9px; border-bottom:1px dashed var(--rule); margin:0 0 4px; }
.pcon .pc-hd::before { content:''; flex:0 0 4px; width:4px; height:25px; background:var(--accent,var(--rival)); margin-right:2px; }
.pcon .pc-no { order:1; padding:1px 4px; font-size:15px; font-weight:700; }
.pcon .pc-name { order:2; flex:1; font-size:14px; font-weight:600; }
.pcon .pc-pos { order:3; flex:none; margin-left:auto; font-size:24px; line-height:1.1; color:var(--accent,var(--rival)); }
.pcon .pc-pen { order:4; font-size:10px; }
.pcon .pc-status { padding-top:9px; padding-bottom:11px; margin-bottom:7px; }
.pcon .pc-status .pc-drv b { font-size:18px; font-weight:650; }
.pcon .pc-status>.pr-hero .pv { font-size:34px; letter-spacing:-.02em; }
.pcon .pc-status>.pr-hero .pv .u { font-size:13px; }
.pcon .pc-status .pc-driver>.pk,.pcon .pc-status>.pr-hero .pk { font-size:11px; font-weight:500; }
.pcon .pc-status>.pr-hero { min-width:0; padding-left:10px; }
.pcon .pc-spark { padding-top:10px; }
.pcon .pc-sk { font-family:var(--mono); font-size:10.5px; }
.pcon .pc-spark svg { border-bottom-color:var(--line2); }
.pcon .pc-spark svg line { stroke:var(--rule); stroke-opacity:1; }
.pcon.tight .pc-hd { padding-top:8px; padding-bottom:7px; }
.pcon.tight .pc-status { padding-top:7px; padding-bottom:9px; }
.pcon.tight .pc-status>.pr-hero .pv { font-size:30px; }
.pcon.tight .pc-status .pc-drv b { font-size:18px; }
body.desk .pcon.tight .pc-status .pr-hero .pv { font-size:30px; }
body.desk .pcon.tight .pc-status .pc-drv b { font-size:18px; }
body.desk .pcon.tight .pc-pos { font-size:22px; }
body.desk .pcon.tight .pc-last { display:block; }

@media (min-width:1800px) and (min-height:950px) {
  .mod-hd { min-height:40px; }
  .mod-hd h3 { font-size:14px; }
  .pcon .pc-hd { padding-top:12px; padding-bottom:12px; }
  .pcon .pc-name { font-size:17px; }
  .pcon .pc-no { font-size:18px; }
  .pcon .pc-pos { font-size:28px; }
  .pcon .pc-status { padding-top:12px; padding-bottom:15px; }
  .pcon .pc-status .pc-drv b { font-size:22px; }
  .pcon .pc-status>.pr-hero .pv { font-size:40px; }
  .pcon .pc-status .pc-driver>.pk,.pcon .pc-status>.pr-hero .pk { font-size:12px; }
}
@media (max-width:1600px) {
  .session-select { width:192px; max-width:205px; }
  .pgtab,.pgtab.on { padding:0 11px; font-size:12px; }
  .round-switcher { gap:6px; padding-left:7px; }
  #station-buttons { gap:4px; }
  .round-button { min-width:32px; padding:0 5px; }
}
@media (max-width:1250px) {
  #watchwrap { flex-basis:calc(100% - 350px); min-width:0; }
  .watchbar { border-left:0; padding-left:2px; }
  #pgtools { padding-left:8px; border-left:1px dashed var(--rule); }
}
@media (max-width:1300px) {
  .pgtab,.pgtab.on { padding:0 10px; }
  .session-select { width:196px; }
  #pagebar { gap:5px 7px; }
}
body.mob #pagebar { gap:8px; padding:8px 12px 10px; }
body.mob .pgtabs { order:1; width:100%; flex:1 0 100%; }
body.mob .pgtab,body.mob .pgtab.on { min-height:44px; padding:0 7px; font-size:12px; }
body.mob .season-tools { order:2; width:100%; flex:1 0 100%; padding:0; border-left:0; }
body.mob .session-select { min-height:44px; flex:1; width:0; max-width:none; font-size:12px; }
body.mob #season-edit { flex:none; min-height:44px; height:44px; padding:0 8px; }
body.mob .round-switcher { order:3; width:100%; flex:1 0 100%; flex-direction:column; align-items:stretch; gap:6px; padding:0; border-left:0; }
body.mob .round-label { font-size:11px; }
body.mob #station-buttons { display:grid; grid-template-columns:repeat(auto-fit,minmax(44px,1fr)); gap:5px; }
body.mob .round-button { min-width:0; min-height:44px; width:100%; padding:0; font-size:13px; }
body.mob #watchwrap { order:4; flex:1 0 100%; width:100%; min-width:0; padding:0; }
body.mob .watchbar { width:100%; padding:7px; border:1px dashed var(--rule); }
body.mob #pgtools { order:5; width:100%; justify-content:flex-end; border-left:0; padding:0; }
body.mob #pgtools .iconbtn { min-height:44px; height:44px; flex:1; }
body.mob .mod-hd { min-height:42px; }
body.mob .mod-hd h3 { font-size:13px; }
body.mob .pcon .pc-hd { padding-top:12px; padding-bottom:10px; }
body.mob .pcon .pc-status { padding-top:10px; padding-bottom:12px; }
body.mob .pcon .pc-status .pc-drv b { font-size:20px; }
body.mob .pcon .pc-status>.pr-hero .pv { font-size:34px; }

/* 第二稿比例校准：驾驶状态是主层，重复模块标题仅在编辑时占位。 */
body.desk { padding:18px; gap:10px; }
body.desk #topbar { min-height:80px; padding:10px 14px; }
#statusbar { min-height:36px; font-size:11px; }
#statusbar .sb i,#statusbar .sb-src { font-size:10.5px; }
#statusbar .sb b { font-size:12px; }
body:not(.editing) .pcon>.mod-hd { position:absolute; width:1px; height:1px; min-height:0; margin:-1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); clip-path:inset(50%); white-space:nowrap; border:0; pointer-events:none; }
.pcon .pc-hd { min-height:66px; padding:12px 14px; gap:9px; }
.pcon .pc-hd::before { height:29px; }
.pcon .pc-no { font-size:23px; border:0; padding:0; }
.pcon .pc-name { font-size:18px; }
.pcon .pc-classification { order:3; display:flex; flex:none; flex-direction:column; align-items:flex-end; gap:3px; margin-left:auto; }
.pcon .pc-pos { order:initial; margin:0; font-size:28px; }
.pcon .pc-laps { font:11px/1.2 var(--mono); color:var(--mut); white-space:nowrap; }
.pcon .pc-status { margin:0 14px 7px; padding:12px 0 14px; }
.pcon .pc-status .pc-drv b { font-size:24px; }
.pcon .pc-status>.pr-hero .pv { font-size:42px; }
.pcon .pc-status .pc-driver>.pk,.pcon .pc-status>.pr-hero .pk { font-size:12px; }
.pcon .pc-status .pc-drv { line-height:1.4; }
.pcon .pr-rel .pv { font-size:23px; }
.pcon .pr-car .pv { font-size:14px; }
.pcon .pk { font-size:12px; }
.pcon .pc-sk,.pcon .pc-sum,.pcon .pc-foot,.pcon .pc-last { font-size:11.5px; }
.pcon .pc-rows { padding-left:14px; padding-right:14px; }
.drow.h,.frow.h,.pitq.h { font-size:11px; }
.drow .dv.dm,.frow .fv,.frow .ft,.frow .fsub,.pitq .qd,.pitq .qsub { font-size:11px; }
.drow.h .dcov { font-size:10.5px; }
.pcon.tight .pc-hd { min-height:56px; padding-top:9px; padding-bottom:9px; }
.pcon.tight .pc-no { font-size:21px; }
.pcon.tight .pc-name { font-size:16px; }
.pcon.tight .pc-status { padding-top:9px; padding-bottom:11px; }
.pcon.tight .pc-status .pc-drv b,body.desk .pcon.tight .pc-status .pc-drv b { font-size:21px; }
.pcon.tight .pc-status>.pr-hero .pv,body.desk .pcon.tight .pc-status .pr-hero .pv { font-size:36px; }
body.desk .pcon.tight .pc-pos { font-size:26px; }
@media (max-width:1500px) {
  body.desk { padding:14px; gap:9px; }
  body.desk #topbar { min-height:72px; padding:8px 12px; }
  .pcon .pc-hd { min-height:60px; padding:10px 12px; gap:7px; }
  .pcon .pc-no { font-size:21px; }
  .pcon .pc-name { font-size:16px; }
  .pcon .pc-pos { font-size:26px; }
  .pcon .pc-status { margin-left:12px; margin-right:12px; padding-top:10px; padding-bottom:12px; }
  .pcon .pc-status .pc-drv b { font-size:22px; }
  .pcon .pc-status>.pr-hero .pv { font-size:38px; }
}
@media (max-width:1300px),(max-height:820px) {
  body.desk { padding:12px; gap:8px; }
  body.desk #topbar { min-height:68px; padding:7px 11px; }
  body.desk #statusbar { min-height:32px; padding-top:5px; padding-bottom:5px; }
  .pcon .pc-hd { min-height:56px; }
  .pcon .pc-no { font-size:20px; }
  .pcon .pc-name { font-size:15px; }
  .pcon .pc-status .pc-drv b { font-size:20px; }
  .pcon .pc-status>.pr-hero .pv { font-size:34px; }
  body.desk .pcon.tight .pc-status .pc-drv b { font-size:20px; }
  body.desk .pcon.tight .pc-status .pr-hero .pv { font-size:32px; }
}
body.mob .pcon .pc-hd { min-height:60px; padding:10px 12px; }
body.mob .pcon .pc-no { font-size:22px; }
body.mob .pcon .pc-name { font-size:16px; }
body.mob .pcon .pc-pos { font-size:26px; }
body.mob .pcon .pc-status .pc-drv b { font-size:22px; }
body.mob .pcon .pc-status>.pr-hero .pv { font-size:38px; }

/* 趋势图保留真实绘图空间；卡片密度由实际高度统一决定。 */
body.desk .pcon .mod-body { min-height:0; overflow:auto!important; }
.pcon .pc-spark { flex:1 0 106px; min-height:106px; max-height:none; margin-top:8px; padding:0 12px 4px; }
.pcon .pc-sk { flex:none; min-height:16px; line-height:16px; margin-bottom:0; }
.pcon .pc-spark svg { display:block; flex:1 1 0; min-height:0; height:0; width:100%; }
.pcon.tight .pc-hd,body.desk .pcon.tight .pc-hd { min-height:50px; padding-top:8px; padding-bottom:8px; }
.pcon.tight .pc-status { padding-top:7px; padding-bottom:9px; }
.pcon.tight .pr { padding-top:3px; padding-bottom:3px; }
.pcon.tight .pc-status>.pr-hero { padding-top:0; padding-bottom:0; }
.pcon.tight .pc-last { padding-top:4px; padding-bottom:4px; line-height:1.25; }
@media (max-height:820px) {
  .pcon .pc-status,.pcon.tight .pc-status { padding-top:6px; padding-bottom:8px; }
}
body.mob .pcon .pc-spark { flex:0 0 130px; min-height:130px; }

/* 用户指定的导航是主操作区，不能缩成辅助元数据。 */
body.desk .pgtab,body.desk .pgtab.on { min-height:44px; padding:0 17px; font-size:16px; }
body.desk .session-select { width:235px; max-width:245px; min-height:44px; font-size:14px; }
body.desk .round-label { font-size:13px; }
body.desk #station-buttons { gap:5px; }
body.desk .round-button { min-width:36px; min-height:44px; font-size:14px; padding:0 6px; }
@media (max-width:1300px) {
  body.desk .pgtab,body.desk .pgtab.on { padding:0 12px; font-size:14px; }
  body.desk .session-select { width:198px; max-width:205px; font-size:13px; }
  body.desk .round-label { font-size:12px; }
  body.desk #station-buttons { gap:4px; }
  body.desk .round-button { min-width:32px; font-size:13px; padding:0 5px; }
}

/* 全局短反馈：只动画交互与保留外壳，不插值比赛数据或网格尺寸。 */
:root { --motion-fast:140ms; --motion-panel:180ms; --motion-module:200ms; --motion-ease:cubic-bezier(.2,.8,.2,1); }
button,select,input,.wchip,.ap-it {
  transition-property:color,background-color,border-color,outline-color;
  transition-duration:var(--motion-fast);
  transition-timing-function:var(--motion-ease);
}
.pgtab.on::after { animation:nm-selection-in var(--motion-fast) var(--motion-ease); }
body.editing .mod { transition:border-color var(--motion-fast) var(--motion-ease); }
.mod.wm-enter { animation:nm-module-fade var(--motion-module) var(--motion-ease) both; }
.mod.wm-enter>.mod-body { animation:nm-content-enter var(--motion-module) var(--motion-ease) both; }
body.editing .mod,body.editing .mod>.mod-body,.mod.dragging,.mod.dragging>.mod-body { animation:none; }
.pc-bar i,.fbar i,.qbar i { transition:none; }

/* 抽屉动画挂在保留的容器，逐圈/消息重绘不重新播放。 */
.sh-in,body.mob .sh-in { animation:none; opacity:0; transform:translateY(4px); transition:opacity var(--motion-panel) var(--motion-ease),transform var(--motion-panel) var(--motion-ease); }
.sheet { pointer-events:none; }
.sheet.on { pointer-events:auto; }
.sheet.on .sh-in { opacity:1; transform:none; animation:nm-panel-enter var(--motion-panel) var(--motion-ease); }
.sh-bg { opacity:0; transition:opacity var(--motion-panel) var(--motion-ease); }
.sheet.on .sh-bg { opacity:1; animation:nm-backdrop-enter var(--motion-panel) var(--motion-ease); }
#addpanel { opacity:0; transform:translateY(4px); pointer-events:none; transition:opacity var(--motion-panel) var(--motion-ease),transform var(--motion-panel) var(--motion-ease); }
#addpanel.on { opacity:1; transform:none; pointer-events:auto; animation:nm-panel-enter var(--motion-panel) var(--motion-ease); }
.season-editor { opacity:0; transform:translateY(4px); transition:opacity var(--motion-panel) var(--motion-ease),transform var(--motion-panel) var(--motion-ease); }
.season-editor[open] { opacity:1; transform:none; animation:nm-panel-enter var(--motion-panel) var(--motion-ease); }
.season-editor::backdrop { opacity:0; transition:opacity var(--motion-panel) var(--motion-ease); }
.season-editor[open]::backdrop { opacity:1; animation:nm-backdrop-enter var(--motion-panel) var(--motion-ease); }
.season-editor,.season-editor::backdrop { pointer-events:none; }
.season-editor[open],.season-editor[open]::backdrop { pointer-events:auto; }
.gate-box { animation:nm-panel-enter var(--motion-panel) var(--motion-ease); }
.netbar { transform:translate(-50%,4px); transition:opacity 160ms var(--motion-ease),transform var(--motion-panel) var(--motion-ease); }
.netbar.pen { transform:translate(-50%,-4px); }
.netbar.on,.netbar.pen.on { transform:translate(-50%,0); }

/* 支持离散显示过渡时补短退场；旧浏览器仍由.on/[open]得到完整静态显示。 */
@supports (transition-behavior:allow-discrete) {
  .sheet { transition:display var(--motion-panel) allow-discrete; }
  #addpanel { transition:opacity var(--motion-panel) var(--motion-ease),transform var(--motion-panel) var(--motion-ease),display var(--motion-panel) allow-discrete; }
  .season-editor { transition:opacity var(--motion-panel) var(--motion-ease),transform var(--motion-panel) var(--motion-ease),display var(--motion-panel) allow-discrete,overlay var(--motion-panel) allow-discrete; }
}
@keyframes nm-module-fade { from { opacity:.45; } to { opacity:1; } }
@keyframes nm-content-enter { from { transform:translateY(4px); } to { transform:none; } }
@keyframes nm-panel-enter { from { opacity:.1; transform:translateY(4px); } to { opacity:1; transform:none; } }
@keyframes nm-backdrop-enter { from { opacity:0; } to { opacity:1; } }
@keyframes nm-selection-in { from { opacity:.45; } to { opacity:1; } }
#cfg-motion { width:100%; font-family:var(--sans); }
html[data-motion=reduce] *,html[data-motion=reduce] *::before,html[data-motion=reduce] *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
html[data-motion=reduce] .sh-in,html[data-motion=reduce] #addpanel,html[data-motion=reduce] .season-editor,html[data-motion=reduce] .mod.wm-enter>.mod-body { transform:none!important; }
html[data-motion=reduce] .netbar { transform:translate(-50%,0)!important; }
@media (prefers-reduced-motion:reduce) {
  /* 上方已有全局!important关闭animation/transition；静态位置另保留居中语义。 */
  .sh-in,body.mob .sh-in,#addpanel,.season-editor { transform:none!important; }
  .netbar,.netbar.pen,.netbar.on,.netbar.pen.on { transform:translate(-50%,0)!important; }
  .mod.wm-enter>.mod-body { transform:none!important; }
}

/* 历史快照可直接下载，合并继续受场次校验约束。 */
.backup-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:7px}
.backup-actions .lbtn{min-height:44px;padding:4px 10px;border:1px solid var(--rule);border-radius:0}
.file-entry{max-width:600px;margin:12vh auto;padding:24px;border:1px solid var(--line2);font-size:15px;line-height:1.8}
.file-entry h1{font-size:22px;margin-bottom:16px}.file-entry p{margin-bottom:16px;color:var(--mut)}
.file-entry a{display:inline-block;color:var(--cyan);border:1px solid var(--cyan);padding:8px 14px;margin-bottom:16px}
.round-switcher{max-width:100%}
#station-buttons{flex-wrap:wrap}

/* ═══ 赛季参考资料：年份 / 赛历 / 年度积分 ═══════════════════════
   只呈现资料，不借状态色暗示比赛连接；长表滚动受约束于原生dialog。 */
.season-tools { flex-wrap:wrap; max-width:100%; }
#season-year {
  flex:0 0 88px; width:88px; max-width:88px; min-width:0; min-height:44px;
  padding:0 22px 0 10px; border:1px solid var(--line2); border-radius:0;
  background:var(--bg1); color:var(--ink); font:13px var(--mono); cursor:pointer;
}
#season-calendar,#season-points {
  display:inline-flex; flex:none; align-items:center; justify-content:center; gap:6px;
  min-width:64px; min-height:44px; padding:0 10px; border:1px solid var(--line2);
  border-radius:0; background:transparent; color:var(--mut); font:13px var(--sans);
  line-height:1.2; white-space:nowrap; cursor:pointer;
}
#season-calendar:hover,#season-points:hover { background:var(--bg3); border-color:var(--cyan); color:var(--ink); }
#season-calendar:active,#season-points:active { color:var(--cyan); }
#season-calendar:disabled,#season-points:disabled { border-color:var(--rule); color:var(--dim); cursor:default; }

dialog.season-reference {
  margin:auto; width:min(900px,92vw); max-width:92vw; min-width:0;
  max-height:86vh; max-height:86dvh; padding:0; overflow:hidden;
  border:1px solid var(--frame); border-radius:0; background:var(--bg1);
  color:var(--ink); box-shadow:none;
}
dialog.season-reference[open] { display:flex; flex-direction:column; }
dialog.season-reference::backdrop { background:oklch(.12 .002 90 / .86); }
.season-reference-shell {
  display:flex; flex-direction:column; min-width:0; min-height:0; width:100%;
  max-height:calc(86vh - 2px); max-height:calc(86dvh - 2px); overflow:hidden;
}
.season-reference-head {
  display:flex; flex:none; align-items:center; justify-content:space-between; gap:16px;
  min-width:0; padding:16px 22px; border-bottom:1px solid var(--line2); background:var(--bg1);
}
.season-reference-head>div { min-width:0; }
.season-reference-head h2 { margin:0; font-size:20px; font-weight:650; line-height:1.35; overflow-wrap:anywhere; }
.season-reference-head p { margin-top:5px; color:var(--mut); font-size:13px; line-height:1.5; }
.season-reference-close {
  display:inline-flex; flex:none; align-items:center; justify-content:center;
  min-width:44px; min-height:44px; padding:0 12px; border:1px solid var(--line2);
  border-radius:0; background:transparent; color:var(--mut); font:13px var(--sans); cursor:pointer;
}
.season-reference-close:hover { background:var(--bg3); border-color:var(--cyan); color:var(--ink); }
.season-reference-body {
  flex:1 1 auto; min-width:0; min-height:0; max-width:100%; padding:18px 22px 22px;
  overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable;
}
.season-reference-note {
  margin:0 0 16px; padding:0 0 13px; border-bottom:1px dashed var(--rule);
  color:var(--mut); font-size:13px; line-height:1.65; overflow-wrap:anywhere;
}
.season-reference-note strong { color:var(--ink); font-weight:600; }
.season-reference-source { margin-top:16px; padding-top:13px; border-top:1px dashed var(--rule); color:var(--dim); font-size:12px; line-height:1.65; overflow-wrap:anywhere; }
.season-reference-source a,.calendar-source {
  display:inline-flex; align-items:center; min-height:44px; max-width:100%;
  padding:6px 0; color:var(--cyan); text-decoration:underline; text-underline-offset:3px;
  overflow-wrap:anywhere;
}
.season-reference-source a:hover,.calendar-source:hover { color:var(--ink); }

.calendar-list { display:flex; flex-direction:column; min-width:0; list-style:none; }
.calendar-event {
  display:grid; grid-template-columns:94px 108px minmax(0,1fr) 80px 76px;
  align-items:center; gap:12px; min-width:0; padding:13px 0; border-bottom:1px dashed var(--rule);
  font-size:14px; line-height:1.5;
}
.calendar-event:last-child { border-bottom:0; }
.calendar-event>* { min-width:0; }
.calendar-date { color:var(--mut); font:13px/1.6 var(--mono); }
.calendar-order { color:var(--ink); font-weight:600; }
.calendar-location { color:var(--ink); overflow-wrap:anywhere; }
.calendar-location strong { display:block; font-weight:600; }
.calendar-location small { display:block; margin-top:3px; color:var(--mut); font-size:12px; line-height:1.5; }
.calendar-status { justify-self:start; max-width:100%; padding:3px 6px; border:1px solid var(--line); color:var(--mut); font-size:12px; line-height:1.5; }
.calendar-source { justify-self:start; font-size:12px; }

.season-points-filter { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; min-width:0; margin:0 0 14px; }
.season-points-filter label { flex:none; color:var(--mut); font-size:13px; line-height:1.5; }
#season-points-search {
  flex:1 1 200px; width:200px; min-width:0; min-height:44px; padding:9px 11px;
  border:1px solid var(--line2); border-radius:0; background:var(--bg); color:var(--ink);
  font:14px/1.5 var(--sans);
}
#season-points-search::placeholder { color:var(--dim); opacity:1; }
.season-points-count { flex:none; max-width:100%; color:var(--mut); font:12px/1.5 var(--mono); }
.season-points-scroll {
  width:100%; max-width:100%; min-width:0; max-height:min(460px,50vh); max-height:min(460px,50dvh);
  overflow:auto; overscroll-behavior:contain; border:1px solid var(--line2);
}
.season-points-table { width:100%; min-width:810px; border-collapse:separate; border-spacing:0; table-layout:fixed; font-size:13px; line-height:1.5; }
.season-points-table caption { padding:0 0 12px; color:var(--ink); text-align:left; font-size:14px; font-weight:600; caption-side:top; }
.season-points-table th,.season-points-table td {
  width:auto; padding:11px 8px; border-right:1px dashed var(--rule); border-bottom:1px dashed var(--rule);
  background:var(--bg1); text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums;
}
.season-points-table th { color:var(--mut); font-size:12px; font-weight:600; }
.season-points-table td { color:var(--ink); font-family:var(--mono); }
.season-points-table thead th { position:sticky; top:0; z-index:3; background:var(--bg2); border-bottom:1px solid var(--line2); }
.season-points-table :is(th,td):first-child { position:sticky; left:0; z-index:2; width:44px; min-width:44px; max-width:44px; text-align:center; }
.season-points-table :is(th,td):nth-child(2) { position:sticky; left:44px; z-index:2; width:160px; min-width:160px; max-width:160px; border-right:1px solid var(--line2); text-align:left; white-space:normal; overflow-wrap:anywhere; font-family:var(--sans); }
.season-points-table thead th:first-child,.season-points-table thead th:nth-child(2) { z-index:4; }
.season-points-table :is(th,td):last-child { width:86px; border-right:0; font-weight:650; }
.season-points-table tbody tr:last-child td,.season-points-table tfoot tr:last-child :is(th,td) { border-bottom:0; }
.season-points-table tbody tr:hover td { background:var(--bg2); }
.season-points-table tfoot :is(th,td) { border-top:1px solid var(--line2); background:var(--bg2); font-weight:650; }

@media (max-width:640px) {
  .season-reference-head { gap:10px; padding:12px 14px; }
  .season-reference-head h2 { font-size:18px; }
  .season-reference-body { padding:14px; }
  .calendar-event { grid-template-columns:minmax(0,1fr) auto; gap:7px 12px; padding:14px 0; }
  .calendar-date { grid-column:1; grid-row:1; }
  .calendar-order { grid-column:1; grid-row:2; }
  .calendar-status { grid-column:2; grid-row:1 / 3; align-self:start; }
  .calendar-location { grid-column:1 / -1; }
  .calendar-source { grid-column:1 / -1; }
  .season-points-filter { gap:8px; }
  .season-points-filter label { flex:1 0 100%; }
  #season-points-search { flex-basis:180px; }
  .season-points-count { margin-left:auto; }
  .season-points-scroll { max-height:min(360px,45vh); max-height:min(360px,45dvh); }
  .season-points-table { font-size:12px; }
  .season-points-table th,.season-points-table td { padding:10px 7px; }
  .season-points-table :is(th,td):nth-child(2) { width:136px; min-width:136px; max-width:136px; }
}
body.mob .season-tools #station-select { flex:1 1 0; width:0; min-width:150px; max-width:none; }
body.mob #season-year { flex:0 0 88px; width:88px; max-width:88px; }

body.mob #pgtools .iconbtn { min-width:0; min-height:44px; width:100%; white-space:nowrap; }


/* v66：工具归顶栏；分站和关注名单共用同一条视线。 */
#pagebar { display:flex; flex-direction:column; align-items:stretch; gap:0; padding:0; }
.console-nav { display:flex; align-items:center; gap:6px; min-width:0; padding:4px 6px; }
.console-nav .season-tools { flex:1 1 auto; flex-wrap:nowrap; min-width:0; }
.console-nav .round-switcher { flex:none; min-width:0; gap:6px; padding-left:7px; }
.console-nav #watchwrap { flex:1 1 220px; min-width:170px; padding:0; }
.console-nav .watchbar { min-height:44px; padding:4px 7px; gap:4px; border:0; border-left:1px dashed var(--rule); }
.console-nav .watchbar .wl { flex-wrap:wrap; overflow:visible; gap:4px; }
.console-nav .watchbar .wk { font-size:10px; }
.console-nav .wchip { padding:3px 4px; font-size:10px; }
body.desk .console-nav .pgtab { min-height:44px; padding:0 12px; font-size:14px; }
body.desk .console-nav .session-select {
  flex:1 1 auto; width:clamp(280px,calc(var(--session-ch,38) * 1ch + 42px),560px);
  min-width:clamp(280px,calc(var(--session-ch,38) * 1ch + 42px),560px);
  max-width:none; font-size:12px; text-overflow:clip;
}
body.desk .console-nav .round-label { font-size:12px; }
body.desk .console-nav #station-buttons { flex-wrap:nowrap; gap:4px; }
body.desk .console-nav .round-button { min-width:32px; min-height:44px; padding:0 5px; font-size:13px; }

body.desk #topbar { min-height:76px; padding:7px 11px; gap:8px; }
body.desk #topbar .tb-l { flex:1 1 340px; min-width:290px; gap:8px; }
#topbar .brand-lockup { flex:1 1 auto; min-width:0; }
#topbar .rname { max-width:none; width:100%; font-size:12px; line-height:1.5; text-overflow:clip; }
#topbar .rname>span { display:inline-block; width:max-content; min-width:100%; }
#topbar .rname.is-overflowing>.rname-content { animation:nm-race-title var(--race-duration,18s) linear infinite alternate; }
#topbar .rname:hover>span,#topbar .rname:focus-within>span { animation-play-state:paused; }
#topbar #livetag { margin-left:2px; }
body.desk #clockbar { flex:none; gap:10px; }
body.desk #clockbar .big { font-size:24px; }
body.desk #clockbar .clk-r .flag { padding:3px 5px; font-size:10px; }
body.desk #topbar>.tb-sp { height:32px; }
#topbar #flags {
  display:grid; grid-template-columns:minmax(0,1fr) auto; align-content:center;
  flex:0 0 170px; width:170px; min-width:0; min-height:44px; gap:2px 5px; padding:5px 7px;
}
#topbar #flags .fg-main { grid-column:1; grid-row:1; min-width:0; font-size:11px; line-height:1.4; white-space:normal; overflow-wrap:anywhere; }
#topbar #flags .fgsrc { font-size:9px; padding:0 3px; }
#topbar #flags .fchips { display:flex; grid-column:1; grid-row:2; flex-wrap:wrap; overflow:visible; gap:2px; }
#topbar #flags .fchip { padding:0; font-size:10px; line-height:1.4; white-space:normal; }
#topbar #flags .fhist { grid-column:2; grid-row:1 / 3; min-height:44px; padding:0 2px; border:0; background:transparent; color:var(--dim); font:10px var(--mono); white-space:nowrap; cursor:pointer; }
#topbar #flags .fhist:hover { color:var(--cyan); }
#topbar .tb-r { flex:none; flex-wrap:nowrap; gap:5px; margin-left:0; }
#topbar #pgtools { order:0; display:flex; flex:none; gap:5px; width:auto; padding:0; border:0; margin:0; }
#topbar #pgtools>.iconbtn,#topbar #pgtools .season-disclosure>summary { display:inline-flex; min-height:44px; height:44px; padding:0 8px; font-size:11px; gap:6px; }
#topbar #pgtools .ui-icon,#topbar #gear .ui-icon { width:14px; height:14px; }
#topbar #synctag { min-height:44px; padding:0 7px; font-size:10px; }
#topbar #gear { height:44px; min-height:44px; padding:0 8px; font-size:11px; }
#topbar #fbadge { max-width:110px; font-size:10px; padding:4px 5px; }
#topbar #fbadge.sr-only {
  position:absolute!important; left:0; top:0;
  width:1px!important; min-width:1px!important; max-width:1px!important;
  height:1px!important; min-height:1px!important; max-height:1px!important;
  padding:0!important; margin:0!important; border:0!important; overflow:hidden!important;
  clip:rect(0,0,0,0); clip-path:inset(50%); white-space:nowrap;
}
#topbar #xbadge { max-width:100px; white-space:normal; font-size:10px; }
.season-disclosure { position:relative; flex:none; }
.season-disclosure>summary { display:flex; align-items:center; justify-content:center; gap:10px; list-style:none; cursor:pointer; white-space:nowrap; }
.season-disclosure>summary::-webkit-details-marker { display:none; }
.season-disclosure>summary::after { content:''; width:6px; height:6px; margin-top:-3px; border-right:1px solid currentColor; border-bottom:1px solid currentColor; transform:rotate(45deg); }
.season-disclosure[open]>summary { color:var(--cyan); border-color:var(--cyan); background:var(--bg2); }
.season-disclosure>summary:hover { background:var(--bg3); color:var(--ink); }
.season-disclosure>summary:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
.season-menu { position:absolute; top:calc(100% + 6px); right:0; z-index:30; width:248px; max-width:calc(100vw - 44px); max-height:60vh; max-height:60dvh; overflow:auto; padding:12px; border:1px solid var(--frame); background:var(--bg1); }
.season-menu-year { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.season-menu-year label { font-size:12px; color:var(--mut); }
.season-menu-links { display:grid; grid-template-columns:1fr 1fr; gap:8px; padding-bottom:12px; margin-bottom:12px; border-bottom:1px dashed var(--rule); }
#pgtools .season-menu .iconbtn { width:100%; min-width:0; height:44px; min-height:44px; font-size:13px; }
#pgtools .season-menu #season-edit { color:var(--mut); }
@media (max-width:1300px) {
  body.desk #topbar .tb-l { min-width:270px; }
  body.desk #topbar .brand-mark { width:32px; height:38px; }
  body.desk #topbar .brand-lockup strong { font-size:13px; }
  body.desk #topbar .rname { font-size:11px; }
  body.desk #topbar #flags { flex-basis:150px; width:150px; padding-left:5px; padding-right:5px; }
  body.desk #topbar #clockbar { gap:7px; }
  body.desk .console-nav .pgtab { padding:0 9px; font-size:13px; }
  body.desk .console-nav .round-button { min-width:30px; padding:0 4px; font-size:12px; }
}
/* 特别长的场次在笔记本分成两组行，分站与关注仍在同一行。 */
@media (min-width:1181px) and (max-width:1380px) {
  body.desk .console-nav:has(.session-select[data-session-wide=true]) { display:grid; grid-template-columns:max-content minmax(0,1fr); gap:6px 10px; }
  body.desk .console-nav:has(.session-select[data-session-wide=true]) .pgtabs { grid-column:1; grid-row:1; }
  body.desk .console-nav:has(.session-select[data-session-wide=true]) .season-tools { grid-column:2; grid-row:1; padding-left:0; border-left:0; }
  body.desk .console-nav:has(.session-select[data-session-wide=true]) .session-select { width:100%; min-width:0; }
  body.desk .console-nav:has(.session-select[data-session-wide=true]) .round-switcher { grid-column:1; grid-row:2; padding-left:0; border-left:0; }
  body.desk .console-nav:has(.session-select[data-session-wide=true]) #watchwrap { grid-column:2; grid-row:2; min-width:0; }
}
@media (max-width:1180px) {
  body.desk #topbar { flex-wrap:wrap; }
  body.desk #topbar .tb-l { flex:1 1 350px; }
  body.desk #topbar .tb-r { order:-1; flex:1 0 100%; justify-content:flex-end; padding-bottom:6px; border-bottom:1px dashed var(--rule); }
  body.desk #topbar #flags { flex:0 0 190px; width:190px; }
  body.desk .console-nav { display:grid; grid-template-columns:max-content minmax(0,1fr); gap:6px 10px; }
  body.desk .console-nav .pgtabs { grid-column:1; grid-row:1; }
  body.desk .console-nav .season-tools { grid-column:2; grid-row:1; padding-left:0; border-left:0; }
  body.desk .console-nav .session-select { flex:1; width:100%; min-width:0; max-width:none; }
  body.desk .console-nav .round-switcher { grid-column:1; grid-row:2; padding-left:0; border-left:0; }
  body.desk .console-nav #watchwrap { grid-column:2; grid-row:2; min-width:0; }
}
body.mob #pagebar { gap:0; padding:0; }
body.mob #topbar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:calc(10px + env(safe-area-inset-top)) 12px 10px; }
body.mob #topbar .tb-l { grid-column:1 / -1; width:100%; min-width:0; }
body.mob #topbar .tb-r { order:-1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-column:1 / -1; gap:6px; width:100%; margin:0 0 2px; padding:0 0 10px; border-bottom:1px dashed var(--rule); }
body.mob #topbar #pgtools { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); grid-column:1 / -1; gap:5px; width:100%; }
body.mob #topbar #pgtools>.iconbtn,body.mob #topbar #pgtools .season-disclosure>summary { width:100%; min-width:0; padding:0 4px; font-size:11px; justify-content:center; }
body.mob #topbar .season-disclosure { min-width:0; width:100%; }
body.mob #topbar #pgtools #editnote { position:fixed; }
body.mob #topbar #synctag,body.mob #topbar #gear { justify-content:center; width:100%; min-width:0; }
body.mob #topbar #fbadge { display:flex; align-items:center; justify-content:center; min-height:44px; width:100%; max-width:none; margin:0; font-size:10px; }
body.mob #topbar #xbadge:not(.hidden) { grid-column:1 / -1; max-width:none; }
body.mob #topbar>.tb-sp { display:none; }
body.mob #topbar #clockbar { grid-column:1; padding:7px 0 0; border:0; gap:6px; }
body.mob #topbar #clockbar .big { font-size:24px; }
body.mob #topbar #clockbar .clk-r .flag { font-size:9px; padding:3px; }
body.mob #topbar #clockbar .el { font-size:9px; }
body.mob #topbar #flags { grid-column:2; min-width:0; width:100%; min-height:52px; padding:5px; }
body.mob #topbar .rname { max-width:none; font-size:12px; }
body.mob .console-nav { display:flex; flex-direction:column; align-items:stretch; gap:7px; padding:7px 10px; }
body.mob .console-nav .season-tools { flex:none; width:100%; }
body.mob .console-nav .season-tools #station-select { min-width:0; width:100%; flex:1; }
body.mob .console-nav .round-switcher { flex:none; flex-direction:row; align-items:center; padding:0; }
body.mob .console-nav .round-label { flex:none; font-size:11px; }
body.mob .console-nav #station-buttons { flex:1; grid-template-columns:repeat(4,minmax(0,1fr)); }
body.mob .console-nav #watchwrap { width:100%; min-width:0; flex:none; padding:0; }
body.mob .console-nav .watchbar { min-height:44px; padding:5px 0; border:0; border-top:1px dashed var(--rule); }
body.mob .season-menu { right:auto; left:0; }
body.mob #pgtools .season-menu .iconbtn { padding:0 10px; }

/* 历史记录有独立、明确的来源状态；无历史状态时整条不占空间。 */
#historybar[hidden] { display:none!important; }
#historybar {
  display:flex; align-items:center; gap:10px 14px; min-width:0; min-height:44px;
  padding:4px 10px; border:1px solid var(--line2); border-left:2px solid var(--amber);
  background:var(--bg1); color:var(--mut); font:12px/1.5 var(--mono);
}
#historybar .historybar-copy { display:flex; flex:1 1 auto; flex-wrap:wrap; align-items:baseline; min-width:0; gap:4px 10px; }
#historybar strong { flex:none; color:var(--amber); font-size:12px; font-weight:600; }
#historybar .historybar-meta { min-width:0; color:var(--ink); overflow-wrap:anywhere; }
#historybar .historybar-note { padding-left:10px; border-left:1px dashed var(--rule); color:var(--dim); overflow-wrap:anywhere; }
#historybar button {
  display:inline-flex; flex:none; align-items:center; justify-content:center; min-height:44px;
  padding:0 12px; border:1px solid var(--line2); background:transparent; color:var(--cyan);
  font:12px var(--sans); line-height:1.2; white-space:nowrap; cursor:pointer;
}
#historybar button:hover { border-color:var(--cyan); background:var(--bg3); color:var(--ink); }
#historybar button[hidden] { display:none!important; }
body.desk:has(#historybar:not([hidden])) { grid-template-rows:auto auto auto minmax(0,1fr) auto; }
body.mob #historybar { flex-wrap:wrap; margin:8px 12px 0; gap:8px; padding:9px 10px; }
body.mob #historybar .historybar-copy { flex:1 1 100%; gap:4px 8px; }
body.mob #historybar .historybar-note { flex:1 1 100%; padding:0; border:0; }
body.mob #historybar button { margin-left:auto; }

/* 桌面固定一屏：壳层不由历史内容扩高，长列表在各自模块内保留可滚动明细。 */
body.desk { height:100dvh; min-height:0; max-height:100dvh; overflow:hidden; }
body.desk #stage { height:auto; min-height:0; max-height:100%; overflow:hidden; }
body.desk .mod { min-height:0; overflow:hidden; }
body.desk .mod>.mod-body { flex:1 1 auto; height:auto; min-height:0; max-height:none; overflow:auto; }
body.desk .pcon .mod-body { overflow:auto!important; }
body.desk .pcon .pc-name,body.desk .pcon .pc-drv { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; }
body.desk .pcon .pr-car .pk { flex-wrap:wrap; overflow:visible; white-space:normal; row-gap:2px; }
body.desk .pcon .pr-car .ctm { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; }
body.desk .pcon .pc-sum { white-space:normal; overflow:visible; text-overflow:clip; line-height:1.5; }
body.desk .pcon .pc-foot { flex-wrap:wrap; overflow:visible; white-space:normal; row-gap:3px; line-height:1.4; }
body.desk .pcon .pc-last { display:block; }
body.desk .pcon:is(.card-compact,.card-dense) .pc-hd { min-height:46px; margin-bottom:2px; padding:7px 10px; }
body.desk .pcon:is(.card-compact,.card-dense) .pc-no { font-size:20px; }
body.desk .pcon:is(.card-compact,.card-dense) .pc-name { font-size:15px; }
body.desk .pcon:is(.card-compact,.card-dense) .pc-pos { font-size:24px; }
body.desk .pcon:is(.card-compact,.card-dense) .pc-status { margin:0 10px 4px; padding:7px 0 9px; }
body.desk .pcon:is(.card-compact,.card-dense) .pc-status .pc-drv b { font-size:20px; }
body.desk .pcon:is(.card-compact,.card-dense) .pc-status>.pr-hero .pv { font-size:32px; }
body.desk .pcon:is(.card-compact,.card-dense) .pc-status>.pr-hero { padding:0 0 0 10px; }
body.desk .pcon:is(.card-compact,.card-dense) .pc-status .pk { font-size:11px; }
body.desk .pcon:is(.card-compact,.card-dense) .pc-rows { padding:0 10px; }
body.desk .pcon:is(.card-compact,.card-dense) .pr { padding:4px 0; line-height:1.35; }
body.desk .pcon:is(.card-compact,.card-dense) .pr-rel { margin-bottom:1px; }
body.desk .pcon:is(.card-compact,.card-dense) .pr-rel .pv { font-size:20px; }
body.desk .pcon:is(.card-compact,.card-dense) .pr-car .pv { font-size:13px; }
body.desk .pcon:is(.card-compact,.card-dense) .pk { font-size:11px; }
body.desk .pcon.card-compact .pc-spark { flex:1 0 96px; min-height:96px; margin-top:4px; padding:0 10px 3px; }
body.desk .pcon:is(.card-compact,.card-dense) .pc-sum { min-height:23px; padding:5px 10px 0; margin:0; font-size:11px; }
body.desk .pcon:is(.card-compact,.card-dense) .pc-foot { min-height:24px; padding:4px 10px; font-size:11px; gap:3px 6px; }
body.desk .pcon:is(.card-compact,.card-dense) .pc-last { min-height:24px; margin:0 10px; padding:4px 0; font-size:11px; line-height:1.4; }
body.desk .pcon.card-dense .pc-hd { min-height:44px; padding-top:6px; padding-bottom:6px; }
body.desk .pcon.card-dense .pc-status { padding-top:5px; padding-bottom:6px; margin-bottom:3px; }
body.desk .pcon.card-dense .pc-status .pc-drv b { font-size:18px; }
body.desk .pcon.card-dense .pc-status>.pr-hero .pv { font-size:30px; }
body.desk .pcon.card-dense .pr { padding:3px 0; }
body.desk .pcon.card-dense .pc-spark { flex:1 0 84px; min-height:84px; margin-top:3px; padding:0 10px 3px; }
/* 有历史状态条或较矮笔记本时，将留白让给关键字段与真实曲线。 */
body.desk .pcon.card-short .pc-hd { min-height:36px; padding:5px 8px; margin-bottom:1px; gap:5px; }
body.desk .pcon.card-short .pc-hd::before { height:22px; }
body.desk .pcon.card-short .pc-no { font-size:18px; }
body.desk .pcon.card-short .pc-name { font-size:13px; }
body.desk .pcon.card-short .pc-pos { font-size:20px; }
body.desk .pcon.card-short .pc-classification { gap:2px; }
body.desk .pcon.card-short .pc-laps { font-size:10px; }
body.desk .pcon.card-short .pc-status { margin:0 8px 2px; padding:4px 0; }
body.desk .pcon.card-short .pc-status .pc-drv b { font-size:16px; }
body.desk .pcon.card-short .pc-status>.pr-hero { gap:3px; padding:0 0 0 8px; }
body.desk .pcon.card-short .pc-status>.pr-hero .pv { font-size:26px; }
body.desk .pcon.card-short .pc-status .pk { font-size:10px; }
body.desk .pcon.card-short .pc-driver>.pk { margin-bottom:3px; }
body.desk .pcon.card-short .pc-rows { padding:0 8px; }
body.desk .pcon.card-short .pr { padding:2px 0; line-height:1.3; }
body.desk .pcon.card-short .pr-rel { margin-bottom:0; }
body.desk .pcon.card-short .pr-rel .pv { font-size:18px; }
body.desk .pcon.card-short .pr-car .pv { font-size:12px; }
body.desk .pcon.card-short .pk { font-size:10.5px; }
body.desk .pcon.card-short .pc-spark { flex:1 0 42px; min-height:42px; margin-top:2px; padding:0 8px 2px; }
body.desk .pcon.card-short .pc-sk { min-height:16px; font-size:10px; }
body.desk .pcon.card-short .pc-sum { min-height:20px; padding:3px 8px 0; font-size:10.5px; line-height:1.3; }
body.desk .pcon.card-short .pc-foot { min-height:20px; padding:3px 8px; font-size:10.5px; line-height:1.3; }
body.desk .pcon.card-short .pc-last { min-height:20px; margin:0 8px; padding:3px 0; font-size:10.5px; line-height:1.3; }
body.mob .pcon .mod-body { overflow:visible!important; }

/* 手机仍按真实内容展开，桌面保持固定网格。 */
body.mob:not(.editing) .mod.screen-expand { overflow:visible; }
body.mob:not(.editing) .screen-expand>.mod-body {
  flex:0 0 auto; height:auto; min-height:0; max-height:none!important; overflow:visible!important;
}
body.mob:not(.editing) .screen-expand :is(.qwrap,.dwrap,.fillwrap) { height:auto; min-height:0; max-height:none; overflow:visible; }
body.mob:not(.editing) .screen-expand :is(.qwrap.fill .pitq,.dwrap.fill .drow) { flex:0 0 auto; max-height:none; }
body.mob:not(.editing) .screen-expand :is(.pitq>div,.qnm,.qsub,.dhn,.dn,.dnums>div) {
  white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere;
}
body.mob:not(.editing) .screen-expand :is(.pitq.h,.drow.h,.psec) { position:static; }
body.mob:not(.editing) .screen-expand .prow .l1 { flex-wrap:wrap; row-gap:4px; }
body.mob:not(.editing) .screen-expand .prow :is(.pteam,.pdrv,.plag) { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; }
body.mob:not(.editing) .screen-expand .prow .pteam { flex:1 1 120px; min-width:min(100%,120px); }
body.mob:not(.editing) .screen-expand .prow .pdrv { flex:0 1 auto; max-width:100%; }
body.mob:not(.editing) .screen-expand .prow:not(.pflag) .l2,
body.mob:not(.editing) .screen-expand .prow .pdetail {
  display:block; overflow:visible; -webkit-line-clamp:unset; line-clamp:unset;
}
body.desk .mod:is([data-type=queue],[data-type=rqueue],[data-type=drivers],[data-type=rdrivers],[data-type=msgs],[data-type=rmsgs])>.mod-body { overflow:auto!important; }
@keyframes nm-race-title { 0%,12% { transform:translateX(0); } 88%,100% { transform:translateX(var(--race-travel,0px)); } }
@media (prefers-reduced-motion:reduce) {
  #topbar .rname { overflow-x:auto; scrollbar-width:thin; }
  #topbar .rname>span { transform:none!important; }
}
html[data-motion=reduce] #topbar .rname { overflow-x:auto; scrollbar-width:thin; }
html[data-motion=reduce] #topbar .rname>span { transform:none!important; }

/* 撤销提示宽度由视口确定；固定定位的自动宽度曾把手机文案挤成逐字竖排。 */
#relaybar { width:min(calc(100vw - 24px),720px); max-width:calc(100vw - 24px); }
body.mob #relaybar { flex-wrap:wrap; gap:8px; }
body.mob #relaybar>span { flex:1 1 100%; line-height:1.6; overflow-wrap:anywhere; }
body.mob #relaybar button { flex:1 1 auto; }


/* 本圈成绩单行右对齐；赛道空间优先用于真实图形。 */
.trow .c-last { flex-direction:row; align-items:center; justify-content:flex-end; gap:0; }
.mod[data-type=track] .trkwrap { padding:2px; }


/* v70：顶栏收紧，归还数据区高度；手机仍保留44px操作区域。 */
body.desk #topbar { min-height:60px; padding:4px 10px; gap:8px; }
body.desk #topbar .brand-mark { width:32px; height:40px; }
body.desk #topbar .brand-lockup { gap:3px; }
body.desk #topbar .brand-lockup strong { font-size:14px; }
body.desk #topbar .rname { font-size:11px; line-height:1.3; }
body.desk #topbar #pgtools>.iconbtn,
body.desk #topbar #pgtools .season-disclosure>summary,
body.desk #topbar #gear,body.desk #topbar #synctag { height:36px; min-height:36px; }
body.desk #topbar #flags { min-height:36px; padding-top:2px; padding-bottom:2px; gap:0 5px; }
body.desk #topbar #flags .fhist { min-height:32px; }
body.desk #topbar>.tb-sp { height:28px; }
body.desk #pagebar { display:block; min-height:42px; }
body.desk .console-nav { flex:0 0 auto; min-height:0; padding:2px 6px; gap:6px; }
body.desk .console-nav .pgtabs { height:34px; align-self:center; padding:0; gap:0; }
body.desk .console-nav :is(.pgtab,.session-select,.round-button) { min-height:34px; height:34px; }
body.desk .console-nav .watchbar { min-height:34px; padding-top:2px; padding-bottom:2px; }

/* 中栏用可读紧凑行；原文、所有记录和数字列均保留。 */
body.desk .mod:is([data-type=flow],[data-type=queue],[data-type=msgs],[data-type=rqueue],[data-type=rmsgs])>.mod-hd { min-height:30px; padding:3px 6px; gap:4px; }
body.desk .mod:is([data-type=flow],[data-type=queue],[data-type=msgs],[data-type=rqueue],[data-type=rmsgs])>.mod-hd .r { white-space:normal; overflow:visible; text-overflow:clip; line-height:1.25; }
body.desk .mod:is([data-type=msgs],[data-type=rmsgs]) .mod-tabs button { min-height:22px; padding:1px 4px; }
body.desk .mod:is([data-type=queue],[data-type=rqueue]) .pitq { grid-template-columns:24px minmax(0,1fr) 44px 28px; gap:4px; padding:3px 6px; font-size:11px; }
body.desk .mod:is([data-type=queue],[data-type=rqueue]) .pitq.h { padding-top:2px; padding-bottom:2px; font-size:10px; }
body.desk .mod:is([data-type=queue],[data-type=rqueue]) .qnm { line-height:1.15; white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; }
body.desk .mod:is([data-type=queue],[data-type=rqueue]) .qnm b { font-size:12px; }
body.desk .mod:is([data-type=queue],[data-type=rqueue]) .qsub { font-size:10px; line-height:1.2; white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; }
body.desk .mod[data-type=flow] .frow { grid-template-columns:36px 22px minmax(0,1fr) 38px 40px; gap:4px; padding:4px 6px; }
body.desk .mod[data-type=flow] .fnm { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; }
body.desk .mod[data-type=flow]>.mod-sub { padding:3px 6px; gap:6px; flex-wrap:wrap; }
body.desk .mod:is([data-type=msgs],[data-type=rmsgs]) .prow { padding:6px; }
body.desk .mod:is([data-type=msgs],[data-type=rmsgs]) .prow .l1 { flex-wrap:wrap; gap:3px 5px; }
body.desk .mod:is([data-type=msgs],[data-type=rmsgs]) .prow .pteam { flex:1 1 55px; white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; }
body.desk .mod:is([data-type=msgs],[data-type=rmsgs]) .prow .plag { margin-left:auto; }
.prow:not(.pflag) .l2 { display:block; overflow:visible; -webkit-line-clamp:unset; line-clamp:unset; overflow-wrap:anywhere; }
body.desk .mod:is([data-type=msgs],[data-type=rmsgs]) .prow .l2 { font-size:11px; line-height:1.45; }
body.desk .mod:is([data-type=flow],[data-type=queue],[data-type=msgs],[data-type=rqueue],[data-type=rmsgs]) .empty { padding:12px 8px; line-height:1.5; }
@media (max-width:1300px) {
  body.desk .mod:is([data-type=flow],[data-type=queue],[data-type=msgs],[data-type=rqueue],[data-type=rmsgs])>.mod-hd h3 { font-size:11px; }
  body.desk .mod:is([data-type=flow],[data-type=queue],[data-type=msgs],[data-type=rqueue],[data-type=rmsgs])>.mod-hd .r { font-size:9px; }
}
@media (max-height:760px) {
  body.desk .mod:is([data-type=queue],[data-type=rqueue]) .pitq { padding-top:1px; padding-bottom:1px; line-height:1.1; }
  body.desk .mod:is([data-type=queue],[data-type=rqueue]) .qnm { line-height:1; }
  body.desk .mod:is([data-type=queue],[data-type=rqueue]) .qsub { line-height:1.1; }
}

/* 独立仪表盘入口放在资料菜单，不挤占比赛导航。 */
.season-menu .cockpit-entry{display:flex;align-items:center;justify-content:center;text-decoration:none;min-height:44px;margin-top:6px;border:1px solid var(--line2);color:var(--cyan)}

/* 排行仅调整标题/表头与底边，不改变网格、数据列或行高。 */
.mod[data-type=rank]>.mod-hd h3{position:absolute;left:50%;transform:translateX(-50%);max-width:calc(100% - 160px);text-align:center;pointer-events:none}
.mod[data-type=rank]>.mod-hd .r{margin-left:auto}
.mod[data-type=rank] .trow.h>div{text-align:center;justify-content:center}
.mod[data-type=rank] .trow:not(.h){position:relative}
.mod[data-type=rank] .rank-lap-progress{position:absolute;left:0;right:0;bottom:0;width:100%;height:2px;background:var(--mut);transform-origin:left center;pointer-events:none;opacity:.65}
.mod[data-type=rank] .trow.me .rank-lap-progress{background:var(--accent);opacity:.95}
.mod[data-type=rank] .trow.rv .rank-lap-progress{background:var(--rival);opacity:.85}
.mod[data-type=rank] .rank-lap-progress[data-state=frozen]{opacity:.32}
.mod[data-type=rank] .rank-lap-progress[hidden]{display:none}
