
  :root {
    --bg: #0a0f1c;
    --bg-2: #0d1526;
    --panel: #101a30;
    --panel-2: #0c1526;
    --line: #223252;
    --ink: #e9eefb;
    --ink-dim: #aab6cf;
    --muted: #6d7da0;
    --amber: #ffb020;
    --amber-dim: #a97317;
    --sky: #3ec6f0;
    --violet: #9d8cff;
    --player: #3ec6f0;
    --rivalA: #ff6a5e;
    --rivalB: #57d98c;
    --bad: #ff6a5e;
    --good: #57d98c;
    --land: #182746;
    --land-line: #2f4570;
    --ac-body: #c7d2ec;
    --ac-mid: #8fa3cd;
    --ac-line: #33456e;
    --ocean-hi: #111c33;
    --ocean-lo: #090f1e;
    --land-shadow: rgba(0,0,0,0.38);
    --card-shadow: 0 1px 3px rgba(0,0,0,0.28), 0 4px 14px rgba(0,0,0,0.16);
    --card-sheen: linear-gradient(180deg, rgba(255,255,255,0.028), transparent 42%);
    --btn-sheen: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(0,0,0,0.07));
    --bar-sheen: linear-gradient(180deg, rgba(255,255,255,0.28), rgba(0,0,0,0.10));
    --radius: 5px;
    --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
    --sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --mono: "Bahnschrift", ui-monospace, "SF Mono", "Courier New", monospace;
  }
  :root[data-theme="light"] {
    --bg: #eef1f8; --bg-2: #e6eaf4; --panel: #ffffff; --panel-2: #f4f6fb;
    --line: #d3d9ea; --ink: #131a2b; --ink-dim: #45506e; --muted: #7480a0;
    --amber-dim: #b9821f; --land: #cdd7ec; --land-line: #aab8d9;
    --ac-body: #aebadd; --ac-mid: #7e93c2; --ac-line: #3d5180;
    --ocean-hi: #f2f6fd; --ocean-lo: #dde5f2;
    --land-shadow: rgba(70,90,130,0.22);
    --card-shadow: 0 1px 2px rgba(20,32,60,0.07), 0 4px 14px rgba(20,32,60,0.07);
    --card-sheen: none;
  }
  @media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
      --bg: #eef1f8; --bg-2: #e6eaf4; --panel: #ffffff; --panel-2: #f4f6fb;
      --line: #d3d9ea; --ink: #131a2b; --ink-dim: #45506e; --muted: #7480a0;
      --amber-dim: #b9821f; --land: #cdd7ec; --land-line: #aab8d9;
      --ac-body: #aebadd; --ac-mid: #7e93c2; --ac-line: #3d5180;
      --ocean-hi: #f2f6fd; --ocean-lo: #dde5f2;
      --land-shadow: rgba(70,90,130,0.22);
      --card-shadow: 0 1px 2px rgba(20,32,60,0.07), 0 4px 14px rgba(20,32,60,0.07);
      --card-sheen: none;
    }
  }
  * { box-sizing: border-box; }
  html, body { height: 100%; }
  body {
    margin: 0; background: var(--bg); color: var(--ink);
    font-family: var(--sans); font-size: 14px; line-height: 1.4;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }
  :focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
  button {
    transition: transform 0.12s ease, box-shadow 0.12s ease,
      background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  }
  ::selection { background: var(--amber); color: #101a30; }
  button { font-family: inherit; cursor: pointer; }
  input[type="range"] { accent-color: var(--amber); }
  input[type="checkbox"] { accent-color: var(--sky); }
  .hidden { display: none !important; }
  .icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; fill: currentColor; }

  /* ---------- Start screen ---------- */
  #start {
    height: 100vh; display: flex; justify-content: center; overflow-y: auto;
    /* flex-start + auto margins centres a short card but never pushes a tall
       one above the scroll origin, which used to make the name field unreachable */
    align-items: flex-start;
    align-items: safe center;
    padding: 32px 0;
    background:
      radial-gradient(ellipse at 30% 20%, rgba(62,198,240,0.08), transparent 60%),
      radial-gradient(ellipse at 80% 80%, rgba(255,176,32,0.06), transparent 55%),
      var(--bg);
    position: relative;
  }
  #startBg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.5; }
  .start-card {
    position: relative; width: min(620px, 92vw); background: var(--panel); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 40px 44px 0; box-shadow: 0 30px 80px rgba(0,0,0,0.35);
    margin: auto;
  }
  .start-eyebrow {
    font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.18em;
    font-size: 11px; color: var(--amber); margin: 0 0 10px;
  }
  .start-title {
    font-family: var(--serif); font-size: 38px; margin: 0 0 6px; text-wrap: balance;
    letter-spacing: 0.01em;
  }
  .start-sub { color: var(--ink-dim); margin: 0 0 28px; max-width: 52ch; }
  .field { margin-bottom: 22px; }
  .field label {
    display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
  }
  .field input[type="text"] {
    width: 100%; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink);
    padding: 10px 12px; border-radius: var(--radius); font-size: 15px; font-family: var(--serif);
  }
  .field input[type="text"]:focus { outline: 2px solid var(--sky); outline-offset: 1px; }
  .hub-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
    max-height: 340px; overflow-y: auto; padding: 2px 6px 4px 2px;
    border: 1px solid var(--line); border-radius: var(--radius);
    padding-top: 4px;
  }
  .hub-grid::-webkit-scrollbar { width: 8px; }
  .hub-grid::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
  .hub-group {
    grid-column: 1 / -1; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--muted); padding: 10px 4px 2px;
    border-top: 1px solid var(--line); margin-top: 4px;
  }
  .hub-group:first-child { border-top: none; margin-top: 0; padding-top: 4px; }
  .hub-grade { font-family: var(--mono); font-size: 9.5px; margin-top: 5px; letter-spacing: 0.03em; }
  .hub-grade.big  { color: var(--good); }
  .hub-grade.mid  { color: var(--sky); }
  .hub-grade.hard { color: var(--amber); }
  .hub-opt {
    background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 12px 10px; text-align: left; color: var(--ink);
  }
  .hub-opt:hover { border-color: var(--sky); }
  .hub-opt.sel { border-color: var(--amber); background: rgba(255,176,32,0.09); }
  .hub-opt .code { font-family: var(--mono); color: var(--amber); font-size: 12px; letter-spacing: 0.08em; }
  .hub-opt .name { font-size: 13px; margin-top: 3px; }

  .pos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .pos-grid.compact { grid-template-columns: repeat(3, 1fr); }
  .pos-grid.compact .pos-opt { padding: 10px 11px; }
  .pos-grid.compact .pblurb { display: none; }
  .pos-grid.compact .pname { font-size: 12.5px; }
  .pos-opt {
    background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 13px 12px; text-align: left; color: var(--ink);
  }
  .pos-opt:hover { border-color: var(--sky); }
  .pos-opt.sel { border-color: var(--amber); background: rgba(255,176,32,0.09); }
  .pos-opt .pname { font-size: 13px; font-weight: 600; margin-bottom: 5px; }
  .pos-opt .pblurb { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
  .pos-opt .pstat { font-family: var(--mono); font-size: 10px; color: var(--sky); margin-top: 7px; letter-spacing: 0.02em; }

  .start-dock {
    position: sticky; bottom: 0; margin: 28px -44px 0; padding: 16px 44px 22px;
    background: var(--panel);
    border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius);
    box-shadow: 0 -1px 0 var(--line);
  }
  /* short fade so content scrolling underneath doesn't collide with the bar */
  .start-dock::before {
    content: ""; position: absolute; left: 0; right: 0; top: -26px; height: 26px;
    background: linear-gradient(180deg, transparent, var(--panel));
    pointer-events: none;
  }
  .start-why {
    font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.05em; color: var(--muted);
    text-align: center; margin-top: 9px; min-height: 13px;
  }
  .start-why.ready { color: var(--good); }
  @media (max-width: 860px) {
    .start-dock { margin: 0 -20px; padding: 12px 20px 18px; }
  }
  .start-go {
    width: 100%; margin-top: 8px; background: var(--amber); border: none; color: #1a1206;
    font-weight: 700; padding: 13px; border-radius: var(--radius); font-size: 15px;
    letter-spacing: 0.03em;
  }
  .start-go:disabled { opacity: 0.4; cursor: not-allowed; }
  .start-go:not(:disabled):hover { background: #ffc04d; }

  .continue-card { text-align: left; }
  .cc-row { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 0 24px; padding: 14px 16px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); }
  .cc-name { font-family: var(--serif); font-size: 19px; }
  .cc-meta { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 4px; }
  .cc-worth { font-family: var(--mono); font-size: 18px; color: var(--amber); font-variant-numeric: tabular-nums; }
  .link-btn { background: none; border: none; color: var(--muted); font-size: 12.5px; text-decoration: underline; padding: 0; }
  .link-btn:hover { color: var(--ink); }

  /* ---------- Game shell ---------- */
  #game { height: 100vh; display: flex; flex-direction: column; }

  .topbar {
    display: flex; align-items: stretch; background: var(--panel);
    background-image: linear-gradient(180deg, rgba(255,255,255,0.025), transparent 70%);
    border-bottom: 1px solid var(--line); flex-shrink: 0;
    position: relative; z-index: 5;
    box-shadow: 0 3px 12px rgba(0,0,0,0.14);
  }
  .tb-cell {
    padding: 10px 16px; border-right: 1px solid var(--line);
    display: flex; flex-direction: column; justify-content: center;
  }
  .tb-label {
    font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 3px;
  }
  .tb-value { font-family: var(--mono); font-size: 16px; font-variant-numeric: tabular-nums; }
  .tb-value.amber { color: var(--amber); }
  .tb-horizon { font-family: var(--mono); font-size: 9px; color: var(--muted); letter-spacing: 0.06em; margin-top: 2px; }
  .tb-value.good { color: var(--good); }
  .tb-value.bad { color: var(--bad); }
  .tb-brand { display: flex; align-items: center; gap: 10px; padding: 0 18px; }
  .tb-brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--player); box-shadow: 0 0 8px var(--player); }
  .tb-brand .nm { font-family: var(--serif); font-size: 16px; }
  .tb-brand .pos-pill { margin-left: 2px; }
  .tb-spacer { flex: 1; }
  .tb-save { font-family: var(--mono); font-size: 10px; color: var(--muted); align-self: center; margin-right: 16px; letter-spacing: 0.04em; }
  .tb-end {
    background: var(--amber); background-image: var(--btn-sheen);
    color: #1a1206; border: none; padding: 0 26px;
    font-weight: 700; letter-spacing: 0.04em; font-size: 13.5px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12);
  }
  .tb-end:not(:disabled):hover { background-color: #ffc04d; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12), 0 0 16px rgba(255,176,32,0.35); }
  .tb-end:not(:disabled):active { transform: translateY(1px); }
  .tb-end:disabled { opacity: 0.5; }

  .main { flex: 1; display: flex; min-height: 0; }

  /* ---------- Map ---------- */
  .mapwrap {
    flex: 1; position: relative; overflow: hidden;
    background: radial-gradient(120% 95% at 38% 22%, var(--ocean-hi), var(--ocean-lo));
  }
  .mapwrap svg { width: 100%; height: 100%; display: block; }
  .grat { stroke: var(--line); stroke-width: 1; opacity: 0.45; }
  .land-shadow { fill: var(--land-shadow); }
  .routeline { fill: none; stroke-linecap: round; }
  .routeglow { fill: none; stroke-linecap: round; opacity: 0.16; }
  /* contested pairs read at a glance: dashed amber, red when you are losing */
  .routecontest {
    stroke: var(--amber); stroke-linecap: round; stroke-dasharray: 2 7; opacity: 0.85;
    pointer-events: none;
  }
  .routecontest.losing { stroke: var(--bad); stroke-dasharray: 2 5; }
  .flight-dot { filter: drop-shadow(0 0 3px currentColor); }
  .city-dot { cursor: pointer; }
  .city-dot circle.core { stroke: var(--bg-2); stroke-width: 1.5; }
  .city-dot:hover circle.ring { opacity: 0.9; }
  .city-label {
    font-family: var(--mono); font-size: 10px; fill: var(--ink-dim); pointer-events: none;
  }
  .city-code {
    font-family: var(--mono); font-size: 9.5px; fill: var(--muted); letter-spacing: 0.06em; pointer-events: none;
  }
  .slot-tag {
    font-family: var(--mono); font-size: 8.5px; fill: var(--sky); pointer-events: none; opacity: 0.85;
  }
  .slot-tag.full { fill: var(--bad); }
  .map-hint {
    position: absolute; left: 16px; bottom: 14px; font-family: var(--mono); font-size: 11px;
    color: var(--muted); letter-spacing: 0.03em;
  }
  .map-legend {
    position: absolute; right: 16px; top: 14px; display: flex; gap: 14px;
    font-family: var(--mono); font-size: 10.5px; color: var(--ink-dim);
  }
  .map-legend span { display: inline-flex; align-items: center; gap: 6px; }
  .map-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
  .fuel-ticker {
    position: absolute; left: 16px; top: 14px; font-family: var(--mono); font-size: 11px;
    color: var(--ink-dim); background: rgba(0,0,0,0.0); display: flex; gap: 10px; align-items: center;
  }
  .fuel-ticker b { color: var(--amber); font-variant-numeric: tabular-nums; }
  .fuel-ticker .hedged { color: var(--good); }
  .fuel-ticker .tk-contest { color: var(--amber); }

  /* ---------- Side panel ---------- */
  .side {
    width: 410px; flex-shrink: 0; background: var(--panel); border-left: 1px solid var(--line);
    display: flex; flex-direction: column; min-height: 0;
  }
  .tabs {
    display: flex; border-bottom: 1px solid var(--line); flex-shrink: 0;
    overflow-x: auto; scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    flex: 1 0 auto; background: none; border: none; color: var(--muted); padding: 12px 9px;
    font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
    border-bottom: 2px solid transparent; white-space: nowrap;
  }
  .tab:hover { color: var(--ink-dim); }
  .tab.active {
    color: var(--ink); border-bottom-color: var(--amber);
    background: linear-gradient(180deg, transparent 55%, rgba(255,176,32,0.09));
  }
  .tab-body { flex: 1; overflow-y: auto; padding: 16px; min-height: 0; }
  .tab-body::-webkit-scrollbar { width: 8px; }
  .tab-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

  .sec-title {
    font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--muted); margin: 0 0 10px;
  }
  .empty-note { color: var(--muted); font-size: 12.5px; padding: 10px 0 18px; }

  .card {
    background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 12px 14px; margin-bottom: 10px;
    background-image: var(--card-sheen);
    box-shadow: var(--card-shadow);
  }
  .card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
  .card-title { font-size: 13.5px; font-weight: 600; }
  .card-sub { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 2px; }
  .pill {
    font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase;
    padding: 2px 7px; border-radius: 10px; border: 1px solid var(--line); color: var(--ink-dim);
    white-space: nowrap;
  }
  .pill.idle { color: var(--amber); border-color: var(--amber-dim); }
  .pill.flying { color: var(--good); border-color: var(--good); }
  .pill.wifi { color: var(--violet); border-color: var(--violet); }
  .row2 { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-dim); margin-top: 8px; }
  .row2 b { color: var(--ink); font-variant-numeric: tabular-nums; }
  .loadbar { height: 5px; background: var(--line); border-radius: 3px; margin-top: 8px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,0.22); }
  .loadbar > i { display: block; height: 100%; background: var(--sky); background-image: var(--bar-sheen); border-radius: 3px; }
  .morale-bar > i, .cabin-bar > i, .board-meter > i, .rbar-fill { background-image: var(--bar-sheen); }
  .morale-bar, .cabin-bar, .board-meter { box-shadow: inset 0 1px 2px rgba(0,0,0,0.22); }
  .mini-btns { display: flex; gap: 8px; margin-top: 10px; }
  .mini-btn {
    flex: 1; background: none; border: 1px solid var(--line); color: var(--ink-dim);
    padding: 6px 8px; border-radius: var(--radius); font-size: 11.5px;
  }
  .mini-btn:hover { border-color: var(--sky); color: var(--ink); }
  .mini-btn.danger:hover { border-color: var(--bad); color: var(--bad); }

  .fleet-type-card .stats { font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-top: 4px; }
  .fleet-type-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
  .wifi-row { display: flex; align-items: center; gap: 7px; margin-top: 9px; font-size: 11.5px; color: var(--ink-dim); }
  .buy-mini {
    background: var(--amber); border: none; color: #1a1206; font-weight: 700;
    padding: 7px 12px; border-radius: var(--radius); font-size: 11.5px; white-space: nowrap;
  }
  .buy-mini:disabled { background: var(--line); color: var(--muted); }

  .log-item { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
  .log-item:last-child { border-bottom: none; }
  .log-q { font-family: var(--mono); color: var(--amber); font-size: 10.5px; margin-right: 6px; }
  .log-item.rival { color: var(--ink-dim); }

  .board-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .board-row:last-child { border-bottom: none; }
  .board-swatch { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
  .board-name { flex: 1; font-size: 13px; min-width: 0; }
  .board-name .pn { display: block; }
  .board-name .pp { display: block; font-family: var(--mono); font-size: 9.5px; color: var(--muted); margin-top: 1px; }
  .board-spark { flex-shrink: 0; }
  .board-worth { font-family: var(--mono); font-size: 13.5px; font-variant-numeric: tabular-nums; width: 72px; text-align: right; }
  .board-rank { font-family: var(--mono); color: var(--muted); font-size: 12px; width: 14px; }

  .hedge-card .row2 { margin-top: 6px; }
  .hedge-btn, .action-btn {
    width: 100%; margin-top: 10px; background: none; border: 1px solid var(--sky); color: var(--sky);
    padding: 9px; border-radius: var(--radius); font-size: 12.5px; font-weight: 600;
  }
  .hedge-btn:hover, .action-btn:hover { background: rgba(62,198,240,0.1); }
  .hedge-btn:disabled, .action-btn:disabled { border-color: var(--line); color: var(--muted); }

  .reset-btn {
    width: 100%; margin-top: 20px; background: none; border: 1px dashed var(--line); color: var(--muted);
    padding: 9px; border-radius: var(--radius); font-size: 11.5px;
  }
  .reset-btn:hover { border-color: var(--bad); color: var(--bad); }

  /* ---------- Multiplayer / new-feature UI ---------- */
  .seat-switcher { display: flex; gap: 6px; align-items: center; padding: 0 14px; }
  .seat-pill {
    font-family: var(--mono); font-size: 10.5px; padding: 5px 11px; border-radius: 12px;
    border: 1px solid var(--line); color: var(--ink-dim); background: none;
  }
  .seat-pill.active { border-color: var(--amber); color: var(--amber); background: rgba(255,176,32,0.08); }

  .rival-toggle-row {
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
    padding: 9px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap;
  }
  .rival-toggle-row .rt-name { flex: 1 0 auto; }
  .rival-toggle-row .rt-diff button { padding: 6px 9px; }
  .lbl-note {
    font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.04em; color: var(--muted);
    text-transform: none; margin-left: 6px;
  }
  @media (max-width: 860px) {
    .rival-toggle-row { flex-direction: column; align-items: stretch; }
    .rival-toggle-row .seg-toggle { width: 100%; }
    .rival-toggle-row .seg-toggle button { flex: 1; }
  }
  .rival-toggle-row:last-child { border-bottom: none; }
  .rival-toggle-row .rt-name { font-size: 12.5px; color: var(--ink-dim); }
  .seg-toggle { display: flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .seg-toggle button { background: none; border: none; color: var(--ink-dim); padding: 6px 12px; font-size: 11px; font-family: var(--mono); }
  .seg-toggle button.sel { background: var(--amber); color: #1a1206; font-weight: 700; }

  .morale-bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 8px; }
  .morale-bar > i { display: block; height: 100%; }

  .log-item.event-log { border-left: 2px solid var(--amber); padding-left: 8px; margin-left: -2px; }

  /* ---------- Aerobiz-style flourishes ---------- */
  .ac-art { display: flex; justify-content: center; padding: 2px 0 8px; }
  .ac-art svg { height: 52px; width: auto; display: block; }
  .ac-art.sm svg { height: 36px; }
  .ac-art.locked svg { opacity: 0.4; filter: saturate(0.3); }
  .pick-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .pick-left svg { height: 24px; width: auto; flex-shrink: 0; }
  .sky-wrap {
    margin: 2px 0 14px; border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; background: linear-gradient(var(--bg-2), var(--panel-2));
  }
  .sky-wrap svg { display: block; width: 100%; height: 76px; }
  .hub-sky { margin-top: 8px; }
  .hub-sky svg { display: block; width: 100%; height: 30px; }
  .report-sub {
    font-family: var(--mono); font-size: 10.5px; color: var(--amber);
    letter-spacing: 0.16em; text-transform: uppercase; margin: 0 0 3px;
  }
  .rbar-row { display: flex; align-items: center; gap: 10px; margin: 9px 0; }
  .rbar-name {
    width: 118px; font-size: 12px; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; color: var(--ink-dim);
  }
  .rbar-track { flex: 1; height: 13px; background: var(--line); border-radius: 2px; overflow: hidden; }
  .rbar-fill { height: 100%; }
  .rbar-val { width: 66px; text-align: right; font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }

  .globe-overlay {
    position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 26px; cursor: pointer;
    background: radial-gradient(ellipse at 50% 42%, rgba(16,26,48,0.88), rgba(6,10,20,0.96));
    backdrop-filter: blur(3px);
  }
  :root[data-theme="light"] .globe-overlay { background: radial-gradient(ellipse at 50% 42%, rgba(16,26,48,0.92), rgba(6,10,20,0.97)); }
  .globe-overlay canvas { display: block; filter: drop-shadow(0 0 34px rgba(62,198,240,0.18)); }
  .g-fact {
    max-width: 520px; width: min(520px, 88vw); text-align: center; position: relative;
    padding: 0 12px 16px; color: #e9eefb;
  }
  .g-fact .gf-label {
    display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em;
    text-transform: uppercase; color: var(--amber); margin-bottom: 9px;
  }
  .g-fact p { margin: 0; font-family: var(--serif); font-size: 18px; line-height: 1.55; text-wrap: balance; }
  .g-fact .gf-timer {
    position: absolute; left: 15%; right: 15%; bottom: 0; height: 2px; width: 70%;
    background: var(--amber); opacity: 0.7; display: block; margin: 0 auto;
  }
  .g-hint { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; color: #6d7da0; text-transform: uppercase; }

  .city-card {
    position: absolute; left: 16px; bottom: 42px; width: min(360px, 70vw);
    background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--sky);
    border-radius: var(--radius); padding: 13px 16px; box-shadow: 0 14px 44px rgba(0,0,0,0.35);
    opacity: 0; transform: translateY(8px); transition: opacity 0.3s, transform 0.3s;
    pointer-events: none; cursor: pointer;
  }
  .city-card.show { opacity: 1; transform: none; pointer-events: auto; }
  .city-card .cc-title { font-family: var(--serif); font-size: 16px; }
  .city-card .cc-code { font-family: var(--mono); font-size: 11px; color: var(--sky); margin-left: 6px; letter-spacing: 0.06em; }
  .city-card .cc-blurb { font-size: 12px; color: var(--ink-dim); margin: 6px 0 8px; line-height: 1.45; }
  .city-card .cc-stats { font-family: var(--mono); font-size: 10.5px; color: var(--muted); line-height: 1.7; }

  .tb-logo { width: 20px; height: 20px; object-fit: contain; border-radius: 3px; display: block; }
  .id-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
  .id-preview {
    width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
    border: 1px solid var(--line); background: var(--panel-2); flex-shrink: 0; display: block;
  }
  .id-preview.logo { border-radius: 6px; object-fit: contain; padding: 3px; }
  .id-hint { font-size: 11px; color: var(--muted); margin-top: 3px; }
  .ceo-face img { display: block; }

  .cabin-bar { height: 7px; border-radius: 3px; background: var(--sky); overflow: hidden; margin-top: 8px; }
  .cabin-bar > i { display: block; height: 100%; background: var(--amber); }
  .cabin-legend {
    display: flex; gap: 14px; margin-top: 6px;
    font-family: var(--mono); font-size: 10px; color: var(--muted);
  }
  .cabin-legend span { display: inline-flex; align-items: center; gap: 5px; }
  .cabin-legend b { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
  .seatmap-wrap {
    margin: 10px 0 4px; padding: 8px 10px; background: var(--panel-2);
    border: 1px solid var(--line); border-radius: var(--radius);
  }
  .config-opt {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius);
    margin-bottom: 7px; cursor: pointer; color: var(--ink);
    background: none; width: 100%; text-align: left;
  }
  .config-opt:hover { border-color: var(--sky); }
  .config-opt.sel { border-color: var(--amber); background: rgba(255,176,32,0.08); }
  .config-opt .co-name { display: block; font-size: 13px; font-weight: 600; }
  .config-opt .co-sub { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
  .config-opt .co-cost { font-family: var(--mono); font-size: 11.5px; white-space: nowrap; }

  .order-card { border-left: 3px solid var(--violet); }
  /* gates panel */
  .gate-filter { display: flex; gap: 6px; margin-bottom: 12px; }
  .gate-filter .mini-btn { flex: 1; }
  .gate-card .gate-city { font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 5px; }
  .gate-card .pill.full-pill { color: var(--bad); border-color: var(--bad); }
  .gate-bar {
    display: flex; height: 9px; border-radius: 5px; overflow: hidden; margin-top: 9px;
    background: var(--line); box-shadow: inset 0 1px 2px rgba(0,0,0,0.22);
  }
  .gate-bar > i { display: block; height: 100%; background-image: var(--bar-sheen); }
  .gate-bar > i.free { background: transparent; }
  .gate-legend {
    display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px;
    font-family: var(--mono); font-size: 10px; color: var(--ink-dim);
  }
  .gate-legend span { display: inline-flex; align-items: center; gap: 5px; }
  .gate-legend b { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
  .gate-legend .gate-rights { color: var(--amber); }
  .row2 b.warn { color: var(--amber); }
  .connect-b, b.connect-b { color: var(--violet); }

  /* rival approach dialog */
  .approach-who { display: flex; align-items: center; gap: 11px; margin-top: 4px; }
  .approach-who .aw-name { font-size: 14px; font-weight: 600; }
  .approach-who .aw-role { font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-top: 2px; }

  /* collapsible sections and route cards */
  .sec-toggle { cursor: pointer; display: flex; align-items: center; justify-content: space-between; user-select: none; }
  .sec-toggle:hover { color: var(--ink-dim); }
  .sec-chev { font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--muted); padding-left: 8px; }
  .rcard { padding: 0; overflow: hidden; }
  .rcard-head {
    display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%;
    background: none; border: none; color: var(--ink); padding: 12px 14px; text-align: left;
  }
  .rcard-head:hover { background: rgba(255,255,255,0.03); }
  .rh-stats { display: inline-flex; align-items: center; gap: 10px; }
  .rh-stats em {
    font-style: normal; font-family: var(--mono); font-size: 12px;
    font-variant-numeric: tabular-nums; color: var(--ink-dim);
  }
  .rh-stats em.good { color: var(--good); }
  .rh-stats em.bad { color: var(--bad); }
  .rh-chev { font-style: normal; font-family: var(--mono); font-size: 14px; color: var(--muted); }
  .rcard-body { display: none; padding: 0 14px 12px; }
  .rcard.open .rcard-body { display: block; }

  /* save slot picker */
  .slot-card {
    background: var(--panel-2); background-image: var(--card-sheen);
    border: 1px solid var(--line); border-radius: var(--radius);
    padding: 14px 16px; margin-bottom: 10px; cursor: pointer;
    transition: transform 0.12s ease, border-color 0.12s ease;
  }
  .slot-card:hover { border-color: var(--sky); transform: translateY(-1px); }
  .slot-card.empty {
    display: block;
    border-style: dashed; background: none; color: var(--muted);
  }
  .sc-row { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
  .sc-import { width: 100%; margin-top: 10px; }
  .sc-code {
    width: 100%; height: 74px; margin-top: 8px; resize: vertical; box-sizing: border-box;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    color: var(--ink-dim); font-family: var(--mono); font-size: 10px; padding: 8px;
    word-break: break-all;
  }
  .sc-err { color: var(--bad); }
  .slot-card.empty:hover { border-color: var(--amber); color: var(--ink-dim); }
  .sc-empty { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
  .sc-cta { font-size: 12.5px; color: var(--amber); }
  .sc-actions { display: flex; gap: 8px; margin-top: 10px; }
  .sc-actions .mini-btn { flex: 1; }

  /* inaugural flight cinematic */
  .launch-overlay {
    position: fixed; inset: 0; z-index: 72; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(ellipse at 50% 35%, rgba(18,28,50,0.97), rgba(5,9,18,0.99));
    backdrop-filter: blur(3px); padding: 24px 18px; animation: veilIn 0.2s ease-out;
  }
  .launch-overlay.hidden { display: none; }
  .launch-card { width: min(640px, 96vw); text-align: center; }
  .lx-head {
    display: flex; justify-content: space-between; align-items: baseline;
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
    color: #ffb020; margin-bottom: 14px;
  }
  .lx-head .lx-km { color: #8fa3c8; letter-spacing: 0.06em; }
  .lx-route { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 4px; }
  .lx-city { min-width: 0; }
  .lx-code { display: block; font-family: var(--mono); font-size: 27px; letter-spacing: 0.1em; color: #e9eefb; }
  .lx-name { display: block; font-size: 12px; color: #8fa3c8; margin-top: 2px; }
  .lx-arrow { font-size: 21px; color: #3ec6f0; flex-shrink: 0; }
  .lx-stage { position: relative; height: 150px; margin: 6px 0 2px; }
  .lx-sky { position: absolute; bottom: 0; width: 200px; opacity: 0.42; filter: brightness(1.5); }
  .lx-sky.lx-from { left: 0; }
  .lx-sky.lx-to { right: 0; }
  .lx-sky svg { width: 100%; height: auto; display: block; }
  .lx-trail { position: absolute; inset: 0; width: 100%; height: 100%; }
  .lx-plane {
    position: absolute; left: 0; top: 0; width: 92px;
    will-change: transform; transform-origin: 50% 50%;
  }
  .lx-plane svg { width: 100%; height: auto; display: block; }
  .lx-type {
    font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase;
    color: #3ec6f0; margin-top: 4px;
  }
  .lx-fact {
    font-family: var(--serif); font-size: 16px; line-height: 1.55; color: #e9eefb;
    max-width: 30rem; margin: 12px auto 0; text-wrap: balance;
  }
  .lx-timer {
    display: block; height: 2px; background: #ffb020; width: 100%;
    max-width: 22rem; margin: 18px auto 0; border-radius: 1px;
  }
  .lx-hint {
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
    color: #6d7da0; margin-top: 14px;
  }
  @media (max-width: 860px) {
    .lx-stage { height: 120px; }
    .lx-sky { width: 140px; }
    .lx-plane { width: 72px; }
    .lx-code { font-size: 22px; }
    .lx-fact { font-size: 14.5px; }
  }

  /* board briefing between quarters */
  .brief-overlay {
    position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(ellipse at 50% 40%, rgba(20,30,54,0.97), rgba(6,10,20,0.985));
    backdrop-filter: blur(3px); padding: 24px 18px; overflow-y: auto;
    animation: veilIn 0.2s ease-out;
  }
  .brief-overlay.hidden { display: none; }
  .brief-card {
    width: min(560px, 94vw); background: var(--panel); background-image: var(--card-sheen);
    border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5); margin: auto;
    animation: modalIn 0.26s cubic-bezier(0.2,0.8,0.3,1);
  }
  .brief-head {
    display: flex; justify-content: space-between; align-items: baseline;
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--amber); margin-bottom: 8px;
  }
  .brief-head .bh-q { color: var(--muted); }
  .brief-title { font-family: var(--serif); font-size: 26px; margin: 0 0 6px; }
  .brief-mood { color: var(--muted); font-size: 12.5px; margin: 0 0 18px; line-height: 1.5; }
  .brief-row {
    display: flex; gap: 12px; align-items: flex-start; padding: 12px 0;
    border-top: 1px solid var(--line);
  }
  .brief-row[data-brieftab] { cursor: pointer; }
  .brief-row[data-brieftab]:hover { background: rgba(255,255,255,0.03); }
  .br-face { flex-shrink: 0; }
  .br-face svg { display: block; }
  .br-body { flex: 1; min-width: 0; }
  .br-who { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
  .br-who em { font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--muted); margin-left: 5px; }
  .br-text { display: block; font-family: var(--serif); font-size: 14.5px; line-height: 1.5; color: var(--ink-dim); }
  .brief-go {
    width: 100%; margin-top: 20px; padding: 12px; border: none; border-radius: var(--radius);
    background: var(--amber); background-image: var(--btn-sheen); color: #1a1206;
    font-weight: 700; font-size: 14px; letter-spacing: 0.03em;
  }
  .brief-go:hover { background-color: #ffc04d; }
  @media (max-width: 860px) {
    .brief-card { padding: 20px 18px; }
    .brief-title { font-size: 22px; }
    .br-text { font-size: 13.5px; }
  }

  /* fleet grouped by type */
  .fleet-group { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
  .fg-head {
    display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
    background: var(--panel-2); border: none; color: var(--ink); padding: 9px 11px;
    background-image: var(--card-sheen);
  }
  .fg-head:hover { background-color: rgba(255,255,255,0.03); }
  .fg-art { width: 62px; flex-shrink: 0; }
  .fg-art svg { width: 100%; height: auto; display: block; }
  .fg-text { flex: 1; min-width: 0; }
  .fg-name { display: block; font-size: 13px; font-weight: 600; }
  .fg-name em { font-style: normal; font-family: var(--mono); color: var(--amber); font-size: 12px; }
  .fg-sub { display: block; font-family: var(--mono); font-size: 10px; color: var(--muted); margin-top: 3px; }
  .fg-chev { font-family: var(--mono); font-size: 15px; color: var(--muted); flex-shrink: 0; padding: 0 2px; }
  .fg-body { display: none; padding: 10px 10px 1px; }
  .fleet-group.open .fg-body { display: block; }
  .fg-body .card { background: var(--panel); }

  /* fleet utilisation */
  .util-bar { display: flex; height: 9px; border-radius: 5px; overflow: hidden; background: var(--line);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.22); margin-bottom: 9px; }
  .util-bar > i { display: block; height: 100%; background-image: var(--bar-sheen); }
  .util-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px;
    font-family: var(--mono); font-size: 10px; color: var(--ink-dim); }
  .util-legend span { display: inline-flex; align-items: center; gap: 5px; }
  .util-legend b { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

  /* route projection in the open-route dialog */
  .proj { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 11px; }
  .proj-head {
    display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
    font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 9px;
  }
  .proj-v { letter-spacing: 0.02em; text-align: right; }
  .proj-v.good { color: var(--good); }
  .proj-v.warn { color: var(--amber); }
  .proj-v.bad  { color: var(--bad); }
  .proj-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
  .proj-grid > div { text-align: center; }
  .proj-grid em {
    display: block; font-family: var(--mono); font-style: normal; font-size: 13px; color: var(--ink);
    font-variant-numeric: tabular-nums;
  }
  .proj-grid em.good { color: var(--good); }
  .proj-grid em.bad { color: var(--bad); }
  .proj-grid span {
    display: block; font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--muted); margin-top: 3px;
  }
  .proj-note { font-size: 11px; color: var(--muted); margin-top: 9px; line-height: 1.4; }

  /* route table */
  .view-toggle { display: flex; gap: 6px; margin-bottom: 12px; }
  .view-toggle .mini-btn { flex: 1; }
  .rt-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
  table.rt { width: 100%; border-collapse: collapse; font-size: 12px; }
  table.rt th {
    font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--muted); font-weight: 400; text-align: right; padding: 9px 8px;
    border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer;
  }
  table.rt th.l, table.rt td.l { text-align: left; }
  table.rt th.on { color: var(--amber); }
  table.rt td {
    text-align: right; padding: 9px 8px; border-bottom: 1px solid var(--line);
    font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink-dim);
    white-space: nowrap;
  }
  table.rt tbody tr:last-child td { border-bottom: none; }
  table.rt tbody tr:hover td { background: rgba(255,255,255,0.03); }
  table.rt td b { color: var(--ink); font-weight: 600; }
  table.rt td.good { color: var(--good); }
  table.rt td.bad  { color: var(--bad); }
  .rt-conn { color: var(--violet); font-style: normal; font-size: 10px; }

  /* route schedule panel */
  .sched { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
  .sch-head {
    display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 8px;
  }
  .sch-freq { color: var(--violet); letter-spacing: 0.02em; }
  .sch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .sch-grid > div {
    background: rgba(255,255,255,0.02); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 7px 8px; text-align: center;
  }
  .sch-grid em {
    display: block; font-family: var(--mono); font-style: normal; font-size: 13px;
    color: var(--ink); font-variant-numeric: tabular-nums;
  }
  .sch-grid span {
    display: block; font-family: var(--mono); font-size: 9px; letter-spacing: 0.05em;
    text-transform: uppercase; color: var(--muted); margin-top: 3px;
  }
  .sch-note { font-size: 11px; color: var(--muted); margin-top: 7px; line-height: 1.4; }

  /* route competition panel */
  .compet { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
  .cmp-head {
    display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 8px;
  }
  .cmp-share { color: var(--ink-dim); letter-spacing: 0.02em; }
  .cmp-share b { font-size: 10px; margin-left: 3px; }
  .cmp-share b.up { color: var(--good); }
  .cmp-share b.down { color: var(--bad); }
  .cmp-solo { color: var(--good); letter-spacing: 0.02em; }
  .cmp-bar {
    display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--line);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.22); margin-bottom: 9px;
  }
  .cmp-bar > i { display: block; height: 100%; background-image: var(--bar-sheen); }
  .cmp-row {
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
    font-size: 11.5px; color: var(--ink-dim); margin-bottom: 4px;
  }
  .cmp-row > span:first-child { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
  .cmp-row b { width: 8px; height: 8px; border-radius: 2px; display: inline-block; flex-shrink: 0; }
  .cmp-fare { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .cmp-cut  { color: var(--bad);  font-style: normal; font-size: 10px; }
  .cmp-rise { color: var(--good); font-style: normal; font-size: 10px; }
  .cmp-feud { color: var(--bad); font-style: normal; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em; }
  .cmp-verdict {
    font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.02em; margin-top: 8px;
  }
  .cmp-verdict.good { color: var(--good); }
  .cmp-verdict.warn { color: var(--amber); }
  .cmp-verdict.bad  { color: var(--bad); }
  .cmp-note { font-size: 11px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
  .cmp-mkt {
    display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 9px;
    font-family: var(--mono); font-size: 10px; color: var(--muted);
  }
  .cmp-mkt b { color: var(--ink-dim); font-variant-numeric: tabular-nums; margin-left: 4px; }
  .cmp-mkt b.warn { color: var(--amber); }
  .fare-share {
    font-family: var(--mono); font-size: 10px; color: var(--muted);
    margin-top: 5px; line-height: 1.4;
  }
  .fare-share b { color: var(--ink-dim); }
  .fare-share b.up { color: var(--good); }
  .fare-share b.down { color: var(--bad); }
  .fare-share .fs-was { opacity: 0.75; }

  /* cabin controls inline on owned aircraft */
  .cabin-inline { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
  .cabin-inline .ci-head {
    display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 8px;
  }
  .cabin-inline .seatmap-mini { margin-bottom: 8px; }
  .cabin-inline .mini-btns { margin-top: 8px; }
  .cabin-inline .cfg-cost {
    font-family: var(--mono); font-size: 9.5px; color: var(--muted); display: block; margin-top: 2px;
  }

  /* purchase ledger — every dollar of a buy, before you commit */
  .buy-ledger { display: flex; gap: 10px; margin-top: 10px; }
  .bl-col {
    flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 9px 10px 10px; background: rgba(255,255,255,0.015);
  }
  .bl-head {
    font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 7px;
  }
  .bl-row {
    display: flex; justify-content: space-between; gap: 6px; align-items: baseline;
    font-size: 11px; color: var(--ink-dim); margin-bottom: 3px;
  }
  .bl-row b { font-family: var(--mono); font-size: 11px; color: var(--ink); font-variant-numeric: tabular-nums; }
  .bl-row b.good { color: var(--good); }
  .bl-row b.bad { color: var(--bad); }
  .bl-col .mini-btn { width: 100%; margin-top: 7px; }
  @media (max-width: 860px) { .buy-ledger { flex-direction: column; } }

  .board-meter { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: 8px; }
  .board-meter > i { display: block; height: 100%; }
  .brand-toggle { display: flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 9px; }
  .brand-toggle button {
    flex: 1; background: none; border: none; color: var(--ink-dim);
    padding: 6px 8px; font-size: 11px; font-family: var(--mono);
  }
  .brand-toggle button.sel { background: var(--amber); color: #1a1206; font-weight: 700; }

  .exec-row { display: flex; gap: 11px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); }
  .exec-row:last-child { border-bottom: none; }
  .exec-face { flex-shrink: 0; }
  .exec-name { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.05em; margin-bottom: 3px; }
  .exec-quote { font-family: var(--serif); font-style: italic; font-size: 13px; line-height: 1.45; }

  .choice-btn {
    display: block; width: 100%; text-align: left; background: var(--panel-2);
    border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 16px;
    margin-bottom: 10px; color: var(--ink);
  }
  .choice-btn:hover { border-color: var(--amber); background: rgba(255,176,32,0.06); }
  .choice-btn .ch-label { display: block; font-size: 14px; font-weight: 600; }
  .choice-btn .ch-sub { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 3px; }
  .ceo-face { flex-shrink: 0; }
  .ceo-face svg { display: block; }

  /* ---------- Modal ---------- */
  .modal-veil {
    position: fixed; inset: 0; background: rgba(4,7,14,0.6); display: flex;
    align-items: center; justify-content: center; z-index: 50; backdrop-filter: blur(3px);
    animation: veilIn 0.18s ease-out;
  }
  .modal {
    width: min(440px, 92vw); max-height: 86vh; overflow-y: auto; background: var(--panel);
    background-image: var(--card-sheen);
    border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.45), 0 2px 8px rgba(0,0,0,0.3); position: relative;
    animation: modalIn 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
  }
  @keyframes veilIn { from { opacity: 0; } to { opacity: 1; } }
  @keyframes modalIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    .modal, .modal-veil { animation: none; }
    button { transition: none; }
  }
  .modal h3 { font-family: var(--serif); font-size: 21px; margin: 0 0 4px; }
  .modal .modal-sub { color: var(--muted); font-size: 12.5px; margin: 0 0 18px; }
  .modal label {
    display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.09em;
    text-transform: uppercase; color: var(--muted); margin: 16px 0 8px;
  }
  .modal select, .modal input[type=range] { width: 100%; }
  .fare-readout { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 15px; margin-top: 6px; }
  .aircraft-pick {
    display: flex; justify-content: space-between; align-items: center; padding: 10px 12px;
    border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; cursor: pointer;
    transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
  }
  .aircraft-pick:hover { border-color: var(--sky); transform: translateY(-1px); }
  .aircraft-pick.sel { border-color: var(--amber); background: rgba(255,176,32,0.08); box-shadow: 0 0 0 1px var(--amber-dim), 0 3px 10px rgba(0,0,0,0.18); }
  .hub-opt, .pos-opt, .config-opt { transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease; }
  .hub-opt:hover, .pos-opt:hover, .config-opt:hover { transform: translateY(-1px); }
  .hub-opt.sel, .pos-opt.sel, .config-opt.sel { box-shadow: 0 0 0 1px var(--amber-dim), 0 3px 10px rgba(0,0,0,0.16); }
  @media (prefers-reduced-motion: reduce) {
    .aircraft-pick, .hub-opt, .pos-opt, .config-opt { transition: none; }
    .aircraft-pick:hover, .hub-opt:hover, .pos-opt:hover, .config-opt:hover { transform: none; }
  }
  .modal-actions { display: flex; gap: 10px; margin-top: 22px; }
  .modal-actions button {
    flex: 1; padding: 11px; border-radius: var(--radius); font-size: 13.5px; font-weight: 600;
  }
  .btn-cancel { background: none; border: 1px solid var(--line); color: var(--ink-dim); }
  .btn-cancel:hover { border-color: var(--muted); color: var(--ink); }
  .btn-confirm { background: var(--amber); background-image: var(--btn-sheen); border: none; color: #1a1206; box-shadow: 0 2px 8px rgba(255,176,32,0.22); }
  .btn-confirm:not(:disabled):hover { background-color: #ffc04d; }
  .btn-confirm:not(:disabled):active { transform: translateY(1px); }
  .btn-confirm:disabled { background: var(--line); background-image: none; color: var(--muted); box-shadow: none; }
  .close-x { position: absolute; top: 18px; right: 20px; background: none; border: none; color: var(--muted); font-size: 18px; }

  /* ---------- Game over ---------- */
  .over-card { text-align: center; }
  .over-rank { font-family: var(--serif); font-size: 46px; margin: 4px 0 2px; color: var(--amber); }
  .over-line { color: var(--ink-dim); margin-bottom: 22px; }
  .over-grade {
    font-family: var(--serif); font-size: 64px; line-height: 1; color: var(--amber);
    margin: 2px 0 6px;
  }
  .hall-title { margin-top: 18px; }
  .copy-btn {
    width: 100%; margin-top: 10px; background: none; border: 1px solid var(--sky); color: var(--sky);
    padding: 9px; border-radius: var(--radius); font-size: 12.5px; font-weight: 600;
  }
  .copy-btn:hover { background: rgba(62,198,240,0.1); }

  .quick-start {
    display: block; width: 100%; margin: 0 0 6px; padding: 14px 16px;
    background: rgba(62,198,240,0.08); border: 1.5px solid var(--sky); color: var(--ink);
    border-radius: var(--radius); font-size: 15.5px; font-weight: 700; text-align: center;
  }
  .quick-start:hover { background: rgba(62,198,240,0.16); }
  .quick-start .qs-sub {
    display: block; margin-top: 5px; font-family: var(--mono); font-size: 10px;
    letter-spacing: 0.06em; color: var(--muted); font-weight: 400;
  }
  .qs-divider {
    display: flex; align-items: center; gap: 12px; margin: 14px 0 18px;
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--muted);
  }
  .qs-divider::before, .qs-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

  .advisor-chip {
    position: absolute; right: 16px; bottom: 42px; max-width: 340px; z-index: 5;
    display: flex; align-items: center; gap: 9px; cursor: pointer;
    background: var(--panel); border: 1px solid var(--line); border-right: 3px solid var(--sky);
    border-radius: var(--radius); padding: 9px 12px; box-shadow: 0 12px 36px rgba(0,0,0,0.3);
  }
  .advisor-chip:hover { border-color: var(--sky); }
  .advisor-chip .ad-text {
    font-size: 11.5px; line-height: 1.4; color: var(--ink-dim);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .advisor-chip .ceo-face, .advisor-chip .exec-face { flex-shrink: 0; }

  button.armed { border-color: var(--bad) !important; color: var(--bad) !important; }

  /* ---------- Flight School ---------- */
  .tut-panel {
    position: absolute; left: 16px; top: 44px; width: 250px; z-index: 5;
    background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--amber);
    border-radius: var(--radius); padding: 11px 13px; box-shadow: 0 12px 36px rgba(0,0,0,0.3);
  }
  .tut-panel .tp-head {
    display: flex; justify-content: space-between; align-items: baseline;
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--amber); margin-bottom: 8px;
  }
  .tut-panel .tp-x { background: none; border: none; color: var(--muted); font-size: 14px; cursor: pointer; padding: 0 2px; }
  .tut-step { display: flex; gap: 8px; align-items: baseline; font-size: 11.5px; color: var(--ink-dim); padding: 3px 0; }
  .tut-step.done { color: var(--muted); text-decoration: line-through; }
  .tut-step .tm { font-family: var(--mono); color: var(--amber); flex-shrink: 0; }
  .tut-step.done .tm { color: var(--good); }
  .tut-reward { font-family: var(--mono); font-size: 9.5px; color: var(--muted); margin-top: 7px; }

  @media (prefers-reduced-motion: reduce) {
    .flight-anim { animation: none !important; }
  }

  /* ---------- Mobile ---------- */
  @media (max-width: 860px) {
    body { overflow: auto; }
    #game { height: 100dvh; }
    .main { flex-direction: column; }
    .mapwrap { flex: none; height: 44%; min-height: 260px; }
    .side { width: 100%; flex: 1; border-left: none; border-top: 1px solid var(--line); }
    .topbar { flex-wrap: wrap; }
    .tb-cell { padding: 7px 10px; }
    .tb-value { font-size: 14px; }
    .tb-brand { padding: 0 12px; }
    .tb-brand .nm { font-size: 14px; }
    .tb-hide-m, .tb-save, .pos-pill { display: none; }
    .tb-end { padding: 8px 16px; font-size: 12.5px; }
    .seat-pill { font-size: 9.5px; padding: 4px 8px; }
    .pos-grid { grid-template-columns: 1fr; }
    .pos-grid.compact { grid-template-columns: repeat(3, 1fr); }
    .hub-grid { grid-template-columns: repeat(2, 1fr); max-height: 300px; }
    .tut-panel { width: min(240px, 64vw); top: 40px; padding: 8px 11px; }
    .tut-panel .tut-step { display: none; }
    .tut-panel .tut-step.next { display: flex; }
    .tut-panel .tut-reward { display: none; }
    .map-legend { flex-wrap: wrap; max-width: 46vw; gap: 6px 10px; }
    .city-card { width: min(320px, 84vw); }
    .advisor-chip { max-width: 60vw; bottom: 38px; }
    .g-fact p { font-size: 15.5px; }
    .start-card { padding: 26px 20px; }
    .start-title { font-size: 30px; }
  }


/* ---- marshallfrith.com hosting only. Written by tools/build-site-web.py. ----
   build.py puts a site bar in as the first child of <body>. #start and #game
   are height:100vh, so without this the page is bar + 100vh: a scrollbar on
   every screen and the bottom row of the game below the fold. Flex column on
   the body gives the bar its natural height and the game the rest. */
body { display: flex; flex-direction: column; }
body > .hosted-bar { flex: 0 0 auto; }
#start, #game { height: auto; flex: 1 1 auto; min-height: 0; }
