/* Harmattan theme. Tokens and rules are documented in THEME_GUIDE.md.
   Flat surfaces, bright text, two signal colours. No gradients, no side
   accent borders, no text fainter than --text-2. */

@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("../vendor/fonts/barlow-latin-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url("../vendor/fonts/barlow-latin-500.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("../vendor/fonts/barlow-latin-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("../vendor/fonts/barlow-latin-ext-400.woff2") format("woff2"); unicode-range: U+0100-02BA, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113; }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url("../vendor/fonts/barlow-latin-ext-500.woff2") format("woff2"); unicode-range: U+0100-02BA, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113; }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("../vendor/fonts/barlow-latin-ext-600.woff2") format("woff2"); unicode-range: U+0100-02BA, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113; }

:root {
  --bg: #0a0b0b;
  --surface: #151717;
  --surface-2: #1f2222;
  --surface-3: #2c3030;
  --line: #2a2e2e;
  --text: #f3f5f4;
  --text-2: #b9c0bd;
  --green: #74e28c;
  --green-bg: #17301e;
  --orange: #ff6b2c;
  --orange-bg: #3a1c0e;
  --orange-ink: #1a0900;
  --amber: #f6bd4a;
  --amber-bg: #33280f;
  --red: #ff5247;
  --red-bg: #3a1513;
  --radius: 10px;
  --radius-s: 6px;
  --gap: 16px;
  --font: "Barlow", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 500; text-wrap: balance; }
h1 { font-size: 26px; letter-spacing: 0.02em; text-transform: uppercase; }
h2 { font-size: 20px; }
h3 { font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); }
p { margin: 0; }
.mono { font-variant-numeric: tabular-nums; font-weight: 500; }
.hint { color: var(--text-2); font-size: 15px; }
.good { color: var(--green); } .warn { color: var(--amber); } .bad { color: var(--red); }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: var(--radius-s); z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
main:focus { outline: none; }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 28px; padding: 14px 24px; position: sticky; top: 0; z-index: 10; background: var(--bg); }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand strong { display: block; font-size: 18px; font-weight: 600; letter-spacing: 0.2em; line-height: 1.1; }
.brand span { display: block; color: var(--text-2); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.mark { width: 32px; height: 32px; flex: none; display: block; }
.nav { display: flex; gap: 6px; flex: none; }
.nav-btn { font: 500 15px var(--font); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); background: var(--surface); border: 0; border-radius: var(--radius-s); padding: 10px 16px; cursor: pointer; white-space: nowrap; min-height: 40px; }
.nav-btn:hover:not(:disabled) { color: var(--text); background: var(--surface-2); }
.nav-btn.on { color: var(--text); background: var(--surface-3); }
.nav-btn:disabled { color: #6d7572; cursor: not-allowed; }
.status { display: flex; margin-left: auto; }
.stat { padding: 0 18px; border-left: 1px dashed var(--line); }
.stat:first-child { border-left: 0; }
.stat:last-child { padding-right: 0; }
.stat span { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.stat strong { font-size: 17px; font-weight: 500; white-space: pre; }
.stat.warn strong { color: var(--amber); }
.status .sound { margin-left: 18px; align-self: center; min-height: 36px; padding: 6px 12px; font-size: 14px; color: var(--text-2); }
main { padding: 12px 24px 40px; min-width: 0; }

/* ---------- common ---------- */
.btn { font: 500 15px var(--font); color: var(--text); background: var(--surface-2); border: 0; border-radius: var(--radius-s); padding: 9px 16px; cursor: pointer; min-height: 40px; }
.btn:hover:not(:disabled) { background: var(--surface-3); }
.btn:disabled { color: #6d7572; cursor: not-allowed; }
.btn-primary { background: var(--orange); color: var(--orange-ink); font-weight: 600; }
.btn-primary:hover:not(:disabled) { background: #ff7e47; }
.btn-primary:disabled { background: var(--surface-2); color: #6d7572; }
.btn-danger { color: var(--red); }
.btn-ghost { background: none; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-wide { width: 100%; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stack { display: flex; flex-direction: column; gap: var(--gap); }
.head { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 6px; }
.panel { background: var(--surface); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.panel > * { flex-shrink: 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.kv:last-of-type { border-bottom: 0; }
.kv span { color: var(--text-2); }
.kv strong { text-align: right; font-weight: 500; }

.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 9px; border-radius: 4px; background: var(--surface-3); color: var(--text); }
.risk-0 { background: var(--green-bg); color: var(--green); }
.risk-1 { background: var(--amber-bg); color: var(--amber); }
.risk-2 { background: var(--orange-bg); color: var(--orange); }
.risk-3 { background: var(--red); color: #1c0503; }
.chip-good { background: var(--green-bg); color: var(--green); }
.chip-warn { background: var(--amber-bg); color: var(--amber); }
.chip-bad { background: var(--red-bg); color: var(--red); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--gap); }
.card { background: var(--surface); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.card h3 { font-size: 19px; letter-spacing: 0; text-transform: none; }
.brief { color: var(--text-2); font-size: 15px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 12px 16px; }
.fact span { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.fact strong { font-size: 17px; font-weight: 500; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.pay { font-size: 24px; font-weight: 500; color: var(--text); }
.tiles-row { display: flex; background: var(--surface); border-radius: var(--radius); padding: 16px 6px; flex-wrap: wrap; row-gap: 12px; }

.bar { height: 6px; background: var(--surface-3); border-radius: 2px; overflow: hidden; min-width: 80px; }
.bar i { display: block; height: 100%; background: var(--green); }
.bar i.warn { background: var(--amber); } .bar i.bad { background: var(--red); }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th { text-align: left; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); font-weight: 500; padding: 8px 12px 10px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td .bar { display: inline-block; width: 90px; vertical-align: middle; margin-right: 8px; }
td .hint { font-size: 14px; }
.lines, .events { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }

label, .lbl { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
select, input[type="range"] { width: 100%; }
select { font: 500 15px var(--font); color: var(--text); background: var(--surface-2); border: 0; border-radius: var(--radius-s); padding: 9px 12px; min-height: 40px; }
input[type="range"] { accent-color: var(--orange); }
.switch { display: flex; gap: 10px; align-items: center; text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--text); cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--orange); }
.segs { display: flex; gap: 4px; background: var(--surface-2); border-radius: var(--radius-s); padding: 3px; }
.seg { flex: 1; font: 500 14px var(--font); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2); background: none; border: 1px solid transparent; border-radius: 4px; padding: 7px 12px; cursor: pointer; min-height: 34px; white-space: nowrap; }
.seg:hover { color: var(--text); }
.seg.on { background: var(--orange-bg); border-color: var(--orange); color: var(--orange); }

/* ---------- images ---------- */
.shot { display: block; width: 100%; height: auto; border-radius: var(--radius-s); }
.asset { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: contain; background: var(--surface-2); border-radius: var(--radius-s); }
.thumb { display: block; width: 104px; height: 65px; object-fit: contain; background: var(--surface-2); border-radius: var(--radius-s); flex: none; }
.unit { display: flex; gap: 12px; align-items: center; }
.plan-side .asset { aspect-ratio: 16 / 7; }
.story { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.story li { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 12px; align-items: start; }
.story strong { display: block; font-weight: 500; }
.story p { color: var(--text-2); font-size: 14px; line-height: 1.4; }
.gears { display: flex; flex-direction: column; gap: 6px; }
.gear { display: grid; grid-template-columns: 18px 64px minmax(0, 1fr); gap: 10px; align-items: center; background: var(--surface-2); border-radius: var(--radius-s); padding: 6px 10px; text-transform: none; letter-spacing: 0; cursor: pointer; }
.gear input { width: 18px; height: 18px; accent-color: var(--orange); }
.gear img { width: 64px; height: 40px; object-fit: contain; }
.gear strong { display: block; font-size: 15px; font-weight: 500; color: var(--text); }
.gear small { display: block; font-size: 13px; color: var(--text-2); }
.gear.off { cursor: not-allowed; }
.gear.off strong { color: var(--text-2); }
a { color: var(--text); text-underline-offset: 3px; }
a:hover { color: var(--green); }

/* ---------- operations ---------- */
.ops { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--gap); align-items: start; }
.side { display: flex; flex-direction: column; gap: var(--gap); }

/* ---------- mission control ---------- */
.plan { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: var(--gap); align-items: start; }
.plan-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; --mapw: max(580px, min(900px, calc(100vh - 236px))); }
.plan-main > * { margin-inline: auto; width: 100%; }
.map-wrap { border-radius: var(--radius); overflow: hidden; background: #000; max-width: var(--mapw); }
canvas.map { display: block; width: 100%; height: auto; cursor: crosshair; touch-action: none; }
canvas.profile { display: block; width: 100%; max-width: var(--mapw); height: auto; border-radius: var(--radius); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: 14px; max-width: var(--mapw); color: var(--text-2); }
.lg { display: inline-flex; align-items: center; gap: 7px; color: var(--text); }
.lg::before { content: ""; width: 12px; height: 12px; border-radius: 50%; }
.lg-hostile::before { background: var(--red); }
.lg-jammer::before { background: var(--amber); }
.lg-regulated::before { background: #cfd6d3; }
.lg-mast::before { border-radius: 0; background: var(--orange); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.lg-bldg::before { border-radius: 2px; background: #5b6260; }
.plan-side { gap: 10px; }
.plan-side h2 { font-size: 21px; }
.est { display: grid; grid-template-columns: 1fr; }
.warns { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.launch-dock { position: sticky; bottom: 0; background: var(--surface); padding: 12px 0 4px; display: flex; flex-direction: column; gap: 8px; }

/* ---------- debrief ---------- */
.debrief { max-width: 860px; }
.panel.big { padding: 30px; gap: 16px; }
.panel.big h1 { font-size: 34px; }
.events { font-size: 15px; color: var(--text-2); }
.events .good { color: var(--green); } .events .bad { color: var(--red); }

/* ---------- flight (3D) ---------- */
body.in-flight { overflow: hidden; }
.flight { position: fixed; inset: 0; z-index: 30; background: #000; }
.cam-view, .cam-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hud { position: absolute; inset: 0; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; padding: 18px; color: var(--text); }
.hud > * { pointer-events: auto; }
.hud-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hud-id, .hud-clock { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #0a0b0bd9; border-radius: var(--radius-s); padding: 8px 14px; font-size: 15px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.hud-clock { font-variant-numeric: tabular-nums; }
.rec { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: blink 1.2s steps(2) infinite; }
.sep-dot { color: var(--text-2); }
.reticle { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border: 1.5px solid #fff; border-radius: 50%; display: none; pointer-events: none; }
.reticle::before, .reticle::after { content: ""; position: absolute; background: #fff; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.reticle::before { width: 86px; height: 1.5px; } .reticle::after { width: 1.5px; height: 86px; }
.tape { position: absolute; top: 50%; transform: translateY(-50%); display: none; background: #0a0b0bd9; border-radius: var(--radius-s); padding: 10px 14px; min-width: 104px; pointer-events: none; }
.tape span { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.tape strong { font-size: 30px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--green); line-height: 1.1; }
.tape em { font-style: normal; font-size: 14px; color: var(--text-2); margin-left: 4px; }
.tape-l { left: calc(50% - 250px); text-align: right; } .tape-r { left: calc(50% + 146px); }
.compass { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); width: min(560px, 44vw); height: auto; border-radius: var(--radius-s); pointer-events: none; }
.navline { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); background: #0a0b0bd9; border-radius: var(--radius-s); padding: 5px 14px; font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; }
.hud.fpv .reticle, .hud.fpv .tape { display: block; }
.banner { position: absolute; left: 50%; top: 26%; transform: translateX(-50%); background: var(--red); color: #1c0503; padding: 12px 28px; font-size: 22px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; border-radius: var(--radius-s); white-space: nowrap; }
.ticker { position: absolute; left: 18px; top: 116px; display: flex; flex-direction: column; gap: 4px; max-width: min(600px, 80vw); pointer-events: none; }
.tick { background: #0a0b0bd9; padding: 6px 12px; font-size: 14px; border-radius: 4px; display: flex; gap: 10px; align-items: baseline; }
.tick::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--text-2); flex: none; }
.tick.good::before { background: var(--green); } .tick.warn::before { background: var(--amber); } .tick.bad::before { background: var(--red); }
.tick b { font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text-2); }
.hud-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.tiles { display: flex; background: #0a0b0bd9; border-radius: var(--radius); padding: 10px 4px; flex-wrap: wrap; row-gap: 8px; }
.tile { padding: 0 14px; min-width: 100px; border-left: 1px dashed var(--line); }
.tile:first-child { border-left: 0; }
.tile span { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.tile strong { font-size: 18px; font-weight: 500; }
.tile.wide { min-width: 150px; }
.tile .bar { margin-top: 5px; }
.cam-ctl { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cam-ctl .segs { background: #0a0b0bd9; }
.cam-ctl .btn { background: #0a0b0bd9; }
.hud-top { align-items: flex-start; }
.hud-id { max-width: 26vw; }
.hud-right { display: flex; gap: 8px; align-items: center; }
.hud-right .badge { padding: 8px 12px; font-size: 13px; }
.cam-view { cursor: grab; touch-action: none; }
.cam-view:active { cursor: grabbing; }
.deck { background: #0a0b0bd9; border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; max-width: min(560px, 100%); }
.deck-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.deck .segs { background: var(--surface-2); }
.deck .btn { background: var(--surface-2); min-height: 36px; padding: 6px 14px; }
.deck .btn:hover { background: var(--surface-3); }
.deck .btn-home { background: var(--green-bg); color: var(--green); font-weight: 600; }
.deck .btn-home:hover { background: #1f4229; }
.pads { display: none; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.hud.manual .pads { display: grid; }
.pad { font: 500 13px var(--font); letter-spacing: 0.03em; color: var(--text); background: var(--surface-2); border: 0; border-radius: 4px; min-height: 36px; padding: 6px 8px; cursor: pointer; touch-action: none; user-select: none; }
.pad:hover { background: var(--surface-3); }
.pad:active { background: var(--orange-bg); color: var(--orange); }
.keys { font-size: 13px; color: var(--text-2); line-height: 1.35; max-width: 500px; }
.hud.ended .deck { display: none; }
.hud.thermal .hud-id::after { content: "Thermal"; background: var(--text); color: var(--bg); border-radius: 4px; padding: 1px 8px; font-size: 12px; }
@keyframes blink { 50% { opacity: 0.2; } }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); background: var(--surface-3); color: var(--text); padding: 12px 18px; border-radius: var(--radius-s); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 40; max-width: min(640px, 92vw); display: flex; gap: 10px; align-items: baseline; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--text-2); flex: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.good::before { background: var(--green); } .toast.warn::before { background: var(--amber); }
.noscript { padding: 40px; text-align: center; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .ops, .plan { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .topbar { padding: 12px 14px; position: static; gap: 12px; }
  main { padding: 8px 14px 30px; }
  .tile { min-width: 84px; padding: 0 10px; }
  .tape-l { left: 12px; } .tape-r { left: auto; right: 12px; }
  .compass { top: 64px; width: 92vw; } .navline { top: 112px; } .ticker { top: 150px; }
  .hud-id { max-width: 60vw; } .keys { display: none; }
  h1 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .rec { animation: none; }
  .toast { transition: none; }
}

/* ---------- icons ---------- */
.ico { flex: none; display: block; }
.btn, .nav-btn, .seg, .pad { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-wide { display: flex; }
h1 { display: flex; align-items: center; gap: 12px; }
h1 .ico { color: var(--orange); }
.stat { display: flex; align-items: center; gap: 10px; }
.stat .ico { color: var(--text-2); }
.tile span { display: flex; align-items: center; gap: 5px; }
.seg { gap: 6px; }

/* ---------- action clock and minimap ---------- */
.action { position: absolute; left: 50%; top: 110px; transform: translateX(-50%); background: #0a0b0bd9; border-radius: var(--radius); padding: 10px 18px 12px 14px; display: flex; align-items: center; gap: 14px; min-width: 280px; pointer-events: none; }
.act-ico { color: var(--orange); display: flex; }
.act-body { display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 16px; row-gap: 6px; flex: 1; }
.act-body span { font-size: 14px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.act-body strong { font-size: 28px; font-weight: 500; line-height: 1; color: var(--orange); font-variant-numeric: tabular-nums; }
.act-body .bar { grid-column: 1 / -1; }
.act-body .bar i { background: var(--orange); }
.hud-left { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.minimap { position: relative; display: block; width: 220px; height: 220px; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; background: var(--bg); cursor: pointer; }
.minimap canvas { display: block; width: 100%; height: 100%; }
.minimap span { position: absolute; right: 6px; bottom: 6px; background: #0a0b0bd9; color: var(--text); border-radius: 4px; padding: 1px 7px; font: 500 12px var(--font); font-variant-numeric: tabular-nums; }
.hud.ended .minimap, .hud.ended .action { display: none; }
@media (max-width: 760px) {
  .minimap { width: 132px; height: 132px; }
  .action { top: 150px; min-width: 240px; } .ticker { top: 226px; }
}
@media (max-height: 760px) { .minimap { width: 170px; height: 170px; } }

/* ---------- compact top bar: icon menu, names on hover ---------- */
.topbar { gap: 20px; flex-wrap: nowrap; }
.nav { gap: 4px; }
.nav-btn { padding: 0 11px; min-width: 44px; min-height: 44px; position: relative; }
.nav-btn[aria-disabled="true"] { color: #6d7572; cursor: not-allowed; }
.nav-btn[aria-disabled="true"]:hover { background: var(--surface); color: #6d7572; }
.nav-label { display: none; }
.nav-btn.on { padding: 0 14px 0 12px; }
.nav-btn.on .nav-label { display: inline; }
.tip { position: relative; }
.tip::after { content: attr(data-tip); position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); font: 600 13px var(--font); letter-spacing: 0.04em; text-transform: none; white-space: nowrap; padding: 5px 10px; border-radius: 4px; opacity: 0; visibility: hidden; pointer-events: none; z-index: 20; }
.tip:hover::after, .tip:focus-visible::after { opacity: 1; visibility: visible; }
.nav-btn.on.tip::after { display: none; }
.status { flex: none; align-items: center; }
.stat { padding: 0 16px; }
.status .sound { margin-left: 14px; min-width: 44px; min-height: 44px; padding: 0; }
@media (hover: none) { .tip::after { display: none; } }
.nav-btn:nth-last-child(-n+2).tip::after, .sound.tip::after { left: auto; right: 0; transform: none; }
@media (max-width: 1400px) { .topbar { gap: 14px; } .stat { padding: 0 11px; } .status .sound { margin-left: 8px; } }
@media (max-width: 1100px) {
  .topbar { flex-wrap: wrap; row-gap: 10px; }
  .nav { margin-left: auto; }
  .status { width: 100%; margin-left: 0; order: 3; }
  .stat:first-child { padding-left: 0; }
  .status .sound { margin-left: auto; }
}
@media (max-width: 760px) {
  .topbar { gap: 10px; }
  .brand div span { display: none; }
  .nav-btn.on .nav-label { display: none; }
  .nav-btn.on { padding: 0 11px; }
  .status { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px 0; }
  .stat { padding: 0 12px; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat .ico { display: none; }
  .status .sound { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
}
@media (max-width: 520px) {
  .brand strong { display: none; }
  .nav { gap: 2px; }
}

/* ---------- compact flight HUD: phones, portrait and landscape ---------- */
.hud-right .badge { white-space: nowrap; }
@media (max-width: 760px), (max-height: 480px) {
  .hud { padding: 10px; }
  .hud-id { max-width: none; padding: 6px 10px; font-size: 13px; flex-wrap: nowrap; }
  .hud-id span:nth-child(4) { display: none; }
  .hud-clock { padding: 6px 10px; font-size: 13px; }
  .hud-right .badge { padding: 6px 9px; font-size: 12px; }
  .ticker { max-width: 78vw; left: 10px; }
  .ticker .tick:nth-child(n+2) { display: none; }
  .tick { font-size: 13px; padding: 4px 10px; }
  .hud-bottom { gap: 8px; }
  .hud-left { flex-direction: row; align-items: flex-end; gap: 8px; }
  .minimap { width: 116px; height: 116px; flex: none; }
  .tiles { display: grid; grid-template-columns: repeat(2, auto); padding: 6px 2px; row-gap: 5px; }
  .tile, .tile.wide { min-width: 0; padding: 0 10px; border-left: 0; }
  .tile span { font-size: 11px; white-space: nowrap; } .tile span .ico { display: none; }
  .tile strong { font-size: 15px; }
  .tile .bar { margin-top: 3px; min-width: 60px; height: 4px; }
  .deck { padding: 8px; gap: 6px; }
  .deck-row { gap: 6px; }
  .deck .seg { font-size: 12px; padding: 5px 8px; min-height: 34px; }
  .deck .seg .ico { display: none; }
  .deck .btn { min-height: 34px; padding: 5px 10px; font-size: 13px; }
  .pad { min-height: 38px; font-size: 12px; }
  .keys { display: none; }
  .action { min-width: 230px; padding: 8px 12px; gap: 10px; }
  .act-body strong { font-size: 22px; } .act-body span { font-size: 12px; }
}
@media (max-width: 760px) {
  .compass { top: 54px; } .navline { top: 90px; font-size: 13px; } .ticker { top: 124px; } .action { top: 158px; }
  .deck { width: 100%; max-width: none; }
}
@media (max-width: 520px) { .hud-id span:nth-child(3) { display: none; } }
@media (max-height: 480px) and (min-width: 761px) {
  .hud-bottom { flex-wrap: nowrap; }
  .compass { top: 10px; width: 36vw; } .navline { top: 46px; font-size: 13px; padding: 3px 10px; }
  .ticker { top: 52px; max-width: 30vw; } .action { top: 78px; }
  .deck { max-width: 54vw; }
}

/* ---------- flight school ---------- */
h2 { display: flex; align-items: center; gap: 10px; }
.school-top { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.school-hero .asset { aspect-ratio: 16 / 9; }
.school .lbl { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.ctl-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px 28px; }
.ctl-group { display: flex; flex-direction: column; gap: 10px; }
.keys-grid { display: grid; gap: 8px; }
.keys-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.keys-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.keys-grid.one { grid-template-columns: minmax(0, 1fr); }
.keycap { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--surface-2); border-radius: var(--radius-s); padding: 10px 6px; text-align: center; }
.keys-grid.one .keycap, .keys-grid.two .keycap { flex-direction: row; gap: 12px; padding: 8px 12px; text-align: left; }
.keycap kbd { font: 600 17px var(--font); color: var(--bg); background: var(--text); border-radius: 5px; min-width: 38px; height: 38px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; flex: none; white-space: nowrap; }
.keycap span { font-size: 14px; line-height: 1.25; }
.lessons { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); }
.lesson { background: var(--surface); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.lesson-banner { background: var(--surface-3); color: var(--orange); height: 104px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; }
.lesson-banner span { color: var(--text); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.lesson-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 8px; }
.lesson-body h3 { font-size: 18px; letter-spacing: 0; text-transform: none; }
.lesson-body p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.45; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checks li { display: flex; align-items: center; gap: 10px; color: var(--text-2); }
.checks li.good { color: var(--text); } .checks li.good .ico { color: var(--green); }
@media (max-width: 900px) { .school-top { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .nav-btn { min-width: 40px; padding: 0 8px; } .keys-grid.two { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 1000px) { .lessons { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Keep telemetry left and the deck right; never let the deck drop under the tiles. */
@media (min-width: 761px) {
  .hud-bottom { flex-wrap: nowrap; }
  .hud-left { flex: 1 1 auto; min-width: 0; }
  .deck { flex: none; width: min(540px, 46vw); max-width: none; }
}
@media (min-width: 761px) and (max-width: 1400px) { .tile { padding: 0 9px; min-width: 96px; } .tile.wide { min-width: 130px; } }
.needs { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--amber); margin: 0; }

/* ---------- manuals ---------- */
.manual-card { text-align: left; border: 0; color: var(--text); font: inherit; cursor: pointer; }
.manual-card:hover { background: var(--surface-2); }
.manual-card .asset { aspect-ratio: 16 / 9; }
.manual-top { display: grid; grid-template-columns: minmax(280px, 460px) minmax(0, 1fr); gap: var(--gap); align-items: stretch; }
.manual-top .panel:first-child { justify-content: center; }
.manual-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.manual .panel h1 { font-size: 30px; }
.gear-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gear-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-2); color: var(--text); border: 0; border-radius: var(--radius-s); padding: 4px 12px 4px 4px; font: 500 14px var(--font); cursor: pointer; }
.gear-chip:hover { background: var(--surface-3); }
.thumb.small { width: 48px; height: 30px; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }
.link:hover { color: var(--green); }
td.good { color: var(--green); } td.bad { color: var(--red); }
.card-foot { flex-wrap: wrap; gap: 8px; }
.card-foot .pay { margin-right: auto; }
@media (max-width: 900px) { .manual-top, .manual-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .topbar { row-gap: 8px; } .nav { margin-left: 0; width: 100%; justify-content: space-between; } }

/* ---------- foldable flight panel ---------- */
.deck .deck-min { margin-left: auto; min-width: 36px; padding: 6px 9px; }
.deck .deck-min.tip::after { top: auto; bottom: calc(100% + 8px); left: auto; right: 0; transform: none; }
.hud.deck-small .deck { width: auto; flex: none; }
.hud.deck-small .deck > :not(:first-child) { display: none; }
.hud.deck-small .deck .segs { display: none; }
.hud.deck-small.manual .deck .segs[aria-label="Flight control"] { display: flex; }
@media (max-width: 760px) { .hud.deck-small .deck { width: auto; margin-left: auto; } }

/* ---------- training area carousel ---------- */
.carousel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.car-track { display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: 6px; }
.car-card { flex: 0 0 min(300px, 78vw); scroll-snap-align: center; display: flex; flex-direction: column; text-align: left; padding: 0; border: 2px solid transparent; border-radius: var(--radius); overflow: hidden; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.car-card:hover { background: var(--surface-2); }
.car-card.on { border-color: var(--orange); background: var(--surface-2); }
.car-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.car-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.car-body strong { font-size: 17px; font-weight: 500; }
.car-body span { font-size: 14px; color: var(--text-2); line-height: 1.4; }
.car-nav { min-width: 40px; padding: 0; height: 40px; }
.car-nav.next .ico { transform: rotate(180deg); }
@media (max-width: 760px) { .carousel { grid-template-columns: minmax(0, 1fr); } .car-nav { display: none; } }

/* ---------- preloader ---------- */
.preload { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.preload strong { font-size: 22px; font-weight: 600; letter-spacing: 0.34em; margin-right: -0.34em; }
.preload .bar { width: min(280px, 70vw); height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.preload .bar i { display: block; height: 100%; width: 0; background: var(--orange); transition: width 0.2s; }
.preload p { margin: 0; color: var(--text-2); font-size: 14px; }
.preload[hidden] { display: none; }
.flight-wait { position: absolute; inset: 0; z-index: 5; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--text-2); }
.flight-wait[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .preload .bar i { transition: none; } }

/* ---------- accounts, legal, footer, notices ---------- */
.form-panel { max-width: 460px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 14px; font-weight: 500; }
input[type="text"], input[type="email"], input[type="password"] { font: 400 16px var(--font); color: var(--text); background: var(--surface-2); border: 0; border-radius: var(--radius-s); padding: 10px 12px; min-height: 44px; width: 100%; }
input[type="text"]:focus-visible, input[type="email"]:focus-visible, input[type="password"]:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
.row > input { max-width: 260px; }
.tick { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.4; cursor: pointer; }
.tick input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--orange); flex: none; }
.form-error { margin: 0; color: var(--red); font-weight: 500; }
.status .sound.on { background: var(--surface-3); }
.status .sound .who { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; padding-right: 10px; }
.status .sound:has(.who) { padding-left: 10px; gap: 6px; }
.prose { max-width: 820px; gap: 10px; }
.prose h2 { font-size: 19px; margin-top: 14px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { margin: 0; color: var(--text-2); font-size: 16px; line-height: 1.6; }
.prose ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.legal .segs { flex-wrap: wrap; align-self: flex-start; }
.foot { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; padding: 22px var(--pad, 24px) 28px; color: var(--text-2); font-size: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot .link { color: var(--text-2); font-size: 14px; }
.foot .link:hover { color: var(--text); }
body.in-flight .foot, body.in-flight .cookie { display: none; }
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; background: var(--surface-3); border-radius: var(--radius); padding: 14px 18px; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; max-width: 900px; margin: 0 auto; }
.cookie p { margin: 0; flex: 1 1 320px; font-size: 15px; line-height: 1.45; }
.gate { position: fixed; inset: 0; z-index: 90; background: #0a0b0bf2; display: flex; align-items: center; justify-content: center; padding: 20px; overflow-y: auto; }
.gate-card { background: var(--surface); border-radius: var(--radius); padding: 30px 28px; width: min(440px, 100%); display: flex; flex-direction: column; gap: 14px; align-items: stretch; text-align: center; }
.gate-card img { align-self: center; }
.gate-card h1 { font-size: 24px; justify-content: center; }
.gate-card .hint { font-size: 13px; line-height: 1.5; }
.gate-card .link { font-size: 13px; color: var(--text); }

/* ---------- mission type badges ---------- */
.badge.type { display: inline-flex; align-items: center; gap: 6px; padding-left: 7px; }
.type-medical .ico { color: var(--green); }
.type-relief .ico { color: var(--amber); }
.type-sar .ico { color: var(--orange); }
.type-resupply .ico { color: var(--red); }
.type-agro .ico { color: #9bd35a; }
.type-survey .ico { color: #8fb8ff; }
.type-inspect .ico { color: #f3f5f4; }
.type-ocean .ico { color: #7fd6e6; }
.type-recover .ico { color: var(--orange); }
.tick { text-transform: none; letter-spacing: 0; color: var(--text); }
.tick::before, .tick::marker { content: none; }

/* ---------- base ---------- */
.bar.wide { height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.bar.wide i { display: block; height: 100%; background: var(--green); }
.bar.wide i.w0 { width: 0%; }
.bar.wide i.w1 { width: 5%; }
.bar.wide i.w2 { width: 10%; }
.bar.wide i.w3 { width: 15%; }
.bar.wide i.w4 { width: 20%; }
.bar.wide i.w5 { width: 25%; }
.bar.wide i.w6 { width: 30%; }
.bar.wide i.w7 { width: 35%; }
.bar.wide i.w8 { width: 40%; }
.bar.wide i.w9 { width: 45%; }
.bar.wide i.w10 { width: 50%; }
.bar.wide i.w11 { width: 55%; }
.bar.wide i.w12 { width: 60%; }
.bar.wide i.w13 { width: 65%; }
.bar.wide i.w14 { width: 70%; }
.bar.wide i.w15 { width: 75%; }
.bar.wide i.w16 { width: 80%; }
.bar.wide i.w17 { width: 85%; }
.bar.wide i.w18 { width: 90%; }
.bar.wide i.w19 { width: 95%; }
.bar.wide i.w20 { width: 100%; }
@media (max-width: 520px) { .nav-btn { min-width: 36px; padding: 0 6px; } }

.base-3d { width: 100%; aspect-ratio: 21 / 9; min-height: 220px; max-height: 440px; border-radius: var(--radius-s); overflow: hidden; background: var(--surface); display: flex; align-items: center; justify-content: center; }
.base-3d canvas { display: block; width: 100%; height: 100%; }
.base-stage { gap: 10px; }
@media (max-width: 760px) { .base-3d { aspect-ratio: 4 / 3; } }
.pick-tag { position: absolute; left: 12px; top: 12px; background: var(--text); color: var(--bg); font: 600 14px var(--font); padding: 5px 10px; border-radius: 4px; pointer-events: none; }
.pick-tag[hidden] { display: none; }
.upgrade-peek { display: flex; align-items: center; gap: 14px; }
.upgrade-peek .asset { width: 180px; flex: none; aspect-ratio: 16 / 10; }

/* Leaderboards */
.leaders th, .leaders td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.leaders th { font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
.leaders .num { text-align: right; }
.leaders .rank { width: 56px; color: var(--text-2); }
.leaders tr.you td { background: var(--surface-2); }
.leaders tr.you .rank { color: var(--orange); }
.leaders .badge { margin-left: 8px; }
/* Market: vehicle classes that are not on sale yet */
h2 > .badge { margin-left: 10px; vertical-align: middle; }
.soon-art { aspect-ratio: 16 / 10; display: grid; place-items: center; background: var(--surface-2); border-radius: var(--radius-s); color: var(--text-2); }

/* Top bar: one line on every laptop and desktop. It sheds detail as the
   window narrows and only wraps below 1100 px. */
@media (min-width: 1101px) and (max-width: 1700px) { .topbar { gap: 12px; padding-left: 16px; padding-right: 16px; } .stat .ico { display: none; } .stat { padding: 0 10px; } .status .who { display: none; } .status .sound { margin-left: 6px; } }
@media (min-width: 1101px) and (max-width: 1500px) { .nav-btn.on .nav-label { display: none; } .nav-btn.on { padding: 0 11px; } .brand div span { display: none; } }
@media (min-width: 1101px) and (max-width: 1320px) { .brand div { display: none; } .stat { padding: 0 8px; } .stat span { font-size: 11px; } .stat strong { font-size: 15px; } .nav { gap: 2px; } }
@media (max-width: 760px) { .tip::after { display: none; } }

/* Operations: the weather banner */
.sky { grid-column: 1 / -1; position: relative; height: 190px; border-radius: var(--radius); overflow: hidden; }
.sky-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sky-text { position: relative; height: 100%; padding: 22px 26px; display: flex; flex-direction: column; justify-content: center; gap: 4px; color: #fff; max-width: 640px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45); }
.sky-place { font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; white-space: pre; }
.sky-text strong { font-size: 40px; font-weight: 600; line-height: 1.05; display: flex; align-items: baseline; gap: 16px; }
.sky-temp { font-size: 26px; font-weight: 500; }
.sky-facts { font-size: 15px; font-weight: 500; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; }
.sky-text p { margin: 6px 0 0; font-size: 15px; max-width: 54ch; }
.sky-dust:not(.sky-night) .sky-text { color: #1c1408; text-shadow: none; }
@media (max-width: 760px) { .sky { height: auto; min-height: 170px; } .sky-text { padding: 16px; } .sky-text strong { font-size: 30px; } .sky-temp { font-size: 20px; } }

/* Planner map: zoom and pan */
.map-wrap { position: relative; }
.map-zoom { position: absolute; left: 12px; top: 12px; display: flex; gap: 4px; }
.map-zoom .btn { min-width: 40px; min-height: 40px; padding: 0 10px; background: rgba(10, 11, 11, 0.85); font-size: 18px; }
.map-zoom .btn:last-child { font-size: 14px; }
.map-zoom .btn:hover:not(:disabled) { background: var(--surface-3); }
canvas.map.zoomed { cursor: grab; }

/* Progress: impact, milestones, balance sheet */
.impact-n { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.impact-n .ico { align-self: center; color: var(--green); }
.impact-n strong { font-size: 34px; font-weight: 600; line-height: 1; }
.impact-n span { color: var(--text-2); font-size: 15px; }
.ms-head { display: flex; align-items: center; gap: 10px; }
.ms-ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; }
.milestone.got .ms-ico { background: var(--green-bg); color: var(--green); }
.milestone:not(.got) h3 { color: var(--text-2); }
.ms-bar { display: flex; align-items: center; gap: 10px; }
.ms-bar progress { flex: 1; height: 8px; accent-color: var(--orange); }
.kv.total { border-top: 1px solid var(--line); border-bottom: 0; margin-top: 4px; padding-top: 12px; }
.kv.total strong { font-weight: 600; font-size: 17px; }

/* Market: drones locked behind a milestone */
.pic { position: relative; }
.pic-lock { position: absolute; top: 12px; right: 12px; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: var(--text); }
.badge.lock { display: inline-flex; align-items: center; gap: 5px; }
.unlock { display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); border-radius: var(--radius-s); padding: 12px 14px; }
.unlock strong { font-weight: 600; }
.unlock progress { width: 100%; height: 8px; accent-color: var(--orange); }

/* Lobby */
.lobby-code { display: flex; align-items: center; gap: 12px; }
.lobby-code strong { font-size: 26px; font-weight: 600; letter-spacing: 0.18em; }
.members, .keys { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.members li, .key { display: flex; align-items: center; gap: 12px; }
.members li div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.key strong { min-width: 64px; }
.key.got .ms-ico { background: var(--green-bg); color: var(--green); }
progress.wide { width: 100%; height: 10px; accent-color: var(--orange); }
.code-in { text-transform: uppercase; letter-spacing: 0.18em; font-size: 20px; }
.stack-s { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.stack-s .segs { align-self: stretch; }

/* Manual: the drone in 3D */
.model-3d { width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius-s); overflow: hidden; background: #151717; display: grid; place-items: center; }
.model-3d canvas { display: block; width: 100%; height: 100%; }
.model-3d img { max-width: 100%; height: auto; }

/* Flight: red at the screen edges while under fire. An inset glow, strongest at the sides. */
.danger { position: absolute; inset: 0; pointer-events: none; opacity: 0; box-shadow: inset 0 0 90px 30px rgba(255, 46, 36, 0.55), inset 120px 0 110px -60px rgba(255, 46, 36, 0.6), inset -120px 0 110px -60px rgba(255, 46, 36, 0.6); }
@media (max-width: 760px) { .danger { box-shadow: inset 0 0 50px 14px rgba(255, 46, 36, 0.55), inset 50px 0 50px -26px rgba(255, 46, 36, 0.6), inset -50px 0 50px -26px rgba(255, 46, 36, 0.6); } }

/* Market: an order on its way. The button shows a parcel crossing it and cannot be pressed again. */
.btn.ordering { position: relative; overflow: hidden; opacity: 1; cursor: progress; }
.btn.ordering::after { content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: 34%; background: var(--text); border-radius: 2px; animation: order-run 0.9s linear infinite; }
@keyframes order-run { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
@media (prefers-reduced-motion: reduce) { .btn.ordering::after { animation: none; width: 100%; } }
.on-way { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; color: var(--green); }

/* Raid map: the globe on the left, the picked base and the list on the right. */
.raid-map { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.raid-globe { height: 470px; border-radius: var(--radius); overflow: hidden; background: #0a0b0b; cursor: grab; }
.raid-globe canvas { display: block; width: 100%; height: 100%; }
.raid-col { display: flex; flex-direction: column; gap: 12px; }
.raid-side h3 { margin: 0; }
.raid-list { display: flex; flex-direction: column; gap: 4px; max-height: 250px; overflow: auto; }
.raid-row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; text-align: left; padding: 9px 12px; border: 0; border-radius: var(--radius-s); background: var(--surface); color: var(--text); font: inherit; font-size: 15px; cursor: pointer; }
.raid-row:hover, .raid-row.on { background: var(--surface-3); }
.raid-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.raid-class { color: var(--text-2); font-size: 13px; }
.raid-loot { font-variant-numeric: tabular-nums; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; background: var(--text); }
.dot.raid-player { background: var(--orange); } .dot.raid-stronghold { background: var(--amber); } .dot.raid-fortress { background: var(--red); }
.badge.raid-player { background: var(--orange-bg); color: var(--orange); } .badge.raid-stronghold { background: var(--amber-bg); color: var(--amber); } .badge.raid-fortress { background: var(--red-bg); color: var(--red); }
.raid-legend { align-items: center; gap: 18px; flex-wrap: wrap; }
.raid-key { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.raid-lock strong { display: flex; align-items: center; gap: 8px; }
@media (max-width: 1000px) { .raid-map { grid-template-columns: 1fr; } .raid-globe { height: 380px; } }

/* Feedback button and dialog (js/feedback.js). Hidden in flight. */
.fb-btn { position: fixed; right: 16px; bottom: 16px; z-index: 20; display: inline-flex; align-items: center; gap: 8px; background: var(--surface-2); color: var(--text); }
body.in-flight .fb-btn { display: none; }
.fb-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; padding: 22px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); }
.fb-dialog::backdrop { background: #000000b3; }
.fb-dialog textarea { width: 100%; resize: vertical; font: 400 16px var(--font); color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; }
.fb-dialog textarea:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
.fb-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.fb-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; }
.fb-stars { display: flex; gap: 4px; }
.fb-star { background: none; border: 0; padding: 4px; color: var(--text-2); cursor: pointer; border-radius: var(--radius-s); min-width: 44px; min-height: 44px; }
.fb-star.on { color: var(--orange); }
.fb-star.on .ico { fill: currentColor; }
.fb-dialog .segs { flex-wrap: wrap; }
.fb-count { align-self: flex-end; font-size: 14px; }
.fb-trap { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.fb-actions { justify-content: flex-end; gap: 10px; }
@media (max-width: 600px) { .fb-btn span { display: none; } .fb-btn { right: 12px; bottom: 12px; } }
