/* ── Base / head-unit shell ─────────────────────────────────────────────── */
:root {
    --bg: #0b0e14;
    --panel: rgba(20, 24, 33, 0.92);
    --panel-solid: #141821;
    --stroke: rgba(255, 255, 255, 0.10);
    --text: #f4f6fb;
    --muted: #9aa3b2;
    --accent: #3b82f6;
    --accent-dark: #1d4ed8;
    --ok: #22c55e;
    --warn: #f59e0b;
    --radius: 18px;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --sysbar-h: 76px;       /* inline system bar height */
    --rail-clear: 100px;    /* inboard offset so content clears the oversized rail */
}

* { box-sizing: border-box; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* Scrollbars: hidden everywhere (touch-driven UI — lists scroll by drag).
   A hidden bar can never overlap content like the chunky native one did.
   If a scroll indicator is ever genuinely needed, style it as a thin,
   low-opacity overlay — never the native bar. */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { width: 0; height: 0; }

html, body {
    margin: 0; height: 100%; width: 100%;
    position: fixed; overflow: hidden; overscroll-behavior: none; touch-action: none;
    background: var(--bg); color: var(--text);
    font-family: var(--font); -webkit-font-smoothing: antialiased;
}

/* Map stops above the system bar so the bar is inline, not overlaid. */
#map { position: absolute; top: 0; left: 0; right: 0; bottom: var(--sysbar-h); }
.hidden { display: none !important; }

/* ── UI regions ─────────────────────────────────────────────────────────── */
#ui { position: absolute; inset: 0; pointer-events: none; }
.ui-region { position: absolute; }
/* Inboard content (banner, cards) clears the far-edge control rail. */
#ui-top { top: 18px; left: var(--rail-clear); max-width: 420px; pointer-events: none; }
#ui-left { top: 18px; left: var(--rail-clear); width: 380px; max-width: 42vw; pointer-events: none; }
#ui-hud { top: 18px; right: 18px; display: flex; gap: 12px; align-items: flex-start; pointer-events: none; }
#ui-bottom { left: 0; right: 0; bottom: 0; height: var(--sysbar-h); display: flex; align-items: center;
    justify-content: space-between; gap: 20px; padding: 0 24px;
    background: #0a0c11; border-top: 1px solid var(--stroke); pointer-events: auto; }

/* When a left card is showing, push the banner down so they don't overlap */
#ui-top > * { pointer-events: auto; }
#ui-left > * { pointer-events: auto; }

/* Layout swap: UI on the right, vehicle on the left half */
body.ui-right #ui-top { left: auto; right: var(--rail-clear); }
body.ui-right #ui-left { left: auto; right: var(--rail-clear); }
body.ui-right #ui-hud { right: auto; left: 18px; }

/* ── Panels / cards ─────────────────────────────────────────────────────── */
.panel, .card {
    background: var(--panel); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--stroke); border-radius: var(--radius); box-shadow: var(--shadow);
    /* Never let a panel run off the bottom of the map area; it scrolls instead.
       Cards with a fixed header + inner scroll region (find-card, settings-card)
       override the scroll target below. */
    max-height: calc(100dvh - var(--sysbar-h) - 36px); overflow-y: auto;
}
.card { padding: 18px; animation: rise 0.28s ease; }
.card-body { display: flex; flex-direction: column; gap: 14px; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.card-head { display: flex; flex-direction: column; gap: 2px; }
/* Header variant with a leading back button (e.g. Find Parking → back to search). */
.card-head-row { flex-direction: row; align-items: center; gap: 12px; }
.card-head-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card-back { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; cursor: pointer;
    background: rgba(255,255,255,0.06); border: 1px solid var(--stroke); color: var(--text); font-size: 17px; }
.card-back:active { background: rgba(255,255,255,0.14); }
.card-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.card-eyebrow.ok { color: var(--ok); }
.card-title { font-size: 21px; font-weight: 700; line-height: 1.15; }
.card-sub { font-size: 13px; color: var(--muted); }

.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 13px; color: var(--muted); font-weight: 600; }

/* Stepper */
.stepper { display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,0.05);
    border: 1px solid var(--stroke); border-radius: 12px; padding: 6px; width: max-content; }
.stepper-btn { width: 40px; height: 40px; border-radius: 9px; border: none; cursor: pointer;
    background: rgba(255,255,255,0.08); color: var(--text); font-size: 22px; font-weight: 600; }
.stepper-btn:active { background: var(--accent); }
.stepper-value { min-width: 84px; text-align: center; font-size: 17px; font-weight: 700; }

/* Segmented toggles (sort category + parking type) */
.seg-group { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--stroke);
    border-radius: 12px; background: rgba(255,255,255,0.05); }
.seg { flex: 1; padding: 9px 8px; border: none; border-radius: 9px; cursor: pointer;
    background: transparent; color: var(--muted); font-size: 13px; font-weight: 600;
    text-align: center; transition: background .15s, color .15s; }
.seg-active { background: var(--accent); color: #fff; }

.count-note { font-size: 13px; color: var(--muted); }

/* Stats */
.stats { display: flex; flex-direction: column; gap: 9px; }
.stat { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.stat-label { color: var(--muted); }
.stat-value { font-weight: 600; }
.stat-strong { padding-top: 9px; border-top: 1px solid var(--stroke); font-size: 16px; }
.stat-strong .stat-value { font-weight: 800; color: var(--text); }

/* Buttons */
.btn { border: none; border-radius: 13px; padding: 14px 16px; font-size: 15px; font-weight: 700;
    cursor: pointer; font-family: var(--font); width: 100%; transition: transform .08s, background .15s; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:active { background: var(--accent-dark); }
.btn-ghost { background: rgba(255,255,255,0.06); color: var(--text); border: 1px solid var(--stroke); }
.card-actions { display: flex; flex-direction: column; gap: 8px; }

/* ── Search ─────────────────────────────────────────────────────────────── */
.search { padding: 10px; width: 380px; max-width: 42vw; }
.search-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px;
    background: rgba(255,255,255,0.06); border-radius: 12px; }
.search-icon { opacity: 0.6; }
.search-input { flex: 1; background: none; border: none; outline: none; color: var(--text);
    font-size: 17px; font-family: var(--font); -webkit-user-select: text; user-select: text; }
.search-input::placeholder { color: var(--muted); }
.search-results { list-style: none; margin: 8px 0 0; padding: 0; }
.search-item { display: flex; flex-direction: column; padding: 10px; border-radius: 10px; cursor: pointer; }
.search-item:active { background: rgba(255,255,255,0.07); }
.search-item-name { font-size: 15px; font-weight: 600; }
.search-item-sub { font-size: 12px; color: var(--muted); }
.search-quick { margin-top: 8px; width: 100%; padding: 11px; border-radius: 11px; cursor: pointer;
    background: rgba(59,130,246,0.14); border: 1px solid rgba(59,130,246,0.3); color: var(--text); font-weight: 600; }

/* ── Turn-by-turn widget (blue maneuver panel + dark ETA panel, one card) ── */
.tbt { display: flex; flex-direction: column; width: 340px; max-width: 42vw;
    filter: drop-shadow(0 18px 50px rgba(0, 0, 0, 0.45)); animation: rise 0.28s ease; }

/* Blue maneuver panel — fully rounded, overlaps the dark panel so its rounded
   bottom reads against the dark below (like the reference). */
.tbt-nav { position: relative; z-index: 2; display: flex; align-items: center; gap: 18px;
    padding: 18px 22px; background: var(--accent); color: #fff; border-radius: 22px; }
.tbt-arrow { font-size: 44px; line-height: 1; width: 48px; text-align: center; flex: 0 0 auto; }
.tbt-info { display: flex; flex-direction: column; min-width: 0; }
.tbt-dest { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700;
    letter-spacing: 0.4px; opacity: 0.9; margin-bottom: 2px; }
.tbt-dest-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbt-dist { font-size: 34px; font-weight: 800; line-height: 1.05; }
.tbt-instr { font-size: 15px; font-weight: 600; opacity: 0.95;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Dark ETA panel — square top tucks up behind the blue panel; rounded bottom. */
.tbt-eta { position: relative; z-index: 1; background: var(--panel-solid);
    border-radius: 0 0 22px 22px; margin-top: -24px; padding: 38px 20px 16px;
    display: flex; flex-direction: column; gap: 14px; }
.tbt-eta-time { font-size: 26px; font-weight: 800; line-height: 1.05; text-align: center; }
.tbt-progress { position: relative; height: 16px; margin: 0 8px; }
.tbt-track { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
    height: 6px; border-radius: 3px; background: rgba(255,255,255,0.16); }
.tbt-fill { position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    height: 6px; border-radius: 3px; background: var(--accent); }
.tbt-knob { position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%;
    transform: translate(-50%, -50%); background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent); font-size: 9px; }
.tbt-meta { font-size: 14px; font-weight: 600; color: var(--muted); text-align: center; }

/* ── HUD (reference-styled) ──────────────────────────────────────────────── */
/* Top cluster (#ui-hud): gear + speed-limit + speed */
.speed-module { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.limit-sign { background: #fff; color: #111; border: 3px solid #d23; border-radius: 12px;
    width: 54px; height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    box-shadow: var(--shadow); }
.limit-label { font-size: 9px; font-weight: 800; letter-spacing: 0.5px; }
.limit-num { font-size: 26px; font-weight: 800; line-height: 1; }
.speed-gauge { background: var(--panel); border: 1px solid var(--stroke); border-radius: 50%;
    width: 72px; height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    box-shadow: var(--shadow); }
.speed-num { font-size: 30px; font-weight: 800; line-height: 1; }
.speed-unit { font-size: 11px; color: var(--muted); }

/* Skip-to-end (fast-forward) — sits under the speed gauge, driving only. */
.skip-end-btn { width: 56px; height: 56px; border-radius: 50%; background: var(--panel);
    border: 1px solid var(--stroke); box-shadow: var(--shadow); color: var(--accent);
    font-size: 22px; line-height: 1; cursor: pointer; pointer-events: auto;
    display: flex; align-items: center; justify-content: center; }
.skip-end-btn:active { background: var(--accent); color: #fff; }

/* Control rail — far edge on the cards side. Two clusters:
   top (compass / volume / settings) and bottom (zoom in / out), like a head unit. */
.rail { position: absolute; left: 18px; z-index: 25;
    display: flex; flex-direction: column; gap: 12px; pointer-events: auto; }
.rail-top { top: 18px; }
.rail-bottom { bottom: calc(var(--sysbar-h) + 18px); }
.rail-btn { width: 66px; height: 66px; border-radius: 50%; background: var(--panel);
    border: 1px solid var(--stroke); box-shadow: var(--shadow); color: var(--text);
    font-size: 30px; font-weight: 700; line-height: 1; cursor: pointer; pointer-events: auto; }
.rail-btn:active { background: var(--accent); }
.rail-compass { color: var(--accent); }
/* Overview active: solid accent fill so the compass reads as a toggled-on control. */
.rail-compass-active { background: var(--accent); color: #fff; border-color: var(--accent); }
body.ui-right .rail { left: auto; right: 18px; }

/* ── Search-loop ────────────────────────────────────────────────────────── */
.loop-eyebrow { color: var(--ok); }
.loop-eyebrow-dot { font-size: 0.65em; vertical-align: middle; }
.loop-list { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 12px; max-height: 46vh; overflow: auto; padding-bottom: 14px; }
.loop-item { display: flex; align-items: center; gap: 11px; padding: 11px; cursor: pointer;
    background: rgba(255,255,255,0.05); border: 1px solid var(--stroke); border-radius: 12px; color: var(--text); text-align: left; }
.loop-item:active { background: rgba(255,255,255,0.09); }
.loop-dot { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; }
.loop-item-main { flex: 1; }
.loop-item-name { font-size: 14px; font-weight: 700; }
.loop-item-sub { font-size: 12px; color: var(--muted); }
.loop-item-price { font-size: 13px; font-weight: 700; color: var(--muted); }

/* ── Overview (compass toggle: route list) ──────────────────────────────── */
.overview-item { align-items: center; }
/* Round icon badge: parking stops tint to availability; the destination is accent. */
.overview-ord { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 13px; color: #fff;
    background: var(--ord-color, var(--accent)); }
.overview-empty { font-size: 13px; color: var(--muted); padding: 6px 2px; }

/* ── Complete ───────────────────────────────────────────────────────────── */
.big-countdown { font-size: 44px; font-weight: 800; line-height: 1; }
.walk-note { font-size: 13px; color: var(--muted); padding: 10px 12px; background: rgba(255,255,255,0.05);
    border-radius: 11px; }

/* ── Settings ───────────────────────────────────────────────────────────── */
.light-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.light-opt { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 6px;
    cursor: pointer; background: rgba(255,255,255,0.05); border: 1px solid var(--stroke);
    border-radius: 12px; color: var(--text); }
.light-opt-active { border-color: var(--accent); background: rgba(59,130,246,0.16); }
.light-icon { font-size: 22px; }
.light-label { font-size: 12px; font-weight: 600; }
.layout-grid { grid-template-columns: 1fr 1fr; }

/* Settings panel: never taller than the map area (minus its margin); the content
   scrolls while the Close footer stays pinned at the bottom. */
.settings-card { padding: 0; overflow: hidden; display: flex; flex-direction: column;
    margin-top: 10px; width: 480px; max-width: 88vw;
    /* Height capped by the shared .panel/.card rule; the body scrolls while the
       Close footer stays pinned at the bottom. */
    /* Settings lives in #ui-top but must overlay the #ui-left cards that follow it
       in the DOM (and the rail/eta at z-index 25), so it sits on its own layer. */
    position: relative; z-index: 50; }
.settings-body { overflow-y: auto; padding: 18px 18px 22px; }
.card-foot { flex: 0 0 auto; padding: 14px 18px; border-top: 1px solid var(--stroke); background: var(--panel); }

/* Toggle switch (Settings) */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 14px; background: rgba(255,255,255,0.05); border: 1px solid var(--stroke); border-radius: 12px; }
.switch-label { font-size: 14px; font-weight: 600; }
.switch { width: 52px; height: 30px; border-radius: 16px; flex: 0 0 auto; cursor: pointer; padding: 0;
    background: rgba(255,255,255,0.12); border: 1px solid var(--stroke); position: relative; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%;
    background: #fff; transition: transform .15s; }
.switch-on { background: var(--accent); border-color: var(--accent); }
.switch-on::after { transform: translateX(22px); }

/* ── Options / level list ───────────────────────────────────────────────── */
.opt-list { display: flex; flex-direction: column; gap: 8px; max-height: 38vh; overflow: auto; }
.opt-item { display: flex; align-items: center; gap: 11px; padding: 11px; cursor: pointer; text-align: left;
    background: rgba(255,255,255,0.05); border: 1px solid var(--stroke); border-radius: 12px; color: var(--text); }
.opt-item:active { background: rgba(255,255,255,0.09); }
.opt-dot { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; }
/* Likelihood chip — colored box that replaces the dot, leading the row. */
.avail-box { flex: 0 0 auto; min-width: 52px; padding: 8px 6px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    color: #0b0e14; font-size: 16px; font-weight: 800; line-height: 1;
    text-shadow: 0 1px 1px rgba(255,255,255,0.25); }
.opt-main { flex: 1; min-width: 0; }
.opt-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opt-sub { font-size: 12px; color: var(--muted); }
.opt-meta { text-align: right; }
.opt-price { font-size: 13px; font-weight: 800; letter-spacing: 1px; color: var(--ok); }
.opt-total { font-size: 12px; color: var(--muted); }

/* Recommended — the balanced sweetspot pick, set apart from the list. */
.rec-item { width: 100%; padding: 15px 11px; border-color: var(--accent); background: rgba(59,130,246,0.12); }
.rec-item:active { background: rgba(59,130,246,0.18); }
.rec-badge { color: var(--accent); margin-right: 5px; }

/* Roving — the on-street cruise pick, a second distinct option under Recommended. */
.roving-item { width: 100%; padding: 13px 11px; border-color: var(--ok); background: rgba(34,197,94,0.10); }
.roving-item:active { background: rgba(34,197,94,0.16); }
.roving-icon { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(34,197,94,0.18); color: var(--ok); font-size: 15px; }
.roving-chevron { color: var(--muted); font-size: 13px; }

/* Find Parking card: the header/categories stay fixed while the "Nearby parking"
   list takes the remaining height (within the shared panel cap) and scrolls. */
.find-card { display: flex; flex-direction: column; }
.find-card .card-body { flex: 1; min-height: 0; }
.find-card .card-body > .field:last-child { flex: 1; min-height: 0; }
.find-card .opt-list { flex: 1; min-height: 0; max-height: none; padding-bottom: 14px; }

/* ── Keypad ─────────────────────────────────────────────────────────────── */
.keypad-card-inner { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.keypad-display { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 40px; }
.keypad-value { font-size: 30px; font-weight: 800; letter-spacing: 3px; }
.pin-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--muted); }
.pin-dot-on { background: var(--accent); border-color: var(--accent); }
.keypad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad-key { padding: 18px 0; border-radius: 14px; background: rgba(255,255,255,0.06); border: 1px solid var(--stroke);
    color: var(--text); font-size: 24px; font-weight: 700; cursor: pointer; font-family: var(--font); }
.keypad-key:active { background: var(--accent); }
.keypad-key-go { background: rgba(59,130,246,0.18); border-color: var(--accent); }
.keypad-key-ghost { background: transparent; }
.keypad-key-spacer { background: transparent; border: none; cursor: default; }

/* ── Reservation / QR ───────────────────────────────────────────────────── */
.res-code { display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,0.05);
    border-radius: 12px; padding: 11px 14px; }
.res-code-label { font-size: 13px; color: var(--muted); }
.res-code-val { font-size: 20px; font-weight: 800; letter-spacing: 2px; }
.qr-row { display: flex; align-items: center; gap: 14px; }
.qr { background: #fff; border-radius: 14px; padding: 8px; flex: 0 0 auto; line-height: 0; }
.qr canvas { display: block; width: 120px; height: 120px; }
.qr-note { font-size: 13px; color: var(--muted); }
.big-countdown.warn { color: var(--warn, #f59e0b); }
.card-eyebrow.warn { color: var(--warn, #f59e0b); }

/* ── Time jump ──────────────────────────────────────────────────────────── */
.timejump { position: absolute; inset: 0; z-index: 45; background: #000; color: #fff; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; animation: fade 0.4s ease; }
.timejump-text { font-size: 40px; font-weight: 300; letter-spacing: 0.01em; }
.timejump-hint { font-size: 15px; color: var(--muted); }

/* ── Chrome / system bar ────────────────────────────────────────────────── */
/* Brand sits centered in the bar, independent of the left/right clusters. */
.brand { display: flex; align-items: center; gap: 9px;
    position: absolute; left: 50%; transform: translateX(-50%); }
.brand-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.brand-name { font-weight: 800; letter-spacing: 0.02em; }

/* Left cluster: app-launcher icons (decorative — icon color carries state) */
.app-tray { display: flex; align-items: center; gap: 8px; }
.app-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    background: none; border: none; color: var(--muted);
    font-size: 18px; pointer-events: none; font-family: var(--font); }
.app-icon-active { color: var(--accent); }

/* Right cluster: weather + clock + battery */
.sysbar-right { display: flex; align-items: center; gap: 18px; color: var(--text); font-weight: 600; }
.sys-item { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.sys-item .sys-glyph { font-size: 16px; }
.sys-clock { font-variant-numeric: tabular-nums; }
.sys-batt { color: var(--muted); }

/* ── Cinematic ──────────────────────────────────────────────────────────── */
.cinematic { position: absolute; inset: 0; z-index: 40; background: #000;
    display: flex; align-items: flex-end; justify-content: center; padding: 0 0 64px;
    background-size: cover; background-position: center; animation: fade 0.5s ease; }
.cinematic-image { background-color: #fff; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.cinematic-panel { background: var(--panel); border: 1px solid var(--stroke); border-radius: var(--radius);
    padding: 18px 22px; text-align: center; box-shadow: var(--shadow); min-width: 280px; }
.cinematic-eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--accent); letter-spacing: 0.04em; }
.cinematic-title { font-size: 22px; font-weight: 800; margin: 4px 0 14px; }
.cinematic-cta.cta-pending { opacity: 0.35; pointer-events: none; }

/* ── Gate ───────────────────────────────────────────────────────────────── */
.gate { position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(120% 120% at 50% 0%, #16213b 0%, #0b0e14 60%); }
.gate-panel { width: 380px; max-width: 86vw; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.gate-brand { font-size: 14px; font-weight: 800; color: var(--accent); letter-spacing: 0.06em; }
.gate-title { font-size: 28px; font-weight: 800; }
.gate-sub { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.gate-btn { width: 100%; }

/* ── Rotate guard ───────────────────────────────────────────────────────── */
.rotate { position: absolute; inset: 0; z-index: 70; background: var(--bg);
    display: flex; align-items: center; justify-content: center; }
.rotate-inner { text-align: center; font-size: 20px; font-weight: 700; color: var(--muted); line-height: 1.8; }

/* ── Debug ──────────────────────────────────────────────────────────────── */
.debug { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 80;
    background: var(--panel-solid); border: 1px solid var(--stroke); border-radius: 12px; padding: 12px;
    display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); width: 220px; }
.debug-title { font-weight: 800; font-size: 13px; }
.debug-phase { font-size: 12px; color: var(--muted); }
.debug-btn { padding: 8px; border-radius: 9px; border: 1px solid var(--stroke); background: rgba(255,255,255,0.06);
    color: var(--text); cursor: pointer; font-family: var(--font); font-size: 13px; }
.debug-btn-active { background: var(--accent); border-color: var(--accent); }
