/* Skywatch — sage map, cream cards, cyan accents, condensed type. */
:root {
  /* surfaces */
  --paper: #FFFFFF; --paper-2: #F2F4EE; --paper-3: #E6EAE1; --card-tint: #ECEFE7; --line: #D3D9CC; --line-2: #BFC8B6;
  --glass: rgba(238,240,232,.9);
  --night: #15282C; --night-2: #1D373C;
  /* ink */
  --ink: #111915; --ink-2: #34433A; --ink-3: #66756B; --ink-4: #98A398;
  /* accent */
  --cyan: #22BCD8; --cyan-h: #18A7C2; --cyan-glow: rgba(34,188,216,.45); --cyan-sub: rgba(34,188,216,.16); --cyan-t: #0F6B7A;
  --teal-pill: #CDE9E6; --teal-pill-t: #23605F;
  /* meaning (dark shades so they read on sage and cream) */
  --green: #2F8A4F; --green-sub: rgba(47,138,79,.13);
  --amber: #A86A06; --amber-sub: rgba(214,146,22,.18);
  --red: #C42D4E; --red-sub: rgba(196,45,78,.12);
  --purple: #7146B5; --purple-sub: rgba(113,70,181,.12);
  --pink: #B03370; --pink-sub: rgba(176,51,112,.12);
  --font: 'Saira Semi Condensed', 'DM Sans', system-ui, sans-serif;
  --panel-w: 0px;   /* the panel is now a bottom slider, so the map uses the full width */
  --sheet-open: min(48vh, 560px);  /* slider height when open */
  --sheet-top: 76px;               /* distance from the bottom of the window to the top of the slider (set by app.js) */
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
/* Sea blue page background: iPhone Safari colours the status-bar area from it. */
html { background: #7EA9C1; }
body { background: #7EA9C1; color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--cyan-t); text-decoration: none; font-weight: 600; }
a:hover { color: var(--ink); }
.label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.6px; color: var(--ink-3); }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); font-size: 13px; }

/* ---------- map ---------- */
#map { position: fixed; inset: 0; background: #7EA9C1; }
.leaflet-container { font-family: var(--font); background: #7EA9C1; }
/* Esri light-grey canvas, tinted sage; a soft hillshade adds the terrain texture. */
.tiles-base { } /* coloured in app.js (ColouredTiles) */
.tiles-relief { mix-blend-mode: multiply; opacity: .22; filter: grayscale(1) contrast(1.2); }
.tiles-labels { opacity: .78; }
.leaflet-control-attribution { background: rgba(238,240,232,.75) !important; color: var(--ink-3) !important; font-size: 10px; }
/* Map credits sit just above the bottom bar, left of the side panel, so they stay visible. */
/* Map credits sit just above the bottom bar so they stay visible. */
/* Credits live at the bottom of the panel card instead of on the map. */
.credits { padding: 14px 24px 18px; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.5; color: var(--ink-3); }
.link-btn { margin-top: 6px; padding: 0; border: 0; background: none; color: var(--cyan-t); font-size: 14px; font-weight: 600; cursor: pointer; }
.link-btn:hover { color: var(--ink); }
.source { margin-top: 8px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-4); }
.wiki p + p { margin-top: 8px; }
.leaflet-control-attribution a { color: var(--ink-2) !important; font-weight: 500; }

/* ---------- finder: search + filters ---------- */
/* Spans the map area; search and filters share a row when there's room, filters drop below when not. */
/* Search spans the map; the filters sit inside it as icons. */
.finder { position: fixed; top: calc(16px + env(safe-area-inset-top)); left: calc(16px + env(safe-area-inset-left)); right: calc(16px + env(safe-area-inset-right)); z-index: 1200; transform: translateZ(0); will-change: transform; } /* own layer, so Safari draws it above the top fade */
/* The map fades into the status-bar colour at the top, so the phone's safe area doesn't show as a hard band. */
/* Behind the status bar: a real element (iOS 26 tints the status bar from what touches the top of the page, and
   ignores ::before decorations, so the map's sea blue was showing through). */
.status-band { position: fixed; top: 0; left: 0; right: 0; height: max(env(safe-area-inset-top, 0px), 1px); z-index: 1300; pointer-events: none; background: #000; } /* never zero height, so iOS always finds it */ /* the search bar sits above this */
.searchbar { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 8px 0 16px; background: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: 100px; color: var(--ink-3); box-shadow: 0 2px 8px rgba(28,48,30,.16); transition: border-color .15s, box-shadow .15s; }
.searchbar:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 4px var(--cyan-sub); }
.searchbar .brand-dot { display: none; }
.searchbar input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; color: var(--ink); font-size: 16px; font-weight: 500; }
.searchbar input::placeholder { color: var(--ink-4); font-weight: 400; }
.searchbar input::-webkit-search-cancel-button { display: none; }
.icon-btn { width: 34px; height: 34px; border-radius: 100px; border: 0; background: transparent; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--paper-3); color: var(--ink); }
.results { margin-top: 8px; max-height: min(60vh, 520px); overflow-y: auto; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(28,48,30,.2); }
.res-label { padding: 12px 14px 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.6px; color: var(--ink-3); }
.res-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; background: none; border: 0; text-align: left; cursor: pointer; transition: background .15s; }
.res-row:hover, .res-row:focus-visible { background: var(--paper); outline: 0; }
.res-row .ic, .res-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.res-ic { background: var(--cyan-sub); color: var(--cyan-t); }
.res-row .tx { flex: 1; min-width: 0; display: grid; }
.res-row .t { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-row .s { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-world { border-top: 1px solid var(--line); }
.res-world:first-child { border-top: 0; }
.res-note { display: flex; align-items: center; gap: 10px; padding: 10px 14px 14px; font-size: 13px; color: var(--ink-2); }
.res-note.is-error { color: var(--red); }
.chips { display: flex; align-items: center; gap: 2px; padding-left: 4px; margin-left: 2px; flex-shrink: 0; }

.chip { position: relative; display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 10px; border-radius: 100px; background: transparent; border: 0; color: var(--ink-2); font-size: 13px; font-weight: 600; cursor: pointer; flex-shrink: 0; white-space: nowrap; transition: background .15s, color .15s, box-shadow .15s; }
.chip:hover { background: var(--paper-2); color: var(--ink); }
.chip[data-filter=plane] svg { color: var(--ink); } .chip[data-filter=heli] svg { color: var(--green); } .chip[data-filter=military] svg { color: var(--amber); } .chip[data-filter=interesting] svg { color: var(--pink); }
.chip.is-on { background: var(--paper-3); color: var(--ink); box-shadow: none; } /* selected: grey, like the tabs */
.chip.is-on svg path { fill: currentColor; } /* outline when off, filled in when on */
.chip.is-on[data-filter=heli] svg path:first-child { fill: none; } /* (the rotor is a line, not a shape) */
.chip-all { font-size: 13px; font-weight: 700; letter-spacing: .4px; }
.chip span { color: var(--ink-3); font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; min-width: 1ch; }
.chip.is-on span { color: var(--ink); opacity: .7; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--ink); }
.dot.k-heli { background: var(--green); } .dot.k-military { background: var(--amber); }
.dot.k-interesting { background: var(--pink); } .dot.k-emergency { background: var(--red); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 20px; border-radius: 100px; border: 0; font-size: 15px; font-weight: 600; cursor: pointer; flex-shrink: 0; white-space: nowrap; transition: background .15s, box-shadow .15s, color .15s; }
.btn-primary, .btn-accent { background: var(--cyan); color: var(--ink); }
.btn-primary:hover, .btn-accent:hover { background: var(--cyan-h); box-shadow: 0 6px 22px var(--cyan-glow); }
.btn-ghost { background: transparent; border: 1px solid var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: var(--paper-3); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 14px; }

/* ---------- map buttons ---------- */

/* ---------- slider header: status and flight summary | tabs | map buttons, in one row ---------- */
.head-bar { display: flex; align-items: center; }
.head-bar .tabs { flex: 1 0 100%; }
/* Map buttons and the live count: on the map just above the slider, each on its own faint bubble. */
.map-float { position: fixed; left: calc(16px + env(safe-area-inset-left)); right: calc(16px + env(safe-area-inset-right)); bottom: calc(var(--sheet-top) + 10px); z-index: 900; display: flex; align-items: center; justify-content: space-between; gap: 8px; pointer-events: none; transition: bottom .3s ease, opacity .2s; }
.map-float.is-dragging { transition: opacity .2s; }
.map-float > * { pointer-events: auto; }
.bb-info, .bb-tools { display: flex; align-items: center; gap: 10px; }
.map-float .round-btn, .map-float .status { background: color-mix(in srgb, var(--paper) 78%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 2px 10px rgba(28,48,30,.14); }
.map-float .round-btn:hover { background: var(--paper); }
.map-float .status { position: absolute; left: 50%; transform: translateX(-50%); height: 32px; line-height: 32px; padding: 0 12px; border-radius: 100px; max-width: calc(100% - 200px); overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
html.sheet-tall .map-float { opacity: 0; pointer-events: none; } /* slider almost full height: no map to control */
html.sheet-tall .map-float > * { pointer-events: none; }
.round-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 100px; background: transparent; color: var(--ink); cursor: pointer; transition: background .15s, color .15s; }
.round-btn.bb-overhead { color: var(--cyan-t); }
.round-btn.bb-overhead:hover { background: var(--cyan); color: var(--ink); }

.round-btn:hover { background: var(--paper-2); }

#overhead.is-busy { opacity: .7; pointer-events: none; }

/* ---------- side panel ---------- */
/* ---------- bottom slider ---------- */
.panel { position: fixed; left: calc(16px + env(safe-area-inset-left)); right: calc(16px + env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); height: var(--sheet-open); z-index: 1000; display: flex; flex-direction: column; background: var(--paper); border: 1px solid rgba(255,255,255,.6); border-radius: 24px; box-shadow: 0 -6px 40px rgba(28,48,30,.22); overflow: hidden; transition: height .3s ease; }
.panel.is-collapsed { height: var(--head-h, 60px); }
.panel.is-dragging { transition: none; }
.panel-head { flex-shrink: 0; position: relative; padding: 6px 12px 0 12px; cursor: grab; touch-action: none; } /* no line under the tabs: the rounded tab track separates it */
.panel.is-collapsed .panel-head { border-bottom-color: transparent; }
.grabber { display: block; width: 100%; height: 12px; margin-bottom: 0; border: 0; background: none; cursor: pointer; }
.grabber span { display: block; width: 44px; height: 5px; margin: 0 auto; border-radius: 100px; background: var(--line-2); transition: background .15s; }
.grabber:hover span { background: var(--ink-4); }

.tabs { display: flex; gap: 4px; flex: 0 1 560px; min-width: 0; }
.tabs [role=tab] { flex: 1; height: 42px; padding: 0 4px; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--ink-3); font-size: 13px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; cursor: pointer; white-space: nowrap; transition: color .15s, border-color .15s; }
.tabs [role=tab]:hover { color: var(--ink); }
.tabs [role=tab][aria-selected=true] { color: var(--ink); border-bottom-color: var(--cyan); }
.panel.is-collapsed .tabs [role=tab][aria-selected=true] { border-bottom-color: transparent; }
.panel-body { flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; touch-action: pan-y; }
/* Wide screens: lay the content out in columns so it uses the width. */
/* Columns only on wide screens. On phones a column layout can push half a card into a hidden extra column. */
.panel-content { max-width: 100%; }
@media (min-width: 820px) { .panel-content { columns: 2 360px; column-gap: 0; column-rule: 1px solid var(--line); } }
.panel-content > * { break-inside: avoid; }
.panel-content > .d-top, .panel-content > .d-tags, .panel-content > .panel-pad:first-child, .panel-content > .nearby > .panel-pad { column-span: all; }
.panel-content .section, .panel-content .list-label { border-top: 0; }
.panel-content .section + .section, .panel-content .list + .list-label { border-top: 1px solid var(--line); }
.panel-pad { padding: 22px 24px; }
.panel h1 { font-size: 26px; font-weight: 700; letter-spacing: .2px; line-height: 1.15; }
.panel h2 { font-size: 24px; font-weight: 700; line-height: 1.2; margin-top: 2px; }
.panel-pad p.muted { margin-top: 8px; font-size: 15px; }
.section { padding: 20px 24px; border-top: 1px solid var(--line); }
.section > .label { display: block; margin-bottom: 12px; }
.list-label { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px 8px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.6px; color: var(--ink-3); border-top: 1px solid var(--line); }
.list-label .count { font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 13px; }
.list-label + .list .item:first-child { border-top: 0; }
.list { display: grid; }
.item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 24px; background: none; border: 0; border-top: 1px solid var(--line); text-align: left; cursor: pointer; transition: background .15s; }
.item:hover { background: var(--paper-2); }
.item .ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.g-plane { background: var(--ink); } .g-heli { background: var(--green); } .g-military { background: var(--amber); }
.g-interesting { background: var(--pink); } .g-emergency { background: var(--red); }
.item .tx { flex: 1; min-width: 0; }
.item .t { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.item .s { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.item .alt { font-size: 14px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; flex-shrink: 0; text-align: right; }
.item-static { cursor: default; } .item-static:hover { background: none; }
.item .ic-tx { font-size: 10px; font-weight: 700; color: #fff; letter-spacing: .3px; }
.item-static .ic { color: #fff; font-size: 16px; }
.empty { padding: 20px 24px; color: var(--ink-3); font-size: 14px; border-top: 1px solid var(--line); }
.skeleton { height: 14px; border-radius: 6px; background: var(--paper-3); margin: 6px 0; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--cyan); animation: spin .8s linear infinite; display: inline-block; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.more { display: inline-block; margin-top: 14px; font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* badges */
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; white-space: nowrap; }
.b-blue { background: var(--teal-pill); color: var(--teal-pill-t); } .b-pink { background: var(--pink-sub); color: var(--pink); }
.b-green { background: var(--green-sub); color: var(--green); } .b-amber { background: var(--amber-sub); color: var(--amber); }
.b-red { background: var(--red-sub); color: var(--red); } .b-purple { background: var(--purple-sub); color: var(--purple); }

/* ---------- aircraft detail ---------- */
.d-top { display: flex; align-items: flex-start; gap: 10px; padding: 18px 20px 16px; }
.d-top { position: relative; }
/* The three buttons sit at the end of the name line; the lines under the name run on underneath them. */
.d-top > #track, .d-top > #fav { position: absolute; top: 16px; }
.d-top > #fav { right: 20px; } .d-top > #track { right: 64px; }
/* Three rows: the name beside the buttons; the type and airline on one line under it (free to run under the
   buttons); then who owns it, as a small pill. */
.d-top .d-name { padding-right: 80px; }
.d-top .d-what { margin-top: 4px; }

.d-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 100px; background: rgba(214,160,22,.16); font-size: 13px; font-weight: 700; }
.d-top > .back { margin-top: -2px; }
.d-top .back { background: var(--paper-3); } /* grey on a normal page */
.panel:is(.is-detail, .is-ship).is-themed .d-top .back { background: #fff; box-shadow: 0 1px 4px rgba(28,48,30,.14); } /* solid white on a themed (coloured) page */
.d-title { flex: 1; min-width: 0; margin-left: 6px; } /* a little room after the back button */
.d-name { font-size: 20px; font-weight: 700; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-what { margin-top: 2px; font-size: 14px; font-weight: 500; line-height: 1.35; color: var(--ink-3); } /* wraps rather than cutting the operator off */
.d-title span { color: var(--ink-2); font-weight: 600; }
.pill-status { height: 32px; padding: 0 12px; border-radius: 10px; display: inline-flex; align-items: center; background: var(--teal-pill); color: var(--teal-pill-t); font-size: 13px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; flex-shrink: 0; }
.pill-status.is-ground { background: var(--paper-3); color: var(--ink-2); }
.pill-status.is-alert { background: var(--red-sub); color: var(--red); }
.star { color: var(--ink-3); }
.star.is-on { color: var(--pink); background: var(--pink-sub); }
.track.is-on { color: var(--cyan-t); background: var(--cyan-sub); }
.d-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 0 20px 16px 20px; font-size: 12px; font-weight: 600; letter-spacing: 1.3px; text-transform: uppercase; color: var(--ink-3); }
.d-tags .sep { font-style: normal; color: var(--line-2); }
.tag-state { display: inline-flex; align-items: center; gap: 6px; color: var(--cyan-t); }
.tag-state::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); animation: blink 1.6s ease-in-out infinite; }
.tag-state.is-ground { color: var(--ink-3); } .tag-state.is-ground::before { background: var(--ink-4); animation: none; }
.tag-state.is-alert { color: var(--red); } .tag-state.is-alert::before { background: var(--red); }
.tag.t-red { color: var(--red); } .tag.t-amber { color: var(--amber); } .tag.t-pink { color: var(--pink); }
.tag.t-green { color: var(--green); } .tag.t-blue { color: var(--cyan-t); } .tag.t-purple { color: var(--purple); }

/* boarding pass */
.pass { position: relative; margin: 0 16px 16px; border-radius: 22px; background: var(--card-tint); overflow: hidden; }
/* The line and plane sit level with the middle of the airport codes, not the codes plus city names. */
.pass-route { --code: 46px; display: flex; align-items: flex-start; gap: 14px; padding: 20px 22px 38px; }
.pass-end { position: relative; flex-shrink: 0; }
/* City names hang below the codes without widening them, so the line runs from code to code. */
.pass-end.r { text-align: right; }
.pass-end.r span { left: auto; right: 0; }
.pass-end b { display: block; font-size: var(--code); font-weight: 700; line-height: .95; letter-spacing: .5px; }
.pass-end span { position: absolute; top: 100%; left: 0; display: block; max-width: 170px; margin-top: 6px; font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pass-solo b { font-size: 34px; }
.pass-solo { flex-shrink: 1; min-width: 0; }
.pass-solo span { position: static; max-width: none; white-space: normal; }
.pass-route:has(.pass-solo) { padding-bottom: 16px; }
.pass-line { flex: 1; position: relative; height: 20px; min-width: 40px; margin-top: calc((var(--code) * .95 - 20px) / 2); }
.pass-line::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; margin-top: -1px; border-top: 2px dashed rgba(34,188,216,.55); } /* centred on the same line as the progress bar and plane */
.pass-line .prog { position: absolute; left: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan-glow); }
.pass-line svg { position: absolute; top: 50%; transform: translate(-50%, -50%) rotate(90deg); color: var(--cyan); filter: drop-shadow(0 0 6px var(--cyan-glow)); }
.pass-pc { position: absolute; left: 0; right: 0; top: 100%; margin-top: 2px; text-align: center; font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--cyan-t); white-space: nowrap; }
.pass-graph { display: block; padding: 4px 20px 16px; }
.pg-codes { display: flex; justify-content: space-between; }
.pg-codes b { font-size: 40px; font-weight: 700; line-height: .95; letter-spacing: .5px; }
.pg-chart { position: relative; height: 96px; margin: 8px 4px 0; }
.pg-chart.is-ground { height: 24px; } /* on the ground there's no height to draw, so no empty sky above the line */
.pg-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pg-dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--card-tint); border: 2px solid var(--cyan); }
.pg-plane { position: absolute; display: grid; place-items: center; width: 22px; height: 22px; color: var(--cyan); filter: drop-shadow(0 0 1px var(--card-tint)) drop-shadow(0 0 1px var(--card-tint)) drop-shadow(0 0 4px var(--card-tint)) drop-shadow(0 0 3px var(--card-tint)); } /* a halo in the card's own grey, so it stands clear of the line */
.pg-plane svg { width: 22px; height: 22px; }
.pg-now, .pg-cruise { position: absolute; transform: translate(var(--lx, -50%), calc(-100% - 17px)); font-size: 11px; font-weight: 700; letter-spacing: 1px; white-space: nowrap; }
.pg-now { color: var(--cyan-t); padding: 1px 4px; border-radius: 6px; background: var(--card-tint); box-shadow: 0 0 6px 3px var(--card-tint); } /* same grey halo as the plane, so lines behind it don't cut through */
.pg-air { position: absolute; text-align: center; color: var(--cyan-t); white-space: nowrap; line-height: 1.15; padding: 4px 9px; border-radius: 12px; background: var(--card-tint); border: 1.5px solid color-mix(in srgb, var(--cyan) 55%, transparent); } /* a bubble: solid outline for what it has flown */
.pg-air b { display: block; font-size: 14px; font-weight: 700; }
.pg-air small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .4px; opacity: .85; }
.pg-pair { position: absolute; display: flex; align-items: center; gap: 8px; transform: translate(var(--px, 0), -50%); white-space: nowrap; }
.pg-pair .pg-air { position: static; transform: none; }
.pg-togo { color: var(--cyan-t); opacity: .85; border-style: dashed !important; border-color: color-mix(in srgb, var(--cyan) 60%, transparent) !important; } /* dashed, like the part still to come */
.pg-cruise { transform: translate(-50%, calc(-100% - 6px)); color: var(--ink-3); font-weight: 600; }
.pg-ends { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.pg-ends div { min-width: 0; }
.pg-ends .r { text-align: right; }
.pg-ends span { display: block; font-size: 12px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-ends i { display: block; margin-top: 1px; font-style: normal; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-ends em { display: block; margin-top: 2px; font-style: normal; font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.pass-cut { position: relative; height: 0; margin: 0 18px; border-top: 2px dashed var(--line-2); }
.pass-cut::before, .pass-cut::after { content: ''; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--paper); }
.pass-cut::before { left: -32px; } .pass-cut::after { right: -32px; }
.pass-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); justify-content: space-between; gap: 10px; padding: 14px 22px 18px; }
.pass-fields div { min-width: 0; }
.pass-fields div:last-child { text-align: right; }
.pass-fields span { display: block; font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ink-3); }
.pass-fields b { display: block; font-size: 19px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cta { display: flex; align-items: center; justify-content: center; gap: 10px; width: calc(100% - 28px); height: 54px; margin: 0 14px 14px; border: 0; border-radius: 16px; background: linear-gradient(180deg, #2CCAE5, #1AB0CC); color: var(--ink); font-size: 17px; font-weight: 700; cursor: pointer; box-shadow: 0 8px 24px var(--cyan-glow); transition: transform .15s, box-shadow .15s; }
.cta:hover { transform: translateY(-1px); box-shadow: 0 12px 30px var(--cyan-glow); }
.cta.is-on { background: var(--night); color: #EAF2EE; box-shadow: none; }

/* flight card rows */
.frows { display: grid; }
.frow { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.frow:first-child { padding-top: 4px; }
.frow:last-child { border-bottom: 0; }
.frow dt { font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ink-3); }
.frow dd { font-size: 22px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; line-height: 1.15; }
.frow dd small { display: block; font-size: 12px; font-weight: 500; color: var(--ink-3); letter-spacing: .2px; }
.frow dd em { font-style: normal; color: var(--cyan-t); }
.summary { font-size: 16px; color: var(--ink); margin-bottom: 6px; }

/* status timeline */
.timeline { margin: 0 16px 16px; padding: 18px 20px; border-radius: 20px; background: radial-gradient(120% 140% at 80% 0%, #24464B 0%, var(--night) 60%); color: #EAF2EE; }
.timeline .label { color: rgba(234,242,238,.55); display: block; margin-bottom: 12px; }
.tl { display: grid; gap: 14px; }
.tl-item { display: flex; align-items: center; gap: 14px; font-size: 18px; font-weight: 600; }
.tl-item i { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: rgba(34,188,216,.2); }
.tl-item i::after { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--cyan); }
.tl-item.is-now i { box-shadow: 0 0 0 6px rgba(34,188,216,.12); }
.tl-item.is-now i::after { animation: blink 1.6s ease-in-out infinite; }
.tl-item.is-future { color: rgba(234,242,238,.4); }
.tl-item.is-future i { background: transparent; }
.tl-item.is-future i::after { background: rgba(234,242,238,.25); width: 8px; height: 8px; }
.tl-item small { font-size: 13px; font-weight: 500; color: rgba(234,242,238,.55); }
.tl-item.is-future small { color: rgba(234,242,238,.35); }

/* photo */
.photo { margin: 0 16px 16px; border-radius: 20px; overflow: hidden; background: var(--paper-3); }
.photo img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.photo figcaption { padding: 8px 14px; font-size: 12px; color: var(--ink-3); background: var(--card-tint); }
.photo-loading { aspect-ratio: 3 / 2; animation: pulse 1.2s ease-in-out infinite; }
.photo-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; overflow: hidden; }
.photo-open img { transition: transform .4s ease; }
.photo-open:hover img { transform: scale(1.03); }

.why { display: grid; gap: 10px; }
/* The story inside the boarding pass: unusual things as a full-width band across the top, then what it's doing. */
.ps-alert { padding: 14px 20px; border-left: 0; border-bottom: 1px solid rgba(17,25,21,.06); }
.ps-alert b { display: block; font-size: 16px; font-weight: 700; color: var(--ink); }
.ps-alert.s-red b { color: var(--red); } .ps-alert.s-amber b { color: var(--amber); } .ps-alert.s-purple b { color: var(--purple); }
.ps-alert p { margin-top: 3px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.ps-calm { padding: 16px 20px 0; }
.ps-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ps-head b { font-size: 19px; font-weight: 700; letter-spacing: .2px; color: var(--ink); }
.ps-chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; padding: 4px 10px; border-radius: 100px; background: var(--green-sub); color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; white-space: nowrap; }
.ps-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ps-chip.is-off { background: var(--cyan-sub); color: var(--cyan-t); }
.ps-chip.is-planned { background: var(--cyan-sub); color: var(--cyan-t); }
.ps-calm > p { margin-top: 2px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.ps-calm .story-route { margin-top: 6px; }
.ps-calm .story-sub { display: block; margin-bottom: 2px; } /* the note's title on its own line, its explanation under it */
/* The story banner at the top of an aircraft's panel: anything unusual, then a calm summary. */
.stories { display: grid; gap: 8px; margin: 0 16px 16px; }
.story { padding: 14px 18px; border-radius: 20px; border-left: 4px solid; }
.story b { display: block; font-size: 16px; font-weight: 700; letter-spacing: .2px; color: var(--ink); }
.story p { margin-top: 3px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.story.is-more b { font-size: 15px; }
.s-red { background: var(--red-sub); border-color: var(--red); } .s-red b { color: var(--red); }
.s-amber { background: var(--amber-sub); border-color: var(--amber); }
.s-purple { background: var(--purple-sub); border-color: var(--purple); }
.s-pink { background: var(--pink-sub); border-color: var(--pink); } .s-green { background: var(--green-sub); border-color: var(--green); }
.s-calm { background: var(--card-tint); border-color: var(--cyan); }
.story-route { position: relative; padding-left: 16px; }
.story-route::before { content: ''; position: absolute; left: 2px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.story-route.is-off::before { background: var(--amber); }
.story .story-sub { display: inline; font-size: 14.5px; margin-right: 4px; }
.story .story-sub::after { content: ':'; }
.why-item { padding: 12px 14px; border-radius: 14px; font-size: 15px; line-height: 1.45; border-left: 3px solid; }
.why-item span { color: var(--ink); }
.w-pink { background: var(--pink-sub); border-color: var(--pink); } .w-amber { background: var(--amber-sub); border-color: var(--amber); }
.w-red { background: var(--red-sub); border-color: var(--red); } .w-green { background: var(--green-sub); border-color: var(--green); }
.w-blue { background: var(--cyan-sub); border-color: var(--cyan); } .w-purple { background: var(--purple-sub); border-color: var(--purple); }

.rows { display: grid; }
.row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.row:last-child { border-bottom: 0; }
.row dt { color: var(--ink-3); font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; flex-shrink: 0; padding-top: 2px; }
.row dd { text-align: right; font-weight: 600; overflow-wrap: anywhere; }

.wiki { display: flex; gap: 14px; align-items: flex-start; }
.wiki > div { flex: 1; min-width: 0; }
.wiki-pic { flex: 0 0 76px; width: 76px; height: 76px; padding: 0; border: 0; background: none; border-radius: 14px; cursor: zoom-in; }
.wiki img { width: 76px; height: 76px; border-radius: 14px; object-fit: cover; flex-shrink: 0; background: var(--paper-3); }
.wiki b { display: block; font-size: 16px; }
.owner-head { display: flex; align-items: center; gap: 14px; }
.owner-head > div { flex: 1; min-width: 0; }
.owner-pic, .owner-pic img { width: 84px; height: 84px; flex-basis: 84px; border-radius: 16px; }
.owner-pic img { object-fit: cover; background: #fff; }
.wiki p { margin-top: 4px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.wiki a { display: inline-block; margin-top: 6px; font-size: 14px; }

.msgs { display: grid; gap: 10px; margin-top: 14px; }
.msg2 { padding: 12px 14px; border-radius: 14px; background: var(--card-tint); }
.msg2-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 12px; }
.msg2 p { font-size: 15px; line-height: 1.45; color: var(--ink); }
.msg2 details { margin-top: 6px; }
.msg2 summary { font-size: 12.5px; color: var(--ink-3); cursor: pointer; }
.msg2 code { display: block; margin-top: 6px; font: 12px/1.5 ui-monospace, 'SF Mono', Menlo, monospace; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg { padding: 10px 12px; border-radius: 12px; background: var(--card-tint); border: 1px solid var(--line); }
.msg-h { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-3); margin-bottom: 4px; }
.msg code { display: block; font: 12px/1.5 ui-monospace, 'SF Mono', Menlo, monospace; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }

/* logbook, overhead, alerts */
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.fact { background: var(--card-tint); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.fact .v { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fact .n { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-3); }
.type-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.type-chip { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 12px; border-radius: 10px; background: var(--card-tint); font-size: 13px; font-weight: 500; color: var(--ink-2); }
.type-chip b { color: var(--cyan-t); font-weight: 700; }
.sky-card { display: flex; gap: 16px; align-items: center; width: 100%; padding: 16px; border-radius: 20px; border: 0; background: radial-gradient(120% 140% at 80% 0%, #24464B 0%, var(--night) 60%); color: #EAF2EE; text-align: left; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.sky-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(10,24,20,.3); }
.sky-card b { display: block; font-size: 24px; }
.sky-card span { font-size: 13px; color: rgba(234,242,238,.65); }
.sky-card p { margin-top: 8px; font-size: 15px; line-height: 1.45; }
.sky-card .link { display: block; margin-top: 8px; color: var(--cyan); font-weight: 600; }
.sky-dial { position: relative; width: 88px; height: 88px; flex-shrink: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: radial-gradient(circle, rgba(255,255,255,.06) 0 33%, transparent 34% 66%, rgba(255,255,255,.04) 67%); }
.sky-dial::before { content: 'N'; position: absolute; top: 2px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 700; color: rgba(234,242,238,.5); }
.sky-dial span { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); transform: rotate(var(--az)) translateY(calc((90 - var(--el)) / 90 * -38px)); }
.field { display: grid; gap: 6px; margin-top: 16px; }
.field select, .field input { height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font-size: 15px; outline: 0; appearance: none; -webkit-appearance: none; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2334433A' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.field select:focus, .field input:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px var(--cyan-sub); }
.field + .faint { margin-top: 6px; }
.checks { display: grid; gap: 2px; }
.check { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--cyan-h); flex-shrink: 0; }
.check span, .switch > span:last-child { display: grid; font-size: 15px; }
.check b, .switch b { font-weight: 600; }
.check small, .switch small { font-size: 13px; color: var(--ink-3); }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { position: relative; width: 46px; height: 28px; border-radius: 100px; background: var(--line-2); flex-shrink: 0; transition: background .2s; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + .track { background: var(--cyan); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 4px var(--cyan-sub); }
.switch input:disabled + .track { opacity: .4; }

/* ---------- photo viewer ---------- */
.lightbox { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 64px 16px 24px; background: rgba(8,10,9,.92); backdrop-filter: blur(8px); cursor: zoom-out; animation: fade .15s ease-out; }
/* The photo service's largest size is ~500px wide; showing it up to 900px is as big as it stays reasonably sharp. */
.lightbox figure { width: min(900px, 100%); }
.lightbox img { display: block; width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: 20px; background: #fff; /* logos with see-through backgrounds sit on white */ box-shadow: 0 24px 64px rgba(0,0,0,.5); }
.lightbox figcaption { margin-top: 12px; text-align: center; font-size: 13px; color: rgba(234,242,238,.75); cursor: default; }
.lightbox figcaption a { color: var(--cyan); }
.close { width: 40px; height: 40px; border-radius: 100px; border: 0; background: var(--paper); cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.lightbox-close { position: fixed; top: 16px; right: 16px; }
@keyframes fade { from { opacity: 0; } }

/* ---------- toasts ---------- */
/* Pop-ups sit just above the bottom slider, the same width as the search bar (centred and narrower on wide screens). */
.toasts { position: fixed; left: 16px; right: 16px; bottom: calc(var(--sheet-top) + 12px); z-index: 2500; display: grid; gap: 8px; justify-items: center; pointer-events: none; transition: bottom .3s ease; }
.toast { width: min(560px, 100%); display: flex; align-items: center; gap: 12px; padding: 12px 8px 12px 16px; border-radius: 18px; background: rgba(21,40,44,.96); backdrop-filter: blur(12px); color: #EAF2EE; box-shadow: 0 12px 32px rgba(10,24,20,.3); pointer-events: auto; animation: toast-in .25s ease-out; transition: opacity .2s, transform .2s; }
.toast::before { content: ''; width: 10px; height: 10px; flex-shrink: 0; border-radius: 50%; background: var(--cyan); }
.toast.is-out { opacity: 0; transform: translateY(8px); }
.toast-tx { flex: 1; min-width: 0; display: grid; gap: 1px; font-size: 13px; line-height: 1.35; }
.toast-tx b { font-size: 15px; }
.toast-tx span { color: rgba(234,242,238,.72); }
.toast .btn { height: 32px; }
.toast .icon-btn { color: rgba(234,242,238,.7); }
.toast .icon-btn:hover { background: var(--night-2); color: #fff; }
.t-pink::before { background: #E36AA5; } .t-red::before { background: #F0607E; } .t-green::before { background: #5CCB84; }
.t-amber::before { background: #F2B33D; } .t-purple::before { background: #A982E6; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- status line ---------- */
.status { flex-shrink: 0; font-size: 13px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* The selected flight's summary, inline in the bottom bar. */
.mini { display: grid; gap: 5px; min-width: 0; padding-left: 14px; border-left: 1px solid var(--line); white-space: nowrap; color: var(--ink); }
.mini-line { display: flex; align-items: baseline; gap: 6px; font-size: 13px; overflow: hidden; }
.mini-line small { font-size: 11px; font-weight: 600; letter-spacing: 1.4px; color: var(--ink-3); }
.mini-line b { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mini-muted { color: var(--ink-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.mini-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); align-self: center; flex-shrink: 0; animation: blink 1.6s ease-in-out infinite; }
.mini-dot.is-ground { background: var(--ink-4); animation: none; } .mini-dot.is-alert { background: var(--red); }
.mini-note { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--cyan-t); }
.mini-note.is-ground { color: var(--ink-3); } .mini-note.is-alert { color: var(--red); }
.mini-bar { height: 3px; border-radius: 3px; background: var(--paper-3); overflow: hidden; }
.mini-bar i { display: block; height: 100%; border-radius: 3px; background: var(--cyan); transition: width .6s ease; }
@keyframes blink { 50% { opacity: .3; } }
.status.is-error { color: var(--red); }

/* ---------- aircraft markers ---------- */
.ac { background: none; border: 0; }
/* No shadow: a thin light outline keeps the planes crisp against the map. */
.ac svg { display: block; overflow: visible; shape-rendering: geometricPrecision; }
.ac.k-plane { color: var(--ink); } .ac.k-heli { color: var(--green); } .ac.k-military { color: var(--amber); }
.ac.k-interesting { color: var(--pink); } .ac.k-emergency { color: var(--red); } .ac.k-ground { color: #5F6E63; }
/* selected: a cyan disc with the aircraft in ink, like a navigation arrow */
.ac.is-sel { --sel-1: #8EE4F2; --sel-2: var(--cyan); --sel-ring: rgba(34,188,216,.25); --sel-glow: var(--cyan-glow); --sel-plane: var(--ink); }
.ac.is-sel::before { content: ''; position: absolute; inset: -7px; border-radius: 50%; background: radial-gradient(circle, var(--sel-1) 0%, var(--sel-2) 70%); box-shadow: 0 0 0 4px var(--sel-ring), 0 0 22px var(--sel-glow); }
.ac.is-sel .badge { display: none; } /* the glow already says who it belongs to */
/* The open aircraft's glow and plane in its owner's colours, matching the slider. */
.ac.is-sel.th-dictator { --sel-1: #F7A6AE; --sel-2: #D9475A; --sel-ring: rgba(217,71,90,.25); --sel-glow: rgba(217,71,90,.5); --sel-plane: var(--ink); }
.ac.is-sel.th-royal { --sel-1: #D4BEF2; --sel-2: #9067D0; --sel-ring: rgba(144,103,208,.25); --sel-glow: rgba(144,103,208,.5); --sel-plane: var(--ink); }
.ac.is-sel.th-celebrity { --sel-1: #FBE7A6; --sel-2: #E0B23A; --sel-ring: rgba(224,178,58,.28); --sel-glow: rgba(224,178,58,.55); --sel-plane: var(--ink); }
.ac.is-sel.th-military { --sel-1: #D6DDB4; --sel-2: #8E9C5E; --sel-ring: rgba(142,156,94,.28); --sel-glow: rgba(142,156,94,.5); --sel-plane: var(--ink); }
.ac.is-sel.th-state { --sel-1: #BCD0F5; --sel-2: #5B82D0; --sel-ring: rgba(91,130,208,.25); --sel-glow: rgba(91,130,208,.5); --sel-plane: var(--ink); }
.ac.is-sel.th-sports { --sel-1: #BFE8C6; --sel-2: #5BB46C; --sel-ring: rgba(91,180,108,.25); --sel-glow: rgba(91,180,108,.5); --sel-plane: var(--ink); }
.ac.is-sel.th-wealth { --sel-1: #B4E6E8; --sel-2: #3FA6AE; --sel-ring: rgba(63,166,174,.25); --sel-glow: rgba(63,166,174,.5); --sel-plane: var(--ink); }
.ac.is-sel svg { position: relative; color: var(--sel-plane); filter: none; }
.ac .badge { position: absolute; left: -7px; top: -7px; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 100px; background: #FCFCF8; box-shadow: 0 1px 4px rgba(20,40,25,.3); pointer-events: none; }
.ac .badge.b-crown, .ac .badge.b-star, .ac .badge.b-flag, .ac .badge.b-diamond { color: #B8860B; }
.ac .badge.b-helmet { color: #5B6B3A; } .ac .badge.b-ball { color: #2F7D4F; }
.ac .tag { position: absolute; left: 100%; top: 50%; transform: translate(6px, -50%); padding: 1px 7px; border-radius: 6px; background: rgba(238,240,232,.92); color: var(--ink); font-size: 12px; font-weight: 600; letter-spacing: .3px; white-space: nowrap; pointer-events: none; box-shadow: 0 2px 6px rgba(20,40,25,.15); }
.ac.is-sel .tag { left: calc(100% + 8px); }
.pin { position: relative; }
.pin svg { display: block; filter: drop-shadow(0 4px 6px rgba(20,40,25,.35)); }
.pin b { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 2px; font-size: 14px; font-weight: 700; letter-spacing: 1px; color: var(--ink); white-space: nowrap; text-shadow: 0 0 6px rgba(238,240,232,.9); }
.me span { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--cyan); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(34,188,216,.3); animation: me 2s ease-out infinite; }
@keyframes me { 50% { box-shadow: 0 0 0 12px rgba(34,188,216,.1); } }
.home-pin { filter: drop-shadow(0 2px 4px rgba(20,40,25,.4)); }

/* ---------- phones ---------- */
@media (max-width: 860px) {
  :root { --sheet-open: 50vh; }
  /* Phones: sit close to the screen's edges, with bottom corners that follow the iPhone's rounded screen
     (the home-bar inset is about 34px on those phones; the card stays clear of it on the inside). */
  .map-float { left: 8px; right: 8px; } /* lined up with the slider's edges */
  .panel { left: 8px; right: 8px; bottom: 8px; border-radius: 18px 18px var(--sheet-corner, max(26px, calc(env(safe-area-inset-bottom) + 12px))) var(--sheet-corner, max(26px, calc(env(safe-area-inset-bottom) + 12px))); } /* --sheet-corner: set in app.js to match the iPhone's screen corners */
  .panel.is-collapsed { height: calc(var(--head-h, 60px) + max(0px, env(safe-area-inset-bottom) - 22px)); } /* just enough to clear the home bar */
  .panel-body { padding-bottom: env(safe-area-inset-bottom); }
  /* iPhone Safari ignores the slider's rounded clip for its scrolling (masked) contents: round the scroller itself too,
     so cards never poke out past the bottom corners. */
  #panel-body { border-bottom-left-radius: calc(var(--sheet-corner, 26px) - 1px); border-bottom-right-radius: calc(var(--sheet-corner, 26px) - 1px); }
  /* The map's top corners curve like the slider's bottom ones (the iPhone's screen corners), drawn by the black band
     above it; the search bar sits inside them, its rounded ends sharing the corners' centres. */
  :root { --map-corner: 33px; --bar-inset: 8px; } /* 33px = the search bar's 25px rounded end + the 8px gap, sharing a centre */
  /* Same 8px margin as the slider below. */
  .finder { top: calc(var(--bar-inset) + env(safe-area-inset-top)); left: var(--bar-inset) !important; right: var(--bar-inset) !important; }
  .status-band::before, .status-band::after { content: ''; position: absolute; top: 100%; width: var(--map-corner); height: var(--map-corner); }
  .status-band::before { left: 0; background: radial-gradient(circle at 100% 100%, transparent calc(var(--map-corner) - .5px), #000 var(--map-corner)); }
  .status-band::after { right: 0; background: radial-gradient(circle at 0 100%, transparent calc(var(--map-corner) - .5px), #000 var(--map-corner)); }
  .panel-head { padding: 6px 8px 0 8px; }

  .tabs [role=tab] { font-size: 12px; letter-spacing: .8px; }
  .chips { padding-left: 4px; gap: 0; }
  .chip { padding: 0 7px; height: 32px; }
  .chip span { display: none; }
  .chip { width: 34px; padding: 0; justify-content: center; } /* round, now there are no counts beside the icons */
  .chip-all { font-size: 12px; }
  .searchbar input::placeholder { font-size: 14px; }


  .round-btn { width: 36px; height: 36px; }
  .finder { right: 16px; }

  .leaflet-control-attribution { font-size: 9px; line-height: 1.4; }

  .pass-route { --code: 38px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- extra detail ---------- */
.profile { position: relative; height: 112px; }
.profile svg { display: block; width: 100%; height: 90px; overflow: visible; }
.profile .area { fill: var(--cyan-sub); }
.profile .line { fill: none; stroke: var(--cyan); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.profile .grid { stroke: var(--line-2); stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.profile .cur { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px var(--cyan-sub); }
.profile-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-3); }
.fun { margin: 12px 0 14px; padding: 0; list-style: none; display: grid; gap: 6px; }
.fun li { position: relative; padding-left: 16px; font-size: 15px; color: var(--ink-2); }
.fun li::before { content: ''; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); }
.apts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.apt { padding: 12px 14px; border-radius: 14px; background: var(--card-tint); min-width: 0; }
.apt b { display: block; font-size: 28px; line-height: 1.1; font-weight: 700; }
.apt-name { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apt-rows { display: grid; gap: 2px; margin-top: 8px; font-size: 13px; color: var(--ink-3); }
.legs { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; }
.legs li { display: flex; gap: 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 600; }
.legs li:last-child { border-bottom: 0; }
.legs .time { width: 44px; flex-shrink: 0; font-variant-numeric: tabular-nums; color: var(--ink-3); font-weight: 500; }
.legs small { color: var(--ink-3); font-weight: 500; }
.legs li.is-now { color: var(--cyan-t); }

/* ---------- Sky tab ---------- */
.list-flush .item { padding-left: 0; padding-right: 0; }
.list-flush .item:first-child { border-top: 0; }
.list-flush .item:hover { background: none; }
.list-flush .item:hover .t { color: var(--cyan-t); }
.item .when { width: 52px; flex-shrink: 0; display: grid; line-height: 1.15; }
.item .when b { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.item .when small { font-size: 11px; color: var(--ink-3); }
.item .s.wrap { white-space: normal; overflow: visible; }
.db { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; white-space: nowrap; }
.db-quiet { background: var(--paper-3); color: var(--ink-3); } .db-mid { background: var(--amber-sub); color: var(--amber); } .db-loud { background: var(--red-sub); color: var(--red); }
.tag-pill { flex-shrink: 0; align-self: flex-start; margin-top: 2px; padding: 3px 8px; border-radius: 8px; font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; border-left: 0; }
.item .ic.g-moon { background: #2C3E50; color: #F4F1DE; font-size: 18px; } .item .ic.g-sun { background: #F5B942; color: #5A3A00; font-size: 18px; }
.rewind-form { display: grid; gap: 4px; margin-top: 12px; }
.hours { display: flex; align-items: flex-end; gap: 2px; height: 64px; margin-top: 16px; }
.hours i { flex: 1; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--cyan); opacity: .85; }
.hours-axis { display: flex; justify-content: space-between; margin-top: 4px; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-4); }
.challenges { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.challenges li { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 500; }
.challenges i { width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 700; color: #fff; }
.challenges li.is-done i { background: var(--green); border-color: var(--green); }
.challenges li.is-done span { color: var(--ink-3); text-decoration: line-through; }
.challenges small { margin-left: auto; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- point your phone ---------- */
.finder-overlay { position: fixed; inset: 0; z-index: 3000; background: radial-gradient(circle at 50% 45%, rgba(21,40,44,.55), rgba(21,40,44,.92)); color: #EAF2EE; }
.reticle { position: absolute; left: 50%; top: 42%; width: 120px; height: 120px; margin: -60px; border: 2px solid rgba(34,188,216,.8); border-radius: 50%; box-shadow: 0 0 30px rgba(34,188,216,.4); }
.reticle span { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: var(--cyan); }
.finder-arrow { position: absolute; left: 50%; top: 42%; font-size: 44px; color: var(--cyan); transform-origin: center; }
.finder-card { position: absolute; left: 16px; right: 16px; bottom: 32px; padding: 18px; border-radius: 20px; background: rgba(238,240,232,.96); color: var(--ink); text-align: center; }
.finder-card b { display: block; font-size: 26px; }
.finder-card span { color: var(--ink-3); }
.finder-card p { margin: 6px 0 10px; }
.finder-card .actions { justify-content: center; }

/* ---------- Airport tab ---------- */
.big-line { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.big-line b { font-weight: 700; color: var(--cyan-t); }
.hourly { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.hr { display: grid; padding: 8px 6px; border-radius: 12px; text-align: center; line-height: 1.2; background: var(--paper-2); }
.hr b { font-size: 14px; font-variant-numeric: tabular-nums; }
.hr span { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; }
.hr small { font-size: 10px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr.s3 { background: var(--green-sub); } .hr.s3 span { color: var(--green); }
.hr.s2 { background: var(--cyan-sub); } .hr.s2 span { color: var(--cyan-t); }
.hr.s1 { background: var(--amber-sub); } .hr.s1 span { color: var(--amber); }
.hr.s0 { background: var(--red-sub); } .hr.s0 span { color: var(--red); }

/* ---------- logbook extras ---------- */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.bdg { display: grid; justify-items: center; gap: 2px; padding: 10px 6px; border-radius: 14px; background: var(--paper-2); text-align: center; opacity: .45; filter: grayscale(1); }
.bdg.is-got { opacity: 1; filter: none; background: var(--card-tint); box-shadow: 0 4px 14px rgba(28,48,30,.08); }
.bdg span { font-size: 24px; line-height: 1.2; }
.bdg b { font-size: 13px; }
.bdg small { font-size: 11px; color: var(--ink-3); line-height: 1.25; }
.goal { margin-bottom: 12px; }
.goal-h { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 600; }
.goal-h small { color: var(--ink-3); font-weight: 500; }
.goal-bar { height: 6px; margin-top: 4px; border-radius: 6px; background: var(--paper-3); overflow: hidden; }
.goal-bar i { display: block; height: 100%; border-radius: 6px; background: var(--cyan); }
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.album-item { position: relative; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: var(--paper-3); }
.album-item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.album-item span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font-size: 11px; font-weight: 700; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.6)); }

/* ---------- Sky: daily report and replay ---------- */
.report p { font-size: 15px; line-height: 1.5; }
.replay { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.replay input[type=range] { flex: 1 1 140px; accent-color: var(--cyan-h); }
.replay b { font-variant-numeric: tabular-nums; min-width: 44px; }
.replay select { height: 34px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; padding: 0 8px; }

/* Happening right now: the first thing in the slider, so the unusual is one tap away. */
.happening { margin: 8px 16px 16px; padding: 14px 6px 6px; border-radius: 20px; background: var(--card-tint); }
.happening-h { display: flex; align-items: center; gap: 8px; padding: 0 14px 6px; }
.happening-h .label { margin: 0; }
.happening-h .count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 11px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; text-align: center; }
.happening > .muted { padding: 0 10px 10px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(196,45,78,.5); animation: live-pulse 1.8s ease-out infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(196,45,78,.45); } 100% { box-shadow: 0 0 0 10px rgba(196,45,78,0); } }
.item-happening { align-items: flex-start; gap: 10px; }
/* The tag sits on its own line above the name, so every name lines up at the same left edge. */
.item-happening .tx { display: flex; flex-direction: column; align-items: flex-start; }
.item-happening .tx .tag-pill { margin: 0 0 5px; }
.item-happening .tx .t, .item-happening .tx .s { align-self: stretch; }
.happening .list-flush .item-happening { padding: 14px 14px 14px 2px; gap: 8px; } /* the picture sits 14px in from the top and the right, like the heading on the left */
.item-happening .t { font-size: 17px; }
.item-happening .s { margin-top: 2px; font-size: 15px; line-height: 1.4; color: var(--ink-2); } /* easier to read than the small grey line in other lists */
.w-blue { background: var(--cyan-sub); color: var(--cyan-t); } .w-purple { background: var(--purple-sub); border-color: var(--purple); }
.w-gold { background: rgba(214,160,22,.16); } .tag-pill.w-gold { color: #8A6100; }
.w-dictator { background: var(--red-sub); } .tag-pill.w-dictator { color: var(--red); }
.w-military { background: var(--amber-sub, rgba(217,131,0,.14)); } .tag-pill.w-military { color: var(--amber); } /* the same amber as military planes on the map */
.w-royal { background: rgba(107,63,160,.14); } .tag-pill.w-royal { color: #6B3FA0; }
.w-state { background: rgba(43,76,154,.13); } .tag-pill.w-state { color: #2B4C9A; }
.w-sports { background: rgba(47,125,79,.14); } .tag-pill.w-sports { color: #2F7D4F; }
.w-wealth { background: rgba(18,112,122,.14); } .tag-pill.w-wealth { color: #12707A; } /* dictators: red label, ranked with the famous */
.d-famous { font-size: 13px; font-weight: 700; color: #8A6100; }
/* One row of pills under the type: who owns it, then anything else worth knowing (police, hidden from apps…). */
.d-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.d-pills .tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 100px; background: var(--paper-3); font-size: 12.5px; font-weight: 700; letter-spacing: .2px; text-transform: none; }
.d-pills .tag::before { display: none; }
.d-famous svg { flex-shrink: 0; }
.d-top > :not(.d-emblem) { position: relative; }
/* Themed plane page: the whole slider takes on who the aircraft belongs to. Dark, graphical backgrounds with white
   text; the grey cards stay as they are, so everything inside them reads normally. */
.panel:is(.is-detail, .is-ship).is-themed { background: var(--theme-bg); --card-tint: #fff; } /* white cards; labels and halos that match the card follow */
/* Each theme: a pale wash of the owner's colour with its pattern faint on top, like a watermark. Text stays its
   normal dark colour and the cards turn white so they stand off the tint; the owner pill takes the strong colour. */
.panel:is(.is-detail, .is-ship).is-themed[data-theme=royal] { --th-ink: #5E3596; --th-pill: rgba(107,63,160,.14); --theme-bg:
  repeating-linear-gradient(45deg, rgba(107,63,160,.07) 0 1px, transparent 1px 24px), repeating-linear-gradient(-45deg, rgba(107,63,160,.07) 0 1px, transparent 1px 24px), #F5F0FB; }
.panel:is(.is-detail, .is-ship).is-themed[data-theme=celebrity] { --th-ink: #8A6100; --th-pill: rgba(214,162,20,.18); --theme-bg: radial-gradient(circle at 85% 0, rgba(224,178,58,.22), transparent 60%), #FBF6E6; }
.panel:is(.is-detail, .is-ship).is-themed[data-theme=state] { --th-ink: #244A96; --th-pill: rgba(43,76,154,.13); --theme-bg: repeating-linear-gradient(0deg, rgba(43,76,154,.04) 0 12px, transparent 12px 24px), #EFF3FB; }
.panel:is(.is-detail, .is-ship).is-themed[data-theme=military] { --th-ink: #4A5A2C; --th-pill: rgba(91,107,58,.16); --theme-bg: linear-gradient(rgba(241,243,230,.82), rgba(241,243,230,.82)), url("camo.svg") 0 0 / 200px 200px repeat, #F1F3E6; }
.panel:is(.is-detail, .is-ship).is-themed[data-theme=dictator] { --th-ink: #A3202F; --th-pill: rgba(196,45,78,.13); --theme-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .25 0 0 0 0 .26 0 0 0 0 .27 0 0 0 .22 0'/%3E%3C/filter%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.018' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .31 0 0 0 0 .32 0 0 0 .12 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23b)'/%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E") 0 0 / 220px 220px repeat, #E8E9EA; } /* cold grey concrete grain, like brutalist state buildings; the red stays in the owner pill */
.panel:is(.is-detail, .is-ship).is-themed[data-theme=sports] { --th-ink: #2F7D4F; --th-pill: rgba(47,125,79,.14); --theme-bg: repeating-linear-gradient(90deg, #EDF6EF 0 44px, #E5F1E8 44px 88px); }
.panel:is(.is-detail, .is-ship).is-themed[data-theme=wealth] { --th-ink: #12707A; --th-pill: rgba(18,112,122,.13); --theme-bg:
  repeating-linear-gradient(60deg, rgba(18,112,122,.06) 0 1px, transparent 1px 26px), repeating-linear-gradient(-60deg, rgba(18,112,122,.06) 0 1px, transparent 1px 26px), #EDF6F7; }
.panel:is(.is-detail, .is-ship).is-themed :is(.tab-cards .section, .tab-cards > .owner-head, .pass, .tile, .happening, .recent) { background: #fff; }
.panel:is(.is-detail, .is-ship).is-themed .d-pill.d-famous { background: var(--th-pill); color: var(--th-ink); }
.panel:is(.is-detail, .is-ship).is-themed .d-pills .tag { background: rgba(255,255,255,.7); }
.panel:is(.is-detail, .is-ship).is-themed .plane-tabs [role=tab][aria-selected=true] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(28,48,30,.1); }
.d-emblem { position: absolute; right: -14px; top: -18px; color: #fff; opacity: .12; pointer-events: none; transform: rotate(-12deg); }
.panel.is-themed:is([data-theme=military], [data-theme=dictator]) .d-emblem { display: none; }


.d-owner { margin-top: 2px; font-size: 13.5px; color: var(--ink-3); }
.tag-pill.w-red { color: var(--red); } .tag-pill.w-amber { color: var(--amber); } .tag-pill.w-purple { color: var(--purple); } .tag-pill.w-pink { color: var(--pink); }

/* Divider between what the flight is doing now and facts about the aircraft itself. */
.group-h { display: flex; align-items: center; gap: 12px; margin: 22px 20px 4px; font-size: 12px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ink-3); }
.group-h::before, .group-h::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* While an aircraft is open, its own tabs sit under its name (above the grey card) and the usual tabs hide. */
.panel.is-detail #tabs { display: none; }
/* The aircraft's tabs as a segmented control: a rounded track, the chosen tab a raised pill (matches the card below). */
/* The aircraft's tabs as a segmented control: a rounded track, the chosen tab a raised pill (matches the card below). */
.plane-tabs { gap: 2px; margin: 0 12px 12px; padding: 4px; border-radius: 16px; background: transparent; } /* 12px in, the same as when they stick in the top bar */
.plane-tabs [role=tab] { height: 34px; padding: 0 2px; border: 0; border-radius: 12px; font-size: 12px; letter-spacing: .9px; transition: background .15s, color .15s, box-shadow .15s; }
.plane-tabs [role=tab][aria-selected=true] { background: var(--paper-3); color: var(--ink); border-bottom-color: transparent; box-shadow: none; }
.panel.is-collapsed .plane-tabs [role=tab][aria-selected=true] { border-bottom-color: transparent; }

/* "Right now" tiles under the boarding pass: label, one big value, and what it means. */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.tile { min-width: 0; padding: 12px 14px; border-radius: 16px; background: var(--card-tint); }
.tile.is-wide { grid-column: 1 / -1; }
#d-live { padding-top: 2px; border-top: 0; } /* sits straight under the grey card */
.tile span { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-3); }
.tile b { display: block; margin-top: 3px; font-size: 19px; font-weight: 700; line-height: 1.2; color: var(--ink); overflow-wrap: anywhere; }
.tile small { display: block; margin-top: 3px; font-size: 13px; line-height: 1.35; color: var(--ink-2); }

/* Who it belongs to, on the right of each "Most interesting" row: photo or logo in a rounded square, name underneath. */
.ent { flex-shrink: 0; width: 72px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ent-pic { width: 60px; height: 60px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: var(--paper-3); }
.ent-pic img { width: 100%; height: 100%; object-fit: cover; } /* fills the square: no white edges */
.ent-pic.is-blank { background: var(--paper-3); color: var(--ink-2); font-size: 18px; font-weight: 700; letter-spacing: .5px; }
.ent-name { width: 100%; font-size: 10.5px; font-weight: 600; line-height: 1.2; color: var(--ink-3); text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ent-pic.is-photo img { object-fit: cover; padding: 0; }

/* Diverting: the chart turns red and shows where it was meant to be going. */
/* The whole chart's colour follows the status: green on route, blue off route (the default), orange unusual, red diverting or danger. */
.pass-graph.tone-green { --cyan: #2F8A4F; --cyan-t: #23703F; --cyan-glow: rgba(47,138,79,.3); }
.pass-graph.tone-amber { --cyan: #D98300; --cyan-t: #A86A06; --cyan-glow: rgba(217,131,0,.3); }
.pass-graph.tone-red { --cyan: var(--red); --cyan-t: var(--red); --cyan-glow: rgba(196,45,78,.3); }
.pg-was { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-3); text-decoration: line-through; }
.ps-chip.is-diverted { background: var(--amber-sub); color: #A86A06; }
.ent-pic.is-diagram { background: var(--paper-3); }
.ent-pic.is-diagram svg { width: 100%; height: 100%; display: block; }
.ps-alert.has-pic { display: flex; align-items: center; gap: 14px; }
.ps-alert.has-pic > div { flex: 1; min-width: 0; }
.ps-alert .ent-pic.is-diagram { background: rgba(17,25,21,.06); }
.ps-alert .ent-name { color: var(--ink-3); }

/* Something unusual leads the card: coloured headline and reason, fading into the chart (no separate box). */
.ps-lead { padding: 16px 20px 2px; }
.ps-lead.l-amber { background: linear-gradient(to bottom, rgba(214,146,22,.16), rgba(214,146,22,0) 100%); }
.ps-lead.l-red { background: linear-gradient(to bottom, rgba(196,45,78,.14), rgba(196,45,78,0) 100%); }
.ps-lead.l-purple { background: linear-gradient(to bottom, rgba(113,70,181,.12), rgba(113,70,181,0) 100%); }
.ps-lead.has-pic { display: flex; align-items: flex-start; gap: 14px; }
.ps-lead.has-pic > div { flex: 1; min-width: 0; }
.ps-lead .ps-head b { font-size: 19px; font-weight: 700; }
.ps-lead.l-amber .ps-head b { color: #A86A06; } .ps-lead.l-red .ps-head b { color: var(--red); } .ps-lead.l-purple .ps-head b { color: var(--purple); }
.ps-lead > div > p { margin-top: 4px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.ps-lead .ps-more { margin-top: 8px; }
.ps-lead .ps-more b { color: var(--ink); }
.ps-lead .ps-status { margin-top: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-3); }
.ps-lead .ent-pic.is-diagram { background: rgba(17,25,21,.06); }

/* The timeline under the chart: departure end, the plane's dot, destination end; durations sit on the line. */
.pg-spans { position: relative; height: 36px; margin: -19px 4px 0; } /* its line is the chart's ground line: take-off and landing start and end on it */
.pg-span { position: absolute; top: 10px; height: 0; border-top: 2px solid var(--cyan); }
.pg-span.is-ahead { border-top-style: dashed; opacity: .7; }
.pg-tick { display: none; } /* the path's end dots mark the ends of the line */
.pg-now-dot { position: absolute; top: 6px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 3px var(--card-tint); }
.pg-sl { position: absolute; z-index: 3; top: 2px; padding: 0 7px; background: var(--card-tint); white-space: nowrap; text-align: center; font-size: 12px; font-weight: 600; line-height: 18px; color: var(--cyan-t); }
.pg-sl small { display: block; font-size: 11px; font-weight: 600; line-height: 13px; letter-spacing: .3px; opacity: .85; }
.pg-sl b { font-size: 13.5px; font-weight: 700; }
.pg-sl.is-ahead { color: color-mix(in srgb, var(--cyan-t) 80%, var(--card-tint)); } /* lighter text only: the background stays solid so no line shows through */
.pg-ends { margin-top: 6px; }
.pg-spans.is-compact .mi { display: none; }
.pg-chart { z-index: 1; } .pg-chart .pg-dot { z-index: 2; } /* the path's end dots sit on the timeline */

/* Recently opened: a small list at the top of the Interesting tab. */
.recent { margin: 16px 16px 16px; padding: 12px 6px 4px; border-radius: 20px; background: var(--card-tint); }
.recent-h { display: flex; align-items: center; justify-content: space-between; padding: 0 14px 4px; }
.recent-h .label { margin: 0; }
.recent .item-recent { padding: 10px 14px; }
.recent .item-recent .alt { font-size: 12.5px; color: var(--cyan-t); white-space: nowrap; }

/* The main tabs match the aircraft's tabs: a rounded track with the chosen tab as a raised pill. */
#tabs { gap: 4px; padding: 4px 0 0; margin: 4px 8px 4px; border-radius: 16px; background: transparent; }
#tabs [role=tab] { height: 34px; padding: 0 6px; border: 0; border-radius: 12px; font-size: 11.5px; letter-spacing: .5px; transition: background .15s, color .15s, box-shadow .15s; }
#tabs [role=tab][aria-selected=true] { background: var(--paper-3); color: var(--ink); box-shadow: none; }
.panel.is-collapsed #tabs [role=tab][aria-selected=true] { background: transparent; box-shadow: none; } /* hidden slider: no tab looks chosen */
.recent-h .link-btn { margin: 0; font-size: 13px; }
@media (max-width: 1100px) { .head-bar #tabs { flex: 1 0 calc(100% - 16px); } } /* full width less its side margins, so both sides match */

/* Right now tiles with a small drawing on the right, in the chart's status colour. */
.tile.has-viz { display: flex; align-items: flex-start; gap: 10px; padding-right: 12px; } /* the drawing sits as far in from the right as from the top */
.tile.has-viz > div { flex: 1; min-width: 0; }
.tile-viz { flex-shrink: 0; width: 44px; height: 44px; }
#d-live[data-tone="green"] { --viz: #2F8A4F; --viz-soft: rgba(47,138,79,.16); }
#d-live[data-tone="amber"] { --viz: #D98300; --viz-soft: rgba(217,131,0,.16); }
#d-live[data-tone="red"] { --viz: var(--red); --viz-soft: rgba(196,45,78,.14); }
@media (max-width: 520px) { .tiles:has(.has-viz) { grid-template-columns: 1fr; gap: 16px; } .tile.has-viz { padding: 10px 10px 10px 14px; } } /* on phones: one tile per row so the drawing has room beside the words */
/* The star's menu: favourite and track this flight, or just favourite. */
.fav-menu { position: fixed; z-index: 3000; width: min(300px, calc(100vw - 32px)); padding: 6px; border-radius: 18px; background: var(--paper); box-shadow: 0 10px 40px rgba(20,40,25,.28); display: grid; gap: 2px; }
.fav-menu button { display: grid; gap: 2px; padding: 10px 12px; border: 0; border-radius: 12px; background: none; text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.fav-menu button:hover, .fav-menu button:first-child { background: var(--paper-2); }
.fav-menu b { font-size: 15px; }
.fav-menu span { font-size: 13px; line-height: 1.35; color: var(--ink-3); }
/* The slider's outline takes the theme's colour too. */
.panel:is(.is-detail, .is-ship).is-themed[data-theme=military] { border-color: #B9C29A; }
.panel:is(.is-detail, .is-ship).is-themed[data-theme=dictator] { border-color: #CFCFCC; }
.panel:is(.is-detail, .is-ship).is-themed[data-theme=royal] { border-color: #CDB8EA; }
.panel:is(.is-detail, .is-ship).is-themed[data-theme=celebrity] { border-color: #E6CF8A; }
.panel:is(.is-detail, .is-ship).is-themed[data-theme=state] { border-color: #B5C5EA; }
.panel:is(.is-detail, .is-ship).is-themed[data-theme=sports] { border-color: #A9D3B4; }
.panel:is(.is-detail, .is-ship).is-themed[data-theme=wealth] { border-color: #A6D3D7; }

/* Famous owners' planes on the map in their owner type's colour (the same as their tag in the list). */
.ac.th-dictator { color: #C42D4E; } .ac.th-royal { color: #6B3FA0; } .ac.th-celebrity { color: #B8860B; }
.ac.th-state { color: #2B4C9A; } .ac.th-sports { color: #2F7D4F; } .ac.th-wealth { color: #12707A; }

/* Owner, Spot, Aircraft and Messages: each section is a grey card, like the boxes on Now. */
.tab-cards { padding-bottom: 8px; }
.tab-cards .section, .tab-cards > .owner-head { margin: 0 16px 12px; padding: 16px 18px; border: 0; border-radius: 20px; background: var(--card-tint); }
.tab-cards .section > .label { margin-bottom: 10px; }
.tab-cards > .owner-head { padding: 14px; } /* the picture evenly inset from the card's corner */
.tab-cards > .photo { margin: 0 16px 12px; }

/* Following an owner from search. */
.res-owner { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.owner-follow { flex-shrink: 0; height: 30px; padding: 0 12px; border: 0; border-radius: 100px; background: var(--paper-3); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.owner-follow.is-on { background: rgba(194,65,127,.14); color: #C2417F; }
.w-follow { background: rgba(194,65,127,.14); } .tag-pill.w-follow { color: #C2417F; }

/* Right now: tiles line up with the route box (16px from the slider's edge) and sit the same 16px apart. */
#d-live { padding-left: 16px; padding-right: 16px; border-top: 0; }
#d-live > .label { padding: 0 8px; }
.tiles { gap: 16px; }

/* Listen to the tower */
.listen { display: grid; gap: 8px; margin-top: 12px; }
.listen-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--paper); color: var(--ink); text-decoration: none; }
.listen-ic { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--cyan-sub); color: var(--cyan-t); }
.listen-row .tx { flex: 1; min-width: 0; display: grid; }
.listen-row b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listen-row small { font-size: 12.5px; color: var(--ink-3); }
.listen-go { font-size: 13px; font-weight: 700; color: var(--cyan-t); }

/* Owner news */
.news { display: grid; gap: 8px; margin-top: 4px; }
.news-row { display: grid; gap: 3px; padding: 10px 12px; border-radius: 14px; background: var(--paper); color: var(--ink); text-decoration: none; }
.news-row b { font-size: 15px; line-height: 1.35; font-weight: 600; }
.news-row small { font-size: 12.5px; color: var(--ink-3); }

/* Choosing the order of Most interesting */
.rank-toggle { margin: 0 0 0 auto; height: 22px; padding: 0; display: inline-flex; align-items: center; line-height: 1; font-size: 13px; font-weight: 700; }
.happening-h .count + .rank-toggle { margin: 0 0 0 10px; }
.rank-edit { padding: 4px 8px 8px; }
.rank-edit > p { margin: 0 0 10px; font-size: 14px; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 6px; border-radius: 12px; background: var(--paper); }
.rank-switch { position: relative; width: 38px; height: 22px; flex-shrink: 0; padding: 0; border: 0; border-radius: 100px; background: var(--line-2); cursor: pointer; transition: background .15s; }
.rank-switch span { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.rank-switch.is-on { background: var(--green); }
.rank-switch.is-on span { transform: translateX(16px); }
.rank-row.is-off .rank-name { color: var(--ink-4); text-decoration: line-through; }
.rank-n { width: 22px; height: 22px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--paper-3); font-size: 12px; font-weight: 700; color: var(--ink-2); }
.rank-name { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.3; font-weight: 600; }
.rank-btn { width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--paper-3); color: var(--ink); cursor: pointer; }
.rank-btn:disabled { opacity: .3; cursor: default; }
.rank-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }

/* No published destination: where it is now, then a quiet note. */
.pg-ends .pg-over { font-style: normal; font-weight: 600; color: var(--ink); }
.pg-ends .pg-unpub { font-size: 12.5px; font-weight: 500; color: var(--ink-3); }

/* iPad and wider: a panel down the whole left-hand side, edge to edge (top, bottom and left), with its own heading;
   the search bar and map buttons sit on the map to its right. It's always open, so there's no handle to drag. */
.side-title { display: flex; align-items: center; gap: 8px; padding: 0 10px 6px; font-size: 19px; font-weight: 700; letter-spacing: .2px; color: var(--ink); } /* the app's name above the tabs */
.side-title img { width: 24px; height: 24px; border-radius: 6px; }
.panel.is-detail .side-title { display: none; } /* an open aircraft has its own heading */
.side-resize { display: none; }
@media (min-width: 700px) {
  :root { --side-w: min(400px, 44vw); }
  html .panel, html .panel.is-collapsed { top: 0; bottom: 0; left: 0; right: auto; width: var(--side-w); height: auto !important; border: 0; border-right: 1px solid var(--line); border-radius: 0; box-shadow: 8px 0 30px rgba(28,48,30,.12); transition: none; }
  html .panel .panel-head { padding-top: calc(14px + env(safe-area-inset-top)); padding-left: calc(8px + env(safe-area-inset-left)); cursor: default; }
  html .panel .grabber { display: none; }
  /* Drag the panel's right edge to make it wider or narrower (remembered on this device). */
  .side-resize { display: block; position: absolute; top: 0; bottom: 0; right: 0; width: 14px; z-index: 5; cursor: col-resize; touch-action: none; }
  .side-resize span { position: absolute; top: 50%; right: 4px; width: 5px; height: 44px; margin-top: -22px; border-radius: 3px; background: var(--line-2); opacity: .8; transition: background .15s, opacity .15s; }
  .side-resize:hover span, .side-resize.is-dragging span { background: var(--ink-3); opacity: 1; }
  .side-title { display: flex; align-items: center; gap: 10px; padding: 2px 12px 10px; font-size: 22px; font-weight: 700; letter-spacing: .2px; color: var(--ink); }
  .side-title img { width: 30px; height: 30px; border-radius: 8px; }
  .panel.is-detail .side-title { display: none; } /* an open aircraft has its own heading */
  html .head-bar { flex-wrap: wrap; } html .head-bar #tabs { flex: 1 0 calc(100% - 16px); } /* the tabs fill the panel's width with even margins */
  html .panel-body { padding-bottom: env(safe-area-inset-bottom); }
  html .finder { left: calc(var(--side-w) + 16px) !important; right: calc(16px + env(safe-area-inset-right)) !important; top: calc(16px + env(safe-area-inset-top)); }
  html .map-float { left: calc(var(--side-w) + 16px); right: calc(16px + env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); }
  html .toasts { left: calc(var(--side-w) + 16px); right: 16px; bottom: calc(16px + 56px + env(safe-area-inset-bottom)); }
  html.sheet-tall .map-float { opacity: 1; } html.sheet-tall .map-float > * { pointer-events: auto; } /* the map is beside the panel, so its buttons stay */
  .panel .tiles { grid-template-columns: 1fr; } /* a phone-width panel: one tile per row, like on a phone */
  .panel .tile.has-viz { padding: 10px 10px 10px 14px; }
}

/* Hidden from tracking apps: a small spy mark beside the plane's name. */
.d-hidden { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 2px 8px 2px 6px; border-radius: 100px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .3px; vertical-align: 3px; }

/* The name truncates on its own, so the Hidden mark beside it always shows in full. */
.d-top .d-name { display: flex; align-items: center; min-width: 0; }
.d-name-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-hidden { flex-shrink: 0; vertical-align: 0; } .d-title .d-hidden { color: #fff; font-weight: 700; transform: translateY(-2px); } /* lined up with the capitals, not the whole line */
.d-hidden.is-mini { margin-left: 6px; padding: 1px 7px 1px 5px; font-size: 11px; color: #fff; vertical-align: 2px; } .d-hidden.is-mini svg { width: 13px; height: 13px; }

/* The tag at the top of each Most interesting row, with the Hidden mark beside it when the owner hides the plane. */
.item-happening .tx .tag-line { display: flex; align-items: center; gap: 6px; margin: 0 0 5px; }
.item-happening .tx .tag-line .tag-pill { margin: 0; }
.tag-line .d-hidden.is-mini { margin-left: 0; vertical-align: 0; }

/* Hidden, styled like the tags beside it: a light grey pill with the spy in front. */
.d-hidden.is-mini { padding: 3px 8px 3px 6px; border-radius: 8px; background: rgba(17,25,21,.08); color: var(--ink-2); font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; gap: 4px; }
.d-hidden.is-mini svg { width: 13px; height: 13px; }
.d-pills .d-hidden { margin: 0; padding: 3px 10px 3px 8px; background: rgba(17,25,21,.08); color: var(--ink-2); font-size: 13px; font-weight: 700; letter-spacing: 0; text-transform: none; transform: none; }

/* Plane page: back on the left and the star on the right, in the top bar either side of the drag handle;
   the name, type and pills below start at the left edge. */
.head-actions { display: none; }
.panel.is-detail .head-actions { display: flex; justify-content: space-between; align-items: center; position: absolute; left: 12px; right: 12px; top: 8px; pointer-events: none; z-index: 2; }
.panel.is-detail .head-actions > * { pointer-events: auto; }
.panel.is-detail .panel-head { min-height: 50px; }
.head-actions .back { background: var(--paper-3); }
.panel:is(.is-detail, .is-ship).is-themed .head-actions .back { background: #fff; box-shadow: 0 1px 4px rgba(28,48,30,.14); }
.panel.is-detail .d-top { padding-top: 6px; }
.panel.is-detail .d-top .d-title { margin-left: 0; }
.panel.is-detail .d-top .d-name { padding-right: 0; }

/* Back: a plain "‹ BACK" text button, no circle or background. */
.head-actions .back, .panel:is(.is-detail, .is-ship).is-themed .head-actions .back { width: auto; height: 34px; display: inline-flex; align-items: center; gap: 2px; padding: 0 8px 0 0; background: none; box-shadow: none; color: var(--ink); font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.head-actions .back:hover { background: none; opacity: .7; }

/* The aircraft's photo beside its name, type and pills; tap for the big version. */
.panel.is-detail .d-top { align-items: center; gap: 14px; }
.d-thumb { flex: 0 0 84px; width: 84px; height: 84px; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: var(--paper-3); cursor: zoom-in; }
.d-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.d-thumb.is-loading { animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .55; } }

/* Messages: each one a card at the page's margins, 16px apart, like the Right now tiles. */
.msgs-page { margin: 0 16px 12px; gap: 16px; }
.msgs-page .msg2 { padding: 14px 16px; border-radius: 16px; background: var(--card-tint); }
.panel:is(.is-detail, .is-ship).is-themed .msgs-page .msg2 { background: #fff; }

/* Messages as a conversation: the plane on the left, the ground (airline or air traffic control) on the right. */
.msgs-page .msg2 { max-width: 88%; }
.msgs-page .msg2.is-down { justify-self: start; border-bottom-left-radius: 4px; }
.msgs-page .msg2.is-up { justify-self: end; border-bottom-right-radius: 4px; background: var(--cyan-sub); }
.msg2-who { margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: .3px; color: var(--ink-3); }
.msgs-page .msg2.is-up .msg2-who { text-align: right; }

/* Dropdowns and boxes never grow wider than the page, however long the airport name. */
.field { min-width: 0; max-width: 100%; }
.field select, .field input { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }

/* A flag when a government owner has no picture of its own. */
.ent-pic.is-flag { font-size: 42px; line-height: 1; background: var(--paper-3); }

/* Last resort: a drawing of a plane. */
.ent-pic.is-plane { color: var(--ink-3); background: var(--paper-3); }

/* Refresh button beside Order */
.rank-refresh { margin-left: auto; width: 28px; height: 22px; display: inline-grid; place-items: center; padding: 0; border: 0; background: none; color: var(--cyan-t); cursor: pointer; }
.rank-refresh + .rank-toggle, .happening-h .count + .rank-refresh + .rank-toggle { margin-left: 6px; }
.happening-h .count + .rank-refresh { margin-left: 10px; }
.rank-refresh:active svg { transform: rotate(90deg); transition: transform .2s; }
.happening-h .label { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 1px; } /* one line, even with the count and buttons beside it */

.owner-flag { display: grid; place-items: center; flex-shrink: 0; font-size: 50px; line-height: 1; background: var(--paper-3); }

/* Aircraft tab tidy-up: cards don't need divider lines between them; "Why it stands out" reasons are clean white
   rows with a coloured dot; the type's figures sit in white boxes so they show against the grey card. */
.tab-cards .section + .section { border-top: 0; }
.tab-cards .why-item { position: relative; padding: 11px 14px 11px 30px; border: 0; border-radius: 12px; background: #fff; font-size: 14.5px; }
.tab-cards .why-item::before { content: ''; position: absolute; left: 13px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--cyan)); }
.why-item.w-red { --dot: var(--red); } .why-item.w-amber { --dot: var(--amber); } .why-item.w-pink { --dot: var(--pink); }
.why-item.w-purple { --dot: var(--purple); } .why-item.w-green { --dot: var(--green); } .why-item.w-blue { --dot: var(--cyan); }
.tab-cards .why { gap: 8px; }
.tab-cards .fact { background: #fff; }
.tab-cards .section .rows .row:first-child { padding-top: 2px; }

/* Famous owners: the way in from Home, the directory, and each owner's profile. */
.dir-entry { display: flex; align-items: center; gap: 12px; width: calc(100% - 32px); margin: 0 16px 16px; padding: 14px 16px; border: 0; border-radius: 20px; background: var(--card-tint); color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.dir-entry span:first-child { flex: 1; display: grid; gap: 2px; }
.dir-entry b { font-size: 16px; } .dir-entry small { font-size: 13px; color: var(--ink-3); }
.dir-entry .go, .dir-row .go { font-size: 20px; color: var(--ink-3); }
.dir-head { margin: 0 16px 12px; padding: 4px 2px 0; }
.dir-head h2 { font-size: 22px; }
.dir-search { width: 100%; height: 42px; margin-top: 10px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; font-size: 15px; box-sizing: border-box; }
.dir-list { display: grid; gap: 6px; }
.dir-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: #fff; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.dir-row.is-static { cursor: default; }
.dir-row .tx { flex: 1; min-width: 0; display: grid; gap: 1px; }
.dir-row b { font-size: 15px; } .dir-row small { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-row .go { font-size: 14px; font-weight: 700; color: var(--cyan-t); }
.dir-state { flex-shrink: 0; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.dir-state.is-up { color: var(--green); }
.owner-live { font-weight: 700; color: var(--green); margin-bottom: 10px; }
.owner-follow-big { margin-top: 12px; }
.owner-link { padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--cyan-t); text-decoration: underline; cursor: pointer; }
.panel.is-owner .side-title { display: none; }

/* "Why it stands out": plain text lined up with the heading, no dots or boxes. */
.tab-cards .why { gap: 10px; }
.tab-cards .why-item { padding: 0; background: none; border: 0; border-radius: 0; font-size: 15px; line-height: 1.45; }
.tab-cards .why-item::before { display: none; }

/* Encyclopedia cards: picture beside the title, the text full width below (not squeezed beside the picture). */
.wiki { display: block; }
.wiki-top { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.wiki-top b { font-size: 17px; }
.wiki-top .wiki-pic, .wiki-top .wiki-pic img { width: 64px; height: 64px; flex-basis: 64px; }

/* News: the outlet's logo in a rounded square, headline beside it, less inset. */
.news-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px; }
.news-logo { position: relative; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 10px; overflow: hidden; background: var(--paper-3); display: grid; place-items: center; }
.news-logo img { position: absolute; inset: 6px; width: 28px; height: 28px; z-index: 1; background: var(--paper-3); }
.news-logo i { font-style: normal; font-weight: 700; color: var(--ink-3); }
.news-tx { flex: 1; min-width: 0; display: grid; gap: 3px; }
.panel.is-detail .panel-content .section + .section { border-top: 0; } /* no divider lines between sections on a plane page */
/* News rows sit flush with the card heading: no box of their own, just the logo and the words. */
.news { gap: 4px; }
.news-row { padding: 8px 0; background: none; border-radius: 0; }
/* The outlet logo fills its rounded square (no grey frame around it). */
.news-logo img { inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 10px; background: #fff; }
/* More room between the planes and other rows in owner pages. */
.dir-list { gap: 10px; }

/* Listen to the tower: square icons, lined up with the card's left edge like the news rows. */
.listen-row { padding: 8px 0; background: none; border-radius: 0; }
.listen-ic { width: 40px; height: 40px; border-radius: 10px; }

/* The route tile's mini map: the direct line dashed, the real path solid, the plane as a ring. */
.tile.route-tile { display: block; }
.route-map { display: block; width: 100%; height: 104px; margin: 0 0 8px; }
.route-map .rm-lab { font-size: 11px; font-weight: 700; letter-spacing: .5px; fill: var(--ink-3); }
.pg-spans.is-at-end .pg-now-dot { display: none; } /* almost there (or just left): the plane is at the airport dot, so no second dot on top of it */
/* Tabs sized to their labels: each grey pill fits its word, spare room shared out evenly (so "Messages" isn't cramped and "Spot" isn't stretched). */
.plane-tabs [role=tab], #tabs [role=tab] { flex: 1 1 auto; padding: 0 10px; }
/* Messages fill the column; replies from the ground sit a little in from the left so the conversation still reads. */
.msgs-page .msg2 { max-width: none; }
.msgs-page .msg2.is-up { margin-left: 12%; }

/* The Now tab under the top box: On board, the story, can you see it, when it lands. */
.now-cards { display: grid; gap: 12px; }
.now-card { background: var(--card-tint); border-radius: 18px; padding: 14px 16px; }
.now-card.is-unusual { background: rgba(217,131,0,.12); }
.now-lab { font-size: 11px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; color: var(--ink-3); }
.now-big { font-size: 19px; font-weight: 700; line-height: 1.2; margin-top: 3px; }
.now-big.is-good { color: var(--green); } .now-big.is-bad { color: var(--red); }
.now-sub { font-size: 14px; color: var(--ink-2); margin-top: 3px; }
.now-faint { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }
.now-who { display: flex; gap: 12px; align-items: flex-start; }
.now-who img, .now-face { width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0; object-fit: cover; background: var(--paper-3); display: grid; place-items: center; font-weight: 700; color: var(--ink-3); }
.now-news { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; }
.now-logo { width: 32px; height: 32px; border-radius: 8px; overflow: hidden; background: #fff; flex-shrink: 0; }
.now-logo img { width: 100%; height: 100%; object-fit: cover; }
.now-news b { display: block; font-size: 14px; line-height: 1.3; } .now-news small { font-size: 12px; color: var(--ink-3); }
.now-sep { height: 1px; background: rgba(17,25,21,.08); margin: 12px 0 10px; }
.now-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 14px; border-bottom: 1px solid rgba(17,25,21,.06); }
.now-row:last-child { border-bottom: 0; } .now-row span { color: var(--ink-3); } .now-row b { text-align: right; font-weight: 600; }
.now-btns { margin-top: 10px; }
.now-btn { height: 36px; padding: 0 16px; border: 0; border-radius: 100px; background: var(--cyan); color: #fff; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.now-track { display: block; width: 100%; height: 118px; margin-top: 10px; border-radius: 12px; background: rgba(255,255,255,.6); }
.now-note { font-size: 13.5px; color: var(--ink-2); background: #fff; border-radius: 12px; padding: 10px 12px; margin-top: 10px; }
.now-look { display: flex; gap: 12px; align-items: center; }
.now-dial { position: relative; width: 52px; height: 52px; border-radius: 50%; background: var(--cyan-sub); flex-shrink: 0; }
.now-dial i { position: absolute; left: 50%; top: 50%; width: 3px; height: 22px; margin: -22px 0 0 -1.5px; background: var(--cyan-t); border-radius: 2px; transform-origin: 50% 100%; }
.now-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.now-grid div { background: #fff; border-radius: 12px; padding: 9px 11px; }
.now-grid small { display: block; font-size: 10.5px; letter-spacing: .8px; text-transform: uppercase; font-weight: 700; color: var(--ink-3); } .now-grid b { font-size: 15px; }

/* The fold at the bottom of the top box */
.pass-fold { margin: -6px 16px 0; padding: 0 0 12px; } /* the graph above already ends in padding, so the fold tucks up under its text */
.pass-fold-btn { display: block; margin:  0 auto; padding: 6px 14px; border: 0; border-radius: 100px; background: #fff; color: var(--cyan-t); font: inherit; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; cursor: pointer; }
.pass-fold-in { margin: 0 -8px; } /* the tiles sit closer to the box edge than its text does */
.pass-fold-in .tiles { gap: 10px; margin-top: 0; }
.pass-fold-in .tile { background: #fff; }
.now-card .now-who { margin: 8px 0 6px; }

.panel:is(.is-detail, .is-ship).is-themed .pass-fold-in .tile { background: rgba(17,25,21,.05); } /* the top box is white on themed pages, so the tiles go faint grey to stay visible */
.pass-fold.is-open .pass-fold-btn { margin-top: 10px; }
.pass + #d-live, #d-pass + #d-live { margin-top: -6px; } /* the top box already ends in a 16px margin: match the 12px gap between the cards */
.now-pic { width: 56px; height: 56px; padding: 0; border: 0; background: none; cursor: zoom-in; flex: 0 0 56px; border-radius: 14px; overflow: hidden; } .now-pic img { display: block; }
/* The gap under the tabs belongs to the tab bar, so it stays when the list scrolls (the content gives up the same 8px) */
.panel:not(.is-detail) .head-bar { padding-bottom: 8px; } .panel:not(.is-detail) .panel-body > .panel-content { margin-top: -8px; }

/* Flight page: once its tabs scroll away they stick in the top bar, with the flight number between Back and the star */
.head-title { display: none; }
.panel.is-detail.is-stuck .head-title { display: block; position: absolute; left: 50%; transform: translateX(-50%); max-width: calc(100% - 180px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 16px; pointer-events: none; }
.panel.is-detail .head-bar #head-ptabs:not([hidden]) { display: flex; position: absolute; z-index: 6; min-width: 0; } /* floats below the top bar (placed as it sticks), so the top bar keeps its height; looks like the tabs it replaces */
/* The band behind the stuck tabs: the panel's own background, edge to edge, with a fine line under it */
.panel.is-detail.is-stuck::after { content: ''; position: absolute; left: 0; right: 0; top: var(--stuck-top); height: var(--stuck-h); z-index: 5; pointer-events: none;
  background-color: var(--stuck-bg); background-image: var(--stuck-img); background-size: var(--stuck-size); background-position: var(--stuck-pos); background-repeat: var(--stuck-rep);
  box-shadow: 0 1px 0 rgba(17,25,21,.07); }
#head-ptabs[hidden] { display: none; }
/* Messages: a chat thread inside the card, like iMessage */
.th-intro { font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.thread { display: flex; flex-direction: column; gap: 4px; margin: 12px -6px 0; }
.th-time { align-self: center; margin: 10px 0 4px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.th-who { margin: 8px 12px 2px; font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.th-who.is-up { text-align: right; }
.th-msg { display: flex; flex-direction: column; max-width: 84%; }
.th-msg.is-down { align-self: flex-start; align-items: flex-start; }
.th-msg.is-up { align-self: flex-end; align-items: flex-end; }
.th-bubble { padding: 9px 14px; border-radius: 20px; font-size: 15px; line-height: 1.4; background: #fff; color: var(--ink); overflow-wrap: anywhere; }
.th-msg.is-down .th-bubble { border-bottom-left-radius: 6px; }
.th-msg.is-up .th-bubble { border-bottom-right-radius: 6px; background: #2F80ED; color: #fff; }
.panel:is(.is-detail, .is-ship).is-themed .th-msg.is-down .th-bubble { background: rgba(17,25,21,.06); } /* the card is white on themed pages */
.th-meta { margin: 3px 12px 4px; font-size: 11.5px; color: var(--ink-3); }
.th-meta summary { cursor: pointer; list-style: none; } .th-meta summary::-webkit-details-marker { display: none; }
.th-meta u { text-decoration: none; color: var(--cyan-t); font-weight: 600; }
.th-meta[open] u { display: none; }
.th-meta code { display: block; margin-top: 4px; padding: 8px 10px; border-radius: 10px; background: rgba(17,25,21,.05); font: 11.5px/1.5 ui-monospace, 'SF Mono', Menlo, monospace; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
/* Following, above Most interesting on the home page */
.following { margin-bottom: 12px; }
.following .count.is-up { margin-left: auto; width: auto; background: var(--pink-sub, rgba(196,45,110,.12)); color: var(--pink-t, #A3215C); }
.following .ent-initials { font-size: 18px; color: var(--ink-3); }
.item-follow .tag-line:empty { display: none; }
.th-foot { margin-top: 10px; text-align: center; font-size: 12px; }

/* "More about this flight": full width along the bottom of the top box, 8px in from its sides and bottom like the tiles */
.pass-fold { padding-bottom: 20px; } /* the same space below the button as at its sides */
.pass-fold-btn { width: 100%; margin: 0; padding: 12px 14px; border-radius: 14px; }
.pass-fold { margin-left: 20px; margin-right: 20px; } /* the button lines up with the text, chart and taxi plan above it (20px in) */
.pass-fold.is-open .pass-fold-btn { margin-top: 10px; }
.panel:is(.is-detail, .is-ship).is-themed .pass-fold-btn { background: rgba(17,25,21,.05); } /* the top box is white on themed pages */

/* A star on each Most interesting row (top right, level with the label): opens the same menu as the flight page's */
.hap-row { position: relative; }
.hap-row + .hap-row { border-top: 1px solid rgba(17,25,21,.08); }
.hap-row .item-happening { width: 100%; }
.happening .list-flush .hap-row .item-happening .tag-line { padding-right: 40px; }
.hap-star { position: absolute; top: 8px; right: 6px; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--ink-3); cursor: pointer; }
.hap-star:hover { background: rgba(17,25,21,.06); }
.hap-star.is-on { color: var(--pink); background: var(--pink-sub); } /* as on the flight page */

/* iPad: the search box in the side panel under "Skywatch", the filters as the panel's tabs, and a ••• menu for
   Above me, Airport, Logbook and Alerts (which open with a Back bar). Phones keep the search on the map. */
.chip-l, .more-btn, .page-bar { display: none; }
@media (min-width: 700px) {
  html .panel .finder { position: relative; top: auto; left: auto !important; right: auto !important; margin: 0 4px 12px; z-index: 30; transform: none; }
  html .panel .finder .searchbar { height: 46px; padding: 0 4px 0 14px; background: var(--paper-2); border-color: transparent; box-shadow: none; }
  html .panel .finder .searchbar:focus-within { background: #fff; border-color: var(--cyan); box-shadow: 0 0 0 4px var(--cyan-sub); }
  html .panel .finder .results { position: absolute; left: 0; right: 0; top: 100%; z-index: 40; }
  html .panel .more-btn { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; color: var(--ink-2); }
  html .panel .more-btn:hover { background: var(--paper-3); }
  html.side-search #tabs { display: none; }
  html.side-search .panel.is-page:not(.is-detail) .page-bar { display: flex; align-items: center; gap: 8px; flex: 1 0 calc(100% - 16px); margin: 4px 8px; min-height: 34px; }
  .page-bar .back { width: auto; height: 34px; display: inline-flex; align-items: center; gap: 2px; padding: 0 8px 0 0; background: none; color: var(--ink); font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
  .page-title { font-size: 16px; font-weight: 700; }
  html.side-search .panel.is-detail .finder { display: none; } /* an open aircraft has its own top bar */
}
.chip-t { font-style: normal; }
#more-menu button:first-child { background: none; } #more-menu button:hover { background: var(--paper-2); } /* the ••• menu: no option picked out until you point at it */
@media (min-width: 700px) {
  html.side-search .side-title { padding-right: 4px; }
  html.side-search .side-title .more-btn { display: grid; margin-left: auto; width: 40px; height: 40px; border-radius: 12px; color: var(--ink); }
  html.side-search .panel.is-detail .side-title .more-btn { display: none; }
}
/* iPad: Notable (default), Services, Planes, Helicopters as the panel's tabs; the map's filter icons aren't needed */
.ftabs { display: none; }
@media (min-width: 700px) {
  html.side-search .panel .finder #chips { display: none; }
  html.side-search #ftabs { display: flex; gap: 4px; padding: 0; margin: 4px 8px 4px; flex: 1 0 calc(100% - 16px); }
  html.side-search #ftabs [role=tab] { flex: 1 1 auto; height: 34px; padding: 0 10px; border: 0; border-radius: 12px; background: none; font: inherit; font-size: 11.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--ink-3); cursor: pointer; }
  html.side-search #ftabs [role=tab][aria-selected=true] { background: var(--paper-3); color: var(--ink); }
  html.side-search .panel.is-detail #ftabs, html.side-search .panel.is-page #ftabs { display: none; }
}
/* Pictures in the list squares: people fill the square; logos and aircraft are shown whole, centred on white */
.ent-pic.is-logo, .ent-pic.is-type { background: #fff; box-shadow: inset 0 0 0 1px rgba(17,25,21,.08); }
.ent-pic.is-logo img { object-fit: contain; padding: 7px; mix-blend-mode: multiply; } /* a logo's own white background melts into the box */
.ent-pic.is-type img { object-fit: contain; padding: 3px; border-radius: 10px; }
@media (min-width: 700px) { html.side-search .dir-entry { display: none; } } /* iPad: Famous owners is in the ☰ menu */
.ent-pic.is-cutout { background: #fff; box-shadow: inset 0 0 0 1px rgba(17,25,21,.08); }
.ent-pic.is-cutout img { object-fit: contain; padding: 6px; } /* the plane alone, centred on white */
.credits-line { margin: 4px 16px 20px; font-size: 12px; color: var(--ink-3); } .credits-line a { color: var(--cyan-t); }
.emergencies { margin-bottom: 12px; } /* same look as Following */
.fav-menu .menu-link { display: block; padding: 8px 12px 6px; font-size: 12.5px; color: var(--ink-3); text-decoration: none; } .fav-menu .menu-link:hover { color: var(--cyan-t); }
/* iPad: Famous owners, Above me, Airport, Logbook and Alerts along the top of the map, like the round buttons at the bottom */
.map-top { display: none; }
@media (min-width: 700px) {
  html.side-search .side-title .more-btn, html .panel .more-btn { display: none; }
  .map-top { display: flex; gap: 8px; position: fixed; z-index: 1100; top: calc(16px + env(safe-area-inset-top)); left: calc(var(--side-w) + 16px); right: calc(16px + env(safe-area-inset-right)); overflow-x: auto; scrollbar-width: none; }
  .map-top button { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border: 0; border-radius: 100px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer;
    background: color-mix(in srgb, var(--paper) 78%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 2px 10px rgba(28,48,30,.14); }
  .map-top button svg { color: var(--ink-2); }
  .map-top button.is-on { background: var(--ink); color: #fff; } .map-top button.is-on svg { color: #fff; }
}
.hidden-sight { margin-top: 12px; }
/* iPad: Above me top left of the map, Logbook and Airport top right; Alerts is a bell beside "Skywatch" */
.side-alerts { display: none; }
@media (min-width: 700px) {
  .map-top { overflow: visible; } .map-top-gap { flex: 1; }
  html.side-search .side-alerts { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 12px; background: none; color: var(--ink); cursor: pointer; }
  html.side-search .side-alerts:hover { background: var(--paper-2); }
  html.side-search .side-alerts.is-on { background: var(--paper-3); }
}
.hover-tip { position: fixed; z-index: 4000; padding: 5px 10px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 600; white-space: nowrap; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.hover-tip[hidden] { display: none; }
@media (min-width: 700px) { html.side-search .side-history { margin-left: auto; } html.side-search .side-logbook, html.side-search .side-bell { margin-left: 2px; } }
.now-p { font-size: 14px; line-height: 1.5; color: var(--ink-2); margin-top: 6px; }
.now-big.now-mid { font-size: 16px; }
a.now-news { text-decoration: none; color: inherit; }
.odd-flying { margin-bottom: 12px; }
/* Services, Planes and Helicopters: a grey box for each kind */
.type-box { margin-bottom: 12px; }
.type-box[data-box] .happening-h .label { display: inline-flex; align-items: center; gap: 8px; }
.type-box[data-box] .happening-h .label::before { width: 12px; height: 12px; border-radius: 50%; background: var(--bx); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); } /* content set only for the coloured boxes (sky.js) */ /* the box's colour: the same as its planes on the map */
.box-edit-row { display: flex; justify-content: center; margin: 2px 16px 18px; } /* Reorder the Celebrities, Spy… boxes */
.type-box.is-moving { padding-bottom: 8px; } .type-box.is-moving .happening-h { padding-bottom: 0; gap: 8px; } .type-box.is-moving .list:empty { display: none; } .nearby > .type-box:first-child, .nearby > .odd-flying:first-child { margin-top: 8px; }
.type-box .type-count { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.type-box .list-flush .item { padding-left: 10px; padding-right: 12px; }
.type-more { padding: 6px 14px 10px; } .type-empty { margin: 16px; }
.type-box .type-odd { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--amber); } .type-box .type-odd + .type-count { margin-left: 10px; }
.round-btn:disabled { opacity: .35; cursor: default; pointer-events: none; } /* can't zoom any further that way */
#map.far-out .ac:not(.is-sel) .tag { display: none; }
/* Rows in the Services / Commercial boxes: fit inside the box; square picture on the left, height on the right */
.type-box .list-flush .type-row { box-sizing: border-box; width: 100%; max-width: 100%; padding: 12px 12px 12px 2px; gap: 8px; align-items: center; }
.type-row .tx { min-width: 0; }
.type-row .alt { flex-shrink: 0; margin-left: 6px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.ent-pic.is-airline img { object-fit: cover; padding: 0; mix-blend-mode: normal; } /* square airline marks fill the box */
/* Airports tab: markers on the map and the list */
.ap-mark span { display: inline-block; transform: translate(-50%, -50%); padding: 2px 5px; border-radius: 6px; background: #fff; color: var(--ink); font: 700 10.5px/1.2 inherit; letter-spacing: .4px; box-shadow: 0 1px 4px rgba(28,48,30,.25); white-space: nowrap; cursor: pointer; }
.ap-mark.is-large span { padding: 3px 7px; font-size: 12px; background: var(--ink); color: #fff; }
.ent-pic.ap-code { background: #fff; box-shadow: inset 0 0 0 1px rgba(17,25,21,.08); font-weight: 800; font-size: 17px; letter-spacing: .5px; color: var(--ink); }
.ent-pic.ap-code.is-large { background: var(--ink); color: #fff; box-shadow: none; }
.ap-row .ent-name { display: none; } .ap-row .alt { font-size: 22px; color: var(--ink-3); }
.ap-back { display: block; margin: 0 0 8px; padding: 0; font-size: 13px; font-weight: 700; letter-spacing: .5px; }
/* An airport's arrivals and departures board */
.ap-head h2 { margin-top: 2px; } .ap-head .muted { margin-top: 2px; }
.ap-board-tabs { display: flex; gap: 4px; margin: 12px -8px 2px; } /* the same edges as the board below */
.ap-board-tabs [role=tab] { flex: 1; height: 36px; border: 0; border-radius: 12px; background: none; font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--ink-3); cursor: pointer; }
.ap-board-tabs [role=tab][aria-selected=true] { background: var(--paper-3); color: var(--ink); }
.ap-board .list-flush .ap-flight { box-sizing: border-box; width: 100%; padding: 12px 0 12px 0; gap: 8px; align-items: center; }
.ap-flight .t { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; } .ap-flt { font-size: 14px; font-weight: 600; color: var(--ink-2); margin-left: 4px; }
.ap-status { flex-shrink: 0; padding: 4px 9px; border-radius: 100px; background: #fff; font-size: 12px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.ap-status.is-soon { background: var(--amber-sub, rgba(217,131,0,.14)); color: var(--amber); } .ap-status.is-done { background: rgba(17,25,21,.05); color: var(--ink-3); }
.ap-spot-label { margin: 18px 16px 8px; }
.panel-pad.ap-head { padding-bottom: 10px; } /* 12px from the tabs to the board, like the other gaps */
.ap-back { display: inline-flex; align-items: center; gap: 2px; margin: -6px 0 6px -4px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; cursor: pointer; } /* like the plane page's Back */
.panel-pad.ap-head { padding-top: 12px; }
/* Commercial's status tabs: All, Landing, Taking off, Circling… (scroll sideways when there are many) */
.status-tabs { display: flex; gap: 4px; margin: 8px 16px 12px; overflow-x: auto; scrollbar-width: none; }
.status-tabs::-webkit-scrollbar { display: none; }
.status-tabs [role=tab] { flex: 0 0 auto; height: 34px; padding: 0 12px; border: 0; border-radius: 12px; background: none; font: inherit; font-size: 11.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--ink-3); cursor: pointer; white-space: nowrap; }
.status-tabs [role=tab] b { font-weight: 700; color: var(--ink-4, #9aa39c); margin-left: 3px; }
.status-tabs [role=tab][aria-selected=true] { background: var(--paper-3); color: var(--ink); } .status-tabs [role=tab][aria-selected=true] b { color: var(--ink-3); }
.status-tabs [role=tab].is-odd { color: var(--amber); }
.panel-pad.status-title { padding: 12px 20px 10px; } /* each tab's heading, lined up with "Skywatch" above */
.status-title + .status-tabs { margin-top: 0; }
.ap-list-title { padding-bottom: 12px !important; } /* heading, then the first box */
.panel-pad.ap-head { padding-left: 20px; padding-right: 20px; } /* lined up with "Skywatch" */
.status-title + .type-box, .status-title + #emergencies, .status-title + .type-empty { margin-top: 0; }
.photo.is-type-photo { position: relative; } /* a photo of the type, not this exact plane: the note sits on the picture */
.photo.is-type-photo .type-photo-note { position: absolute; left: 0; right: 0; bottom: 0; display: block !important; padding: 28px 14px 10px; font-size: 12.5px; line-height: 1.35; color: #fff; background: linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0)); text-shadow: 0 1px 2px rgba(0, 0, 0, .5); pointer-events: none; }
.d-thumb.is-type { background: #fff; } .d-thumb.is-type img { object-fit: contain; }

/* The map data credit, small in the corner */
.leaflet-control-attribution { margin: 0 !important; padding: 1px 6px !important; font-size: 10px !important; line-height: 1.5; background: rgba(242, 244, 238, .7) !important; color: #58625b; border-radius: 6px 0 0 0; }
.leaflet-control-attribution a { color: #3f4a43; }
/* A plane's Flight tab: the same 12px between every card (it was 20px above "What it's doing" and 28px below) */
.panel.is-detail #d-live { padding-bottom: 12px; }
.panel.is-detail #panel-content > .tab-cards:not(:last-child) { padding-bottom: 0; }
.panel.is-detail #panel-content > .emergencies { margin-top: 0; }
.ent-pic.is-logo.is-saved img { padding: 0; object-fit: cover; } /* saved logos already sit centred on white */

/* Airports: All / Live feed tabs, and the live camera player */
.ap-list-tabs { margin-top: 12px; }
.ap-feed .label { display: block; margin-bottom: 10px; } .ap-board-tabs-low { margin: 12px 12px 14px; }
.ap-cams { display: flex; gap: 6px; flex-wrap: wrap; }
.ap-cams [role=tab] { border: 0; border-radius: 10px; background: var(--paper-3); color: var(--ink-3); font: inherit; font-size: 12px; font-weight: 700; padding: 8px 12px; cursor: pointer; text-align: left; }
.ap-cams [role=tab][aria-selected=true] { background: var(--ink); color: #fff; }
.ap-player { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 14px; overflow: hidden; background: #0e1512; }
.ap-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ap-cam-tabs { margin: 0 -8px 10px; flex-wrap: wrap; align-items: stretch; } .ap-cam-tabs [role=tab] { flex: 1 1 auto; height: auto; min-height: 36px; padding: 6px 10px; letter-spacing: .3px; }

.ap-cam + .ap-cam { margin-top: 12px; } 

.panel-pad.ap-head { padding-bottom: 18px; } /* a little more room under the Arrivals / Departures tabs */

.ap-live { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--cyan-t); }
.ap-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); animation: blink 1.6s ease-in-out infinite; }
.ap-player { background: var(--night); }
.ap-play { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #fff; cursor: pointer; font: inherit; padding: 12px; background: linear-gradient(160deg, var(--night-2), var(--night)); }
.ap-play-btn { width: 56px; height: 56px; border-radius: 50%; background: var(--cyan); color: var(--ink); display: grid; place-items: center; padding-left: 3px; transition: background .15s, box-shadow .15s; }
.ap-play:hover .ap-play-btn, .ap-play:focus-visible .ap-play-btn { background: var(--cyan-h); box-shadow: 0 0 0 7px var(--cyan-sub); } /* a soft ring round the button only */
.ap-play:focus-visible { outline: 0; }
.ap-play-s { font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: rgba(255,255,255,.75); }
.ap-cam-name { display: block; margin: 0 0 8px; }

/* Camera controls: ours, over the video, so YouTube's hover bar never shows */
.ap-cover { position: absolute; inset: 0; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.ap-cover .ap-play-btn { opacity: 0; transform: scale(.92); transition: opacity .18s, transform .18s; }
.ap-player:hover .ap-cover .ap-play-btn, .ap-player.show-ctl .ap-cover .ap-play-btn, .ap-player.is-paused .ap-cover .ap-play-btn { opacity: 1; transform: none; }
.ap-player.is-paused .ap-cover { background: rgba(21,40,44,.82); } /* also hides YouTube's own "more videos" panel while paused */
.ap-expand { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(21,40,44,.7); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .18s; }
.ap-player:hover .ap-expand, .ap-player.show-ctl .ap-expand { opacity: 1; }
.ap-expand:hover { background: var(--cyan); color: var(--ink); }
@media (hover: none) { .ap-expand { opacity: .85; } }
.ap-modal { position: fixed; inset: 0; z-index: 2000; background: rgba(10,20,22,.94); display: flex; flex-direction: column; }
.ap-modal-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.ap-modal-x { width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 16px; cursor: pointer; }
.ap-modal-x:hover { background: var(--cyan); color: var(--ink); }
.ap-modal-stage { flex: 1; display: grid; place-items: center; padding: 0 14px 24px; }
.ap-modal-video { width: min(100%, calc((100vh - 110px) * 16 / 9)); aspect-ratio: 16 / 9; position: relative; }

.view-note { margin-top: 4px; font-size: 13px; line-height: 1.35; }
.ap-list-title .view-note + .tabs { margin-top: 12px; }
/* Taxiing: a plan of the airport's runways and the path the plane has taxied */
.taxi-plan { margin: 6px 20px 16px; } /* lined up with the text above it, and clear of "More about this flight" below */
.taxi-plan.is-loading { height: 180px; }
.taxi-h { display: flex; flex-direction: column; gap: 3px; margin-bottom: 12px; }
.taxi-h b { font-size: 15px; } .taxi-h span { font-size: 14px; color: var(--ink-2); }
.taxi-plan svg { display: block; width: 100%; height: auto; overflow: visible; } /* on the card itself, like the flying chart */
.taxi-plan .taxi-labels text { font-family: inherit; font-size: 10.5px; font-weight: 700; letter-spacing: 1px; fill: var(--ink-3); paint-order: stroke; stroke: var(--card-tint); stroke-width: 4px; }
.taxi-plan .taxi-speed { font-family: inherit; font-size: 11px; font-weight: 700; letter-spacing: 1px; fill: var(--cyan-t); paint-order: stroke; stroke: var(--card-tint); stroke-width: 5px; } /* the flying chart's label style, with the same grey halo */
.taxi-plan .taxi-plane { filter: drop-shadow(0 0 1px var(--card-tint)) drop-shadow(0 0 3px var(--card-tint)); }
.taxi-legend { display: flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 11px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-3); }
.taxi-legend i { width: 18px; height: 5px; border-radius: 3px; }
.taxi-legend span:first-child { margin-right: 4px; } .taxi-legend span:last-child { margin-left: 4px; }

/* Phone: the same panel as the iPad, in the bottom sheet. The search stays at the top of the map (without the
   plane-type buttons); the sheet has "Skywatch" with Above me, History, My guesses, Logbook and Alerts beside it,
   then Notable / Services / Commercial / Airports, and a Back bar on the other pages. */
@media (max-width: 699px) {
  html.panel-ui #tabs { display: none; }
  html.panel-ui .finder #chips { display: none; }
  html.panel-ui .head-bar { flex-wrap: wrap; }
  html.panel-ui #ftabs { display: flex; gap: 2px; padding: 0; margin: 2px 8px 4px; flex: 1 0 calc(100% - 16px); }
  html.panel-ui #ftabs [role=tab] { flex: 1 1 auto; height: 34px; padding: 0 6px; border: 0; border-radius: 12px; background: none; font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--ink-3); cursor: pointer; white-space: nowrap; }
  html.panel-ui #ftabs [role=tab][aria-selected=true] { background: var(--paper-3); color: var(--ink); }
  html.panel-ui .panel.is-detail #ftabs, html.panel-ui .panel.is-page #ftabs { display: none; }
  html.panel-ui .panel.is-page:not(.is-detail) .page-bar { display: flex; align-items: center; gap: 8px; flex: 1 0 calc(100% - 16px); margin: 2px 8px 4px; min-height: 34px; }
  html.panel-ui .page-bar .back { width: auto; height: 34px; display: inline-flex; align-items: center; gap: 2px; padding: 0 8px 0 0; background: none; color: var(--ink); font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
  html.panel-ui .page-title { font-size: 16px; font-weight: 700; }
  html.panel-ui .side-alerts { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 11px; background: none; color: var(--ink); cursor: pointer; flex-shrink: 0; }
  html.panel-ui .side-alerts svg { width: 19px; height: 19px; }
  html.panel-ui .side-alerts.is-on { background: var(--paper-3); }
  html.panel-ui .side-reorder { margin-left: auto; } /* the reorder button and the ☰ (Settings) at the top right */
  html.panel-ui .side-title { gap: 0; padding-right: 6px; }
}
@media (min-width: 700px) { .side-sky { display: none !important; } } /* iPad: Above me is a button on the map */
/* Guess: press and hold on the map to drop the pin; a ring fills up while you hold */
.guess-hold { position: fixed; z-index: 3000; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(var(--cyan) var(--p, 0%), rgba(34,188,216,.18) 0); -webkit-mask: radial-gradient(circle, transparent 15px, #000 16px); mask: radial-gradient(circle, transparent 15px, #000 16px);
  animation: guess-hold .55s linear forwards; }
@property --p { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
@keyframes guess-hold { to { --p: 100%; } }
#map.is-guess-pick { cursor: crosshair; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
/* Guess: a pin fixed in the middle of the map while you move the map under it; its point marks the spot */
.guess-pin { position: fixed; z-index: 2500; width: 34px; height: 44px; margin: -44px 0 0 -17px; pointer-events: none; filter: drop-shadow(0 3px 4px rgba(0,0,0,.3)); }
.guess-pin::after { content: ''; position: absolute; left: 13px; bottom: -4px; width: 8px; height: 4px; border-radius: 50%; background: rgba(0,0,0,.25); }
.guess-mapbar-btns { display: flex; gap: 6px; flex-shrink: 0; }
/* Past flights: tap one to see its route */
.past-row .go { color: var(--cyan-t); font-size: 13px; font-weight: 700; }
.past-more { display: block; margin: 10px auto 0; }
.past-back { display: inline-block; margin: 0 0 10px; font-weight: 700; }
.past-route { font-size: 19px; margin-bottom: 8px; } .past-route small { font-size: 13px; color: var(--ink-3); }

/* iPhone home-screen app: a black band behind the status bar, and the map below it with rounded top corners on black */
@media (max-width: 699px) {
  html, body, #map, .leaflet-container { background: #000; } /* phones: black behind everything, the map's own background too (iOS 26 can take the status-bar colour from it); the map tiles cover it */
}

/* ---------- motion (motion.js): one spring for everything that moves, as in WhatsNext ---------- */
/* iOS's default "smooth" spring (response .4s, damping .85) as a CSS curve, with a gentle overshoot. */
:root { --spring: linear(0, 0.054, 0.176, 0.323, 0.468, 0.599, 0.708, 0.796, 0.863, 0.912, 0.948, 0.972, 0.987, 0.997, 1.003, 1.005, 1.006, 1.006, 1.005, 1.005, 1.004, 1.003, 1.002, 1.001, 1); --spring-dur: .55s; --ease-out: cubic-bezier(.22, 1, .36, 1); }
@supports not (transition-timing-function: linear(0, 1)) { :root { --spring: var(--ease-out); --spring-dur: .45s; } }
/* Sliding tab pills: two round ends and a stretched middle, moved by transforms only (placed by motion.js) */
.tabs.glide { position: relative; }
.tabs.glide > .ind { position: absolute; left: 0; top: 0; width: 0; height: 34px; z-index: 0; pointer-events: none; visibility: hidden; --pill: var(--paper-3); transition: opacity .2s; }
.tabs.glide > .ind i { position: absolute; top: 0; left: 0; height: 100%; background: var(--pill); }
.tabs.glide > .ind i:nth-child(2) { width: 100px; transform-origin: 0 50%; }
.tabs.glide > [role=tab] { position: relative; z-index: 1; }
html.motion .tabs.glide > [role=tab][aria-selected=true] { background: transparent !important; box-shadow: none !important; } /* the pill is the highlight now */
.panel.is-collapsed #tabs > .ind { opacity: 0; } /* hidden slider: no tab looks chosen */
.panel:is(.is-detail, .is-ship).is-themed .plane-tabs > .ind { --pill: #fff; filter: drop-shadow(0 1px 1.5px rgba(28,48,30,.12)); } /* white on a themed page, as before */
/* The slider moves on a transform (motion.js), so its height and what rides on it change at once underneath */
html.motion .panel { transition: none; }
html.motion .map-float { transition: opacity .2s; }
html.motion .toasts { transition: none; }
html.motion .toast { animation: none; transition: none; }
/* "More about this flight": always there, folded to nothing, and opened on the spring */
.pass-fold-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--spring-dur) var(--spring); }
.pass-fold-body > div { min-height: 0; overflow: hidden; margin: 0 -8px; padding: 0 8px; opacity: 0; transition: opacity .18s ease; }
.pass-fold.is-open .pass-fold-body { grid-template-rows: 1fr; }
.pass-fold.is-open .pass-fold-body > div { opacity: 1; transition: opacity .3s ease .08s; }
.pass-fold .pass-fold-btn { transition: margin-top var(--spring-dur) var(--spring); }

/* Fuel card: a simple gauge, full tanks = the whole width */
.fuel-gauge { height: 8px; margin: 10px 0 4px; border-radius: 8px; background: var(--paper-3); overflow: hidden; }
.fuel-gauge i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #E0A23A, var(--cyan) 40%); }

/* Rare aircraft and flights with a story: the profile card on the flight page */
.sp-lead { margin: 6px 0 10px; color: var(--ink-2); line-height: 1.45; }
.sp-more { margin-top: 10px; }
.sp-more summary { cursor: pointer; font-weight: 700; color: var(--cyan-ink, #1E7F93); list-style: none; padding: 6px 0; }
.sp-more summary::-webkit-details-marker { display: none; }
.sp-more summary::after { content: ' ›'; }
.sp-more[open] summary::after { content: ' ⌄'; }
.sp-more p { margin: 8px 0; line-height: 1.5; color: var(--ink-2); }
.sp-watch { padding: 10px 12px; border-radius: 12px; background: var(--paper-2); }

/* An empty list inside a grey box (e.g. Notable > Emergencies when there are none): lined up with the heading */
.happening .hap-empty { margin: 0; padding: 2px 14px 10px; line-height: 1.45; }

/* Messages: the key to a message's codes, under the original */
.th-key { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 8px 0 2px; font-size: 13px; line-height: 1.35; }
.th-key dt { font-family: ui-monospace, Menlo, monospace; font-weight: 700; color: var(--ink); }
.th-key dd { margin: 0; color: var(--ink-2); }

/* Who's on board, for state aircraft: who might be aboard */
.state-people { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line, rgba(0,0,0,.08)); }
.now-lab-s { margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-3); }
.sp-row { display: grid; gap: 1px; padding: 6px 0; }
.sp-row + .sp-row { border-top: 1px solid var(--line, rgba(0,0,0,.06)); }
.sp-n b { font-weight: 700; color: var(--ink); }
.sp-n span { margin-left: 4px; font-size: 13px; color: var(--ink-3); }
.sp-d { font-size: 13.5px; color: var(--ink-2); line-height: 1.4; }

/* ---------- ships (ships.js) ---------- */
/* On the map: a hull, coloured by what it is; the same meaning colours as the planes where they overlap. */
.sh { background: none; border: 0; color: #1F4E8C; } /* cargo, tankers, ferries: deep sea blue */
.sh svg { display: block; overflow: visible; }
.sh.k-fish { color: #7A5B3A; } .sh.k-service { color: var(--green); } .sh.k-navy { color: var(--amber); }
.sh.k-notable { color: var(--pink); } .sh.k-yacht { color: #B8860B; } .sh.k-alert { color: var(--red); }
.sh.k-leisure { color: #6B5B95; } .sh.k-moored { color: #5F6E63; }
.sh .tag { position: absolute; left: 100%; top: 50%; transform: translate(6px, -50%); padding: 1px 7px; border-radius: 6px; background: rgba(238,240,232,.92); color: var(--ink); font-size: 12px; font-weight: 600; letter-spacing: .3px; white-space: nowrap; pointer-events: none; box-shadow: 0 2px 6px rgba(20,40,25,.15); }
.sh.is-sel::before { content: ''; position: absolute; inset: -7px; border-radius: 50%; background: radial-gradient(circle, #8EE4F2 0%, var(--cyan) 70%); box-shadow: 0 0 0 4px rgba(34,188,216,.25), 0 0 22px var(--cyan-glow); }
.sh.is-sel svg { position: relative; color: var(--ink); }
.sh.is-sel .tag { left: calc(100% + 8px); }
/* The ships button beside zoom: cyan when ships are showing. */
.map-float .round-btn.ship-toggle.is-on { color: var(--cyan-t); }
.map-float .round-btn.ship-toggle:not(.is-on) { color: var(--ink-4); }
/* In the lists: the hull in a tinted square. */
.ent-pic.ship-pic { background: rgba(31,78,140,.12); color: #1F4E8C; }
.ent-pic.ship-pic svg { width: 26px; height: 26px; }
.ent-pic.ship-pic.k-navy { background: var(--amber-sub); color: var(--amber); } .ent-pic.ship-pic.k-alert { background: var(--red-sub); color: var(--red); }
.ent-pic.ship-pic.k-yacht { background: rgba(224,178,58,.2); color: #8A6100; } .ent-pic.ship-pic.k-notable { background: var(--pink-sub); color: var(--pink); }
.ent-pic.ship-pic.k-service { background: var(--green-sub); color: var(--green); } .ent-pic.ship-pic.k-fish { background: rgba(122,91,58,.14); color: #7A5B3A; }
.ent-pic.ship-pic.k-leisure { background: rgba(107,91,149,.14); color: #6B5B95; } .ent-pic.ship-pic.k-moored { background: var(--paper-3); color: #5F6E63; }
/* The ship page */
.ship-page .d-top .back { background: var(--paper-3); width: 38px; height: 38px; }
.ship-page .d-name { padding-right: 0; }
.ship-owner-pill { background: rgba(224,178,58,.22); }
.ship-page .voyage .pass-solo b { font-size: 28px; line-height: 1.05; overflow-wrap: anywhere; }
.ship-page .voyage .pass-route { padding-bottom: 18px; }
.owner-card { display: flex; gap: 14px; align-items: flex-start; }
.owner-card .owner-pic { width: 64px; height: 64px; flex-shrink: 0; border-radius: 14px; object-fit: cover; background: linear-gradient(160deg, #F7E7B5, #E0B23A); display: grid; place-items: center; color: #6A4B00; font-size: 22px; font-weight: 700; }
.owner-card h3 { font-size: 18px; line-height: 1.2; }
.owner-card p { margin-top: 3px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.ship-about { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
/* Skywatch / Seawatch: the app's name is a switch. Seawatch hides the planes and lists ships. */
.brand-switch { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 0; margin: 0; border: 0; border-radius: 10px; background: none; font: inherit; color: inherit; letter-spacing: inherit; cursor: pointer; transition: color .15s; }
.brand-switch .brand-swap { color: var(--ink-4); transition: transform .3s ease, color .15s; }
.brand-switch:hover .brand-swap, .brand-switch:focus-visible .brand-swap { color: var(--cyan-t); }
.brand-switch:active .brand-swap { transform: rotate(180deg); }
html.sea-mode .brand-switch .brand-name { color: #1F4E8C; }
html.sea-mode .brand-switch .brand-swap { color: #1F4E8C; opacity: .6; }
html.sea-mode .leaflet-marker-icon.ac { display: none !important; } /* no planes in Seawatch */
html.sea-mode #chips, html.sea-mode #ships-toggle { display: none !important; } /* the plane filters, and the ships button (ships are always on) */
.port-head { display: flex; align-items: center; gap: 10px; }
.port-head .back { width: 38px; height: 38px; flex-shrink: 0; background: var(--paper-3); }
.port-head h2 { margin: 0; }
/* Ship pictures: a photo, or a drawing of that kind of ship on sky and sea; the flag in the corner. */
.ent-pic.ship-ent { position: relative; background: linear-gradient(#E3EDF1 0 70%, #A9C8D6 70%); }
.ent-pic.ship-ent.is-art .ship-art-svg { width: 100%; height: 100%; display: block; transform: translateY(4%); }
.ent-pic.ship-ent .flag-badge { position: absolute; right: 3px; bottom: 3px; width: 20px; height: 14px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1.5px #fff, 0 1px 3px rgba(0,0,0,.25); }
.ent-pic.ship-ent .flag-badge img { width: 100%; height: 100%; object-fit: cover; }
.flag-img { width: 22px; height: 15px; object-fit: cover; border-radius: 3px; vertical-align: -2px; margin-right: 6px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.ship-photo.is-art { background: linear-gradient(#E3EDF1 0 66%, #A9C8D6 66%); }
.ship-photo.is-art .ship-art-svg { display: block; width: 100%; aspect-ratio: 16 / 8; padding: 6% 10% 0; }
.ship-photo img { aspect-ratio: 16 / 9; }

/* Ships: a famous ship's page takes its owner's look, like a famous plane's (royal, state, celebrity, wealth, military). */
.ship-why { margin: 0; }
.ship-source { font-size: 12px; }

/* ---------- Zoomed-out view (clusters.js): traffic bubbles, special groups, edge chips, quiet card ---------- */
.cl-icon { background: none; border: 0; }
.cl-b { position: relative; display: grid; place-items: center; border-radius: 50%; font-variant-numeric: tabular-nums; }
.cl-b i { position: absolute; inset: calc(var(--h) * -1); border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(34, 188, 216, calc(.10 + var(--d) * .22)) 0%, rgba(34, 188, 216, 0) 70%); }
.cl-b::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: rgba(252, 253, 249, .8); -webkit-backdrop-filter: blur(8px) saturate(1.5); backdrop-filter: blur(8px) saturate(1.5); box-shadow: 0 2px 10px rgba(20, 40, 25, .16); }
.cl-b b { position: relative; font-weight: 700; color: var(--ink); line-height: 1; }
.cl-g { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 12.5px; font-variant-numeric: tabular-nums; box-shadow: 0 0 18px var(--glow), 0 2px 8px rgba(0, 0, 0, .2); }
.cl-pop { animation: cl-pop .45s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes cl-pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.cl-canvas { position: absolute; pointer-events: none; }
#cl-edges { position: fixed; inset: 0; pointer-events: none; z-index: 900; }
.cl-edge { position: fixed; pointer-events: auto; display: flex; align-items: center; gap: 6px; padding: 5px 11px 5px 7px; border-radius: 100px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-2, #3B4740);
  transform: translate(-50%, -50%); white-space: nowrap; border: 1px solid rgba(255, 255, 255, .85); background: rgba(250, 252, 247, .78); -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6);
  box-shadow: 0 4px 16px rgba(20, 40, 25, .14); font-variant-numeric: tabular-nums; animation: cl-fade .4s ease both; }
.cl-edge .dot { width: 8px; height: 8px; border-radius: 50%; background: #D23A7C; box-shadow: 0 0 8px rgba(210, 58, 124, .45); }
.cl-edge.is-emerg .dot { background: #E5383B; box-shadow: 0 0 8px rgba(229, 56, 59, .5); }
.cl-edge svg { width: 12px; height: 12px; color: var(--ink-3, #6E7A72); }
@keyframes cl-fade { from { opacity: 0; } to { opacity: 1; } }
#cl-quiet { position: fixed; z-index: 900; transform: translateX(-50%); width: min(320px, calc(100% - 32px)); border-radius: 20px; padding: 12px 16px; border: 1px solid rgba(255, 255, 255, .85);
  background: rgba(250, 252, 247, .82); -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6); box-shadow: 0 6px 24px rgba(20, 40, 25, .16); animation: cl-fade .4s ease both; }
#cl-quiet b { font-size: 15px; } #cl-quiet p { margin: 3px 0 0; font-size: 13px; color: var(--ink-3, #6E7A72); }
#cl-quiet button { font: inherit; font-weight: 700; font-size: 13px; border: 0; background: var(--ink, #15201A); color: #fff; border-radius: 100px; padding: 6px 14px; margin-top: 10px; }

/* zoomed out: the special planes' icons a little smaller, so they don't crowd (the selected one stays full size) */
/* Zoomed out: each special plane on a small white disc so it stands out on land or sea; when only a few are on the
   map (a kind picked: Leaders, Police…) a bit bigger, with its name. */
#map.cl-on .leaflet-marker-icon.ac:not(.is-sel)::before { content: ''; position: absolute; left: 50%; top: 50%; width: calc(100% + 12px); height: calc(100% + 12px); transform: translate(-50%, -50%); border-radius: 50%; background: rgba(255,255,255,.9); box-shadow: 0 1px 6px rgba(20,40,25,.3); z-index: -1; pointer-events: none; }
#map.cl-few .ac:not(.is-sel) svg { scale: 1.3; }
#map.cl-few .leaflet-marker-icon.ac:not(.is-sel)::before { width: calc(130% + 14px); height: calc(130% + 14px); }
#map.cl-few.far-out .ac:not(.is-sel) .tag, #map.cl-few .ac:not(.is-sel) .tag { display: block; left: calc(100% + 6px); }

/* Lists cover the whole world: 20 per group, then "Show 20 more" */
.type-more-btn { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 11px; border: 0; border-top: 1px solid var(--line, rgba(0,0,0,.07)); background: none;
  font: inherit; font-weight: 700; font-size: 14px; color: var(--cyan-t, #1F7F92); cursor: pointer; }
.type-more-btn span { font-weight: 600; color: var(--ink-3); }
/* The map shows every plane on every tab: the ones that don't match the tab are faded */
.leaflet-marker-icon.is-dim { opacity: .38; filter: saturate(.4); }

/* Settings (☰): the old top icons as rows */
.settings { padding: 6px 0 20px; } .settings .set-row { display: flex; margin-bottom: 10px; }
@media (min-width: 700px) { html.side-search .settings .dir-entry { display: flex; } }
/* List pages: every box can be moved (Reorder at the top): the order is set on each box with CSS order */
#panel-content > .nearby { display: flex; flex-direction: column; }
#panel-content > .nearby > *, #panel-content > .nearby > :is(#happening, #following, #emergencies) > * { order: 900; flex: none; } /* flex: none: the status row's own flex size is for its width, not its height */
#panel-content > .nearby > :is(.panel-pad, .status-title, #kind-tabs, #status-tabs) { order: 0; }
.status-title .kind-tabs { margin: 8px -4px 6px; } /* Services: the kind row, under the heading */
#panel-content > .nearby > :is(#happening, #following, #emergencies) { display: contents; }
.box-move { display: inline-flex; gap: 6px; margin-left: 10px; } .happening-h .box-move:first-of-type { margin-left: auto; } .happening-h .type-count + .box-move { margin-left: 10px; }
html.box-moving #panel-content [data-box] > .list { display: none; } html.box-moving #panel-content [data-box] { padding-bottom: 8px; } html.box-moving #panel-content [data-box] .happening-h { padding-bottom: 0; }
html.panel-ui .side-reorder.is-on { background: var(--paper-3); }
.side-title .side-reorder { margin-left: auto !important; } .side-title .side-menu { margin-left: 2px; } /* reorder and ☰ (Settings): top right on phone and iPad */

/* The sentence under each heading, and the menus its underlined parts open */
.status-title .sentence { margin: 4px 0 6px; font-size: 17px; line-height: 2.25; /* room between the lines so a dropdown on one never touches the next */ font-weight: 500; color: var(--ink-2); }
.sentence .pick { display: inline-flex; align-items: center; gap: 6px; margin: 0 1px; padding: 0 10px; height: 30px; border: 0; border-radius: 10px; background: var(--paper-3); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; vertical-align: baseline; white-space: nowrap; }
.sentence .pick::after { content: ''; width: 7px; height: 7px; margin: -3px 0 0 2px; border: solid var(--ink-3); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.sentence .pick:hover { background: var(--line); }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.pick-menu { position: fixed; z-index: 3000; min-width: 220px; max-width: calc(100vw - 16px); overflow-y: auto; padding: 6px; border-radius: 18px; background: #fff; box-shadow: 0 12px 40px rgba(17,25,21,.22); }
.pick-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer; }
.pick-menu button:hover { background: var(--paper-2); }
.pick-menu button small { margin-left: auto; color: var(--ink-3); font-weight: 600; }
.pick-menu button[aria-checked=true] { color: var(--cyan-t); } .pick-menu button[aria-checked=true] small::after { content: ' ✓'; color: var(--cyan-t); }

/* The top tabs (All, Notable, Services…) are now the first part of the sentence; Seawatch still uses them for its own pages */
#ftabs { display: none !important; } /* the sentence's dropdowns replace the old tab row everywhere, ships too */
.pick-menu button.is-head { font-weight: 700; }
.pick-menu button.is-head:not(:first-child) { margin-top: 6px; border-top: 1px solid var(--paper-3); border-radius: 0 0 12px 12px; padding-top: 12px; }
.pick-menu button.is-sub { padding: 7px 12px 7px 22px; font-size: 14.5px; font-weight: 500; }
.pick-menu button.is-zero { color: var(--ink-4); } .pick-menu button.is-zero .sw { opacity: .45; } /* a kind with nothing flying right now */
.happening.emergencies .happening-h .label { display: inline-flex; align-items: center; gap: 8px; } .happening.emergencies .happening-h .label::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); } /* Emergencies' colour, like the other boxes */

/* Bubbles in the kind colours: one kind fills the bubble (patterns too); a mix has a ring split by the kinds inside */
.cl-g.cl-one { text-shadow: 0 0 3px rgba(0,0,0,.75), 0 0 1px #000; box-shadow: 0 0 0 2px #fff, 0 0 18px var(--glow), 0 2px 8px rgba(0,0,0,.2); }
.cl-g.cl-ring { position: relative; }
.cl-g.cl-ring::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; background: var(--ring); z-index: -1; }

/* Settings: how fresh the data is */
.fresh-box { margin: 4px 16px 14px; } .fresh-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; font-size: 14px; border-top: 1px solid var(--line); }
.fresh-row:first-of-type { border-top: 0; } .fresh-row b { font-weight: 600; text-align: right; } .fresh-row b.is-ok { color: var(--green); } .fresh-row b.is-warn { color: var(--amber); }
.status-title .data-note { margin: -2px 0 6px; font-size: 13px; }

/* The emergency log */
.emerg-row .emerg-outcome b { color: var(--ink); font-weight: 700; } .emerg-row.is-brief { opacity: .6; } .emerg-row.is-open { background: var(--paper-2); }

/* Ship count bubbles (zoomed out): sea blue, so they read apart from the aircraft ones on Everything */
.cl-b.cl-ship::before { background: rgba(226, 238, 250, .88); box-shadow: inset 0 0 0 1.5px rgba(31, 78, 140, .35); }
.cl-b.cl-ship b { color: #1F4E8C; }
.cl-b.cl-ship i { background: radial-gradient(circle, rgba(31, 78, 140, calc(.10 + var(--d) * .2)) 0%, rgba(31, 78, 140, 0) 70%); }

/* An owner's journeys: range switch and a strip of days */
.j-ranges { display: flex; gap: 6px; margin-bottom: 10px; } .j-range { padding: 5px 12px; border: 0; border-radius: 100px; background: var(--paper-2); font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-3); cursor: pointer; } .j-range.is-on { background: var(--ink); color: #fff; }
.j-strip { display: flex; gap: 2px; height: 26px; align-items: stretch; } .j-day { flex: 1; min-width: 2px; border: 0; padding: 0; border-radius: 3px; background: var(--paper-3); cursor: pointer; }
.j-day.has { background: color-mix(in srgb, #0F6B7A calc(35% + var(--c) * 65%), var(--paper-3)); } .j-day.is-on { outline: 2px solid var(--ink); outline-offset: 1px; }
.j-sum { margin-top: 8px; }
#map.journeys-on .leaflet-marker-pane > *, #map.journeys-on .cl-canvas, #map.journeys-on .leaflet-pane[class*=shipgrid] > * { opacity: .22; transition: opacity .3s; } /* an owner's journeys stand out */
.view-row { align-items: center; } .view-row .link-btn { margin: 0; text-align: left; } .view-btn { border: 0; background: none; font-size: 15px; padding: 4px 6px; cursor: pointer; opacity: .45; } .view-btn.is-on { opacity: 1; }
.cl-back { position: fixed; z-index: 1150; padding: 8px 14px; border: 0; border-radius: 100px; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--ink); cursor: pointer; background: color-mix(in srgb, var(--paper) 85%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 2px 10px rgba(28,48,30,.18); } /* step the map back out after tapping into bubbles */
/* Bubbles splitting as you zoom in: from where their parent was, out to their own place, on the spring */
.cl-from { animation: cl-from var(--spring-dur) var(--spring) both; }
@keyframes cl-from { from { transform: translate(var(--fx), var(--fy)) scale(.7); opacity: .5; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cl-from, .cl-pop { animation: none; } }

/* ---------- Badge stacks and the bar over the map (stacks.js) ---------- */
.ac.st-hidden, .sh.st-hidden, .ord.st-hidden { visibility: hidden !important; }
html.uni-on .cl-b, html.uni-on .cl-g, html.uni-on .cl-canvas, html.uni-ships .cl-b.cl-ship { display: none !important; }
html.uni-ships #map .leaflet-marker-icon.sh:not(.uni):not(.is-sel) { display: none !important; }
html.uni-on #map .leaflet-marker-icon.ac:not(.uni):not(.is-sel), html.uni-on #map .leaflet-marker-icon.sh:not(.uni):not(.is-sel) { display: none !important; }
.leaflet-marker-icon.ord { background: none; border: 0; } .leaflet-marker-icon.ord svg { display: block; overflow: visible; }
.leaflet-marker-icon.ord.st-front::before, .leaflet-marker-icon.sh.st-front::before { content: ''; position: absolute; left: 50%; top: 50%; width: calc(100% + 12px); height: calc(100% + 12px); transform: translate(-50%, -50%); border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: 0 1px 6px rgba(20,40,25,.3); z-index: -1; pointer-events: none; }
.leaflet-marker-icon.sh.st-front .tag { left: calc(100% + 10px); }
#map.cl-on .leaflet-marker-icon.ac:not(.is-sel)::before { width: calc(100% + 8px) !important; height: calc(100% + 8px) !important; }
.st-n { position: absolute; right: -14px; top: -10px; min-width: 20px; height: 18px; padding: 0 5px; border-radius: 100px; background: #23332B; color: #fff; font: 700 11px/18px var(--font); text-align: center; box-shadow: 0 0 0 2px #fff; z-index: 3; pointer-events: none; }
#map-bar { position: fixed; z-index: 1150; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 6px 0 12px; border-radius: 100px; background: rgba(250,252,247,.9); -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5); box-shadow: 0 4px 16px rgba(20,40,25,.16); font: 600 12px var(--font); color: var(--ink-2); white-space: nowrap; }
#map-bar > b { font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-3); }
#map-bar .gs-mode, #map-bar .nv-show { display: flex; gap: 2px; padding: 2px; border-radius: 100px; background: var(--paper-3); flex-shrink: 0; }
#map-bar .gs-mode button, #map-bar .nv-show button { border: 0; background: none; font: inherit; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 100px; color: var(--ink-3); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
#map-bar .gs-mode button[aria-pressed=true], #map-bar .nv-show button[aria-pressed=true] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
#map-bar .nv-show svg { width: 13px; height: 13px; }
#map-bar input { flex: 1; min-width: 70px; width: 140px; accent-color: var(--cyan); margin: 0; }
#map-bar .gs-what { font-size: 12px; font-weight: 700; color: var(--ink); padding: 4px 10px; border-radius: 100px; background: #fff; }
#map-bar .gs-what small { font-weight: 600; color: var(--ink-3); margin-left: 4px; }
#map-bar .nv { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
#map-bar .nv-sep { width: 1px; height: 22px; background: var(--line); flex-shrink: 0; }
#map-bar .nv-btn { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border: 0; border-radius: 100px; background: #fff; font: inherit; font-size: 12px; font-weight: 700; color: var(--ink); cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
#map-bar .nv-btn:disabled { opacity: .4; cursor: default; } #map-bar .nv-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
#map-bar .nv-next { display: flex; align-items: center; height: 30px; border-radius: 100px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
#map-bar .nv-next button { border: 0; background: none; width: 28px; height: 30px; font: inherit; font-size: 17px; font-weight: 700; color: var(--ink); cursor: pointer; }
#map-bar .nv-next span { font-size: 11.5px; font-weight: 700; color: #D23A7C; padding: 0 2px; }
#map-bar.fit1 .lbl, #map-bar.fit1 .gs-what small, #map-bar.fit1 > b { display: none; } #map-bar.fit1 .nv-btn { padding: 0 8px; }
#map-bar.fit2 { gap: 6px; padding: 0 4px 0 6px; } #map-bar.fit2 .gs-mode, #map-bar.fit2 .gs-what { display: none; } #map-bar.fit2 .nv-show button { padding: 3px 6px; } #map-bar.fit2 .nv-next span { display: none; } #map-bar.fit2 input { min-width: 50px; width: 80px; }
#nv-menu { position: fixed; z-index: 1160; display: grid; min-width: 190px; padding: 6px; border-radius: 16px; background: rgba(252,253,249,.97); box-shadow: 0 10px 30px rgba(20,40,25,.25); font: 600 13.5px var(--font); }
#nv-menu button { text-align: left; border: 0; background: none; font: inherit; padding: 8px 12px; border-radius: 10px; color: var(--ink); cursor: pointer; } #nv-menu button:hover { background: var(--paper-2); } #nv-menu small { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
#nv-now { position: fixed; z-index: 1150; transform: translateX(-50%); padding: 5px 12px; border-radius: 100px; background: rgba(35,51,43,.9); color: #fff; font: 600 12.5px var(--font); white-space: nowrap; box-shadow: 0 4px 14px rgba(20,40,25,.25); pointer-events: none; transition: opacity .3s; }
#nv-now b { color: #F5A3C7; font-weight: 700; }
