:root {
  color-scheme: light;
  --ink: #182538;
  --muted: #51627a;
  --line: #d6dfeb;
  --paper: #f1f4f8;
  --panel: #fff;
  --dark: #101a29;
  --accent: #ae2037;
  --signal: #fa5469;
  --success: #235f43;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: #f3b6a87a; }
input, select, textarea { caret-color: var(--accent); }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .64; }
a { color: inherit; text-underline-offset: .2em; }
:focus-visible { outline: 3px solid #dd5941; outline-offset: 3px; }
::selection { background: #ffd7bf; color: var(--ink); }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
p { line-height: 1.65; }
small { font-size: .82rem; }
.muted { color: var(--muted); }
.numeric { font-family: "Consolas", ui-monospace, monospace; font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.loading { max-width: 900px; margin: 4rem auto; padding: 1.25rem; }
.bar { border-bottom: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.bar-inner { max-width: 1220px; margin: auto; min-height: 66px; padding: 10px 28px; display:flex; align-items:center; justify-content:space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration:none; white-space:nowrap; }
.brand img { width:34px; height:34px; }
.brand strong { font-size: 1.22rem; font-style: italic; font-weight: 900; letter-spacing: .025em; }
.brand span { color: var(--muted); border-left: 1px solid var(--line); padding-left: .75rem; font-size: .8rem; }
.bar-tools { display: flex; align-items:center; justify-content:flex-end; gap: .65rem; }
.bar-tools a { color: var(--ink); font-size: .83rem; }
.tag { display:inline-flex; align-items:center; align-self:center; gap:.45rem; padding:.28rem .65rem; border:1px solid var(--line); border-radius:99px; font-size:.81rem; font-weight:650; color: var(--muted); white-space:nowrap; }
.bar .tag { border-color: var(--line); color: var(--muted); }
.tag.live { color:var(--success); background:#eef6ef; border-color:#c8decf; }
.tag.busy { color:#913516; background:#fff0e7; border-color:#f1cec0; }
.shell { width: min(100% - 56px, 1164px); margin: 0 auto; }
.hero { color:#fbfbef; background:var(--dark); overflow:hidden; position:relative; isolation:isolate; }
.hero-inner { padding: clamp(3.25rem, 7vw, 6rem) 0 clamp(3.25rem, 6vw, 5rem); position:relative; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 5rem); font-weight:900; line-height:1.06; letter-spacing:-.04em; max-width: min(66%, 730px); text-wrap:balance; }
.hero h1 span { display:block; color:#ff836a; }
.hero p { margin-top:1.3rem; color:#d7dbcd; font-size:1rem; max-width: 42ch; }
.stripe { position:absolute; z-index:-1; right: -17vw; top:-14rem; width:min(63vw,1000px); height:48rem; transform:skew(-18deg); background:#17283f; }
.stripe::before { content:""; position:absolute; inset:0 auto 0 0; width:15px; background:var(--signal); }
.stripe::after { content:""; position:absolute; width: 10rem; height: 9rem; inset:16rem auto auto 2.1rem; background: conic-gradient(#334965 25%, #1e3049 0 50%, #334965 0 75%, #1e3049 0) 0 0 / 60px 60px; }
.home-grid { padding: 2.15rem 0 3rem; display:grid; grid-template-columns: minmax(14rem, 1fr) minmax(0, 2fr); gap: clamp(1.2rem,5vw,4.1rem); }
.home-grid h2 { font-size:1.5rem; margin-bottom:.9rem; }
.route-list { border-top:1px solid var(--line); }
.route { display:grid; grid-template-columns: 40px 1fr auto; align-items:center; gap: .9rem; padding:1.15rem .4rem; border-bottom: 1px solid var(--line); text-decoration:none; }
.route:hover { background:#e6edf7; }
.route strong { display:block; font-size:1.08rem; }
.route small { display:block; color:var(--muted); margin-top:.22rem; }
.route .link-label { color:var(--accent); font-size:.86rem; font-weight:750; }
.route-mark { width:36px; height:36px; border:1px solid #d8dacf; display:grid; place-items:center; border-radius:9px; color:var(--accent); }
.route-mark svg { width:19px; height:19px; }
.page { padding: clamp(1.45rem,4vw,3rem) 0 3rem; }
.heading { display:flex; justify-content:space-between; align-items:end; gap:1rem; margin-bottom:1.5rem; }
.heading h1 { font-size:clamp(1.9rem, 4vw, 3rem); line-height:1.15; letter-spacing:-.035em; }
.heading p { margin-top:.48rem; color:var(--muted); }
.subheading { display:flex; align-items:center; justify-content:space-between; gap:.6rem; margin-bottom:1.1rem; }
.subheading h2 { font-size:1.24rem; }
.columns { display:grid; grid-template-columns:minmax(0, 1.65fr) minmax(15rem, 1fr); gap:1.35rem; align-items:start; }
.panel { background:var(--panel); padding:clamp(1rem, 3vw, 1.75rem); border:1px solid var(--line); border-radius:14px; min-width:0; }
.panel h2 { font-size:1.36rem; line-height:1.25; }
.panel > h2 + p { margin-top:.65rem; }
.panel + .panel { margin-top:1rem; }
.plain-flow { display:grid; gap:1rem; }
.plain-flow .panel + .panel { margin-top:0; }
.rules { margin:.85rem 0 0; padding-left:1.5rem; color:var(--muted); }
.rules li { margin:.58rem 0; line-height:1.55; }
.field { display:grid; gap:.45rem; margin:1rem 0; }
.field label, .label { font-size:.92rem; font-weight:700; }
input:not([type=file]), select, textarea { width:100%; min-width:0; min-height:46px; padding:.64rem .75rem; color:var(--ink); background:#fff; border:1px solid #c7cdc2; border-radius:8px; }
input::placeholder, textarea::placeholder { color:#666f65; }
input[type=file] { width:100%; max-width:100%; color:var(--muted); padding:.55rem 0; }
input[type=file]::file-selector-button { padding:.58rem .75rem; margin-right:.55rem; background:#f1f2eb; color:var(--ink); border:1px solid var(--line); border-radius:7px; cursor:pointer; }
textarea { resize: vertical; min-height:76px; }
.button { text-decoration:none; display:inline-flex; justify-content:center; align-items:center; gap:.45rem; padding:.67rem 1rem; min-height:44px; background:var(--accent); color:white; border:1px solid transparent; border-radius:8px; font-weight:750; white-space:nowrap; }
.button:hover { background:#8d182c; }
.button.secondary { background:var(--panel); color:var(--ink); border-color:var(--line); }
.button.secondary:hover { background:#e9eff7; }
.button.subtle { background:transparent; color:inherit; border-color:currentColor; }
.button.subtle:hover { background:#ffffff18; }
.button.wide { width:100%; }
.actions { display:flex; flex-wrap:wrap; gap:.55rem; align-items:center; }
.actions.tight { gap:.42rem; }
.bottom-space { margin-bottom:1rem; }
.top-space { margin-top:1rem; }
.feedback { color:#902f21; font-size:.9rem; font-weight:650; margin-top:.55rem; }
.feedback:empty { margin:0; }
.empty { padding:1.35rem 0; color:var(--muted); }
.ticket { text-align:center; }
.ticket h2 { overflow-wrap:anywhere; }
.ticket-meta { font-size:.92rem; margin-top:.55rem; }
.qr { display:block; width:min(100%, 184px); aspect-ratio:1; background:white; border:1px solid #dfe2d7; border-radius:8px; margin:1rem auto .6rem; }
.ticket-code { margin:.35rem 0 .7rem; font-size:clamp(2.2rem, 8vw, 3.75rem); font-weight:800; letter-spacing:.13em; padding-left:.13em; line-height:1; }
.note { padding:.8rem 0 0; color:var(--muted); font-size:.88rem; line-height:1.6; }
.login { max-width:455px; }
.toolbar { display:flex; align-items:end; justify-content:space-between; gap:.85rem; margin-bottom:1rem; }
.toolbar .field { margin:0; width:min(100%, 245px); }
.tabs { display:flex; border-bottom:1px solid var(--line); gap:1.3rem; margin-bottom:1rem; }
.tabs button { background:transparent; border:none; border-bottom:3px solid transparent; border-radius:0; color:var(--muted); padding:.58rem .1rem .72rem; font-weight:740; }
.tabs button[aria-selected=true] { color:var(--accent); border-bottom-color:var(--accent); }
.queue { list-style:none; margin:0; padding:0; }
.queue li { display:grid; grid-template-columns: 1fr auto; align-items:center; gap:.6rem; border-top:1px solid var(--line); padding:.72rem 0; }
.queue strong { display:block; overflow-wrap:anywhere; }
.queue .numeric { display:block; color:var(--muted); font-size:.85rem; padding-top:.2rem; }
.queue li:first-child { border-top:0; padding-top:.25rem; }
.active-info { border-bottom:1px solid var(--line); padding-bottom:1rem; overflow-wrap:anywhere; }
.active-info h2 { margin:.5rem 0; font-size:clamp(1.7rem, 6vw, 2.65rem); letter-spacing:-.025em; }
.lap-fields { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:.55rem; }
.lap-fields .field { margin:.5rem 0; }
.lap-fields input { font-family: "Consolas", monospace; font-size:1.25rem; }
.proof-preview { max-width:min(100%, 250px); max-height:170px; object-fit:contain; border:1px solid var(--line); border-radius:6px; }
details > summary { cursor:pointer; font-weight:650; padding:.55rem 0; }
.history-list { list-style:none; padding:0; margin:.65rem 0 0; }
.history-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:.75rem; border-top:1px solid var(--line); padding:.85rem 0; }
.history-row strong { overflow-wrap:anywhere; }
.history-row p { font-size:.86rem; color:var(--muted); }
.history-row > div:last-child { text-align:right; }
.time { font-size:1.45rem; font-weight:850; }
dialog { width:min(calc(100% - 2rem), 500px); max-height:calc(100% - 2rem); border:1px solid var(--line); border-radius:14px; color:var(--ink); background:var(--panel); padding:1.35rem; }
dialog::backdrop { background:#101410bd; }
dialog video { width:100%; max-height:52vh; display:block; background:var(--dark); border-radius:8px; }
.notice { position:fixed; z-index:5; right:1.2rem; bottom:1.2rem; max-width:min(calc(100% - 2.4rem), 450px); color:#fbfcf5; background:#193f2e; border-radius:9px; padding:.85rem 1rem; box-shadow:0 9px 22px #0003; }
.notice.error { background:#812d21; }
.board { background:var(--dark); color:#f5f6e9; min-height:calc(100vh - 66px); }
.board .heading { align-items:center; }
.board .heading h1 { font-size:clamp(2rem, 5vw, 4rem); }
.board .heading p { color:#c0c6b8; }
.board .tag { color:#e5eadc; border-color:#50564b; }
.board-layout { display:grid; grid-template-columns:minmax(0,1fr) 235px; align-items:start; gap:1.45rem; }
.board-side { padding:1.2rem; border:1px solid #45493e; border-radius:12px; text-align:center; background:#20231c; }
.board-side h2 { font-size:1.15rem; }
.board-side .qr { margin-bottom:.65rem; }
.board-side a { color:#e3e6da; font-size:.83rem; }
.board-table { width:100%; border-collapse:collapse; table-layout:fixed; text-align:left; }
.board-table th { color:#d2d8c8; font-weight:700; padding:.75rem .7rem; border-bottom:2px solid var(--signal); }
.board-table td { padding:.9rem .7rem; border-bottom:1px solid #414639; overflow-wrap:anywhere; }
.board-table tbody tr:nth-child(even) { background:#21251e; }
.board-table tbody tr:first-child td:last-child { color:#ff856c; }
.board-table :is(th, td):first-child { width:20%; }
.board-table :is(th, td):last-child { text-align:right; width:37%; }
.board-table .driver { font-size:clamp(1rem, 2.15vw, 1.75rem); font-weight:750; }
.board-table .lap { font-size:clamp(1.15rem, 2.85vw, 2.15rem); font-weight:850; }
.board-table .empty-row { color:#c7cdbe; height:8.5rem; text-align:center !important; }
.board .button.subtle { border-color:#555c4b; }
.board footer { color:#c0c6b8; margin:1.15rem 0; font-size:.87rem; }
.board-table .driver a { text-decoration: none; }
.board-table .driver a:hover { text-decoration: underline; }
.board-table .driver small { display:block; font-size:.85rem; font-weight:550; color:#bad0e7; }
.board-layout.board-national { grid-template-columns:minmax(0,1fr); }
.board-side .latest-card { display:block; margin-top:.85rem; color:#ff9eab; }
.screen-mode { min-height:100vh; background:#101a29; color:#f5f8ff; }
.screen-mode .heading { padding-bottom:1.1rem; border-bottom:1px solid #3b4b60; }
.screen-mode .board-table td { padding-block:clamp(1rem, 3vh, 2.2rem); border-color:#3b4b60; }
.screen-mode .board-table tbody tr:nth-child(even), .board-side { background:#18263a; }
.screen-mode .button.subtle { border-color:#607792; }
.score-shell { max-width:780px; }
.score-card { border:1px solid var(--line); border-radius:14px; background:var(--panel); overflow:hidden; }
.score-card-head { display:flex; align-items:center; justify-content:space-between; gap:.7rem; padding:1.05rem 1.5rem; border-bottom:1px solid var(--line); }
.score-card-head > div { display:flex; align-items:center; gap:.65rem; }
.score-mark { width:15px; height:15px; flex:none; background:conic-gradient(var(--accent) 25%, transparent 0 50%, var(--accent) 0 75%, transparent 0); }
.score-center { display:grid; justify-items:center; text-align:center; padding:clamp(1.4rem,5vw,3rem) 1rem; }
.driver-name { display:flex; align-items:center; gap:.7rem; max-width:100%; }
.driver-name h2 { font-size:clamp(1.4rem, 4vw, 2.25rem); overflow-wrap:anywhere; }
.driver-avatar { display:grid; place-items:center; flex:none; width:48px; height:48px; border-radius:50%; color:#e6edf8; background:#243750; font-weight:750; }
.score-label { margin-top:1.1rem; color:var(--muted); font-size:.9rem; }
.score-value { font-size:clamp(2.55rem,9vw,5.55rem); font-weight:900; line-height:1.25; }
.score-rank { color:var(--accent); font-weight:750; margin-top:.25rem; }
.score-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1px; margin:0; background:var(--line); border-top:1px solid var(--line); }
.score-facts div { padding:1rem 1.5rem; background:#f3f6fa; }
.score-facts dt, .store-facts dt { color:var(--muted); font-size:.88rem; font-weight:650; }
.score-facts dd, .store-facts dd { margin:.28rem 0 0; overflow-wrap:anywhere; }
.score-actions { margin-top:1.15rem; }
.screen-card .score-shell { max-width:1000px; }
.screen-card .score-card { background:#162439; border-color:#3b4b60; }
.screen-card .score-card-head, .screen-card .score-facts { border-color:#3b4b60; }
.screen-card .score-facts { background:#3b4b60; }
.screen-card .score-facts div { background:#1a2c44; }
.screen-card :is(.heading p,.score-label,.score-facts dt) { color:#b9c8dc; }
.screen-card .score-rank { color:#ffa3af; }
.screen-card .score-value { font-size:clamp(3rem,13vw,8.4rem); }
.store-search { max-width:390px; margin-bottom:1.6rem; }
.store-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; }
.store-grid .panel { margin:0; }
.store-card { display:flex; flex-direction:column; }
.store-card .subheading { align-items:flex-start; }
.store-card h2 { font-size:1.2rem; overflow-wrap:anywhere; }
.store-card .actions { margin-top:auto; }
.store-facts { display:grid; gap:.78rem; margin:.4rem 0 1.3rem; }
.ticket-actions { justify-content:center; }
.hq-filters { display:grid; grid-template-columns:repeat(2,minmax(0,260px)); gap:1rem; margin-bottom:.8rem; }
.table-frame { overflow-x:auto; }
.hq-table { width:100%; border-collapse:collapse; text-align:left; }
.hq-table th { background:#edf3f9; color:#3d516c; font-weight:750; }
.hq-table :is(th,td) { padding:.85rem .7rem; border-bottom:1px solid var(--line); }
.hq-table td small { display:block; margin-top:.2rem; }
.hq-table td:first-child { color:var(--accent); font-weight:850; }
.hq-table td:last-child { white-space:nowrap; font-size:.9rem; }
.hq-lap { font-size:clamp(.93rem,2vw,1.25rem); font-weight:830; white-space:nowrap; }
.account-row { display:flex; flex-wrap:wrap; align-items:center; gap:.6rem; padding:.8rem 0; border-top:1px solid var(--line); }
.account-row > div:first-child { margin-right:auto; overflow-wrap:anywhere; }
.account-row p { font-size:.87rem; }
.account-row .button { font-size:.83rem; }

@media (max-width:760px) {
  .bar-inner { padding-inline:17px; min-height:60px; }
  .brand span { display:none; }
  .shell { width: min(100% - 34px, 1164px); }
  .home-grid, .columns { grid-template-columns:1fr; }
  .home-grid { gap:1.3rem; padding-top:1.3rem; }
  .hero-inner { padding-block:2.65rem; }
  .hero h1 { max-width:100%; }
  .stripe { right:-43vw; width:76vw; }
  .stripe::before { width:8px; }
  .stripe::after { display:none; }
  .heading { align-items:start; }
  .toolbar { align-items:start; }
  .board-layout { grid-template-columns:1fr; }
  .board-side { display:grid; grid-template-columns: 1fr 100px; column-gap:1rem; align-items:center; text-align:left; }
  .board-side .qr { grid-column:2; grid-row:1 / span 2; width:100px; margin:0; }
  .board .heading { flex-wrap:wrap; }
  .board-table :is(th, td) { padding-inline:.45rem; }
  .board-side .latest-card { grid-column:1; }
  .store-grid { grid-template-columns:1fr; }
  .hq-filters { grid-template-columns:1fr; gap:0; }
  .hq-table :is(th,td) { padding:.7rem .45rem; }
  .hq-table th { font-size:.82rem; }
  .hq-table td:last-child { font-size:.78rem; }
  .score-card-head, .score-facts div { padding-inline:.85rem; }
  .hq-accounts > section:last-of-type { grid-row:1; margin-top:0; }
}
@media (min-width:761px) and (max-width:1050px) {
  .store-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: no-preference) {
  .button, .route { transition: background-color 140ms ease-out; }
  .notice { animation: notice-in 190ms ease-out both; }
  @keyframes notice-in { from { transform:translateY(.35rem); opacity:.6; } }
}
