[hidden] { display: none !important; }
@font-face { font-family: "VIC Slimline"; src: url("/fonts/slimline.ttf") format("truetype"); font-weight: 400 800; font-style: normal; font-display: swap; }
/* Everything is capitals, everywhere. The Slimline font has capitals, digits and a few marks only, so punctuation falls back to Geist. */
html, body, button, input, select, textarea, .maplibregl-popup, .maplibregl-ctrl { text-transform: uppercase; }
input::placeholder, textarea::placeholder { text-transform: uppercase; }
input[type="email"], input[type="password"] { text-transform: none; }
/* Matches agenticice.au: quiet studio sheet, ice-blue accent, Schibsted Grotesk / Geist / Geist Mono, pill buttons, ruled lines. */
:root {
  --bg: #FAFBFC; --panel: #FFFFFF; --ink: #0D1217; --ink-2: #5A6672; --line: #DFE4E9; --grid: #EEF2F5;
  --fleet: #0A6C8C; --on-fleet: #FFFFFF; --primary: #d97a00; --alert: #a85a00; --other: #7a8894; --ok: #1b7a45;
  --font-display: "VIC Slimline", "Helvetica Neue", Arial, sans-serif;
  --font-body: "VIC Slimline", "Geist", system-ui, sans-serif;
  --font-mono: "VIC Slimline", "Geist Mono", ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0F13; --panel: #11171D; --ink: #EBF0F4; --ink-2: #93A1AD; --line: #232C35; --grid: #161E25;
    --fleet: #5CC4E4; --on-fleet: #06141A; --primary: #ffb23f; --alert: #ffb23f; --other: #5d6d7a; --ok: #4cc38a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B0F13; --panel: #11171D; --ink: #EBF0F4; --ink-2: #93A1AD; --line: #232C35; --grid: #161E25;
  --fleet: #5CC4E4; --on-fleet: #06141A; --primary: #ffb23f; --alert: #ffb23f; --other: #5d6d7a; --ok: #4cc38a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.45;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-top: max(14px, env(safe-area-inset-top, 0px));
  padding-bottom: max(28px, env(safe-area-inset-bottom, 0px));
}
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--fleet); outline-offset: 2px; }
a { color: var(--fleet); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

header.top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 12px; }
h1 { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -0.04em; margin: 0; line-height: 1.1; }
.site { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; color: var(--ink); background: var(--panel); letter-spacing: 0.04em; text-transform: uppercase; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--other); display: block; }
.pill[data-state="live"] i { background: var(--ok); }
.pill[data-state="bad"] i { background: var(--alert); }

.app { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .app { grid-template-columns: minmax(0, 1fr); } }

.map-wrap { position: relative; height: calc(100dvh - 90px); min-height: 460px; max-height: 900px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--grid); }
@media (max-width: 900px) { .map-wrap { height: 58dvh; min-height: 360px; } }
#map { position: absolute; inset: 0; }
.chip-row { position: absolute; top: 10px; left: 10px; right: 56px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; z-index: 2; }
.chip { pointer-events: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 500; line-height: 1.2; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.legend { position: absolute; left: 10px; bottom: 26px; z-index: 2; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 6px 10px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); max-width: calc(100% - 20px); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend b { display: block; width: 10px; height: 10px; border-radius: 50%; }
.legend .l-primary { background: #ff9d00; }
.legend .l-fleet { background: #0A6C8C; }
.legend .l-other { background: #7b8a96; }
.legend .l-me { background: var(--ink); }
.toast { position: absolute; left: 50%; top: 52px; transform: translateX(-50%); z-index: 3; max-width: min(92%, 420px); background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 6px; font-weight: 500; display: flex; gap: 10px; align-items: flex-start; box-shadow: 0 6px 20px rgba(0,0,0,0.25); }
.toast .tdot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex: none; }
.maperr { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; background: var(--panel); color: var(--ink-2); z-index: 4; }
.maplibregl-ctrl-attrib { font-size: 11px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.sec { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sec:last-child { border-bottom: 0; }
h2 { font-family: var(--font-mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); margin: 0 0 10px; }

.fleet-list { display: flex; flex-direction: column; margin: 0 -8px; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; text-align: left; width: 100%; background: transparent; border: 0; border-radius: 4px; padding: 8px; align-items: center; }
.row:hover { background: color-mix(in srgb, var(--fleet) 8%, transparent); }
.row[aria-pressed="true"] { background: color-mix(in srgb, var(--fleet) 14%, transparent); }
.row.old .callsign { color: var(--ink-2); }
.callsign { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; line-height: 1.1; }
.tag { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--alert); border: 1px solid currentColor; border-radius: 3px; padding: 0 5px; margin-left: 8px; vertical-align: 3px; }
.status { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; text-align: right; }
.status.air { color: var(--fleet); }
.status.gnd, .status.old { color: var(--ink-2); }
.meta { grid-column: 1 / -1; font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
.subhead { font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.06em; margin: 10px 8px 2px; }

.setting { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 8px 0; }
.setting + .setting { border-top: 1px solid var(--line); }
.s-title { font-weight: 600; }
.s-desc { font-size: 12.5px; color: var(--ink-2); }
.switch { width: 44px; height: 26px; border-radius: 999px; border: 1px solid var(--line); background: var(--grid); position: relative; flex: none; padding: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); transition: transform 0.15s; }
.switch[aria-checked="true"] { background: var(--fleet); border-color: var(--fleet); }
.switch[aria-checked="true"]::after { transform: translateX(18px); border-color: var(--fleet); }
@media (prefers-reduced-motion: reduce) { .switch::after { transition: none; } }
.slider-row { padding: 8px 0 4px; }
.slider-row label { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 4px; }
input[type="range"] { width: 100%; accent-color: var(--fleet); }
.seg { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { flex: 1; border: 0; border-right: 1px solid var(--line); background: transparent; padding: 7px 2px; font-size: 13px; font-family: var(--font-mono); }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.seg button:disabled { opacity: 0.45; }
.btn { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 14px; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.note { font-size: 12.5px; color: var(--ink-2); margin: 8px 0 0; }
.limit { margin-top: 10px; padding: 8px 12px; border: 1px solid var(--alert); border-radius: 10px; color: var(--alert); font-size: 13px; }
.plan { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.plan-name { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.1; }
.plan-sub { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.meter { height: 6px; border-radius: 3px; background: var(--grid); margin-top: 8px; overflow: hidden; }
.meter div { height: 100%; width: 0; background: var(--fleet); }
.plus-list { margin: 10px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 13.5px; }
.plusonly[data-locked="true"] { opacity: 0.5; }
.quiet-times { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; padding-bottom: 6px; }
.quiet-times input { font: inherit; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: 3px 6px; }
.testing { border-top: 1px dashed var(--line) !important; margin-top: 6px; }

.log { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; }
.log li { display: grid; grid-template-columns: auto 10px 1fr; gap: 8px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.log li:first-child { border-top: 0; }
.log time { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-2); }
.log .d { width: 8px; height: 8px; border-radius: 50%; background: var(--other); align-self: center; }
.log .d.takeoff { background: var(--primary); }
.log .d.near { background: var(--fleet); }
.empty { color: var(--ink-2); font-size: 13.5px; margin: 4px 0; }
.maperr .mono { font-size: 11.5px; display: inline-block; margin-top: 8px; max-width: 420px; word-break: break-word; }

h3 { font-family: var(--font-display); font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-2); margin: 16px 0 6px; }
.nomargin { margin-top: 0; }
.legend .l-haz { background: #e5484d; }
.legend .l-rep { background: #8a5cf6; }
.log .d.hazard { background: #e5484d; }
.haz-list { display: flex; flex-direction: column; }
.haz { padding: 8px 0; border-top: 1px solid var(--line); }
.haz:first-child { border-top: 0; }
.haz-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.haz-type { font-weight: 600; }
.haz-src { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; flex: none; }
.haz-meta { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
.haz-text { font-size: 13.5px; }
.haz button.link { background: none; border: 0; padding: 0; color: var(--fleet); text-decoration: underline; font-size: 12.5px; }
.rep-form label { display: block; font-weight: 600; margin: 10px 0 4px; font-size: 13.5px; }
.rep-form select, .rep-form input[type="text"] { width: 100%; font: inherit; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: 7px 8px; }
.btn[aria-pressed="true"] { background: var(--fleet); color: var(--on-fleet); border-color: var(--fleet); }
.maplibregl-popup-content { font-family: var(--font-body); font-size: 13px; max-width: 240px; color: #131f2a; }
.maplibregl-popup-content button { font: inherit; margin-top: 6px; background: none; border: 0; padding: 0; color: #1450d8; text-decoration: underline; cursor: pointer; }

/* accounts */
.acct, .rep-gate { background: var(--panel2, rgba(127,127,127,.08)); border-radius: 10px; padding: 12px; }
.rep-gate { margin-bottom: 10px; }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 16px; }
.modal-card { position: relative; width: min(380px, 100%); max-height: 92vh; overflow: auto; background: var(--bg, #fff); color: inherit; border-radius: 14px; padding: 20px; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.modal-card h2 { margin: 0 0 14px; }
.modal-card label { display: block; margin: 10px 0 4px; font-size: 13px; }
.modal-card input { width: 100%; box-sizing: border-box; padding: 10px; font: inherit; font-size: 16px; border-radius: 8px; border: 1px solid rgba(127,127,127,.5); background: transparent; color: inherit; }
.modal-x { position: absolute; top: 8px; right: 10px; background: none; border: 0; font-size: 26px; color: inherit; cursor: pointer; }
.btn.wide, .btn.google { width: 100%; margin-top: 14px; }
.btn.google { margin-top: 0; }
.or { text-align: center; margin: 14px 0 0; font-size: 12px; opacity: .7; }
#authMsg[data-ok="1"] { color: #2e9e5b; }
#authMsg:not([data-ok="1"]) { color: #d64545; }
#hazScope { margin: 4px 0 10px; }
.modal[hidden], .rep-gate[hidden], .rep-form[hidden] { display: none !important; }


h1, h2, .callsign, .status, .tag, .btn, .chip, .seg button, .s-title, .plan-name { font-family: var(--font-display), var(--font-body); font-synthesis: none; font-weight: 400; letter-spacing: 0.04em; }
h1 { font-size: 32px; } .callsign { font-size: 24px; } h2 { font-size: 15px; }

/* one font, one weight, everywhere */
html, body, button, input, select, textarea, .maplibregl-popup, .maplibregl-ctrl { font-family: var(--font-body); font-synthesis: none; letter-spacing: 0.04em; }
b, strong, h1, h2, h3, .s-title { font-weight: 400; }
body { font-size: 16px; }
.mono { font-family: var(--font-mono); }

/* brand: number plate logo */
h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.plate { position: relative; display: inline-block; padding: 3px 22px; background: #fff; color: #0b1f4b; border: 2px solid #0b1f4b; border-radius: 7px;
  box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px #9aa7bf, 0 1px 2px rgba(0,0,0,.35); font-size: 26px; letter-spacing: 0.1em; line-height: 1.15; text-shadow: 0 1px 0 rgba(255,255,255,.9), 0 -1px 0 rgba(11,31,75,.25); }
.plate::before, .plate::after { content: ""; position: absolute; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #8c98ae); }
.plate::before { left: 7px; } .plate::after { right: 7px; }

.chip[hidden] { display: none; }
.chip-x { padding: 6px 11px; }

.btn[hidden] { display: none; }
.drop-pin { width: 30px; height: 40px; cursor: grab; touch-action: none; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 40'%3E%3Cpath d='M15 39C15 39 2 23 2 14a13 13 0 0 1 26 0c0 9-13 25-13 25z' fill='%23e5484d' stroke='white' stroke-width='2.5'/%3E%3Ccircle cx='15' cy='14' r='5' fill='white'/%3E%3C/svg%3E"); filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.drop-pin:active { cursor: grabbing; }
.owner-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #d97a00; color: #fff; font-size: 11px; vertical-align: middle; }

/* ===================== VIC-AIR v1.1 UI ===================== */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--fleet); color: var(--on-fleet); padding: 8px 14px; border-radius: 999px; text-decoration: none; }
.skip:focus { top: 10px; }
.edition { display: inline-block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; padding: 3px 9px; border-radius: 999px;
  color: #06141a; background: linear-gradient(90deg, #5cc4e4, #9be7ff); vertical-align: middle; white-space: nowrap; }
h1 .edition { font-size: 12px; }
.about .ver { margin: 0 0 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.panel:focus { outline: none; }
.panel:focus-visible { outline: 2px solid var(--fleet); outline-offset: 2px; }

/* map chrome on a dark UI */
.chip { background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(6px); color: var(--ink); min-height: 34px; }
.chip-sel { position: relative; padding: 0; display: inline-flex; align-items: center; }
.chip-sel select { appearance: none; -webkit-appearance: none; background: transparent; color: inherit; border: 0; font: inherit; padding: 6px 30px 6px 14px; border-radius: 999px; cursor: pointer; }
.chip-sel::after { content: ""; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px; margin-top: -5px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); pointer-events: none; }
.chip-sel select:focus-visible { outline: 2px solid var(--fleet); outline-offset: 2px; }
.chip-sel select option { background: var(--panel); color: var(--ink); }
.legend { background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(6px); border-radius: 8px; }
.maplibregl-ctrl-group { background: var(--panel) !important; border: 1px solid var(--line); }
.maplibregl-ctrl-group button { background-color: var(--panel); }
.maplibregl-ctrl-group button + button { border-top-color: var(--line) !important; }
.maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1) brightness(1.4); }
.maplibregl-ctrl-attrib, .maplibregl-ctrl-scale { background: color-mix(in srgb, var(--panel) 85%, transparent) !important; color: var(--ink-2) !important; border-color: var(--ink-2) !important; text-transform: none; }
.maplibregl-ctrl-attrib a { color: var(--ink) !important; }
.maplibregl-ctrl-attrib-button { filter: invert(1); }

/* altitude legend for the flight track */
.alt-legend { position: absolute; right: 10px; bottom: 56px; z-index: 2; background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 11px; color: var(--ink-2); max-width: 260px; }
.alt-legend .al-title { display: block; margin-bottom: 4px; color: var(--ink); }
#altBands { display: flex; flex-wrap: wrap; gap: 3px 10px; }
#altBands span { display: inline-flex; gap: 5px; align-items: center; font-family: var(--font-mono); }
#altBands b { width: 16px; height: 4px; border-radius: 2px; display: block; }

/* selected aircraft card */
.info { position: absolute; left: 10px; top: 54px; z-index: 3; width: min(320px, calc(100% - 20px)); max-height: calc(100% - 120px); overflow: auto;
  background: color-mix(in srgb, var(--panel) 95%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: 0 8px 28px rgba(0,0,0,.35); }
.info-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.info-call { font-family: var(--font-display); font-size: 24px; color: var(--ink); letter-spacing: 0.04em; margin: 0 0 2px; }
.info-kind, .info-state { font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); }
.info-state[data-s="air"] { color: var(--fleet); }
.info-state[data-s="old"] { color: var(--alert); }
.info-x { background: none; border: 0; font-size: 26px; line-height: 1; color: var(--ink-2); padding: 0 4px; min-width: 32px; min-height: 32px; }
.info-x:hover { color: var(--ink); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 10px 0 0; }
.info-grid dt { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-2); letter-spacing: 0.06em; }
.info-grid dd { margin: 0; font-family: var(--font-mono); font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
#iSq[data-emerg="1"] dd { color: #ff6b6b; }
.btn-row.tight { margin-top: 10px; }
.btn-row.center { justify-content: center; }

/* loading state */
.loading { position: absolute; left: 50%; bottom: 70px; transform: translateX(-50%); z-index: 3; display: flex; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 13px; color: var(--ink-2); }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--fleet); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }

/* larger touch targets */
.btn, .seg button, .chip { min-height: 38px; }
.switch { min-height: 26px; }

/* phones: map first, details as a bottom sheet */
@media (max-width: 640px) {
  body { padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px)); }
  h1 { font-size: 22px; gap: 8px; } .plate { font-size: 20px; padding: 2px 18px; }
  .map-wrap { height: 64dvh; border-radius: 10px; }
  .chip { font-size: 12px; padding: 5px 11px; min-height: 34px; }
  .legend { font-size: 11px; gap: 2px 10px; bottom: 22px; }
  body.has-info .legend { display: none; }
  .info { left: 6px; right: 6px; top: auto; bottom: 6px; width: auto; max-height: 55%; border-radius: 14px; }
  .info-grid { grid-template-columns: 1fr 1fr 1fr; gap: 6px 10px; }
  .info-grid dd { font-size: 13px; }
  .alt-legend { top: 96px; bottom: auto; right: 6px; max-width: 190px; }
}
/* large and unfolded screens (tri-fold, ultrawide): wider panel, taller map */
@media (min-width: 1500px) {
  .app { grid-template-columns: minmax(0, 1fr) 440px; }
  .map-wrap { max-height: none; }
}
@media (min-width: 2000px) {
  .app { grid-template-columns: minmax(0, 1fr) 520px; }
  .panel { columns: 1; }
}
/* foldables reporting two side-by-side segments: map on one, panel on the other */
@media (horizontal-viewport-segments: 2) {
  .app { grid-template-columns: env(viewport-segment-width 0 0, 1fr) minmax(0, 1fr); gap: calc(env(viewport-segment-left 1 0, 0px) - env(viewport-segment-right 0 0, 0px) + 16px); }
}
/* landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
  .app { grid-template-columns: minmax(0, 1fr) 320px; }
  .map-wrap { height: calc(100dvh - 70px); min-height: 280px; }
}

/* the data card keeps real punctuation (6,600 ft, 10:07) in a system monospace, so numbers read correctly */
#altBands span, .info-grid dd, .vtext { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; letter-spacing: 0; }
@media (max-width: 640px) { .info { padding: 10px 12px; } .info-call { font-size: 20px; } .info-grid dd { font-size: 12.5px; } .info .btn { min-height: 34px; padding: 6px 14px; } }
@media (max-width: 640px) {
  body.has-info #followBtn, body.has-info #flightBtn, body.has-info #flightClose { display: none; }
  body.has-info #iHex, body.has-info #iVs { display: none; }
  .info { max-height: 48%; }
  .info-grid { gap: 4px 10px; margin-top: 6px; }
  .info-grid dt { font-size: 9.5px; }
  .alt-legend { top: 56px; }
}

/* ===================== v1.1.0: one screen, no page scroll ===================== */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body { height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 8px; box-sizing: border-box;
  padding: max(8px, env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) max(8px, env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px)); }
header.top { flex: none; margin: 0; flex-wrap: nowrap; align-items: center; min-width: 0; }
header.top h1 { font-size: 24px; flex-wrap: nowrap; white-space: nowrap; min-width: 0; overflow: hidden; }
header.top .plate { font-size: 20px; padding: 2px 18px; }
.site { flex: none; flex-wrap: nowrap; }
.menu-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; min-height: 36px; color: var(--ink); }
.menu-btn[aria-expanded="true"] { border-color: var(--fleet); }
.burger, .burger::before, .burger::after { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 1px; position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -5px; } .burger::after { top: 5px; }

.app { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: minmax(0, 1fr); gap: 10px; align-items: stretch; }
.map-wrap { height: auto !important; min-height: 0 !important; max-height: none !important; }

.dock { min-height: 0; display: flex; flex-direction: column; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; overflow: hidden; }
.dock:focus { outline: none; }
.dock-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dock-actions .btn { flex: 1 1 auto; padding: 7px 12px; min-height: 40px; font-size: 13px; }
.dock-actions #locBtn { flex: 2 1 60%; }
.dock-actions .btn.small { flex: 1 1 25%; }
.dock-actions #permBtn { flex: 1 1 100%; }
.dock-actions #permBtn[data-state="granted"] { border-color: var(--ok); color: var(--ok); }
.dock-actions #permBtn[data-state="denied"], .dock-actions #permBtn[data-state="insecure"] { border-color: var(--alert); color: var(--alert); }
.dock-acct { display: flex; gap: 8px; flex: 1 1 100%; }
.dock-acct .btn { flex: 1 1 0; }
.dock-acct #acctSignUp { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.acct-chip { flex: 1 1 100%; }
.dock-status { margin: 0; font-size: 12px; color: var(--ink-2); line-height: 1.3; }
.dock-h { margin: 2px 0 0; font-size: 12px; }
.dock .fleet-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 -6px; }
.dock .row { padding: 6px; }
.dock .callsign { font-size: 19px; }
.dock .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }
.dock .empty { margin: 0; font-size: 12.5px; }

/* everything else lives in the menu drawer */
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); z-index: 40; border-radius: 0; border-width: 0 0 0 1px;
  overflow-y: auto; overscroll-behavior: contain; padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: -10px 0 40px rgba(0,0,0,.45); }
.panel-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: max(10px, env(safe-area-inset-top, 0px)) 16px 10px; background: var(--panel); border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; }
.scrim { position: fixed; inset: 0; z-index: 39; background: rgba(0,0,0,.5); }
.panel[hidden], .scrim[hidden] { display: none !important; }

.help-card h2 { font-size: 18px; color: var(--ink); margin-right: 30px; }
.help-list { margin: 10px 0 0; padding-left: 20px; font-size: 13.5px; line-height: 1.45; color: var(--ink); }
.help-list li + li { margin-top: 6px; }
.help-card, .modal-card { background: var(--panel); border: 1px solid var(--line); }

/* stacked layout: map on top, dock below (phones, folded tri-fold, narrow windows) */
@media (max-width: 899px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 8px; }
  .dock { max-height: 44dvh; padding: 10px; gap: 6px; }
  .dock .fleet-list { max-height: none; }
}
@media (max-width: 520px) {
  .brand-word, .ymen { display: none; }
  header.top h1 { font-size: 18px; gap: 6px; }
  header.top .plate { font-size: 16px; padding: 1px 14px; }
  h1 .edition { font-size: 10px; padding: 2px 7px; }
  .menu-lbl { display: none; }
  .menu-btn { padding: 6px 10px; }
  .pill { font-size: 10px; }
  .dock-actions { gap: 6px; }
  .dock-actions .btn { min-height: 38px; font-size: 12px; padding: 6px 8px; }
  .dock-actions #permBtn { flex: 1 1 40%; }
  .dock-acct { flex: 1 1 50%; gap: 6px; }
  .acct-chip { flex: 1 1 50%; }
  .dock .callsign { font-size: 17px; }
  .legend { font-size: 10px; padding: 4px 8px; gap: 2px 8px; bottom: 20px; }
  .chip-row { top: 8px; left: 8px; }
}
@media (max-height: 700px) and (max-width: 899px) { .dock { max-height: 48dvh; } .dock-status { display: none; } }
/* landscape phones: dock on the side */
@media (max-height: 500px) and (orientation: landscape) {
  .app { grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: minmax(0, 1fr); }
  .dock { max-height: none; }
  .legend { display: none; }
}
@media (min-width: 1500px) { .app { grid-template-columns: minmax(0, 1fr) 380px; } }

/* Google sign-in button: Google Identity branding (dark theme variant): #131314 fill, #8E918F stroke, #E3E3E3 text, Roboto Medium 14/20, 40px tall, 12px side padding, 10px gap after the 20px logo */
.gsi-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 40px; padding: 0 12px; margin: 0;
  background: #131314; border: 1px solid #8E918F; border-radius: 20px; color: #E3E3E3; cursor: pointer;
  font-family: "Roboto", Arial, sans-serif !important; font-weight: 500 !important; font-size: 14px; line-height: 20px; letter-spacing: 0.25px !important; text-transform: none !important; }
.gsi-btn:hover { background: #1f1f20; }
.gsi-btn:focus-visible { outline: 2px solid #A8C7FA; outline-offset: 2px; }
.gsi-btn:disabled { opacity: 0.38; }
.gsi-btn .g-logo { width: 20px; height: 20px; flex: none; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 70px !important; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--fleet); font-size: 12px; padding: 6px 8px; min-height: 32px; }
.pw-rules { list-style: none; margin: 8px 0 0; padding: 0; font-size: 12px; color: var(--ink-2); display: grid; gap: 2px; }
.pw-rules li::before { content: "○ "; }
.pw-rules li[data-ok="1"] { color: var(--ok); }
.pw-rules li[data-ok="1"]::before { content: "● "; }
.legal-note { font-size: 11.5px; margin-top: 12px; }
.legal-foot { margin: 14px 0 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }

/* legend leaves room for the attribution (i) button at bottom right */
.legend { max-width: calc(100% - 64px); }

/* Agentic I.C.E mark beside the VIC-AIR plate, and a small one in the footer */
.brand-mark { height: 1.3em; width: auto; flex: none; align-self: center; }
.foot-mark { height: 14px; width: auto; vertical-align: -2px; margin-right: 5px; }

/* v1.1.3: feedback and suggestions */
.dock-hrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.dock-hrow .dock-h { margin: 2px 0 0; }
.fb-open { flex: none; background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 0 10px; height: 22px; min-height: 0; line-height: 20px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-2); }
.fb-open:hover, .fb-open:focus-visible { color: var(--fleet); border-color: var(--fleet); }
.fb-card { width: min(440px, 100%); max-height: calc(100dvh - 32px); }
.fb-card h2 { font-size: 18px; color: var(--ink); margin-right: 30px; }
.fb-tabs { margin: 0 0 12px; }
.fb-tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.fb-type { border: 0; margin: 0; padding: 0; min-width: 0; }
.fb-type legend { font-size: 13px; padding: 0; margin: 0 0 4px; }
#fbTypeSeg label { flex: 1; margin: 0; position: relative; display: flex; border-right: 1px solid var(--line); }
#fbTypeSeg label:last-child { border-right: 0; }
#fbTypeSeg input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
#fbTypeSeg span { flex: 1; text-align: center; padding: 8px 2px; font-size: 13px; cursor: pointer; font-family: var(--font-display), var(--font-body); }
#fbTypeSeg input:checked + span { background: var(--ink); color: var(--bg); }
#fbTypeSeg input:focus-visible + span { outline: 2px solid var(--fleet); outline-offset: -2px; }
.fb-card textarea { width: 100%; box-sizing: border-box; padding: 10px; font-size: 16px; border-radius: 8px; border: 1px solid rgba(127,127,127,.5); background: transparent; color: inherit;
  resize: vertical; min-height: 96px; max-height: 40dvh; display: block;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; text-transform: none; letter-spacing: 0; }
.fb-card textarea::placeholder { text-transform: none; }
.fb-card textarea:focus-visible { outline: 2px solid var(--fleet); outline-offset: 2px; }
.fb-count { text-align: right; font-size: 11.5px; color: var(--ink-2); margin-top: 3px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0; text-transform: none; }
.fb-count[data-bad="1"] { color: var(--alert); }
.fb-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.fb-msg:empty { display: none; }
.fb-msg[data-state="ok"] { color: var(--ok); }
.fb-msg[data-state="err"] { color: #ff6b6b; }
.fb-inbox-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fb-inbox-head .btn { min-height: 32px; padding: 4px 12px; font-size: 12px; }
.fb-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; max-height: 60dvh; overflow-y: auto; overscroll-behavior: contain; }
.fb-item { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; text-transform: none; letter-spacing: 0; font-size: 13px; }
.fb-item-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--ink-2); font-size: 11.5px; }
.fb-item-type { color: var(--fleet); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.fb-item-msg { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.fb-item-meta { color: var(--ink-2); font-size: 11px; overflow-wrap: anywhere; }
.fb-del { background: none; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); font-size: 11px; padding: 2px 10px; min-height: 26px; text-transform: none; font-family: inherit; letter-spacing: 0; }
.fb-del:hover { color: #ff6b6b; border-color: #ff6b6b; }
@media (max-width: 520px) { .fb-card { padding: 16px; } .fb-card textarea { min-height: 84px; } }
