/* ==========================================================================
   Vexora · app.css
   --------------------------------------------------------------------------
   The shared stylesheet for the app (index.html), admin, community and support.
   The original file was never published with the open-source release, so this
   is a clean reconstruction built from the markup, the JS state classes, the
   tests and docs/ARCHITECTURE.md ("Design system"):

     · Montserrat only. Black/white chrome on #0e0e10.
     · Green accents belong to the community feed, the red heart to "liked".
     · Auth buttons are blue (#2f6bff); the feed call-to-action is white.
     · One primary action per screen. Tabs at the bottom on mobile.

   HOW TO CHANGE THINGS
     · Colors, radii and fonts: edit the tokens in :root (section 1).
     · Per-model visibility: section 9 ("Model gates").
     · Every JS-toggled state (.active .is-on .is-open .hidden …) is listed in
       the section it belongs to, so you can find what the scripts expect.
   ========================================================================== */


/* 1 · Tokens ------------------------------------------------------------- */
:root {
  --bg: #0e0e10;
  --panel: #16161a;
  --panel-2: #1d1d22;
  --sunken: #0a0a0c;

  --text: #f4f4f5;
  --fg: #f4f4f5;
  --muted: #9a9aa3;
  --muted-2: #6f6f78;

  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .16);

  --ok: #3ddc84;
  --danger: #ff5d5d;
  --warn: #ffb454;
  --blue: #2f6bff;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;

  --sans: Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --tabs-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);

  color-scheme: dark;
}


/* 2 · Fonts (Montserrat, self-hosted, latin) ---------------------------- */
@font-face { font-family: Montserrat; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/montserrat-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/montserrat-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/montserrat-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/montserrat-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 900; font-display: swap; src: url("fonts/montserrat-latin-900-normal.woff2") format("woff2"); }


/* 3 · Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
  /* Set on <html> too: admin.html says `body { font-family: inherit }`. */
  font-family: var(--sans);
  scrollbar-color: var(--line-2) transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 21px; }
p { margin: 0; }
b, strong { font-weight: 700; }
small { font-size: .82em; }
img, svg, canvas { max-width: 100%; }
a { color: inherit; }
ol, ul { margin: 0; }
pre { margin: 0; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-appearance: none; appearance: none; }

/* [hidden] must win over display rules on components. The VXFW tab is the one
   element that starts `hidden` and is revealed by CSS (body.mode-vxfw). */
[hidden]:not([data-view="vxfw"]) { display: none !important; }

:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
::selection { background: rgba(255, 255, 255, .22); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}


/* 4 · Form controls ------------------------------------------------------ */
input[type="text"], input[type="search"], input[type="email"], input[type="password"],
input[type="number"], input[type="url"], select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
select {
  -webkit-appearance: none; appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%239a9aa3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:focus, select:focus, textarea:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }
input:disabled, select:disabled, textarea:disabled, button:disabled { opacity: .45; cursor: not-allowed; }
input[type="checkbox"], input[type="radio"] { accent-color: #fff; width: 18px; height: 18px; flex: none; }

/* Range sliders */
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: var(--line-2); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line-2); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9px;
  border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
input[type="range"]:disabled { opacity: .35; }

/* Switch: <label class="sw"><input type="checkbox"><i></i><span>Text</span></label> */
.sw { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.sw input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.sw i {
  position: relative; flex: none; width: 42px; height: 24px; border-radius: 99px;
  background: var(--panel-2); border: 1px solid var(--line-2); transition: background .18s, border-color .18s;
}
.sw i::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: #8a8a93; transition: transform .18s, background .18s;
}
.sw input:checked + i { background: #fff; border-color: #fff; }
.sw input:checked + i::after { transform: translateX(18px); background: #0e0e10; }
.sw input:focus-visible + i { outline: 2px solid #fff; outline-offset: 2px; }
.sw input:disabled + i { opacity: .4; }


/* 5 · Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  background: #fff; color: #0e0e10;
  border: 1px solid #fff; border-radius: var(--r);
  font-weight: 700; font-size: 14px; line-height: 1.2; text-align: center; text-decoration: none;
  white-space: normal; overflow-wrap: break-word; user-select: none;
  transition: transform .12s, background .15s, border-color .15s, color .15s, opacity .15s;
}
.btn:hover { background: #e9e9ec; border-color: #e9e9ec; }
.btn:active { transform: scale(.975); }
.btn.sm { min-height: 36px; padding: 7px 13px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn.block { display: flex; width: 100%; }
.btn.pi svg, .btn svg.pi { width: 18px; height: 18px; flex: none; }

.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn.ghost:hover { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .3); }
.btn.ghost.is-on, .btn.ghost.pick-on, .btn.ghost.on { background: rgba(255, 255, 255, .12); border-color: #fff; color: #fff; }

.btn.danger { background: var(--danger); border-color: var(--danger); color: #1a0505; }
.btn.danger:hover { background: #ff7676; border-color: #ff7676; }
.btn.ghost.danger { background: transparent; color: var(--danger); border-color: rgba(255, 93, 93, .5); }
.btn.ghost.danger:hover { background: rgba(255, 93, 93, .1); }

.btn:disabled, .btn[disabled] { opacity: .45; pointer-events: none; }

.link-quiet, .linklike {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 2px;
  background: none; border: 0; color: var(--muted); font-size: 13px; font-weight: 600;
  text-decoration: none; cursor: pointer; transition: color .15s;
}
.link-quiet:hover, .linklike:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.link-quiet.sm { font-size: 12px; }
.link-quiet .pi { width: 16px; height: 16px; }

/* Segmented control: <div class="seg"><button class="is-on">…</button>… */
.seg {
  display: flex; gap: 2px; padding: 3px;
  background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r);
}
.seg button {
  flex: 1 1 0; min-width: 0; min-height: 36px; padding: 6px 8px;
  background: transparent; border: 0; border-radius: calc(var(--r) - 3px);
  color: var(--muted); font-size: 12.5px; font-weight: 600; transition: background .15s, color .15s;
}
.seg button:hover { color: #fff; }
.seg button.is-on { background: #fff; color: #0e0e10; }
.seg button:disabled { opacity: .35; }
.seg button { white-space: normal; line-height: 1.2; }
/* Exactly six options (the motor presets) have long labels: two rows of three. */
.seg:has(> button:nth-child(6)):not(:has(> button:nth-child(7))) { display: grid; grid-template-columns: repeat(3, 1fr); }
.lang-seg button { text-transform: uppercase; letter-spacing: .06em; font-size: 11.5px; }


/* 6 · Layout: header · tabs · views ------------------------------------- */
.app { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 16px; }

.top {
  position: sticky; top: 0; z-index: 40;
  margin: 0 -16px; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: rgba(14, 14, 16, .86);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.logo { width: 24px; height: 24px; object-fit: contain; flex: none; }
.logo.lg { width: 60px; height: 60px; margin: 6px auto 0; display: block; }
.ver {
  display: inline-block; padding: 2px 8px; border: 1px solid var(--line-2); border-radius: 99px;
  color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: none;
}
.meta { display: flex; align-items: center; gap: 10px; min-width: 0; flex: none; }
.meta .btn { white-space: nowrap; }
.sn { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font: 600 11px var(--mono); }
.status-chip { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 10px rgba(61, 220, 132, .7); }
.dot.wait { background: var(--warn); animation: dotPulse 1s ease-in-out infinite; }
.banner {
  margin: 10px 0 0; padding: 10px 14px; border-radius: var(--r);
  background: rgba(255, 93, 93, .1); border: 1px solid rgba(255, 93, 93, .35);
  color: #ffc9c9; font-size: 12.5px; line-height: 1.45;
}

/* Tabs: fixed bottom bar on mobile; moves under the header on wide screens. */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: stretch; gap: 0;
  padding: 0 max(4px, env(safe-area-inset-left, 0px)) var(--safe-b);
  background: rgba(14, 14, 16, .94);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: 1 0 auto; min-width: 46px; min-height: var(--tabs-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 8px 6px 7px; background: none; border: 0; border-radius: 0;
  color: var(--muted-2); font-size: 10px; font-weight: 600; letter-spacing: .01em;
  transition: color .15s;
}
.tabs button:hover { color: var(--muted); }
.tabs button.active { color: #fff; }
.tab-ic { width: 22px; height: 22px; flex: none; }
.tab-ink {
  position: absolute; top: 0; left: 0; height: 2px; width: 0; background: #fff;
  opacity: 0; transform: translateX(0); pointer-events: none;
  transition: transform .28s cubic-bezier(.3, .8, .3, 1), width .28s cubic-bezier(.3, .8, .3, 1), opacity .2s;
}
.tab-ink.ready { opacity: 1; }

/* VXFW mode swaps the CFW + Motor tabs for a single VXFW tab.
   The tab starts `hidden`; nothing in the scripts un-hides it, so CSS does. */
.tabs button[data-view="vxfw"][hidden] { display: none; }
.mode-vxfw .tabs button[data-view="vxfw"][hidden] { display: flex; }
.mode-vxfw .tabs button[data-view="cfw"],
.mode-vxfw .tabs button[data-view="motor"] { display: none; }
#vxfwGate { display: none; }
.mode-vxfw #vxfwGate { display: block; }
.g-vxfw-only { display: none; }
.mode-vxfw .g-vxfw-only { display: block; }
.mode-vxfw .g-classic-only { display: none; }

.main { position: relative; padding: 14px 0 calc(var(--tabs-h) + var(--safe-b) + 28px); }

/* Views: .active shown; .leave keeps the outgoing view for the 320 ms fade. */
.view { display: none; }
.view.active { display: block; animation: viewIn .26s ease both; }
.view.leave { display: block; position: absolute; left: 0; right: 0; top: 14px; opacity: 0; pointer-events: none; transition: opacity .18s ease; }

.page-head { margin: 4px 0 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.page-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.page-head .lead { margin: 0; }
.about-head { align-items: center; text-align: center; width: 100%; }
.about-logo { width: 56px; height: 56px; object-fit: contain; display: block; margin: 4px auto 6px; }

.foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 8px 0 0; padding: 14px 0 6px; border-top: 1px solid var(--line);
  color: var(--muted-2); font-size: 11.5px;
}
.foot-links { display: flex; gap: 14px; }
.foot .linklike { font-size: 11.5px; font-weight: 500; }


/* 7 · Cards and text ----------------------------------------------------- */
.card {
  margin: 0 0 12px; padding: 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.card > h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; font-size: 14px; font-weight: 700; letter-spacing: 0; }
.card > h3:only-child { margin-bottom: 0; }

/* Collapsible cards: clicking the title toggles .is-open (extra.js) */
.card.fold > h3 { cursor: pointer; user-select: none; margin-bottom: 0; }
.card.fold > h3::after {
  content: ""; flex: none; width: 8px; height: 8px; margin-left: 8px;
  border-right: 2px solid var(--muted-2); border-bottom: 2px solid var(--muted-2);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s ease;
}
.card.fold.is-open > h3 { margin-bottom: 12px; }
.card.fold.is-open > h3::after { transform: rotate(-135deg) translate(-2px, -2px); }
.card.fold:not(.is-open) > :not(h3) { display: none; }
.card.fold > h3 > span:first-child { flex: 1 1 auto; }
.fold-hint { margin-left: auto; color: var(--muted-2); font-size: 11.5px; font-weight: 600; }

.lead { color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.help { color: var(--muted); font-size: 13px; line-height: 1.55; }
.note { margin-top: 10px; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.hint { color: var(--muted-2); font-size: 12px; line-height: 1.5; }
.warn { margin-top: 10px; color: var(--warn); font-size: 12.5px; font-weight: 600; line-height: 1.5; }
.k { display: inline-block; color: var(--muted); font-size: 12px; font-weight: 600; }
p.k { display: block; margin: 14px 0 8px; }
.card > :first-child.note, .card > :first-child.help { margin-top: 0; }

.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.card > h3 + .actions { margin-top: 0; }

/* Key/value lists */
.kv > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.kv > div:last-child { border-bottom: 0; }
.kv > div > span { color: var(--muted); }
.kv > div > b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; word-break: break-word; }
.kv-stack > div { flex-direction: column; align-items: flex-start; gap: 3px; }
.kv-stack > div > b { text-align: left; }

/* Labelled slider / value rows */
.ctrl { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; margin-top: 14px; }
.ctrl:first-child { margin-top: 0; }
.ctrl > label { font-size: 13px; font-weight: 600; }
.ctrl .val { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: #fff; text-align: right; }
.ctrl > :not(label):not(.val) { grid-column: 1 / -1; }
.tire-base-row { grid-template-columns: auto 1fr; }
.tire-base-row > select { grid-column: auto; }

.swatch { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.swatch .sw { justify-content: space-between; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); font-size: 13px; font-weight: 600; }
.swatch.dense { grid-template-columns: 1fr; gap: 6px; }

.foc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.foc-grid label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 600; }
.foc-grid input { min-height: 40px; padding: 8px 10px; font-variant-numeric: tabular-nums; }
.foc-grid + .row { margin-top: 12px; }

.wz-grid { display: grid; gap: 12px; }
.wz-grid label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.wz-out { padding: 12px 14px; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r); color: var(--text); white-space: pre-line; }

.diag, .log {
  max-height: 340px; overflow: auto; padding: 12px;
  background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--muted); font: 11.5px/1.55 var(--mono); white-space: pre-wrap; word-break: break-word;
}
.log { max-height: 62vh; margin-top: 10px; }
.diag { margin-top: 12px; }


/* 8 · Link view: gate (find a scooter) ---------------------------------- */
.center { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 4px 0 8px; text-align: center; }
.center h2 { margin-top: 2px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.center .lead { max-width: 34ch; }
.gate-help { max-width: 40ch; }
.center .row { justify-content: center; flex-wrap: wrap; }
.scan-state { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 24px; }
.scan-state .lead { font-size: 13.5px; }
.scan-ring {
  width: 14px; height: 14px; flex: none; border-radius: 50%;
  border: 2px solid var(--line-2); border-top-color: #fff; animation: spin .9s linear infinite; opacity: 0;
}
.is-pairing .scan-ring { opacity: 1; }

/* Rotating ring of models (decorative) */
.gate-shot { position: relative; width: 100%; display: grid; place-items: center; min-height: 190px; }
.ring { position: relative; width: 100%; height: 190px; perspective: 900px; overflow: hidden; }
.ring-stage { position: absolute; left: 50%; top: 24px; width: 0; height: 0; transform-style: preserve-3d; animation: ringSpin 30s linear infinite; }
.ring-tile {
  position: absolute; left: -54px; top: 0; width: 108px; margin: 0; text-align: center;
  transform: rotateY(var(--a, 0deg)) translateZ(150px);
  -webkit-backface-visibility: hidden; backface-visibility: hidden; /* no mirrored tiles at the back */
}
.ring-tile img { display: block; width: 100%; height: 84px; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .5)); }
.ring-tile figcaption { margin-top: 6px; color: var(--muted); font-size: 11px; font-weight: 600; }
#gateShot { width: min(78%, 300px); max-height: 190px; object-fit: contain; filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .55)); }
#gateShot.shot-in { animation: shotIn .34s ease both; }
#gateShot.shot-swap { animation: shotOut .16s ease both; }

/* Found-scooter card */
.found-card {
  display: flex; align-items: center; gap: 12px; width: 100%; max-width: 420px; padding: 12px 14px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); text-align: left;
}
.found-card img { width: 64px; height: 48px; object-fit: contain; flex: none; }
.found-meta { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.found-meta b { font-size: 14px; }
.found-sn { color: var(--muted); font: 600 11px var(--mono); overflow: hidden; text-overflow: ellipsis; }

/* Model picker: a vertical list with snap scrolling (photo left, name right) */
.pick { display: flex; align-items: stretch; gap: 8px; width: 100%; max-width: 420px; }
.pick-strip {
  display: flex; flex-direction: column; flex: 1 1 auto; gap: 6px; min-width: 0; max-height: 244px;
  overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain;
}
.pick-strip::-webkit-scrollbar { display: none; }
.pick-card {
  display: flex; flex-direction: row; align-items: center; gap: 12px; flex: none;
  width: 100%; min-height: 56px; padding: 6px 14px 6px 8px; scroll-snap-align: start;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--text); text-align: left; animation: rowIn .36s cubic-bezier(.2, .7, .2, 1) both;
  transition: border-color .15s, background .15s, transform .12s;
}
.pick-card:nth-child(1) { animation-delay: 0ms; }
.pick-card:nth-child(2) { animation-delay: 40ms; }
.pick-card:nth-child(3) { animation-delay: 80ms; }
.pick-card:nth-child(4) { animation-delay: 120ms; }
.pick-card:nth-child(5) { animation-delay: 160ms; }
.pick-card:nth-child(6) { animation-delay: 200ms; }
.pick-card img { width: 64px; height: 42px; object-fit: contain; flex: none; }
.pick-card b { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 700; }
.pick-card:hover { border-color: var(--line-2); }
.pick-card:active { transform: scale(.985); }
.pick-card.is-on { background: var(--panel-2); border-color: #fff; }
.pick-card:disabled { opacity: .5; cursor: default; }
.pick-chev { margin-left: auto; color: var(--muted); font-size: 22px; line-height: 1; transition: transform .2s; }
.pick-card.is-open .pick-chev { transform: rotate(90deg); color: #fff; }
.pick-soon { margin-left: auto; padding: 2px 9px; border: 1px solid var(--line-2); border-radius: 99px; color: var(--muted); font-size: 10.5px; font-weight: 700; }
.pick-side { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; flex: none; }
.pick-nav {
  display: grid; place-items: center; width: 38px; flex: 1 1 0; max-height: 56px;
  background: transparent; border: 1px solid var(--line-2); border-radius: var(--r);
  color: var(--text); font-size: 18px; line-height: 1; transition: background .15s, border-color .15s;
}
.pick-nav:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .3); }
.pick-which { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 13px; animation: whichIn .26s ease both; }
.pick-which .btn.pick-on { background: #fff; border-color: #fff; color: #0e0e10; }
.gate-links { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 6px; }


/* 8b · Link view: live dashboard ---------------------------------------- */
#live.enter { animation: viewIn .32s ease both; }
.cluster { text-align: center; }
.gauge { position: relative; width: 100%; max-width: 340px; margin: 0 auto; }
.gauge > svg { display: block; width: 100%; height: auto; }
.g-track { fill: none; stroke: rgba(255, 255, 255, .09); stroke-width: 10; stroke-linecap: round; }
.g-fill { fill: none; stroke: var(--ok); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .35s ease, stroke .25s; }
.g-ptrack { fill: none; stroke: rgba(255, 255, 255, .07); stroke-width: 4; stroke-linecap: round; }
.g-pfill { fill: none; stroke: rgba(255, 255, 255, .8); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .35s ease; }
.g-tick { stroke: rgba(255, 255, 255, .28); stroke-width: 1.4; stroke-linecap: round; }
.g-tick.maj { stroke: rgba(255, 255, 255, .6); stroke-width: 2; }
.g-lab { fill: var(--muted); font: 600 9px var(--sans); text-anchor: middle; dominant-baseline: middle; }
.g-lim { fill: var(--danger); stroke: var(--bg); stroke-width: 2; transition: cx .3s, cy .3s; }
.readout { position: absolute; left: 0; right: 0; top: 24%; display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
/* Unit under the number: beside it, it collides with the 100 mark on the dial */
.speed { display: flex; flex-direction: column; align-items: center; gap: 3px; line-height: 1; }
.speed span { font-size: clamp(46px, 15vw, 68px); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.speed small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.watts { color: var(--muted); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; transition: color .2s; }
.watts small { margin-left: 3px; font-size: 11px; }
.watts.hot { color: var(--warn); }
.sess { margin-top: 4px; color: var(--muted-2); font-size: 12px; }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 10px; margin-top: 8px; color: var(--muted); font-size: 12.5px; }
.pill {
  display: inline-flex; align-items: center; padding: 3px 11px; border: 1px solid var(--line-2); border-radius: 99px;
  color: var(--text); font-size: 11.5px; font-weight: 700; white-space: nowrap;
}

/* Trip recorder */
.trip { margin-top: 16px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); text-align: left; }
.trip-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.trip-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted-2); flex: none; }
.trip-bar:has(.is-on) .trip-dot, .trip.rec .trip-dot, .trip-dot.rec { background: var(--danger); animation: dotPulse 1.1s ease-in-out infinite; }
.trip-meta { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 110px; font-size: 12.5px; line-height: 1.35; }
.trip-meta span { color: var(--muted); font-size: 12px; }
.trip-time { font: 700 15px var(--mono); font-variant-numeric: tabular-nums; }
.spark { display: block; width: 100%; height: 44px; margin-top: 12px; }
.ridechart { display: block; width: 100%; height: auto; aspect-ratio: 560 / 150; margin-top: 10px; background: var(--sunken); border-radius: var(--r); }
.trip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.trip-grid > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.trip-grid b { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.trip-grid span { color: var(--muted); font-size: 10.5px; font-weight: 600; }
.trip-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.trip-row:last-child { border-bottom: 0; }
.trip-row b { font-weight: 700; }
.trip-row span { color: var(--muted); font-variant-numeric: tabular-nums; }

/* Stat tiles: the label sits above the number (DOM order is number, label) */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 0; }
.stats .stat {
  display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 4px; min-width: 0;
  padding: 11px 12px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
}
.stat .l { color: var(--muted); font-size: 11px; font-weight: 600; }
.stat .n { font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat .n small { margin-left: 3px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0; }
.stat .bat { order: -1; height: 4px; margin-top: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.stat .bat i { display: block; width: 0; height: 100%; border-radius: inherit; background: #fff; transition: width .4s ease, background .25s; }
.stat .bat.low i, .stat.low .bat i { background: var(--danger); }
.stat.hot .n, .hot { color: var(--warn); }
.stat.low .n, .low { color: var(--danger); }
.dash-note { margin: 10px 2px 14px; color: var(--muted-2); font-size: 11.5px; text-align: center; }
.cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; margin-top: 12px; }
.cell { padding: 8px 4px; text-align: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); font-variant-numeric: tabular-nums; }
.cell b { display: block; font-size: 12.5px; font-weight: 700; }
.cell span { color: var(--muted-2); font-size: 10px; font-weight: 600; }
.cell.low { border-color: rgba(255, 93, 93, .55); }
.cell.hi { border-color: rgba(61, 220, 132, .55); }
.cble { margin-top: 12px; }
.cble-tag { padding: 2px 9px; border: 1px solid var(--line-2); border-radius: 99px; color: var(--muted); font-size: 10.5px; font-weight: 700; }


/* 9 · Model gates -------------------------------------------------------
   Cards tagged for a specific scooter are hidden for the others. The scripts
   put model-<id> on <body> (g3 · zt3 · f3 · f3pro · gt3 · gt3pro).
   RECONSTRUCTED from the markup and tests (the original rules were in the
   unpublished stylesheet): verify against real hardware before relying on it. */
[data-g3-only] { display: none; }
.model-g3 [data-g3-only], .model-f3pro [data-g3-only] { display: block; }
[data-zt3-only] { display: none; }
.model-zt3 [data-zt3-only] { display: block; }
[data-nocfw] { display: none; }
.model-gt3 [data-nocfw], .model-gt3pro [data-nocfw] { display: block; }
.model-gt3 [data-flash-only], .model-gt3pro [data-flash-only] { display: none; }


/* 10 · About / Guide / Community --------------------------------------- */
.models { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.model { overflow: hidden; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); opacity: .62; }
.model.is-now { opacity: 1; border-color: var(--line-2); }
.model-shot { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--sunken); }
.model-shot img { width: 82%; height: 82%; object-fit: contain; }
.model-meta { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; }
.model-meta b { font-size: 13.5px; }
.model-meta span { color: var(--ok); font-size: 11px; font-weight: 600; }

.people { display: grid; gap: 12px; }
.p-who { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.p-who span { color: var(--muted); font-size: 12px; }
.p-dc { display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; color: var(--muted); font-size: 12px; }
.p-dc svg { width: 14px; height: 14px; }
.about-copy { color: var(--muted); font-size: 13.5px; line-height: 1.65; }

/* Guide */
.steps-list { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps-list li { counter-increment: step; position: relative; padding: 4px 0 4px 42px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.steps-list li::before {
  content: counter(step); position: absolute; left: 0; top: 2px; display: grid; place-items: center;
  width: 28px; height: 28px; border: 1px solid var(--line-2); border-radius: 50%;
  color: #fff; font-size: 12px; font-weight: 800;
}
.checklist { display: grid; gap: 6px; }
.chk { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); font-size: 13.5px; line-height: 1.5; cursor: pointer; }
.chk input { margin-top: 2px; }
.glist { display: grid; gap: 0; }
.glist > div { padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.glist > div:last-child { border-bottom: 0; }
.glist > div b { display: block; margin-bottom: 2px; color: var(--text); }
.bullets { padding-left: 18px; color: var(--muted); font-size: 13.5px; line-height: 1.65; }
.bullets li + li { margin-top: 6px; }
.gloss { display: grid; gap: 10px; }
.gloss > div { color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.gloss b { color: var(--text); }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 20px; font-weight: 400; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 14px; color: var(--muted); font-size: 13.5px; line-height: 1.65; }

/* Community: account forms (auth = blue, feed call-to-action = white) */
.rid-feed-cta { background: #fff; color: #0e0e10; border-color: #fff; margin-bottom: 8px; }
.rid-feed-cta:hover { background: #ececef; border-color: #ececef; }
.rid-auth-cta { background: #2f6bff; color: #fff; border-color: #2f6bff; }
.rid-auth-cta:hover { background: #4a7fff; border-color: #4a7fff; }
.rid-auth-cta:disabled { background: #2f6bff; }
.rid-step-t { margin: 0 0 4px; font-size: 19px; font-weight: 800; }
.rid-forms { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.rid-forms[hidden] { display: none; }
.rid-forms label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.rid-forms .actions { flex-direction: column; align-items: stretch; margin-top: 4px; }
.rid-forms input:focus { border-color: #2f6bff; box-shadow: 0 0 0 3px rgba(47, 107, 255, .28); }
.rid-alt { display: flex; margin: 16px auto 0; }
.rid-search { display: flex; gap: 8px; margin: 12px 0; }
.rid-search input { flex: 1 1 auto; min-width: 0; }
#ridFind:focus, #dmInput:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .14); }
.rider-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.rider-row:last-child { border-bottom: 0; }
.rider-row b { font-weight: 700; }
.dm-msgs {
  display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; padding: 10px; margin-bottom: 8px;
  background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r);
}
.dm { align-self: flex-start; max-width: 82%; padding: 8px 12px; background: var(--panel-2); border-radius: 14px 14px 14px 4px; font-size: 13.5px; line-height: 1.45; word-break: break-word; }
.dm.mine { align-self: flex-end; background: #fff; color: #0e0e10; border-radius: 14px 14px 4px 14px; }
.dm .t { display: block; margin-top: 3px; font-size: 10px; opacity: .55; }
.dm-pic { display: block; max-width: 100%; max-height: 220px; border-radius: 10px; }
.rid-modal { position: fixed; inset: 0; z-index: 130; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.rid-modal[hidden] { display: none; }
.rid-modal-box { width: min(100%, 420px); max-height: calc(100dvh - 32px); overflow: auto; padding: 20px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); animation: sheetIn .22s ease both; }
.rid-modal-box h3 { margin-bottom: 12px; font-size: 17px; }
.why-list { display: grid; gap: 8px; margin-bottom: 12px; }
.why-list label { display: flex; align-items: center; gap: 10px; padding: 11px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); font-size: 13.5px; cursor: pointer; }
.why-list label:has(input:checked) { border-color: #fff; }
.rid-modal-box .actions { flex-direction: column; align-items: stretch; }


/* 11 · Overlays, sheets, toasts, loaders -------------------------------- */
.overlay {
  position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(5, 5, 7, .74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: fadeIn .18s ease both;
}
.overlay.legal { z-index: 160; background: rgba(5, 5, 7, .9); }
.sheet {
  width: min(100%, 420px); max-height: calc(100dvh - 32px); overflow: auto; padding: 24px 22px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 22px; text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6); animation: sheetIn .24s cubic-bezier(.2, .8, .2, 1) both;
}
.sheet h2 { margin-bottom: 8px; font-size: 20px; }
.sheet .lead { font-size: 14px; }
.sheet .note, .sheet .warn { text-align: center; }
.sheet .row { justify-content: center; gap: 10px; }
.sheet.danger { border-color: rgba(255, 93, 93, .5); }
.sheet.danger h2 { color: var(--danger); }
.sheet .btn.block, .legal-sheet > .btn { width: 100%; margin-top: 4px; }
.legal-sheet { width: min(100%, 460px); text-align: left; }
.legal-sheet h2 { text-align: center; }
.legal-sheet .about-logo { margin-bottom: 10px; }
.legal-sheet .help { text-align: center; }
.legal-sheet .note { text-align: center; }
.legal-sheet .actions { justify-content: center; }
.legal-body { margin: 12px 0 6px; }
.legal-body p { margin-top: 10px; color: var(--muted); font-size: 13.5px; line-height: 1.65; }
.legal-agree { display: flex; align-items: flex-start; gap: 12px; margin: 16px 0 4px; color: var(--text); font-size: 13px; line-height: 1.5; }
.legal-agree i { margin-top: 1px; }
.legal-sheet .warn { margin: 10px 0; text-align: center; }

/* The app sits inert behind the first-run legal sheet */
.is-legal .app { filter: blur(10px) saturate(.6); pointer-events: none; user-select: none; }
.is-legal, .is-modal { overflow: hidden; }

/* Pairing */
.pair-visual { position: relative; display: grid; place-items: center; width: 104px; height: 104px; margin: 0 auto 16px; }
.spin-wrap { position: absolute; inset: 0; }
.spin { width: 100%; height: 100%; transform: rotate(-90deg); }
.spin .track { fill: none; stroke: var(--line-2); stroke-width: 2.5; }
.spin .arc { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 28 90; transform-origin: 24px 24px; animation: spin 1.1s linear infinite; }
.pwr { position: relative; display: grid; place-items: center; width: 52px; height: 52px; color: #fff; }
.pwr svg { position: relative; width: 26px; height: 26px; }
.pwr-pulse { position: absolute; inset: 0; border: 2px solid #fff; border-radius: 50%; animation: pwrPulse 1.6s ease-out infinite; }
.steps { display: flex; justify-content: center; gap: 6px; margin: 14px 0 16px; }
.steps i, .steps .dot { width: 30px; height: 4px; border-radius: 4px; background: var(--line-2); transition: background .2s; }
.steps i.done { background: #fff; }
.steps i.now { background: #fff; animation: dotPulse 1s ease-in-out infinite; }
.steps i.err { background: var(--danger); }

/* Flashing */
.bar { height: 6px; margin: 16px 0 8px; background: var(--panel-2); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; width: 0; height: 100%; border-radius: inherit; background: #fff; transition: width .2s linear; }

/* Feedback */
.fb-faces { display: flex; justify-content: center; gap: 8px; margin: 14px 0; }
.fb-faces button { display: grid; place-items: center; width: 46px; height: 46px; padding: 0; background: transparent; border: 1px solid var(--line-2); border-radius: 50%; color: var(--muted); transition: transform .12s, color .15s, border-color .15s, background .15s; }
.fb-faces button:hover { color: #fff; border-color: rgba(255, 255, 255, .35); }
.fb-faces button.is-on, .fb-faces button.is-sel { background: #fff; border-color: #fff; color: #0e0e10; transform: scale(1.08); }
.fb-faces svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.fb-msg { min-height: 96px; margin-bottom: 10px; }
.fb-done { padding: 14px 0 6px; text-align: center; }
.fb-check { width: 60px; height: 60px; fill: none; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.overlay.fb-closing { animation: fadeOut .2s ease both; }

/* Consent bar */
.consent { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabs-h) + var(--safe-b) + 12px); z-index: 110; display: flex; justify-content: center; pointer-events: none; }
.consent-card { width: min(100%, 540px); padding: 14px 16px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: 0 12px 40px rgba(0, 0, 0, .55); pointer-events: auto; animation: sheetIn .24s ease both; }
.consent-card b { display: block; margin-bottom: 4px; font-size: 14px; }
.consent-card p { margin-bottom: 12px; color: var(--muted); font-size: 12.5px; line-height: 1.55; }

/* Boot screen, route progress, toasts */
.vex-boot { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.vex-boot-mark img { display: block; width: 64px; height: 64px; object-fit: contain; }
.vex-boot-word { font-size: 13px; font-weight: 600; letter-spacing: .42em; text-indent: .42em; text-transform: uppercase; }
.vex-boot-bar { width: 140px; height: 2px; background: var(--line-2); border-radius: 2px; overflow: hidden; }
.vex-boot-bar i { display: block; width: 42%; height: 100%; background: #fff; border-radius: inherit; animation: bootSweep 1.1s cubic-bezier(.45, 0, .55, 1) infinite; }
.vex-boot-note { color: var(--muted-2); font-size: 11.5px; letter-spacing: .04em; }
.vex-bar { position: fixed; top: 0; left: 0; z-index: 300; width: 0; height: 2px; background: #fff; opacity: 0; pointer-events: none; transition: width .28s ease, opacity .2s ease; }
.vex-bar.go { opacity: .9; }

.vtoast, .vextoast {
  position: fixed; left: 50%; bottom: calc(var(--tabs-h) + var(--safe-b) + 18px); z-index: 250;
  max-width: min(92vw, 420px); padding: 11px 18px;
  background: #fff; color: #0e0e10; border-radius: 99px;
  font-size: 13px; font-weight: 700; line-height: 1.35; text-align: center;
  box-shadow: 0 10px 36px rgba(0, 0, 0, .55);
  opacity: 0; transform: translate(-50%, 12px); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.vtoast.is-on, .vextoast.on { opacity: 1; transform: translate(-50%, 0); }

/* Entrance + value-change motion (driven by polish.js) */
.vex-in { animation: vexIn .34s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 26ms); }
.vex-pop { animation: vexPop .42s ease; }


/* 12 · Display modes (set on <body> by the scripts) --------------------- */
.hide-sn .sn, .hide-sn #liveSn, .hide-sn .found-sn, .hide-sn #fcSn, .hide-sn #foundSn { filter: blur(6px); user-select: none; }

/* HUD: just the speedometer, as large as the screen allows */
.is-hud, .is-hud body { background: #000; }
.is-hud .top, .is-hud .tabs, .is-hud .foot, .is-hud .stats, .is-hud .dash-note,
.is-hud .trip, .is-hud #packCard, .is-hud .cble, .is-hud .sess, .is-hud .consent { display: none; }
.is-hud .main { padding: 0; }
.is-hud .app { max-width: none; padding: 0; }
.is-hud .gauge { max-width: min(96vw, 78vh); margin-top: 6vh; }
.is-hud .speed span { font-size: clamp(72px, 26vw, 200px); }
.is-hud .hud-actions { position: fixed; left: 0; right: 0; bottom: calc(14px + var(--safe-b)); margin: 0; opacity: .5; }

/* Kiosk: no navigation chrome */
.is-kiosk .tabs, .is-kiosk .foot { display: none; }
.is-kiosk .main { padding-bottom: 28px; }


/* 13 · Wide screens ------------------------------------------------------ */
@media (min-width: 760px) {
  .app { max-width: 720px; padding: 0 24px; }
  .top { margin: 0 -24px; padding-left: 24px; padding-right: 24px; }
  .tabs {
    position: sticky; top: 56px; bottom: auto; z-index: 39; margin: 0 -24px; padding: 0 24px;
    border-top: 0; border-bottom: 1px solid var(--line); overflow: visible;
  }
  .tabs button { flex: 1 1 0; flex-direction: row; justify-content: center; gap: 7px; min-height: 48px; padding: 0 6px; font-size: 12px; white-space: nowrap; }
  .tab-ic { width: 18px; height: 18px; }
  .tab-ink { top: auto; bottom: -1px; }
  .main { padding-bottom: 48px; }
  .consent { bottom: 16px; }
  .vtoast, .vextoast { bottom: 28px; }
  .models { grid-template-columns: repeat(4, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .is-kiosk .tabs { display: none; }
}

@media (max-width: 380px) {
  .app { padding: 0 12px; }
  .top { margin: 0 -12px; padding-left: 12px; padding-right: 12px; }
  .stats { gap: 6px; }
  .stat .n { font-size: 18px; }
  .trip-grid { grid-template-columns: repeat(2, 1fr); }
  .foc-grid { grid-template-columns: repeat(2, 1fr); }
}


/* 14 · Keyframes --------------------------------------------------------- */
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes rowIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes whichIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes shotIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes shotOut { from { opacity: 1; } to { opacity: 0; transform: scale(.97); } }
@keyframes vexIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes vexPop { 0% { transform: scale(1); } 40% { transform: scale(1.07); } 100% { transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ringSpin { to { transform: rotateY(-360deg); } }
@keyframes dotPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes pwrPulse { 0% { transform: scale(.7); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes bootSweep { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }
