:root {
  --bg: #0b1220;
  --glass: rgba(12, 18, 30, 0.72);
  --glass-2: rgba(20, 28, 44, 0.86);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --fg: #e8edf5;
  --fg-2: #a7b2c4;
  --fg-3: #6f7b8f;
  --accent: #4cc2ff;
  --live: #3ddc84;
  --warn: #ffb547;
  --bad: #ff5a5f;
  --radius: 12px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--fg); font: 13px/1.4 var(--font); -webkit-font-smoothing: antialiased; }
#view { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; touch-action: none; outline: none; }
#labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
/* dragging the map across labels, chips or the toolbar mustn't select their text */
#labels, #top, #next, #compass, #mapwrap, #credits, #ui-show, #uimenu { -webkit-user-select: none; user-select: none; }
button { font: inherit; color: inherit; }
a { color: var(--fg-2); }

/* ---------- labels over aircraft ---------- */
.lbl { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); white-space: nowrap; pointer-events: auto; cursor: pointer;
  font: 600 11px/1.15 var(--font); color: #fff; padding: 3px 6px 3px 6px; border-radius: 6px; background: rgba(10, 14, 24, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); will-change: transform, opacity; }
.lbl small { display: block; font: 500 9.5px/1.2 var(--mono); color: var(--fg-2); }
.lbl::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 1px; height: 5px; background: rgba(255, 255, 255, 0.35); }
.lbl i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }
.lbl.sel { background: rgba(76, 194, 255, 0.28); border-color: rgba(76, 194, 255, 0.8); }
.lbl.sched { opacity: 0.75; font-style: italic; }
.lbl.dim small { display: none; }

/* ---------- loading ---------- */
#loading { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 40%, #13213a 0%, #0b1220 70%); z-index: 50; transition: opacity 0.6s; }
#loading.done { opacity: 0; pointer-events: none; }
.load-card { width: min(360px, 86vw); text-align: center; }
.load-card .brand { font-size: 28px; justify-content: center; margin-bottom: 18px; }
.load-who { font-weight: 600; font-size: 15px; line-height: 1.3; margin: -6px 0 8px; text-wrap: balance; }
.load-step { color: var(--fg-2); font-size: 13px; min-height: 18px; }
.load-step a { color: var(--accent, #4cc2ff); }
.load-bar { margin-top: 12px; height: 3px; background: rgba(255, 255, 255, 0.08); border-radius: 2px; overflow: hidden; }
.load-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #8f7bff); transition: width 0.3s; }

/* ---------- top bar ---------- */
#top { position: fixed; top: 12px; left: 12px; right: 12px; display: flex; align-items: center; gap: 12px; z-index: 10; pointer-events: none; }
#top > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 2px; font: 600 17px/1 var(--font); letter-spacing: 0.06em; color: var(--fg); }
.brand b { font-weight: 800; color: var(--accent); margin-left: 3px; }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--fg-3); margin-right: 8px; }
.brand .dot.live { background: var(--live); box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6); animation: pulse 2s infinite; }
.brand .dot.stale { background: var(--warn); animation: none; }
.brand .dot.down { background: var(--bad); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.5); } 70% { box-shadow: 0 0 0 8px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }
#top > .brand { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 13px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.chip { background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; color: var(--fg-2); font: 500 12px/1 var(--font); white-space: nowrap; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.chip b { color: var(--fg); font-weight: 600; }
.bar { display: flex; gap: 6px; align-items: center; }
.seg { display: flex; align-items: center; gap: 2px; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 3px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; cursor: pointer; color: var(--fg-2); font-weight: 500; }
/* hover styles only where there's a pointer that hovers: a phone keeps :hover on whatever was tapped last, so a button
   stayed lit as if the cursor were on it */
@media (hover: hover) { .seg button:hover:not(:disabled) { color: var(--fg); background: rgba(255, 255, 255, 0.06); } }
.seg button.on { background: rgba(76, 194, 255, 0.18); color: #fff; }
.seg button:disabled { opacity: 0.35; cursor: default; }
.seg button.icon { width: 34px; height: 32px; padding: 0; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
/* the TV button's small screen icon */
#cams button[data-cam="tv"] { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
#cams .cam-ico { width: 15px; height: 15px; flex: none; }
/* TV mode's launch promotion: one flash per device until 17 Nov 2026 (tv.js promo). Temporary: removed with it (LS-060) */
#cams button.tv-promo { position: relative; color: #fff; animation: tv-promo 1.2s ease-in-out 3; }
#cams button.tv-promo::after { content: "New"; position: absolute; top: -9px; right: -7px; padding: 2px 6px; border-radius: 99px; background: var(--accent); color: #06121f; font: 700 10px/1.2 var(--font); letter-spacing: 0.03em; pointer-events: none; animation: tv-promo-tag 6.5s ease forwards; }
@keyframes tv-promo { 0%, 100% { background: transparent; box-shadow: 0 0 0 0 rgba(76, 194, 255, 0); } 50% { background: rgba(76, 194, 255, 0.24); box-shadow: 0 0 0 4px rgba(76, 194, 255, 0.32); } }
@keyframes tv-promo-tag { 0% { opacity: 0; transform: translateY(3px); } 8%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #cams button.tv-promo { animation: none; background: rgba(76, 194, 255, 0.24); } }
/* The regions' launch promotion: one flash per device until 24 Nov 2026 (regionpolicy.js). Temporary: removed with it
   (LS-111). It borrows TV's keyframes above: keep them until both are gone. The tag is ::before, since the menu's
   arrow is the brand's ::after */
#top > .brand.regions-promo { position: relative; border-radius: 10px; animation: tv-promo 1.2s ease-in-out 3; }
#top > .brand.regions-promo::before { content: "New"; position: absolute; top: -9px; right: -7px; padding: 2px 6px; border-radius: 99px; background: var(--accent); color: #06121f; font: 700 10px/1.2 var(--font); letter-spacing: 0.03em; pointer-events: none; animation: tv-promo-tag 6.5s ease forwards; }
@media (prefers-reduced-motion: reduce) { #top > .brand.regions-promo { animation: none; background: rgba(76, 194, 255, 0.24); } }
.seg button.icon svg { width: 18px; height: 18px; }
.seg select { background: transparent; color: var(--fg-2); border: 0; padding: 7px 6px; font: 500 13px var(--font); cursor: pointer; outline: none; max-width: 150px; }
.seg select option { background: #141c2c; color: var(--fg); }
/* the LiveATC link (desktop only: a phone has no room, and an audio tab beside the 3D view is a desktop habit) */
.seg.atc { align-self: stretch; gap: 6px; padding: 0 13px 0 10px; color: var(--fg-2); font: 500 13px var(--font); text-decoration: none; }
@media (hover: hover) { .seg.atc:hover { color: var(--fg); background: rgba(30, 40, 58, 0.85); } }
.seg.atc svg { width: 17px; height: 17px; }
@media (max-width: 820px), (pointer: coarse) { .seg.atc { display: none; } }

/* ---------- panels ---------- */
.panel { position: fixed; z-index: 9; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35); }
.panel.hidden { display: none; }
/* the list, its open button and the card sit below the header however many rows its status chips take (LS-097: at
   1,366 px the chips wrapped to three rows and the count covered the list's search box). --hud-top is the header's
   bottom plus 10 px, measured whenever the header resizes (ui.js placeHud); 66 px is the one-row header's */
#list { left: 12px; top: max(66px, var(--hud-top, 66px)); bottom: 300px; width: 300px; display: flex; flex-direction: column; overflow: hidden; }
.panel-head { padding: 10px; border-bottom: 1px solid var(--line); display: flex; gap: 6px; }
.fold { border: 1px solid var(--line); background: rgba(255,255,255,0.05); color: var(--fg-2); border-radius: 8px; width: 30px; cursor: pointer; font-size: 16px; }
.fold-open { left: 12px; top: max(66px, var(--hud-top, 66px)); width: 30px; height: 40px; cursor: pointer; color: var(--fg-2); font-size: 16px; }
#list.folded { display: none; }
#search { width: 100%; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--fg); font: inherit; outline: none; }
#search:focus { border-color: rgba(76, 194, 255, 0.6); }
.tabs { display: flex; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; border: 0; background: transparent; color: var(--fg-3); padding: 6px 2px; border-radius: 7px; cursor: pointer; font-size: 11.5px; font-weight: 600; }
.tabs button.on { color: var(--fg); background: rgba(255, 255, 255, 0.08); }
.rows { overflow-y: auto; flex: 1; padding: 4px 0; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) transparent; }
.row { display: grid; grid-template-columns: 8px 1fr auto; gap: 9px; align-items: center; padding: 7px 12px; cursor: pointer; border-left: 2px solid transparent; }
@media (hover: hover) { .row:hover { background: rgba(255, 255, 255, 0.04); } }
.row.sel { background: rgba(76, 194, 255, 0.12); border-left-color: var(--accent); }
.row .sw { width: 8px; height: 26px; border-radius: 3px; }
.row .t1 { font-weight: 600; font-size: 13px; color: var(--fg); }
.row .t1 span { font-weight: 500; color: var(--fg-3); font-size: 11.5px; margin-left: 6px; }
.row .t2 { color: var(--fg-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .st { text-align: right; font-size: 11px; color: var(--fg-2); }
.row .st b { display: block; font: 600 12px var(--mono); color: var(--fg); }
.pill { display: inline-block; padding: 2px 7px; border-radius: 999px; font: 600 10.5px/1.3 var(--font); letter-spacing: 0.02em; background: rgba(255, 255, 255, 0.08); color: var(--fg-2); }
.pill.p-PARKED { background: rgba(160, 170, 190, 0.16); }
.pill.p-PUSHBACK, .pill.p-TAXI, .pill.p-HOLD { background: rgba(255, 181, 71, 0.18); color: #ffd28f; }
.pill.p-LINEUP, .pill.p-TAKEOFF, .pill.p-LANDING { background: rgba(255, 90, 95, 0.2); color: #ffb3b5; }
.pill.p-APPROACH, .pill.p-DESCENT { background: rgba(76, 194, 255, 0.18); color: #a9e2ff; }
.pill.p-CLIMB, .pill.p-CRUISE { background: rgba(143, 123, 255, 0.2); color: #cdc3ff; }
.pill.sched { background: rgba(255, 255, 255, 0.05); color: var(--fg-3); font-style: italic; }

#info { right: 12px; top: max(66px, var(--hud-top, 66px)); width: 340px; max-height: calc(100vh - max(66px, var(--hud-top, 66px)) - 54px); overflow-y: auto; padding: 16px 16px 14px; }
/* above the compass: on a window under ~820 px high the card reaches down past it, and its buttons' right end (Share) was under it */
#info { z-index: 10; }
#info .close { position: absolute; top: 8px; right: 10px; border: 0; background: transparent; color: var(--fg-3); font-size: 22px; cursor: pointer; line-height: 1; }
.info-al { display: flex; align-items: center; gap: 10px; }
.info-al .tail { width: 34px; height: 34px; border-radius: 8px; flex: none; }
.info-al h2 { margin: 0; font: 700 20px/1.1 var(--font); }
.info-al .sub { color: var(--fg-2); font-size: 12px; }
.route { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 14px 0 10px; }
.route .ap { font: 700 24px/1 var(--font); }
.route .ap small { display: block; font: 500 11px/1.3 var(--font); color: var(--fg-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route .ap.r { text-align: right; }
.route .arrow { color: var(--fg-3); font-size: 16px; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 10px 0; }
.kv div { background: var(--glass-2); padding: 8px 10px; }
.kv label { display: block; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-3); }
.kv b { font: 600 14px/1.3 var(--mono); color: var(--fg); }
.info-sec { margin-top: 12px; }
.info-sec h3 { margin: 0 0 6px; font: 600 10.5px/1 var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); }
.times { width: 100%; border-collapse: collapse; font-size: 12px; }
.times td { padding: 3px 0; color: var(--fg-2); }
.times td:last-child { text-align: right; font-family: var(--mono); color: var(--fg); }
.note { font-size: 11.5px; color: var(--fg-3); margin-top: 8px; }
.btns { display: flex; gap: 6px; margin-top: 12px; }
button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.btns button { flex: 1; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.05); padding: 8px; border-radius: 8px; cursor: pointer; font-weight: 600; }
@media (hover: hover) { .btns button:hover { background: rgba(255, 255, 255, 0.1); } }
.btns button.on { background: rgba(76, 194, 255, 0.2); border-color: rgba(76, 194, 255, 0.6); }
/* Share (D-053): the card's last button, in the accent colour; the word goes on a phone and when the row is full */
.btns button.share { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: var(--accent); border-color: rgba(76, 194, 255, 0.6); padding: 8px 11px; }
.btns button.share svg { width: 15px; height: 15px; flex: none; }

.env-row { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
.env-row label { color: var(--fg-3); min-width: 54px; }
.env-row input[type=range] { flex: 1; accent-color: var(--accent); }
.env-row select { flex: 1; background: rgba(255,255,255,0.06); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 4px; font: inherit; }
.env-row span { min-width: 54px; text-align: right; font-family: var(--mono); color: var(--fg); }
.env-row input[type=checkbox] { accent-color: var(--accent); margin-right: 10px; }

#credits { position: fixed; left: 12px; right: 12px; bottom: 10px; font-size: 10.5px; color: rgba(220, 228, 240, 0.55); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); z-index: 8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: auto; }
#credits a { color: rgba(220, 228, 240, 0.75); }

@media (max-width: 820px) {
  #top { flex-wrap: wrap; }
  .chips { order: 3; flex-basis: 100%; }
  #chip-count, #chip-time { display: none; }
  #list { top: auto; bottom: 34px; left: 8px; right: 8px; width: auto; height: 34vh; }
  #info { left: 8px; right: 8px; width: auto; top: auto; bottom: 34px; max-height: 50vh; }
  .cams button { padding: 7px 9px; }
}

/* ---------- minimap, compass, next arrivals, toasts, help, debug ---------- */
#mapwrap { left: 12px; bottom: 34px; width: 300px; height: 250px; overflow: hidden; padding: 0; }
#mapwrap.big { left: 50%; top: 50%; bottom: auto; transform: translate(-50%, -50%); width: min(1100px, 92vw); height: min(760px, 82vh); z-index: 20; }
#map { position: absolute; inset: 0; }
#map canvas { display: block; cursor: crosshair; touch-action: none; }
.map-btn { position: absolute; right: 6px; bottom: 6px; z-index: 2; border: 1px solid var(--line-2); background: rgba(12,18,30,0.8); color: var(--fg); border-radius: 7px; width: 28px; height: 26px; cursor: pointer; }
#compass { right: 12px; bottom: 34px; width: 52px; height: 52px; border-radius: 50%; padding: 4px; cursor: pointer; display: grid; place-items: center; }
#compass svg { width: 40px; height: 40px; }
#next { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 8; display: flex; gap: 6px; }
#next.hidden { display: none; }
#next .na { background: var(--glass); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 12px; color: var(--fg-2); white-space: nowrap; }
#next .na b { color: var(--fg); font-weight: 700; margin-right: 6px; }
#next .na span { font-family: var(--mono); color: #a9e2ff; margin-left: 6px; }
@media (hover: hover) { #next .na:hover { border-color: rgba(76, 194, 255, 0.6); } }
#next .title { align-self: center; font: 600 10.5px var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); padding: 0 4px; }
#toast { position: fixed; left: 50%; top: 66px; transform: translateX(-50%); z-index: 30; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
#toast .t { background: rgba(14, 20, 34, 0.92); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 14px; font-size: 13px; color: var(--fg); box-shadow: 0 8px 30px rgba(0,0,0,0.4); pointer-events: auto; display: flex; gap: 10px; align-items: center; animation: tin 0.25s ease-out; }
#toast .t button { border: 1px solid rgba(76, 194, 255, 0.6); background: rgba(76, 194, 255, 0.18); color: #fff; border-radius: 7px; padding: 4px 9px; cursor: pointer; font-weight: 600; }
@keyframes tin { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
/* far from SFO: the Home button pulses (three times) and a bubble under it points at it (ui.js homeHint) */
.seg button.icon.hint { color: #fff; background: rgba(76, 194, 255, 0.22); animation: homepulse 1.6s ease-out 3; }
@keyframes homepulse { 0% { box-shadow: 0 0 0 0 rgba(76, 194, 255, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(76, 194, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(76, 194, 255, 0); } }
.home-hint { position: fixed; z-index: 31; transform: translateX(-50%); background: rgba(14, 20, 34, 0.94); color: var(--fg); border: 1px solid rgba(76, 194, 255, 0.6); border-radius: 9px; padding: 7px 11px; font: 600 12.5px var(--font); white-space: nowrap; cursor: pointer; box-shadow: 0 8px 30px rgba(0,0,0,0.4); animation: tin 0.25s ease-out; }
.home-hint::before { content: ''; position: absolute; left: 50%; top: -6px; width: 10px; height: 10px; transform: translateX(-50%) rotate(45deg); background: rgba(14, 20, 34, 0.94); border-left: 1px solid rgba(76, 194, 255, 0.6); border-top: 1px solid rgba(76, 194, 255, 0.6); }
@media (hover: hover) { .home-hint:hover { border-color: rgba(76, 194, 255, 0.9); } }
#help { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(620px, 92vw); padding: 18px 20px; z-index: 25; }
#help h3 { margin: 0 0 10px; font-size: 15px; }
#help td { padding: 5px 10px 5px 0; vertical-align: top; color: var(--fg-2); font-size: 12.5px; }
#help td:first-child { white-space: nowrap; color: var(--fg); }
#help .gfx { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--fg-2); }
#help .gfx-row { display: flex; align-items: center; gap: 12px; }
#help .gfx b { color: var(--fg); font-size: 13px; }
#help .gfx-row > b { flex: 0 0 88px; }   /* (Graphics, Distances and Temperature: their choices in one column) */
#help .gfx-opts { flex: 0 1 380px; }
#help .gfx p { margin: 7px 0 0; }
#help .gfx-state { color: var(--fg); }
#help .gfx-state.hidden { display: none; }
#help .gfx-state button { border: 1px solid var(--line-2); background: transparent; color: var(--fg); border-radius: 6px; padding: 3px 9px; margin: 3px 0 0 4px; font: inherit; cursor: pointer; }
@media (pointer: coarse) { #help .desk-only { display: none; } }
@media (pointer: fine) { #help .touch-only { display: none; } }
/* a phone: the panel starts at the top and scrolls inside the screen, its × always in reach */
@media (max-width: 820px), (pointer: coarse) {
  #help { top: 10px; transform: translateX(-50%); max-height: calc(100dvh - 20px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-top: 14px; }
  #help .close { position: sticky; top: 0; float: right; margin: -6px -8px 0 8px; width: 40px; height: 40px; font-size: 26px; background: var(--glass); border-radius: 20px; z-index: 1; }
  #help td:first-child { white-space: normal; }
}
#notice { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(360px, 86vw); padding: 22px 20px 16px; z-index: 40; text-align: center; }
#notice .msg { margin: 4px 14px 16px; font-size: 15px; line-height: 1.45; color: var(--fg); }
#notice .acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
#notice .acts button { border: 1px solid rgba(76, 194, 255, 0.6); background: rgba(76, 194, 255, 0.18); color: #fff; border-radius: 9px; padding: 10px 16px; font-weight: 600; font-size: 14px; cursor: pointer; }
#notice .acts button.quiet { border-color: var(--line-2); background: transparent; color: var(--fg-2); }
#help .close, #info .close, #feedback .close, #notice .close { position: absolute; top: 8px; right: 10px; border: 0; background: transparent; color: var(--fg-3); font-size: 22px; cursor: pointer; line-height: 1; }
/* the feedback form (ui.js openFeedback): a card in the middle, at the top on a phone so the keyboard can't cover it */
#feedback { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(500px, 92vw); padding: 18px 20px; z-index: 26; }
#feedback h3 { margin: 0 0 4px; font-size: 15px; }
#feedback .sub { margin: 0 0 12px; font-size: 12.5px; color: var(--fg-2); }
#feedback .note { margin: 12px 0 0; font-size: 11.5px; color: var(--fg-3); }
.fb-kinds, #help .gfx-opts { display: flex; gap: 6px; }
.fb-kinds { margin-bottom: 10px; }
.fb-kinds label, #help .gfx-opts label { position: relative; flex: 1; text-align: center; padding: 7px 0; border: 1px solid var(--line-2); border-radius: 8px; font-size: 13px; color: var(--fg-2); cursor: pointer; }
.fb-kinds input, #help .gfx-opts input { position: absolute; opacity: 0; pointer-events: none; }
.fb-kinds label:has(input:checked), #help .gfx-opts label:has(input:checked) { border-color: rgba(76, 194, 255, 0.7); background: rgba(76, 194, 255, 0.16); color: #fff; }
.fb-kinds label:has(input:focus-visible), #help .gfx-opts label:has(input:focus-visible) { outline: 2px solid rgba(76, 194, 255, 0.7); outline-offset: 1px; }
#fb-text, #fb-email { display: block; width: 100%; box-sizing: border-box; margin-bottom: 8px; padding: 9px 11px; background: rgba(8, 12, 22, 0.6); border: 1px solid var(--line-2); border-radius: 8px; color: var(--fg); font: 13.5px/1.45 var(--font); }
#fb-text { resize: vertical; min-height: 110px; }
#fb-text:focus, #fb-email:focus { outline: none; border-color: rgba(76, 194, 255, 0.7); }
.fb-ctx { display: flex; gap: 8px; align-items: flex-start; margin: 2px 0 12px; font-size: 12px; color: var(--fg-3); cursor: pointer; }
.fb-ctx input { margin: 2px 0 0; }
.fb-row { display: flex; align-items: center; gap: 10px; }
.fb-status { flex: 1; font-size: 12.5px; color: var(--fg-2); }
.fb-status.err { color: #ffb3b5; }
.fb-status.ok { color: #9ff0c0; }
.fb-count { font: 11px var(--mono); color: var(--fg-3); }
#fb-send { border: 1px solid rgba(76, 194, 255, 0.6); background: rgba(76, 194, 255, 0.18); color: #fff; border-radius: 8px; padding: 8px 18px; font-weight: 600; cursor: pointer; }
#fb-send:disabled { opacity: 0.5; cursor: default; }
.fb-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 820px) { #feedback { top: 10px; transform: translateX(-50%); max-height: calc(100vh - 20px); overflow: auto; } }
#debug { right: 74px; bottom: 34px; padding: 10px 12px; width: 330px; font-size: 12px; z-index: 12; }
.dbg-head { font-weight: 700; margin-bottom: 6px; color: #ffd28f; display: flex; justify-content: space-between; }
.dbg-head span { font-weight: 500; color: var(--fg-3); font-family: var(--mono); }
#dbg-stats { margin: 6px 0 0; font: 11px/1.45 var(--mono); color: var(--fg-2); white-space: pre-wrap; max-height: 220px; overflow: auto; }
/* phones: the panel across the screen (it ran 14 px off a 390 px one), its readout taller, for a screenshot (D-196) */
@media (max-width: 820px) { #debug { left: 8px; right: 8px; width: auto; bottom: 28px; } #dbg-stats { max-height: 42vh; } }
.follow-hud { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.row .eta { font: 600 11px var(--mono); color: #a9e2ff; }
@media (max-width: 820px) {
  #mapwrap { width: 46vw; height: 30vh; bottom: auto; top: 110px; left: 8px; }
  #compass { bottom: auto; top: 110px; right: 8px; }
  #next { display: none; }
  .seg select { max-width: 90px; }
  .seg button { padding: 7px 8px; }
}

/* ---------- tucking the interface away: the panels menu, clean view (U), the mini map's fold ---------- */
#uimenu { top: 62px; right: 12px; width: 220px; padding: 8px; z-index: 22; display: flex; flex-direction: column; gap: 2px; }
#uimenu.hidden { display: none; }
#uimenu .ui-clean { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--line-2); background: rgba(76, 194, 255, 0.14); color: #fff; border-radius: 8px; padding: 8px 10px; margin-bottom: 4px; cursor: pointer; font-weight: 600; }
@media (hover: hover) { #uimenu .ui-clean:hover { background: rgba(76, 194, 255, 0.24); } }
#uimenu .ui-share { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.04); color: var(--fg); border-radius: 8px; padding: 8px 10px; margin-bottom: 4px; cursor: pointer; font-weight: 600; }
#uimenu .ui-share svg { width: 15px; height: 15px; color: var(--accent); }
@media (hover: hover) { #uimenu .ui-share:hover { background: rgba(255, 255, 255, 0.09); } }
#uimenu .tg { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 7px; cursor: pointer; color: var(--fg-2); }
@media (hover: hover) { #uimenu .tg:hover { background: rgba(255, 255, 255, 0.06); color: var(--fg); } }
#uimenu .tg input { accent-color: var(--accent); margin: 0; }
#uimenu .tg span { flex: 1; }
#uimenu .tg small { color: var(--fg-3); font-size: 11px; margin-left: 3px; }
#uimenu kbd, #help kbd { font: 500 10.5px/1 var(--mono); color: var(--fg-3); border: 1px solid var(--line-2); border-radius: 4px; padding: 2px 5px; }
#ui-show { top: 12px; right: 12px; z-index: 11; display: flex; align-items: center; gap: 7px; padding: 7px 11px 7px 9px; color: var(--fg-2); cursor: pointer; opacity: 0.55; transition: opacity 0.2s; border-radius: 999px; }
#ui-show:focus-visible { opacity: 1; color: var(--fg); }
@media (hover: hover) { #ui-show:hover { opacity: 1; color: var(--fg); } }
#ui-show svg { width: 17px; height: 17px; }
#ui-show span { font-weight: 600; font-size: 12px; }
#ui-show.hidden, #map-open.hidden { display: none; }
.map-fold { right: 38px; }
#map-open { left: 12px; bottom: 34px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--fg-2); cursor: pointer; padding: 0; }
@media (hover: hover) { #map-open:hover { color: var(--fg); } }
#map-open svg { width: 20px; height: 20px; }
body.hide-map #mapwrap:not(.big) { display: none; }
body.hide-map #list { bottom: 84px; }
body.hide-next #next { display: none; }
body.hide-chips #top .chips { visibility: hidden; }
body.hide-compass #compass { display: none; }
body.clean #top, body.clean #list, body.clean #list-open, body.clean #info, body.clean #next, body.clean #mapwrap:not(.big),
body.clean #compass, body.clean #map-open, body.clean #debug, body.clean #uimenu { display: none !important; }
body.clean #credits { opacity: 0.4; }
.donate-note.hidden, .donate-foot.hidden, .fb-note.hidden, .fb-foot.hidden { display: none; }
#credits .donate-link { color: #7fd0ff; font-weight: 600; text-decoration: none; }   /* a soft tint of the brand's blue */
@media (hover: hover) { #credits .donate-link:hover { text-decoration: underline; } }
/* desktops: the toolbar stays at the top whatever the chips do; one row of chips sits centred on it as before (the
   toolbar 40 px tall, the logo 37, a chip 26), and more rows grow downward beside it. Centred, a three-row header pushed
   the toolbar 25 px down and the eye menu, fixed at 62 px, covered its lower half */
@media (min-width: 1241px) {
  #top { align-items: flex-start; }
  #top > .brand { margin-top: 2px; }
  .chips { margin-top: 7px; }
}
/* narrow desktops and tablets: the status chips get their own row under the toolbar instead of wrapping over the list */
@media (min-width: 821px) and (max-width: 1240px) {
  #top { flex-wrap: wrap; row-gap: 8px; }
  .bar { margin-left: auto; }
  .chips { order: 3; flex-basis: 100%; }
  #list, .fold-open, #info { top: max(100px, var(--hud-top, 100px)); }
}
/* phones: row 1 the brand and the icon buttons, row 2 the cameras, row 3 the status chips (everything stays on screen) */
@media (max-width: 820px) {
  #top { top: 8px; left: 8px; right: 8px; gap: 8px; }
  #top > .brand { order: 1; padding: 8px 11px; font-size: 15px; }
  .bar { display: contents; }
  .bar > .seg:last-child { order: 2; margin-left: auto; }
  #cams { order: 3; flex-basis: 100%; justify-content: space-between; }
  #cams button { flex: 1; padding: 7px 4px; }
  .chips { order: 4; }
  #b-map { display: none; }   /* the mini map has its own full-screen button */
  .seg select { width: 34px; max-width: 34px; padding: 0; color: transparent; cursor: pointer;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-6.5-6.2-6.5-11a6.5 6.5 0 0 1 13 0c0 4.8-6.5 11-6.5 11Z' fill='none' stroke='%23a7b2c4' stroke-width='1.7'/%3E%3Ccircle cx='12' cy='10' r='2.3' fill='none' stroke='%23a7b2c4' stroke-width='1.7'/%3E%3C/svg%3E") center / 18px no-repeat; -webkit-appearance: none; appearance: none; }
  #uimenu { top: 58px; right: 8px; }
  #mapwrap, #compass, #map-open { top: var(--hud-top, 154px); }
  #list-open { top: auto; bottom: 34px; left: 8px; }   /* the list opens from the bottom on phones */
  #map-open { bottom: auto; left: 8px; }
  body.hide-map #list { bottom: 34px; }
}

/* phones: the status chips fold away while an aircraft's card is open (D-154, the user: "the status chips probably
   should collapse when an individual aircraft gets selected"), giving the view a row back; they return when it closes.
   ui.js info() sets body.card-open; the header's new height moves the radar button and the compass up (placeHud) */
@media (max-width: 820px) {
  body.card-open #top .chips { display: none; }
  /* and the flight list folds away while the card is open (D-162, the user's answer to desk card B6: a card opened from
     the list covered its rows); hidden, not folded, so it comes back at the same scroll position and the list's own
     setting is untouched. Desktops keep both */
  body.card-open #list, body.card-open #list-open { visibility: hidden; }
}

/* the live viewer count; with several regions the region's own, and everyone's on a tap or hover (WP8, D-162) */
.chip.hidden { display: none; }
#chip-viewers { position: relative; }
#chip-viewers .live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--live); margin-right: 6px; vertical-align: 1px; box-shadow: 0 0 6px rgba(61, 220, 132, 0.7); }
#chip-viewers.multi { cursor: pointer; }
#chip-viewers .v-pop { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 2; padding: 8px 12px; border-radius: 14px; background: rgba(12, 18, 30, 0.92); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); font: 500 12px/1.3 var(--font); color: var(--fg-2); white-space: nowrap; }
#chip-viewers.flip .v-pop { left: auto; right: 0; }
#chip-viewers.open .v-pop { display: block; }
@media (hover: hover) { #chip-viewers.multi:hover .v-pop { display: block; } }

/* phones: the selected aircraft's card is a short strip (name, route, what it's doing), the rest scrolls inside it;
   its buttons stay pinned at the bottom so Follow and Locate are always one tap away */
@media (max-width: 820px) {
  #info { max-height: min(216px, 38vh); padding: 12px 14px 0; }
  #info .info-al h2 { font-size: 18px; }
  #info .info-al .tail { width: 28px; height: 28px; }
  #info .route { margin: 8px 0 6px; }
  #info .route .ap { font-size: 20px; }
  #info-btns { position: sticky; bottom: 0; z-index: 1; margin: 10px -14px 0; padding: 8px 14px 10px; background: var(--glass-2); border-top: 1px solid var(--line); }
  #info-btns .btns { margin-top: 0; }
  #info-btns .btns + .btns { margin-top: 8px; }
}

/* the loading bar's last step: no measurable progress, so a moving shimmer says it hasn't stalled */
.load-bar i.busy { background: linear-gradient(90deg, var(--accent) 0%, #8f7bff 40%, #c9f0ff 50%, #8f7bff 60%, var(--accent) 100%); background-size: 220% 100%; animation: loadshimmer 1.4s linear infinite; }
@keyframes loadshimmer { from { background-position: 100% 0; } to { background-position: -120% 0; } }

/* fly mode on a touch screen (flypad.js): a thumb stick at the bottom left, climb and descend at the bottom right;
   the bottom panels make room for them while flying */
#flypad.hidden { display: none; }
#fly-stick { position: fixed; z-index: 12; left: calc(18px + env(safe-area-inset-left)); bottom: calc(40px + env(safe-area-inset-bottom)); width: 132px; height: 132px; border-radius: 50%;
  background: radial-gradient(circle, rgba(12, 18, 30, 0.3) 0 40%, rgba(12, 18, 30, 0.6) 41%); border: 1px solid var(--line-2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#fly-stick i { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; pointer-events: none;
  background: rgba(76, 194, 255, 0.28); border: 1.5px solid rgba(76, 194, 255, 0.75); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
#fly-stick.on i { background: rgba(76, 194, 255, 0.46); }
.fly-lift { position: fixed; z-index: 12; right: calc(18px + env(safe-area-inset-right)); bottom: calc(40px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.fly-lift button { width: 60px; height: 60px; padding: 0; border-radius: 50%; display: grid; place-items: center; color: var(--fg); cursor: pointer;
  background: var(--glass); border: 1px solid var(--line-2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.fly-lift button svg { width: 26px; height: 26px; }
.fly-lift button.on { background: rgba(76, 194, 255, 0.32); border-color: rgba(76, 194, 255, 0.75); }
body.flying #list, body.flying #list-open, body.flying #info, body.flying #next { display: none !important; }

/* the next landings, tucked away (the default): a small pill where the strip was; the strip's own – tucks it back */
#next-open { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 8; cursor: pointer; padding: 6px 12px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 999px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font: 600 10.5px var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); }
@media (hover: hover) { #next-open:hover { color: var(--fg); border-color: rgba(76, 194, 255, 0.6); } }
#next-open.hidden { display: none; }
#next .na-fold { align-self: center; width: 26px; height: 26px; padding: 0; border-radius: 50%; cursor: pointer; color: var(--fg-3);
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
@media (hover: hover) { #next .na-fold:hover { color: var(--fg); } }
body.clean #next-open { display: none !important; }
@media (max-width: 820px) { #next-open { display: none !important; } }

/* the selected aircraft's card on a phone: compact by default (flight, route and status, Follow and Locate), expanded
   by tapping it or swiping its handle up (the figures and the details), compact again with the handle. The view's
   centre rises to the middle of the clear area above it (camera.js applyShift). No handle and no states on a desktop */
#info .grab { display: none; }
@media (max-width: 820px) {
  #info .grab { display: block; width: calc(100% + 28px); height: 24px; margin: -12px -14px 0; padding: 0; border: 0; background: transparent; cursor: pointer; touch-action: none; }
  #info .close { top: 0; right: 0; width: 46px; height: 46px; display: grid; place-items: center; z-index: 2; font-size: 26px; }
  #info .grab::before { content: ""; display: block; width: 38px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.3); margin: 9px auto 0; }
  #info.expanded { max-height: min(352px, 46vh); }
  #info.compact { max-height: none; overflow: hidden; }
  #info.compact .info-al { align-items: center; }
  #info.compact .info-al .tail { width: 22px; height: 22px; border-radius: 6px; }
  #info.compact .info-al h2 { font-size: 17px; display: inline; margin: 0; }
  #info.compact .info-al .sub { display: inline; margin-left: 8px; font-size: 12px; }
  #info.compact .route { display: inline-flex; align-items: baseline; gap: 6px; margin: 8px 10px 0 0; vertical-align: middle; }
  #info.compact .route .ap { font-size: 15px; }
  #info.compact .route .ap small { display: none; }
  #info.compact .route .arrow { font-size: 13px; }
  #info.compact .route + div { display: inline; vertical-align: middle; }
  #info.compact .pill { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
  #info.compact .route + div .pill:nth-of-type(n+3) { display: none; }
  #info.compact .kv, #info.compact .info-sec, #info.compact .note, #info.compact .btns + .btns { display: none; }
  #info.compact #info-btns { position: static; }
  #info.compact .close { top: 10px; }
}

/* the support pill (ui.js coffeeTick): one line in the corner by the compass, above the credits on a phone; it fades
   aside when it would be in the way */
#coffee { position: fixed; right: 76px; bottom: 39px; z-index: 12; display: flex; gap: 10px; align-items: center; padding: 7px 7px 7px 12px;
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--fg); font: 600 12.5px/1.3 var(--font); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28); transition: opacity 0.25s, visibility 0.25s; }
#coffee.away { opacity: 0; visibility: hidden; pointer-events: none; }
#coffee .go { padding: 5px 11px; border-radius: 8px; background: rgba(76, 194, 255, 0.2); border: 1px solid rgba(76, 194, 255, 0.6); color: #fff; text-decoration: none; white-space: nowrap; }
@media (hover: hover) { #coffee .go:hover { background: rgba(76, 194, 255, 0.3); } }
#coffee .x { border: 0; background: transparent; color: var(--fg-3); font-size: 18px; line-height: 1; padding: 2px 4px; cursor: pointer; }
body.clean #coffee { display: none; }
@media (max-width: 820px) {
  #coffee { right: 8px; bottom: 30px; max-width: calc(100vw - 64px); padding: 8px 8px 8px 12px; }
  #coffee .x { padding: 7px 9px; margin: -7px -5px -7px -9px; }   /* a finger-sized target */
}

/* ---------- TV mode (director.js): the view to itself, a small pill, a lower third for a few seconds ---------- */
#tv.hidden { display: none; }
body.tv #top, body.tv #list, body.tv #list-open, body.tv #info, body.tv #next, body.tv #next-open, body.tv #mapwrap, body.tv #map-open,
body.tv #compass, body.tv #labels, body.tv #toast, body.tv #coffee, body.tv #uimenu, body.tv #ui-show, body.tv #help, body.tv #flypad,
body.tv .home-hint, body.tv #debug { display: none !important; }
/* TV's aerial: the labels over the aircraft (director.js labels); a touch on one hands the camera back, as anywhere
   (camera.js), rather than picking that aircraft under TV */
body.tv.tv-labels #labels { display: block !important; }
body.tv .lbl { pointer-events: none; }
/* the attribution stays, dimmed as in clean view (DEPLOY.md's checklist, the data sources' terms); Support and Feedback go */
body.tv #credits { opacity: 0.4; }
body.tv #credits .donate-foot, body.tv #credits .fb-foot { display: none !important; }
body.tv #view { cursor: none; }
body.tv.tv-pointer #view { cursor: default; }
#tv-dip { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 13; }
/* the pill and, beside it, Share (D-062: an icon on a phone, "Share" on a desktop; the share sheet or panel for /tv).
   One line, never past the screen's right edge: the hint gives way first (an ellipsis), Share never (D-096) */
#tv-bar { position: fixed; z-index: 14; left: calc(14px + env(safe-area-inset-left)); top: calc(12px + env(safe-area-inset-top)); display: flex; align-items: stretch; gap: 8px;
  max-width: calc(100vw - 28px - env(safe-area-inset-left) - env(safe-area-inset-right)); }
#tv-share { flex: none; display: flex; align-items: center; gap: 6px; padding: 0 11px 0 9px; border-radius: 999px; border: 1px solid var(--line); background: rgba(10, 14, 24, 0.5);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: var(--fg); font: 600 12px/1 var(--font); cursor: pointer; }
#tv-share svg { width: 14px; height: 14px; flex: none; }
@media (hover: hover) { #tv-share:hover { background: rgba(30, 40, 58, 0.85); } }
/* (a phone: the icon alone, in a button wider than it is tall; squeezed by the pill, it was a 16 px sliver) */
@media (max-width: 820px), (pointer: coarse) { #tv-share { padding: 0; width: 40px; justify-content: center; } #tv-share span { display: none; } }
#tv-pill { display: flex; align-items: center; gap: 7px; min-width: 0; overflow: hidden; white-space: nowrap;
  padding: 6px 12px 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(10, 14, 24, 0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: var(--fg-2); font: 500 12px/1 var(--font); cursor: pointer; }
#tv-pill b { flex: none; color: var(--fg); font-weight: 700; letter-spacing: 0.06em; }
#tv-pill .live-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 6px rgba(61, 220, 132, 0.7); }
#tv-pill #tv-clock { flex: none; font-family: var(--mono); font-size: 11.5px; }
#tv-pill #tv-clock::before { content: "· "; color: var(--fg-3); }
#tv-hint { min-width: 0; max-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; opacity: 0; transition: max-width 0.5s, opacity 0.5s; }
#tv-hint.on { max-width: 220px; opacity: 1; }
#tv-hint::before { content: "· "; color: var(--fg-3); }
#tv-lower { position: fixed; z-index: 14; left: calc(24px + env(safe-area-inset-left)); bottom: calc(40px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px;
  padding: 9px 14px 9px 10px; border-radius: 10px; background: rgba(10, 14, 24, 0.62); border: 1px solid rgba(255, 255, 255, 0.12); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(6px); transition: opacity 0.45s, transform 0.45s; pointer-events: none; max-width: calc(100vw - 48px); }
#tv-lower.on { opacity: 1; transform: none; }
#tv-sw { align-self: stretch; width: 5px; border-radius: 2px; background: #9aa3ad; flex: none; }
#tv-l1 { font: 700 16px/1.2 var(--font); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tv-l2 { font: 500 12.5px/1.3 var(--font); color: var(--fg-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tv-tag { align-self: flex-start; font: 700 10px/1 var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: #1b1300; background: #ffc94d; padding: 4px 6px; border-radius: 5px; }
#tv-tag.hidden { display: none; }
/* the notice when TV started by itself (tv.js, D-028): plain to see, two clear choices, gone for a clean view */
#tv-auto { position: fixed; z-index: 15; top: calc(12px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 16px;
  padding: 10px 10px 10px 16px; border-radius: 12px; background: rgba(10, 14, 24, 0.78); border: 1px solid rgba(255, 255, 255, 0.16); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35); color: var(--fg-2); font: 500 12.5px/1.35 var(--font); max-width: calc(100vw - 24px); }
#tv-auto.hidden { display: none; }
#tv-auto .tv-auto-words { display: flex; flex-direction: column; min-width: 0; }
#tv-auto b { color: #fff; font-weight: 700; font-size: 13.5px; }
#tv-auto .tv-auto-btns { display: flex; gap: 8px; flex: none; }
#tv-auto button { font: 600 12.5px/1 var(--font); padding: 9px 13px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.08); color: #fff; cursor: pointer; }
#tv-auto button:hover { background: rgba(255, 255, 255, 0.16); }
#tv-auto #tv-auto-off { background: #fff; color: #0b1020; border-color: #fff; }
#tv-auto #tv-auto-off:hover { background: #e6e9ef; }
body.tv #tv-auto { cursor: default; }
@media (max-width: 820px) {
  #tv-lower { left: calc(12px + env(safe-area-inset-left)); right: calc(12px + env(safe-area-inset-right)); bottom: calc(30px + env(safe-area-inset-bottom)); max-width: none; }   /* (clear of the credits' line) */
  #tv-l1 { font-size: 15px; }
  #tv-auto { top: calc(52px + env(safe-area-inset-top)); left: calc(10px + env(safe-area-inset-left)); right: calc(10px + env(safe-area-inset-right)); transform: none; flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
  #tv-auto .tv-auto-btns button { flex: 1; padding: 11px 12px; }
}
/* a phone's card: Share is an icon beside Following, Locate and Cockpit (the share sheet itself: share.js) */
@media (max-width: 820px) { .btns button.share { padding: 8px 14px; } .btns button.share span { display: none; } .btns button.share svg { width: 17px; height: 17px; } }
