/* Scoped UI; leaves the renderer, HUD and shared site controls to their owners. */
.bt-ui { --ui-bg:#101d29; --ui-panel:#1a2c3b; --ui-line:#455c70; --ui-ink:#f5f5eb; --ui-muted:#bbced0; --ui-accent:#ffb22e; --ui-display:"Avenir Next Condensed","Arial Narrow","Roboto Condensed",system-ui,sans-serif; position:fixed; inset:0; z-index:100; pointer-events:none; color:var(--ui-ink); font:500 16px/1.45 system-ui,-apple-system,"Segoe UI",sans-serif; }
.bt-ui *, .bt-ui *::before, .bt-ui *::after { box-sizing:border-box; }
.bt-ui [hidden] { display:none !important; }
.bt-ui button,.bt-ui input,.bt-ui select { font:inherit; }
.bt-ui button,.bt-ui select,.bt-ui input { min-height:44px; }
.bt-ui button { min-width:44px; padding:10px 16px; border:1px solid #647c82; border-radius:10px; background:#243b45; color:var(--ui-ink); cursor:pointer; line-height:1.25; transition:background 140ms,transform 140ms,border-color 140ms,box-shadow 140ms; }
.bt-ui button:hover { background:#335361; border-color:#c0d3cf; }
.bt-ui button:active { transform:translateY(2px) scale(.98); background:#42647a; }
.bt-ui button.bt-primary:active { background:#e99a18; }
.bt-ui button:disabled { opacity:.55; cursor:default; transform:none; }
.bt-ui button[aria-pressed="true"] { border-color:var(--ui-accent); box-shadow:inset 0 0 0 2px var(--ui-accent); }
.bt-ui :focus-visible { outline:3px solid #fff2a9; outline-offset:3px; }
.bt-ui .bt-primary { background:var(--ui-accent); border-color:var(--ui-accent); color:#172329; font-weight:850; }
.bt-ui .bt-primary:hover { background:#ffe0a0; }
.bt-overlay { position:absolute; inset:0; padding:calc(64px + env(safe-area-inset-top)) calc(20px + env(safe-area-inset-right)) calc(72px + env(safe-area-inset-bottom)) calc(20px + env(safe-area-inset-left)); background:#071319b8; backdrop-filter:blur(8px); display:flex; align-items:center; justify-content:safe center; overflow-y:auto; pointer-events:auto; touch-action:pan-y; }
.bt-panel { position:relative; display:flex; flex-direction:column; max-height:100%; width:min(1050px,100%); background:var(--ui-bg); border:1px solid var(--ui-line); border-radius:22px; box-shadow:0 24px 80px #0008; overflow:hidden; isolation:isolate; }
.bt-panel.bt-enter { animation:bt-enter 180ms ease-out; }
.bt-panel.bt-pause,.bt-panel.bt-reset,.bt-panel.bt-info,.bt-panel.bt-rules,.bt-panel.bt-result,.bt-panel.bt-history { max-width:660px; }
.bt-heading { display:flex; gap:20px; align-items:center; justify-content:space-between; padding:22px 26px 16px; border-bottom:1px solid #52697060; flex:none; }
.bt-heading h1 { margin:0; font-size:clamp(24px,4vw,38px); letter-spacing:.035em; line-height:1.08; }
.bt-heading .bt-small { font-size:14px; flex:none; }
.bt-body { overflow-y:auto; overscroll-behavior:contain; padding:20px 26px; min-height:0; scrollbar-color:#6d929c #15252b; touch-action:pan-y; -webkit-user-select:text; user-select:text; }
.bt-body>p:first-child { margin-top:0; }
.bt-ui h1,.bt-ui h2,.bt-ui h3 { font-family:var(--ui-display); font-stretch:condensed; font-weight:900; text-transform:uppercase; letter-spacing:.035em; }
.bt-ui h2 { font-size:19px; margin:0 0 12px; }
.bt-ui h3 { font-size:30px; line-height:1.15; margin:12px 0; }
.bt-ui p { margin:10px 0 16px; }
.bt-ui .bt-muted { color:var(--ui-muted); font-size:14px; }
.bt-actions { position:relative; flex:none; display:flex; gap:12px; justify-content:space-between; align-items:center; padding:16px 26px; background:#13232b; border-top:1px solid #52697070; }
.bt-actions>div { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.bt-actions>div:last-child { justify-content:flex-end; margin-left:auto; }
.bt-segments { display:flex; gap:8px; flex-wrap:wrap; }
.bt-segments button { flex:1; }
.bt-track-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.bt-ui .bt-track { text-align:left; display:flex; flex-direction:column; align-items:stretch; padding:0; border:1px solid #455c70; border-radius:14px; background:#1a2c3b; overflow:hidden; }
.bt-ui .bt-track:hover { transform:translateY(-3px); box-shadow:0 8px 20px #0005; }
.bt-ui .bt-track:active { transform:translateY(1px); }
.bt-ui .bt-track[aria-pressed="true"] { border-color:var(--ui-accent); box-shadow:0 0 0 2px var(--ui-accent),0 8px 24px #0005; background:#283b49; }
.bt-track-image { position:relative; display:block; width:100%; height:112px; background:#304557; overflow:hidden; }
.bt-track-art { display:block; width:100%; height:100%; object-fit:cover; pointer-events:none; }
.bt-track-image::after { content:''; position:absolute; inset:0; background:linear-gradient(transparent 40%,#0b192acc); }
.bt-track-content { display:flex; flex-direction:column; align-items:flex-start; gap:9px; padding:16px; flex:1; }
.bt-track strong { font:900 24px/1.1 var(--ui-display); text-transform:uppercase; letter-spacing:.02em; }
.bt-track-num { position:absolute; left:14px; bottom:12px; z-index:1; text-transform:uppercase; font-weight:850; font-size:12px; letter-spacing:.12em; color:#fff; text-shadow:0 1px 4px #000; }
.bt-track small { font-size:12px; }
.bt-difficulty { display:flex; flex-wrap:wrap; gap:4px; align-items:center; color:var(--track-color); }
.bt-difficulty i { width:8px; height:12px; background:#101c29; border:1px solid #71838e; border-radius:2px; }
.bt-difficulty i.is-filled { background:currentColor; border-color:currentColor; }
.bt-difficulty small { margin-left:4px; color:var(--ui-muted); }
.bt-locked .bt-track-art { filter:grayscale(1); opacity:.45; }
.bt-lock-line { color:#e9dcb8; font-size:14px; margin-top:auto; padding-top:8px; }
.bt-ui .bt-locked { background:#18272d; }
.bt-medal,.bt-rarity { display:inline-flex; gap:7px; align-items:center; border:1px solid currentColor; border-radius:6px; padding:3px 9px; font-weight:750; font-size:14px; }
.medal-0 { color:#bdced2; }.medal-1 { color:#edb18a; }.medal-2 { color:#d1e7ee; }.medal-3 { color:#ffda72; }
.bt-ui .common { color:#8ce6a4; }.bt-ui .rare { color:#8bbdff; }.bt-ui .epic { color:#d3a2ff; }.bt-ui .ultra { color:#ffdc74; }
.bt-garage-grid { display:grid; grid-template-columns:1.2fr 1fr; gap:18px; align-items:start; }
.bt-garage-card { transition:transform 160ms,border-color 160ms; background:linear-gradient(145deg,#22394a,#142330); border:1px solid #4d6870; border-radius:16px; padding:20px; min-width:0; }
.bt-garage-card:hover { transform:translateY(-2px); border-color:#8b9fb2; }
.bt-carousel { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:18px; }
.bt-carousel>span { color:var(--ui-muted); font-variant-numeric:tabular-nums; }
.bt-stats { display:grid; grid-template-columns:1fr 1fr; gap:14px 20px; }
.bt-stats>div { display:grid; grid-template-columns:1fr auto; gap:3px; font-size:13px; }
.bt-stats dt { color:var(--ui-muted); }.bt-stats dd { margin:0; font-weight:800; }
.bt-stats meter { width:100%; height:9px; grid-column:1/-1; border:0; background:#0b1920; border-radius:9px; }
.bt-stats meter::-webkit-meter-bar { border:0; background:#0b1920; height:9px; }
.bt-stats meter::-webkit-meter-optimum-value { background:#9ecab6; }
.bt-stats meter::-moz-meter-bar { background:#9ecab6; }
.bt-setting { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:12px 0; border-bottom:1px solid #52697050; }
.bt-setting input[type="checkbox"] { appearance:none; width:50px; height:44px; border:1px solid #7e969d; background:#0b1920; border-radius:9px; flex:none; cursor:pointer; }
.bt-setting input[type="checkbox"]:checked { background:var(--ui-accent); }
.bt-setting input[type="checkbox"]:checked::after { content:'✓'; display:block; text-align:center; color:#13232b; font-size:28px; font-weight:900; }
.bt-setting select,.bt-reset-label input { background:#233b45; color:var(--ui-ink); border:1px solid #839aa1; padding:8px 10px; border-radius:8px; max-width:55%; }
.bt-setting input[type="range"] { width:48%; accent-color:var(--ui-accent); }
.bt-setting-group { border-top:1px solid #52697070; margin-top:24px; padding-top:20px; }
.bt-key-row { padding:12px 0; border-bottom:1px solid #52697050; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.bt-key-row>div { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
.bt-key-message { color:#ffe09a; min-height:24px; }
/* controls: one table, a row per command (note: .bt-controls is the PANEL class for this screen, never reuse it) */
.bt-ctl { width:100%; border-collapse:collapse; font-size:15px; }
.bt-ctl th, .bt-ctl td { padding:9px 12px; text-align:left; vertical-align:middle; border-bottom:1px solid #52697050; white-space:nowrap; }
.bt-ctl thead th { padding-top:0; font:800 12px/1.2 var(--ui-display); letter-spacing:.14em; text-transform:uppercase; color:#9fb6bc; border-bottom-color:#526970a0; }
.bt-ctl tbody th { font-weight:700; color:#f4f1e8; width:30%; }
.bt-ctl td { color:#d3e5e9; }
.bt-ctl kbd { display:inline-block; min-width:28px; margin:0 6px 0 0; padding:3px 7px; border-radius:7px; background:#ffffff14; border:1px solid #ffffff30; border-bottom-width:2px; font:700 14px/1.2 system-ui; text-align:center; color:#fff; }
.bt-ctl-touch { display:inline-block; padding:3px 9px; border-radius:8px; border:1px solid #ffffff30; font:700 13px/1.2 system-ui; }
.bt-ctl-tips { margin:16px 0 0; padding:0; list-style:none; display:grid; gap:6px; color:#d3e5e9; }
.bt-ctl-tips li::before { content:'›'; color:var(--ui-accent, #ffb22e); font-weight:800; margin-right:8px; }
.bt-ctl-foot { margin:12px 0 0; }
.bt-danger { border-color:#c4847d; }.bt-ui .bt-danger-button { background:#703c35; border-color:#e4a399; }
.bt-reset-label { display:grid; gap:12px; }.bt-reset-label input { max-width:100%; width:100%; }
.bt-menu-list { display:grid; gap:12px; }
.bt-rules { padding-left:24px; }.bt-rules li { margin:12px 0; }
.bt-result-body { text-align:center; }
.bt-medal-icon { display:inline-block; line-height:1; }
.bt-result-body>.bt-medal { display:inline-grid; justify-items:center; gap:12px; border:0; font:900 20px/1 var(--ui-display); text-transform:uppercase; letter-spacing:.14em; }
.bt-result-body .bt-medal-icon { position:relative; display:block; width:86px; height:86px; font-size:0; background:linear-gradient(135deg,#fff8 0%,transparent 38%,#fff9 47%,transparent 57%,#0005 100%),currentColor; box-shadow:inset 0 0 0 6px #fff3; }
.bt-result-body .medal-0 .bt-medal-icon { border:5px solid currentColor; border-radius:50%; background:transparent; }
.bt-result-body .medal-1 .bt-medal-icon { clip-path:polygon(50% 0,100% 100%,0 100%); }
.bt-result-body .medal-2 .bt-medal-icon { clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%); }
.bt-result-body .medal-3 .bt-medal-icon { clip-path:polygon(50% 0,61% 18%,82% 8%,83% 31%,100% 38%,88% 57%,97% 78%,74% 80%,64% 100%,47% 86%,25% 98%,23% 75%,2% 65%,17% 47%,7% 25%,31% 25%); }
.bt-time { font-size:clamp(54px,9vw,88px); font-variant-numeric:tabular-nums; line-height:1.05; font-weight:900; letter-spacing:-.055em; }
.bt-time span { display:block; font-size:12px; text-transform:uppercase; letter-spacing:.18em; color:var(--ui-muted); margin-bottom:8px; }
.bt-best { display:inline-block; color:#16232a; background:var(--ui-accent); padding:7px 16px; border-radius:6px; font-weight:900; text-transform:uppercase; letter-spacing:.08em; }
.bt-best-burst { animation:bt-best-burst 240ms ease-out; }
.bt-target { background:#263b4d; border:1px solid #4a6276; padding:14px; border-radius:10px; }
.bt-linefree { color:#c9d6e0; font-size:.92em; margin:6px 0 0; }.bt-linefree.new { color:#ffe27a; font-weight:800; animation:bt-lf-pop .6s ease-out; }
@keyframes bt-lf-pop { 0% { transform:scale(.8); opacity:0 } 60% { transform:scale(1.08); opacity:1 } 100% { transform:scale(1) } }
@media (prefers-reduced-motion: reduce) { .bt-linefree.new { animation:none } }
.bt-result .bt-primary { min-height:56px; }
.bt-panel.bt-pause { max-width:430px; }
.bt-pause .bt-menu-list { gap:8px; }
.bt-pause .bt-primary { min-height:56px; width:100%; }
.bt-pause .bt-actions>div:last-child { width:100%; }
.bt-targets { display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; }.bt-targets p { display:grid; gap:8px; }
.bt-info-message { font-size:24px; line-height:1.5; }
/* The title owns the viewport; content leaves the site's top-left way-out clear. */
.bt-ui[data-screen="title"] .bt-overlay { padding:0; background:#101d29; backdrop-filter:none; overflow:hidden; }
.bt-panel.bt-title { width:100%; height:100%; max-width:none; max-height:none; border:0; border-radius:0; background:#101d29; box-shadow:none; }
.bt-title-art { position:absolute; top:0; right:0; bottom:0; width:64%; overflow:hidden; z-index:-2; }
.bt-key-art { display:block; width:100%; height:100%; object-fit:cover; object-position:right center; transform-origin:right center; animation:bt-ken-burns 22s ease-in-out infinite alternate; }
.bt-title::before { content:''; position:absolute; inset:0; z-index:-1; pointer-events:none; background:linear-gradient(90deg,#101d29 20%,#101d29ee 37%,#101d2970 60%,#101d2900 82%),linear-gradient(0deg,#101d29ee,transparent 38%); }
.bt-title .bt-title-copy { flex:1; display:flex; flex-direction:column; padding:calc(84px + env(safe-area-inset-top)) 5vw 24px calc(5vw + env(safe-area-inset-left)); }
.bt-title-wordmark { width:55%; max-width:580px; text-shadow:0 3px 24px #0008; }
.bt-title h1 { font-size:clamp(60px,9vw,120px); line-height:.88; letter-spacing:-.035em; max-width:6ch; margin:0 0 24px; }
.bt-title .bt-eyebrow { font-size:clamp(20px,2.6vw,30px); line-height:1.2; font-weight:750; max-width:340px; }
.bt-title-tip { color:var(--ui-muted); max-width:290px; font-size:14px; }
.bt-title-links { display:flex; flex-wrap:wrap; gap:10px; width:52%; max-width:480px; margin-top:auto; padding-top:30px; }
.bt-title-links button { background:#132534df; backdrop-filter:blur(8px); }
.bt-title-links .bt-history-link { font-size:12px; color:var(--ui-muted); border-color:transparent; }
.bt-title .bt-actions { background:transparent; border:0; padding:0 calc(5vw + env(safe-area-inset-right)) calc(72px + env(safe-area-inset-bottom)) calc(5vw + env(safe-area-inset-left)); }
.bt-title .bt-title-ride { min-height:64px; min-width:240px; font:900 26px/1 var(--ui-display); text-transform:uppercase; letter-spacing:.14em; box-shadow:0 6px 32px #ffb22e24; }
.bt-gear-frame { position:relative; margin:20px 0; overflow:hidden; border-radius:18px; border:1px solid currentColor; isolation:isolate; }
.bt-bike-frame { background:radial-gradient(ellipse at 50% 40%,#fff,#d5dde0 78%); box-shadow:inset 0 0 28px #19334735; }
.bt-bike-frame::after { content:''; position:absolute; inset:0; pointer-events:none; border-radius:inherit; box-shadow:inset 0 0 24px #16293520; }
.bt-gear-art { display:block; width:100%; height:auto; object-fit:contain; }

.bt-rider-frame { width:min(100%,240px); margin:20px auto; background:currentColor; box-shadow:0 0 28px #ffffff08; }
.bt-rider-frame .bt-gear-art { opacity:.94; border:5px solid transparent; border-radius:inherit; }
/* Opaque JPEG backgrounds turn into a solid box at brightness(0).
   Preserve the subject outline with a dim monochrome treatment plus an explicit lock. */
.bt-gear-art.bt-silhouette { filter:grayscale(1) brightness(.3) contrast(1.4); }
.bt-rider-frame .bt-silhouette { filter:grayscale(1) brightness(.3) contrast(1.4) blur(2px); }
.bt-art-lock { position:absolute; inset:0; display:grid; place-items:center; font-size:34px; text-shadow:0 3px 16px #000; }
.bt-ui[data-screen="title"] .bt-toast { top:calc(72px + env(safe-area-inset-top)); bottom:auto; }
.bt-ride-help { position:absolute; right:calc(14px + env(safe-area-inset-right)); top:calc(194px + env(safe-area-inset-top)); pointer-events:auto; }
.bt-toast { pointer-events:none; position:absolute; right:calc(18px + env(safe-area-inset-right)); bottom:calc(76px + env(safe-area-inset-bottom)); max-width:min(430px,calc(100% - 36px)); background:#f0dfab; color:#172a31; border:1px solid #fff1c8; border-radius:12px; padding:14px 18px; box-shadow:0 10px 30px #0008; font-weight:750; }
@keyframes bt-enter { from { opacity:.6; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@keyframes bt-ken-burns { from { transform:scale(1); } to { transform:scale(1.045); } }
@keyframes bt-best-burst { from { opacity:0; transform:scale(.8); box-shadow:0 0 0 14px #ffb22e30; } to { opacity:1; transform:scale(1); box-shadow:0 0 0 0 #ffb22e00; } }
.bt-ui.bt-reduced *, .bt-ui.bt-reduced *::before, .bt-ui.bt-reduced *::after { animation:none !important; transition:none !important; transform:none !important; scroll-behavior:auto !important; }
@media(prefers-reduced-motion:reduce) { .bt-ui *,.bt-ui *::before,.bt-ui *::after { animation:none !important; transition:none !important; transform:none !important; scroll-behavior:auto !important; } }
@media(max-width:700px) {
  .bt-overlay { padding:calc(56px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) calc(70px + env(safe-area-inset-bottom)) calc(10px + env(safe-area-inset-left)); }
  .bt-heading { padding:18px 16px 14px; gap:12px; }.bt-heading .bt-small { max-width:120px; }
  .bt-body { padding:18px 16px; }.bt-actions { padding:12px 16px; gap:8px; }.bt-actions>div { gap:8px; }
  .bt-track-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }.bt-track-content { padding:14px; }.bt-track strong { font-size:19px; }
  .bt-garage-grid { grid-template-columns:1fr; }.bt-key-row { display:block; }.bt-key-row>div { justify-content:flex-start; margin-top:10px; }
  .bt-title-art { width:100%; height:72%; bottom:auto; }
  .bt-key-art { object-position:70% 30%; }
  .bt-title::before { background:linear-gradient(180deg,#101d29e6 0,#101d2999 30%,transparent 55%),linear-gradient(90deg,#101d29db,transparent 100%),linear-gradient(0deg,#101d29 2%,#101d29bb 22%,transparent 58%); }
  .bt-title .bt-title-copy { padding:calc(80px + env(safe-area-inset-top)) calc(24px + env(safe-area-inset-right)) 16px calc(24px + env(safe-area-inset-left)); }
  .bt-title-wordmark { width:100%; }
  .bt-title h1 { font-size:clamp(60px,18vw,96px); }
  .bt-title-tip { max-width:230px; }
  .bt-title-links { width:100%; max-width:400px; gap:8px; }
  .bt-title-links button { font-size:14px; }
  .bt-title .bt-actions { padding-right:calc(24px + env(safe-area-inset-right)); padding-left:calc(24px + env(safe-area-inset-left)); }
  .bt-title .bt-title-ride { min-width:200px; }
  .bt-segments { gap:4px; }.bt-segments button { padding:10px 7px; font-size:14px; }
  .bt-result .bt-actions { flex-wrap:wrap; }.bt-result .bt-actions>div:last-child { flex:1; }.bt-result .bt-actions button { padding:10px; }
}
@media(max-width:700px) {
  .bt-ctl thead { display:none; }
  .bt-ctl, .bt-ctl tbody, .bt-ctl tr { display:block; }
  .bt-ctl tr { padding:10px 0; border-bottom:1px solid #52697050; }
  .bt-ctl th, .bt-ctl td { display:flex; gap:10px; align-items:center; padding:3px 0; border:0; white-space:normal; width:auto; }
  .bt-ctl tbody th { width:auto; padding-bottom:6px; }
  .bt-ctl td::before { content:attr(data-label); min-width:84px; font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:#9fb6bc; }
}
@media(max-width:420px) { .bt-track-grid { grid-template-columns:1fr; }.bt-actions button { padding:10px 12px; }.bt-stats { gap:12px; }.bt-title-links .bt-history-link { flex-basis:100%; text-align:left; } }
@media(max-height:540px) { .bt-overlay { padding-top:calc(56px + env(safe-area-inset-top)); padding-bottom:calc(66px + env(safe-area-inset-bottom)); }.bt-heading { padding:10px 18px; }.bt-heading h1 { font-size:25px; }.bt-actions { padding:8px 18px; }.bt-title .bt-title-copy { padding-top:calc(64px + env(safe-area-inset-top)); }.bt-title h1 { font-size:54px; }.bt-pause .bt-primary { min-height:44px; }.bt-pause .bt-menu-list { grid-template-columns:1fr 1fr; }.bt-pause .bt-menu-list button:last-child { grid-column:1/-1; }.bt-title-tip { display:none; }.bt-title-links { padding-top:12px; }.bt-title .bt-actions { padding-bottom:calc(60px + env(safe-area-inset-bottom)); }.bt-title .bt-title-ride { min-height:56px; } }

@media(max-height:540px) and (min-width:601px) {
  .bt-title .bt-title-copy { padding-bottom:calc(72px + env(safe-area-inset-bottom)); }
  .bt-title h1 { max-width:none; font-size:48px; }
  .bt-title .bt-eyebrow { font-size:20px; }
  .bt-title-links { width:min(52%,calc(100% - 280px)); }
  .bt-title .bt-actions { position:absolute; right:0; bottom:0; padding-top:0; pointer-events:none; }
  .bt-title .bt-actions button { pointer-events:auto; }
}

/* track board on the finish card (filled by main.js; top 5 + your rank) */
.bt-board { margin:16px auto 0; max-width:380px; text-align:left; font-size:15px; }
.bt-board:empty { display:none; }
.bt-board h3 { margin:0 0 6px; font-size:13px; letter-spacing:.12em; text-transform:uppercase; color:#b9c2c9; text-align:center; }
.bt-board ol { list-style:none; margin:0; padding:0; }
.bt-board li { display:grid; grid-template-columns:26px 30px 1fr auto; align-items:center; gap:8px; min-height:34px; padding:2px 8px; border-radius:8px; }
.bt-board li.me { background:#ffb22e26; outline:1px solid #ffb22e66; }
.bt-board .rk { font-weight:800; color:#ffd23f; text-align:right; } .bt-board .av { width:26px; height:26px; display:grid; place-items:center; }
.bt-board .nm { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .bt-board .nm small { color:#b9c2c9; font-weight:600; margin-left:6px; }
.bt-board .tm { font-variant-numeric:tabular-nums; font-weight:800; }
.bt-board p { margin:8px 0 0; text-align:center; color:#d6dde3; font-size:14px; } .bt-board a { color:#ffd23f; }
/* wide screens: the finish card gets a second column for the board, so it is seen without scrolling */
@media (min-width: 900px) {
  .bt-panel.bt-result:has(.bt-board:not(:empty)) { max-width:960px; }
  .bt-result-body:has(.bt-board:not(:empty)) { display:grid; grid-template-columns:minmax(0,1fr) minmax(280px,360px); column-gap:28px; align-content:start; }
  .bt-result-body:has(.bt-board:not(:empty)) > * { grid-column:1; }
  .bt-result-body:has(.bt-board:not(:empty)) > .bt-best, .bt-result-body:has(.bt-board:not(:empty)) > .bt-medal { justify-self:center; }
  .bt-result-body > .bt-board:not(:empty) { grid-column:2; grid-row:1 / span 12; align-self:start; margin:4px 0 0; padding:14px 12px; border:1px solid #ffffff1f; border-radius:16px; background:#0b101666; }
}
/* Finish stats remain secondary to the time-based board. */
.bt-mx-result { margin:14px 0; padding:12px 16px; border:1px solid #ffffff28; border-radius:14px; background:#ffffff05; }
.bt-mx-result h2 { font-size:18px; margin:0 0 12px; }
.bt-mx-result dl { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px 10px; margin:0; }
.bt-mx-result dt { color:#c3cbd3; font-size:12px; }
.bt-mx-result dd { font-size:21px; margin:3px 0 0; }
.bt-mx-result small { display:block; color:#b9c2c9; font-size:11px; margin-top:3px; }
.bt-mx-result p { font-size:12px; margin:12px 0 0; color:#b9c2c9; }
.bt-ui .mx-more { margin:8px 0; }
.bt-ui .mx-more summary { min-height:44px; cursor:pointer; color:#ffce69; }
@media (max-width:600px) { .bt-mx-result dl { grid-template-columns:repeat(2,minmax(0,1fr)); } }
