/* ---- self-hosted fonts (Round 15) — was Google Fonts <link>, now local, zero external requests.
   SIL Open Font License; licence text bundled at assets/fonts/OFL.txt. Hanken Grotesk and
   JetBrains Mono are variable fonts (wght axis) — one file per family covers all 3/2 weights below. */
@font-face{font-family:"Rajdhani"; font-style:normal; font-weight:500; font-display:swap; src:url("../assets/fonts/rajdhani-500-latin.woff2") format("woff2")}
@font-face{font-family:"Rajdhani"; font-style:normal; font-weight:600; font-display:swap; src:url("../assets/fonts/rajdhani-600-latin.woff2") format("woff2")}
@font-face{font-family:"Rajdhani"; font-style:normal; font-weight:700; font-display:swap; src:url("../assets/fonts/rajdhani-700-latin.woff2") format("woff2")}
@font-face{font-family:"Hanken Grotesk"; font-style:normal; font-weight:400; font-display:swap; src:url("../assets/fonts/hanken-grotesk-latin.woff2") format("woff2")}
@font-face{font-family:"Hanken Grotesk"; font-style:normal; font-weight:500; font-display:swap; src:url("../assets/fonts/hanken-grotesk-latin.woff2") format("woff2")}
@font-face{font-family:"Hanken Grotesk"; font-style:normal; font-weight:600; font-display:swap; src:url("../assets/fonts/hanken-grotesk-latin.woff2") format("woff2")}
@font-face{font-family:"JetBrains Mono"; font-style:normal; font-weight:400; font-display:swap; src:url("../assets/fonts/jetbrains-mono-latin.woff2") format("woff2")}
@font-face{font-family:"JetBrains Mono"; font-style:normal; font-weight:500; font-display:swap; src:url("../assets/fonts/jetbrains-mono-latin.woff2") format("woff2")}

:root{
  --bg:#12161d; --bg-deep:#0a0d12;
  --accent:#ff473d; --accent-deep:#d1342b; --accent-glow:rgba(255,71,61,.45);
  --text:#f2f4f8; --muted:#8b95a6; --faint:#5b6474;
  --glass:rgba(22,28,38,.42); --glass-2:rgba(30,37,49,.55);
  --hair:rgba(255,255,255,.09); --hair-2:rgba(255,255,255,.14);
  --radius:20px;
  --sans:"Hanken Grotesk",system-ui,sans-serif;
  --disp:"Rajdhani",system-ui,sans-serif;
  --mono:"JetBrains Mono",ui-monospace,monospace;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  font-family:var(--sans); color:var(--text); background:var(--bg-deep);
  -webkit-font-smoothing:antialiased; overflow:hidden;
}
.app{position:relative; width:100%; height:100vh; overflow:hidden}

/* ---- stage (live Three.js canvas since Round 2; the CSS bg + tint below stay visible
       through the transparent WebGL canvas) ---- */
.stage{position:absolute; inset:0; background:#0d1117}
.stage canvas{width:100%; height:100%; display:block; touch-action:none}
.stage img{width:100%; height:100%; object-fit:cover; object-position:58% 55%; display:block}
.stage img[hidden]{display:none}
.stage::after{ /* blue-black tint + vignette + red rim glow + light behind the dock so glass catches it */
  content:""; position:absolute; inset:0;
  background:
    radial-gradient(46% 60% at 15% 42%, rgba(120,150,210,.16), transparent 62%),
    radial-gradient(40% 46% at 12% 70%, rgba(255,71,61,.12), transparent 60%),
    radial-gradient(120% 90% at 62% 52%, rgba(255,71,61,.10), transparent 46%),
    radial-gradient(140% 120% at 50% 50%, transparent 40%, rgba(8,11,16,.55) 100%),
    linear-gradient(180deg, rgba(12,17,26,.35), rgba(9,12,18,.28));
  pointer-events:none;
  transition:opacity .4s ease;
}
/* Photo mode (Round 12): dims the red dock-glow so the backdrop reads as a
   neutral studio behind the clean product shot — bike lighting/HDRI untouched. */
body.photo-mode .stage::after{opacity:.55}

/* ---- top bar ---- */
.topbar{position:absolute; top:0; left:0; right:0; height:64px; z-index:5;
  display:flex; align-items:center; justify-content:space-between; padding:0 26px;
  background:linear-gradient(180deg, rgba(8,11,16,.55), transparent);}
.brand{display:flex; align-items:baseline; gap:10px}
.brand b{font-family:var(--disp); font-weight:700; font-size:22px; letter-spacing:.14em; color:var(--text)}
.brand b span{color:var(--accent)}
.brand small{font-family:var(--disp); font-weight:600; font-size:11px; letter-spacing:.34em; color:var(--faint)}
.top-actions{display:flex; gap:10px}
.ghost{font-family:var(--disp); font-weight:600; font-size:12px; letter-spacing:.16em; text-transform:uppercase;
  color:var(--muted); background:transparent; border:1px solid var(--hair); border-radius:999px;
  padding:9px 16px; cursor:pointer; transition:.18s}
.ghost:hover{color:var(--text); border-color:var(--hair-2); background:rgba(255,255,255,.04)}
.icon-btn{width:36px; height:36px; padding:0; display:inline-flex; align-items:center; justify-content:center}
.icon-btn svg{width:17px; height:17px}
/* Reset/Share carry a hidden icon alongside their label (Round 13) — invisible
   on desktop, swapped in for the label on mobile. Doesn't touch desktop layout. */
.btn-icon{display:none}

/* ---- glass primitive ---- */
.glass{position:relative;
  background:
    linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.03) 38%, rgba(255,255,255,0) 58%),
    var(--glass);
  backdrop-filter:blur(32px) saturate(1.5);
  -webkit-backdrop-filter:blur(32px) saturate(1.5);
  border:1px solid var(--hair-2); border-radius:var(--radius);
  box-shadow:0 24px 60px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.16),
    inset 0 0 24px rgba(255,255,255,.03);}
/* crisp top-edge glass highlight */
.glass::before{content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background:linear-gradient(180deg, rgba(255,255,255,.10), transparent 22%);
  -webkit-mask:linear-gradient(#000,transparent 40%); mask:linear-gradient(#000,transparent 40%);}

/* ---- left dock ---- */
.dock{position:absolute; top:80px; bottom:24px; left:24px; width:352px; z-index:6;
  display:flex; flex-direction:column; padding:22px; gap:20px;
  animation:dockIn .6s cubic-bezier(.22,1,.36,1) both}
@keyframes dockIn{from{opacity:0; transform:translateX(-18px)} to{opacity:1; transform:none}}

/* Mobile bottom-sheet bar (Round 13) — built here, shown only ≤820px below. */
.sheet-bar{display:none}

.dock-head .kicker{font-family:var(--disp); font-weight:600; font-size:11px; letter-spacing:.32em;
  text-transform:uppercase; color:var(--accent)}
.dock-head h1{font-family:var(--disp); font-weight:700; font-size:30px; letter-spacing:.02em; line-height:1.05; margin-top:6px}
.dock-head p{font-size:12.5px; color:var(--muted); margin-top:5px}

/* step tabs (underline, non-boxy) */
.tabs{display:flex; gap:22px; border-bottom:1px solid var(--hair); padding-bottom:0}
.tab{font-family:var(--disp); font-weight:600; font-size:13px; letter-spacing:.12em; text-transform:uppercase;
  color:var(--faint); padding:0 1px 12px; cursor:pointer; position:relative; transition:.18s}
.tab:hover{color:var(--muted)}
.tab.active{color:var(--text)}
.tab.active::after{content:""; position:absolute; left:0; right:0; bottom:-1px; height:2px;
  background:var(--accent); box-shadow:0 0 12px var(--accent-glow); border-radius:2px}

.section-label{font-family:var(--disp); font-weight:600; font-size:11px; letter-spacing:.28em;
  text-transform:uppercase; color:var(--faint); margin-bottom:12px}

/* per-tab content (Round 8) — only the active category's panel is shown */
.tab-panel{display:none}
.tab-panel.active{display:block}

/* paint swatches */
.swatches{display:flex; gap:12px; flex-wrap:wrap}
.sw{width:34px; height:34px; border-radius:50%; cursor:pointer; position:relative; transition:.18s;
  border:1px solid rgba(255,255,255,.12)}
.sw:hover{transform:scale(1.08)}
.sw.on{box-shadow:0 0 0 2px var(--bg-deep), 0 0 0 4px var(--accent), 0 0 16px var(--accent-glow)}
.paint-name{margin-top:12px; font-size:12.5px; color:var(--muted)}
.paint-name b{color:var(--text); font-weight:500}

/* option rows */
.opts{display:flex; flex-direction:column; gap:2px; margin-top:4px}
.opt{display:flex; align-items:center; gap:12px; padding:12px 4px; border-bottom:1px solid var(--hair);
  cursor:pointer; transition:.16s}
.opt:hover{padding-left:8px}
.opt .ic{width:34px; height:34px; border-radius:10px; display:grid; place-items:center;
  background:rgba(255,255,255,.05); border:1px solid var(--hair); color:var(--muted); flex:none}
.opt .ic svg{width:18px; height:18px}
.opt .txt{flex:1; min-width:0}
.opt .txt .n{font-size:13.5px; color:var(--text); font-weight:500}
.opt .txt .d{font-size:11.5px; color:var(--faint)}
.opt .pr{font-family:var(--mono); font-size:12.5px; color:var(--muted)}
.opt.sel .ic{background:rgba(255,71,61,.14); border-color:rgba(255,71,61,.4); color:var(--accent)}
.opt.sel .pr{color:var(--text)}

.spacer{flex:1}

/* footer total + cta */
.total{display:flex; align-items:baseline; justify-content:space-between; padding-top:16px;
  border-top:1px solid var(--hair-2)}
.total .lab{font-family:var(--disp); font-weight:600; font-size:11px; letter-spacing:.26em;
  text-transform:uppercase; color:var(--faint)}
.total .val{font-family:var(--mono); font-weight:500; font-size:26px; color:var(--text); letter-spacing:-.01em}
.cta{margin-top:16px; width:100%; border:none; cursor:pointer; border-radius:14px; padding:15px;
  font-family:var(--disp); font-weight:700; font-size:14px; letter-spacing:.16em; text-transform:uppercase;
  color:#fff; background:linear-gradient(180deg,var(--accent),var(--accent-deep));
  box-shadow:0 10px 30px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.25); transition:.18s}
.cta:hover{filter:brightness(1.07); transform:translateY(-1px)}

/* top-right build hud */
.hud{position:absolute; top:80px; right:24px; z-index:6; padding:16px 20px; text-align:right;
  animation:dockIn .6s .06s cubic-bezier(.22,1,.36,1) both}
.hud .lab{font-family:var(--disp); font-weight:600; font-size:10px; letter-spacing:.28em; text-transform:uppercase; color:var(--faint)}
.hud .big{font-family:var(--mono); font-weight:500; font-size:24px; margin-top:3px}
.hud .sub{font-size:11.5px; color:var(--muted); margin-top:2px}
.hud .sub b{color:var(--accent); font-weight:500}

/* camera controls bottom-right */
.cam{position:absolute; right:24px; bottom:24px; z-index:6; display:flex; flex-direction:column; gap:10px}
.cbtn{width:46px; height:46px; border-radius:14px; display:grid; place-items:center; cursor:pointer;
  color:var(--muted); transition:.18s}
.cbtn:hover{color:var(--text); border-color:var(--hair-2)}
.cbtn svg{width:19px; height:19px}

/* view toggle bottom center */
.view{position:absolute; bottom:26px; left:50%; transform:translateX(-50%); z-index:6;
  display:flex; gap:4px; padding:5px; border-radius:999px}
.view button, .presets button{font-family:var(--disp); font-weight:600; font-size:11px; letter-spacing:.18em; text-transform:uppercase;
  color:var(--muted); background:transparent; border:none; border-radius:999px; padding:9px 18px; cursor:pointer; transition:.16s}
.view button.on, .presets button.on{color:var(--text); background:rgba(255,255,255,.08)}
.view button:not(.on):hover, .presets button:not(.on):hover{color:var(--text)}

/* camera presets bar (Round 12): a compact pill just above the view toggle,
   visible in both 3D and Photo modes — reuses the .view button look above. */
.presets{position:absolute; bottom:78px; left:50%; transform:translateX(-50%); z-index:6;
  display:flex; gap:4px; padding:5px; border-radius:999px}
.presets button{padding:9px 15px}

/* photo mode (Round 12): fade the configurator chrome for a clean product shot —
   the view toggle + presets bar stay visible on purpose (always a way back). */
.dock, .hud, .cam, .top-actions{transition:opacity .35s ease}
body.photo-mode .dock, body.photo-mode .hud, body.photo-mode .cam, body.photo-mode .top-actions{
  opacity:0; pointer-events:none;
}

/* AR hint / status toast (Round 14): a small themed pill above the view toggle,
   used both for the "Preparing AR..." busy state (iOS export) and the desktop
   "open on your phone" hint. Never intercepts clicks. */
.ar-hint{position:absolute; bottom:130px; left:50%; transform:translateX(-50%) translateY(6px); z-index:7;
  padding:10px 18px; border-radius:999px; pointer-events:none; opacity:0; white-space:nowrap;
  font-family:var(--disp); font-weight:600; font-size:11px; letter-spacing:.06em; color:var(--text);
  transition:opacity .22s ease, transform .22s ease;}
.ar-hint.show{opacity:1; transform:translateX(-50%) translateY(0)}
.ar-hint.busy{color:var(--accent)}

.credit{position:absolute; left:24px; bottom:6px; z-index:6; font-size:10px; color:var(--faint); letter-spacing:.02em}
.credit a{color:var(--muted); text-decoration:none}

/* ---- loading overlay (real % via THREE onProgress, not a timer) ---- */
.loader{position:absolute; inset:0; z-index:8; display:flex; flex-direction:column; align-items:center;
  justify-content:center; gap:22px; pointer-events:none;
  background:radial-gradient(60% 60% at 50% 50%, rgba(10,13,18,.55), rgba(10,13,18,.82) 70%);
  transition:opacity .5s cubic-bezier(.22,1,.36,1);}
.loader.hidden{opacity:0; visibility:hidden}
.loader-ring-wrap{position:relative; width:96px; height:96px; display:grid; place-items:center}
.loader-ring{position:absolute; inset:0; width:96px; height:96px; transform:rotate(-90deg)}
.loader-ring .track{fill:none; stroke:rgba(255,255,255,.07); stroke-width:2.5}
.loader-ring .arc{fill:none; stroke:var(--accent); stroke-width:2.5; stroke-linecap:round;
  filter:drop-shadow(0 0 7px var(--accent-glow));
  transition:stroke-dashoffset .2s linear;}
.loader-pct{font-family:var(--mono); font-weight:500; font-size:19px; color:var(--text);
  font-variant-numeric:tabular-nums; line-height:1}
.loader-msg{font-family:var(--disp); font-weight:600; font-size:11px; letter-spacing:.32em; text-transform:uppercase;
  color:var(--muted)}
.loader.error .loader-ring{opacity:.3}
.loader.error .loader-pct{display:none}
.loader.error .loader-msg{color:var(--accent); letter-spacing:.04em; text-transform:none; font-size:13px; max-width:240px; text-align:center; line-height:1.5}

/* ---- hover part-name chip (Round 4) — follows the cursor, pointer-events:none so it
       never steals the pointermove the raycast reads from ---- */
.hover-chip{position:absolute; z-index:7; top:0; left:0; pointer-events:none;
  opacity:0; transform:translate(-50%,-140%) scale(.96); will-change:transform,opacity;
  transition:opacity .12s ease, transform .12s ease;
  font-family:var(--disp); font-weight:600; font-size:15px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--text); padding:9px 17px 9px 14px; border-radius:999px; white-space:nowrap;
  background:linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,.03) 40%, rgba(255,255,255,0) 60%), var(--glass-2);
  backdrop-filter:blur(20px) saturate(1.5); -webkit-backdrop-filter:blur(20px) saturate(1.5);
  border:1px solid var(--hair-2); box-shadow:0 8px 24px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.14);}
.hover-chip::before{content:""; display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--accent);
  box-shadow:0 0 8px var(--accent-glow); margin-right:9px; vertical-align:middle}
.hover-chip.show{opacity:1; transform:translate(-50%,-160%) scale(1)}

/* ---- build-log docs panel (Round 7) ---- */
.doclog-overlay{position:fixed; inset:0; z-index:20; display:none; align-items:center; justify-content:center;
  padding:24px; background:rgba(8,11,16,.55); opacity:0; transition:opacity .18s ease}
.doclog-overlay.open{display:flex; opacity:1}
.doclog-panel{position:relative; width:100%; max-width:560px; max-height:80vh; overflow-y:auto; padding:28px 30px}
.doclog-close{position:absolute; top:16px; right:16px; z-index:1; width:30px; height:30px; border-radius:999px; line-height:1;
  border:1px solid var(--hair); background:transparent; color:var(--muted); font-size:19px; cursor:pointer; transition:.18s}
.doclog-close:hover{color:var(--text); border-color:var(--hair-2); background:rgba(255,255,255,.04)}
.doclog-head .kicker{font-family:var(--disp); font-weight:600; font-size:11px; letter-spacing:.28em; text-transform:uppercase; color:var(--accent)}
.doclog-head h2{font-family:var(--disp); font-weight:700; font-size:26px; margin-top:6px}
.doclog-head p{font-size:12px; color:var(--muted); margin-top:6px}
.doclog-section{margin-top:20px}
.doclog-label{font-family:var(--disp); font-weight:600; font-size:11px; letter-spacing:.2em; text-transform:uppercase; color:var(--faint); margin-bottom:6px}
.doclog-row{display:flex; align-items:flex-start; gap:12px; padding:11px 2px; border-bottom:1px solid var(--hair)}
.doclog-row:last-child{border-bottom:none}
.doclog-pill{flex:none; font-family:var(--mono); font-size:11px; font-weight:500; padding:3px 9px; border-radius:999px; margin-top:1px; white-space:nowrap}
.doclog-pill.done{background:rgba(255,71,61,.16); color:var(--accent)}
.doclog-pill.next{background:rgba(255,255,255,.06); color:var(--muted); border:1px solid var(--hair)}
.doclog-txt .n{font-family:var(--disp); font-weight:600; font-size:14px; color:var(--text)}
.doclog-txt .d{font-size:11.5px; color:var(--muted); margin-top:2px}

/* ---- credits section (Round 15) — reuses .doclog-row/.doclog-pill/.doclog-txt, adds links ---- */
.doclog-pill.lic{background:rgba(255,255,255,.06); border:1px solid var(--hair)}
.doclog-pill.lic a{color:var(--muted)}
.doclog-txt .n a, .doclog-txt .d a{color:var(--text); text-decoration:underline; text-decoration-color:var(--hair-2); text-underline-offset:2px}
.doclog-txt .n a:hover, .doclog-txt .d a:hover, .doclog-pill.lic a:hover{color:var(--accent); text-decoration-color:var(--accent)}
.doclog-note{font-size:11.5px; color:var(--faint); margin-top:12px; font-style:italic}

/* ---- summary panel (Round 10) — reuses .doclog-overlay/.doclog-panel/.doclog-close
       for the scrim + centered glass shell + close button; everything below is new. ---- */
.summary-panel{max-width:520px; padding:0 0 26px; overflow:hidden}
.summary-hero{position:relative; height:190px;
  background:radial-gradient(90% 120% at 50% 12%, rgba(255,71,61,.14), transparent 62%),
    linear-gradient(180deg, #1b212b 0%, #0a0d12 100%);
  display:flex; align-items:center; justify-content:center;}
.summary-hero img{width:100%; height:100%; object-fit:contain; padding:16px 22px; box-sizing:border-box;
  filter:drop-shadow(0 16px 24px rgba(0,0,0,.55))}
.summary-hero-label{position:absolute; top:14px; left:18px; font-family:var(--disp); font-weight:600;
  font-size:10px; letter-spacing:.26em; text-transform:uppercase; color:var(--muted)}
.summary-head{padding:22px 30px 0}
.summary-head .kicker{font-family:var(--disp); font-weight:600; font-size:11px; letter-spacing:.28em;
  text-transform:uppercase; color:var(--accent)}
.summary-head h2{font-family:var(--disp); font-weight:700; font-size:26px; margin-top:6px}
.summary-head p{font-size:12px; color:var(--muted); margin-top:5px}
.summary-lines{padding:14px 30px 0}
.sum-row{display:flex; align-items:flex-start; justify-content:space-between; gap:12px;
  padding:11px 0; border-bottom:1px solid var(--hair)}
.sum-row .cat{font-family:var(--disp); font-weight:600; font-size:10px; letter-spacing:.22em;
  text-transform:uppercase; color:var(--faint)}
.sum-row .n{font-size:13.5px; color:var(--text); font-weight:500; margin-top:2px}
.sum-row .pr{font-family:var(--mono); font-size:12.5px; color:var(--muted); white-space:nowrap; margin-top:1px}
.sum-row.sum-empty{border-bottom:none; color:var(--faint); font-size:12px; padding-top:2px}
.summary-total{display:flex; align-items:flex-end; justify-content:space-between;
  margin:18px 30px 0; padding-top:16px; border-top:1px solid var(--hair-2)}
.summary-total .lab{font-family:var(--disp); font-weight:600; font-size:11px; letter-spacing:.26em;
  text-transform:uppercase; color:var(--faint)}
.summary-total .sub{font-size:11.5px; color:var(--muted); margin-top:2px}
.summary-total .sub b{color:var(--accent); font-weight:500}
.summary-total .val{font-family:var(--mono); font-weight:500; font-size:26px; color:var(--text); letter-spacing:-.01em}
.summary-actions{display:flex; gap:12px; margin:20px 30px 0}
.summary-actions .ghost{flex:1; border-radius:14px; padding:15px; text-align:center}
.summary-actions .cta{flex:1; margin-top:0; text-align:center}

@media (prefers-reduced-motion:reduce){*{animation:none!important; transition:none!important}}

/* =========================================================================
   MOBILE LAYOUT (Round 13) — ≤820px. Full-screen 3D + the existing .dock
   restyled as a bottom sheet (same DOM/tabs/options/functions, just
   repositioned — no duplicated markup, no duplicated JS).
   ⛔ Desktop (≥821px) is untouched: every rule below lives inside this query.
   ========================================================================= */
@media (max-width:820px){
  .hud, .cam{display:none}
  .credit{display:none} /* would sit under/through the bottom sheet — credit already lives in README/footer on desktop */

  /* ---- top bar: brand smaller, actions become icon-only ---- */
  .topbar{padding:0 14px; height:56px}
  .brand b{font-size:16px; letter-spacing:.1em}
  .brand small{display:none}
  .top-actions{gap:8px}
  .top-actions .ghost{width:36px; height:36px; padding:0; border-radius:999px;
    display:inline-flex; align-items:center; justify-content:center}
  .top-actions .btn-icon{display:block; width:16px; height:16px}
  .top-actions .btn-label{display:none}

  /* ---- camera presets + view toggle: compact pills stacked above the sheet ---- */
  .presets{bottom:150px; padding:4px}
  .view{bottom:100px; padding:4px}
  .presets button, .view button{padding:7px 11px; font-size:10px}
  .ar-hint{bottom:202px; font-size:10px; padding:8px 14px}
  body.sheet-open .presets, body.sheet-open .view{opacity:0; pointer-events:none; transition:opacity .25s ease}

  /* ---- .dock -> bottom sheet: collapsed shows only the sheet-bar,
         expanded (body.sheet-open) grows to ~58vh and reveals tabs/options/save ---- */
  .dock{
    top:auto; left:0; right:0; bottom:0; width:auto;
    max-height:84px; padding:0; gap:0; border-radius:22px 22px 0 0;
    overflow:hidden; transition:max-height .32s cubic-bezier(.22,1,.36,1);
  }
  body.sheet-open .dock{max-height:58vh; overflow-y:auto}

  .sheet-bar{display:flex; flex-direction:column; padding:12px 18px 16px; cursor:pointer; flex:none}
  .sheet-handle{width:36px; height:4px; border-radius:999px; background:var(--hair-2); margin:0 auto 10px}
  .sheet-bar-row{display:flex; align-items:center; gap:12px}
  .sheet-bar-info{flex:1; min-width:0}
  .sheet-bar-name{font-family:var(--disp); font-weight:700; font-size:15px; color:var(--text)}
  .sheet-bar-sub{font-size:11px; color:var(--muted); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
  .sheet-bar-total{font-family:var(--mono); font-weight:500; font-size:17px; color:var(--text); flex:none}
  .sheet-chevron{width:16px; height:16px; color:var(--muted); flex:none; transition:transform .3s ease}
  body.sheet-open .sheet-chevron{transform:rotate(180deg)}

  /* dock-head (desktop title block) is redundant with the sheet-bar name -> stays hidden.
     Everything else (tabs/panels/footer) is collapsed-only hidden, spacer isn't needed
     at all in the sheet (sizes to content, not pushed by flex:1). */
  .dock-head, .spacer{display:none}
  .tabs, .tab-panels, .dock-footer{display:none}
  body.sheet-open .tabs{display:flex}
  body.sheet-open .tab-panels{display:block}
  body.sheet-open .dock-footer{display:block}

  .tabs{padding:0 18px; overflow-x:auto; -ms-overflow-style:none; scrollbar-width:none}
  .tabs::-webkit-scrollbar{display:none}
  .tab-panels{padding:14px 18px 0}
  .dock-footer{padding:0 18px 18px}
  .dock-footer .total{display:none} /* total already lives in the sheet-bar — no dup */
  .dock-footer .cta{margin-top:0}

  /* ---- modals: near-full-screen bottom sheets on a phone instead of centered boxes ---- */
  .doclog-overlay{padding:0; align-items:flex-end}
  .doclog-panel{max-width:none; width:100%; max-height:92vh; border-radius:22px 22px 0 0}

  /* ---- no hover device: never show the hover chip (JS also guards the raycast itself) ---- */
  @media (hover:none){ .hover-chip{display:none!important} }
}
