/* SKYVUE — corporate UI
   Tokens · Base · Loader · Bar · Buttons · Cards · Discover · Course · Swarm (command) · Pre-flight · Responsive */

@font-face { font-family: "Unbounded"; src: url("../fonts/unbounded-latin-wght-normal.woff2") format("woff2-variations"); font-weight: 200 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Unbounded"; src: url("../fonts/unbounded-latin-ext-wght-normal.woff2") format("woff2-variations"); font-weight: 200 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-latin-wght-normal.woff2") format("woff2-variations"); font-weight: 300 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-latin-ext-wght-normal.woff2") format("woff2-variations"); font-weight: 300 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Martian Mono"; src: url("../fonts/martian-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Martian Mono"; src: url("../fonts/martian-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --sky: #cfe6f5;
  --sky-50: #eef6fb;
  --paper: #fbf8f3;
  --white: #ffffff;
  --ink: #233033;
  --ink-2: #57686b;
  --ink-3: #8a999b;
  --line: rgba(35, 48, 51, 0.12);
  --line-2: rgba(35, 48, 51, 0.22);
  --coral: #e8735a;
  --coral-d: #cf5a41;
  --coral-l: #fbe3dc;
  --sage: #7fae8c;
  --sun: #ffc65c;
  --cmd: rgba(25, 35, 37, 0.84);
  --cmd-2: rgba(255, 255, 255, 0.06);
  --cmd-line: rgba(255, 255, 255, 0.1);
  --cmd-fg: #eef3f1;
  --cmd-dim: #93a6a7;
  --display: "Unbounded", "Arial Black", sans-serif;
  --text: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --mono: "Martian Mono", ui-monospace, Menlo, monospace;
  --r-card: 22px;
  --r-btn: 14px;
  --shadow: 0 1px 1px rgba(35, 48, 51, 0.04), 0 10px 30px -10px rgba(35, 48, 51, 0.22);
  --shadow-l: 0 2px 2px rgba(35, 48, 51, 0.04), 0 24px 60px -20px rgba(35, 48, 51, 0.35);
  --pad: clamp(14px, 2.2vw, 34px);
  --bar-h: 68px;
  --ease: cubic-bezier(0.2, 0.9, 0.25, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--sky); color: var(--ink); font-family: var(--text); font-size: 15px; line-height: 1.5; overflow: hidden; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--coral); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--coral); color: #fff; }

#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; touch-action: none; outline: none; }
.overlay-layer { position: fixed; inset: 0; pointer-events: none; z-index: 3; }
.tac-svg { position: fixed; inset: 0; width: 100vw; height: 100dvh; pointer-events: none; z-index: 3; overflow: visible; }

/* ---------- Loader */
.loader { position: fixed; inset: 0; z-index: 60; display: grid; place-content: center; justify-items: center; gap: 18px; background: linear-gradient(180deg, #9fcbea 0%, #dceef8 60%, #fbefe4 100%); transition: opacity 0.9s var(--ease), visibility 0s linear 0.9s; }
.loader-mark { width: 120px; height: 52px; fill: var(--ink); animation: hover 2.4s ease-in-out infinite; }
@keyframes hover { 50% { transform: translateY(-8px); } }
.loader-track { width: 180px; height: 6px; border-radius: 6px; background: rgba(35, 48, 51, 0.1); overflow: hidden; }
.loader-track i { display: block; height: 100%; width: 100%; border-radius: 6px; background: var(--coral); transform-origin: left; transform: scaleX(0); transition: transform 0.3s; }
.loader-txt { margin: 0; font-size: 13px; color: var(--ink-2); }
html:not(.is-loading) .loader { opacity: 0; visibility: hidden; }

/* ---------- Bar */
.bar { position: fixed; z-index: 20; top: 14px; left: var(--pad); right: var(--pad); height: 54px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; pointer-events: none; }
.bar > * { pointer-events: auto; }
.logo { display: inline-flex; align-items: center; gap: 12px; height: 54px; padding: 0 18px 0 14px; border-radius: 18px; background: rgba(255, 255, 255, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow); justify-self: start; text-decoration: none; }
.logo-mark { width: 52px; height: 22px; fill: var(--coral); }
.logo-word { width: 92px; height: 12px; fill: var(--ink); }
.tabs { position: relative; display: flex; gap: 2px; padding: 5px; border-radius: 18px; background: rgba(255, 255, 255, 0.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.tabs button { position: relative; z-index: 1; height: 44px; padding: 0 18px; border-radius: 13px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); transition: color 0.25s; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-current="true"] { color: var(--ink); }
.tabs-pill { position: absolute; z-index: 0; top: 5px; left: 0; height: 44px; width: 0; border-radius: 13px; background: var(--white); box-shadow: 0 1px 2px rgba(35, 48, 51, 0.08), 0 6px 14px -6px rgba(35, 48, 51, 0.25); transition: transform 0.5s var(--ease), width 0.5s var(--ease); }
.tabs-pill::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 16px; height: 3px; margin-left: -8px; border-radius: 3px; background: var(--coral); }
.bar-end { justify-self: end; display: flex; align-items: center; gap: 10px; }
.back-link { font-size: 13px; font-weight: 600; color: var(--ink-2); text-decoration: none; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.back-link:hover { color: var(--ink); background: rgba(255, 255, 255, 0.85); }
.round-btn { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.85); box-shadow: var(--shadow); transition: transform 0.25s var(--ease), background-color 0.2s; }
.round-btn:hover { transform: translateY(-2px); background: #fff; }
.round-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.round-btn span { font-family: var(--mono); font-size: 11px; font-weight: 500; }

/* ---------- Buttons */
.sv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 50px; padding: 0 22px;
  border-radius: var(--r-btn); background: var(--coral); color: #fff; font-weight: 700; font-size: 15px; letter-spacing: 0.005em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -3px 0 rgba(0, 0, 0, 0.12), 0 10px 22px -10px rgba(207, 90, 65, 0.85);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s;
}
.sv-btn:hover { transform: translateY(-2px); background: #ec7d64; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -3px 0 rgba(0, 0, 0, 0.12), 0 16px 26px -12px rgba(207, 90, 65, 0.9); }
.sv-btn:active { transform: translateY(1px); box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.15); }
.sv-btn .i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s var(--ease); }
.sv-btn:hover .i { transform: translateX(3px); }
.sv-btn--ghost { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2), inset 0 -3px 0 rgba(35, 48, 51, 0.06), 0 8px 18px -12px rgba(35, 48, 51, 0.4); }
.sv-btn--ghost:hover { background: var(--white); box-shadow: inset 0 0 0 1.5px var(--ink), inset 0 -3px 0 rgba(35, 48, 51, 0.06), 0 14px 22px -12px rgba(35, 48, 51, 0.45); }
.sv-btn--small { height: 42px; padding: 0 16px; font-size: 14px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* ---------- Cards & controls */
.card { background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); border-radius: var(--r-card); box-shadow: var(--shadow-l); padding: 20px; }
.card-t { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink); }
.kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 7px 14px 7px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.72); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.kicker-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px var(--coral-l); }
.h-xl { margin: 0; font-family: var(--display); font-weight: 650; font-size: clamp(38px, 4.6vw, 80px); line-height: 1.02; letter-spacing: -0.035em; color: var(--ink); text-wrap: balance; }
.h-l { margin: 0; font-family: var(--display); font-weight: 650; font-size: clamp(24px, 2vw, 34px); line-height: 1.1; letter-spacing: -0.03em; }
.h-m { margin: 0; font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: -0.02em; }
.lede { margin: 18px 0 26px; max-width: 40ch; font-size: 17.5px; line-height: 1.55; color: var(--ink); font-weight: 500; }
.lede-s { margin: 10px 0 18px; max-width: 46ch; color: var(--ink-2); }

.slider { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; cursor: pointer; }
.slider::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--coral) var(--p, 50%), rgba(35, 48, 51, 0.12) var(--p, 50%)); }
.slider::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(35, 48, 51, 0.12); }
.slider::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--coral); }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 1px rgba(35, 48, 51, 0.15), 0 4px 10px -2px rgba(35, 48, 51, 0.35); transition: transform 0.2s var(--ease); }
.slider::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 1px rgba(35, 48, 51, 0.15), 0 4px 10px -2px rgba(35, 48, 51, 0.35); }
.slider:active::-webkit-slider-thumb { transform: scale(1.12); }
.field-row, .field { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field-row .slider, .field .slider { grid-column: 1 / -1; }
.field-row output, .field output { font-family: var(--mono); font-size: 12px; color: var(--ink); }
.field em { font-style: normal; font-weight: 500; color: var(--ink-3); }

.seg { display: flex; padding: 4px; gap: 2px; border-radius: 14px; background: rgba(35, 48, 51, 0.07); }
.seg button { flex: 1; height: 36px; padding: 0 10px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; transition: background-color 0.2s, color 0.2s, box-shadow 0.2s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-checked="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(35, 48, 51, 0.1), 0 4px 10px -4px rgba(35, 48, 51, 0.3); }

.switch-row { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; cursor: pointer; user-select: none; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-row .sw { width: 42px; height: 26px; border-radius: 26px; background: rgba(35, 48, 51, 0.15); position: relative; transition: background-color 0.25s; flex: none; }
.switch-row .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); transition: transform 0.3s var(--ease); }
.switch-row input:checked + .sw { background: var(--coral); }
.switch-row input:checked + .sw::after { transform: translateX(16px); }
.switch-row input:focus-visible + .sw { outline: 2.5px solid var(--coral); outline-offset: 2px; }

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 38px; height: 38px; border-radius: 12px; position: relative; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), inset 0 -4px 0 rgba(0, 0, 0, 0.1); transition: transform 0.25s var(--ease); }
.swatch:hover { transform: translateY(-2px); }
.swatch[aria-checked="true"]::after { content: ""; position: absolute; inset: -5px; border-radius: 15px; border: 2px solid var(--ink); }

/* ---------- Screens */
.screen { position: fixed; inset: 0; z-index: 5; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 0.5s var(--ease), visibility 0s linear 0.5s; }
.screen > * { pointer-events: auto; }
body[data-mode="discover"] .scr-discover, body[data-mode="course"] .scr-course, body[data-mode="swarm"] .scr-swarm, body[data-mode="preflight"] .scr-pre { opacity: 1; visibility: visible; transition-delay: 0.15s, 0s; }

/* Discover */
.scr-discover::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(90% 75% at 0% 35%, rgba(251, 248, 243, 0.78), rgba(251, 248, 243, 0.35) 45%, transparent 70%); }
.scr-course::before, .scr-pre::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(207,230,245,0.35), transparent 30%); }
.hero { position: absolute; left: var(--pad); top: calc(var(--bar-h) + 7vh); width: min(560px, 42vw); }
.cam-card { position: absolute; right: var(--pad); top: calc(var(--bar-h) + 22px); width: 320px; display: grid; filter: drop-shadow(0 18px 30px rgba(35, 48, 51, 0.22)); }
.cam-chunk { background: rgba(255, 255, 255, 0.92); padding: 14px 16px; }
.cam-top { border-radius: var(--r-card) var(--r-card) 0 0; display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; }
.cam-bot { border-radius: 0 0 var(--r-card) var(--r-card); display: grid; gap: 12px; padding-top: 10px; }
.rec { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; color: var(--ink-2); }
.rec i { width: 8px; height: 8px; border-radius: 50%; background: #e2463b; animation: blink 1.4s steps(2, start) infinite; }
@keyframes blink { 50% { opacity: 0.2; } }
.cam-view { position: relative; aspect-ratio: 16 / 9; border-left: 12px solid rgba(255, 255, 255, 0.92); border-right: 12px solid rgba(255, 255, 255, 0.92); }
.cam-view i { position: absolute; width: 14px; height: 14px; border: 2px solid #fff; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.cam-view i:nth-child(1) { left: 8px; top: 8px; border-right: 0; border-bottom: 0; }
.cam-view i:nth-child(2) { right: 8px; top: 8px; border-left: 0; border-bottom: 0; }
.cam-view i:nth-child(3) { left: 8px; bottom: 8px; border-right: 0; border-top: 0; }
.cam-view i:nth-child(4) { right: 8px; bottom: 8px; border-left: 0; border-top: 0; }
.cam-hud { position: absolute; left: 0; right: 0; bottom: 9px; text-align: center; font-family: var(--mono); font-size: 9px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.style-card { position: absolute; right: var(--pad); bottom: 92px; width: 300px; display: grid; gap: 16px; padding: 18px; }
.opt { display: grid; gap: 10px; }
.specs { position: absolute; left: var(--pad); bottom: 22px; margin: 0; display: flex; gap: 6px; padding: 6px; border-radius: 18px; background: rgba(255, 255, 255, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.specs div { padding: 8px 14px; border-radius: 12px; }
.specs div + div { border-left: 1px solid var(--line); border-radius: 0; }
.specs dt { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.specs dd { margin: 1px 0 0; font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: -0.02em; white-space: nowrap; }
.hotspots { position: fixed; inset: 0; pointer-events: none; }
.hs { position: absolute; left: 0; top: 0; width: 34px; height: 34px; margin: -17px; border-radius: 50%; pointer-events: auto; display: grid; place-items: center; transition: opacity 0.4s; }
.hs::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(232, 115, 90, 0.9), 0 6px 14px -2px rgba(35, 48, 51, 0.5); transition: transform 0.3s var(--ease); }
.hs:hover::before, .hs.is-on::before { transform: scale(1.25); }
.hs.is-back { opacity: 0; pointer-events: none; }
.hs-tip { position: fixed; z-index: 8; width: 250px; padding: 14px 16px; border-radius: 16px; background: #fff; box-shadow: var(--shadow-l); pointer-events: none; animation: pop 0.35s var(--ease); }
.hs-tip b { display: block; font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: -0.02em; }
.hs-tip p { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.98); } }

/* Course */
.course-intro { position: absolute; left: var(--pad); top: calc(var(--bar-h) + 30px); width: min(460px, calc(100vw - 2 * var(--pad))); padding: 24px; }
.keys { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 10px 26px; margin: 0 0 18px; }
.keyset { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.keyset em { font-style: normal; font-size: 13px; color: var(--ink-2); margin-left: 6px; }
.kc { min-width: 30px; height: 30px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 8px; background: #fff; font-family: var(--mono); font-size: 11px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--line-2), inset 0 -3px 0 rgba(35, 48, 51, 0.1); }
.touch-note { display: none; margin: 0 0 14px; color: var(--ink-2); font-size: 14px; }
.seg-wide { margin-bottom: 8px; }
.assist-note { margin: 0 0 18px; font-size: 13.5px; color: var(--ink-2); min-height: 2.9em; }
.hud { position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.4s; }
.scr-course.is-flying .hud { opacity: 1; }
.scr-course.is-flying .course-intro { display: none; }
.hud > * { pointer-events: auto; }
.hud-top { position: absolute; top: calc(var(--bar-h) + 26px); left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.hud-time, .hud-gates { padding: 10px 18px; border-radius: 16px; background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow); display: grid; justify-items: center; }
.hud-time b { font-family: var(--mono); font-size: 26px; font-weight: 500; letter-spacing: -0.02em; }
.hud-gates b { font-family: var(--display); font-size: 26px; font-weight: 650; letter-spacing: -0.03em; color: var(--coral); }
.hud-time > span, .hud-gates > span { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.hud-left { position: absolute; left: var(--pad); bottom: 22px; display: flex; gap: 8px; }
.gauge { width: 96px; padding: 10px 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow); display: grid; }
.gauge span { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.gauge b { font-family: var(--mono); font-size: 22px; font-weight: 500; line-height: 1.25; }
.gauge em { font-style: normal; font-size: 11px; color: var(--ink-3); }
.hud-assist { position: absolute; left: 50%; top: calc(var(--bar-h) + 112px); transform: translate(-50%, -8px); display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; opacity: 0; transition: opacity 0.3s, transform 0.4s var(--ease); }
.hud-assist svg { width: 18px; height: 18px; fill: var(--sage); }
.hud-assist.is-on { opacity: 1; transform: translate(-50%, 0); }
.minimap { position: absolute; right: var(--pad); bottom: 22px; width: 180px; height: 180px; border-radius: 22px; background: rgba(255, 255, 255, 0.86); box-shadow: var(--shadow); }
.hud-btns { position: absolute; right: var(--pad); bottom: 214px; display: grid; gap: 8px; }
.count { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); font-family: var(--display); font-weight: 700; font-size: clamp(80px, 12vw, 180px); color: #fff; text-shadow: 0 10px 40px rgba(35, 48, 51, 0.35); letter-spacing: -0.04em; pointer-events: none; }
.count.pulse { animation: cnt 0.9s var(--ease); }
@keyframes cnt { from { transform: translate(-50%, -50%) scale(1.4); opacity: 0; } 30% { opacity: 1; } }
.toast-c { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); padding: 10px 18px; border-radius: 14px; background: #fff; box-shadow: var(--shadow); font-weight: 600; opacity: 0; transition: opacity 0.3s; pointer-events: none; white-space: nowrap; }
.toast-c.is-on { opacity: 1; }
.course-done { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100vw - 32px)); padding: 28px; text-align: center; display: grid; justify-items: center; gap: 14px; animation: pop 0.5s var(--ease); }
.medal { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 26px; color: #fff; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.12), 0 14px 30px -12px rgba(35, 48, 51, 0.5); }
.medal.gold { background: #f2b33d; } .medal.silver { background: #a9b6bb; } .medal.bronze { background: #c98a5a; } .medal.done { background: var(--sage); }
.done-stats { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.done-stats div { padding: 10px; border-radius: 14px; background: var(--sky-50); }
.done-stats dt { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.done-stats dd { margin: 2px 0 0; font-family: var(--mono); font-size: 16px; }
.sticks { display: none; }

/* ---------- Swarm: command centre */
.cmd { background: var(--cmd); color: var(--cmd-fg); border-radius: 20px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.5); border: 1px solid var(--cmd-line); }
.cmd-top { position: absolute; top: calc(var(--bar-h) + 22px); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 18px; }
.cmd-stat { display: grid; padding: 4px 14px; min-width: 92px; }
.cmd-stat span { font-size: 11px; font-weight: 600; color: var(--cmd-dim); }
.cmd-stat b { font-family: var(--mono); font-size: 13px; font-weight: 500; white-space: nowrap; }
.view-seg { display: flex; gap: 2px; padding: 3px; border-radius: 13px; background: rgba(255, 255, 255, 0.07); }
.view-seg button { height: 36px; padding: 0 14px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--cmd-dim); display: inline-flex; align-items: center; gap: 8px; }
.view-seg button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.view-seg button:hover { color: var(--cmd-fg); }
.view-seg button[aria-checked="true"] { background: var(--coral); color: #fff; }
.cmd-left { position: absolute; left: var(--pad); top: calc(var(--bar-h) + 22px); bottom: 22px; width: 280px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.cmd-head { display: flex; justify-content: space-between; align-items: baseline; }
.cmd-head h2, .cmd-h { margin: 0; font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: -0.01em; }
.cmd-head output { font-family: var(--mono); font-size: 13px; color: var(--coral); }
.slider-cmd::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--coral) var(--p, 50%), rgba(255, 255, 255, 0.14) var(--p, 50%)); }
.slider-cmd::-moz-range-track { background: rgba(255, 255, 255, 0.14); }
.roster { flex: 1; overflow-y: auto; margin: 4px -6px 0; padding: 0 6px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.2) transparent; }
.unit { width: 100%; display: grid; grid-template-columns: 12px 1fr auto auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-align: left; font-size: 12.5px; transition: background-color 0.2s; }
.unit:hover { background: var(--cmd-2); }
.unit[aria-selected="true"] { background: rgba(232, 115, 90, 0.2); box-shadow: inset 0 0 0 1px rgba(232, 115, 90, 0.6); }
.unit i { width: 10px; height: 10px; border-radius: 3px; }
.unit .u-id { font-family: var(--mono); font-size: 11.5px; }
.unit .u-st { font-size: 11.5px; color: var(--cmd-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unit .u-b { font-family: var(--mono); font-size: 10.5px; color: var(--cmd-dim); width: 46px; text-align: right; white-space: nowrap; }
.unit .u-b.low { color: var(--sun); }
.cmd-right { position: absolute; right: var(--pad); top: calc(var(--bar-h) + 22px); width: 300px; padding: 16px; display: grid; gap: 12px; max-height: calc(100dvh - var(--bar-h) - 44px); overflow-y: auto; }
.forms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.form-btn { display: grid; justify-items: center; gap: 4px; padding: 10px 4px 8px; border-radius: 12px; background: var(--cmd-2); font-size: 11.5px; font-weight: 600; color: var(--cmd-dim); transition: background-color 0.2s, color 0.2s; }
.form-btn svg { width: 34px; height: 24px; }
.form-btn svg circle { fill: currentColor; }
.form-btn:hover { color: var(--cmd-fg); background: rgba(255, 255, 255, 0.1); }
.form-btn[aria-checked="true"] { color: #fff; background: rgba(232, 115, 90, 0.85); }
.cmd-field { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; font-size: 12.5px; font-weight: 600; color: var(--cmd-dim); }
.cmd-field output { font-family: var(--mono); font-size: 11.5px; color: var(--cmd-fg); }
.cmd-field .slider { grid-column: 1 / -1; }
.cmd-row { display: flex; gap: 6px; }
.cmd-btn { flex: 1; height: 40px; padding: 0 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.1); color: var(--cmd-fg); font-size: 13px; font-weight: 700; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.2); transition: background-color 0.2s, transform 0.2s var(--ease); white-space: nowrap; }
.cmd-btn:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-1px); }
.cmd-btn--go { background: var(--coral); color: #fff; }
.cmd-btn--go:hover { background: #ee8068; }
.cmd-btn[aria-pressed="true"] { background: var(--sun); color: var(--ink); }
.cmd-btn--icon { flex: 0 0 40px; display: grid; place-items: center; }
.cmd-btn--icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cmd-hint { margin: -6px 0 0; font-size: 12px; color: var(--cmd-dim); }
.switch-cmd { color: var(--cmd-fg); font-size: 13px; }
.switch-cmd .sw { background: rgba(255, 255, 255, 0.16); }
.cmd-log { position: absolute; left: calc(var(--pad) + 296px); bottom: 22px; width: min(420px, calc(100vw - 2 * var(--pad) - 640px)); padding: 12px 16px; }
.cmd-log ol { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 3px; }
.cmd-log li { display: grid; grid-template-columns: 52px 1fr; gap: 8px; font-size: 12.5px; color: var(--cmd-dim); animation: logIn 0.4s var(--ease); }
.cmd-log li:first-child { color: var(--cmd-fg); }
.cmd-log li time { font-family: var(--mono); font-size: 11px; }
@keyframes logIn { from { opacity: 0; transform: translateY(-4px); } }
.tac-legend { position: absolute; right: calc(var(--pad) + 316px); bottom: 22px; display: flex; align-items: center; gap: 14px; padding: 8px 12px; border-radius: 14px; background: rgba(251, 248, 243, 0.92); box-shadow: var(--shadow); opacity: 0; transition: opacity 0.4s; pointer-events: none; }
body.is-tac .tac-legend { opacity: 1; }
.compass { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 12px; box-shadow: inset 0 0 0 1.5px var(--ink); }
.scale { display: grid; gap: 3px; }
.scale i { display: block; height: 5px; border: 1.5px solid var(--ink); border-top: 0; }
.scale b { font-family: var(--mono); font-size: 10.5px; font-weight: 500; }
body[data-mode="swarm"] #gl { cursor: crosshair; }
body[data-mode="swarm"]:not(.is-tac) #gl { cursor: grab; }

/* tactical overlay markers */
.unit-ic { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
.unit-ic svg { position: absolute; left: -12px; top: -12px; width: 24px; height: 24px; overflow: visible; }
.unit-ic b { position: absolute; left: 12px; top: -20px; font-family: var(--mono); font-size: 9.5px; font-weight: 500; color: var(--ink); background: rgba(251, 248, 243, 0.85); padding: 1px 4px; border-radius: 4px; white-space: nowrap; }
.unit-ic.is-sel b { background: var(--coral); color: #fff; }
.tac-handle { position: absolute; left: 0; top: 0; width: 44px; height: 44px; margin: -22px; border-radius: 50%; pointer-events: auto; cursor: move; display: grid; place-items: center; background: rgba(232, 115, 90, 0.18); box-shadow: inset 0 0 0 2px var(--coral); }
.tac-handle::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--coral); }
.tac-rot { position: absolute; left: 0; top: 0; width: 22px; height: 22px; margin: -11px; border-radius: 50%; pointer-events: auto; cursor: grab; background: #fff; box-shadow: 0 0 0 2px var(--coral), 0 4px 10px rgba(0, 0, 0, 0.2); }
.wp { position: absolute; left: 0; top: 0; width: 26px; height: 26px; margin: -13px; border-radius: 8px; display: grid; place-items: center; background: var(--ink); color: #fff; font-family: var(--mono); font-size: 10.5px; pointer-events: none; transform: rotate(45deg); }
.wp span { transform: rotate(-45deg); }

/* ---------- Pre-flight */
.pre-card { position: absolute; top: calc(var(--bar-h) + 26px); width: 340px; display: grid; gap: 14px; padding: 22px; max-height: calc(100dvh - var(--bar-h) - 52px); overflow-y: auto; }
.pre-weather { left: var(--pad); }
.pre-plan { right: var(--pad); }
.dir-row { display: grid; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.dirs { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.dirs button { height: 32px; border-radius: 9px; background: rgba(35, 48, 51, 0.07); font-family: var(--mono); font-size: 10px; color: var(--ink-2); }
.dirs button[aria-checked="true"] { background: var(--ink); color: #fff; }
.verdict { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: center; padding: 14px; border-radius: 16px; background: var(--sky-50); transition: background-color 0.4s; }
.verdict b { font-family: var(--display); font-weight: 650; font-size: 17px; letter-spacing: -0.02em; }
.verdict p { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.verdict-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--sage); }
.verdict-icon::after { content: ""; width: 22px; height: 12px; border-left: 3.5px solid #fff; border-bottom: 3.5px solid #fff; transform: translateY(-3px) rotate(-45deg); }
.verdict.warn { background: #fff4e0; } .verdict.warn .verdict-icon { background: var(--sun); }
.verdict.warn .verdict-icon::after { width: 4px; height: 22px; border: 0; background: #fff; border-radius: 3px; transform: none; box-shadow: 0 0 0 0 #fff; }
.verdict.stop { background: #fde8e3; } .verdict.stop .verdict-icon { background: var(--coral); }
.verdict.stop .verdict-icon::after { width: 22px; height: 4px; border: 0; background: #fff; border-radius: 3px; transform: none; }
.ft { display: flex; justify-content: space-between; align-items: baseline; padding-top: 4px; border-top: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.ft b { font-family: var(--display); font-size: 24px; font-weight: 650; color: var(--ink); letter-spacing: -0.03em; }
.stepper-row { display: flex; justify-content: space-between; align-items: center; font-weight: 600; color: var(--ink-2); }
.stepper { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(35, 48, 51, 0.07); }
.stepper button { width: 36px; height: 36px; border-radius: 10px; background: #fff; font-size: 18px; font-weight: 600; box-shadow: 0 1px 2px rgba(35, 48, 51, 0.12); }
.stepper output { min-width: 34px; text-align: center; font-family: var(--display); font-weight: 650; font-size: 18px; color: var(--ink); }
.batt-bar { display: flex; gap: 4px; height: 38px; }
.batt-bar span { flex: 1; border-radius: 10px; background: linear-gradient(90deg, var(--sage), #9cc6a6); position: relative; display: grid; place-items: center; font-family: var(--mono); font-size: 10.5px; color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.1); animation: pop 0.4s var(--ease); }
.batt-bar span:first-child { background: linear-gradient(90deg, var(--coral), #ef8f78); }
.plan-sum { margin: -4px 0 4px; font-size: 13.5px; color: var(--ink-2); }
.plan-sum b { color: var(--ink); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.checklist label { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; font-size: 14px; cursor: pointer; transition: background-color 0.2s; }
.checklist label:hover { background: var(--sky-50); }
.checklist input { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; margin: 0; border-radius: 8px; box-shadow: inset 0 0 0 1.5px var(--line-2); display: grid; place-items: center; cursor: pointer; transition: background-color 0.2s, box-shadow 0.2s; }
.checklist input::after { content: ""; width: 10px; height: 5px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform 0.25s var(--ease); }
.checklist input:checked { background: var(--sage); box-shadow: none; }
.checklist input:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.checklist input:checked + span { color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(35, 48, 51, 0.3); }
.ready { padding: 12px 14px; border-radius: 14px; background: var(--sage); color: #fff; font-weight: 700; animation: pop 0.4s var(--ease); }

.toast { position: fixed; z-index: 50; left: 50%; bottom: 28px; transform: translate(-50%, 10px); padding: 12px 20px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.4s var(--ease); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.noscript { position: fixed; inset: 0; display: grid; place-items: center; }

/* ---------- Responsive */
@media (max-width: 1440px) {
  .cmd-stat:nth-child(1), .cmd-stat:nth-child(5) { display: none; }
}
@media (max-width: 1280px) {
  .tabs button { padding: 0 13px; font-size: 14px; }
  .back-link { display: none; }
  .cmd-log { display: none; }
  .tac-legend { right: calc(var(--pad) + 316px); }
}
@media (max-width: 1180px) {
  .cmd-top .cmd-stat { display: none; }
}
@media (max-width: 1100px) {
  .cam-card { width: 260px; }
  .style-card { width: 250px; }
  .specs div:nth-child(n+4) { display: none; }
  .cmd-left { width: 230px; }
}
@media (max-width: 860px) {
  :root { --bar-h: 112px; }
  .bar { grid-template-columns: 1fr auto; grid-template-rows: 54px 50px; row-gap: 8px; top: 10px; }
  .tabs { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; overflow-x: auto; scrollbar-width: none; padding: 4px; }
  .tabs button { height: 42px; padding: 0 12px; flex: none; font-size: 13.5px; }
  .tabs-pill { top: 4px; height: 42px; }
  .logo { height: 50px; }
  .hero { width: auto; right: var(--pad); top: auto; bottom: 108px; }
  .h-xl { font-size: clamp(32px, 9vw, 48px); }
  .lede { font-size: 15px; margin: 10px 0 16px; }
  .cam-card { top: calc(var(--bar-h) + 14px); width: 150px; }
  .hotspots { display: none; }
  .hero .row { flex-wrap: nowrap; }
  .hero .sv-btn { padding: 0 16px; font-size: 14px; }
  .cam-chunk { padding: 8px 10px; }
  .cam-card .field-row, .cam-card .rec, .cam-hud, #btnPhoto span { display: none; }
  #btnPhoto { height: 34px; }
  .cam-view { border-width: 8px; }
  .style-card { display: none; }
  .specs { left: var(--pad); right: var(--pad); overflow-x: auto; }
  .specs div:nth-child(n+4) { display: none; }
  .course-intro { top: auto; bottom: 16px; padding: 18px; max-height: calc(100dvh - var(--bar-h) - 40px); overflow-y: auto; }
  .keys { display: none; }
  .touch-note { display: block; }
  .hud-left { bottom: auto; top: calc(var(--bar-h) + 98px); left: var(--pad); }
  .gauge { width: 76px; padding: 8px 10px; }
  .gauge b { font-size: 17px; }
  .minimap { width: 110px; height: 110px; bottom: auto; top: calc(var(--bar-h) + 98px); border-radius: 16px; }
  .hud-btns { bottom: auto; top: calc(var(--bar-h) + 220px); }
  .scr-course.is-flying .sticks { display: block; }
  .sticks .stick { position: absolute; bottom: 26px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255, 255, 255, 0.35); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.8); touch-action: none; pointer-events: auto; }
  .sticks .stick[data-stick="l"] { left: 22px; } .sticks .stick[data-stick="r"] { right: 22px; }
  .sticks .stick i { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px; border-radius: 50%; background: #fff; box-shadow: 0 6px 16px rgba(35, 48, 51, 0.3); }
  .cmd-top { top: calc(var(--bar-h) + 16px); left: var(--pad); right: var(--pad); transform: none; justify-content: space-between; flex-wrap: wrap; }
  .cmd-stat:nth-child(1), .cmd-stat:nth-child(5) { display: none; }
  .cmd-left { display: none; }
  .cmd-right { top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 46dvh; border-radius: 20px 20px 0 0; }
  .tac-legend { right: auto; left: var(--pad); bottom: calc(46dvh + 10px); }
  .pre-card { position: static; width: auto; margin: 0 12px 12px; max-height: none; }
  .scr-pre { overflow-y: auto; padding-top: calc(var(--bar-h) + 30vh); }
  body[data-mode="preflight"] .scr-pre { pointer-events: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* reel (video render) */
body.reel .bar, body.reel .screen, body.reel .toast, body.reel .overlay-layer, body.reel .tac-svg, body.reel .loader { display: none !important; }
