/* ── Totality · España 2026 ─────────────────────────────────────────── */
:root {
  --bg: #070a14;
  --ink: #e8ecf6;
  --ink-2: #9aa3bd;
  --ink-3: #7480a0;
  --gold: #ffd166;
  --gold-hi: #fff3c4;
  --danger: #ff5a4a;
  --ok: #59d99e;
  --glass: rgba(12, 16, 28, 0.74);
  --glass-brd: rgba(255, 255, 255, 0.09);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  --font-d: "Space Grotesk", system-ui, sans-serif;
  --font-b: "Inter", system-ui, sans-serif;
}
.sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-b);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.hidden { display: none !important; }
#map { position: absolute; inset: 0; }
#map canvas { outline: none; }

.glass {
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  border: 1px solid var(--glass-brd);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

/* ── boot progress bar ──────────────────────────────────────────────
   3px hairline above EVERYTHING, fixed to the viewport so nothing on the
   page shifts. The width is the real weighted byte/stage progress of the
   ~20 MB boot payload — never a timer. */
#boot-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200;
  background: rgba(255, 209, 102, 0.09);
  pointer-events: none; overflow: hidden;
  transition: opacity 0.6s ease;
}
#boot-fill {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, rgba(255, 209, 102, 0.45), var(--gold) 62%, var(--gold-hi));
  box-shadow: 0 0 12px rgba(255, 209, 102, 0.5);
  transition: width 0.32s cubic-bezier(.3, .8, .3, 1);
}
/* stages the browser gives no byte events for (atlas image decode, forecast):
   a sheen says "still working" WITHOUT inventing a number */
#boot-bar.indet::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255, 243, 196, 0.55), transparent);
  animation: bootsheen 1.6s linear infinite;
}
@keyframes bootsheen { from { transform: translateX(-110%); } to { transform: translateX(360%); } }
#boot-bar.gone, #boot-pill.gone { opacity: 0; }
#boot-pill {
  position: fixed; top: 72px; left: 20px; z-index: 199;
  padding: 5px 11px; border-radius: 999px;
  font-size: 10.5px; letter-spacing: 0.05em; color: var(--ink-2);
  background: rgba(12, 16, 28, 0.78);
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  pointer-events: none; white-space: nowrap;
  transition: opacity 0.6s ease;
}
#boot-pill b { color: var(--gold-hi); font-weight: 600; margin-left: 5px; }
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  #boot-pill { left: 12px; top: 196px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  #boot-bar.indet::after { animation: none; }
  #boot-fill { transition: none; }
}

/* ── intro veil ─────────────────────────────────────────────────────── */
#veil {
  position: absolute; inset: 0; z-index: 60;
  display: grid; place-items: center;
  background: radial-gradient(120% 90% at 50% 42%,
    rgba(9, 12, 24, 0.72) 0%, rgba(5, 7, 15, 0.94) 62%, #03040a 100%);
  pointer-events: none; /* never a gate — the map is live underneath */
  transition: opacity 0.7s ease, visibility 0.7s;
}
.veil-hint { display: none; }
#hint {
  position: absolute; left: 50%; bottom: 90px; transform: translateX(-50%);
  z-index: 34; padding: 10px 18px; border-radius: 999px;
  font-size: 13px; color: var(--ink); white-space: nowrap;
  transition: opacity 0.8s;
}
#hint.fade { opacity: 0; }
#donate-box {
  margin-top: 16px; padding: 12px 14px; border-radius: 11px;
  background: rgba(255, 209, 102, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.2);
}
#donate-box p { margin: 0; }
#veil.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.veil-inner { text-align: center; animation: rise 1.4s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
.veil-mark { width: 132px; filter: drop-shadow(0 0 34px rgba(255, 209, 102, 0.35)); }
.veil-title {
  font-family: var(--font-d); font-size: clamp(34px, 6vw, 64px);
  font-weight: 700; letter-spacing: 0.14em; margin-top: 18px;
}
.veil-title span { color: var(--gold); padding: 0 0.18em; }
.veil-sub {
  color: var(--ink-2); letter-spacing: 0.34em; font-size: clamp(9px, 1.4vw, 12px);
  margin-top: 12px;
}
.veil-hint {
  margin-top: 46px; color: var(--ink-3); font-size: 11px;
  letter-spacing: 0.3em; text-transform: uppercase;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

/* ── HUD header ─────────────────────────────────────────────────────── */
#hud {
  position: absolute; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 18px 20px; pointer-events: none;
}
#hud > * { pointer-events: auto; }
#brand { display: flex; gap: 13px; align-items: center; }
#brand svg { width: 44px; height: 44px; filter: drop-shadow(0 0 16px rgba(255,209,102,.3)); }
/* ── TOTALITY: THE CORONA BREATHES ───────────────────────────────────
   The brand mark is a live simulation of the selected point's eclipse, and
   #brand gets .totality from updateBrandPhase() for exactly the interval the
   photosphere is fully hidden there — C2 to C3 of a TOTAL eclipse, umbral
   cone, never an annular maximum. That is the one moment the corona is a
   thing you can actually see, so that is the one moment it is drawn as one.

   A slow breath, not a spinner: the ring's own stroke widens and brightens by
   a few percent over three seconds while a soft gold halo swells behind the
   whole mark. Both properties animate on the compositor, and the animation
   stops existing the moment the class comes off — outside totality the mark
   is exactly as static as it has always been. */
@keyframes brand-corona-bloom {
  0%       { stroke-width: 2; opacity: 0; transform: scale(.72); }
  16%      { stroke-width: 4.6; opacity: 1; transform: scale(1.04); }
  32%, 100% { stroke-width: 3.4; opacity: .96; transform: scale(1); }
}
@keyframes brand-halo-breathe {
  0%, 100% { filter: drop-shadow(0 0 16px rgba(255, 209, 102, .3)); }
  50%      { filter: drop-shadow(0 0 26px rgba(255, 235, 180, .62)); }
}
#brand-corona {
  opacity: 0;
  transform: scale(.72);
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity .32s ease, transform .42s cubic-bezier(.2,.8,.25,1);
}
#brand.totality #brand-corona {
  animation: brand-corona-bloom 3.2s ease-out both;
}
#brand.totality svg { animation: brand-halo-breathe 3.2s ease-in-out infinite; }
/* Reduced motion still gets the STATE — a brighter, wider ring and a stronger
   halo — it just does not move. Saying nothing at all would hide real data
   from the reader who asked for stillness. */
@media (prefers-reduced-motion: reduce) {
  #brand.totality #brand-corona,
  #brand.totality svg { animation: none; }
  #brand-corona { transition: none; }
  #brand.totality #brand-corona { stroke: #fff0c0; stroke-width: 4.2; opacity: 1; transform: scale(1); }
  #brand.totality svg { filter: drop-shadow(0 0 24px rgba(255, 235, 180, .55)); }
}
#brand h1 {
  font-family: var(--font-d); font-size: 21px; font-weight: 700;
  letter-spacing: 0.1em;
}
#brand h1 span { color: var(--gold); }
/* bounded so a long header line (e.g. a four-country path plus the
   already-happened marker) wraps inside the brand column instead of
   running underneath the language picker and the countdown */
#brand p {
  color: var(--ink-2); font-size: 11.5px; margin-top: 2px; letter-spacing: 0.05em;
  max-width: min(52vw, 640px);
}
#hud-right { display: flex; gap: 10px; align-items: center; }

/* The eclipse picker + search + three display modes cannot share one line
   with the brand on ordinary laptop widths. Give the selector a deliberate
   second row instead of letting the two HUD flex items overlap (which also
   stole pointer events from the radios). */
@media (min-width: 901px) and (max-width: 1500px) {
  #brand { flex: 0 1 auto; min-width: 0; }
  #hud-right {
    flex: 0 1 calc(100vw - 370px); max-width: calc(100vw - 370px);
    flex-wrap: wrap; justify-content: flex-end; gap: 8px;
  }
  #mode-controls { order: 2; }
}

.pill {
  padding: 9px 14px; border-radius: 999px; font-size: 12.5px;
  background: var(--glass); border: 1px solid var(--glass-brd);
  backdrop-filter: blur(14px); color: var(--ink);
  box-shadow: var(--shadow);
}
button.pill, .chipset button { cursor: pointer; transition: all .18s ease; font-family: var(--font-b); }
.pill.ghost:hover { border-color: rgba(255, 209, 102, 0.5); color: var(--gold-hi); }
#countdown { color: var(--gold-hi); font-weight: 600; }
#countdown b { color: var(--ink-2); font-weight: 500; margin-right: 6px; }

#lang-pick {
  appearance: none; cursor: pointer; padding-right: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239aa3bd' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 10px;
  font-size: 12px; color: var(--ink);
}
#lang-pick option { background: #10141f; color: var(--ink); }

/* ── eclipse picker ─────────────────────────────────────────────────── */
#btn-eclipse {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  white-space: nowrap; font-family: var(--font-b); font-size: 12.5px;
}
#btn-eclipse .be-caret { color: var(--ink-3); font-size: 10px; }
#btn-eclipse[aria-expanded="true"] { border-color: rgba(255, 209, 102, 0.55); color: var(--gold-hi); }
/* FIXED, not absolute: the button is relocated on phones (into the settings
   popover, like the language picker), and a list anchored to it would follow
   it into a 320 px-wide box. Centred and bounded instead, so it reads the
   same wherever it was opened from. */
#eclipse-pop {
  position: fixed; z-index: 70;
  top: 76px; left: 50%; transform: translateX(-50%);
  width: min(430px, calc(100vw - 24px));
  max-height: min(70vh, 560px); max-height: min(70dvh, 560px);
  overscroll-behavior: contain;
  padding: 8px; border-radius: 14px;
  background: rgba(12, 16, 28, 0.96);
  /* two slots, not one scrolling column: the upcoming list scrolls, the
     archive group keeps its own place at the bottom of the card so it cannot
     be pushed below the fold by a long catalogue (see buildEclipsePop) */
  display: flex; flex-direction: column; min-height: 0;
}
#eclipse-pop.hidden { display: none; }
.ep-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ep-past {
  flex: none; max-height: 42vh; overflow-y: auto; overscroll-behavior: contain;
  border-top: 1px solid var(--glass-brd); margin-top: 4px;
}
.ep-group {
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); padding: 10px 10px 5px;
}
.ep-item {
  display: block; width: 100%; text-align: left; cursor: pointer;
  padding: 9px 11px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--ink); font-family: var(--font-b);
}
.ep-item:hover, .ep-item:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 209, 102, 0.4); outline: none;
}
.ep-item[aria-selected="true"] {
  background: rgba(255, 209, 102, 0.1);
  border-color: rgba(255, 209, 102, 0.45);
}
.ep-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ep-date { font-weight: 600; font-size: 13px; }
.ep-type {
  font-size: 10px; letter-spacing: .05em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.07); color: var(--ink-2);
}
.ep-type.t-total { background: rgba(255, 209, 102, 0.16); color: var(--gold-hi); }
.ep-type.t-annular { background: rgba(124, 196, 255, 0.16); color: #9fd0ff; }
.ep-type.t-hybrid { background: rgba(196, 150, 255, 0.16); color: #cbb0ff; }
.ep-dur { font-size: 11px; color: var(--ink-2); margin-left: auto; }
.ep-now { font-size: 10px; color: var(--gold-hi); }
.ep-regions { font-size: 11px; color: var(--ink-3); margin-top: 3px; line-height: 1.35; }
.ep-item.is-past .ep-date, .ep-item.is-past .ep-dur { color: var(--ink-2); }
.ep-arch {
  font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 999px;
  background: rgba(255, 209, 102, 0.12); color: var(--gold-hi);
}
#safety {
  /* THE BOTTOM-LEFT STACK IS MEASURED, NOT GUESSED.
     `bottom` here is only a first-paint fallback. syncBottomStack() in
     js/app.js owns the real value: it walks the bottom-left column from the
     legend upwards — legend → (mobile) archive bar → safety pill → support
     link → 3D hint — measuring each box and writing the next one's `bottom`
     inline. Every member of that column is in the walk, which is the fix for
     the audit finding that the pill sat on top of the archive bar's only
     button: the archive bar was pinned by CSS and the offset routine had
     never heard of it.

     z-index 46 (not the old 31) puts it ABOVE every non-panel overlay: the
     legend (30), the mode chips (30/33), the timeline (34), the anchored
     callout (44). It used to sit UNDER all sorts of furniture, and a safety
     warning that is half-covered reads as dismissed rather than as hidden.
     The two surfaces that legitimately paint over it — the details sheet
     (45, a bottom sheet on a phone) and the fullscreen simulator (65) —
     each carry their OWN point-level note, and app.js hides this pill
     outright while either is up (syncSafetyPillCover) rather than leaving
     half of it showing. */
  position: absolute; left: 20px; bottom: 158px; z-index: 46;
  display: flex; gap: 8px; align-items: center;
  padding: 8px 13px; border-radius: 999px;
  font-size: 11.5px; color: var(--ink-2); opacity: 1;
}
#safety.is-fading { opacity: 0; transition: opacity 1s ease; pointer-events: none; }
/* Visually collapsed after the readable dwell, but deliberately not
   display:none/visibility:hidden: assistive technology can still reach the
   exact warning in the DOM, and the info panel repeats it visibly on tap. */
#safety.is-stowed {
  width: 1px; height: 1px; max-width: 1px; padding: 0; border: 0;
  clip-path: inset(50%); overflow: hidden !important;
  white-space: nowrap !important; border-radius: 0 !important;
  box-shadow: none !important; line-height: 1 !important;
  opacity: 1; pointer-events: none; transform: none;
}
@media (prefers-reduced-motion: reduce) {
  #safety.is-fading { opacity: 1; transition: none; pointer-events: auto; }
}
/* NO `@media (max-width: 900px) { #safety { display: none } }` HERE.
   It used to hide the eye-safety notice on exactly the devices the field
   audience carries, and app.js had to fight it back with an inline
   display:flex. The phone block further down positions the pill instead. */
.p-share {
  display: inline-grid; place-items: center; vertical-align: middle;
  width: 27px; height: 27px; margin-left: 8px; border-radius: 8px;
  border: 1px solid var(--glass-brd); background: rgba(255,255,255,.05);
  color: var(--ink-2); cursor: pointer;
}
.p-share:hover { color: var(--gold-hi); border-color: rgba(255,209,102,.4); }
.p-share svg { width: 13px; height: 13px; }
#safety-inline { color: var(--ink-3); font-size: 10.5px; margin-top: 10px; }
#finder { position: relative; display: flex; gap: 10px; align-items: center; }
#search-cog {
  flex: none; width: 26px; height: 26px; margin-left: 2px;
  border: none; background: transparent; color: var(--ink-3);
  cursor: pointer; display: grid; place-items: center;
}
#search-cog:hover { color: var(--gold-hi); }
#search-cog svg { width: 16px; height: 16px; }
#search-pop {
  position: absolute; top: 46px; left: 0; z-index: 50;
  width: 300px; padding: 13px 14px; border-radius: 12px;
  display: grid; gap: 11px;
}
#search-pop.hidden { display: none; }
#search-pop #trip-controls.nested {
  position: static; width: auto; padding: 0; border: none;
  background: transparent; box-shadow: none; backdrop-filter: none;
}
#btn-cog { font-size: 15px; padding: 6px 12px; }
#settings-pop {
  position: fixed; bottom: calc(64px + env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%); z-index: 60;
  width: min(320px, calc(100vw - 24px)); padding: 14px 16px;
  border-radius: 14px; display: grid; gap: 11px;
  max-height: 62vh; max-height: 62dvh; overflow-y: auto;
  background: rgba(12, 16, 28, 0.94); /* solid enough to read over anything */
}
#settings-pop.hidden { display: none; }
#settings-pop .sp-label { font-size: 11px; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; }
#settings-pop #legend-toggles { border-top: 1px solid var(--glass-brd); padding-top: 11px; margin-top: 0; display: grid !important; gap: 9px; }
#settings-pop #lang-pick { width: 100%; }
.settings-extras { display: grid; gap: 10px; border-top: 1px solid var(--glass-brd); padding-top: 11px; }
#settings-3d-lab {
  display: block; padding: 9px 11px; border: 1px solid rgba(255,209,102,.35);
  border-radius: 9px; background: rgba(255,209,102,.08); color: var(--gold-hi);
  text-align: center; text-decoration: none; font-size: 12px;
}
#settings-3d-lab:focus-visible, #settings-credits summary:focus-visible {
  outline: 2px solid var(--gold-hi); outline-offset: 2px;
}
#settings-credits { color: var(--ink-2); font-size: 11px; }
#settings-credits summary { cursor: pointer; color: var(--ink); padding: 3px 0; }
#map-credits-slot { padding-top: 7px; line-height: 1.5; overflow-wrap: anywhere; }
#map-credits-slot .maplibregl-ctrl-attrib-inner { display: block !important; }
#map-credits-slot a { color: var(--ink-2) !important; }
#search-box { display: flex; align-items: center; gap: 8px; padding: 8px 14px; width: 218px; transition: box-shadow .18s; }
#search-box:focus-within { box-shadow: 0 0 0 1.5px rgba(255, 209, 102, 0.45), var(--shadow); }
#search-box svg { width: 14px; height: 14px; color: var(--ink-3); flex: none; }
#search-box input {
  background: transparent; border: none; outline: none; width: 100%;
  color: var(--ink); font-family: var(--font-b); font-size: 12.5px;
}
#search-box input::placeholder { color: var(--ink-3); }
#btn-locate { display: grid; place-items: center; width: 37px; height: 37px; padding: 0; border-radius: 50%; cursor: pointer; }
#btn-locate svg { width: 17px; height: 17px; }
#btn-locate.busy svg { animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#search-results {
  position: absolute; top: 46px; left: 0; width: 300px; z-index: 50;
  padding: 6px; border-radius: 12px; max-height: 300px; overflow-y: auto;
}
#search-results button {
  display: block; width: 100%; text-align: left; padding: 9px 11px;
  background: transparent; border: none; border-radius: 8px;
  color: var(--ink); font-family: var(--font-b); font-size: 12.5px; cursor: pointer;
}
#search-results button:hover { background: rgba(255, 209, 102, 0.1); }
#search-results button small { display: block; color: var(--ink-3); font-size: 10.5px; margin-top: 1px; }
#search-results .sr-empty { padding: 10px 12px; color: var(--ink-3); font-size: 12px; }

.chipset {
  display: flex; gap: 4px; padding: 4px;
  background: var(--glass); border: 1px solid var(--glass-brd);
  border-radius: 999px; backdrop-filter: blur(14px); box-shadow: var(--shadow);
}
#modes { display: flex; gap: 4px; }
.chipset button {
  border: none; background: transparent; color: var(--ink-2);
  font-size: 12.5px; padding: 6px 13px; border-radius: 999px;
}
.chipset button:hover { color: var(--ink); }
.chipset button:disabled { opacity: 0.38; cursor: default; }
.chipset button:disabled:hover { color: var(--ink-2); }
#btn-3d {
  font-weight: 600; letter-spacing: 0.04em;
}
.chipset button.on {
  background: linear-gradient(180deg, rgba(255,209,102,.22), rgba(255,209,102,.1));
  color: var(--gold-hi);
  box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.35);
}
.chipset button:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 2px;
}

/* ── legend ─────────────────────────────────────────────────────────── */
#legend {
  position: absolute; left: 20px; bottom: 20px; z-index: 30;
  padding: 14px 16px; width: 272px;
}
#legend-title { font-family: var(--font-d); font-size: 13px; font-weight: 600; letter-spacing: .04em; }
#legend-title span { color: var(--ink-3); font-family: var(--font-b); font-weight: 400; font-size: 11px; margin-left: 6px; }
/* the dataset behind the ramp — informational, not a warning, so it keeps the
   subtitle's tone rather than the caveat's amber; unlike #legend-title span it
   is NEVER hidden, on any layout */
#legend-src { color: var(--ink-2); font-family: var(--font-b); font-size: 11px; line-height: 1.3; margin-top: 3px; }
#legend-src.hidden { display: none; }
#legend-ramp { width: 100%; height: 10px; border-radius: 5px; margin-top: 10px; }
#legend-ticks { display: flex; justify-content: space-between; color: var(--ink-2); font-size: 10.5px; margin-top: 5px; }
/* the no-data swatch: the SAME slate the shaders paint unknown sky with
   (gpu-layer.js NO_DATA_RGB 0.505/0.549/0.627 at NO_DATA_A 0.55), so the chip
   on the card and the colour on the map are the one colour */
#legend-nodata { display: flex; align-items: center; gap: 7px; margin-top: 6px; color: var(--ink-2); font-size: 10.5px; }
#legend-nodata.hidden { display: none; }
#legend-nodata i { flex: none; width: 18px; height: 8px; border-radius: 3px; background: rgba(129, 140, 160, .55); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
/* the "what this ramp does not know" line — a caveat, so it is warm-coloured
   and it stays visible on a phone (unlike #legend-title span) */
#legend-note { color: #ffcf8a; font-size: 10.5px; line-height: 1.35; margin-top: 7px; }
#legend-op { display: flex; align-items: center; gap: 9px; margin-top: 9px; color: var(--ink-3); }
#legend-op svg { width: 14px; height: 14px; flex: none; }
#legend-op input { flex: 1; }
#legend-toggles { margin-top: 12px; display: grid; gap: 7px; border-top: 1px solid var(--glass-brd); padding-top: 11px; }
.plan-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid rgba(255,255,255,.05); }
.plan-row .pr-main { flex: 1; min-width: 0; }
.plan-row .pr-name { font-family: var(--font-d); font-size: 13.5px; font-weight: 600; }
.plan-row .pr-sub { color: var(--ink-2); font-size: 11.5px; margin-top: 2px; }
.plan-row .pr-drive { font-family: var(--font-d); font-size: 14px; color: var(--gold-hi); white-space: nowrap; }
.plan-row a, .plan-row button.pr-btn {
  border: 1px solid var(--glass-brd); background: rgba(255,255,255,.04);
  color: var(--ink-2); border-radius: 8px; padding: 5px 9px; font-size: 11px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.plan-row a:hover, .plan-row button.pr-btn:hover { color: var(--gold-hi); border-color: rgba(255,209,102,.4); }
.p-slider { margin-top: 12px; display: grid; gap: 5px; }
.p-slider label { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-2); }
.p-slider label b { color: var(--ink); font-weight: 500; }
#legend-toggles label { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 12px; cursor: pointer; }
#legend-toggles label:hover { color: var(--ink); }
#legend-toggles input { accent-color: var(--gold); width: 13px; height: 13px; }

/* ── cursor card ────────────────────────────────────────────────────── */
#cursor-card {
  position: absolute; z-index: 40; pointer-events: none;
  padding: 10px 13px; min-width: 178px; border-radius: 11px;
  font-size: 12px; line-height: 1.55;
}
#cursor-card .cc-dur { font-family: var(--font-d); font-size: 19px; font-weight: 700; color: var(--gold-hi); }
#cursor-card .cc2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 5px; }
#cursor-card .cc2 b { display: block; font-family: var(--font-d); font-size: 17px; font-weight: 700; line-height: 1.15; }
#cursor-card .cc2 .cc-odds { color: #7cc4ff; }
#cursor-card .cc2 .cc-cov { color: #ffbe70; }
#cursor-card .cc2 span { display: block; color: var(--ink-2); font-size: 9.5px; line-height: 1.3; margin-top: 1px; }
#cursor-card .cc-dim { color: var(--ink-2); }
#cursor-card .cc-warn { color: var(--danger); }
#cursor-card .cc-ok { color: var(--ok); }

/* ── timeline ───────────────────────────────────────────────────────── */
#timeline {
  /* bottom 48px leaves the MapLibre attribution strip fully visible below
     the card (OSM/Mapzen credit is a license requirement, never cover it) */
  position: absolute; right: 20px; bottom: 48px; z-index: 30;
  display: flex; align-items: center; gap: 13px;
  padding: 12px 16px; width: 348px;
}
/* Keep the shared scrubber in the stable part of a desktop map: edge sheets
   may open and close, but the viewport centre never moves. Coarse-pointer
   layouts deliberately keep the existing timeline-inside-legend stack. */
@media (min-width: 901px) and (hover: hover) and (pointer: fine) {
  #timeline {
    left: 50%; right: auto; transform: translateX(-50%);
    /* At the 901 px desktop boundary, preserve at least 8 px from the
       272 px legend; the card reaches its normal 348 px width at 948 px. */
    width: min(348px, calc(100vw - 600px));
  }
}
#tl-play {
  width: 38px; height: 38px; flex: none; border-radius: 50%;
  border: 1px solid rgba(255, 209, 102, 0.4);
  background: linear-gradient(180deg, rgba(255,209,102,.2), rgba(255,209,102,.06));
  color: var(--gold-hi); cursor: pointer; display: grid; place-items: center;
  transition: all .18s;
}
#tl-play:hover { box-shadow: 0 0 18px rgba(255, 209, 102, 0.35); }
#tl-play svg { width: 17px; height: 17px; }
#tl-track { flex: 1; }
#tl-label { font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
#tl-clock { font-family: var(--font-d); font-size: 16px; font-weight: 600; color: var(--gold-hi); width: 66px; text-align: right; }
input[type="range"] {
  width: 100%; appearance: none; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, #2a3350, #4a5578);
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold); margin-top: -5px;
  box-shadow: 0 0 10px rgba(255, 209, 102, 0.6);
}

/* ── site tooltip (map-anchored) ───────────────────────────────────── */
.site-tip {
  position: absolute; z-index: 35; pointer-events: none;
  transform: translate(-50%, calc(-100% - 16px));
  padding: 11px 14px; width: 218px; border-radius: 12px;
}
.site-tip h3 { font-family: var(--font-d); font-size: 14px; font-weight: 600; }
.site-tip .st-region { color: var(--ink-3); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; margin: 1px 0 8px; }
.site-tip .st-rows { display: grid; gap: 3px; font-size: 11.5px; }
.site-tip .st-rows div { display: flex; justify-content: space-between; }
.site-tip .st-rows dt { color: var(--ink-2); }
.site-tip .st-rows dd { font-variant-numeric: tabular-nums; }
.site-tip .st-dur { color: var(--gold-hi); font-weight: 600; }
.site-tip .st-hint { margin-top: 8px; font-size: 10px; color: var(--ink-3); letter-spacing: .05em; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.05em;
}
.badge.ok { background: rgba(89, 217, 158, 0.14); color: var(--ok); box-shadow: inset 0 0 0 1px rgba(89,217,158,.3); }
.badge.warn { background: rgba(255, 170, 80, 0.14); color: #ffbe70; box-shadow: inset 0 0 0 1px rgba(255,170,80,.3); }
.badge.bad { background: rgba(255, 90, 74, 0.15); color: var(--danger); box-shadow: inset 0 0 0 1px rgba(255,90,74,.35); }

/* ── side panel ─────────────────────────────────────────────────────── */
#panel {
  position: absolute; top: 84px; right: 20px; bottom: 20px; z-index: 45;
  width: 400px; max-width: calc(100vw - 40px);
  overflow-y: auto; overscroll-behavior: contain;
  padding: 20px 20px 24px;
  animation: slidein .32s cubic-bezier(.2,.8,.25,1);
}
/* The native attribution remains mirrored in Settings, but its on-map
   control is still a required desktop affordance. Keep both it and the
   timeline below the sheet. */
@media (min-width: 901px) and (hover: hover) and (pointer: fine) {
  #panel { bottom: 48px; }
  body .maplibregl-ctrl-attrib.attribution-relocated { display: block !important; }
}
/* Through 1204 px the centred timeline is within 8 px of the panel's
   horizontal column. End the sheet above it, with at least 11 px of air,
   instead of allowing the higher-z sheet to cover it. The timeline never
   moves. */
@media (min-width: 901px) and (max-width: 1204px) and (hover: hover) and (pointer: fine) {
  #panel { bottom: 132px; }
}
@keyframes slidein { from { opacity: 0; transform: translateX(26px); } }
#panel::-webkit-scrollbar { width: 8px; }
#panel::-webkit-scrollbar-thumb { background: #232c44; border-radius: 4px; }
#panel-close, #about-close {
  position: absolute; top: 12px; right: 14px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--glass-brd); background: rgba(255,255,255,.04);
  color: var(--ink-2); font-size: 17px; cursor: pointer;
}
#panel-close:hover, #about-close:hover { color: var(--ink); border-color: rgba(255,255,255,.25); }
.p-kicker { color: var(--ink-3); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; }
.p-title { font-family: var(--font-d); font-size: 22px; font-weight: 700; margin-top: 3px; }
.p-sub { color: var(--ink-2); font-size: 12px; margin-top: 3px; }
/* ── THE POINT-LEVEL EYE-SAFETY NOTE ──────────────────────────────────
   Rendered inside every surface that describes a point (callout, details
   sheet, fullscreen simulator) from THAT point's own circumstances.

   It is the FIRST block in the surface and it must READ as a medical
   warning, not as another data row — on a phone the details sheet covers
   the global pill, so this is the only eye-safety text on screen and it has
   to be above the fold. Hence: full-width band, its own rule, no truncation
   of any kind (never `nowrap`/`ellipsis` here — a clipped safety sentence is
   the failure this whole architecture exists to prevent). */
.p-safety {
  display: flex; gap: 9px; align-items: flex-start;
  margin: 0 0 12px; padding: 11px 13px; border-radius: 11px;
  font-size: 12.5px; line-height: 1.5;
  background: rgba(255, 209, 102, 0.10);
  box-shadow: inset 0 0 0 1px rgba(255, 209, 102, .32);
  color: var(--ink);
  white-space: normal; overflow: visible; text-overflow: clip;
}
.p-safety.danger {
  background: rgba(255, 90, 74, 0.11);
  box-shadow: inset 0 0 0 1px rgba(255, 90, 74, .42);
}
.p-safety > b { flex: none; font-size: 15px; line-height: 1.25; }
.p-safety.danger > b { color: var(--danger); }
.p-safety .ps-label {
  display: block; font-family: var(--font-d); font-size: 10.5px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
  margin-bottom: 2px;
}
/* Fullscreen safety is an overlay, never part of the stage's size budget. */
#sim-full-safety {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  z-index: 4;
}
#sim-full-safety:empty { display: none; }
#sim-full-safety .p-safety {
  margin: 0;
  width: min(52ch, calc(100vw - 76px));
  max-width: 520px;
  padding: 11px 13px;
  background: rgba(7, 10, 20, .94);
  box-shadow: inset 0 0 0 1px rgba(255, 209, 102, .5), 0 8px 28px rgba(0, 0, 0, .48);
  backdrop-filter: blur(10px);
}
.sim-safety-open {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,209,102,.48);
  background: rgba(7,10,20,.78); color: var(--gold-hi); cursor: pointer;
}
.sim-safety-note {
  position: absolute; left: 0; top: 0;
  width: min(52ch, calc(100vw - 76px));
  cursor: pointer;
  animation: simSafetyFirst 7s both;
}
#sim-full-safety.is-open .sim-safety-note { animation: none; opacity: 1; visibility: visible; }
#sim-full-safety.is-open .sim-safety-open { visibility: hidden; }
@keyframes simSafetyFirst {
  0%, 58% { opacity: 1; visibility: visible; }
  88%, 100% { opacity: 0; visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .sim-safety-note { animation: none; opacity: 0; visibility: hidden; }
  #sim-full-safety.is-open .sim-safety-note { opacity: 1; visibility: visible; }
  .sim-safety-open { display: block; }
}
.p-verdict { margin-top: 14px; padding: 12px 14px; border-radius: 11px; font-size: 12.5px; line-height: 1.5; }
.p-verdict.ok { background: rgba(89, 217, 158, 0.09); box-shadow: inset 0 0 0 1px rgba(89,217,158,.25); }
.p-verdict.warn { background: rgba(255, 170, 80, 0.09); box-shadow: inset 0 0 0 1px rgba(255,170,80,.28); }
.p-verdict.bad { background: rgba(255, 90, 74, 0.09); box-shadow: inset 0 0 0 1px rgba(255,90,74,.3); }
.p-verdict b { font-family: var(--font-d); }
.p-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 16px; }
.p-hero .ph-main { font-family: var(--font-d); font-size: 36px; font-weight: 700; color: var(--gold-hi); }
.p-hero .ph-odds { color: #7cc4ff; }
.p-hero .ph-lbl { color: var(--ink-2); font-size: 11.5px; margin-top: 2px; }
.ph-side { color: var(--ink-3); font-size: 12px; line-height: 1.5; margin-top: 6px; }
.p-times { margin-top: 16px; border-top: 1px solid var(--glass-brd); }
.p-times div { display: flex; justify-content: space-between; padding: 7.5px 2px; border-bottom: 1px solid rgba(255,255,255,.05); font-size: 12.5px; }
.p-times dt { color: var(--ink-2); }
.p-times dd { font-variant-numeric: tabular-nums; }
.p-times .hl dd, .p-times .hl dt { color: var(--gold-hi); font-weight: 600; }
.p-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.p-chip { background: rgba(255,255,255,.045); border: 1px solid var(--glass-brd); border-radius: 9px; padding: 7px 11px; font-size: 11.5px; }
.p-chip b { display: block; font-family: var(--font-d); font-size: 14px; margin-top: 1px; }
.p-note { margin-top: 13px; color: var(--ink-2); font-size: 12px; line-height: 1.6; }
.p-note em { color: var(--ink); font-style: normal; }
.p-section { font-family: var(--font-d); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 20px 0 9px; }
#pano-wrap { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--glass-brd); }
#pano { display: block; width: 100%; }
#pano-busy {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(7, 10, 20, 0.72); font-size: 12px; color: var(--ink-2);
}
.p-scrub { display: flex; align-items: center; gap: 11px; margin-top: 10px; }
.p-scrub button {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  border: 1px solid rgba(255,209,102,.4); color: var(--gold-hi);
  background: rgba(255,209,102,.08); cursor: pointer; display: grid; place-items: center;
}
.p-scrub button svg { width: 13px; height: 13px; }
.p-scrub .ps-clock { font-family: var(--font-d); font-size: 13px; color: var(--gold-hi); width: 62px; text-align: right; }
.p-slider { margin-top: 12px; display: grid; gap: 5px; }
.p-slider label { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-2); }
.p-slider label b { color: var(--ink); font-weight: 500; }

/* ── fullscreen simulation ──────────────────────────────────────────── */
#sim-full {
  position: fixed; inset: 0; z-index: 65;
  width: 100vw; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  background: #04050c;
  animation: simfade .3s ease;
}
@keyframes simfade { from { opacity: 0; } }
#sim-full-bar {
  position: absolute; top: max(10px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right));
  z-index: 5; pointer-events: none;
}
#sim-full-close {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--glass-brd); background: rgba(255,255,255,.05);
  color: var(--ink-2); font-size: 19px; cursor: pointer; pointer-events: auto;
}
#sim-full-close:hover { color: var(--ink); }
#sim-full-stage { flex: 1; min-width: 0; min-height: 0; padding: 0; }
#sim-full-stage canvas { display: block; width: 100%; height: 100%; }
#sim-full-controls {
  flex: 0 0 calc(40px + env(safe-area-inset-bottom));
  height: calc(40px + env(safe-area-inset-bottom));
  padding: 8px max(18px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  width: 100%;
}
#sim-full-controls .p-scrub { margin: 0; }
#sim-full-controls .ps-play, #sim-full-controls .ps-clock, #sim-full-controls .p-note { display: none; }
#pano-expand {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--glass-brd); background: rgba(7,10,20,.65);
  color: var(--ink-2); cursor: pointer; display: grid; place-items: center;
  backdrop-filter: blur(6px);
}
#pano-expand:hover { color: var(--gold-hi); border-color: rgba(255,209,102,.4); }
#pano-expand svg { width: 14px; height: 14px; }

/* ── about modal ────────────────────────────────────────────────────── */
#about {
  position: absolute; inset: 0; z-index: 55;
  display: grid; place-items: center;
  background: rgba(4, 6, 12, 0.72); backdrop-filter: blur(6px);
}
#about-card {
  position: relative; width: min(660px, calc(100vw - 48px));
  max-height: min(78vh, 820px); overflow-y: auto; padding: 28px 30px;
}
/* the dialog itself takes focus on open (focus trap) — no stray outline for
   mouse users, a visible ring for keyboard users */
#about-card:focus { outline: none; }
#about-card:focus-visible { outline: 2px solid rgba(255, 209, 102, 0.55); outline-offset: 2px; }
#about-card h2 { font-family: var(--font-d); font-size: 21px; margin-bottom: 4px; }
#about-card h3 { font-family: var(--font-d); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin: 20px 0 7px; }
#about-card p, #about-card li { color: var(--ink-2); font-size: 13px; line-height: 1.65; }
#about-card ul { padding-left: 18px; }
#about-card table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12px; }
#about-card th { text-align: left; color: var(--ink-3); font-weight: 500; padding: 5px 8px 5px 0; border-bottom: 1px solid var(--glass-brd); }
#about-card td { padding: 5px 8px 5px 0; border-bottom: 1px solid rgba(255,255,255,.04); font-variant-numeric: tabular-nums; }
#about-card td:first-child { color: var(--ink); }

/* ── support ────────────────────────────────────────────────────────
   No #ad-slot rule any more: the box, the loader and web/ads.txt are gone
   and the site carries no advertising.
   `bottom` is a first-paint fallback only — syncBottomStack() measures the
   legend and the safety pill and writes the real one. */
#support { position: absolute; left: 20px; bottom: 240px; z-index: 29; padding: 0; border-radius: 999px; }
#support a { display: block; padding: 8px 14px; color: var(--ink-2); font-size: 12px; text-decoration: none; transition: color .18s; }
#support a:hover { color: var(--gold-hi); }

/* ── maplibre cleanup ───────────────────────────────────────────────── */
.maplibregl-ctrl-attrib {
  background: rgba(7, 10, 20, 0.6) !important; color: var(--ink-3);
  font-size: 10px; border-radius: 8px 0 0 0;
}
.maplibregl-ctrl-attrib a { color: var(--ink-3) !important; }
.maplibregl-ctrl-attrib.attribution-relocated { display: none !important; }
.maplibregl-ctrl-group { background: var(--glass) !important; border-radius: 10px !important; box-shadow: var(--shadow) !important; border: 1px solid var(--glass-brd); }
.maplibregl-ctrl-group button { background: transparent !important; }
.maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(0.82); }

/* ── selection callout (anchored to the exact point) ────────────────── */
#callout {
  position: absolute; z-index: 44; width: 274px; min-height: 255px;
  padding: 12px 14px 12px; border-radius: 13px;
  transform: translate(-50%, calc(-100% - 15px));
}
#callout-arrow {
  position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%);
  width: 16px; height: 8px; overflow: hidden;
}
#callout-arrow::after {
  content: ""; position: absolute; left: 3px; top: -6px;
  width: 11px; height: 11px; transform: rotate(45deg);
  background: var(--glass); border: 1px solid var(--glass-brd);
}
#callout.flip { transform: translate(-50%, 15px); }
#callout.offview { visibility: hidden; }
#callout.flip #callout-arrow { bottom: auto; top: -8px; }
#callout.flip #callout-arrow::after { top: 3px; }
#callout-close {
  position: absolute; top: 6px; right: 8px; width: 26px; height: 26px;
  border-radius: 50%; border: none; background: transparent;
  color: var(--ink-3); font-size: 16px; cursor: pointer;
}
.co-name { font-family: var(--font-d); font-size: 14px; font-weight: 600; padding-right: 20px; }
.co-sub { color: var(--ink-3); font-size: 10.5px; margin-top: 1px; }
.co-hero { display: flex; align-items: baseline; gap: 8px; margin-top: 7px; }
.co-hero b { font-family: var(--font-d); font-size: 24px; color: var(--gold-hi); }
.co-hero span { color: var(--ink-2); font-size: 11px; }
/* duration and viewing-odds side by side, equal size, distinct colors */
.co-hero2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.co-hero2 b { display: block; font-family: var(--font-d); font-size: 23px; font-weight: 700; }
.co-hero2 .ch-dur { color: var(--gold-hi); }
.co-hero2 .ch-odds { color: #7cc4ff; }
.co-hero2 span { color: var(--ink-2); font-size: 10.5px; }
.co-route-out { min-height: 14px; margin-top: 6px; color: #a9d4ff; }
.co-line { color: var(--ink-2); font-size: 11.5px; margin-top: 4px; }
.co-verdict {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px;
  min-height: 25px; margin-top: 6px; color: var(--ink-2); font-size: 11.5px;
}
.co-verdict > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-verdict.ok > span { color: var(--ok); }
.co-verdict.warn > span { color: var(--gold-hi); }
.co-verdict.bad > span { color: var(--danger); }
.co-safety { flex: none; }
#callout-body > .co-safety:not(.expanded) {
  position: absolute; top: 66px; right: 14px; z-index: 1;
}
.co-safety-chip {
  border: 1px solid rgba(255, 90, 74, .48); border-radius: 999px;
  background: rgba(255, 90, 74, .10); color: #ff9b91;
  padding: 3px 7px; font: 600 10px/1.3 var(--font-b); cursor: pointer;
}
/* Visually collapsed, not removed: screen readers retain the complete warning
   in the DOM while the anchored card keeps its compact footprint. */
.co-safety-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.co-safety.expanded {
  flex: 1 0 100%; order: 2; padding: 8px 9px; border-radius: 9px;
  background: rgba(255, 90, 74, .11); box-shadow: inset 0 0 0 1px rgba(255, 90, 74, .42);
}
.co-safety.expanded .co-safety-chip { margin-bottom: 5px; }
.co-safety.expanded .co-safety-text {
  position: static; width: auto; height: auto; margin: 0; overflow: visible;
  clip: auto; white-space: normal; color: var(--ink); font-size: 11.5px; line-height: 1.4;
}
.co-safety.prominent.is-fading { opacity: 0; transition: opacity .7s ease; }
@media (prefers-reduced-motion: reduce) {
  .co-safety.prominent.is-fading { opacity: 1; transition: none; }
}
/* the structures caveat under a "horizon clear" badge — a qualifier on the
   verdict, so it is quieter than the badge and warmer than the body text, and
   it never becomes a second number the reader has to reconcile */
.co-caveat { color: #ffcf8a; font-size: 10.5px; line-height: 1.35; margin-top: 5px; }
.co-actions { display: flex; gap: 8px; margin-top: 10px; }
.co-actions button, .co-actions a {
  flex: 1; text-align: center; padding: 7px 0; border-radius: 9px;
  border: 1px solid rgba(255, 209, 102, 0.35);
  background: rgba(255, 209, 102, 0.1); color: var(--gold-hi);
  font-size: 12px; cursor: pointer; text-decoration: none; font-family: var(--font-b);
}
.co-actions a { border-color: var(--glass-brd); background: rgba(255,255,255,.05); color: var(--ink-2); }

/* ── search modes + travel controls ─────────────────────────────────── */
#search-modes { padding: 3px; flex: none; }
#search-modes button { padding: 5px 11px; font-size: 11.5px; }
#trip-controls {
  position: absolute; top: 46px; left: 0; width: 300px; z-index: 50;
  padding: 13px 14px; border-radius: 12px; display: grid; gap: 9px;
}
#trip-controls label { display: grid; grid-template-columns: 86px 1fr 52px; gap: 8px; align-items: center; font-size: 11px; color: var(--ink-2); }
#trip-controls label b { text-align: right; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
#trip-controls .tc-note { color: var(--ink-3); font-size: 10.5px; }
#trip-go { text-align: center; cursor: pointer; }
#btn-plan { display: none; } /* travel mode in search replaces it */

/* ── mobile-first (most users; any orientation on touch devices) ────── */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  /* the bottom corners live under the legend/modes stack on mobile — park
     the (collapsed) license chip below the search row instead, where it is
     always visible and expandable */
  .maplibregl-ctrl-bottom-right {
    top: calc(238px + env(safe-area-inset-top)); bottom: auto; right: 8px;
  }
  /* In 3D the compact attribution used to float over the middle-right of the
     planet. Keep the required, expandable credit in the actual top-right
     control corner, immediately below the phone's search controls. */
  .map-3d .maplibregl-ctrl-bottom-right {
    top: calc(164px + env(safe-area-inset-top)); bottom: auto; right: 8px;
  }
  .map-3d details.maplibregl-ctrl-attrib.maplibregl-compact {
    min-width: 94px; height: 24px; padding: 0;
    border-radius: 12px;
  }
  .map-3d details.maplibregl-ctrl-attrib.maplibregl-compact::after {
    display: none;
  }
  .map-3d .maplibregl-ctrl-attrib-button {
    width: 94px;
    border-radius: 12px;
    background-image: none;
  }
  .map-3d .maplibregl-ctrl-attrib-button::after {
    content: "Map credits";
    position: absolute; inset: 2px 0 auto;
    text-align: center;
    color: #111; font: 600 11px/20px var(--font-b);
    white-space: nowrap;
  }
  #hud { flex-direction: column; gap: 8px; padding: 10px 12px; pointer-events: none; }
  /* calm top bar: brand + countdown share one contrasting strip */
  #brand {
    gap: 8px; width: 100%;
    background: var(--glass); border: 1px solid var(--glass-brd);
    border-radius: 13px; padding: 7px 11px; box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
  }
  #brand svg { width: 26px; height: 26px; }
  #brand h1 { font-size: 13.5px; letter-spacing: 0.07em; white-space: nowrap; }
  #brand p { display: none; }
  #brand #countdown {
    margin-left: auto; font-size: 10px; padding: 4px 8px;
    background: rgba(255, 209, 102, 0.08);
    border: 1px solid rgba(255, 209, 102, 0.22); box-shadow: none;
  }
  #hud-right { width: 100%; gap: 6px; align-items: center; }
  /* The selected date is the compact top-right control users expect. A small
     grid keeps it and the countdown inside the brand strip at 360 px without
     putting a second picker in Settings. */
  #brand { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; }
  #brand > svg { grid-column: 1; grid-row: 1 / 3; }
  #brand > div { grid-column: 2; grid-row: 1 / 3; min-width: 0; }
  #brand #btn-eclipse {
    grid-column: 3; grid-row: 1; margin-left: auto; max-width: 43vw;
    min-height: 25px; padding: 4px 8px; justify-content: space-between;
  }
  #brand #be-date { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #brand #countdown { grid-column: 3; grid-row: 2; justify-self: end; margin-left: 0; }
  /* A past event's countdown is just the same date again; the date button is
     now the canonical mobile control, so do not print that duplicate line. */
  #brand #countdown.date-only { display: none; }
  #eclipse-pop {
    top: calc(62px + env(safe-area-inset-top)); bottom: auto;
    max-height: calc(100vh - 136px); max-height: calc(100dvh - 136px);
  }
  /* On a phone the row wraps, and `margin-left:auto` then parks the duration
     alone on a line of its own with a gap above it. Let it flow after the
     type badge instead. */
  .ep-dur { margin-left: 0; }
  #btn-about { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; border-radius: 50%; font-size: 14px; }
  #mode-controls {
    position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%);
    z-index: 33; pointer-events: auto; white-space: nowrap;
  }
  #modes button { white-space: nowrap; }
  #btn-about { padding: 7px 10px; font-size: 11px; white-space: nowrap; }
  #finder { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; }
  #search-box { flex: 1; min-width: 0; width: auto; padding: 10px 12px; }
  #search-modes { order: -1; }
  #search-modes button { padding: 9px 14px; font-size: 12px; min-height: 38px; }
  #btn-locate { width: 42px; height: 42px; }
  #btn-about { width: 42px; height: 42px; }
  #modes button { padding: 10px 17px; min-height: 40px; font-size: 13px; }
  #callout-close { width: 34px; height: 34px; font-size: 18px; }
  .co-actions button, .co-actions a { padding: 11px 0; font-size: 13px; }
  #trip-controls { overflow-y: auto; overscroll-behavior: contain; }
  #trip-controls label { min-height: 36px; }
  #trip-go { min-height: 42px; }
  .plan-row .pr-btn, .plan-row a { padding: 9px 13px; min-height: 38px; display: inline-grid; place-items: center; }
  #panel-close { width: 38px; height: 38px; }
  #pano-expand { width: 38px; height: 38px; }
  .p-share { width: 34px; height: 34px; }
  #search-results, #trip-controls { position: fixed; left: 12px; right: 12px; top: 108px; width: auto; max-height: 52vh; }
  #legend { left: 12px; right: 12px; bottom: 64px; width: auto; padding: 9px 12px 8px; }
  #legend-title { font-size: 11.5px; }
  #legend-title span { display: none; }
  /* #legend-src is deliberately NOT hidden here — see index.html */
  #legend-src { font-size: 10px; margin-top: 2px; }
  #legend-ramp { height: 7px; margin-top: 6px; }
  #legend-ticks { font-size: 9px; margin-top: 3px; }
  #legend-note { font-size: 9.5px; margin-top: 5px; }
  #legend-op { margin-top: 6px; }
  #support, .site-tip, #cursor-card { display: none !important; }
  /* the time slider lives INSIDE the legend card: one bottom box, less map covered */
  #legend #timeline {
    position: static; width: auto; margin-top: 9px; padding: 0;
    background: transparent; border: none; box-shadow: none;
    backdrop-filter: none; gap: 9px;
  }
  #tl-label { display: none; }
  #tl-play { width: 30px; height: 30px; flex: none; }
  #tl-clock { font-size: 12.5px; width: 54px; }
  #settings-pop { bottom: calc(64px + env(safe-area-inset-bottom)); }
  /* The glasses warning stays visible on phones — the field audience.
     It WRAPS: the old nowrap/ellipsis pair clipped the filters-at-all-times
     sentence mid-word, and a truncated safety line is not a safety line.
     (app.js used to undo this inline for the strict wording only; now
     neither wording can be cut.) */
  #safety {
    left: 50%; right: auto; bottom: 182px; transform: translateX(-50%);
    max-width: calc(100vw - 24px); white-space: normal; overflow: visible;
    text-overflow: clip; font-size: 10px; padding: 6px 11px; line-height: 1.35;
  }
  #safety.is-stowed { left: 12px; right: auto; transform: none; }
  #panel {
    top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-width: 100%;
    max-height: 86vh; max-height: 86dvh; /* dvh: iOS URL bar never eats the top */
    border-radius: 18px 18px 0 0;
    padding: 8px 16px calc(26px + env(safe-area-inset-bottom));
    animation: sheetup .3s cubic-bezier(.2,.8,.25,1);
  }
  /* the close control must ALWAYS be reachable: sticky inside the sheet */
  #panel-close {
    position: sticky; top: 6px; float: right; margin: 0 0 4px 8px; z-index: 6;
    background: rgba(12, 16, 28, 0.9);
  }
  #mode-controls { bottom: calc(14px + env(safe-area-inset-bottom)); }
  /* keep the map's attribution/info box clear of the chips row */
  .maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left {
    bottom: calc(58px + env(safe-area-inset-bottom));
  }
  #legend { bottom: calc(66px + env(safe-area-inset-bottom)); padding-bottom: 10px; }
  /* first-paint fallback only; syncBottomStack() writes the measured value,
     which on a phone clears the legend AND the archive chip above it */
  #safety { bottom: calc(280px + env(safe-area-inset-bottom)); }
  #search-pop, #trip-controls { position: fixed; left: 12px; right: 12px; top: 118px; width: auto; }
  #search-pop #trip-controls.nested { position: static; left: auto; right: auto; top: auto; }
  #about-card { max-height: 78vh; max-height: 82dvh; }
  @keyframes sheetup { from { transform: translateY(40px); opacity: 0; } }
  .p-title { font-size: 19px; }
  .p-hero .ph-main { font-size: 33px; }
  #sim-full-controls { padding-top: 8px; }
  #callout { width: min(274px, calc(100vw - 28px)); }
  .plan-row { flex-wrap: wrap; gap: 5px 10px; }
  .plan-row .pr-main { flex: 1 1 100%; }
  .plan-row .pr-name { font-size: 13px; }
  #finder[data-mode="trip"] #btn-locate { display: none; }
  #about-card { padding: 20px 18px; }
  .veil-title { letter-spacing: 0.09em; }
}

@media (max-width: 420px) {
  #mode-controls { max-width: calc(100vw - 16px); gap: 2px; padding: 3px; }
  #modes { gap: 2px; min-width: 0; }
  #mode-controls button { padding: 8px 9px; min-height: 38px; font-size: 11px; }
  #btn-cog { width: 36px; padding-left: 6px; padding-right: 6px; }
  /* The translated first-paint title must not establish a page width wider
     than the phone before the veil fades. */
  .veil-inner { width: 100%; max-width: 100vw; padding: 0 12px; overflow: hidden; }
  .veil-title { overflow-wrap: anywhere; }
}

/* route-origin editor (Viaje settings): type a starting address */
#origin-edit { margin-top: 6px; font-size: 12px; padding: 6px 10px; align-self: flex-start; }
#origin-editor { margin-top: 6px; display: flex; flex-direction: column; gap: 6px; }
#origin-editor input {
  background: rgba(255,255,255,.06); border: 1px solid var(--glass-brd);
  border-radius: 8px; padding: 8px 10px; color: var(--ink); font: inherit;
}
#origin-results { display: flex; flex-direction: column; gap: 2px; max-height: 180px; overflow-y: auto; }
#origin-results button {
  text-align: left; background: none; border: none; color: var(--ink);
  padding: 7px 8px; border-radius: 6px; cursor: pointer;
  display: flex; flex-direction: column; font: inherit; font-size: 12.5px;
}
#origin-results button:hover { background: rgba(255,255,255,.07); }
#origin-results small { color: var(--ink-2); font-size: 11px; }

/* ── ARCHIVE MODE ─────────────────────────────────────────────────────
   A past eclipse: the strip below the header states plainly that it is over,
   and opens the model-vs-observed comparison. Nothing here is reachable for a
   future eclipse — app.js never un-hides #archive-bar in that case. */
#archive-bar {
  position: absolute; left: 20px; top: 96px; z-index: 32;
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px 9px 11px; max-width: min(560px, calc(100vw - 40px));
  border-color: rgba(255, 209, 102, 0.28);
}
/* The boot pill ("Loading terrain… 62%") is fixed under the header at
   z-index 199, so while it is up it paints straight over the archive strip —
   and "this eclipse has already happened" is the one line that must not be
   covered. #boot-pill is an earlier body sibling than #archive-bar, so the
   general sibling combinator can duck the strip for exactly as long as the
   pill is visible, and the rule un-applies itself when boot finishes. */
#boot-pill:not(.hidden):not(.gone) ~ #archive-bar { top: 136px; }
#ab-badge {
  flex: none; font-size: 9.5px; font-weight: 700; letter-spacing: .12em;
  padding: 3px 7px; border-radius: 5px;
  color: #1a1405; background: var(--gold);
}
#ab-text { font-size: 12px; color: var(--ink-2); line-height: 1.45; }
#ab-text b { color: var(--ink); font-weight: 600; }
#ab-open { flex: none; font-size: 11.5px; padding: 6px 11px; cursor: pointer; }
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  /* THE ARCHIVE BAR IS A CHIP ON A PHONE, and it joins the bottom stack.
     It used to be a pinned three-line card at bottom:168px, which put it
     straight over the legend's title, source line and colour ramp — the
     provenance line this release added was invisible on the layout most
     visitors use — while the safety pill (bottom:196px) landed on the only
     button it has. Both were audit findings, and both came from the same
     cause: three boxes pinned to three hard-coded offsets that knew nothing
     about each other.

     Now: ONE ROW (badge + headline + button, no wrap), and `bottom` is
     written by syncBottomStack() from the legend's measured top edge. The
     long body sentence is dropped here — it is the first paragraph of the
     card #ab-open opens, so nothing is lost, and one row instead of three is
     what keeps the whole stack on screen in landscape. */
  #archive-bar {
    left: 12px; right: 12px; top: auto; bottom: 236px; max-width: none;
    padding: 7px 9px; gap: 8px; flex-wrap: nowrap;
  }
  /* The boot pill ducks the strip DOWNWARDS on desktop, where the strip is
     top-anchored. On a phone it is bottom-anchored, so that rule's `top`
     applied on top of a `bottom` and the box stretched between the two —
     an 800 px tall glass panel across the whole map for as long as boot ran.
     Same specificity, later in the file, so it wins on phones only. */
  #boot-pill:not(.hidden):not(.gone) ~ #archive-bar { top: auto; }
  #ab-text {
    font-size: 11px; flex: 1 1 auto; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  #ab-body { display: none; }
  #ab-open { flex: none; margin-left: auto; }
}

#archive {
  position: absolute; inset: 0; z-index: 56;
  display: grid; place-items: center;
  background: rgba(4, 6, 12, 0.78); backdrop-filter: blur(6px);
}
#archive-card {
  position: relative; width: min(1000px, calc(100vw - 32px));
  max-height: min(84vh, 900px); overflow-y: auto; padding: 26px 28px;
}
#archive-card:focus { outline: none; }
#archive-card:focus-visible { outline: 2px solid rgba(255, 209, 102, 0.55); outline-offset: 2px; }
#archive-close {
  position: absolute; top: 12px; right: 14px; z-index: 2;
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--glass-brd); background: rgba(255,255,255,.05);
  color: var(--ink-2); font-size: 18px; line-height: 1; cursor: pointer;
}
#archive-close:hover { color: var(--gold-hi); border-color: rgba(255,209,102,.4); }
#archive-card h2 { font-family: var(--font-d); font-size: 20px; margin-bottom: 3px; padding-right: 34px; }
#archive-card h3 {
  font-family: var(--font-d); font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--gold); margin: 22px 0 8px;
}
#archive-card p, #archive-card li { color: var(--ink-2); font-size: 12.5px; line-height: 1.62; }
#archive-card ul { padding-left: 17px; display: grid; gap: 5px; }
#archive-card b { color: var(--ink); }
.ar-sub { color: var(--ink-3); font-size: 12px; margin-bottom: 2px; }
/* the honesty banner: never styled as a footnote */
.ar-caveat {
  margin-top: 12px; padding: 10px 12px; border-radius: 10px;
  background: rgba(255, 209, 102, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.28);
}
.ar-caveat p { color: var(--ink); }
/* the SHORT form of the same honesty banner, for every archive surface
   outside the modal: the station callout, the archive bar, the key row and
   the About panel's pointer. Same amber, small but never grey-on-grey — a
   caveat that reads as a footnote is a caveat nobody reads. */
.ar-caveat-inline {
  margin-top: 7px; padding: 5px 8px; border-radius: 7px;
  font-size: 10.5px; line-height: 1.3; color: var(--ink-2);
  background: rgba(255, 209, 102, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.26);
}
.ar-key .ar-caveat-inline { display: block; margin-top: 8px; }
#ab-text .ar-caveat-inline { display: inline-block; }
.ar-score { display: grid; gap: 7px; margin-top: 4px; }
.ar-score > div {
  padding: 9px 11px; border-radius: 9px;
  background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.ar-score .ar-bad { background: rgba(255, 90, 74, 0.10); box-shadow: inset 0 0 0 1px rgba(255, 90, 74, 0.34); }
.ar-score .ar-ok { background: rgba(89, 217, 158, 0.08); box-shadow: inset 0 0 0 1px rgba(89, 217, 158, 0.22); }
.ar-wrap { overflow-x: auto; margin-top: 8px; }
#archive-card table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 11.5px; }
#archive-card th {
  text-align: left; color: var(--ink-3); font-weight: 500; white-space: nowrap;
  padding: 6px 9px 6px 0; border-bottom: 1px solid var(--glass-brd);
  position: sticky; top: 0; background: rgba(12,16,28,.96);
}
#archive-card td {
  padding: 6px 9px 6px 0; border-bottom: 1px solid rgba(255,255,255,.04);
  font-variant-numeric: tabular-nums; color: var(--ink-2); vertical-align: top;
}
#archive-card td.ar-stn { color: var(--ink); font-weight: 600; white-space: nowrap; }
#archive-card td.ar-metar { font-size: 10.5px; color: var(--ink-3); }
.ar-num { text-align: right; }
.ar-tag {
  display: inline-block; padding: 1px 6px; border-radius: 999px;
  font-size: 10px; letter-spacing: .03em; white-space: nowrap;
}
.ar-t-hit { color: #59d99e; box-shadow: inset 0 0 0 1px rgba(89,217,158,.42); }
.ar-t-fc { color: #ff5a4a; box-shadow: inset 0 0 0 1px rgba(255,90,74,.55); font-weight: 600; }
.ar-t-fcl { color: var(--gold); box-shadow: inset 0 0 0 1px rgba(255,209,102,.45); }
.ar-t-no { color: var(--ink-3); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.ar-flag { color: var(--ink-3); font-size: 10px; }
.ar-key { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 11.5px; color: var(--ink-3); }
.ar-key span { display: inline-flex; align-items: center; gap: 6px; }
.ar-key i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.ar-co-row { display: flex; justify-content: space-between; gap: 14px; margin-top: 5px; }
.ar-co-row b { font-variant-numeric: tabular-nums; }
.co-metar { margin-top: 7px; font-size: 10.5px; color: var(--ink-3); word-break: break-word; }
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  #archive-card { padding: 20px 16px; width: calc(100vw - 20px); max-height: 88vh; }
  #archive-card h2 { font-size: 17px; }
}


/* ── 3D navigation hint chip ────────────────────────────────────────
   Appears on entering 3D and advertises BOTH desktop controls at once (the
   free-flying camera and the orbit), then reports which one is running. It is
   dismissible and, once dismissed, stays dismissed — so it can afford to sit
   where it is legible rather than out of the way.

   It is anchored bottom-LEFT, above the legend card, because the bottom-right
   is the timeline and the bottom-centre is where #hint lands on first visit.
   `pointer-events` is on the chip only, never on the map behind it.

   "Above the legend card" USED TO BE A LIE: bottom:16px put it 82 px INTO the
   legend, on top of the amber no-terrain caveat — the one line on that card
   that tells a reader what the colours do not know. It is now the TOP member
   of the measured bottom-left stack (syncBottomStack() in js/app.js), so it
   sits above the legend, the safety pill and the support link whatever they
   happen to be. The 16px below is the pre-measurement fallback. */
#nav3d-hint {
  position: absolute; left: 16px; bottom: 16px; z-index: 34;
  display: flex; align-items: flex-start; gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 9px 8px 9px 13px; border-radius: 12px;
  font-size: 12px; line-height: 1.5; color: var(--ink);
  animation: n3-in 0.35s cubic-bezier(.2,.7,.2,1) both;
}
#nav3d-hint .n3-body { flex: 1 1 auto; }
#nav3d-hint b {
  display: inline-block; margin-right: 5px;
  font-weight: 600; letter-spacing: 0.02em;
  color: var(--accent, #ffd166);
}
#nav3d-hint.live b { color: #7cc4ff; }
#nav3d-hint .n3-x {
  flex: 0 0 auto; width: 22px; height: 22px; padding: 0;
  border: 0; border-radius: 7px; background: transparent;
  color: var(--ink); opacity: 0.55; cursor: pointer;
  font-size: 16px; line-height: 20px;
}
#nav3d-hint .n3-x:hover { opacity: 1; background: rgba(255, 255, 255, 0.09); }
#nav3d-hint .n3-x:focus-visible { outline: 2px solid #7cc4ff; outline-offset: 1px; }
@keyframes n3-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* the auto-hide fade (12 s, cancelled on hover) — see showNav3DHint() */
#nav3d-hint.n3-out { opacity: 0; transition: opacity .4s ease; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  #nav3d-hint { animation: none; }
  #nav3d-hint.n3-out { transition: none; }
}
/* the legend card owns the bottom-left on narrow screens; stack above it */
@media (max-width: 720px) { #nav3d-hint { display: none; } }

/* While the free camera is up the map canvas is a viewport, not a surface to
   drag: the crosshair says so, and text selection would fight the look-drag. */
body.flycam .maplibregl-canvas { cursor: crosshair; }
body.flycam { user-select: none; -webkit-user-select: none; }

/* Lunar is the same product shell. Only body-specific state is scoped here;
   there is no second panel, layer toolbar, table system or mobile layout. */
body.lunar-mode #brand svg { filter: drop-shadow(0 0 16px rgba(205, 93, 57, .34)); }
body.lunar-mode #brand h1 span { color: #d97955; }
body.lunar-mode #legend-src { line-height: 1.45; }
body.lunar-mode #modes [data-mode="dur"] { display: none !important; }
body.lunar-mode #mode-controls { display: flex; }
body.lunar-mode #timeline { display: flex; }
body.lunar-mode #search-box { display: flex; }
body.lunar-mode #legend-ramp,
body.lunar-mode #legend-op,
body.lunar-mode #legend-toggles { display: block; }
body.lunar-mode #legend-ticks { display: flex; }
body.lunar-mode #legend-toggles { display: flex; }
body.lunar-mode #legend-nodata.lunar-cloud-no-data i {
  background: repeating-linear-gradient(135deg,
    rgba(199, 204, 214, .68) 0 2px, rgba(47, 51, 59, .68) 2px 5px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.32);
}
body.lunar-mode #legend-note.lunar-no-view {
  display: flex; align-items: center; gap: 7px; color: var(--ink-2);
}
body.lunar-mode #legend-note.lunar-no-view::before {
  content: ""; flex: none; width: 18px; height: 8px; border-radius: 3px;
  background: #14171f; box-shadow: inset 0 0 0 1px rgba(238,241,246,.92);
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  body.lunar-mode #brand p { max-width: 235px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.lunar-mode #panel { width: 100%; max-width: 100%; }
}

@media (max-width: 380px) {
  body.lunar-mode #brand svg { width: 36px; height: 36px; }
  body.lunar-mode #brand { gap: 7px; }
  body.lunar-mode #brand h1 { font-size: 15px; }
  body.lunar-mode #brand p { max-width: 150px; font-size: 9px; }
}
