/* Preserve component and responsive rule order in one stylesheet entry. */
/* ═══════════════════════════════════════════════
   GOD'S EYE VIEW — Dark Sci-Fi UI
   Apple meets Blade Runner
   ═══════════════════════════════════════════════ */

:root {
  --bg-dark: #0a0a0f;
  --glass-bg: rgba(12, 12, 20, 0.72);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.15);
  --accent: #00d4ff;
  /* Every scrolling surface's scrollbar (the kit's .ui-scroll). */
  --scroll-thumb: rgba(0, 212, 255, 0.46);
  --scroll-track: rgba(255, 255, 255, 0.06);
  --accent-dim: rgba(0, 212, 255, 0.15);
  --accent-glow: rgba(0, 212, 255, 0.4);
  --text-primary: #e8eaed;
  --text-secondary: rgba(232, 234, 237, 0.5);
  --text-dim: rgba(232, 234, 237, 0.3);
  /* Opaque surface for browser-painted menus, which cannot use --glass-bg. */
  --menu-bg: #12121c;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --panel-radius: 16px;
  --btn-radius: 10px;
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  /* Label type shared by the command dock and the side panel titles. */
  --dock-label-color: rgba(206, 232, 239, 0.72);
  --dock-label-font-size: 0.58rem;
  --dock-label-font-weight: 500;
  --dock-label-letter-spacing: 0.13rem;
  --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  /* The side stacks clear the 52px edge gutter that holds the vertical HUD
     readout, plus the floating panel rail (42px) and its 6px gap. */
  --panel-rail-clearance: 48px;
  --left-stack-x: calc(52px + var(--panel-rail-clearance));
  --right-rail-x: calc(52px + var(--panel-rail-clearance));
  --left-stack-top: 26vh;
  --left-stack-gap: 72px;
  --left-collapsed-width: 176px;
  --display-panel-expanded-width: 272px;
  --cockpit-radio-collapsed-width: 148px;
  --cockpit-radio-expanded-width: 232px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Keyboard focus is an app-wide state and must survive selected/active button
   skins. Individual controls can choose an inset/outset offset, but no local
   `outline: none` rule may erase the ring. */
:where(
  button,
  a[href],
  input,
  select,
  textarea,
  summary,
  [tabindex],
  [role='button'],
  [role='checkbox'],
  [role='combobox'],
  [role='link'],
  [role='listbox'],
  [role='menuitem'],
  [role='menuitemcheckbox'],
  [role='menuitemradio'],
  [role='option'],
  [role='radio'],
  [role='searchbox'],
  [role='slider'],
  [role='spinbutton'],
  [role='switch'],
  [role='tab'],
  [role='textbox'],
  [role='treeitem']
):focus-visible {
  outline: 2px solid var(--text-primary) !important;
  outline-offset: 2px;
}

/* Native `<select>` popups are painted by the browser, not by this sheet: the
   closed control inherits its panel skin, but the option list falls back to the
   platform's light palette unless the control declares a scheme. Declare it on
   the controls rather than on :root so the app keeps its own hand-tuned
   scrollbar and input skins, and set the option colors explicitly because the
   popup surface is not themed on every platform. */
select {
  color-scheme: dark;
}

select option,
select optgroup {
  background-color: var(--menu-bg);
  color: var(--text-primary);
}

select option:disabled {
  color: var(--text-dim);
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-dark);
  font-family: var(--font-sans);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* ── Cesium Container ─────────────────────────── */
#cesiumContainer {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* Unified world-overlay host: detection uses one host-owned blend surface
   beneath the shared text/card canvas; both share one frame path. The root
   holds ONLY the card canvas — it is a stacking context (z-index below), and
   a canvas that blends against the scene cannot live inside one. */
#world-overlay-root {
  position: absolute;
  inset: 0;
  z-index: 6;
  overflow: hidden;
  pointer-events: none;
}

#world-overlay-detection-surface,
#world-overlay-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Scope mask — the explicit circular viewport treatment (see
   src/scopeMask.js for the emergent-artifact history). z2 keeps it above
   the WebGL scene but under the z5 detection surface, preserving the old
   compositing order where detection's blend rode the masked scene. */
#scope-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* z1 like the celestial ring; the ring is appended LATER so DOM order
     keeps it ABOVE the mask — matching the old stacking, where the DOM
     ring rode above the in-scene scope artifact. Detection (z5) and the
     overlay root (z6) stay above both. */
  z-index: 1;
  pointer-events: none;
}

/* The detection surface is host-owned but parented into #cesiumContainer
   (position:absolute, z-index:auto — NOT a stacking context) so its
   `mix-blend-mode: screen` composites against the WebGL scene. z5 keeps it
   under the z6 root that carries the shared card canvas; do not move this
   surface inside #world-overlay-root, which would isolate the blend. */
#world-overlay-detection-surface {
  z-index: 5;
}

/* Canvas cards retain their spatial renderer; this parallel focusable list
   exposes only the currently painted actionable targets to assistive tech. */
.world-overlay-accessibility {
  position: fixed;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Source-backed cockpit weather ─────────────
   Low-resolution GPU cloud pass composited only inside the cockpit keyhole. */
#cockpit-cloud-effects {
  position: fixed;
  inset: 0;
  z-index: 7;
  display: none;
  width: 100vw;
  height: 100vh;
  opacity: 0;
  pointer-events: none;
  clip-path: circle(min(40vw, 52vh) at 50% 50%);
  filter: blur(0.7px) saturate(0.72) contrast(1.08);
  transform: translateZ(0);
  transition: opacity 900ms ease;
}

body.cockpit-mode #cockpit-cloud-effects.active {
  display: block;
  opacity: 0.86;
}

/* ── Full-globe celestial keyhole ring ─────── */
.celestial-ring-overlay {
  position: absolute;
  inset: 0;
  /* Above the z1 scope mask regardless of DOM order (the ring is built by
     StyleManager before the scope installs) — the ring always rode above
     the scope treatment. Detection (z5) and the overlay root (z6) stay on
     top of both. */
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 300ms ease,
    visibility 300ms ease;
}

.celestial-ring-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.celestial-ring-overlay.disabled {
  display: none;
}

.celestial-ring-canvas {
  position: absolute;
  inset: 0;
  display: block;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
}

.celestial-ring-outline {
  position: absolute;
  box-sizing: border-box;
  border: 0.8px solid rgba(151, 218, 232, 0.095);
  border-radius: 50%;
  will-change: width, height;
}

.celestial-marker {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  font-family: 'Material Symbols Outlined';
  font-size: 20px;
  font-weight: 400;
  font-style: normal;
  line-height: 1;
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 20;
  transition: opacity 120ms linear;
  user-select: none;
}

.celestial-sun {
  color: rgba(231, 194, 72, 0.92);
  text-shadow:
    0 0 7px rgba(231, 194, 72, 0.72),
    0 0 18px rgba(231, 194, 72, 0.3);
}

.celestial-moon {
  color: rgba(55, 211, 239, 0.84);
  text-shadow:
    0 0 7px rgba(55, 211, 239, 0.65),
    0 0 17px rgba(55, 211, 239, 0.25);
}

#celestial-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

/* Hide Cesium default UI elements */
.cesium-viewer-toolbar,
.cesium-viewer-animationContainer,
.cesium-viewer-timelineContainer,
.cesium-viewer-bottom,
.cesium-viewer-fullscreenContainer,
.cesium-viewer-vrContainer,
.cesium-viewer-geocoderContainer,
.cesium-viewer-selectionIndicatorContainer,
.cesium-viewer-infoBoxContainer {
  display: none !important;
}

/* Data-source attribution (Google Maps / 3D Tiles, etc.).
   Required by the Google Maps Platform Terms of Service — keep it visible.
   Styled to be unobtrusive but legible against the dark UI. */
#cesium-credits {
  position: fixed;
  /* Bottom-LEFT corner, mirrored from the GEV mic pill (right:36/bottom:36) so the two bottom
     corners are symmetric; sits below the coordinate HUD (.hud-bottom-left, bottom:180). Was
     dead-center at the bottom, tucked under the LOCATIONS/STYLE panels. Must stay visible (Google
     /Cesium attribution ToS). */
  bottom: 36px;
  left: 36px;
  z-index: 90;
  max-width: 90vw;
  /* Keep the Google logo + "Data attribution" link on ONE line — they were wrapping to a second
     row (looked like it was falling over). nowrap + a roomy max-width holds them inline. */
  white-space: nowrap;
  pointer-events: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(232, 234, 237, 0.55);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}
#cesium-credits .cesium-credit-logoContainer,
#cesium-credits .cesium-credit-textContainer,
#cesium-credits .cesium-credit-expand-link {
  display: inline-block;
  vertical-align: middle;
}
#cesium-credits a,
#cesium-credits .cesium-credit-expand-link {
  color: rgba(232, 234, 237, 0.7);
}

/* The application's own attribution line (src/ui/creditsView.js), for a
   renderer without a credit display of its own: the same place and look. */
#gev-credits {
  position: fixed;
  bottom: 36px;
  left: 36px;
  z-index: 90;
  max-width: 90vw;
  white-space: nowrap;
  pointer-events: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(232, 234, 237, 0.55);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}
#gev-credits a,
#gev-credits .gev-credits-expand {
  color: rgba(232, 234, 237, 0.7);
}
#gev-credits .gev-credit-logo {
  height: 14px;
  vertical-align: middle;
}
#gev-credits .gev-credits-expand {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.gev-credits-panel {
  position: fixed;
  bottom: 60px;
  left: 36px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  width: 470px;
  max-width: calc(100vw - 2rem);
  max-height: min(70dvh, 36rem);
  overflow: hidden;
  border: 1px solid rgba(232, 234, 237, 0.2);
  border-radius: 6px;
  background: rgba(16, 18, 22, 0.94);
  color: rgba(232, 234, 237, 0.85);
  font-family: var(--font-mono);
  font-size: 12px;
}
.gev-credits-panel[hidden] {
  display: none;
}
.gev-credits-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 4px 20px;
}
.gev-credits-close {
  border: 0;
  background: none;
  color: inherit;
  font-size: 18px;
  cursor: pointer;
}
.gev-credits-list {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 4px 20px 14px 40px;
  overflow-y: auto;
  overscroll-behavior: contain;
  line-height: 1.35;
}
.gev-credits-list > li {
  padding-bottom: 5px;
  overflow-wrap: anywhere;
}
.gev-credits-list a {
  color: rgba(232, 234, 237, 0.85);
}
@media (max-width: 575px) {
  .gev-credits-panel {
    inset: 0;
    width: 100%;
    max-width: none;
    max-height: 100dvh;
    border-radius: 0;
  }
}

/* Cesium's stock attribution lightbox grows with every registered data source.
   Keep the title and close affordance fixed while the complete, unabridged
   credit list wraps and scrolls inside a compact panel. */
.cesium-credit-lightbox-overlay {
  z-index: 200 !important;
}

.cesium-credit-lightbox {
  display: flex;
  flex-direction: column;
  width: 470px;
  max-width: calc(100vw - 2rem);
  max-height: min(70dvh, 36rem);
  overflow: hidden;
}

.cesium-credit-lightbox > ul {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 8px 20px 14px 40px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  font-size: 12px !important;
  line-height: 1.35;
  white-space: normal;
}

.cesium-credit-lightbox > ul > li {
  padding-bottom: 5px;
  overflow-wrap: anywhere;
}

@media (max-width: 575px) {
  .cesium-credit-lightbox {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: 100dvh !important;
    margin: 0 !important;
  }
}
/* Clean-view / recording: the Google + Cesium attribution MUST stay visible.
   Google Maps Platform ToS and Cesium's terms require the credit whenever the
   content is displayed — and these are exactly the modes used to record demos
   and launch videos, so hiding #cesium-credits here (as it was before) shipped
   non-compliant footage. The full credit line — Cesium/Ion logo, "Google Maps",
   and the "Data attribution" link that opens the per-layer license popover —
   stays on screen; it's already styled small and unobtrusive above. The GEV
   chrome (panels/HUD) still fades via its own rules; only the required notice
   is exempt. (Note: Cesium re-applies inline styles on the credit elements each
   frame, so the on-screen credit content is owned by Cesium's update loop, not
   CSS overrides — we deliberately don't fight it here.) */

#gev-voice-control {
  position: fixed;
  right: 36px;
  bottom: 36px;
  /* Z ladder: panels ~100, voice pill 150, toast 200, clean-view-exit 300 */
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 214px;
  padding: 9px 14px;
  color: var(--text-primary);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 0 20px rgba(0, 212, 255, 0.08);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  font-family: var(--font-mono);
  pointer-events: auto;
}

#gev-voice-button {
  width: 72px;
  height: 34px;
  flex: 0 0 auto;
  color: var(--accent);
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid rgba(0, 212, 255, 0.28);
  border-radius: var(--btn-radius);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0;
  cursor: pointer;
}

#gev-voice-button:hover {
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.22);
}

.gev-voice-readout {
  min-width: 0;
  line-height: 1.2;
  text-align: right;
}

#gev-voice-status {
  font-size: 10px;
  color: var(--accent);
}

#gev-voice-detail {
  max-width: 132px;
  margin-top: 2px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#gev-voice-control[data-status='listening'] {
  border-color: rgba(92, 255, 198, 0.45);
}

#gev-voice-control[data-status='listening'] #gev-voice-status {
  color: #5cffc6;
}

#gev-voice-control[data-status='executing'] {
  border-color: rgba(255, 220, 120, 0.55);
}

#gev-voice-control[data-status='executing'] #gev-voice-status {
  color: #ffdc78;
}

#gev-voice-control[data-status='error'] {
  align-items: flex-start;
  width: min(440px, calc(100vw - 72px));
  border-color: rgba(255, 92, 110, 0.6);
  /* Multi-line error block reads as a panel, not a capsule */
  border-radius: var(--panel-radius);
}

#gev-voice-control[data-status='error'] #gev-voice-status {
  color: #ff5c6e;
}

#gev-voice-control[data-status='error'] .gev-voice-readout {
  flex: 1;
  text-align: left;
}

#gev-voice-control[data-status='error'] #gev-voice-detail {
  max-width: none;
  overflow: visible;
  color: #ffb4bd;
  line-height: 1.45;
  text-overflow: clip;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
}

/* ── Title Bar ────────────────────────────────── */
#title-bar {
  position: fixed;
  top: 32px;
  inset-inline-start: 36px;
  z-index: 100;
  pointer-events: none;
  user-select: none;
}

#title-bar .title-glow {
  position: absolute;
  top: -20px;
  inset-inline-start: -20px;
  width: 200px;
  height: 80px;
  background: radial-gradient(ellipse, var(--accent-dim) 0%, transparent 70%);
  filter: blur(20px);
  opacity: 0.6;
}

#title-bar h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 8px;
  color: var(--text-primary);
  text-shadow: 0 0 30px var(--accent-glow);
  position: relative;
}

#title-bar .title-logo {
  position: relative;
  display: block;
  width: 52px;
  height: auto;
  filter: drop-shadow(0 0 12px rgba(0, 246, 255, 0.5));
}

/* The logo is a button: back to live at the start view. */
#title-bar button.title-logo {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  pointer-events: auto;
}

#title-bar button.title-logo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 8px;
}

#title-bar .title-logo::before,
#title-bar .title-logo::after {
  --radio-broadcast-opacity: 0.28;
  content: '';
  position: absolute;
  z-index: 1;
  left: 50%;
  top: -9px;
  width: 13px;
  height: 7px;
  border: 1px solid var(--accent);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transform-origin: 50% 100%;
}

#title-bar .title-logo::after {
  --radio-broadcast-opacity: 0.17;
  top: -15px;
  width: 27px;
  height: 13px;
}

#title-bar.radio-broadcasting .title-logo::before,
#title-bar.radio-broadcasting .title-logo::after {
  opacity: var(--radio-broadcast-opacity);
  animation: title-radio-broadcast 1.8s ease-in-out infinite;
}

#title-bar.radio-broadcasting .title-logo::after {
  animation-delay: 0.28s;
}

@keyframes title-radio-broadcast {
  0%,
  100% {
    opacity: calc(var(--radio-broadcast-opacity) * 0.55);
    transform: translateX(-50%) scale(0.94);
  }
  50% {
    opacity: var(--radio-broadcast-opacity);
    transform: translateX(-50%) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  #title-bar.radio-broadcasting .title-logo::before,
  #title-bar.radio-broadcasting .title-logo::after {
    animation: none;
  }
}

.brand-logo {
  aspect-ratio: 775 / 520;
  overflow: visible;
  pointer-events: none;
}

.brand-logo > img,
.brand-logo > svg {
  display: block;
  width: 100%;
  height: 100%;
}

#title-bar .title-accent,
.loader-content .title-accent {
  color: var(--accent);
  font-weight: 300;
}

#title-bar .subtitle {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 5px;
  color: var(--text-dim);
  margin-top: 8px;
  text-transform: uppercase;
}

#title-bar .frame-rate-readout {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  color: var(--accent);
}

/* ── Style Indicator ──────────────────────────── */
#style-indicator {
  position: fixed;
  top: 32px;
  inset-inline-end: 36px;
  z-index: 100;
  pointer-events: none;
  user-select: none;
  text-align: end;
}

#style-indicator .indicator-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--text-dim);
  text-transform: uppercase;
}

#style-indicator .indicator-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 5px;
  color: var(--accent);
  margin-top: 4px;
  text-shadow: 0 0 20px var(--accent-glow);
  transition: var(--transition-smooth);
}
/* Ordinary actions share one surface; feature classes own placement and width.
 * Legacy scene-btn hooks keep untouched toggles/Street Level controls stable.
 * The kit's UiButton wears it as variant="action" (.ui-button--action) and
 * variant="primary" (.ui-button--primary); its resting rules select one kit
 * class, so a feature class loaded later still wins. */
.ui-button--action,
.ui-button--primary,
.gev-action-button,
.scene-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.2px;
  padding: 6px 9px;
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    opacity var(--transition-fast);
  white-space: nowrap;
}

/* A pressed kit action looks as a hovered regular one does (a compact one
   too: its quieter hover below is for an unpressed button). */
.ui-button--action:hover:not(:disabled),
.ui-button--primary:hover:not(:disabled),
.ui-button--action.ui-button--pressed:not(:disabled),
.ui-button--primary.ui-button--pressed:not(:disabled),
.gev-action-button:hover:not(:disabled),
.scene-btn:hover:not(:disabled) {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(0, 212, 255, 0.14);
}

.ui-button--action:disabled,
.ui-button--primary:disabled,
.gev-action-button:disabled,
.scene-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

/* tone="danger". */
.ui-button--action.ui-button--danger:hover:not(:disabled),
.ui-button--action.ui-button--danger.ui-button--pressed:not(:disabled),
.gev-action-button--danger:hover:not(:disabled),
.scene-btn-danger:hover:not(:disabled) {
  color: #ff7272;
  border-color: #ff7272;
  background: rgba(255, 88, 88, 0.15);
}

/* One primary action per group: Authoring's CAPTURE SHOT and PLAY. The panel
   id keeps those above the shared surface; scenes.css keeps their hover. The
   kit selector stays at one class's weight. */
.ui-button--primary:where(:not(:disabled)),
#scene-panel .scene-btn-primary:not(:disabled) {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

/* Shot-row actions retain their smaller footprint and quieter hover treatment
   (size="compact", on the action variant only: :where keeps the kit
   selector at one class's weight). */
.ui-button--compact:where(.ui-button--action),
.gev-action-button--compact {
  border-radius: 6px;
  font-size: 8px;
  letter-spacing: 0.8px;
  padding: 4px 6px;
}

/* A pressed compact action keeps its pressed look under the pointer. */
.ui-button--compact:where(.ui-button--action):hover:not(:disabled):not(
    .ui-button--pressed
  ),
.gev-action-button--compact:hover:not(:disabled) {
  color: var(--text-primary);
  border-color: var(--glass-border-hover);
  background: rgba(255, 255, 255, 0.05);
}

.ui-button--compact.ui-button--danger:where(.ui-button--action):hover:not(
    :disabled
  ),
.gev-action-button--compact.gev-action-button--danger:hover:not(:disabled) {
  color: #ff7e7e;
  border-color: #ff7e7e;
}
/* Core's close, dismiss and clear buttons draw a bare glyph: no padding,
 * border or background of their own, and a pointer. The kit's
 * UiCloseButton wears it as .ui-close-button, and the guide's close (a
 * UiCloseButton too) shares the rule by its feature class. It selects one
 * class and loads before the feature stylesheets, so each feature rule still
 * sets its size, colour, hover and any surface (a border, a chip, a tinted
 * square). */
.ui-close-button,
.gev-guide-close {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
/* Core's search fields share their frame's row and their bare input: the
 * kit's UiSearchField wears them as .ui-search-field and
 * .ui-search-field__input. Each rule selects one class and loads before the
 * feature stylesheets, so a feature rule still sets the frame's size,
 * surface and focus ring and the input's type, colour, flex and outline. The
 * browser's own cancel button is left to each skin. */
.ui-search-field {
  display: flex;
  align-items: center;
}

.ui-search-field__input {
  min-width: 0;
  background: none;
  border: 0;
}
/* Core's checkboxes are a label wrapping the box and its words, laid out in
 * a centred flex row: the kit's UiCheckbox wears it as .ui-checkbox. The rule
 * selects one class and loads before the feature stylesheets, so a feature
 * rule still sets the row's gap, direction, size and colour. The box,
 * .ui-checkbox__input, keeps each skin's size, margin and accent colour. */
.ui-checkbox {
  display: flex;
  align-items: center;
}
/* The kit's on/off switch, UiSwitch: a pill track 30 by 16 px whose knob
 * slides to the end and takes the accent while it is on. The rules select
 * the kit's classes and load before the feature stylesheets, so a feature
 * rule still places the switch in its row. */
.ui-switch {
  position: relative;
  flex: none;
  width: 30px;
  min-width: 0;
  height: 16px;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.ui-switch::before {
  /* A hit target 26 px tall around the 16 px track. */
  position: absolute;
  inset: -6px -2px;
  content: '';
}

.ui-switch__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  background: rgba(199, 214, 222, 0.6);
  border-radius: 50%;
  transition:
    transform 120ms ease,
    background 120ms ease;
}

.ui-switch[aria-checked='true'] {
  background: rgba(54, 220, 255, 0.22);
  border-color: rgba(54, 220, 255, 0.7);
}

.ui-switch[aria-checked='true'] .ui-switch__knob {
  background: #36dcff;
  transform: translateX(14px);
}

.ui-switch:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Right to left, the knob starts on the right and moves left. */
html[dir='rtl'] .ui-switch__knob {
  right: 2px;
  left: auto;
}

html[dir='rtl'] .ui-switch[aria-checked='true'] .ui-switch__knob {
  transform: translateX(-14px);
}
/* Native selects and numeric inputs. This file owns the field surface/states;
   features and themes supply palette variables and retain their own layout. */
.gev-field {
  min-width: 0;
  background: var(--gev-field-background, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--gev-field-border-color, rgba(255, 255, 255, 0.14));
  border-radius: 7px;
  color: var(--gev-field-color, var(--text-primary));
  padding: 6px 8px;
  font-family: var(--font-sans);
  font-size: 12px;
  outline: none;
  /* Native number spinners and the open select list follow the dark skin. */
  color-scheme: dark;
}

/* A select draws the field's own chevron, not the platform's arrow, so every
   dropdown in the app reads the same. The open list stays native. */
select.gev-field {
  -webkit-appearance: none;
  appearance: none;
  padding-inline-end: 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='rgba(255,255,255,0.62)' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px 6px;
}

.gev-field:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: -3px;
}

.gev-field:disabled {
  opacity: var(--gev-field-disabled-opacity, 0.45);
}

.gev-field--compact {
  height: 24px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.6px;
  padding: 2px 6px;
}

select.gev-field--compact {
  padding-inline-end: 18px;
  background-position: right 6px center;
}

/* Compact inline editors share density and hide native number spinners.
   Their containing feature sets width to fit the surrounding readout. */
.gev-field--inline {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.7px;
  --gev-field-background: rgba(0, 212, 255, 0.1);
  --gev-field-border-color: rgba(0, 212, 255, 0.5);
  border-radius: 4px;
  padding: 1px 3px;
  -moz-appearance: textfield;
}

.gev-field--inline::-webkit-outer-spin-button,
.gev-field--inline::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
/* Read-only badges. Feature CSS supplies meaning through explicit colors;
   appearance variants change density/shape without interpreting status codes.
   The kit's UiBadge (.ui-badge) wears it. */
.ui-badge,
.gev-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 4px 8px;
  border: 1px solid var(--status-badge-border, rgba(0, 212, 255, 0.32));
  border-radius: 999px;
  background: var(--status-badge-background, rgba(0, 212, 255, 0.09));
  color: var(--status-badge-color, #9defff);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 1.3px;
  overflow-wrap: anywhere;
}

.gev-status-badge--box {
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.gev-status-badge--plain {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--status-badge-color, var(--text-dim));
  font-size: 9px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Explicitly beat the component display rule, including in older browsers. */
.ui-badge[hidden],
.gev-status-badge[hidden] {
  display: none;
}
/* Read-only chips: a label that says what something is, never a control (a
   chip that presses is a button). The kit's UiChip (.ui-chip) and the news
   cards' chips wear it; feature classes loaded later restyle it. */
.ui-chip,
.news-chip {
  padding: 2px 7px;
  border: 1px solid var(--glass-border-hover);
  border-radius: 999px;
  color: var(--text-secondary);
  font: 8px var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* A selected chip takes the accent of the read-only badge (status-badge.css);
   news marks official and confirmed reports this way. */
.ui-chip--selected,
.news-chip--official,
.news-chip--confirmed {
  border-color: rgba(0, 212, 255, 0.32);
  background: rgba(0, 212, 255, 0.09);
  color: #9defff;
}
/* A one-line empty state: dim mono text where a list would be. The kit's
   UiEmpty (.ui-empty) and the news readout's empty and status lines wear it;
   feature classes loaded later restyle it. */
.ui-empty,
.news-readout__empty,
.news-readout__status {
  color: var(--text-dim);
  font: 10px var(--font-mono);
}

/* The next step (a missing key's), under what it holds back. */
.ui-empty__hint {
  display: block;
  margin-top: 2px;
}
/* Shared ordinary slider surface; feature classes only own surrounding layout.
 * Native range inputs retain keyboard, pointer, bounds and step behavior. */
.gev-quantitative-slider {
  width: 100%;
  min-width: 0;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  outline: none;
  cursor: pointer;
}
.gev-quantitative-slider::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
}
.gev-quantitative-slider::-webkit-slider-thumb {
  width: 10px;
  height: 10px;
  margin-top: -3.5px;
  border: 0;
  border-radius: 50%;
  -webkit-appearance: none;
  appearance: none;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
  cursor: pointer;
}
.gev-quantitative-slider::-moz-range-track,
.gev-quantitative-slider::-moz-range-progress {
  height: 3px;
  border: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
}
.gev-quantitative-slider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
  cursor: pointer;
}
.gev-quantitative-slider:focus-visible {
  border-radius: 4px;
  outline: 1px solid color-mix(in srgb, var(--accent) 80%, transparent);
  outline-offset: 2px;
}
.gev-quantitative-slider:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.pp-slider-value,
.param-value,
.ri-opacity-value,
.rail-card-setting-range-value,
.gev-slider-value {
  min-width: 28px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.5px;
  text-align: right;
  flex-shrink: 0;
}
.panel-inner {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--panel-radius);
  padding: 16px 20px 18px;
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 0 4px;
}

.panel-title {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--text-dim);
  text-transform: uppercase;
  white-space: nowrap;
}

/* Side panel titles read like the command dock's labels: one type for every
   panel, collapsed or open, and bright enough to read over the globe. The
   dock's type is in rem, but a collapsed launcher is a fixed 176px, so the
   rail caps it at its 16px-root size: a larger browser font must not cut
   Recent Imagery short. */
:is(#left-panel-stack, #right-context-rail)
  :is(.panel-header > .panel-title, .pp-header-label) {
  font-family: var(--font-mono);
  font-size: min(var(--dock-label-font-size), 9.28px);
  font-weight: var(--dock-label-font-weight);
  letter-spacing: min(var(--dock-label-letter-spacing), 2.08px);
  text-transform: uppercase;
}

/* A hovered panel sets --rail-label-hover on itself (see below); its own
   header picks it up. Radio sits inside Context and keeps its own colour. */
:root
  :is(#left-panel-stack, #right-context-rail)
  :is(
    .panel-header > .panel-title,
    .pp-header-label,
    :is(.panel-header, .pp-header-row) > .panel-collapse-btn
  ) {
  color: var(--rail-label-hover, var(--dock-label-color));
}

#radio-panel {
  --rail-label-hover: initial;
}

/* A title never pushes its toggle out of the card: one that does not fit
   ends in an ellipsis. */
:root
  :is(#left-panel-stack, #right-context-rail)
  :is(.panel-header > .panel-title, .pp-header-label) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* A collapsed launcher is 176px wide and its divider has no room to draw,
   so the header drops it and packs closer. English titles such as Recent
   Imagery then fit whole. Only the rail's own launchers: Radio, nested in
   Context, keeps its divider. */
:root
  :is(#left-panel-stack, #right-context-rail)
  > .panel-collapsible.collapsed
  > [class$='-panel-inner']
  > .panel-header,
:root
  :is(#left-panel-stack, #right-context-rail)
  > #pp-toggles.collapsed
  > .pp-header-row {
  gap: 8px;
}

:root
  :is(#left-panel-stack, #right-context-rail)
  > .panel-collapsible.collapsed
  > [class$='-panel-inner']
  > .panel-header
  > .panel-divider,
:root
  :is(#left-panel-stack, #right-context-rail)
  > #pp-toggles.collapsed
  > .pp-header-row
  > .panel-divider {
  display: none;
}

:root
  :is(#left-panel-stack, #right-context-rail)
  > .panel-collapsible.collapsed
  > [class$='-panel-inner']
  > .panel-header
  > .panel-collapse-btn,
:root
  :is(#left-panel-stack, #right-context-rail)
  > #pp-toggles.collapsed
  > .pp-header-row
  > .panel-collapse-btn {
  margin-left: auto;
}

/* Translated titles run longer (Aktuelle Bilddaten), so a collapsed rail
   launcher sets them in compact type rather than pushing the disclosure
   button out of the card or cutting the word short. Chinese and Japanese
   titles fit at full size and stay at or above their 9px floor (cjk.css);
   Radio, nested in Context, is not a launcher. */
html:not([lang='en']):not(:lang(zh)):not(:lang(ja))
  :is(#left-panel-stack, #right-context-rail)
  > .panel-collapsible.collapsed
  > [class$='-panel-inner']
  > .panel-header
  > .panel-title {
  font-size: 8px;
  letter-spacing: 1px;
}

.panel-divider {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--glass-border), transparent);
}

/* A panel's collapse toggle, and the kit's square glyph button
   (UiButton variant="icon"). */
.ui-button--icon,
.panel-collapse-btn {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1;
  /* A long title or a header action must not squeeze the toggle. */
  flex-shrink: 0;
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

/* A pressed kit icon button looks as a hovered one does. */
.ui-button--icon:hover:not(:disabled),
.ui-button--icon.ui-button--pressed:not(:disabled),
.panel-collapse-btn:hover {
  border-color: var(--glass-border-hover);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.07);
}

.ui-button--icon:disabled {
  opacity: 0.45;
  cursor: default;
}

/* A side panel answers the pointer as the command dock's trays do: a
   brighter edge and an accent title and toggle. Touch screens have no hover,
   so a tap must not leave a panel lit. */
@media (hover: hover) and (pointer: fine) {
  :root
    :is(#left-panel-stack, #right-context-rail)
    :where(
      .data-panel-inner,
      .utilities-panel-inner,
      .scene-panel-inner,
      .cctv-panel-inner,
      .weather-panel-inner,
      .recent-imagery-panel-inner,
      .street-level-panel-inner,
      .global-context-panel-inner,
      .space-missions-panel-inner,
      #pp-toggles:not(.collapsed),
      #pp-toggles.collapsed > .pp-header-row
    ) {
    transition: border-color var(--transition-fast);
  }

  :root
    :is(#left-panel-stack, #right-context-rail)
    :where(
      .data-panel-inner,
      .utilities-panel-inner,
      .scene-panel-inner,
      .cctv-panel-inner,
      .weather-panel-inner,
      .recent-imagery-panel-inner,
      .street-level-panel-inner,
      .global-context-panel-inner,
      .space-missions-panel-inner,
      #pp-toggles:not(.collapsed),
      #pp-toggles.collapsed > .pp-header-row
    ):hover {
    --rail-label-hover: var(--accent);
    border-color: var(--glass-border-hover);
  }
}

.btn-icon {
  font-size: 20px;
  line-height: 1;
  color: var(--text-secondary);
  transition:
    color var(--transition-fast),
    text-shadow var(--transition-fast);
}

/* ── Loading Screen ───────────────────────────── */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.8s ease,
    visibility 0.8s ease;
}

#loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  text-align: center;
}

.loader-logo {
  display: block;
  width: 128px;
  height: auto;
  margin: 0 auto 24px;
  filter: drop-shadow(0 0 24px rgba(0, 246, 255, 0.42));
  animation: logo-pulse 2s ease-in-out infinite;
}

@keyframes logo-pulse {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.98);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

/* The opening (src/app/openingIntro.js) sets --opening-veil and --opening-text each frame. */
#loading-screen.opening {
  background: color-mix(
    in srgb,
    var(--bg-dark) calc(var(--opening-veil, 1) * 100%),
    transparent
  );
}

#loading-screen.opening .loader-logo {
  animation: none;
  will-change: transform;
}

#loading-screen.opening .loader-logo svg {
  overflow: visible;
}

#loading-screen.opening .loader-logo svg > path {
  transform-box: fill-box;
  transform-origin: center;
}

#loading-screen.opening h2,
#loading-screen.opening .loader-status {
  animation: none;
  opacity: var(--opening-text, 1);
}

.loader-content h2 {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 6px;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.loader-status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-dim);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

/* ── Post-Processing Toggles ─────────────────── */
#pp-toggles {
  --pp-expanded-width: var(--display-panel-expanded-width);
  position: relative;
  z-index: 110;
  width: var(--pp-expanded-width);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}

#pp-toggles:not(.collapsed) {
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid var(--glass-border);
  border-radius: var(--panel-radius);
  background: var(--glass-bg);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
}

#pp-toggles:not(.collapsed) > .pp-header-row,
#pp-toggles:not(.collapsed) > .pp-panel-body > .pp-toggle-group,
#pp-toggles:not(.collapsed) > .pp-panel-body > #clean-view-toggle {
  width: 100%;
}

.pp-panel-body,
.cyber-panel-body {
  display: contents;
}

.panel-collapsible.collapsed > .global-context-panel-inner > .cyber-panel-body {
  display: none;
}

.pp-toggle-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    color var(--transition-fast),
    border-radius var(--transition-fast);
  outline: none;
}

.pp-toggle-group {
  width: var(--pp-expanded-width);
  max-width: 100%;
}

#pp-toggles .pp-toggle-btn {
  width: 100%;
  min-height: 38px;
  box-sizing: border-box;
}

#pp-toggles .pp-header-row {
  width: var(--pp-expanded-width);
  max-width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  margin-left: auto;
  margin-bottom: 0;
  padding: 8px 10px 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--glass-border);
  border-radius: var(--panel-radius);
  background: var(--glass-bg);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  cursor: default;
}

/* Expanded Display already owns the glass shell. Keep its header visually
 * integrated with that container, matching the other expanded panel headers;
 * the collapsed launcher retains the standalone card treatment above. */
#pp-toggles:not(.collapsed) > .pp-header-row {
  min-height: 32px;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#pp-toggles .pp-header-label {
  color: var(--text-dim);
}

/* Display's title and toggle sit where the other panels' do: 14px of panel
   padding plus a 4px header inset. */
:root #pp-toggles.collapsed > .pp-header-row {
  padding: 8px 18px;
}

:root #pp-toggles:not(.collapsed) > .pp-header-row {
  padding: 0 10px;
}

#pp-toggles > .pp-header-row .pp-collapse-btn {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  font-size: 12px;
  padding: 0;
}

/* In the default theme Display's toggle matches the other panels' 22px. */
:root #pp-toggles > .pp-header-row .pp-collapse-btn {
  width: 22px;
  height: 22px;
  font-size: 13px;
}

#pp-toggles.collapsed {
  gap: 0;
}

#pp-toggles.collapsed .pp-header-row {
  width: var(--right-collapsed-width, 132px);
}

#pp-toggles.collapsed .pp-toggle-group,
#pp-toggles.collapsed #clean-view-toggle,
#pp-toggles.collapsed #param-slider-panel,
#pp-toggles.collapsed .visual-presets,
#pp-toggles.collapsed .pp-section-heading,
#pp-toggles.collapsed .pp-reset-btn {
  display: none;
}

.pp-toggle-btn:hover {
  border-color: var(--glass-border-hover);
  background: rgba(255, 255, 255, 0.06);
}

.pp-toggle-btn.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.15);
}

.pp-icon {
  font-size: 14px;
  line-height: 1;
}

.pp-icon.material-symbols-outlined {
  width: 14px;
  overflow: hidden;
  font-family: 'Material Symbols Outlined';
  font-size: 14px;
  font-weight: 400;
  font-style: normal;
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 20;
}

.pp-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.pp-toggle-btn.active .pp-label {
  color: var(--accent);
}

.pp-scope-toggle input {
  width: 14px;
  height: 14px;
  margin: 0 0 0 auto;
  accent-color: var(--accent);
  cursor: pointer;
}

.pp-scope-toggle:has(input:checked) .pp-label {
  color: var(--accent);
}

.pp-scope-toggle:has(input:focus-visible) {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

#scope-slider-row:has(input:disabled) {
  opacity: 0.45;
}

/* ── Bloom Slider (inline with toggle) ───────── */
.pp-toggle-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pp-slider-row {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 6px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.pp-slider-row.visible {
  display: flex;
}

.pp-toggle-group .pp-slider-row.visible ~ .pp-toggle-btn,
.pp-toggle-group:has(.pp-slider-row.visible) .pp-toggle-btn {
  border-radius: 8px 8px 0 0;
}

.pp-slider {
  flex: 1;
  min-width: 0;
}

.pp-slider-mini-label {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
  white-space: nowrap;
}

/* One label column across the Display rows: --pp-label-chars is the longest
   label of the active language (set in applicationShell.js); the labels are
   monospace. 0.125em is the 1px letter-spacing at 8px. */
html:not([lang='en']) .pp-slider-row > .pp-slider-mini-label {
  flex: 0 0 auto;
  min-width: calc(var(--pp-label-chars, 0) * (1ch + 0.125em));
}

.detection-slider-row {
  min-width: 170px;
  padding: 5px 8px 6px;
}

#detection-slider-row.visible,
#detection-allocation-row.visible,
#detection-fade-row.visible {
  border-radius: 0;
}

.detection-allocation-row {
  min-width: 170px;
  padding: 5px 8px 6px;
}

.detection-fade-row,
.detection-opacity-row {
  min-width: 170px;
  padding: 5px 8px 6px;
}

#hud-layout-row {
  min-width: 200px;
}

.cyber-sonar-toggle-row,
.cyber-sonar-setting {
  min-width: 200px;
}

.cyber-sonar-toggle-row .pp-mode-btn:not(.gev-segment) {
  margin-left: auto;
  min-width: 48px;
}

.pp-select {
  flex: 1;
  min-width: 0;
}

/* UTILITIES ▸ Draw: shape icons and colour swatches for the next shape, the
   hint with Clear, then one row per drawn shape (named and recoloured there) */
#draw-mode-row {
  flex-wrap: wrap;
  row-gap: 6px;
  column-gap: 10px;
}
#draw-mode-row .draw-shape-seg {
  flex: 0 0 auto;
}
#draw-mode-row .draw-shape-seg .gev-segment {
  min-width: 30px;
  padding: 3px 6px;
}
.draw-shape-seg .material-symbols-outlined {
  display: block;
  font-size: 16px;
  line-height: 1;
}
.draw-colors {
  display: flex;
  align-items: center;
  gap: 6px;
}
#utilities-panel .draw-color {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.45);
  border-radius: 50%;
  cursor: pointer;
}
/* The swatch keeps its own colour in every theme; only a ring marks it. */
#utilities-panel .draw-color:is(.active, :hover, :focus-visible) {
  border-color: rgba(0, 0, 0, 0.45);
  box-shadow: none;
}
#utilities-panel .draw-color.active,
#utilities-panel .draw-color:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}
#draw-label-row {
  justify-content: space-between;
  gap: 8px;
}
#draw-label-row .draw-hint {
  flex: 1 1 auto;
}
.draw-mark-row {
  flex-wrap: wrap;
}
.draw-mark-swatch {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
}
.draw-mark-swatch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* The name reads as text until it is clicked into, and gives way so the
   row's buttons stay on its line. */
.draw-mark-row .draw-mark-name {
  flex: 1 1 0;
  width: 0;
  height: 22px;
  padding: 0 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  outline: none;
}
.draw-mark-name::placeholder {
  color: var(--text-primary);
  opacity: 0.85;
}
.draw-mark-name:hover {
  border-color: rgba(255, 255, 255, 0.14);
}
.draw-mark-name:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
}
.draw-mark-row.hidden-mark .draw-mark-name,
.draw-mark-row.hidden-mark .draw-mark-swatch {
  opacity: 0.45;
}
/* What an application's row action said (a measurement, a confirmation), under
   the row; empty, it takes no room. */
.draw-mark-note {
  order: 2;
  flex-basis: 100%;
  padding: 0 0 2px 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.4px;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}
.draw-mark-note:empty {
  display: none;
}
/* Busy, but focusable: disabling the pressed button would drop focus. */
.draw-mark-action[aria-disabled='true'] {
  opacity: 0.5;
  cursor: progress;
}
.draw-mark-colors {
  /* Right after its swatch for keyboard and screen readers, shown last. */
  order: 1;
  flex-basis: 100%;
  padding: 2px 0 4px 16px;
}
.draw-clear-btn {
  flex: 0 0 auto;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
}
.draw-hint {
  flex-basis: 100%;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  line-height: 1.4;
}
body.gev-drawing #cesiumContainer canvas {
  cursor: crosshair;
}

/* UTILITIES ▸ Import: one row per imported file, and the drop-target outline */
.geo-import-list {
  display: none;
  flex-direction: column;
  gap: 4px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.geo-import-list.visible {
  display: flex;
}
.geo-import-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.geo-import-swatch {
  flex: 0 0 8px;
  height: 8px;
  border-radius: 2px;
}
/* KML/KMZ draw with the styles written in the file, so the swatch shows a
   hatch instead of a color the globe does not use. */
.geo-import-swatch.own-styles {
  background: repeating-linear-gradient(
    45deg,
    var(--text-dim) 0 1px,
    transparent 1px 3px
  );
  box-shadow: inset 0 0 0 1px var(--text-dim);
}
.geo-import-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.6px;
  color: var(--text-primary);
}
.geo-import-action {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: var(--text-dim);
  cursor: pointer;
}
.geo-import-action:hover,
.geo-import-action:focus-visible {
  color: var(--text-primary);
  border-color: var(--accent);
}
.geo-import-action .material-symbols-outlined {
  font-size: 14px;
}
.geo-import-hint:empty {
  display: none;
}
body.gev-geo-import-drag #cesiumContainer {
  outline: 2px dashed var(--accent);
  outline-offset: -6px;
}

/* Proximity / All segmented control under the 3D toggle */
#models3d-mode-row {
  min-width: 184px;
}
.pp-mode-seg {
  display: flex;
  flex: 1;
}
.pp-mode-btn:not(.gev-segment) {
  flex: 1;
  height: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast);
}
.pp-mode-btn:not(.gev-segment):hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
.pp-mode-btn:not(.gev-segment).active {
  background: var(--accent);
  color: #000;
}

/* These controls also move into Cockpit Display; keep focus on the control
   itself and inside clipped button groups, independent of selection color. */
.pp-toggle-btn:focus-visible,
.pp-select:focus-visible,
.pp-mode-btn:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: -3px;
}

.pp-mode-btn:focus-visible {
  box-shadow: inset 0 0 0 4px #061014;
}

#clean-view-toggle {
  width: var(--pp-expanded-width);
}

#clean-view-exit {
  position: fixed;
  top: 18px;
  right: 50%;
  transform: translateX(50%);
  z-index: 300;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(8, 10, 14, 0.88);
  color: #d9f7ff;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.8px;
  padding: 8px 14px;
  cursor: pointer;
  display: none;
}

body.ui-clean-view #clean-view-exit {
  display: inline-flex;
}

body.ui-clean-view #title-bar,
body.ui-clean-view #style-indicator,
body.ui-clean-view #top-center-actions,
body.ui-clean-view #global-loading-status,
body.ui-clean-view #traffic-sync-chip,
body.ui-clean-view #cctv-sync-chip,
body.ui-clean-view #pp-toggles,
body.ui-clean-view #param-slider-panel,
body.ui-clean-view #data-panel,
body.ui-clean-view #cctv-panel,
body.ui-clean-view #radio-panel,
body.ui-clean-view #global-context-panel,
body.ui-clean-view #space-missions-panel,
body.ui-clean-view #utilities-panel,
body.ui-clean-view #scene-panel {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.ui-clean-view #scene-runtime.active {
  opacity: 1;
  visibility: visible;
}

/* ── Detection Toggle States ─────────────────── */
#detection-toggle.active {
  border-color: rgba(0, 255, 80, 0.6);
  background: rgba(0, 255, 80, 0.1);
  box-shadow: 0 0 12px rgba(0, 255, 80, 0.15);
}

#detection-toggle.active .pp-label {
  color: rgba(0, 255, 80, 0.9);
}

#detection-toggle.active .pp-icon {
  color: rgba(0, 255, 80, 0.9);
  text-shadow: 0 0 6px rgba(0, 255, 80, 0.5);
}

#detection-toggle.panoptic,
#detection-toggle.god {
  border-color: rgba(0, 255, 80, 0.8);
  background: rgba(0, 255, 80, 0.18);
  box-shadow: 0 0 16px rgba(0, 255, 80, 0.25);
  animation: detection-pulse 2s ease-in-out infinite;
}

@keyframes detection-pulse {
  0%,
  100% {
    box-shadow: 0 0 12px rgba(0, 255, 80, 0.15);
  }
  50% {
    box-shadow: 0 0 22px rgba(0, 255, 80, 0.35);
  }
}

/* ── Parameter Slider Panel ──────────────────── */
#param-slider-panel {
  display: none;
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  bottom: auto;
  z-index: 95;
  width: 100%;
  max-height: min(38vh, 360px);
  box-sizing: border-box;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px 16px;
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition:
    opacity var(--transition-smooth),
    visibility var(--transition-smooth),
    transform var(--transition-smooth);
}

#param-slider-panel::-webkit-scrollbar {
  display: none;
}

#param-slider-panel.active {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Display owns the constrained desktop scroll surface. Keeping Parameters as
 * a second scroll container traps wheel/touch input at its boundary and lets
 * the flex column compress newly added preset rows below the visible panel. */
#pp-toggles:not(.collapsed) > .pp-panel-body > #param-slider-panel.active {
  flex: 0 0 auto;
  max-height: none;
  overflow-y: visible;
}

.param-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.param-panel-title {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 2.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  white-space: nowrap;
}

.param-panel-divider {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--glass-border), transparent);
}

#param-slider-panel:not(.collapsed) .param-panel-divider {
  background: linear-gradient(
    90deg,
    rgb(0 212 255 / 28%),
    rgba(0, 212, 255, 0.18) 58%,
    transparent
  );
}

.param-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.param-slider-row:last-child {
  margin-bottom: 0;
}

/* One label column for every parameter, as wide as the longest translated
   label, so all slider tracks start and end at the same x. */
html:not([lang='en']) #param-sliders {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: center;
  gap: 10px;
}

html:not([lang='en']) .param-slider-row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  margin-bottom: 0;
}

.param-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--text-secondary);
  min-width: 72px;
  flex-shrink: 0;
}

.param-slider {
  flex: 1;
  min-width: 0;
}

/* Touch: Draw's swatches keep their small dots but answer a 24px target. */
@media (pointer: coarse) {
  #utilities-panel .draw-color,
  #utilities-panel .draw-mark-swatch {
    position: relative;
  }

  #utilities-panel .draw-color::before,
  #utilities-panel .draw-mark-swatch::before {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    content: '';
  }
}
/* ── Top-center Globe Actions ────────────────── */
#top-center-actions {
  position: fixed;
  top: 32px;
  left: 50%;
  z-index: 100;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

#top-center-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--text-secondary);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    opacity var(--transition-fast),
    transform var(--transition-fast);
  outline: none;
}

#top-center-actions button:hover,
#top-center-actions button:focus-visible {
  border-color: var(--glass-border-hover);
  background: rgba(255, 255, 255, 0.06);
  transform: scale(1.1);
}

#top-center-actions button:active {
  transform: scale(0.95);
}

#top-center-actions button:disabled {
  cursor: wait;
  opacity: 0.55;
  transform: none;
}

#top-center-actions .material-symbols-outlined {
  font-size: 18px;
}

#tilt-map-view[aria-pressed='true'] {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.18);
}

#north-up-view {
  --camera-heading: 0deg;
  position: relative;
}

.camera-compass-n {
  position: absolute;
  top: 2px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}

#north-up-view .camera-compass-needle {
  font-size: 17px;
  transform: rotate(calc(-1 * var(--camera-heading)));
  transition: transform var(--transition-fast);
}

#global-loading-status {
  position: fixed;
  top: 74px;
  left: 50%;
  z-index: 102;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid rgba(0, 212, 255, 0.24);
  background: rgba(3, 10, 18, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: rgba(170, 252, 255, 0.92);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 1.35px;
  text-transform: uppercase;
  transform: translateX(-50%);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.34),
    0 0 14px rgba(0, 212, 255, 0.08);
  pointer-events: none;
}
#global-loading-status[hidden] {
  display: none;
}
#global-loading-label {
  color: rgba(184, 244, 255, 0.92);
}
#global-loading-detail {
  min-width: 34px;
  max-width: min(220px, 38vw);
  overflow: hidden;
  color: #00e1ff;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Translated retry details ("cámaras ALPR · reintento en 53 s") run longer
   than the English one; English keeps its 220px. */
html:not([lang='en']) #global-loading-detail {
  max-width: min(300px, 46vw);
}
#global-loading-status:is(
  [data-state='complete'],
  [data-state='cancelled'],
  [data-state='key-required'],
  [data-state='error']
) {
  justify-content: center;
  text-align: center;
}
#global-loading-status:is(
    [data-state='complete'],
    [data-state='cancelled'],
    [data-state='key-required'],
    [data-state='error']
  )
  #global-loading-detail {
  display: none;
}
#global-loading-status[data-state='error'] {
  border-color: rgba(255, 98, 82, 0.55);
  color: #ff9b8e;
}
#global-loading-status[data-state='error'] #global-loading-label,
#global-loading-status[data-state='error'] #global-loading-detail {
  color: #ff9b8e;
}
#global-loading-status[data-state='cancelled'] {
  color: #ffd488;
}
#global-loading-status:is([data-state='retry'], [data-state='key-required']) {
  border-color: rgba(255, 212, 136, 0.55);
}
#global-loading-status:is([data-state='retry'], [data-state='key-required'])
  #global-loading-label,
#global-loading-status:is([data-state='retry'], [data-state='key-required'])
  #global-loading-detail {
  color: #ffd488;
}
#global-loading-status[data-state='cancelled'] #global-loading-label,
#global-loading-status[data-state='cancelled'] #global-loading-detail {
  color: #ffd488;
}
/* A last-known notice is a sentence with the entity's id on a second line;
   the id is shown whole (a vessel UUID is 36 characters). */
#global-loading-status[data-state='last-known'] {
  flex-direction: column;
  gap: 3px;
  border-color: rgba(255, 212, 136, 0.55);
  text-align: center;
}
#global-loading-status[data-state='last-known'] #global-loading-label {
  color: #ffd488;
}
#global-loading-status[data-state='last-known'] #global-loading-detail {
  max-width: none;
  color: rgba(255, 228, 176, 0.82);
  letter-spacing: 1.2px;
  text-align: center;
  text-transform: none;
}
#global-loading-status[data-state='acquiring'] {
  border-color: rgba(0, 212, 255, 0.42);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.34),
    0 0 18px rgba(0, 212, 255, 0.12);
}

.share-icon {
  font-size: 16px;
  line-height: 1;
}

#traffic-sync-chip,
#cctv-sync-chip {
  position: fixed;
  top: 112px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 101;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid rgba(0, 212, 255, 0.24);
  background: rgba(3, 10, 18, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: rgba(170, 252, 255, 0.92);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 1.35px;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.34),
    0 0 14px rgba(0, 212, 255, 0.08);
}

/* Stacked below the traffic chip so both can show at once */
#cctv-sync-chip {
  top: 146px;
}

#traffic-sync-chip.visible,
#cctv-sync-chip.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#traffic-sync-label,
#cctv-sync-label {
  color: rgba(184, 244, 255, 0.92);
}

#traffic-sync-progress,
#cctv-sync-progress {
  color: #00e1ff;
  font-weight: 600;
  letter-spacing: 1.6px;
  min-width: 34px;
  text-align: right;
}

/* The settled traffic chip carries no progress number — the label's coverage
   figure is the honest one. Collapse the empty slot so the chip closes up
   instead of trailing a 34px stub and its flex gap. */
#traffic-sync-progress:empty {
  display: none;
}

/* ── Split-flap chip text ─────────────────────────────────────────
   Per-character departure-board flip when a chip label changes.
   Planned by src/splitFlap.js and rendered by SplitFlapText.vue, which
   lays out one cell per character on the change and strips them again
   once the cascade lands.

   The DOM text is the truth and its node never moves. A chip label is
   a .gev-flap-text span holding one long-lived Text node, plus an
   aria-hidden .gev-flap-cells sibling, and a label change is only
   `node.data = next`.
   During a cascade the host takes .gev-flap-active, which clips the
   real text out of view and lets the cells stand in for it. The cells
   carry no text at all: both glyphs are generated content (::before =
   outgoing, ::after = incoming), and generated content never reaches
   textContent. That is what keeps QA pins honest, and it lets the
   cells be rebuilt
   freely while the aria-live region sees only one characterData
   change per label update.

   Motion matches the cockpit odometer roll (.cockpit-roll-token):
   same cubic-bezier, same reduced-motion treatment. Only the
   left-to-right stagger is new — that cascade is what makes it read
   as a Solari board rather than a counter.
   ------------------------------------------------------------------ */
/* While the flaps play, the real text is clipped out of view but stays in
   the DOM and in the accessibility tree — same clipped-but-present treatment
   as .world-overlay-accessibility. It is never removed or reparented. */
.gev-flap-host.gev-flap-active > .gev-flap-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* Permanent sibling: empty (and so zero-width) whenever no cascade is running. */
.gev-flap-cells {
  white-space: pre;
}
.gev-flap-cell {
  display: inline-block;
  /* Chip labels carry real spaces; a collapsed space would drop a column. */
  white-space: pre;
}
/* The incoming glyph is in flow, so it — not any text node — is what gives
   the column its natural width. EVERY column has one, including a column the
   new string does not reach: that one carries a blank, so it holds its width
   and its index for the whole cascade instead of collapsing. Collapsing would
   stack the absolutely-positioned outgoing glyphs on one x and would let a
   later glyph slide into an earlier column. */
.gev-flap-cell::after {
  content: attr(data-flap-next);
  display: inline-block;
  white-space: pre;
}
.gev-flap-cell.is-flapping {
  position: relative;
  /* Relative to the chip's own font size, so the foreshortening reads the
     same on the 8px status chips as it would anywhere else. */
  perspective: 4em;
}
.gev-flap-cell.is-flapping::before,
.gev-flap-cell.is-flapping::after {
  transform-origin: 50% 50%;
  backface-visibility: hidden;
}
.gev-flap-cell.is-flapping::after {
  animation: gev-flap-in var(--gev-flap-dur, 190ms)
    cubic-bezier(0.2, 0.75, 0.25, 1) var(--gev-flap-delay, 0ms) both;
}
/* Out of flow, so the outgoing glyph overlays its own column without
   affecting layout — one per column, each anchored to its own cell box. */
.gev-flap-cell.is-flapping::before {
  content: attr(data-flap-prev);
  position: absolute;
  top: 0;
  left: 0;
  white-space: pre;
  animation: gev-flap-out var(--gev-flap-dur, 190ms)
    cubic-bezier(0.2, 0.75, 0.25, 1) var(--gev-flap-delay, 0ms) both;
}
/* Length changes are eased, never snapped. A GROWING label reserves its new
   columns the moment the cells go in, so splitFlap.js eases from the previous
   on-screen width to the cascade width at the start. A SHRINKING one holds
   every column for the whole cascade, so its ease runs at SETTLEMENT instead,
   from the cascade width down to the natural width — one smooth transition
   after the flaps have landed, rather than columns collapsing underneath
   them. */
.gev-flap-sizing {
  display: inline-block;
  transition: width var(--gev-flap-total, 500ms)
    cubic-bezier(0.2, 0.75, 0.25, 1);
}
/* The old leaf hinges down and away on the cell's midline. */
@keyframes gev-flap-out {
  0% {
    transform: rotateX(0deg);
    opacity: 1;
  }
  48% {
    transform: rotateX(-88deg);
    opacity: 0.5;
  }
  100% {
    transform: rotateX(-90deg);
    opacity: 0;
  }
}
/* The new leaf waits for the old one to clear, then drops in and settles
   with a single small overshoot — the mechanical clack. */
@keyframes gev-flap-in {
  0% {
    transform: rotateX(90deg);
    opacity: 0;
  }
  46% {
    transform: rotateX(90deg);
    opacity: 0;
  }
  78% {
    transform: rotateX(-7deg);
    opacity: 1;
  }
  100% {
    transform: rotateX(0deg);
    opacity: 1;
  }
}
/* Matches the .cockpit-roll-track treatment: collapse the duration rather
   than dropping the animation, so the final frame still lands the glyph.
   src/splitFlap.js also checks the query and takes the instant path, so
   this is the belt to that braces. */
@media (prefers-reduced-motion: reduce) {
  .gev-flap-cell.is-flapping::before,
  .gev-flap-cell.is-flapping::after {
    animation-duration: 1ms;
    animation-delay: 0ms;
  }
  .gev-flap-sizing {
    transition-duration: 1ms;
  }
}

/* ── Render failure notice ───────────────────── */
/* Above the loading screen, so a globe that fails while it loads says so too,
   and above floating panels such as the Québec camera viewer (2000). */
#render-failure {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2001;
  box-sizing: border-box;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 20px 22px;
  background: var(--glass-bg);
  border: 1px solid #ff7272;
  border-radius: 12px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 0 24px rgba(255, 88, 88, 0.18);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
}

#render-failure-title {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ff7272;
}

#render-failure p {
  margin: 0 0 10px;
}

#render-failure .render-failure-detail {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

#render-failure .render-failure-hint {
  font-size: 12px;
  color: var(--text-secondary);
}

#render-failure .render-failure-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

#render-failure .gev-action-button {
  font-size: 11px;
  padding: 8px 14px;
}

@media (pointer: coarse) {
  #render-failure .gev-action-button {
    min-height: 44px;
  }
}

/* ── Toast Notification ──────────────────────── */
#toast {
  position: fixed;
  bottom: calc(100px + var(--world-timeline-lift, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 200;
  padding: 10px 24px;
  background: var(--glass-bg);
  border: 1px solid var(--accent);
  border-radius: 8px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}

#toast.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
/* ── Aircraft Cockpit View ─────────────────── */
#cockpit-entry {
  position: fixed;
  left: calc(50% + 270px);
  bottom: 34px;
  z-index: 151;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(0, 220, 255, 0.5);
  border-radius: 8px;
  background: rgba(2, 12, 18, 0.9);
  color: #dceeff;
  font: 600 10px/1 var(--font-mono);
  letter-spacing: 0.14em;
  box-shadow: 0 0 18px rgba(0, 220, 255, 0.14);
  cursor: pointer;
}

#cockpit-entry[hidden],
#cockpit-hud[hidden] {
  display: none;
}
#cockpit-entry:hover,
#cockpit-entry:focus-visible {
  border-color: #00dcff;
  color: #fff;
  outline: none;
}
#cockpit-entry .material-symbols-outlined {
  color: #00dcff;
  font-size: 18px;
}
/* The same entry under the selected vehicle's Intel HUD readout. The HUD
   lets clicks through, so the button takes them back. */
#intel-hud #cockpit-entry-readout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--hud-border);
  border-radius: 6px;
  background: rgba(2, 12, 18, 0.72);
  font-size: 10px;
  letter-spacing: 0.14em;
  pointer-events: auto;
  cursor: pointer;
}
#intel-hud #cockpit-entry-readout[hidden] {
  display: none;
}
#intel-hud #cockpit-entry-readout:hover,
#intel-hud #cockpit-entry-readout:focus-visible {
  border-color: var(--hud-color);
  outline: none;
}
#intel-hud #cockpit-entry-readout .material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-size: 16px;
  text-transform: none;
}
#cockpit-entry kbd {
  padding: 3px 5px;
  border: 1px solid rgba(220, 238, 255, 0.25);
  border-radius: 4px;
  color: rgba(220, 238, 255, 0.6);
  font: inherit;
}

#cockpit-hud {
  --cockpit-accent: #00dcff;
  /* Matches EMERGENCY_TINT_CSS in src/data/aircraftEmergency.js. */
  --cockpit-emergency: #ff4444;
  --cockpit-side-panel-width: min(340px, 28vw);
  /* HUD bottom offset + tallest scaled telemetry block + 20px clear border. */
  --cockpit-bottom-rail-safe: calc(clamp(84px, 11vh, 118px) + 100px);
  /* The phone Display/Radio row shares the visor inset with the roll arc. */
  --cockpit-visor-top: clamp(62px, 9vh, 90px);
  position: fixed;
  inset: 0;
  z-index: 145;
  overflow: hidden;
  pointer-events: none;
  color: #f4fbff;
  font-family: var(--font-mono);
  text-shadow:
    0 0 10px color-mix(in srgb, var(--cockpit-accent) 60%, transparent),
    0 1px 2px #000;
  perspective: 920px;
}
#cockpit-hud[data-layer='military'] {
  --cockpit-accent: #ffb800;
}
.cockpit-visor-shell {
  position: absolute;
  inset: var(--cockpit-visor-top) clamp(18px, 3vw, 48px) clamp(38px, 5vh, 56px);
  transform-style: preserve-3d;
  perspective: 880px;
}
.cockpit-roll-arc {
  position: absolute;
  top: 2px;
  left: 50%;
  width: min(620px, 56vw);
  height: 96px;
  transform: translateX(-50%) rotateX(-8deg);
  transform-style: preserve-3d;
}
.cockpit-roll-arc::after {
  content: '';
  position: absolute;
  inset: 18px 6% 0;
  border-top: 1px solid
    color-mix(in srgb, var(--cockpit-accent) 62%, transparent);
  border-radius: 50%;
  opacity: 0.72;
}
.cockpit-roll-arc span {
  position: absolute;
  left: 50%;
  top: 0;
  color: rgba(244, 251, 255, 0.46);
  font-size: 8px;
  letter-spacing: 0.1em;
  transform: translateX(calc(-50% + (var(--slot) * 74px)))
    translateY(calc(var(--depth) * 9px)) rotateZ(calc(var(--slot) * 4deg))
    rotateY(calc(var(--slot) * -5deg));
}
.cockpit-roll-arc span::after {
  content: '';
  display: block;
  width: 1px;
  height: calc(11px + (3 - var(--depth)) * 2px);
  margin: 5px auto 0;
  background: color-mix(in srgb, var(--cockpit-accent) 62%, transparent);
}
.cockpit-roll-arc span.active {
  color: #fff;
  font-size: 10px;
}
.cockpit-pitch-rail {
  position: absolute;
  top: 25%;
  bottom: 21%;
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  align-items: center;
  color: rgba(244, 251, 255, 0.38);
  font-size: 8px;
  letter-spacing: 0.08em;
  transform-style: preserve-3d;
}
.cockpit-pitch-rail-left {
  left: clamp(190px, 22vw, 330px);
  text-align: right;
  transform: rotateY(24deg) translateZ(-18px);
}
.cockpit-pitch-rail-right {
  right: clamp(190px, 22vw, 330px);
  text-align: left;
  transform: rotateY(-24deg) translateZ(-18px);
}
/* `.left-panel-open`: a panel in the left stack is open, a page-root class
   (src/ui/rail/rootClass.js). */
body.cockpit-mode:is(
    .left-panel-open *,
    #left-panel-stack > .panel-collapsible:not(.collapsed)
  )
  .cockpit-pitch-rail-left {
  opacity: 0;
  transition: opacity 0.25s;
}
.cockpit-pitch-rail span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.cockpit-pitch-rail-left span {
  justify-content: flex-end;
}
.cockpit-pitch-rail span::after {
  content: '';
  width: 24px;
  border-top: 1px solid
    color-mix(in srgb, var(--cockpit-accent) 46%, transparent);
}
.cockpit-pitch-rail-right span::after {
  order: -1;
}
.cockpit-pitch-rail span.active {
  color: var(--cockpit-accent);
}
.cockpit-pitch-rail span.active::after {
  width: 42px;
  border-color: var(--cockpit-accent);
}
.cockpit-horizon-guide {
  position: absolute;
  top: 46%;
  left: 50%;
  display: grid;
  grid-template-columns: minmax(74px, 190px) auto minmax(74px, 190px);
  align-items: center;
  gap: 16px;
  width: min(470px, 42vw);
  transform: translate(-50%, -50%) translateZ(22px);
  color: color-mix(in srgb, var(--cockpit-accent) 72%, white);
}
.cockpit-horizon-guide span {
  border-top: 1px solid currentColor;
}
.cockpit-horizon-guide span:first-child {
  transform: rotateZ(2deg);
  transform-origin: right;
}
.cockpit-horizon-guide span:last-child {
  transform: rotateZ(-2deg);
  transform-origin: left;
}
.cockpit-horizon-guide small {
  font-size: 7px;
  letter-spacing: 0.16em;
}
.cockpit-route-direction {
  --route-angle: 0deg;
  position: absolute;
  z-index: 3;
  /* Keep the cue in one predictable center slot. Its rotation communicates
     relative destination bearing; lateral movement made it look like a random
     scene arrow and allowed it to collide with the speed/heading readouts. */
  top: 62%;
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 5px;
  color: color-mix(in srgb, var(--cockpit-accent) 24%, #79b8ff);
  opacity: 0.84;
  transform: translate(-50%, -50%) translateZ(24px);
  transition: opacity 180ms ease;
  filter: drop-shadow(
    0 0 8px color-mix(in srgb, var(--cockpit-accent) 34%, transparent)
  );
}
.cockpit-route-direction[hidden] {
  display: none;
}
.cockpit-route-direction .cockpit-route-chevron {
  display: block;
  width: clamp(56px, 6vw, 78px);
  height: clamp(56px, 6vw, 78px);
  overflow: visible;
  color: color-mix(in srgb, var(--cockpit-accent) 28%, #79b8ff);
  fill: currentColor;
  stroke: color-mix(in srgb, var(--cockpit-accent) 58%, #d8f3ff);
  stroke-width: 0.7px;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(213, 242, 255, 0.68))
    drop-shadow(0 5px 6px rgba(0, 53, 102, 0.5));
  /* Present the direction cue on the apparent ground plane while its parent
     remains locked to the same fixed HUD position. */
  transform: perspective(220px) rotateX(62deg) rotateZ(var(--route-angle))
    scaleY(1.35);
  transform-origin: center;
  transition: transform 180ms ease;
}
.cockpit-route-direction small {
  padding: 2px 5px;
  border: 1px solid color-mix(in srgb, var(--cockpit-accent) 20%, transparent);
  border-radius: 3px;
  background: rgba(0, 7, 12, 0.24);
  font-size: 7px;
  text-align: center;
  letter-spacing: 0.14em;
  white-space: nowrap;
}
.cockpit-altitude-rim {
  --cockpit-keyhole-radius: min(40vw, 52vh);
  position: absolute;
  z-index: 2;
  top: calc(50vh - var(--cockpit-keyhole-radius) + 20px);
  right: calc(50vw - var(--cockpit-keyhole-radius) + 20px);
  bottom: auto;
  width: 230px;
  height: calc((var(--cockpit-keyhole-radius) - 20px) * 2);
  overflow: hidden;
  color: var(--cockpit-accent);
  opacity: 0.9;
}
/* A bridge has no altitude tape; course over ground replaces the readout. */
#cockpit-altitude-rim[hidden] {
  display: none;
}
.cockpit-altitude-rim-label {
  position: absolute;
  top: 20%;
  right: calc(12px + (0.2 * (var(--cockpit-keyhole-radius) - 20px)));
  color: color-mix(in srgb, var(--cockpit-accent) 82%, white);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.18em;
  white-space: nowrap;
}
.cockpit-altitude-rim-rail {
  position: absolute;
  inset: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.04) 10%,
    rgba(0, 0, 0, 0.28) 24%,
    #000 42%,
    #000 58%,
    rgba(0, 0, 0, 0.28) 76%,
    rgba(0, 0, 0, 0.04) 90%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.04) 10%,
    rgba(0, 0, 0, 0.28) 24%,
    #000 42%,
    #000 58%,
    rgba(0, 0, 0, 0.28) 76%,
    rgba(0, 0, 0, 0.04) 90%,
    transparent 100%
  );
}
.cockpit-altitude-rim-rail::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  box-sizing: border-box;
  width: calc((var(--cockpit-keyhole-radius) - 20px) * 2);
  height: calc((var(--cockpit-keyhole-radius) - 20px) * 2);
  border: 2px solid color-mix(in srgb, var(--cockpit-accent) 72%, transparent);
  border-radius: 50%;
  box-shadow: 5px 0 18px
    color-mix(in srgb, var(--cockpit-accent) 18%, transparent);
}
.cockpit-altitude-rim-scale {
  position: absolute;
  inset: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.03) 9%,
    rgba(0, 0, 0, 0.22) 23%,
    #000 41%,
    #000 59%,
    rgba(0, 0, 0, 0.22) 77%,
    rgba(0, 0, 0, 0.03) 91%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.03) 9%,
    rgba(0, 0, 0, 0.22) 23%,
    #000 41%,
    #000 59%,
    rgba(0, 0, 0, 0.22) 77%,
    rgba(0, 0, 0, 0.03) 91%,
    transparent 100%
  );
}
.cockpit-altitude-rim-scale > span {
  position: absolute;
  top: calc(50% + (var(--slot) * 8%));
  right: calc(7px + (var(--curve) * (var(--cockpit-keyhole-radius) - 20px)));
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(244, 251, 255, 0.68);
  transform: translateY(-50%) rotateZ(calc(var(--slot) * -1.7deg));
  transform-origin: right center;
  transition:
    top 120ms linear,
    right 120ms linear,
    transform 120ms linear;
}
.cockpit-altitude-rim-scale > span i {
  order: 2;
  display: block;
  width: 20px;
  border-top: 1px solid
    color-mix(in srgb, var(--cockpit-accent) 58%, transparent);
}
.cockpit-altitude-rim-scale > span b {
  min-width: 46px;
  padding: 1px 3px;
  border-radius: 2px;
  background: rgba(0, 7, 12, 0.28);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: right;
}
.cockpit-altitude-rim-scale > span.major {
  color: rgba(244, 251, 255, 0.9);
}
.cockpit-altitude-rim-scale > span.major i {
  width: 32px;
  border-color: color-mix(in srgb, var(--cockpit-accent) 86%, transparent);
}
.cockpit-altitude-rim-pointer {
  position: absolute;
  top: 50%;
  right: 0;
  display: flex;
  align-items: center;
  color: #fff;
  transform: translateY(-50%);
  text-shadow: 0 0 12px var(--cockpit-accent);
}
.cockpit-altitude-rim-pointer strong {
  min-width: 48px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: right;
}
.cockpit-altitude-rim-pointer .material-symbols-outlined {
  margin-left: 4px;
  color: var(--cockpit-accent);
  font-size: 24px;
  font-variation-settings:
    'FILL' 1,
    'wght' 600;
  animation: cockpit-altitude-pointer 1.8s ease-in-out infinite;
}
@keyframes cockpit-altitude-pointer {
  50% {
    transform: translateX(-3px);
    filter: brightness(1.35);
  }
}
.cockpit-altitude-rim.unavailable {
  opacity: 0.24;
}
.cockpit-speed-rim {
  --speed-tape-inset: clamp(112px, 9vw, 148px);
  right: auto;
  left: calc(50vw - var(--cockpit-keyhole-radius) + 20px);
  width: 300px;
}
.cockpit-speed-rim .cockpit-altitude-rim-label {
  right: auto;
  left: var(--speed-tape-inset);
}
.cockpit-speed-rim .cockpit-altitude-rim-rail::before {
  right: auto;
  left: 0;
  box-shadow: -5px 0 18px
    color-mix(in srgb, var(--cockpit-accent) 18%, transparent);
}
.cockpit-speed-rim .cockpit-altitude-rim-scale > span {
  right: auto;
  left: calc(1px + (var(--curve) * (var(--cockpit-keyhole-radius) - 20px)));
  flex-direction: row-reverse;
  /* Speed rises toward the top of the tape; altitude intentionally runs the
     opposite way on the mirrored right-hand ruler. */
  top: calc(50% - (var(--slot) * 8%));
  transform: translateY(-50%) rotateZ(calc(var(--slot) * 1.7deg));
  transform-origin: left center;
}
.cockpit-speed-rim .cockpit-altitude-rim-scale > span b {
  text-align: left;
}
.cockpit-speed-rim .cockpit-altitude-rim-pointer {
  right: auto;
  left: 0;
}
.cockpit-speed-rim .cockpit-altitude-rim-pointer strong {
  text-align: left;
}
.cockpit-speed-rim .cockpit-altitude-rim-pointer .material-symbols-outlined {
  margin-right: 4px;
  margin-left: 0;
  animation-name: cockpit-speed-pointer;
}
@keyframes cockpit-speed-pointer {
  50% {
    transform: translateX(3px);
    filter: brightness(1.35);
  }
}
.cockpit-visor-status {
  position: absolute;
  bottom: 3px;
  color: color-mix(in srgb, var(--cockpit-accent) 54%, transparent);
  font-size: 7px;
  letter-spacing: 0.22em;
}
.cockpit-visor-status-left {
  left: clamp(110px, 15vw, 220px);
  transform: rotateY(22deg);
}
.cockpit-visor-status-right {
  right: clamp(110px, 15vw, 220px);
  transform: rotateY(-22deg);
}
.cockpit-topline {
  position: absolute;
  z-index: 5;
  top: clamp(18px, 3vh, 34px);
  left: clamp(22px, 4vw, 58px);
  right: clamp(22px, 4vw, 58px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 24px;
}
.cockpit-topline > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cockpit-kicker,
.cockpit-readout-label {
  color: var(--cockpit-accent);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
}
#cockpit-callsign {
  font-size: 18px;
  letter-spacing: 0.12em;
}
.cockpit-aircraft-meta {
  color: rgba(244, 251, 255, 0.48);
  font-size: 7px;
  letter-spacing: 0.16em;
}
.cockpit-aircraft-meta.emergency {
  color: var(--cockpit-emergency);
  font-weight: 600;
}
.cockpit-mode-chip {
  margin-top: 2px;
  padding: 7px 11px;
  border: 1px solid color-mix(in srgb, var(--cockpit-accent) 45%, transparent);
  border-radius: 20px;
  background: rgba(0, 7, 12, 0.62);
  color: var(--cockpit-accent);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
}
.cockpit-live-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--cockpit-accent);
  box-shadow: 0 0 8px var(--cockpit-accent);
  animation: cockpit-live 1.6s ease-in-out infinite;
}
@keyframes cockpit-live {
  50% {
    opacity: 0.35;
  }
}
.cockpit-readout {
  position: relative;
  display: grid;
  min-width: 118px;
  padding: 6px 10px 7px;
  border-top: 1px solid
    color-mix(in srgb, var(--cockpit-accent) 50%, transparent);
  border-bottom: 1px solid
    color-mix(in srgb, var(--cockpit-accent) 18%, transparent);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 7, 12, 0.34),
    transparent
  );
  transform-style: preserve-3d;
}
.cockpit-speed {
  justify-self: end;
  text-align: right;
  transform: perspective(760px) rotateY(10deg) translateZ(-5px);
  transform-origin: right center;
}
.cockpit-altitude {
  justify-self: start;
  text-align: left;
  transform: perspective(760px) rotateY(-10deg) translateZ(-5px);
  transform-origin: left center;
}
.cockpit-readout strong {
  margin-top: 1px;
  font-size: clamp(30px, 3.6vw, 48px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.06em;
  white-space: nowrap;
}
.cockpit-roll-token {
  position: relative;
  display: inline-block;
  min-width: 0.56em;
  height: 1em;
  overflow: hidden;
  line-height: 1;
  text-align: center;
  vertical-align: -0.08em;
}
/* Grouping and decimal separators (a space or comma in Spanish and Russian)
   get a narrow cell; English keeps the full 0.56em cell. */
html:not([lang='en']) .cockpit-roll-token.is-separator {
  min-width: 0.3em;
}
.cockpit-roll-token.is-rolling {
  color: color-mix(in srgb, currentColor 92%, var(--cockpit-accent));
  text-shadow: 0 0 10px
    color-mix(in srgb, var(--cockpit-accent) 35%, transparent);
}
.cockpit-roll-track {
  display: flex;
  flex-direction: column;
  height: 2em;
  will-change: transform;
}
.cockpit-roll-track > span {
  display: block;
  flex: 0 0 1em;
  height: 1em;
  line-height: 1;
}
.cockpit-roll-token.roll-up .cockpit-roll-track {
  animation: cockpit-number-roll-up 200ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}
.cockpit-roll-token.roll-down .cockpit-roll-track {
  animation: cockpit-number-roll-down 200ms cubic-bezier(0.2, 0.75, 0.25, 1)
    both;
}
@keyframes cockpit-number-roll-up {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-1em);
  }
}
@keyframes cockpit-number-roll-down {
  from {
    transform: translateY(-1em);
  }
  to {
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .cockpit-roll-token .cockpit-roll-track {
    animation-duration: 1ms;
  }
}
.cockpit-readout-unit {
  margin-top: 2px;
  color: rgba(244, 251, 255, 0.7);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
}
.cockpit-reticle {
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%) translateZ(34px);
  color: var(--cockpit-accent);
  font-size: clamp(30px, 3vw, 44px);
  font-variation-settings: 'wght' 200;
  opacity: 0.8;
}
.cockpit-compass {
  position: absolute;
  left: 50%;
  bottom: clamp(44px, 7vh, 72px);
  width: min(760px, 72vw);
  transform: translateX(-50%) rotateX(7deg) translateZ(18px);
  transform-style: preserve-3d;
  perspective: 760px;
  text-align: center;
}
.cockpit-instrument-row {
  display: grid;
  grid-template-columns: minmax(118px, 1fr) auto minmax(118px, 1fr);
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
}
.cockpit-heading-value {
  min-width: 74px;
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.cockpit-heading-value small {
  color: var(--cockpit-accent);
  font-size: 12px;
}
/* Inside the compass, so it outranks the kit icon's own display and
   line height. */
.cockpit-compass .cockpit-heading-caret {
  display: block;
  height: 20px;
  color: var(--cockpit-accent);
  font-size: 28px;
  line-height: 20px;
}
.cockpit-compass-tape {
  position: relative;
  height: 74px;
  margin-top: -2px;
  transform-style: preserve-3d;
}
.cockpit-compass-tape::before {
  content: '';
  position: absolute;
  inset: 10px 2% 0;
  border-top: 1px solid
    color-mix(in srgb, var(--cockpit-accent) 78%, transparent);
  border-radius: 50%;
  background: rgba(0, 7, 12, 0.16);
}
.cockpit-compass-tape span {
  position: absolute;
  top: 8px;
  left: 50%;
  color: rgba(244, 251, 255, 0.52);
  font-size: 12px;
  letter-spacing: 0.12em;
  transform: translateX(calc(-50% + (var(--slot) * 86px)))
    translateY(calc(var(--depth) * 8px)) rotateZ(calc(var(--slot) * 3.6deg))
    rotateY(calc(var(--slot) * -9deg));
}
.cockpit-compass-tape span::before {
  content: '';
  display: block;
  width: 1px;
  height: calc(17px - (var(--depth) * 2px));
  margin: 0 auto 7px;
  background: color-mix(in srgb, var(--cockpit-accent) 70%, transparent);
}
.cockpit-compass-tape span.active {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  text-shadow: 0 0 14px var(--cockpit-accent);
}
.cockpit-position-readout {
  position: absolute;
  right: clamp(24px, 4vw, 58px);
  bottom: clamp(22px, 4vh, 42px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  color: rgba(244, 251, 255, 0.72);
  font-size: 10px;
  letter-spacing: 0.1em;
}
.cockpit-vision-controls {
  display: grid;
  /* The current style grows for a long translated name (ЗВИЧАЙНИЙ). */
  grid-template-columns: 48px minmax(58px, max-content) 48px;
  align-items: stretch;
  gap: 2px;
  margin-top: 2px;
  padding: 2px;
  border: 1px solid color-mix(in srgb, var(--cockpit-accent) 22%, transparent);
  border-radius: 7px;
  background: rgba(0, 7, 12, 0.46);
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
}
.cockpit-vision-controls button {
  display: flex;
  min-width: 0;
  min-height: 31px;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 4px 5px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: rgba(0, 7, 12, 0.38);
  color: rgba(244, 251, 255, 0.64);
  font: 700 7px/1 var(--font-mono);
  letter-spacing: 0.08em;
  cursor: pointer;
}
.cockpit-vision-controls button:hover,
.cockpit-vision-controls button:focus-visible {
  border-color: color-mix(in srgb, var(--cockpit-accent) 62%, transparent);
  color: #fff;
  outline: none;
}
.cockpit-vision-controls .material-symbols-outlined {
  font-size: 14px;
}
.cockpit-vision-controls small {
  font: 700 6px/1 var(--font-mono);
  letter-spacing: 0.1em;
}
.cockpit-vision-current {
  flex-direction: column;
}
.cockpit-vision-current small {
  color: color-mix(in srgb, var(--cockpit-accent) 70%, #fff);
}
.cockpit-vision-current strong {
  color: #fff;
  font: 700 9px/1 var(--font-mono);
  letter-spacing: 0.12em;
}
.cockpit-vision-controls .cockpit-vision-current {
  border-color: var(--cockpit-accent);
  background: color-mix(
    in srgb,
    var(--cockpit-accent) 10%,
    rgba(0, 7, 12, 0.72)
  );
  box-shadow: 0 0 10px
    color-mix(in srgb, var(--cockpit-accent) 30%, transparent);
}
.cockpit-route-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 2px 6px 10px 8px;
  border-bottom: 1px solid
    color-mix(in srgb, var(--cockpit-accent) 22%, transparent);
  color: rgba(224, 247, 255, 0.9);
  font: 7px/1.25 var(--font-mono);
  letter-spacing: 0.09em;
}
.cockpit-route-card[hidden] {
  display: none;
}
.cockpit-route-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cockpit-route-kicker {
  flex: 0 0 auto;
  color: var(--cockpit-accent);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.cockpit-route-heading small {
  overflow: hidden;
  color: color-mix(
    in srgb,
    var(--cockpit-accent) 68%,
    rgba(244, 251, 255, 0.46)
  );
  font-size: 5px;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cockpit-route-endpoints {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}
.cockpit-route-airport {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 6px 7px;
  border-left: 1px solid
    color-mix(in srgb, var(--cockpit-accent) 52%, transparent);
  background: rgba(0, 7, 12, 0.3);
}
.cockpit-route-airport > span {
  color: color-mix(in srgb, var(--cockpit-accent) 76%, white);
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.cockpit-route-airport strong {
  overflow: hidden;
  color: #fff;
  font-size: 8px;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cockpit-route-arrow {
  color: var(--cockpit-accent);
  font-size: 15px;
  text-align: center;
}
#view-switcher {
  position: fixed;
  z-index: 146;
  right: 36px;
  bottom: calc(2vh + 4.5rem + var(--world-timeline-lift, 0px));
  display: grid;
  gap: 6px;
}
#view-switcher button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid rgba(116, 219, 255, 0.38);
  border-radius: 6px;
  background: rgba(2, 12, 20, 0.82);
  color: #bceeff;
  font: 700 8px/1 var(--font-mono);
  letter-spacing: 0.12em;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.24);
}
#view-switcher button[hidden] {
  display: none;
}
#view-switcher button:hover,
#view-switcher button:focus-visible {
  border-color: #fff;
  color: #fff;
  outline: none;
}
#view-switcher .material-symbols-outlined {
  font-size: 16px;
}
body.cockpit-mode #view-switcher {
  right: auto;
  bottom: max(clamp(128px, 15vh, 150px), env(safe-area-inset-bottom));
  display: flex;
  max-width: calc(100vw - 24px);
  align-items: center;
  justify-content: center;
  margin-bottom: -95px;
  left: 50%;
  transform: translateX(-50%);
}
body.cockpit-mode #view-switcher button {
  flex: 0 1 auto;
  min-width: 0;
  min-height: 28px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(0, 7, 12, 0.74);
  white-space: nowrap;
}
.cockpit-context-window {
  position: absolute;
  z-index: 4;
  top: auto;
  left: var(--cockpit-context-left, clamp(24px, 4vw, 58px));
  bottom: var(--cockpit-bottom-rail-safe);
  display: grid;
  gap: 7px;
  width: var(--cockpit-side-panel-width);
  max-height: min(42vh, 410px);
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 11px 12px 10px;
  border: 1px solid color-mix(in srgb, var(--cockpit-accent) 30%, transparent);
  border-top-color: color-mix(in srgb, var(--cockpit-accent) 64%, transparent);
  border-radius: 8px 24px 24px 8px;
  background: rgba(0, 7, 12, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 28px rgba(0, 0, 0, 0.26);
  transform: perspective(900px) rotateY(4deg) translateZ(18px);
  transform-origin: left center;
  transform-style: preserve-3d;
  pointer-events: auto;
  text-shadow: 0 0 8px
    color-mix(in srgb, var(--cockpit-accent) 45%, transparent);
  scrollbar-color: color-mix(in srgb, var(--cockpit-accent) 45%, transparent)
    transparent;
  scrollbar-width: thin;
  transition:
    width 180ms ease,
    background-color 180ms ease,
    border-radius 180ms ease;
}
#cockpit-context[hidden] {
  display: none;
}
.cockpit-context-window[data-state='uncertain'] {
  border-top-color: rgba(116, 219, 255, 0.72);
}
/* CONTACT LOST reuses the amber the app already spends on unknown/stale inputs
   (.cockpit-context-cohorts > div.unknown, .cockpit-brief-status[data-state="unavailable"]),
   so a held last-known readout never reads as a live one. */
.cockpit-context-window[data-state='lost'] {
  border-top-color: rgba(213, 168, 99, 0.72);
}
/* The Cockpit cards' headers (Contact, the briefing) share their frame: a
   title column over a hairline, a kicker in the accent, and a row of square
   actions. Each card sets only its spacing and sizes. */
.cockpit-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-bottom: 1px solid
    color-mix(in srgb, var(--cockpit-accent) 22%, transparent);
}
.cockpit-card-header > div {
  display: grid;
  gap: 2px;
}
.cockpit-card-kicker {
  color: var(--cockpit-accent);
  font-weight: 700;
}
.cockpit-card-actions {
  display: flex;
}
.cockpit-card-actions button {
  display: grid;
  height: 24px;
  place-items: center;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--cockpit-accent) 30%, transparent);
  border-radius: 5px;
  background: rgba(0, 7, 12, 0.72);
  color: color-mix(in srgb, var(--cockpit-accent) 82%, white);
  cursor: pointer;
}
.cockpit-card-actions button:hover,
.cockpit-card-actions button:focus-visible {
  border-color: var(--cockpit-accent);
  color: #fff;
  outline: none;
}
.cockpit-context-header {
  gap: 5px 10px;
  padding: 0 5px 7px;
}
.cockpit-context-kicker {
  font-size: 8px;
  letter-spacing: 0.2em;
}
#cockpit-context-subject {
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
}
.cockpit-context-qualifier {
  grid-column: 1 / -1;
  justify-self: start;
  color: rgba(116, 219, 255, 0.82);
  font-size: 7px;
  letter-spacing: 0.16em;
  white-space: nowrap;
}
.cockpit-context-weather {
  display: inline-flex;
  min-width: 48px;
  height: 20px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 7px;
  border: 1px solid color-mix(in srgb, var(--cockpit-accent) 46%, transparent);
  border-radius: 999px;
  background: color-mix(
    in srgb,
    var(--cockpit-accent) 8%,
    rgba(0, 7, 12, 0.78)
  );
  color: color-mix(in srgb, var(--cockpit-accent) 82%, white);
  font: 700 6px/1 var(--font-mono);
  letter-spacing: 0.1em;
  cursor: pointer;
}
.cockpit-context-weather strong {
  color: #fff;
  font: inherit;
}
.cockpit-context-weather[aria-pressed='false'] {
  border-color: rgba(244, 251, 255, 0.15);
  background: rgba(0, 7, 12, 0.54);
  color: rgba(244, 251, 255, 0.42);
}
.cockpit-context-weather[aria-pressed='false'] strong {
  color: rgba(244, 251, 255, 0.5);
}
.cockpit-context-weather:hover,
.cockpit-context-weather:focus-visible {
  border-color: var(--cockpit-accent);
  color: #fff;
  outline: none;
}
.cockpit-context-actions {
  gap: 4px;
}
.cockpit-context-actions button {
  width: 28px;
}
.cockpit-context-actions button:disabled {
  border-color: rgba(244, 251, 255, 0.1);
  color: rgba(244, 251, 255, 0.2);
  cursor: default;
}
.cockpit-context-actions .material-symbols-outlined {
  font-size: 15px;
}
.cockpit-context-cohorts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.cockpit-context-cohorts > div {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 3px 8px;
  min-width: 0;
  padding: 6px 9px;
  border-inline-start: 1px solid
    color-mix(in srgb, var(--cockpit-accent) 40%, transparent);
  background: rgba(0, 7, 12, 0.34);
}
.cockpit-context-cohorts span {
  color: var(--cockpit-accent);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.cockpit-context-cohorts strong {
  justify-self: end;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
}
.cockpit-context-cohorts small {
  grid-column: 1 / -1;
  overflow: hidden;
  color: rgba(244, 251, 255, 0.4);
  font-size: 6px;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cockpit-context-cohorts > div.unknown {
  border-inline-start-color: rgba(213, 168, 99, 0.58);
}
.cockpit-context-cohorts > div.unknown strong {
  color: #d5a863;
}
.cockpit-context-nearest {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 8px;
  padding: 3px 5px 2px;
}
#cockpit-context-direction {
  grid-row: 1 / 3;
  color: var(--cockpit-accent);
  font-size: 22px;
  transform-origin: 50% 50%;
  transition: transform 180ms ease-out;
}
#cockpit-context-direction.unknown {
  opacity: 0.3;
}
.cockpit-context-nearest > div {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  gap: 2px;
  min-width: 0;
}
.cockpit-context-nearest small {
  color: rgba(244, 251, 255, 0.42);
  font-size: 6px;
  letter-spacing: 0.12em;
}
#cockpit-context-nearest-label {
  overflow: hidden;
  color: #fff;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#cockpit-context-bearing,
#cockpit-context-distance {
  color: var(--cockpit-accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
#cockpit-context-bearing {
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
}
#cockpit-context-distance {
  grid-column: 3;
  grid-row: 1 / 3;
}
#cockpit-context-distance {
  color: #fff;
}
.cockpit-context-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 0;
  border-top: 1px solid rgba(244, 251, 255, 0.08);
  color: rgba(244, 251, 255, 0.4);
  font-size: 6px;
  letter-spacing: 0.11em;
}
.cockpit-context-window[data-state='uncertain'] #cockpit-context-uncertainty {
  color: #74dbff;
}
.cockpit-context-window[data-state='lost'] #cockpit-context-uncertainty {
  color: #d5a863;
  font-weight: 600;
}
/* The held values are last-known, not current — dim them to match the cue. */
.cockpit-context-window[data-state='lost']
  :is(.cockpit-context-cohorts, .cockpit-context-nearest) {
  opacity: 0.55;
}
#cockpit-hud.context-active .cockpit-pitch-rail-left {
  opacity: 0.16;
  transition: opacity 180ms ease;
}
.cockpit-context-window[data-layout-mode='rail-left-constrained'] {
  gap: 5px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.cockpit-context-window[data-collapsed='true'] {
  width: min(248px, 22vw);
  max-height: none;
  gap: 0;
  padding: 9px 10px;
  border-radius: 7px 18px 18px 7px;
  background: rgba(0, 7, 12, 0.54);
}
.cockpit-context-window[data-collapsed='true'] .cockpit-context-header {
  gap: 8px;
  padding: 0;
  border-bottom: 0;
}
.cockpit-context-window[data-collapsed='true']
  :is(
    .cockpit-context-qualifier,
    .cockpit-context-cohorts,
    .cockpit-context-nearest,
    .cockpit-context-footer,
    .cockpit-context-actions button:not(#cockpit-context-toggle)
  ) {
  display: none;
}
.cockpit-context-window[data-collapsed='true'] #cockpit-context-subject {
  font-size: 8px;
  letter-spacing: 0.08em;
}
#cockpit-hud.signals-active .cockpit-pitch-rail-right {
  opacity: 0.16;
  transition: opacity 180ms ease;
}
.cockpit-signal-window {
  position: absolute;
  z-index: 3;
  top: auto;
  right: var(--cockpit-signal-right, clamp(24px, 4vw, 58px));
  bottom: var(--cockpit-bottom-rail-safe);
  display: grid;
  gap: 7px;
  width: var(--cockpit-side-panel-width);
  max-height: min(42vh, 410px);
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 11px 12px 9px;
  border: 1px solid color-mix(in srgb, var(--cockpit-accent) 30%, transparent);
  border-top-color: color-mix(in srgb, var(--cockpit-accent) 64%, transparent);
  border-radius: 24px 8px 8px 24px;
  background: rgba(0, 7, 12, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 28px rgba(0, 0, 0, 0.26);
  transform: perspective(900px) rotateY(-4deg) translateZ(18px);
  transform-origin: right center;
  pointer-events: auto;
  text-shadow: 0 0 8px
    color-mix(in srgb, var(--cockpit-accent) 45%, transparent);
  scrollbar-color: color-mix(in srgb, var(--cockpit-accent) 45%, transparent)
    transparent;
  scrollbar-width: thin;
  transition:
    width 180ms ease,
    background-color 180ms ease,
    border-radius 180ms ease;
}
#cockpit-signal-stream[hidden] {
  display: none;
}
.cockpit-utility-controls {
  position: absolute;
  z-index: 5;
  top: var(
    --cockpit-utility-top,
    var(--left-stack-safe-top, var(--left-stack-top))
  );
  right: clamp(24px, 4vw, 58px);
  bottom: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 7px;
  pointer-events: auto;
}
.cockpit-utility-control {
  position: relative;
}
.cockpit-utility-control.is-expanded {
  width: 272px;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid var(--glass-border);
  border-radius: var(--panel-radius);
  background: var(--glass-bg);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  max-height: var(
    --cockpit-utility-expanded-max-height,
    var(--cockpit-utility-max-height, min(44vh, 430px))
  );
  overflow-y: auto;
}
.cockpit-utility-control.is-expanded:has([data-cockpit-launcher='display']) {
  width: var(--display-panel-expanded-width);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.cockpit-utility-control.is-expanded:has([data-cockpit-launcher='radio']) {
  width: var(--cockpit-radio-expanded-width, 232px);
}
.cockpit-utility-controls.layout-primary-only
  > .cockpit-utility-control:not(.is-expanded) {
  display: none;
}
.cockpit-utility-launcher {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  width: var(--left-collapsed-width, 176px);
  min-height: 50px;
  padding: 8px 10px 8px 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--panel-radius);
  background: var(--glass-bg);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  color: var(--text-dim);
  font: 8px/1.1 var(--font-mono);
  letter-spacing: 1.4px;
  text-align: left;
}
[data-cockpit-launcher='display'] {
  width: var(--left-collapsed-width, 176px);
}
[data-cockpit-launcher='radio'] {
  width: var(--cockpit-radio-collapsed-width, 148px);
}
.cockpit-utility-control.is-expanded .cockpit-utility-launcher {
  width: 100%;
  min-height: 42px;
  padding: 6px 2px 8px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.cockpit-utility-control.is-expanded .cockpit-utility-launcher {
  width: 100%;
}
.cockpit-utility-control.is-expanded:has([data-cockpit-launcher='display'])
  .cockpit-utility-launcher {
  min-height: 42px;
  box-sizing: border-box;
  margin-left: auto;
  margin-bottom: 0;
  padding: 6px 2px 8px 6px;
  gap: 8px;
}
.cockpit-utility-divider {
  height: 1px;
  background: linear-gradient(to right, var(--glass-border), transparent);
  box-shadow: none;
}
.cockpit-utility-control.is-expanded .cockpit-utility-divider {
  background: linear-gradient(
    90deg,
    rgb(0 212 255 / 28%),
    rgba(0, 212, 255, 0.18) 58%,
    transparent
  );
  box-shadow: 0 0 7px rgba(0, 212, 255, 0.22);
}
.cockpit-utility-glyph {
  display: grid;
  width: 20px;
  height: 20px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.cockpit-utility-glyph:focus-visible {
  border-color: var(--glass-border-hover);
  color: var(--text-primary);
  outline: 2px solid var(--text-primary);
  outline-offset: -3px;
}
.cockpit-utility-popover {
  position: static;
  display: grid;
  width: 100%;
  box-sizing: border-box;
  gap: 7px;
  padding: 9px;
  border: 0;
  border-top: 1px solid var(--glass-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.cockpit-utility-popover[hidden] {
  display: none !important;
}
.cockpit-display-slot {
  display: block;
  min-width: 0;
}
#cockpit-display-panel {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 0;
  border-top: 0;
  max-height: min(52vh, 470px);
  overflow-y: auto;
}
#cockpit-display-panel .pp-toggle-group {
  width: 100%;
  min-width: 0;
}
#cockpit-display-panel
  [data-cockpit-display-slot='parameters']
  #param-slider-panel.active {
  width: 100%;
  max-height: none;
  overflow-y: visible;
}
#cockpit-display-panel .pp-toggle-btn {
  width: 100%;
  min-height: 38px;
  box-sizing: border-box;
}
.cockpit-radio-compact {
  width: 100%;
}
.cockpit-radio-station {
  overflow: hidden;
  color: #fff;
  font: 500 8px/1.2 var(--font-mono);
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cockpit-radio-transport {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.cockpit-radio-transport button {
  min-height: 32px;
  border: 1px solid rgba(65, 220, 231, 0.24);
  border-radius: 6px;
  background: rgba(65, 220, 231, 0.05);
  color: #9ceaf1;
  cursor: pointer;
}
.cockpit-radio-transport button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.cockpit-radio-transport button.active {
  border-color: var(--cockpit-accent);
  color: #fff;
}
.cockpit-radio-volume {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  color: rgba(244, 251, 255, 0.58);
  font: 7px/1 var(--font-mono);
  letter-spacing: 0.1em;
}
.cockpit-radio-volume input {
  width: 100%;
}
.cockpit-signal-header {
  gap: 10px;
  padding: 0 4px 7px 8px;
}
html:not([lang='en']) .cockpit-signal-header > div {
  min-width: 0;
}
html:not([lang='en']) .cockpit-signal-kicker {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cockpit-signal-header strong {
  color: #fff;
  font-size: 8px;
  letter-spacing: 0.1em;
}
.cockpit-signal-kicker {
  font-size: 8px;
  letter-spacing: 0.18em;
}
.cockpit-signal-kicker i {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--cockpit-accent);
  box-shadow: 0 0 7px var(--cockpit-accent);
  animation: cockpit-live 1.6s ease-in-out infinite;
}
.cockpit-brief-actions {
  align-items: center;
  gap: 3px;
}
/* A longer translated state label widens the cycle button; the other
   controls keep their size instead of being squeezed. */
html:not([lang='en']) .cockpit-brief-actions > * {
  flex-shrink: 0;
}
.cockpit-brief-actions button {
  width: 23px;
}
.cockpit-brief-actions .material-symbols-outlined {
  font-size: 14px;
}
#cockpit-brief-auto {
  width: 50px;
  color: rgba(244, 251, 255, 0.42);
  font: 700 6px/1 var(--font-mono);
  letter-spacing: 0.05em;
}
html:not([lang='en']) #cockpit-brief-auto {
  width: auto;
  min-width: 50px;
  padding: 0 4px;
  white-space: nowrap;
}
#cockpit-brief-auto[aria-pressed='true'] {
  border-color: var(--cockpit-accent);
  background: color-mix(
    in srgb,
    var(--cockpit-accent) 14%,
    rgba(0, 7, 12, 0.72)
  );
  color: #fff;
  box-shadow: 0 0 10px
    color-mix(in srgb, var(--cockpit-accent) 24%, transparent);
}
#cockpit-signal-toggle {
  width: 28px;
  margin-left: 2px;
}
#cockpit-brief-position {
  min-width: 25px;
  color: rgba(244, 251, 255, 0.48);
  font-size: 6px;
  letter-spacing: 0.08em;
  text-align: center;
}
.cockpit-brief-stage {
  min-height: 178px;
  overflow: hidden;
}
[data-cockpit-brief-page] {
  animation: cockpit-brief-enter 220ms ease-out both;
}
[data-cockpit-brief-page][hidden] {
  display: none;
}
.cockpit-signal-list {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cockpit-signal-list li {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
  padding-block: 7px;
  padding-inline: 9px 7px;
  border-inline-start: 1px solid rgba(244, 251, 255, 0.2);
  background: rgba(0, 7, 12, 0.3);
}
.cockpit-signal-list li.actionable {
  transition:
    border-color 160ms ease,
    background 160ms ease;
}
.cockpit-signal-list li.actionable:hover,
.cockpit-signal-list li.actionable:focus-within {
  border-inline-start-color: var(--cockpit-accent);
  background: color-mix(
    in srgb,
    var(--cockpit-accent) 10%,
    rgba(0, 7, 12, 0.4)
  );
}
.cockpit-signal-list li.track,
.cockpit-signal-list li.current {
  border-inline-start-color: var(--cockpit-accent);
}
.cockpit-signal-list li.nearby {
  border-inline-start-color: #fff;
}
.cockpit-signal-list li.military {
  border-inline-start-color: #d5a863;
}
.cockpit-signal-list li.warning {
  border-inline-start-color: #d5a863;
}
.cockpit-signal-list time {
  color: rgba(244, 251, 255, 0.38);
  font-size: 6px;
  letter-spacing: 0.06em;
}
.cockpit-signal-list li > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.cockpit-signal-list strong {
  color: color-mix(in srgb, var(--cockpit-accent) 78%, white);
  font-size: 10px;
  letter-spacing: 0.11em;
}
.cockpit-signal-target {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(14px, 1fr) 12px;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: color-mix(in srgb, var(--cockpit-accent) 78%, white);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-align: left;
  cursor: pointer;
}
.cockpit-signal-list li.military .cockpit-signal-target {
  color: #f0c968;
}
.cockpit-signal-target-label {
  overflow: hidden;
  color: currentColor !important;
  font: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cockpit-signal-target-rule {
  height: 1px;
  overflow: visible !important;
  background: linear-gradient(90deg, currentColor, transparent);
  opacity: 0.42;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  transform-origin: left center;
}
.cockpit-signal-target-chevron {
  overflow: visible !important;
  color: currentColor !important;
  font-size: 12px !important;
  line-height: 1;
  transition: transform 160ms ease;
}
.cockpit-signal-target:hover,
.cockpit-signal-target:focus-visible {
  color: #fff;
  outline: none;
  text-shadow: 0 0 8px
    color-mix(in srgb, var(--cockpit-accent) 72%, transparent);
}
.cockpit-signal-target:hover .cockpit-signal-target-rule,
.cockpit-signal-target:focus-visible .cockpit-signal-target-rule {
  opacity: 0.82;
  transform: scaleX(1.04);
}
.cockpit-signal-target:hover .cockpit-signal-target-chevron,
.cockpit-signal-target:focus-visible .cockpit-signal-target-chevron {
  transform: translateX(2px);
}
.cockpit-signal-list li.warning strong {
  color: #d5a863;
}
.cockpit-signal-list span {
  overflow: hidden;
  color: rgba(244, 251, 255, 0.66);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cockpit-news-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cockpit-news-list:empty {
  display: none;
}
.cockpit-news-list li {
  border-left: 1px solid
    color-mix(in srgb, var(--cockpit-accent) 62%, transparent);
  background: rgba(0, 7, 12, 0.3);
}
.cockpit-news-list a {
  display: grid;
  gap: 4px;
  padding: 7px 9px;
  color: inherit;
  text-decoration: none;
}
.cockpit-news-list a:hover,
.cockpit-news-list a:focus-visible {
  background: color-mix(in srgb, var(--cockpit-accent) 8%, transparent);
  outline: 1px solid color-mix(in srgb, var(--cockpit-accent) 46%, transparent);
}
.cockpit-news-list strong {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(244, 251, 255, 0.88);
  font-size: 8px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.045em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.cockpit-news-list span {
  color: color-mix(
    in srgb,
    var(--cockpit-accent) 65%,
    rgba(244, 251, 255, 0.42)
  );
  font-size: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cockpit-brief-status {
  display: grid;
  min-height: 0;
  place-items: center;
  padding: 18px 10px;
  border: 0;
  color: rgba(244, 251, 255, 0.45);
  font-size: 7px;
  letter-spacing: 0.13em;
  text-align: center;
}
/* `display: grid` above would otherwise beat the UA [hidden] rule and keep a
   stale banner over a populated list. */
.cockpit-brief-status[hidden] {
  display: none;
}
.cockpit-brief-status[data-state='unavailable'],
.cockpit-brief-status[data-state='cached'] {
  color: #d5a863;
}
.cockpit-local-place {
  display: grid;
  gap: 3px;
  padding: 5px 8px 8px;
  border-bottom: 1px solid rgba(244, 251, 255, 0.08);
}
.cockpit-local-place strong {
  overflow: hidden;
  color: #fff;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cockpit-local-place small {
  color: rgba(244, 251, 255, 0.44);
  font-size: 6px;
  letter-spacing: 0.09em;
}
.cockpit-local-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 5px;
  background: rgba(244, 251, 255, 0.07);
}
.cockpit-local-grid > div {
  display: grid;
  min-height: 60px;
  align-content: center;
  gap: 3px;
  padding: 7px 9px;
  background: rgba(0, 7, 12, 0.76);
}
.cockpit-local-grid span {
  color: var(--cockpit-accent);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.13em;
}
.cockpit-local-grid strong {
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#cockpit-local-condition {
  font-size: 10px;
  line-height: 1.15;
  letter-spacing: 0.03em;
  text-overflow: clip;
  white-space: normal;
}
.cockpit-local-grid small {
  color: rgba(244, 251, 255, 0.35);
  font-size: 6px;
  letter-spacing: 0.07em;
}

.cockpit-weather-credit {
  display: inline-block;
  margin-top: 7px;
  color: rgba(182, 226, 241, 0.72);
  font: 600 7px/1.2 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cockpit-signal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px 0;
  border-top: 1px solid rgba(244, 251, 255, 0.08);
  color: rgba(244, 251, 255, 0.34);
  font-size: 6px;
  letter-spacing: 0.1em;
}
.cockpit-signal-footer > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cockpit-brief-tabs {
  display: flex;
  gap: 3px;
}
/* Translated tab names are longer: the tabs keep their words whole and the
   footer text beside them gives way. */
html:not([lang='en']) .cockpit-signal-footer > span {
  flex: 1 1 auto;
  min-width: 0;
}
html:not([lang='en']) .cockpit-brief-tabs {
  flex: 0 0 auto;
}
html:not([lang='en']) .cockpit-brief-tabs button {
  white-space: nowrap;
}
.cockpit-brief-tabs button {
  padding: 2px 4px;
  border: 0;
  border-bottom: 1px solid rgba(244, 251, 255, 0.16);
  background: transparent;
  color: rgba(244, 251, 255, 0.34);
  font: inherit;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.cockpit-brief-tabs button[aria-current='true'] {
  border-bottom-color: var(--cockpit-accent);
  color: color-mix(in srgb, var(--cockpit-accent) 80%, white);
}
.cockpit-brief-tabs button:hover,
.cockpit-brief-tabs button:focus-visible {
  color: #fff;
  outline: none;
}
/* The LIVE tab is in the markup whether or not a stream is on offer. */
.cockpit-brief-tabs button[hidden] {
  display: none;
}

/* The briefing's LIVE page: the LIVE section's parts (live.css) in the
   card's measure. */
.cockpit-live-subject {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: #fff;
  font-size: 9px;
  letter-spacing: 0.1em;
}
.cockpit-live-subject strong {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cockpit-live-subject .live-badge {
  flex: none;
  font-size: 7px;
}
.cockpit-live-pick {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 5px 0 6px;
}
.cockpit-live-pick .live-stream-title {
  font-size: 8px;
}
.cockpit-live-pick .live-step .material-symbols-outlined {
  font-size: 14px;
}
.cockpit-live-status {
  margin: 5px 0 0;
  color: rgba(244, 251, 255, 0.7);
  font-size: 7px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.cockpit-live-credit {
  margin: 4px 0 0;
  color: rgba(182, 226, 241, 0.72);
  font: 600 7px/1.2 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cockpit-live-credit a {
  color: inherit;
}
.cockpit-signal-window[data-layout-mode='rail-right-constrained'] {
  gap: 5px;
}
.cockpit-signal-window[data-collapsed='true'] {
  width: min(248px, 22vw);
  max-height: none;
  gap: 0;
  padding: 9px 10px;
  border-radius: 18px 7px 7px 18px;
  background: rgba(0, 7, 12, 0.54);
}
.cockpit-signal-window[data-collapsed='true'] .cockpit-signal-header {
  padding: 0;
  border-bottom: 0;
}
.cockpit-signal-window[data-collapsed='true'] .cockpit-route-card {
  display: none;
}
.cockpit-signal-window[data-collapsed='true']
  :is(.cockpit-brief-stage, .cockpit-signal-footer) {
  display: none;
}
.cockpit-signal-window[data-collapsed='true']
  .cockpit-brief-actions
  > :not(#cockpit-signal-toggle) {
  display: none;
}
@keyframes cockpit-brief-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.cockpit-help {
  position: absolute;
  left: clamp(24px, 4vw, 58px);
  bottom: clamp(22px, 4vh, 42px);
  color: rgba(244, 251, 255, 0.55);
  font-size: 9px;
  letter-spacing: 0.14em;
}
.cockpit-help span {
  color: var(--cockpit-accent);
}
body.cockpit-mode
  :is(
    #title-bar,
    #style-indicator,
    #top-center-actions,
    #traffic-sync-chip,
    #cctv-sync-chip,
    #command-dock,
    #military-awareness-panel,
    #military-awareness-direction-overlay,
    #cockpit-entry
  ) {
  display: none !important;
}
body.cockpit-mode
  :is(
    #clear-selected-layers,
    #share-btn,
    #tilt-map-view,
    #north-up-view,
    #reset-globe-view
  ) {
  display: none !important;
}
/* The first-visit Stories announcement waits, unread, until Cockpit closes:
   on a phone it would cover the Display/Radio row. */
body.cockpit-mode #gev-stories #hPop {
  display: none;
}
body.cockpit-mode #left-panel-stack {
  z-index: 147;
  display: flex;
  top: var(--left-stack-safe-top, var(--left-stack-top));
  bottom: var(--left-stack-safe-bottom, 24px);
  height: auto;
  max-height: none;
  transition: none;
}
body.cockpit-mode #left-panel-stack > #scene-panel {
  display: none !important;
}
/* Directions stays reachable in Cockpit, as in Data Layers; Draw and Import
   were never there (DISPLAY sits in the hidden right rail). */
body.cockpit-mode #utilities-panel .utilities-tools {
  display: none !important;
}
body.cockpit-mode #right-context-rail {
  display: none !important;
}

/* Keep the user's intelligence HUD text available in first person. It stays
   subordinate to the visor instruments and occupies the four peripheral
   corridors, leaving the optical center, context rails, and heading tape free. */
body.cockpit-mode #intel-hud.active {
  z-index: 146;
  opacity: 0.72;
  visibility: visible;
}
body.cockpit-mode #intel-hud .hud-top-left,
body.cockpit-mode #intel-hud .hud-bottom-left {
  left: clamp(18px, 3vw, 44px);
  transform: scale(0.78);
  transform-origin: left center;
}
body.cockpit-mode #intel-hud .hud-top-right,
body.cockpit-mode #intel-hud .hud-bottom-right {
  right: clamp(18px, 3vw, 44px);
  transform: scale(0.78);
  transform-origin: right center;
}
body.cockpit-mode #intel-hud .hud-top-left,
body.cockpit-mode #intel-hud .hud-top-right {
  top: clamp(104px, 13vh, 138px);
}
body.cockpit-mode #intel-hud .hud-bottom-left,
body.cockpit-mode #intel-hud .hud-bottom-right {
  bottom: clamp(84px, 11vh, 118px);
}
body.cockpit-mode #intel-hud .hud-summary-wrap {
  max-width: min(34vw, 380px);
}
body.cockpit-mode #intel-hud .hud-summary {
  font-size: 9px;
}
body.cockpit-mode #intel-hud .hud-left-edge {
  left: 22px;
}
body.cockpit-mode #intel-hud .hud-right-edge {
  right: 22px;
}

@media (max-width: 760px) {
  #view-switcher {
    right: 16px;
    bottom: calc(16px + var(--world-timeline-lift, 0px));
  }
  body.cockpit-mode #view-switcher {
    right: auto;
    bottom: max(76px, env(safe-area-inset-bottom));
    width: max-content;
    max-width: calc(100vw - 20px);
    margin-bottom: 0;
  }
  body.cockpit-mode #view-switcher button {
    padding-inline: 9px;
    font-size: 7px;
  }
  #cockpit-entry {
    left: auto;
    right: 16px;
    bottom: 88px;
  }
  body.cockpit-mode #left-panel-stack,
  body.cockpit-mode #intel-hud,
  body.cockpit-mode .cockpit-context-window,
  body.cockpit-mode .cockpit-signal-window {
    display: none !important;
  }
  body.cockpit-mode #right-context-rail {
    display: none !important;
  }
  body.cockpit-mode .cockpit-utility-controls {
    top: auto;
    right: 12px;
    bottom: 152px;
    flex-direction: row;
    max-width: calc(100vw - 24px);
  }
  /* Phone flight and bridge views: one row centred on the Reset/Exit axis,
     10px below the roll arc (.cockpit-roll-arc: 2px + 96px into the visor).
     Shorter screens reserve 36px around the 46% centre of .cockpit-reticle
     (about 25px tall on phones), plus an 8px gap below the 42px row.
     The row stops at 72px, below the vision controls. Windows under 240px
     tall, and narrow ones under 450px tall, keep the right-aligned row above
     Reset/Exit, clear of Reset, LOOK AHEAD and the Stories button, as do
     satellite and provider views. */
  @media (min-width: 390px) and (min-height: 240px), (min-height: 450px) {
    body.cockpit-mode.mobile-shell
      #cockpit-hud:not([data-generic]):not([data-subject='satellite'])
      .cockpit-utility-controls {
      top: clamp(
        72px,
        calc(46% - 68px),
        calc(var(--cockpit-visor-top) + 108px)
      );
      bottom: auto;
      left: 12px;
      width: max-content;
      margin-inline: auto;
    }
  }
  body.cockpit-mode .cockpit-utility-launcher {
    width: min(150px, calc((100vw - 31px) / 2));
    min-height: 42px;
  }
  body.cockpit-mode .cockpit-utility-control.is-expanded {
    position: fixed;
    top: 96px;
    right: 12px;
    width: min(272px, calc(100vw - 24px));
    max-height: calc(100vh - 260px);
  }
  body.cockpit-mode
    .cockpit-utility-controls:has(.cockpit-utility-control.is-expanded)
    > .cockpit-utility-control:not(.is-expanded) {
    display: none;
  }
  body.cockpit-mode .cockpit-utility-popover {
    position: static;
    width: 100%;
  }
  .cockpit-topline {
    grid-template-columns: 1fr auto;
  }
  .cockpit-mode-chip {
    display: none;
  }
  .cockpit-readout {
    min-width: 76px;
    padding: 4px 6px 5px;
  }
  .cockpit-readout strong {
    font-size: clamp(24px, 8vw, 34px);
  }
  .cockpit-readout-label {
    font-size: 7px;
    letter-spacing: 0.12em;
  }
  .cockpit-readout-unit {
    font-size: 8px;
  }
  .cockpit-speed {
    transform: perspective(600px) rotateY(7deg);
  }
  .cockpit-altitude {
    transform: perspective(600px) rotateY(-7deg);
  }
  .cockpit-compass {
    width: 92vw;
  }
  .cockpit-instrument-row {
    grid-template-columns: minmax(76px, 1fr) auto minmax(76px, 1fr);
    gap: 8px;
  }
  .cockpit-context-window {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 180px;
    width: auto;
    max-height: min(38vh, 280px);
    padding: 10px 12px 8px;
    border-radius: 20px 20px 10px 10px;
    transform: translateZ(22px);
  }
  .cockpit-context-window[data-collapsed='true'] {
    right: auto;
    width: min(248px, calc(100vw - 24px));
    max-height: none;
  }
  .cockpit-signal-window {
    top: 112px;
    right: 12px;
    width: calc(100vw - 24px);
    max-height: min(28vh, 220px);
    padding: 10px 12px 8px;
    border-radius: 20px 10px 10px 20px;
    transform: translateZ(22px);
  }
  .cockpit-signal-window[data-collapsed='true'] {
    left: auto;
    width: min(248px, calc(100vw - 24px));
    max-height: none;
  }
  .cockpit-context-header {
    grid-template-columns: 1fr auto;
  }
  .cockpit-context-qualifier {
    display: none;
  }
  .cockpit-context-cohorts small {
    display: none;
  }
  .cockpit-context-cohorts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .cockpit-context-cohorts > div {
    padding: 4px 6px;
  }
  .cockpit-context-nearest {
    grid-template-columns: 20px minmax(0, 1fr) auto;
    gap: 6px;
  }
  #cockpit-context-bearing {
    display: none;
  }
  .cockpit-context-footer {
    font-size: 5px;
  }
  .cockpit-compass-tape span {
    transform: translateX(calc(-50% + (var(--slot) * 52px)))
      translateY(calc(var(--depth) * 7px)) rotateZ(calc(var(--slot) * 3deg));
  }
  .cockpit-pitch-rail {
    display: none;
  }
  .cockpit-altitude-rim {
    display: none;
  }
  .cockpit-visor-status {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cockpit-altitude-rim-pointer .material-symbols-outlined {
    animation: none;
  }
  .cockpit-altitude-rim-scale > span {
    transition: none;
  }
  [data-cockpit-brief-page] {
    animation: none;
  }
}
/* Ship bridge
   A vessel's bridge reads as a wheelhouse window rather than an aircraft
   visor: straight mullions, a straight speed tape and heading tape, square
   panels, and a radar console in the bottom-right corner. Every rule is
   scoped to the bridge, so the aircraft cockpit keeps its keyhole. */
#cockpit-hud[data-subject='vessel'] {
  --cockpit-radar-size: 240px;
  --cockpit-radar-label-height: 28px;
  --cockpit-radar-right: clamp(24px, 4vw, 58px);
  /* Above the position readout, which sits above the language picker. */
  --cockpit-radar-bottom: calc(max(clamp(22px, 4vh, 42px), 3.5rem) + 40px);
  /* From the viewport bottom to clear above the console (border + gap). */
  --cockpit-radar-clearance: calc(
    var(--cockpit-radar-bottom) + var(--cockpit-radar-size) +
      var(--cockpit-radar-label-height) + 14px
  );
}

:root body.cockpit-bridge {
  --panel-radius: 2px;
  --btn-radius: 2px;
}
#cockpit-hud[data-subject='vessel'] .cockpit-bridge-frame {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  color: color-mix(in srgb, var(--cockpit-accent) 32%, transparent);
  stroke-width: 1;
}
#cockpit-hud[data-subject='vessel'] .cockpit-bridge-frame path {
  vector-effect: non-scaling-stroke;
}
#cockpit-hud[data-subject='vessel'] .cockpit-reticle {
  width: 36px;
  height: 14px;
  border: 0;
  border-radius: 0;
  color: transparent;
  background:
    linear-gradient(var(--cockpit-accent), var(--cockpit-accent)) 50% 0 / 1px
      100% no-repeat,
    linear-gradient(90deg, var(--cockpit-accent), var(--cockpit-accent)) 0 50% /
      100% 1px no-repeat;
  font-size: 0;
  box-shadow: none;
}
#cockpit-hud[data-subject='vessel'] .cockpit-reticle::before,
#cockpit-hud[data-subject='vessel'] .cockpit-reticle::after {
  display: none;
}
#cockpit-hud[data-subject='vessel'] .cockpit-horizon-guide {
  transform: translate(-50%, -50%);
}
#cockpit-hud[data-subject='vessel'] .cockpit-horizon-guide span,
#cockpit-hud[data-subject='vessel'] .cockpit-visor-status {
  transform: none;
}

/* Speed over ground: a straight vertical tape beside the left pane post. */
#cockpit-hud[data-subject='vessel'] .cockpit-speed-rim {
  top: 22vh;
  right: auto;
  left: calc(27vw + 14px);
  width: 150px;
  height: 46vh;
}
#cockpit-hud[data-subject='vessel']
  .cockpit-speed-rim
  .cockpit-altitude-rim-label {
  top: 0;
  right: auto;
  left: 0;
}
#cockpit-hud[data-subject='vessel']
  .cockpit-speed-rim
  :is(.cockpit-altitude-rim-rail, .cockpit-altitude-rim-scale) {
  inset: 18px 0 0;
}
#cockpit-hud[data-subject='vessel']
  .cockpit-speed-rim
  .cockpit-altitude-rim-rail {
  background: linear-gradient(90deg, rgba(0, 7, 12, 0.3), transparent 70%);
}
#cockpit-hud[data-subject='vessel']
  .cockpit-speed-rim
  .cockpit-altitude-rim-rail::before {
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  height: auto;
  border: 0;
  border-left: 2px solid
    color-mix(in srgb, var(--cockpit-accent) 72%, transparent);
  border-radius: 0;
  box-shadow: -3px 0 12px
    color-mix(in srgb, var(--cockpit-accent) 18%, transparent);
}
#cockpit-hud[data-subject='vessel']
  .cockpit-speed-rim
  .cockpit-altitude-rim-scale
  > span {
  left: 2px;
  transform: translateY(-50%);
}
#cockpit-hud[data-subject='vessel']
  .cockpit-speed-rim
  .cockpit-altitude-rim-pointer {
  z-index: 1;
  top: calc(50% + 9px);
}
#cockpit-hud[data-subject='vessel']
  .cockpit-speed-rim
  .cockpit-altitude-rim-pointer
  strong {
  min-width: 0;
  padding: 2px 5px;
  border: 1px solid var(--cockpit-accent);
  border-radius: 2px;
  background: rgba(0, 7, 12, 0.78);
}

/* Heading: a straight horizontal tape under flat readouts. */
#cockpit-hud[data-subject='vessel'] .cockpit-compass {
  transform: translateX(-50%);
}
#cockpit-hud[data-subject='vessel'] :is(.cockpit-speed, .cockpit-altitude) {
  transform: none;
}
#cockpit-hud[data-subject='vessel'] .cockpit-compass-tape {
  height: 44px;
  margin-top: 0;
  overflow: hidden;
  /* The minor ticks below scroll by a fraction of the tape's width. */
  container-type: inline-size;
  transform-style: flat;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 12% 88%,
    transparent
  );
  mask-image: linear-gradient(90deg, transparent, #000 12% 88%, transparent);
}
#cockpit-hud[data-subject='vessel'] .cockpit-compass-tape::before {
  inset: 0 0 auto;
  height: 26px;
  border-top: 1px solid
    color-mix(in srgb, var(--cockpit-accent) 78%, transparent);
  border-bottom: 1px solid
    color-mix(in srgb, var(--cockpit-accent) 22%, transparent);
  border-radius: 0;
  /* Minor ticks every 10 degrees, centred on the 30-degree divisions. */
  background:
    linear-gradient(
        90deg,
        transparent calc(50% - 0.5px),
        color-mix(in srgb, var(--cockpit-accent) 46%, transparent)
          calc(50% - 0.5px) calc(50% + 0.5px),
        transparent calc(50% + 0.5px)
      )
      50% 0 / calc(14% / 3) 6px repeat-x,
    rgba(0, 7, 12, 0.34);
  /* Scrolled with the divisions (--tape-shift slots of 14% each). */
  background-position:
    calc(50% + var(--tape-shift, 0) * 14cqw) 0,
    0 0;
}
#cockpit-hud[data-subject='vessel'] .cockpit-compass-tape span {
  top: 0;
  left: calc(50% + (var(--slot) * 14%));
  font-size: 11px;
  transform: translateX(-50%);
}
#cockpit-hud[data-subject='vessel'] .cockpit-compass-tape span::before {
  height: 10px;
  margin: 0 auto 5px;
}
#cockpit-hud[data-subject='vessel'] .cockpit-compass-tape span.active {
  font-size: 15px;
}
/* The tape follows the look; the bow (prograde: a ring and centre dot) and
   stern (retrograde: a ring and cross) marks sit under it at the ship's
   heading and its reciprocal. */
#cockpit-hud[data-subject='vessel'] .cockpit-compass-marker {
  position: absolute;
  top: 30px;
  left: calc(50% + (var(--slot) * 14%));
  box-sizing: border-box;
  width: 11px;
  height: 11px;
  border: 1.5px solid var(--cockpit-accent);
  border-radius: 50%;
  transform: translateX(-50%);
}
#cockpit-hud[data-subject='vessel'] .cockpit-compass-marker::before,
#cockpit-hud[data-subject='vessel'] .cockpit-compass-retrograde::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--cockpit-accent);
}
#cockpit-hud[data-subject='vessel'] .cockpit-compass-prograde::before {
  width: 3px;
  height: 3px;
  transform: translate(-50%, -50%);
}
#cockpit-hud[data-subject='vessel'] .cockpit-compass-retrograde::before,
#cockpit-hud[data-subject='vessel'] .cockpit-compass-retrograde::after {
  width: 1.5px;
  height: 9px;
  transform: translate(-50%, -50%) rotate(45deg);
}
#cockpit-hud[data-subject='vessel'] .cockpit-compass-retrograde::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Square panels and buttons. */
#cockpit-hud[data-subject='vessel']
  :is(
    .cockpit-vision-controls,
    .cockpit-vision-controls button,
    .cockpit-card-actions button,
    .cockpit-utility-glyph,
    .cockpit-radio-transport button,
    .cockpit-route-direction small,
    #cockpit-brief-auto
  ) {
  border-radius: 2px;
}
body.cockpit-bridge #view-switcher button {
  border-radius: 2px;
}

/* The briefing card sits flat and shorter, above the radar console. Its top
   leaves the utility strip room below the REC readout. */
#cockpit-hud[data-subject='vessel'] .cockpit-signal-window {
  bottom: var(--cockpit-radar-clearance);
  max-height: max(
    44px,
    min(30vh, 280px, calc(100vh - var(--cockpit-radar-clearance) - 290px))
  );
  border-radius: 2px;
  transform: none;
}
/* The radar console: CockpitRadar fills it, label row included. */
#cockpit-hud[data-subject='vessel'] .cockpit-radar-console {
  position: absolute;
  z-index: 4;
  right: var(--cockpit-radar-right);
  bottom: var(--cockpit-radar-bottom);
  display: grid;
  width: var(--cockpit-radar-size);
  height: calc(var(--cockpit-radar-size) + var(--cockpit-radar-label-height));
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--cockpit-accent) 30%, transparent);
  border-top-color: color-mix(in srgb, var(--cockpit-accent) 64%, transparent);
  border-radius: 2px;
  background: rgba(0, 7, 12, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 28px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: auto;
}
#cockpit-hud[data-subject='vessel']
  .cockpit-radar-console:has(> .cockpit-radar[hidden]) {
  display: none;
}

@media (min-width: 761px) {
  /* The heading tape narrows to stay clear of the console. */
  #cockpit-hud[data-subject='vessel'] .cockpit-compass {
    width: min(
      760px,
      72vw,
      calc(
        100vw - 2 *
          (var(--cockpit-radar-right) + var(--cockpit-radar-size) + 24px)
      )
    );
  }
}
@media (min-width: 761px) and (min-height: 601px) {
  /* The console takes the intel HUD's bottom-right corner. */
  body.cockpit-bridge #intel-hud .hud-bottom-right {
    display: none;
  }
}
@media (max-width: 1280px), (max-height: 820px) {
  #cockpit-hud[data-subject='vessel'] {
    --cockpit-radar-size: 192px;
    --cockpit-radar-label-height: 24px;
  }
}
@media (max-width: 960px) {
  #cockpit-hud[data-subject='vessel'] {
    --cockpit-radar-size: 152px;
    --cockpit-radar-label-height: 22px;
  }
}
/* Too small for a console: the briefing card returns to its usual place. */
@media (max-width: 760px), (max-height: 600px) {
  #cockpit-hud[data-subject='vessel'] {
    --cockpit-radar-clearance: var(--cockpit-bottom-rail-safe);
  }
  #cockpit-hud[data-subject='vessel'] .cockpit-radar-console {
    display: none;
  }
}

/* Look around: the readout and LOOK AHEAD control sit beside the radar
   console, out of the forward view, while the view is turned off the bow;
   the radar scope draws the matching look line. */
#cockpit-hud[data-subject='vessel'] .cockpit-look {
  position: absolute;
  right: calc(var(--cockpit-radar-right) + var(--cockpit-radar-size) + 14px);
  bottom: var(--cockpit-radar-bottom);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  opacity: 0.78;
}
#cockpit-hud[data-subject='vessel'] .cockpit-look:focus-within,
#cockpit-hud[data-subject='vessel'] .cockpit-look:hover {
  opacity: 1;
}
/* Without the console, the controls take its corner. */
@media (max-width: 760px), (max-height: 600px) {
  #cockpit-hud[data-subject='vessel'] .cockpit-look {
    right: var(--cockpit-radar-right);
  }
}
#cockpit-hud[data-subject='vessel'] .cockpit-look[hidden] {
  display: none;
}
#cockpit-hud[data-subject='vessel'] .cockpit-look-readout {
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--cockpit-accent) 46%, transparent);
  border-radius: 2px;
  background: rgba(0, 7, 12, 0.62);
  color: var(--cockpit-accent);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
#cockpit-hud[data-subject='vessel'] .cockpit-look-ahead {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--cockpit-accent) 64%, transparent);
  border-radius: 2px;
  background: rgba(0, 7, 12, 0.78);
  color: #f4fbff;
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.14em;
  cursor: pointer;
  pointer-events: auto;
}
#cockpit-hud[data-subject='vessel'] .cockpit-look-ahead:hover {
  border-color: var(--cockpit-accent);
}
#cockpit-hud[data-subject='vessel'] .cockpit-look-ahead:focus-visible {
  outline: 2px solid var(--cockpit-accent);
  outline-offset: 2px;
}
/* A narrow wedge from own ship with a line along its centre, eased with the
   camera's turn. Both point up (ahead) before rotation. */
#cockpit-hud[data-subject='vessel'] .cockpit-radar-look {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from -6deg,
    color-mix(in srgb, var(--cockpit-accent) 18%, transparent) 0deg 12deg,
    transparent 12deg
  );
  pointer-events: none;
  transition: transform 180ms ease-out;
}
#cockpit-hud[data-subject='vessel'] .cockpit-radar-look::before {
  position: absolute;
  bottom: 50%;
  left: 50%;
  width: 0;
  height: 50%;
  border-left: 1px dashed
    color-mix(in srgb, var(--cockpit-accent) 80%, transparent);
  content: '';
}
@media (prefers-reduced-motion: reduce) {
  #cockpit-hud[data-subject='vessel'] .cockpit-radar-look {
    transition: none;
  }
}
/* An application provider's first-person view
   (src/cockpitSubjectProviders.js): a window view with the provider's board,
   sources, banner, darkening veil and progress line. Every rule is scoped to
   the generic view, so the built-in views keep their own looks. */
#cockpit-hud[data-generic] {
  --cockpit-subject-panel: rgba(0, 7, 12, 0.66);
  --cockpit-subject-live: var(--cockpit-accent);
  --cockpit-subject-estimate: #c9b6ff;
  --cockpit-subject-warning: #ffb800;
  --cockpit-subject-alert: var(--cockpit-emergency);
  --cockpit-subject-progress-band: 46px;
}
#cockpit-hud[data-generic] [data-tone='muted'] {
  opacity: 0.62;
}
#cockpit-hud[data-generic] [data-tone='live'] {
  color: var(--cockpit-subject-live);
}
#cockpit-hud[data-generic] [data-tone='estimate'] {
  color: var(--cockpit-subject-estimate);
}
#cockpit-hud[data-generic] [data-tone='warning'] {
  color: var(--cockpit-subject-warning);
}
#cockpit-hud[data-generic] [data-tone='alert'] {
  color: var(--cockpit-subject-alert);
}

/* The veil darkens the picture under the HUD; its streaks are lights
   passing the window. */
#cockpit-hud[data-generic] .cockpit-veil {
  position: absolute;
  inset: 0;
  background: #000;
  pointer-events: none;
  transition: opacity 0.25s linear;
}
#cockpit-hud[data-generic] .cockpit-veil.streaks::before {
  content: '';
  position: absolute;
  inset: 34% -40% 46%;
  background: repeating-linear-gradient(
    90deg,
    transparent 0 22%,
    rgba(255, 214, 150, 0.16) 23%,
    rgba(255, 236, 200, 0.42) 24%,
    rgba(255, 214, 150, 0.16) 25%,
    transparent 26% 48%
  );
  filter: blur(3px);
  animation: cockpit-veil-streaks 1.4s linear infinite;
}
@keyframes cockpit-veil-streaks {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-26%);
  }
}
@media (prefers-reduced-motion: reduce) {
  #cockpit-hud[data-generic] .cockpit-veil.streaks::before {
    animation: none;
  }
  #cockpit-hud[data-generic] .cockpit-veil {
    transition: none;
  }
}

/* The banner: top centre, below the top line. */
#cockpit-hud[data-generic] .cockpit-banner {
  position: absolute;
  top: clamp(92px, 13vh, 128px);
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  max-width: min(560px, 80vw);
  padding: 6px 14px;
  border: 1px solid color-mix(in srgb, var(--cockpit-accent) 56%, transparent);
  border-radius: 2px;
  background: var(--cockpit-subject-panel);
  text-align: center;
  transform: translateX(-50%);
}
#cockpit-hud[data-generic] .cockpit-banner strong {
  font-size: 15px;
  letter-spacing: 0.14em;
}
#cockpit-hud[data-generic] .cockpit-banner small {
  font-size: 11px;
  letter-spacing: 0.08em;
}

/* The board: cards on the left, below the page's left rail and the Intel
   HUD's top corner (both stay on in first person), the sources under them. */
#cockpit-hud[data-generic] {
  --cockpit-subject-board-top: max(23rem, 41vh);
}
#cockpit-hud[data-generic] .cockpit-board {
  position: absolute;
  top: var(--cockpit-subject-board-top);
  left: clamp(22px, 4vw, 58px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(320px, 30vw);
  min-width: 220px;
  max-height: calc(100vh - var(--cockpit-subject-board-top) - 11rem);
  overflow: hidden;
}
#cockpit-hud[data-generic] .cockpit-board-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px;
  border-left: 2px solid
    color-mix(in srgb, var(--cockpit-accent) 72%, transparent);
  background: var(--cockpit-subject-panel);
}
#cockpit-hud[data-generic] .cockpit-board-card small {
  font-size: 10px;
  letter-spacing: 0.16em;
  opacity: 0.78;
}
#cockpit-hud[data-generic] .cockpit-board-card strong {
  font-size: 17px;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}
#cockpit-hud[data-generic] .cockpit-board-card span {
  font-size: 12px;
  letter-spacing: 0.06em;
}
#cockpit-hud[data-generic] .cockpit-sources {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
  padding: 6px 10px;
  background: rgba(0, 7, 12, 0.5);
  font-size: 10px;
  letter-spacing: 0.06em;
}
#cockpit-hud[data-generic] .cockpit-sources div {
  display: flex;
  gap: 6px;
}
#cockpit-hud[data-generic] .cockpit-sources dt {
  flex: none;
  min-width: 64px;
  opacity: 0.7;
  letter-spacing: 0.14em;
}
#cockpit-hud[data-generic] .cockpit-sources dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* The speed's tag (live or estimated) sits where a label would. */
#cockpit-hud[data-generic] .cockpit-speed-tag {
  font-weight: 700;
}
/* With no speed readout the heading still holds the middle of the row. */
#cockpit-hud[data-generic] .cockpit-heading-value {
  grid-column: 2;
}
#cockpit-hud[data-generic] .cockpit-aircraft-meta[data-tone='warning'],
#cockpit-hud[data-generic] .cockpit-aircraft-meta[data-tone='alert'] {
  font-weight: 700;
}

/* Look-around: the readout and LOOK AHEAD centred under the style switcher,
   in the sky over the forward view; the bottom corners hold the position
   readouts. Styled as on a bridge. */
#cockpit-hud[data-generic] .cockpit-look {
  position: absolute;
  top: calc(clamp(22px, 4vh, 42px) + 70px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}
#cockpit-hud[data-generic] .cockpit-look[hidden] {
  display: none;
}
#cockpit-hud[data-generic] .cockpit-look-readout {
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--cockpit-accent) 46%, transparent);
  border-radius: 2px;
  background: rgba(0, 7, 12, 0.62);
  color: var(--cockpit-accent);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
#cockpit-hud[data-generic] .cockpit-look-ahead {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--cockpit-accent) 64%, transparent);
  border-radius: 2px;
  background: rgba(0, 7, 12, 0.78);
  color: #f4fbff;
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.14em;
  cursor: pointer;
  pointer-events: auto;
}
#cockpit-hud[data-generic] .cockpit-look-ahead:hover {
  border-color: var(--cockpit-accent);
}
#cockpit-hud[data-generic] .cockpit-look-ahead:focus-visible {
  outline: 2px solid var(--cockpit-accent);
  outline-offset: 2px;
}

/* The progress line takes a band along the bottom edge; the readouts that
   sit there move up above it. */
#cockpit-hud[data-generic][data-progress]
  :is(.cockpit-help, .cockpit-position-readout) {
  bottom: calc(
    clamp(22px, 4vh, 42px) + var(--cockpit-subject-progress-band) - 14px
  );
}
#cockpit-hud[data-generic][data-progress] .cockpit-compass {
  bottom: calc(clamp(44px, 7vh, 72px) + var(--cockpit-subject-progress-band));
}
#cockpit-hud[data-generic] .cockpit-progress {
  position: absolute;
  right: clamp(22px, 4vw, 58px);
  bottom: 6px;
  left: clamp(22px, 4vw, 58px);
  height: var(--cockpit-subject-progress-band);
}
#cockpit-hud[data-generic] .cockpit-progress-line {
  position: absolute;
  right: 0;
  bottom: 8px;
  left: 0;
  height: 2px;
  background: color-mix(in srgb, var(--cockpit-accent) 78%, transparent);
}
#cockpit-hud[data-generic] .cockpit-progress-travelled {
  position: absolute;
  inset: 0 auto 0 0;
  background: rgba(0, 7, 12, 0.72);
}
#cockpit-hud[data-generic] .cockpit-progress-tick {
  position: absolute;
  bottom: 5px;
  width: 2px;
  height: 8px;
  margin-left: -1px;
  background: currentColor;
}
#cockpit-hud[data-generic] .cockpit-progress-tick.labelled {
  height: 12px;
}
#cockpit-hud[data-generic] .cockpit-progress-tick.merged {
  width: 4px;
  margin-left: -2px;
}
#cockpit-hud[data-generic] .cockpit-progress-tick.travelled {
  opacity: 0.45;
}
#cockpit-hud[data-generic] .cockpit-progress-label {
  position: absolute;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 10px;
  letter-spacing: 0.06em;
  line-height: 1.2;
  white-space: nowrap;
}
#cockpit-hud[data-generic] .cockpit-progress-label[data-align='center'] {
  align-items: center;
  text-align: center;
}
#cockpit-hud[data-generic] .cockpit-progress-label[data-align='end'] {
  align-items: flex-end;
  text-align: end;
}
#cockpit-hud[data-generic] .cockpit-progress-label small {
  opacity: 0.82;
}
#cockpit-hud[data-generic] .cockpit-progress-marker {
  position: absolute;
  bottom: 4px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--cockpit-accent);
  box-shadow: 0 0 10px var(--cockpit-accent);
}
#cockpit-hud[data-generic] .cockpit-progress-marker.dwell {
  background: transparent;
  border: 2px solid var(--cockpit-accent);
}
#cockpit-hud[data-generic] .cockpit-progress-tag {
  position: absolute;
  right: 0;
  bottom: -2px;
  font-size: 9px;
  letter-spacing: 0.14em;
  opacity: 0.7;
}
/* Bridge radar internals (src/ui/views/panels/CockpitRadar.vue). The
   Cockpit view places and sizes the console; the radar fills it, with a
   square scope as large as the smaller side allows. */
.cockpit-radar {
  --radar-line: color-mix(
    in srgb,
    var(--cockpit-accent, #00dcff) 34%,
    transparent
  );
  --radar-faint: color-mix(
    in srgb,
    var(--cockpit-accent, #00dcff) 16%,
    transparent
  );
  --radar-readout-height: 22px;
  container-type: size;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  color: rgba(244, 251, 255, 0.82);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}
.cockpit-radar[hidden] {
  display: none;
}
.cockpit-radar-scope {
  position: relative;
  flex: none;
  width: min(100cqw, calc(100cqh - var(--radar-readout-height) - 4px));
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--radar-line);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(0, 24, 32, 0.72) 0%,
    rgba(0, 9, 14, 0.82) 100%
  );
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.5);
}
.cockpit-radar-ring,
.cockpit-radar-sweep,
.cockpit-radar-own,
.cockpit-radar-contact {
  position: absolute;
  top: 50%;
  left: 50%;
}
.cockpit-radar-ring {
  border: 1px solid var(--radar-faint);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cockpit-radar-tick {
  position: absolute;
  inset: 0;
}
.cockpit-radar-tick::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 5px;
  background: var(--radar-line);
  content: '';
}
.cockpit-radar-tick-major::before {
  height: 8px;
  background: color-mix(
    in srgb,
    var(--cockpit-accent, #00dcff) 62%,
    transparent
  );
}
.cockpit-radar-sweep {
  width: 100%;
  height: 100%;
  margin: -50% 0 0 -50%;
  border-radius: 50%;
  /* The bright edge leads clockwise; the trail fades behind it. */
  background: conic-gradient(
    transparent 0deg 270deg,
    color-mix(in srgb, var(--cockpit-accent, #00dcff) 4%, transparent) 300deg,
    color-mix(in srgb, var(--cockpit-accent, #00dcff) 26%, transparent) 357deg,
    color-mix(in srgb, var(--cockpit-accent, #00dcff) 70%, transparent) 360deg
  );
  will-change: transform;
}
.cockpit-radar-heading-line {
  position: absolute;
  bottom: 50%;
  left: 50%;
  width: 1px;
  height: 50%;
  background: color-mix(
    in srgb,
    var(--cockpit-accent, #00dcff) 72%,
    transparent
  );
}
.cockpit-radar-own {
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border: 1px solid var(--cockpit-accent, #00dcff);
  border-radius: 1px;
  background: rgba(0, 9, 14, 0.9);
}
.cockpit-radar-contact {
  --radar-contact-color: #9fb3c8;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--radar-contact-color);
  box-shadow: 0 0 4px var(--radar-contact-color);
  will-change: opacity;
}
.cockpit-radar-contact-stale {
  border: 1px solid var(--radar-contact-color);
  background: transparent;
  box-shadow: none;
}
/* A course vector starts at the mark's centre and points along the course. */
.cockpit-radar-vector {
  position: absolute;
  bottom: 50%;
  left: 50%;
  width: 1px;
  height: 9px;
  margin-left: -0.5px;
  background: var(--radar-contact-color);
  transform-origin: 50% 100%;
}
.cockpit-radar-own-vector {
  height: 14px;
  background: #f4fbff;
}
.cockpit-radar-readout {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  box-sizing: border-box;
  width: 100%;
  height: var(--radar-readout-height);
  overflow: hidden;
  white-space: nowrap;
}
.cockpit-radar-range {
  flex: none;
  min-width: 44px;
  height: 20px;
  padding: 0 6px;
  border: 1px solid var(--radar-line);
  border-radius: 2px;
  background: rgba(0, 7, 12, 0.6);
  color: #f4fbff;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  pointer-events: auto;
}
.cockpit-radar-range:hover,
.cockpit-radar-range:focus-visible {
  border-color: var(--cockpit-accent, #00dcff);
  color: #fff;
  outline: none;
}
.cockpit-radar-rings,
.cockpit-radar-count {
  overflow: hidden;
  text-overflow: ellipsis;
}
.cockpit-radar-count {
  color: var(--cockpit-accent, #00dcff);
}
@media (prefers-reduced-motion: reduce) {
  .cockpit-radar-sweep {
    display: none;
  }
}
/* Orbital view HUD (src/ui/views/panels/CockpitOrbital.vue). The section
   covers the picture it is placed over: the reticle sits on its centre, the
   readout top-left and the optics bottom-centre. Square-cornered like the
   bridge view. The Cockpit controller publishes the zoom step's blur as
   --cockpit-orbital-blur and its lock tick as a reticle class. */
.cockpit-orbital {
  --orbital-line: color-mix(
    in srgb,
    var(--cockpit-accent, #00dcff) 42%,
    transparent
  );
  --orbital-faint: color-mix(
    in srgb,
    var(--cockpit-accent, #00dcff) 18%,
    transparent
  );
  --orbital-reticle-size: min(38vmin, 320px);
  position: absolute;
  inset: 0;
  overflow: hidden;
  color: rgba(244, 251, 255, 0.86);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  pointer-events: none;
}
.cockpit-orbital[hidden] {
  display: none;
}

/* Focus pull: blurs the picture beneath only while a step is in flight. */
.cockpit-orbital-lens {
  position: absolute;
  inset: 0;
}
.cockpit-orbital-focusing .cockpit-orbital-lens {
  backdrop-filter: blur(var(--cockpit-orbital-blur, 0px));
  -webkit-backdrop-filter: blur(var(--cockpit-orbital-blur, 0px));
}

.cockpit-orbital-reticle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--orbital-reticle-size);
  height: var(--orbital-reticle-size);
  transform: translate(-50%, -50%);
}
.cockpit-orbital-bracket {
  position: absolute;
  width: 18%;
  height: 18%;
  border: 0 solid var(--orbital-line);
  transition:
    border-color 160ms ease-out,
    transform 160ms ease-out;
}
.cockpit-orbital-bracket-tl {
  top: 0;
  left: 0;
  border-top-width: 1px;
  border-left-width: 1px;
}
.cockpit-orbital-bracket-tr {
  top: 0;
  right: 0;
  border-top-width: 1px;
  border-right-width: 1px;
}
.cockpit-orbital-bracket-bl {
  bottom: 0;
  left: 0;
  border-bottom-width: 1px;
  border-left-width: 1px;
}
.cockpit-orbital-bracket-br {
  right: 0;
  bottom: 0;
  border-right-width: 1px;
  border-bottom-width: 1px;
}
/* Nadir cross: a gapped plus, so the sub-satellite point stays visible. */
.cockpit-orbital-cross {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  background:
    linear-gradient(var(--orbital-line), var(--orbital-line)) left center / 10px
      1px no-repeat,
    linear-gradient(var(--orbital-line), var(--orbital-line)) right center /
      10px 1px no-repeat,
    linear-gradient(var(--orbital-line), var(--orbital-line)) center top / 1px
      10px no-repeat,
    linear-gradient(var(--orbital-line), var(--orbital-line)) center bottom /
      1px 10px no-repeat;
}
/* North on the frame: the pointer spans the reticle and turns about its
   centre, carrying the tick (and, track-up, an N) round the rim. */
.cockpit-orbital-north-pointer {
  position: absolute;
  inset: 0;
}
.cockpit-orbital-north-letter {
  position: absolute;
  top: -26px;
  left: 50%;
  color: var(--cockpit-accent, #00dcff);
  font-weight: 700;
  transform: translateX(-50%);
}
/* North sits at the top of a north-up frame. */
.cockpit-orbital-north-tick {
  position: absolute;
  top: -10px;
  left: 50%;
  width: 1px;
  height: 7px;
  background: var(--cockpit-accent, #00dcff);
}
.cockpit-orbital-reticle-lock .cockpit-orbital-bracket {
  border-color: var(--cockpit-accent, #00dcff);
  animation: cockpit-orbital-lock 220ms ease-out;
}
.cockpit-orbital-reticle-lock .cockpit-orbital-cross {
  --orbital-line: var(--cockpit-accent, #00dcff);
}
@keyframes cockpit-orbital-lock {
  0% {
    transform: scale(1.12);
    opacity: 0.4;
  }
  60% {
    transform: scale(0.97);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Bottom-left, where the aircraft Contact card sits (hidden in orbit): clear
   of the Intel HUD's top-left classification block and above its MGRS and
   coordinate lines. */
.cockpit-orbital-readout {
  position: absolute;
  bottom: clamp(150px, 19vh, 190px);
  left: clamp(16px, 4vw, 48px);
  max-width: min(320px, calc(100% - 32px));
  padding: 8px 10px;
  border: 1px solid var(--orbital-faint);
  border-radius: 2px;
  background: rgba(0, 9, 14, 0.62);
}
.cockpit-orbital-readout p,
.cockpit-orbital-data,
.cockpit-orbital-data dd {
  margin: 0;
}
.cockpit-orbital-kicker {
  color: var(--cockpit-accent, #00dcff);
  font-weight: 700;
  letter-spacing: 0.14em;
}
.cockpit-orbital-name {
  margin-top: 4px;
  overflow: hidden;
  color: #f4fbff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cockpit-orbital-class {
  margin-top: 2px;
  color: rgba(244, 251, 255, 0.66);
}

/* The name with its owner's flag (or text badge) in front. */
.cockpit-orbital-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin-top: 4px;
}
.cockpit-orbital-title .cockpit-orbital-name {
  min-width: 0;
  margin-top: 0;
}
.cockpit-orbital-flag {
  flex: none;
  box-sizing: content-box;
  width: 20px;
  height: 15px;
  border: 1px solid var(--orbital-faint);
  border-radius: 1px;
  background-repeat: no-repeat;
  /* Only the flag's own cell: the sheet's neighbours stay out from under
     the border. */
  background-clip: content-box;
}
.cockpit-orbital-owner-badge {
  flex: none;
  max-width: 96px;
  overflow: hidden;
  padding: 1px 4px;
  border: 1px solid var(--orbital-line);
  border-radius: 2px;
  color: var(--cockpit-accent, #00dcff);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cockpit-orbital-operator {
  margin-top: 2px;
  overflow: hidden;
  color: #f4fbff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* NORAD · COSPAR · epoch, and the element set on request. */
.cockpit-orbital-ident {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  color: rgba(244, 251, 255, 0.66);
  font-variant-numeric: tabular-nums;
}
/* Wraps between its parts rather than truncating, so the epoch and the
   element set's age always show in full. */
.cockpit-orbital-ident-text {
  min-width: 0;
}
.cockpit-orbital-ident-part {
  white-space: nowrap;
}
.cockpit-orbital-tle-toggle {
  flex: none;
  padding: 1px 6px;
  border: 1px solid var(--orbital-line);
  border-radius: 2px;
  background: rgba(0, 7, 12, 0.6);
  color: #f4fbff;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
  pointer-events: auto;
}
.cockpit-orbital-tle-toggle[aria-expanded='true'],
.cockpit-orbital-tle-toggle:hover,
.cockpit-orbital-tle-toggle:focus-visible {
  border-color: var(--cockpit-accent, #00dcff);
  color: #fff;
  outline: none;
}
/* 69 characters a line: small enough to fit the card, and selectable. */
.cockpit-orbital-tle {
  margin: 6px 0 0;
  padding: 5px 6px;
  overflow-x: auto;
  border: 1px solid var(--orbital-faint);
  border-radius: 2px;
  background: rgba(0, 4, 8, 0.7);
  color: #f4fbff;
  font: 8px/1.5 var(--font-mono);
  letter-spacing: 0;
  white-space: pre;
  user-select: text;
  pointer-events: auto;
}

/* Under the vision selector (topline top + its ~38px height + a gap), on
   the centre line the reticle keeps clear below; the Intel HUD blocks and
   Display/Radio sit at the sides. */
.cockpit-orbital-over {
  position: absolute;
  top: calc(clamp(18px, 3vh, 34px) + 50px);
  left: 50%;
  display: flex;
  align-items: baseline;
  gap: 8px;
  max-width: min(560px, calc(100% - 32px));
  margin: 0;
  padding: 4px 10px;
  border: 1px solid var(--orbital-faint);
  border-radius: 2px;
  background: rgba(0, 9, 14, 0.62);
  transform: translateX(-50%);
  white-space: nowrap;
}
.cockpit-orbital-over span {
  flex: none;
  color: var(--cockpit-accent, #00dcff);
  font-weight: 700;
  letter-spacing: 0.14em;
}
.cockpit-orbital-over strong {
  min-width: 0;
  overflow: hidden;
  color: #f4fbff;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
}
.cockpit-orbital-data {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}
.cockpit-orbital-datum {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.cockpit-orbital-datum dt {
  color: rgba(244, 251, 255, 0.56);
}
.cockpit-orbital-datum dd {
  color: #f4fbff;
  font-variant-numeric: tabular-nums;
  text-align: end;
}
.cockpit-orbital-north {
  display: inline-block;
  margin-top: 8px;
  padding: 1px 5px;
  border: 1px solid var(--orbital-line);
  border-radius: 2px;
  color: var(--cockpit-accent, #00dcff);
  font-weight: 700;
}

/* Above RESET / EXIT ORBIT: #view-switcher sits at clamp(128px, 15vh, 150px)
   less its -95px margin, and its buttons are about 30px tall. */
.cockpit-orbital-optics {
  position: absolute;
  bottom: calc(clamp(128px, 15vh, 150px) - 95px + 44px);
  left: 50%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--orbital-faint);
  border-radius: 2px;
  background: rgba(0, 9, 14, 0.62);
  transform: translateX(-50%);
  white-space: nowrap;
}
/* With a sensor's swath and step the strip is longer: it may wrap on a
   narrow screen rather than run off it. */
@media (max-width: 720px) {
  .cockpit-orbital-optics {
    flex-wrap: wrap;
    justify-content: center;
    max-width: calc(100vw - 32px);
  }
}
.cockpit-orbital-zoom-button {
  width: 28px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--orbital-line);
  border-radius: 2px;
  background: rgba(0, 7, 12, 0.6);
  color: #f4fbff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
}
.cockpit-orbital-zoom-button:hover:not(:disabled),
.cockpit-orbital-zoom-button:focus-visible {
  border-color: var(--cockpit-accent, #00dcff);
  color: #fff;
  outline: none;
}
.cockpit-orbital-zoom-button:disabled {
  opacity: 0.35;
  cursor: default;
}
.cockpit-orbital-zoom {
  min-width: 64px;
  color: var(--cockpit-accent, #00dcff);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
}
.cockpit-orbital-swath {
  padding-inline: 4px 2px;
  border-inline-start: 1px solid var(--orbital-faint);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 560px) {
  .cockpit-orbital-readout {
    max-width: calc(100% - 32px);
  }
  .cockpit-orbital-name {
    font-size: 13px;
  }
  /* The phone shell lifts RESET / EXIT ORBIT (its row ends ~106px up) and
     sets the DISPLAY / RADIO row above it (to ~194px up). The optics wrap to
     two rows and sit above that row, where the zoom buttons can be tapped;
     the card sits above the optics. */
  .cockpit-orbital-optics {
    bottom: 200px;
  }
  .cockpit-orbital-readout {
    bottom: 284px;
  }
}

/* A short window: the card stops below the left rail (DATA LAYERS,
   UTILITIES, which end ~340px down) and scrolls its own content, the TLE
   block included, instead of running into the rail. */
@media (max-height: 760px) and (min-width: 561px) {
  .cockpit-orbital-readout {
    max-height: max(120px, calc(100vh - clamp(150px, 19vh, 190px) - 350px));
    overflow-y: auto;
  }
}

/* An instant cut: no focus pull and no lock motion. */
@media (prefers-reduced-motion: reduce) {
  .cockpit-orbital-focusing .cockpit-orbital-lens {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .cockpit-orbital-bracket {
    transition: none;
  }
  .cockpit-orbital-reticle-lock .cockpit-orbital-bracket {
    animation: none;
  }
}

/* Off-nadir look: the tilt readout and the way back, tucked under the
   readout card at the side of the picture. Shown only while tilted. */
.cockpit-orbital-look {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--orbital-faint);
}
.cockpit-orbital-look-readout {
  color: var(--cockpit-accent, #00dcff);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cockpit-orbital-nadir {
  padding: 3px 8px;
  border: 1px solid var(--orbital-line);
  border-radius: 2px;
  background: rgba(0, 7, 12, 0.6);
  color: #f4fbff;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
  pointer-events: auto;
}
.cockpit-orbital-nadir:hover,
.cockpit-orbital-nadir:focus-visible {
  border-color: var(--cockpit-accent, #00dcff);
  color: #fff;
  outline: none;
}
/* A station view's arrows either side of its name. */
.cockpit-orbital-views .cockpit-orbital-look-readout {
  flex: 1;
  text-align: center;
}
.cockpit-orbital-view-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 4px;
  line-height: 1;
}
.cockpit-orbital-view-step .material-symbols-outlined {
  font-size: 18px;
}

/* The Cockpit HUD in orbit (#cockpit-hud[data-subject='satellite']): the
   orbital readout names the satellite, so the topline keeps only the
   vision selector, and panels and buttons stay square like the bridge. */
#cockpit-hud[data-subject='satellite'] .cockpit-topline > div:first-child {
  visibility: hidden;
}

:root body.cockpit-orbit {
  --panel-radius: 2px;
  --btn-radius: 2px;
}
#cockpit-hud[data-subject='satellite']
  :is(
    .cockpit-vision-controls,
    .cockpit-vision-controls button,
    .cockpit-card-actions button,
    .cockpit-utility-glyph,
    .cockpit-radio-transport button,
    #cockpit-brief-auto
  ) {
  border-radius: 2px;
}
body.cockpit-orbit #view-switcher button {
  border-radius: 2px;
}

/* The imaging sensor's narrowest swath, to scale across the view's width. The
   view is track-up, so the swath runs top to bottom along the ground track. */
.cockpit-orbital-sensor-strip {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  min-width: 2px;
  border-inline: 1px dashed var(--orbital-line);
  background: color-mix(
    in srgb,
    var(--cockpit-accent, #00dcff) 6%,
    transparent
  );
  transform: translateX(-50%);
}
.cockpit-orbital-sensor-swath {
  color: var(--cockpit-accent, #00dcff);
}
.cockpit-orbital-sensor-step {
  padding: 3px 8px;
  border: 1px solid var(--orbital-line);
  border-radius: 2px;
  background: rgba(0, 7, 12, 0.6);
  color: #f4fbff;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
  pointer-events: auto;
}
.cockpit-orbital-sensor-step:hover,
.cockpit-orbital-sensor-step:focus-visible {
  border-color: var(--cockpit-accent, #00dcff);
  color: #fff;
  outline: none;
}
/* The site a ground focus holds, named under the off-nadir readout
   (src/ui/views/panels/CockpitOrbital.vue). Empty, it takes no room. */
.cockpit-orbital-focus:not(:empty) {
  margin-top: 4px;
  overflow: hidden;
  color: #f4fbff;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* ── Safe Frame Overlay ─────────────────────── */
#safe-frame-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  display: none;
}

#safe-frame-overlay.active {
  display: block;
}

#safe-frame-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, calc(90vh * (16 / 9)));
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

#safe-frame-overlay.ratio-9-16 #safe-frame-box {
  width: min(58vh, 76vw);
  aspect-ratio: 9 / 16;
}

/* Rule-of-thirds guides */
#safe-frame-box::before,
#safe-frame-box::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#safe-frame-box::before {
  background:
    linear-gradient(
      to right,
      transparent 33.333%,
      rgba(255, 255, 255, 0.2) 33.333%,
      rgba(255, 255, 255, 0.2) 33.7%,
      transparent 33.7%,
      transparent 66.333%,
      rgba(255, 255, 255, 0.2) 66.333%,
      rgba(255, 255, 255, 0.2) 66.7%,
      transparent 66.7%
    ),
    linear-gradient(
      to bottom,
      transparent 33.333%,
      rgba(255, 255, 255, 0.2) 33.333%,
      rgba(255, 255, 255, 0.2) 33.7%,
      transparent 33.7%,
      transparent 66.333%,
      rgba(255, 255, 255, 0.2) 66.333%,
      rgba(255, 255, 255, 0.2) 66.7%,
      transparent 66.7%
    );
}

/* ── Orbit Indicator ─────────────────────────── */
#orbit-indicator {
  position: fixed;
  top: 70px;
  right: 36px;
  z-index: 100;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent-glow);
  pointer-events: none;
  user-select: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-smooth),
    visibility var(--transition-smooth);
}

#orbit-indicator.active {
  opacity: 1;
  visibility: visible;
}

.orbit-icon {
  font-size: 13px;
  vertical-align: middle;
  margin-right: 2px;
}

/* ── Intelligence HUD Overlay ────────────────── */
#intel-hud {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
  --hud-color: rgba(0, 255, 255, 0.6);
  --hud-glow: rgba(0, 255, 255, 0.4);
  --hud-border: rgba(0, 255, 255, 0.15);
}

#intel-hud.active {
  opacity: 1;
  visibility: visible;
}

#intel-hud * {
  font-family: var(--font-mono);
  color: var(--hud-color);
  text-shadow: 0 0 4px var(--hud-glow);
  text-transform: uppercase;
  line-height: 1.6;
}

.hud-bottom-bar {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(980px, calc(100vw - 120px));
  border: 1px solid var(--hud-border);
  background: rgba(0, 0, 0, 0.34);
  padding: 4px 10px;
  font-size: 10px;
  letter-spacing: 1.4px;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.hud-bottom-bar {
  bottom: 110px;
  justify-content: center;
}

/* Corner blocks */
.hud-corner {
  position: absolute;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 4px;
}

.hud-top-left {
  top: 120px;
  left: 36px;
}

.hud-top-right {
  top: 120px;
  right: 36px;
}

.hud-bottom-left {
  bottom: 180px;
  left: 36px;
}

.hud-bottom-right {
  bottom: 180px;
  right: 36px;
}

.hud-bracket {
  font-size: 22px;
  line-height: 1;
  opacity: 0.6;
}

.hud-content {
  font-size: 13px;
  letter-spacing: 2px;
}

.hud-ais-vessel {
  margin-top: 6px;
  max-width: 340px;
  white-space: pre-line;
  line-height: 1.35;
  opacity: 0.64;
}

.hud-ais-vessel.active {
  opacity: 0.95;
}

.hud-classification {
  font-size: 12px;
  letter-spacing: 2.5px;
  font-weight: 600;
  margin-bottom: 3px;
}

.hud-system {
  font-size: 13px;
  opacity: 0.8;
}

.hud-mode {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 4px;
  margin-top: 3px;
}

.hud-summary-wrap {
  margin-top: 6px;
  max-width: 420px;
}

.hud-summary-label {
  font-size: 9px;
  letter-spacing: 1.8px;
  opacity: 0.55;
}

.hud-summary {
  margin-top: 2px;
  min-height: 16px;
  font-size: 11px;
  letter-spacing: 1.2px;
  opacity: 0.88;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-rec {
  font-size: 13px;
  letter-spacing: 2px;
}

#hud-rec-dot {
  color: #ff3333;
  text-shadow: 0 0 6px rgba(255, 51, 51, 0.8);
  font-size: 14px;
  vertical-align: middle;
}

.hud-orbital {
  font-size: 12px;
  opacity: 0.7;
  letter-spacing: 1.5px;
}

/* Edge annotations (vertical text) */
.hud-edge {
  position: absolute;
  font-size: 10px;
  letter-spacing: 1.5px;
  opacity: 0.5;
}

.hud-left-edge {
  left: 36px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: left center;
  white-space: nowrap;
  display: flex;
  gap: 20px;
}

.hud-right-edge {
  right: 36px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  transform-origin: right center;
  white-space: nowrap;
  display: flex;
  gap: 20px;
}

#intel-hud[data-variant='tactical'] .hud-bottom-bar {
  display: none;
}

#intel-hud[data-variant='tactical'] .hud-top-left,
#intel-hud[data-variant='tactical'] .hud-top-right {
  top: max(14vh, 136px);
}

#intel-hud[data-variant='minimal'] .hud-top-right,
#intel-hud[data-variant='minimal'] .hud-bottom-right,
#intel-hud[data-variant='minimal'] .hud-left-edge,
#intel-hud[data-variant='minimal'] .hud-right-edge,
#intel-hud[data-variant='minimal'] .hud-classification,
#intel-hud[data-variant='minimal'] .hud-system {
  display: none;
}

#intel-hud[data-variant='minimal'] .hud-top-left {
  top: 88px;
}

#intel-hud[data-variant='minimal'] .hud-bottom-left {
  bottom: 12vh;
}

/* Minimal keeps its coordinates in the corner block, where the other layouts
   have them; the full-width strip would only repeat the same position. */
#intel-hud[data-variant='minimal'] .hud-bottom-bar {
  display: none;
  bottom: calc(12vh + 4rem);
}

#intel-hud[data-variant='minimal'] .hud-summary-wrap {
  max-width: 280px;
}

/* Scope OFF adds text-sized backing; Scope ON retains the original HUD. */
.hud-readout {
  display: contents;
}

:root[data-scope-mask='off']
  #intel-hud:is([data-variant='minimal'], [data-variant='tactical'])
  .hud-readout,
:root[data-scope-mask='off'] .scene-text-holdout {
  background: rgba(0, 0, 0, 0.7);
  box-shadow: none;
  border-radius: 2px;
  padding-block: 0;
  padding-inline: 6px;
  margin-block: 0;
  margin-inline: -6px;
  width: fit-content;
  max-width: 100%;
  box-sizing: content-box;
  white-space: nowrap;
}

:root[data-scope-mask='off']
  #intel-hud:is([data-variant='minimal'], [data-variant='tactical'])
  .hud-readout {
  display: block;
  width: max-content;
  min-width: 0;
  box-sizing: content-box;
  white-space: nowrap;
}

:root[data-scope-mask='off']
  #intel-hud:is([data-variant='minimal'], [data-variant='tactical'])
  :is(.hud-top-right, .hud-bottom-right)
  .hud-readout,
:root[data-scope-mask='off'] #style-indicator .scene-text-holdout {
  margin-inline-start: auto;
}

/* Preserve glyph opacity without dimming the vertical backplates. */
:root[data-scope-mask='off'] #intel-hud[data-variant='tactical'] .hud-edge {
  opacity: 1;
}

:root[data-scope-mask='off']
  #intel-hud[data-variant='tactical']
  .hud-edge
  .hud-readout
  > * {
  opacity: 0.5;
}

:root[data-scope-mask='off']
  #intel-hud[data-variant='minimal']
  .hud-bottom-bar {
  background: transparent;
}

:root[data-scope-mask='off']
  #intel-hud[data-variant='minimal']
  .hud-bottom-bar {
  width: fit-content;
  max-width: calc(100vw - 120px);
  gap: 24px;
}

:root[data-scope-mask='off']
  #intel-hud[data-variant='minimal']
  .hud-bottom-bar
  .hud-readout {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

:root[data-scope-mask='off'] #title-bar h1::before {
  content: '';
  position: absolute;
  inset: -0.12em -6px;
  z-index: -1;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.7);
}

:root[data-scope-mask='off']
  :is(#title-bar .subtitle, #style-indicator .indicator-label) {
  color: var(--text-secondary);
}

:root[data-scope-mask='off'] #title-bar .subtitle {
  margin-top: 8px;
}

:root[data-scope-mask='off'] #style-indicator .indicator-value {
  margin-top: 4px;
}

:root[data-scope-mask='off']
  #intel-hud[data-variant='minimal']
  .hud-readout:has(> :is(.hud-classification, .hud-system)) {
  display: none;
}

:root[data-scope-mask='off'] #title-bar .frame-rate-readout {
  margin-top: 6px;
}
/* ── Data Layer Toggle Panel ─────────────────── */
#left-panel-stack {
  position: fixed;
  top: var(--left-stack-safe-top, var(--left-stack-top));
  bottom: var(--left-stack-safe-bottom, 4vh);
  inset-inline-start: var(--left-stack-x);
  z-index: 100;
  width: 360px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
  transition:
    top var(--transition-fast),
    bottom var(--transition-fast);
}

#data-panel {
  --panel-expanded-width: 280px;
  position: fixed;
  top: calc(var(--left-stack-top) + var(--left-stack-gap));
  left: var(--left-stack-x);
  right: auto;
  bottom: auto;
  z-index: 100;
  width: var(--panel-expanded-width);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity var(--transition-smooth),
    visibility var(--transition-smooth),
    transform var(--transition-smooth);
}

#data-panel.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#data-panel .panel-glow,
#utilities-panel .panel-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(
    ellipse at center,
    var(--accent-dim) 0%,
    transparent 60%
  );
  filter: blur(20px);
  opacity: 0.25;
  pointer-events: none;
}

.data-panel-inner,
.utilities-panel-inner {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--panel-radius);
  padding: 14px 16px 12px;
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
  max-height: min(
    620px,
    calc(100vh - var(--left-stack-top) - var(--left-stack-gap) - 36px)
  );
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.data-toggle-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.data-layer-group-heading {
  margin: 8px 10px 2px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.data-layer-group-heading:first-child {
  margin-top: 0;
  padding-top: 4px;
  border-top: 0;
}

.data-toggle-row {
  padding: 8px 10px 6px;
  border-radius: 8px;
  transition: background var(--transition-fast);
}

.data-toggle-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Selected-only, provenance-first proximity results. This is intentionally a
   contextual panel, not a radar/engagement display. */
#global-context-panel {
  --panel-expanded-width: 330px;
  width: var(--panel-expanded-width);
  max-width: 100%;
  min-height: 0;
}
#right-context-rail {
  --right-display-collapsed-width: var(--left-collapsed-width);
  --right-context-collapsed-width: var(--left-collapsed-width);
  position: fixed;
  z-index: 110;
  top: var(--right-stack-safe-top, 26vh);
  right: var(--right-rail-x);
  width: 330px;
  max-height: var(--right-stack-max-height, 70vh);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
  transition:
    top var(--transition-fast),
    max-height var(--transition-fast);
}
#right-context-rail > #pp-toggles,
#right-context-rail > #cctv-panel,
#right-context-rail > #street-level-panel,
#right-context-rail > #weather-panel,
#right-context-rail > #recent-imagery-panel,
#right-context-rail > #global-context-panel {
  position: relative;
  inset: auto;
  flex: 0 0 auto;
  pointer-events: auto;
}
#right-context-rail #global-context-panel {
  width: 100%;
  max-height: 100%;
  pointer-events: auto;
}
#right-context-rail #cctv-panel,
#right-context-rail #street-level-panel,
#right-context-rail #weather-panel,
#right-context-rail #recent-imagery-panel {
  width: 100%;
  max-height: 100%;
  pointer-events: auto;
}
/* Collapsed readouts must stay hideable by the rail's exclusive layout. */
#right-context-rail > #weather-panel:not(.collapsed),
#right-context-rail > #recent-imagery-panel:not(.collapsed) {
  display: flex;
  flex-direction: column;
  flex-shrink: 1;
  min-height: 0;
}
#right-context-rail #cctv-panel.collapsed,
#right-context-rail #street-level-panel.collapsed,
#right-context-rail #weather-panel.collapsed,
#right-context-rail #recent-imagery-panel.collapsed {
  width: var(--right-display-collapsed-width);
  margin-inline-start: auto;
}
#right-context-rail > #pp-toggles.collapsed {
  width: var(--right-display-collapsed-width);
  margin-inline-start: auto;
}
#right-context-rail > #pp-toggles.collapsed .pp-header-row {
  width: 100%;
}
#right-context-rail > #pp-toggles.collapsed .pp-header-row,
#right-context-rail #cctv-panel.collapsed .cctv-panel-inner,
#right-context-rail #street-level-panel.collapsed .street-level-panel-inner,
#right-context-rail #weather-panel.collapsed .weather-panel-inner,
#right-context-rail #recent-imagery-panel.collapsed .recent-imagery-panel-inner,
#right-context-rail
  #global-context-panel.collapsed
  .global-context-panel-inner {
  height: 50px;
  min-height: 50px;
  box-sizing: border-box;
}
#right-context-rail #cctv-panel:not(.collapsed) .cctv-panel-inner,
#right-context-rail
  #street-level-panel:not(.collapsed)
  .street-level-panel-inner {
  max-height: 100%;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
#right-context-rail .global-context-panel-inner {
  max-height: 100%;
}
#right-context-rail
  #global-context-panel:not(.collapsed)
  .global-context-panel-inner {
  max-height: 100%;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
#right-context-rail #global-context-panel.collapsed {
  width: var(--right-context-collapsed-width);
  /* Keep the compact Context tab on the rail edge rather than leaving it
     stranded at the rail's expanded-width origin. */
  margin-inline-start: auto;
}
#right-context-rail
  #global-context-panel.collapsed
  .global-context-panel-inner {
  min-height: 42px;
  box-sizing: border-box;
  justify-content: center;
  overflow: visible;
  padding: 8px 14px;
}
#right-context-rail #global-context-panel.collapsed .panel-header {
  margin: 0;
}
#right-context-rail.layout-focus {
  height: var(--right-stack-max-height);
}
#right-context-rail.layout-exclusive > [data-panel-id].collapsed {
  display: none;
}
#left-panel-stack.layout-exclusive > [data-panel-id].collapsed {
  display: none;
}

/* Panel rails (src/ui/panelNavigation.js). Each rail lives inside its stack,
   so it shows and hides with the stack, and floats in the screen-edge gutter.
   The stack's layout offsets it back to its resting top, so it holds still
   when an opened panel moves the stack. */
.gev-panel-rail {
  position: absolute;
  top: var(--panel-rail-offset, 0px);
  z-index: 1;
  pointer-events: auto;
  transition: top var(--transition-fast);
}
/* Each rail keeps its outer edge at the screen-side clearance, so a rail that
   widens (labelled pills while its side has no open panel) grows toward the
   middle of the screen. Collapsed, it sits 6px outside its stack. */
.gev-panel-rail--left {
  inset-inline-start: calc(-1 * var(--panel-rail-clearance));
}
.gev-panel-rail--right {
  inset-inline-end: calc(-1 * var(--panel-rail-clearance));
}
body.mobile-shell #left-panel-stack > .gev-panel-rail,
body.mobile-shell #right-context-rail > .gev-panel-rail,
body.cockpit-mode .gev-panel-rail {
  display: none;
}
/* Clean view and recording hide the panels one by one, not their stacks. */
body.ui-clean-view .gev-panel-rail,
body.recording-mode .gev-panel-rail {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
#right-context-rail.layout-focus > [data-panel-id].collapsed {
  display: block;
  flex: 0 0 auto;
}
#right-context-rail.layout-focus.layout-exclusive > [data-panel-id].collapsed {
  display: none;
}
#right-context-rail.layout-focus > #pp-toggles:not(.collapsed),
#right-context-rail.layout-focus > #cctv-panel:not(.collapsed),
#right-context-rail.layout-focus > #street-level-panel:not(.collapsed),
#right-context-rail.layout-focus > #weather-panel:not(.collapsed),
#right-context-rail.layout-focus > #recent-imagery-panel:not(.collapsed),
#right-context-rail.layout-focus > #global-context-panel:not(.collapsed) {
  flex: 0 1 var(--right-panel-allocated-height);
  height: var(--right-panel-allocated-height);
  min-height: 0;
  max-height: var(--right-panel-allocated-height);
}
#right-context-rail.layout-focus > #pp-toggles:not(.collapsed) {
  overflow-y: auto;
  overscroll-behavior: contain;
}
#right-context-rail.layout-focus
  > #weather-panel:not(.collapsed)
  .weather-panel-inner,
#right-context-rail.layout-focus
  > #cctv-panel:not(.collapsed)
  .cctv-panel-inner,
#right-context-rail.layout-focus
  > #street-level-panel:not(.collapsed)
  .street-level-panel-inner,
#right-context-rail.layout-focus
  > #recent-imagery-panel:not(.collapsed)
  .recent-imagery-panel-inner,
#right-context-rail.layout-focus
  > #global-context-panel:not(.collapsed)
  .global-context-panel-inner {
  height: 100%;
  box-sizing: border-box;
}
/* Keep the mission cycler directly beneath its Data Layers entry. */
[data-layer-id='rocket-launches'] .data-toggle-controls:not([hidden]) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--glass-border);
  border-radius: 5px;
}

[data-layer-id='rocket-launches'] .data-toggle-controls-info {
  grid-column: 2;
  grid-row: 1;
  padding-top: 0;
  text-align: center;
}

[data-layer-id='rocket-launches'] [data-chip-id='next-mission'] {
  grid-column: 3;
  grid-row: 1;
}

:root[dir='rtl']
  [data-layer-id='rocket-launches']
  .chip-icon
  .material-symbols-outlined {
  transform: scaleX(-1);
}

#space-missions-panel {
  width: min(100%, 330px);
  min-height: 0;
  max-height: var(--right-panel-allocated-height, 100%);
  pointer-events: auto;
}

#space-missions-panel[hidden] {
  display: none;
}

.space-missions-panel-inner {
  max-height: inherit;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

#space-missions-panel.collapsed #space-mission-panel-host {
  display: none;
}
/* Synchronous intrinsic measurement, independent of focus and allocation.
   This attribute is not observed by the rail's layout scheduler. */
#right-context-rail[data-rail-measuring] {
  height: auto !important;
  max-height: none !important;
  transition: none !important;
}
#right-context-rail[data-rail-measuring] > [data-panel-id]:not([hidden]) {
  --right-panel-allocated-height: initial !important;
  flex: 0 0 auto !important;
  height: auto !important;
  max-height: none !important;
  transition: none !important;
}
#right-context-rail[data-rail-measuring]
  > [data-panel-id].collapsed:not([hidden]) {
  display: block !important;
}
#right-context-rail[data-rail-measuring]
  > [data-panel-id]:not(.collapsed)
  > .cctv-panel-inner,
#right-context-rail[data-rail-measuring]
  > [data-panel-id]:not(.collapsed)
  > .street-level-panel-inner,
#right-context-rail[data-rail-measuring]
  > [data-panel-id]:not(.collapsed)
  > .weather-panel-inner,
#right-context-rail[data-rail-measuring]
  > [data-panel-id]:not(.collapsed)
  > .recent-imagery-panel-inner,
#right-context-rail[data-rail-measuring]
  > [data-panel-id]:not(.collapsed)
  > .global-context-panel-inner {
  height: auto !important;
  max-height: none !important;
}
#right-context-rail[data-rail-measuring] [data-rail-scroller],
#right-context-rail[data-rail-measuring] .space-mission-roster-list {
  max-height: none !important;
}
#space-mission-panel {
  width: 100%;
  margin-top: 8px;
  pointer-events: auto;
}
#space-mission-panel-host:has(#space-mission-panel:not([hidden]))
  > .space-mission-roster {
  display: none;
}
#space-mission-panel-host .space-mission-roster {
  display: grid;
  min-height: 0;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(98, 181, 255, 0.2);
  border-radius: 7px;
  background: rgba(4, 17, 31, 0.28);
}
#space-mission-panel-host .space-mission-roster-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 1px 3px 7px;
  border-bottom: 1px solid rgba(34, 230, 230, 0.14);
  font-family: var(--font-mono);
}
#space-mission-panel-host .space-mission-roster-header > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}
#space-mission-panel-host .space-mission-roster-header strong {
  color: #8fcfff;
  font-size: 9px;
  letter-spacing: 0.16em;
}
#space-mission-panel-host .space-mission-roster-header span {
  color: rgba(190, 230, 230, 0.46);
  font-size: 7px;
  letter-spacing: 0.1em;
}
#space-mission-panel-host .space-mission-roster-header output {
  flex: 0 0 auto;
  color: #22e6e6;
  font-size: 9px;
  letter-spacing: 0.08em;
}
#space-mission-panel-host .space-mission-roster-list {
  display: grid;
  max-height: min(43vh, 420px);
  gap: 4px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 3px;
}
#space-mission-panel-host .space-mission-roster-item {
  position: relative;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 42px;
  padding: 7px 7px;
  border: 1px solid rgba(98, 181, 255, 0.13);
  border-radius: 4px;
  color: #d8ffff;
  background: rgba(42, 113, 171, 0.045);
  font-family: var(--font-mono);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}
#space-mission-panel-host .space-mission-roster-item::before {
  content: '';
  position: absolute;
  inset: 3px;
  z-index: 1;
  opacity: 0;
  background:
    linear-gradient(#22e6e6, #22e6e6) left top / 9px 1px no-repeat,
    linear-gradient(#22e6e6, #22e6e6) left top / 1px 9px no-repeat,
    linear-gradient(#22e6e6, #22e6e6) right top / 9px 1px no-repeat,
    linear-gradient(#22e6e6, #22e6e6) right top / 1px 9px no-repeat,
    linear-gradient(#22e6e6, #22e6e6) left bottom / 9px 1px no-repeat,
    linear-gradient(#22e6e6, #22e6e6) left bottom / 1px 9px no-repeat,
    linear-gradient(#22e6e6, #22e6e6) right bottom / 9px 1px no-repeat,
    linear-gradient(#22e6e6, #22e6e6) right bottom / 1px 9px no-repeat;
  filter: drop-shadow(0 0 4px rgba(34, 230, 230, 0.45));
  pointer-events: none;
  transition: opacity 0.12s ease;
}
#space-mission-panel-host .space-mission-roster-item:hover,
#space-mission-panel-host .space-mission-roster-item:focus-visible {
  border-color: rgba(34, 230, 230, 0.58);
  outline: none;
  background: rgba(34, 230, 230, 0.09);
  transform: translateX(2px);
}
#space-mission-panel-host .space-mission-roster-item:hover::before,
#space-mission-panel-host .space-mission-roster-item:focus-visible::before {
  opacity: 1;
}
#space-mission-panel-host .space-mission-roster-item > * {
  position: relative;
  z-index: 2;
}
#space-mission-panel-host .space-mission-roster-marker {
  width: 5px;
  height: 5px;
  justify-self: center;
  border-radius: 50%;
  background: var(--mission-roster-color, #22e6e6);
  box-shadow: 0 0 7px
    color-mix(in srgb, var(--mission-roster-color, #22e6e6) 70%, transparent);
}
#space-mission-panel-host .space-mission-roster-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}
#space-mission-panel-host .space-mission-roster-copy strong,
#space-mission-panel-host .space-mission-roster-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#space-mission-panel-host .space-mission-roster-copy strong {
  color: #d8ffff;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.07em;
}
#space-mission-panel-host .space-mission-roster-copy small {
  color: rgba(190, 230, 230, 0.48);
  font-size: 7px;
  letter-spacing: 0.035em;
}
#space-mission-panel-host .space-mission-roster-chevron {
  color: rgba(34, 230, 230, 0.54);
  font-size: 16px;
  line-height: 1;
}
#space-mission-panel-host .space-mission-roster-empty {
  padding: 18px 10px;
  color: rgba(190, 230, 230, 0.48);
  font:
    8px/1.5 'JetBrains Mono',
    monospace;
  letter-spacing: 0.09em;
  text-align: center;
}
#space-mission-panel-host .space-mission-roster-focus-continuation {
  margin: 0;
  padding: 3px;
  color: rgba(190, 230, 230, 0.58);
  font:
    7px/1.4 'JetBrains Mono',
    monospace;
  letter-spacing: 0.08em;
  text-align: center;
}
#space-mission-panel .space-mission-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 2px;
  border-top: 1px solid rgba(34, 230, 230, 0.18);
  color: rgba(190, 230, 230, 0.58);
  font:
    8px 'JetBrains Mono',
    monospace;
  letter-spacing: 0.18em;
}
#space-mission-panel .space-mission-view-header button {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(98, 181, 255, 0.24);
  border-radius: 5px;
  color: rgba(190, 230, 230, 0.7);
  background: rgba(42, 113, 171, 0.08);
  cursor: pointer;
}
#space-mission-panel .space-mission-view-header button:hover {
  border-color: #22e6e6;
  color: #fff;
}
#space-mission-panel .space-mission-detail {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  color: var(--hud-cyan, #22e6e6);
  font:
    11px 'JetBrains Mono',
    monospace;
  letter-spacing: 0.08em;
}
#space-mission-panel .space-mission-detail strong {
  font-size: 14px;
}
#space-mission-panel .space-mission-detail span {
  color: rgba(190, 230, 230, 0.7);
}
#space-mission-panel .space-mission-detail b {
  color: #d8ffff;
  font-weight: 400;
}
#space-mission-panel .mission-data-section {
  margin: 0 0 11px;
  border-top: 1px solid rgba(34, 230, 230, 0.18);
  padding-top: 9px;
}
#space-mission-panel .mission-data-section h4 {
  margin: 0 0 6px;
  color: #22e6e6;
  font:
    10px 'JetBrains Mono',
    monospace;
  letter-spacing: 0.17em;
}
#space-mission-panel .mission-table-scroll {
  overflow-x: auto;
}
#space-mission-panel .mission-data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: #d8ffff;
  font:
    9px 'JetBrains Mono',
    monospace;
  letter-spacing: 0.025em;
}
#space-mission-panel .mission-data-table th {
  padding: 4px 5px;
  border-bottom: 1px solid rgba(34, 230, 230, 0.22);
  color: rgba(190, 230, 230, 0.58);
  font-weight: 400;
  text-align: left;
}
#space-mission-panel .mission-data-table td {
  overflow-wrap: anywhere;
  padding: 6px 5px;
  border-bottom: 1px solid rgba(34, 230, 230, 0.1);
  vertical-align: top;
}
#space-mission-panel .mission-data-table th:nth-child(1),
#space-mission-panel .mission-data-table td:nth-child(1) {
  width: 34%;
}
#space-mission-panel .mission-data-table th:nth-child(2),
#space-mission-panel .mission-data-table td:nth-child(2) {
  width: 25%;
}
#space-mission-panel .mission-data-table small {
  display: block;
  margin-top: 3px;
  color: rgba(190, 230, 230, 0.56);
  font-size: 8px;
  line-height: 1.35;
}
#space-mission-panel .mission-table-empty {
  color: rgba(190, 230, 230, 0.56);
  text-align: center;
}
#space-mission-panel .mission-replay-speed-control {
  display: grid;
  gap: 5px;
  margin: 1px 0 10px;
  padding: 8px 10px 6px;
  border: 1px solid rgba(34, 230, 230, 0.2);
  border-radius: 5px;
  background: rgba(3, 21, 31, 0.36);
}
#space-mission-panel .mission-replay-speed-control[hidden] {
  display: none;
}
#space-mission-panel .mission-replay-speed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(190, 230, 230, 0.68);
  font:
    8px 'JetBrains Mono',
    monospace;
  letter-spacing: 0.16em;
}
#space-mission-panel .mission-replay-speed-header output {
  min-width: 42px;
  text-align: right;
}
#space-mission-panel [data-mission-replay-speed] {
  width: 100%;
}
#space-mission-panel .mission-replay-speed-scale {
  display: flex;
  justify-content: space-between;
  color: rgba(190, 230, 230, 0.42);
  font:
    7px 'JetBrains Mono',
    monospace;
  letter-spacing: 0.08em;
}

#space-mission-panel .mission-action-row {
  display: flex;
  gap: 8px;
  margin: 1px 0 10px;
}
#space-mission-panel .mission-replay-button,
#space-mission-panel .mission-focus-button {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid rgba(255, 159, 67, 0.62);
  border-radius: 5px;
  color: #ffc078;
  background: linear-gradient(
    90deg,
    rgba(255, 159, 67, 0.08),
    rgba(34, 230, 230, 0.08)
  );
  font:
    9px 'JetBrains Mono',
    monospace;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}
#space-mission-panel .mission-focus-button {
  border-color: rgba(34, 230, 230, 0.58);
  color: #22e6e6;
  background: rgba(34, 230, 230, 0.07);
}
#space-mission-panel .mission-replay-button:hover,
#space-mission-panel .mission-replay-button:focus-visible,
#space-mission-panel .mission-focus-button:hover,
#space-mission-panel .mission-focus-button:focus-visible {
  border-color: #ffb45f;
  color: #fff;
  outline: none;
  box-shadow: 0 0 14px rgba(255, 159, 67, 0.14);
}
#space-mission-panel .mission-focus-button:hover,
#space-mission-panel .mission-focus-button:focus-visible {
  border-color: #22e6e6;
  box-shadow: 0 0 14px rgba(34, 230, 230, 0.14);
}
#space-mission-panel .mission-replay-button.active {
  border-color: #22e6e6;
  color: #d8ffff;
  background: rgba(34, 230, 230, 0.13);
  box-shadow: inset 0 0 16px rgba(34, 230, 230, 0.08);
}
#space-mission-panel .mission-replay-transport {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
#space-mission-panel .mission-replay-transport[hidden] {
  display: none;
}
#space-mission-panel .mission-replay-transport button {
  min-width: 0;
  min-height: 34px;
  padding: 0;
  border: 1px solid rgba(34, 230, 230, 0.5);
  border-radius: 4px;
  color: #22e6e6;
  background: rgba(34, 230, 230, 0.08);
  font:
    15px/1 'JetBrains Mono',
    monospace;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease;
}
#space-mission-panel .mission-replay-transport button:hover:not(:disabled),
#space-mission-panel .mission-replay-transport button:focus-visible {
  border-color: #d8ffff;
  color: #fff;
  outline: none;
  background: rgba(34, 230, 230, 0.16);
  box-shadow: 0 0 12px rgba(34, 230, 230, 0.14);
}
#space-mission-panel .mission-replay-transport button:disabled {
  opacity: 0.28;
  cursor: default;
}
#space-mission-panel .mission-replay-transport button.cancel {
  border-color: rgba(255, 159, 67, 0.58);
  color: #ffb15c;
  background: rgba(255, 159, 67, 0.08);
}
#space-mission-panel
  .mission-replay-transport.is-paused
  [data-mission-replay-play] {
  border-color: #22e6e6;
  color: #d8ffff;
  background: rgba(34, 230, 230, 0.18);
  box-shadow: inset 0 0 12px rgba(34, 230, 230, 0.1);
}
#space-mission-panel .space-mission-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
#space-mission-panel .mission-nav-button {
  min-width: 94px;
  padding: 7px 10px;
  border: 1px solid rgba(34, 230, 230, 0.55);
  background: rgba(8, 34, 42, 0.72);
  color: #22e6e6;
  font:
    11px 'JetBrains Mono',
    monospace;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    opacity 0.15s ease;
}
#space-mission-panel .mission-nav-button:hover:not(:disabled) {
  background: rgba(34, 230, 230, 0.18);
  border-color: #22e6e6;
}
#space-mission-panel .mission-nav-button:disabled {
  cursor: not-allowed;
  opacity: 0.28;
}
#space-mission-panel .mission-nav-button span {
  font-size: 18px;
  line-height: 0;
  vertical-align: -2px;
}
#space-mission-panel .mission-nav-index {
  min-width: 58px;
  text-align: center;
  color: #d8ffff;
  font:
    11px 'JetBrains Mono',
    monospace;
  letter-spacing: 0.1em;
}
#space-mission-panel button {
  cursor: pointer;
}

.mission-replay-vehicle-overlay {
  --mission-replay-vehicle-scale: 0.5;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 86;
  width: 92px;
  height: 138px;
  pointer-events: none;
  will-change: transform;
}

.mission-replay-flight-symbol {
  position: absolute;
  inset: 0;
  transform: rotate(var(--mission-replay-rotation, 0deg))
    scale(var(--mission-replay-vehicle-scale));
  transform-origin: 46px 69px;
  will-change: transform;
}

.mission-replay-orbit-dot {
  display: none;
  position: absolute;
  top: 65px;
  left: 42px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22e6e6;
  box-shadow: 0 0 7px rgba(34, 230, 230, 0.78);
}

.mission-replay-vehicle-overlay[data-mode='orbit']
  .mission-replay-flight-symbol {
  display: none;
}

.mission-replay-vehicle-overlay[data-mode='orbit'] .mission-replay-orbit-dot {
  display: block;
}

.mission-replay-rocket {
  position: absolute;
  top: 0;
  left: 22px;
  width: 48px;
  height: 72px;
  overflow: visible;
  filter: drop-shadow(0 0 6px rgba(34, 230, 230, 0.66));
}

.mission-replay-rocket-body {
  fill: #22e6e6;
  stroke: #22e6e6;
  stroke-width: 2;
  stroke-linejoin: round;
}

.mission-replay-rocket-port {
  fill: #22e6e6;
  stroke: none;
}

.mission-replay-rocket-flame {
  display: none;
}

.mission-replay-thrust {
  display: none;
  position: absolute;
  top: 57px;
  left: 10px;
  width: 72px;
  height: 72px;
  overflow: visible;
  filter: drop-shadow(0 0 4px rgba(34, 230, 230, 0.9));
}

.mission-replay-vehicle-overlay.is-thrusting .mission-replay-thrust {
  display: block;
}

.mission-replay-thrust ellipse {
  fill: none;
  stroke: rgba(34, 230, 230, 0.98);
  stroke-width: 2;
  opacity: 0;
  vector-effect: non-scaling-stroke;
  animation: mission-thrust-wave 0.9s ease-in-out infinite;
  animation-delay: calc(var(--thrust-index) * 0.15s);
}

.mission-replay-thrust ellipse:nth-child(2n) {
  stroke: rgba(216, 255, 255, 0.78);
}

.mission-replay-vehicle-overlay.is-paused .mission-replay-thrust ellipse {
  animation-play-state: paused;
}

.mission-replay-overlay-callout {
  position: absolute;
  top: 18px;
  left: 70px;
  min-width: 188px;
  color: #fff;
  font:
    9px/1.38 'JetBrains Mono',
    monospace;
  letter-spacing: 0.075em;
  text-shadow:
    0 1px 2px #001018,
    0 0 6px #001018;
  white-space: nowrap;
}

.mission-replay-overlay-callout strong,
.mission-replay-overlay-callout span {
  display: block;
}

.mission-replay-overlay-callout strong {
  color: #22e6e6;
  font-size: 10px;
  font-weight: 500;
}

.mission-replay-overlay-callout span {
  color: rgba(255, 255, 255, 0.92);
  white-space: pre-line;
}

.mission-replay-vehicle-overlay[data-mode='orbit']
  .mission-replay-overlay-callout {
  top: 55px;
  left: 58px;
}

@keyframes mission-thrust-wave {
  0%,
  18% {
    opacity: 0;
  }
  24% {
    opacity: 1;
  }
  32%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mission-replay-thrust ellipse {
    animation: none;
  }
}
/* Context is read for longer than other panels; it carries no halo. */
#global-context-panel .panel-glow {
  display: none;
}
.global-context-panel-inner,
.space-missions-panel-inner {
  position: relative;
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 14px 16px 12px;
  border: 1px solid var(--glass-border);
  border-radius: var(--panel-radius);
  background: var(--glass-bg);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
}

/* Data Layers, Context and Space Missions share the 14px side padding of the
   other default theme panels, so every title and toggle sits 19px from its
   edge. */
:root
  :is(
    .data-panel-inner,
    .global-context-panel-inner,
    .space-missions-panel-inner
  ) {
  padding-right: 14px;
  padding-left: 14px;
}
.global-context-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  margin: 0 0 8px;
}
.global-context-actions:has(#installations-search-btn) {
  grid-template-columns: minmax(0, 1fr);
}
.global-context-actions:has(#cockpit-entry:not([hidden])) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.global-context-actions:has(#cockpit-entry[hidden]) {
  grid-template-columns: 1fr;
}
/* TR-3B reclassify toggle rides an `auto` trailing column so the chip never
   resizes the COCKPIT / SEARCH buttons beside it. */
.global-context-actions:has(#tr3b-toggle:not([hidden])) {
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
}
.global-context-actions:has(#cockpit-entry[hidden]):has(
    #tr3b-toggle:not([hidden])
  ) {
  grid-template-columns: minmax(0, 1fr) auto;
}
.tr3b-toggle {
  width: 26px;
  min-height: 30px;
  padding: 0;
  border: 1px solid rgba(98, 181, 255, 0.22);
  border-radius: 5px;
  background: rgba(42, 113, 171, 0.08);
  /* The saucer is a COLOR-font glyph: `color` and `text-shadow` cannot touch
     it, so the dim/lit states are carried by `filter` alongside the border and
     fill. 14px sits inside the 26px chip with breathing room. */
  font:
    14px/1 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  filter: grayscale(0.6) opacity(0.62);
  cursor: pointer;
  transition:
    filter 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}
.tr3b-toggle[hidden] {
  display: none;
}
.tr3b-toggle:hover,
.tr3b-toggle:focus-visible {
  border-color: rgba(127, 200, 255, 0.6);
  background: rgba(66, 148, 211, 0.18);
  filter: grayscale(0.15) opacity(0.95);
  outline: none;
}
.tr3b-toggle[aria-pressed='true'] {
  border-color: rgba(190, 220, 255, 0.75);
  background: rgba(20, 23, 28, 0.9);
  /* Active: full-colour saucer with a soft halo. drop-shadow works on an emoji
     where text-shadow does not, so the glyph itself telegraphs the state
     rather than relying on the chrome alone. */
  filter: drop-shadow(0 0 5px rgba(150, 210, 255, 0.9));
}
/* One segmented control: the two modes read as a single choice. */
.global-context-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  margin: 0 0 12px;
  padding: 2px;
  border: 1px solid rgba(98, 181, 255, 0.22);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.22);
}
.context-mode-button {
  display: flex;
  min-width: 0;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: rgba(214, 236, 255, 0.72);
  background: transparent;
  font: 600 10px/1.2 var(--font-mono);
  letter-spacing: 0.06em;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    background 0.15s ease;
}
.context-mode-button .material-symbols-outlined {
  font-size: 16px;
}
.context-mode-button:hover,
.context-mode-button:focus-visible {
  color: #fff;
  background: rgba(98, 181, 255, 0.08);
  outline: none;
}
/* Keep focus distinct when the selected tab owns the accent colors. */
.context-mode-button:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: -3px;
}

.context-mode-button.active {
  border-color: rgba(0, 212, 255, 0.55);
  color: #fff;
  background: rgba(0, 212, 255, 0.16);
}
.context-mode-button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.context-mode-view[hidden],
.context-mode-standby[hidden] {
  display: none !important;
}
/* Plain guidance under the tabs, not a placeholder box. */
.context-mode-standby {
  display: grid;
  gap: 6px;
  padding: 2px 2px 4px;
  color: rgba(214, 236, 255, 0.72);
  font: 10px/1.6 var(--font-mono);
  letter-spacing: 0.02em;
}
.context-mode-standby strong {
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.context-mode-view {
  min-height: 0;
}
#right-context-rail #global-context-panel:not(.collapsed) .context-mode-view,
#right-context-rail #global-context-panel:not(.collapsed) #radio-panel {
  /* These sections share the Context panel's existing scroller. Keep their
     natural heights so flexbox cannot compress one section and let its
     contents paint through the next section. */
  flex: 0 0 auto;
}
.panel-layer-toggle {
  min-width: 54px;
  padding: 4px 7px;
  border: 1px solid rgba(98, 181, 255, 0.3);
  border-radius: 5px;
  color: #8fcfff;
  background: rgba(42, 113, 171, 0.12);
  font: 7px/1.1 var(--font-mono);
  letter-spacing: 0.1em;
  cursor: pointer;
}
.panel-layer-toggle:hover,
.panel-layer-toggle:focus-visible {
  border-color: #79c2ff;
  color: #fff;
  outline: none;
}
.panel-layer-toggle.active {
  border-color: rgba(0, 212, 255, 0.7);
  color: #fff;
  background: rgba(0, 212, 255, 0.14);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.14);
}
.panel-layer-toggle:disabled {
  opacity: 0.45;
  cursor: wait;
}
.global-context-actions .panel-layer-toggle {
  width: 100%;
  min-height: 32px;
  padding: 6px 8px;
  font-size: 10px;
  letter-spacing: 0.06em;
}
#global-context-panel #cockpit-entry {
  position: static;
  z-index: auto;
  width: 100%;
  min-height: 32px;
  padding: 5px 8px;
  border-radius: 5px;
  justify-content: center;
  font-size: 10px;
  box-shadow: none;
}
#global-context-panel #cockpit-entry .material-symbols-outlined {
  font-size: 15px;
}
#global-context-panel #cockpit-entry kbd {
  padding: 2px 4px;
}

/* ALPR keeps its nearby count in the legend while a wider status chip
   (including ENABLING / DISABLING) is shown. */
.data-toggle-row[data-layer-id='alpr-cameras']
  .data-toggle-right:has(
    .data-toggle-btn:is(
      .transitioning,
      .feed-loading,
      .feed-degraded,
      .feed-stale,
      .feed-partial,
      .feed-fallback,
      .feed-unavailable
    )
  )
  .data-count {
  display: none;
}

body.ui-clean-view #right-context-rail,
body.recording-mode #right-context-rail,
body.ui-clean-view #right-context-rail > [data-panel-id],
body.recording-mode #right-context-rail > [data-panel-id] {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
@media (max-width: 720px) {
  #right-context-rail #weather-panel.collapsed,
  #right-context-rail #recent-imagery-panel.collapsed {
    width: 100%;
  }
}

/* ── Utilities Panel ─────────────────────────── */
/* Directions (from the layer list), Draw and Import. Draw and Import read as
   rows like Directions above them (.data-toggle-row): icon and name, their
   options indented under the name. */
#utilities-panel {
  --panel-expanded-width: 280px;
  width: var(--panel-expanded-width);
}

/* The layer list takes its natural height; the panel scrolls as a whole. */
.utilities-list {
  flex: 0 0 auto;
  max-height: none;
  overflow: visible;
}

.utilities-tools {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}

.utilities-tools .pp-toggle-group {
  width: 100%;
}

#utilities-panel .utilities-tools .pp-toggle-btn {
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
  gap: 8px;
  padding: 8px 10px 6px;
  color: var(--text-primary);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background var(--transition-fast);
}

#utilities-panel .utilities-tools .pp-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.03);
}

#utilities-panel .utilities-tools .pp-icon {
  flex: none;
  width: 16px;
  font-size: 16px;
  line-height: 1;
  color: var(--text-primary);
  text-align: center;
}

#utilities-panel .utilities-tools .pp-label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: none;
  color: var(--text-primary);
}

/* Draw marks its on state with an accent edge, like an active DISPLAY
   button. */
#utilities-panel
  .utilities-tools
  .pp-toggle-btn:is([aria-pressed='true'], .active) {
  background: var(--accent-dim);
  box-shadow: inset 2px 0 0 var(--accent);
}

#utilities-panel
  .utilities-tools
  :is(.pp-slider-row, .geo-import-list, .geo-import-hint) {
  margin-left: 34px;
  margin-right: 10px;
}

/* Draw's options sit flat under its name, like a layer row's controls, not
   as the card that hangs under a DISPLAY button. */
#utilities-panel .utilities-tools .pp-slider-row {
  padding: 4px 0;
  background: none;
  border: 0;
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
/* ── Radio companion section inside Context ── */
#radio-panel {
  position: relative;
  width: 100%;
  min-height: 0;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(65, 220, 231, 0.16);
}
.radio-panel-inner {
  position: relative;
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(65, 220, 231, 0.18);
  border-radius: 8px;
  background: rgba(2, 15, 20, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
#radio-panel .panel-header {
  margin-bottom: 0;
}
.radio-layer-state {
  color: var(--text-dim);
  font: 8px/1 var(--font-mono);
  letter-spacing: 0.12em;
}
.radio-layer-state.active {
  color: #65f7ff;
}
.radio-directory-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 8px;
  align-items: end;
}
.radio-filter-label {
  grid-column: 2;
  color: var(--text-dim);
  font: 7px/1 var(--font-mono);
  letter-spacing: 0.12em;
}
#radio-enable-btn {
  grid-row: 1 / span 2;
  min-height: 36px;
}
#radio-filter {
  /* Radio owns its compact density and arrow space; shared fields paint the
     palette and disabled state, including this intentional theme exception. */
  padding-block: 7px;
  padding-inline: 8px 24px;
  border-radius: 5px;
  font: 9px/1.2 var(--font-mono);
  --gev-field-border-color: rgba(65, 220, 231, 0.28);
  --gev-field-color: #c5faff;
  --gev-field-background: rgba(5, 24, 31, 0.88);
  --gev-field-disabled-opacity: 0.42;
}
.radio-station-card {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(65, 220, 231, 0.18);
  border-radius: 7px;
  background: rgba(2, 15, 20, 0.48);
  overflow-wrap: anywhere;
}
.radio-station-card strong {
  color: #e8feff;
  font: 11px/1.25 var(--font-mono);
  letter-spacing: 0.05em;
}
.radio-station-card span {
  color: var(--text-dim);
  font: 8px/1.35 var(--font-mono);
}
#radio-station-tags {
  color: #72dce6;
}
.radio-tuner {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 5px;
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(65, 220, 231, 0.22);
  border-radius: 7px;
  background: linear-gradient(
    180deg,
    rgba(1, 9, 13, 0.92),
    rgba(4, 24, 30, 0.72)
  );
  box-shadow: inset 0 0 18px rgba(0, 212, 255, 0.045);
}
.radio-tuner[hidden] {
  display: none;
}
.radio-tuner-header,
.radio-tuner-readout {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #6daeb5;
  font: 7px/1.2 var(--font-mono);
  letter-spacing: 0.1em;
}
#radio-tuner-value {
  min-width: 0;
  color: #a8f7ff;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.radio-tuner-dial {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 51px;
  overflow: hidden;
  contain: paint;
  border-block: 1px solid rgba(72, 225, 237, 0.3);
  background:
    linear-gradient(
      180deg,
      transparent 23px,
      rgba(65, 220, 231, 0.8) 24px,
      transparent 25px,
      transparent 28px,
      rgba(65, 220, 231, 0.6) 29px,
      transparent 30px
    ),
    radial-gradient(
      ellipse at center,
      rgba(39, 177, 191, 0.12),
      transparent 70%
    );
}
.radio-tuner-scale {
  position: absolute;
  inset: 0;
  overflow: hidden;
  color: #58cbd6;
  font: 9px/1 var(--font-mono);
  text-shadow: 0 0 7px rgba(65, 220, 231, 0.5);
  pointer-events: none;
}
.radio-tuner-tick {
  position: absolute;
  top: 6px;
  bottom: 0;
  min-width: 1px;
  border-left: 1px solid rgba(85, 224, 235, 0.38);
  color: #58cbd6;
  padding-left: 3px;
  white-space: nowrap;
  transform: translateX(-50%);
  transition: left 80ms linear;
}
.radio-tuner-tick.is-current {
  border-left-color: rgba(168, 247, 255, 0.9);
  color: #a8f7ff;
}
.radio-tuner-needle {
  position: absolute;
  z-index: 1;
  top: 2px;
  bottom: 2px;
  left: calc(7px + (100% - 14px) * var(--radio-tuner-ratio, 0));
  width: 3px;
  border-radius: 1px;
  background: #ff6f4f;
  box-shadow:
    0 0 4px #ff6f4f,
    0 0 10px rgba(255, 77, 50, 0.65);
  pointer-events: none;
  transform: translateX(-50%);
  transition: left 0.18s ease-out;
}
.radio-tuner.is-dragging .radio-tuner-needle,
.radio-tuner.is-dragging .radio-tuner-tick {
  transition: none;
}
#radio-tuner-slider {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: ew-resize;
  touch-action: none;
  background: transparent;
}
#radio-tuner-slider::-webkit-slider-runnable-track {
  height: 100%;
  background: transparent;
}
#radio-tuner-slider::-webkit-slider-thumb {
  width: 14px;
  height: 47px;
  margin-top: 2px;
  border: 0;
  border-radius: 1px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  box-shadow: none;
}
#radio-tuner-slider::-moz-range-track {
  height: 100%;
  background: transparent;
}
#radio-tuner-slider::-moz-range-thumb {
  width: 14px;
  height: 47px;
  border: 0;
  border-radius: 1px;
  background: transparent;
  box-shadow: none;
}
.radio-tuner.is-static .radio-tuner-dial {
  box-shadow: inset 0 0 14px rgba(255, 111, 79, 0.1);
}
.radio-tuner.is-static #radio-tuner-station {
  color: #ff9b7e;
}
.radio-tuner-readout span:first-child {
  min-width: 0;
  color: #7fe6ef;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.radio-tuner-readout span:last-child {
  flex: 0 0 auto;
  color: #517f84;
}
.radio-transport {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}
.radio-transport button {
  min-height: 30px;
  padding: 6px 3px;
  border: 1px solid rgba(65, 220, 231, 0.28);
  border-radius: 5px;
  color: #8feaf2;
  background: rgba(14, 69, 78, 0.14);
  font: 8px/1 var(--font-mono);
  letter-spacing: 0.06em;
  cursor: pointer;
}
/* A longer translated action stays on one line, cut with an ellipsis. */
html:not([lang='en']) .radio-transport button {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.radio-transport button:hover:not(:disabled),
.radio-transport button:focus-visible:not(:disabled) {
  border-color: #65f7ff;
  color: #fff;
  outline: none;
}
.radio-transport button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
#radio-filter:disabled {
  cursor: not-allowed;
}
#radio-play-btn.active {
  color: #fff;
  border-color: rgba(101, 247, 255, 0.8);
  background: rgba(65, 220, 231, 0.18);
  box-shadow: 0 0 12px rgba(65, 220, 231, 0.12);
}
.radio-volume-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 32px;
  gap: 8px;
  align-items: center;
  color: var(--text-dim);
  font: 7px/1 var(--font-mono);
  letter-spacing: 0.1em;
}
.radio-volume-row input {
  width: 100%;
}
.radio-playback-state {
  min-height: 12px;
  color: #79d7df;
  font: 8px/1.35 var(--font-mono);
}
.radio-playback-state.error {
  color: #ff9d8f;
}
.radio-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 5px 10px;
}
.radio-links a {
  color: #64cbd5;
  font: 7px/1.3 var(--font-mono);
  letter-spacing: 0.06em;
  text-decoration: none;
}
.radio-links a:hover,
.radio-links a:focus-visible {
  color: #fff;
}
.radio-privacy {
  margin: 0;
  color: rgba(190, 230, 230, 0.48);
  font: 7px/1.4 var(--font-mono);
}
#military-awareness-panel {
  width: 100%;
  min-height: 0;
  overflow: auto;
  box-sizing: border-box;
  padding: 2px 1px 0;
  color: #dceeff;
  background: transparent;
  border: 0;
  font:
    11px/1.35 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
}

#military-awareness-panel[hidden] {
  display: none;
}
.military-awareness-names {
  margin: 6px 0;
  color: var(--text-dim);
}
.military-awareness-names > div {
  max-height: 160px;
  overflow-y: auto;
  padding: 6px 0;
}
.military-awareness-subject {
  margin: 0 0 7px;
  color: #fff;
}
.military-awareness-photo {
  display: block;
  margin: 0 0 8px;
  color: #a9b7c7;
  text-decoration: none;
}
.military-awareness-photo img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(98, 181, 255, 0.34);
  border-radius: 4px;
}
.military-awareness-photo small {
  display: block;
  margin-top: 3px;
}
.military-awareness-photo:hover small,
.military-awareness-photo:focus-visible small {
  color: #fff;
}
.military-awareness-photo:focus-visible {
  outline: 1px solid rgba(127, 200, 255, 0.85);
  outline-offset: 2px;
}
.military-awareness-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 5px;
  margin: 0 0 8px;
}
.military-awareness-controls button {
  border: 1px solid rgba(98, 181, 255, 0.34);
  border-radius: 4px;
  padding: 4px 3px;
  color: #a9d9ff;
  background: rgba(42, 113, 171, 0.12);
  font:
    9px/1.2 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  letter-spacing: 0.07em;
  cursor: pointer;
}
.military-awareness-controls button:hover,
.military-awareness-controls button:focus-visible {
  color: #fff;
  border-color: rgba(127, 200, 255, 0.85);
  background: rgba(66, 148, 211, 0.24);
  outline: none;
}
.military-awareness-controls button:disabled {
  color: #627181;
  border-color: rgba(98, 181, 255, 0.12);
  background: transparent;
  cursor: default;
}
.military-awareness-row {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 7px 0;
}
.military-awareness-row > div {
  display: flex;
  justify-content: space-between;
}
.military-awareness-row b {
  color: #7fc8ff;
}
.military-awareness-row.unknown b {
  color: #8fcfff;
}
.military-awareness-row small,
.military-awareness-note {
  color: #a9b7c7;
}
.military-awareness-row ul {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.military-awareness-row li {
  display: block;
}
.military-awareness-target {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 0;
  padding: 1px 0;
  color: #dceeff;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.military-awareness-target.unavailable {
  color: var(--text-dim);
  cursor: default;
}
.military-awareness-target:hover,
.military-awareness-target:focus-visible {
  color: #fff;
  outline: none;
  text-shadow: 0 0 8px rgba(114, 202, 255, 0.85);
}
.military-awareness-target:focus-visible {
  box-shadow: inset 0 -1px 0 #7fc8ff;
}
.military-awareness-target span {
  color: #7fc8ff;
  white-space: nowrap;
}
.military-awareness-note {
  margin: 8px 0 0;
  font-size: 10px;
}
.military-awareness-standby {
  display: grid;
  gap: 7px;
  padding: 12px 4px 4px;
  border-top: 1px solid rgba(98, 181, 255, 0.16);
}
.military-awareness-standby strong {
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.military-awareness-standby span {
  color: rgba(214, 236, 255, 0.72);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
.military-awareness-standby button {
  justify-self: start;
  padding: 4px 12px;
  border: 1px solid rgba(98, 181, 255, 0.34);
  border-radius: 4px;
  color: #a9d9ff;
  background: rgba(42, 113, 171, 0.12);
  font:
    9px/1.2 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  letter-spacing: 0.08em;
  cursor: pointer;
}

#military-awareness-direction-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
}
#military-awareness-direction-overlay[hidden] {
  display: none;
}
.military-awareness-compass-ring {
  --compass-rotation: 0deg;
  position: absolute;
  box-sizing: border-box;
  border: 1px solid rgba(111, 196, 255, 0.2);
  outline: 1px dashed rgba(111, 196, 255, 0.28);
  outline-offset: -5px;
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 5px rgba(34, 128, 196, 0.018),
    inset 0 0 24px rgba(34, 128, 196, 0.035),
    0 0 14px rgba(34, 128, 196, 0.05);
}
.military-awareness-compass-ring::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -7px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid rgba(127, 200, 255, 0.88);
  transform: translateX(-50%);
  filter: drop-shadow(0 0 5px rgba(87, 184, 255, 0.7));
}
.military-awareness-compass-ring::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(125, 205, 255, 0.38) 0deg 0.7deg,
    transparent 0.7deg 15deg
  );
  -webkit-mask: radial-gradient(
    circle,
    transparent calc(100% - 8px),
    #000 calc(100% - 8px) calc(100% - 4px),
    transparent calc(100% - 4px)
  );
  mask: radial-gradient(
    circle,
    transparent calc(100% - 8px),
    #000 calc(100% - 8px) calc(100% - 4px),
    transparent calc(100% - 4px)
  );
  transform: rotate(var(--compass-rotation));
  transition: transform 80ms linear;
}
.military-awareness-compass-label,
.military-awareness-compass-heading {
  position: absolute;
  transform: translate(-50%, -50%);
  color: rgba(156, 213, 255, 0.7);
  font:
    9px/1 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  letter-spacing: 0.08em;
  text-shadow: 0 0 7px rgba(53, 161, 235, 0.55);
}
.military-awareness-compass-label.cardinal-n {
  color: rgba(255, 188, 87, 0.92);
}
.military-awareness-compass-heading {
  color: rgba(190, 225, 249, 0.76);
  font-size: 8px;
}
.military-awareness-direction-marker {
  position: absolute;
  width: 1px;
  height: 1px;
  transform: translate(-50%, -50%);
  transition: opacity 100ms linear;
}
.military-awareness-direction-marker[hidden] {
  display: none;
}
.military-awareness-direction-arrow {
  position: absolute;
  left: 50%;
  top: 50%;
  color: #74dbff;
  font: 23px/1 sans-serif;
  transform-origin: 50% 50%;
  text-shadow:
    0 0 5px rgba(87, 223, 255, 0.9),
    0 0 13px rgba(87, 223, 255, 0.35);
}
.military-awareness-direction-label {
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 3px 6px;
  border: 1px solid rgba(116, 219, 255, 0.24);
  border-radius: 3px;
  color: #bceeff;
  background: rgba(5, 12, 20, 0.68);
  font:
    8px/1.3 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  text-align: center;
  white-space: pre;
  text-shadow: 0 0 5px rgba(116, 219, 255, 0.38);
}

.data-toggle-row.gev-voice-focus {
  background: rgba(92, 255, 198, 0.1);
  box-shadow:
    inset 0 0 0 1px rgba(92, 255, 198, 0.72),
    0 0 18px rgba(92, 255, 198, 0.18);
}

.data-toggle-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.data-toggle-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.data-icon {
  font-size: 16px;
  line-height: 1;
}

.data-name {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.data-toggle-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.data-count {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  min-width: 30px;
  text-align: right;
}

/* Longer translations below; English keeps the layout above. */

/* The name takes the room the status column leaves; a long word wraps inside
   it instead of pushing the toggle out of line. */
html:not([lang='en']) .data-toggle-left {
  flex: 1 1 auto;
  min-width: 0;
}

/* A fixed icon box, so every name (and the meta line under it, 26px in)
   starts at the same x whatever the glyph's width. */
html:not([lang='en']) .data-toggle-left .data-icon {
  flex: none;
  width: 18px;
  text-align: center;
}

/* Translated layer names are longer: break between words, and hyphenate a
   word that still does not fit instead of splitting it anywhere. */
html:not([lang='en']) .data-name {
  min-width: 0;
  overflow-wrap: break-word;
  hyphens: auto;
  /* No two-letter pieces such as "es-paciales": a word hyphenates only when
     at least four letters stay on each side. */
  hyphenate-limit-chars: 8 4 4;
}

html:not([lang='en']) .data-count {
  min-width: auto;
  text-wrap: balance;
}

/* The status column keeps its width, so a wide chip (WIRD AKTIVIERT) never
   overlaps the name; the name wraps in the room left beside it. */
html:not([lang='en']) .data-toggle-right {
  flex: none;
}

/* Row text pieces that must not break inside: a hyphenated code (ADS-B) and
   the space before a " · " separator (see rowTextRuns in layerRowText.js). */
html:not([lang='en']) .data-keep {
  white-space: nowrap;
}

/* A count phrase ("24 nearby · 2 on screen") takes its own line under the
   name instead of squeezing it beside the toggle. layerPanel.js sets the
   class only outside English. */
html:not([lang='en']) .data-toggle-row--count-line .data-toggle-top {
  flex-wrap: wrap;
  row-gap: 2px;
}

html:not([lang='en']) .data-toggle-row--count-line .data-toggle-right {
  display: contents;
}

/* A zero basis, so a long name wraps beside the toggle instead of pushing the
   toggle onto the count's line. */
html:not([lang='en']) .data-toggle-row--count-line .data-toggle-left {
  flex-basis: 0;
}

html:not([lang='en']) .data-toggle-row--count-line .data-count {
  order: 1;
  flex: 1 0 100%;
  padding-left: 26px;
  font-size: 10px;
  text-align: left;
}

/* The "—" placeholder gives way to a wide status chip, so the name keeps the
   room it needs. */
html:not([lang='en'])
  .data-toggle-right:has(
    .data-toggle-btn:is(
      .transitioning,
      .feed-loading,
      .feed-degraded,
      .feed-stale,
      .feed-partial,
      .feed-fallback,
      .feed-unavailable
    )
  )
  .data-count-empty {
  display: none;
}

.data-toggle-btn {
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    color var(--transition-fast),
    min-width var(--transition-fast),
    letter-spacing var(--transition-fast);
  outline: none;
  min-width: 38px;
  text-align: center;
}

html:not([lang='en']) .data-toggle-btn {
  flex: none;
  white-space: nowrap;
}

/* An inset ring stays visible inside the scrolling layer list. */
.data-toggle-btn:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: -3px;
}

.data-toggle-btn.feed-loading,
.data-toggle-btn.feed-degraded,
.data-toggle-btn.feed-stale,
.data-toggle-btn.feed-partial,
.data-toggle-btn.feed-fallback,
.data-toggle-btn.feed-unavailable {
  min-width: 82px;
  letter-spacing: 0.8px;
}

/* Status chips up to eight characters share one width; a longer word grows
   its own chip rather than widening every chip and squeezing every name. */
html:not([lang='en'])
  .data-toggle-btn:is(
    .feed-loading,
    .feed-degraded,
    .feed-stale,
    .feed-partial,
    .feed-fallback,
    .feed-unavailable
  ) {
  min-width: 72px;
}

.data-toggle-btn:hover {
  border-color: var(--glass-border-hover);
  background: rgba(255, 255, 255, 0.06);
}

.data-toggle-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.15);
}

.data-toggle-btn.active.feed-stale,
.data-toggle-btn.active.feed-partial,
.data-toggle-btn.active.feed-fallback {
  color: #ffd27a;
  border-color: rgba(255, 190, 82, 0.75);
  background: rgba(255, 174, 51, 0.1);
  box-shadow: 0 0 10px rgba(255, 174, 51, 0.12);
}

.data-toggle-btn.active.feed-degraded {
  color: #ffad72;
  border-color: rgba(255, 137, 72, 0.78);
  background: rgba(255, 112, 48, 0.1);
  box-shadow: 0 0 10px rgba(255, 112, 48, 0.12);
}

.data-toggle-btn.active.feed-unavailable {
  color: #ff8585;
  border-color: rgba(255, 92, 92, 0.78);
  background: rgba(255, 60, 60, 0.1);
  box-shadow: 0 0 10px rgba(255, 60, 60, 0.12);
}

.data-toggle-meta {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  padding-left: 26px;
  margin-top: 2px;
}

/* Optional per-layer sub-controls: mode chips plus a color legend. Aligned
   under the layer name like .data-toggle-meta, and wrapping so a legend can
   grow without widening the rail. */
.data-toggle-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding-left: 26px;
  margin-top: 5px;
}

.data-toggle-controls[hidden] {
  display: none;
}

.data-toggle-chip {
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    opacity var(--transition-fast);
  outline: none;
}

/* An icon action chip (RailChips.vue `icon`): a square button sized to the
   text chips beside it. */
.data-toggle-chip.chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 0 4px;
  letter-spacing: 0;
  /* A glyph alone needs more contrast than a text chip to read. */
  color: var(--text-secondary);
}

.data-toggle-chip.chip-icon:hover,
.data-toggle-chip.chip-icon:focus-visible {
  color: var(--text-primary);
}

.data-toggle-chip.chip-icon .material-symbols-outlined {
  font-size: 15px;
  line-height: 1;
}

.data-toggle-chip:hover,
.data-toggle-chip:focus-visible {
  border-color: var(--glass-border-hover);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.data-toggle-chip.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

/* A keyed chip (RailChips.vue `swatch`): the colour of what it turns on before
   its label and the count after it, while it is on, in the chip's own type.
   Off, it is a plain chip. */
.data-toggle-chip.chip-keyed {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Async sub-controls: a chip must never read ACTIVE before the data it turns
   on actually exists, so loading and failure are their own visible states. */
.data-toggle-chip:disabled {
  cursor: wait;
  opacity: 0.7;
}

.data-toggle-chip.chip-loading {
  color: var(--text-secondary);
  border-color: rgba(255, 255, 255, 0.18);
}

.data-toggle-chip.chip-error {
  color: #ff8585;
  border-color: rgba(255, 92, 92, 0.6);
  background: rgba(255, 60, 60, 0.08);
}

.data-toggle-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  cursor: default;
}

.data-toggle-legend-swatch,
.data-toggle-chip-swatch {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  /* The swatch IS the datum — keep it exactly the point color, with only a
     hairline ring so a near-black class still reads on the panel glass. */
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
  flex: none;
}

/* Optional per-layer ordered list: the turn-by-turn directions under the
   Directions row. Kept short and scrollable so a 40-step drive cannot push the
   rest of the rail off screen. */
.data-row-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0 0 0 26px;
  max-height: 150px;
  overflow-y: auto;
  counter-reset: gev-step;
}

.data-row-list[hidden] {
  display: none;
}

.data-row-list-item {
  counter-increment: gev-step;
  display: flex;
  align-items: baseline;
  gap: 6px;
  width: 100%;
  padding: 2px 4px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.4px;
  text-align: left;
  color: var(--text-dim);
  background: none;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
  outline: none;
}

.data-row-list-item::before {
  content: counter(gev-step);
  min-width: 13px;
  text-align: right;
  color: var(--text-dim);
  opacity: 0.65;
  flex: none;
}

.data-row-list-item:hover,
.data-row-list-item:focus-visible {
  border-color: var(--glass-border-hover);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.data-row-list-item.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

/* The step the camera is on during FLY: the same accent, plus a rail on the
   leading edge so it reads as "here", not "chosen". */
.data-row-list-item.current {
  border-left-color: var(--accent);
  border-left-width: 2px;
}

.data-row-list-lead {
  min-width: 34px;
  flex: none;
  opacity: 0.85;
}

/* A row's colour dot (a reading's band), before its value. */
.data-row-list-swatch {
  flex: none;
  align-self: center;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.data-row-list-text {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* A translated instruction wraps under itself rather than losing its tail:
   "Gira a la derecha hacia …" says nothing. */
html:not([lang='en']) .data-row-list-lead {
  white-space: nowrap;
}

html:not([lang='en']) .data-row-list-text {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* A list line that states a limit rather than offering an action. */
.data-row-list-item.note {
  cursor: default;
  opacity: 0.75;
  font-style: italic;
}

.data-toggle-controls-info {
  flex-basis: 100%;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-secondary);
  padding-top: 3px;
  overflow-wrap: anywhere;
}

/* Optional per-layer one-of-many switch (Active Fires confidence). The shared
   .gev-segmented surface, sized to the chip row. */
.data-toggle-controls .data-toggle-segmented {
  flex-basis: 100%;
  max-width: 220px;
}

.data-toggle-segmented-label {
  flex-basis: 100%;
  padding-top: 2px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.data-toggle-controls .data-toggle-segment {
  min-height: 20px;
  padding: 3px 6px;
  font-size: 8px;
  letter-spacing: 0.8px;
}

/* Optional start and end pickers on one line (e.g. a layer's period). The
   shared field style paints each select. */
.data-toggle-range {
  flex-basis: 100%;
  display: grid;
  gap: 4px;
  padding-top: 2px;
}

.data-toggle-range-ends {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.data-toggle-range-end {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.data-toggle-range-caption {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.data-toggle-range-select {
  flex: 1;
  min-width: 0;
  min-height: 24px;
  font: 10px/1 var(--font-mono);
}

/* Optional per-layer quantitative slider (Active Fires minimum FRP). The
   track is painted by the layer (`--slider-track`, a stepped color ramp), so
   the slider doubles as the marker legend; ticks sit under their thresholds. */
.data-toggle-slider {
  flex-basis: 100%;
  display: grid;
  gap: 2px;
  padding-top: 2px;
}

.data-toggle-slider-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.data-toggle-slider-value {
  min-width: 0;
  font-size: 9px;
  letter-spacing: 0.5px;
  text-transform: none;
}

.data-toggle-slider-input {
  height: 14px;
}

.data-toggle-slider-input::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 3px;
  background: var(--slider-track, rgba(255, 255, 255, 0.08));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.data-toggle-slider-input::-moz-range-track,
.data-toggle-slider-input::-moz-range-progress {
  height: 5px;
  border-radius: 3px;
  background: var(--slider-track, rgba(255, 255, 255, 0.08));
}

.data-toggle-slider-input::-webkit-slider-thumb {
  width: 11px;
  height: 11px;
  margin-top: -3px;
  background: var(--text-primary);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 0 6px rgba(255, 255, 255, 0.35);
}

.data-toggle-slider-input::-moz-range-thumb {
  width: 11px;
  height: 11px;
  background: var(--text-primary);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 0 6px rgba(255, 255, 255, 0.35);
}

.data-toggle-slider-ticks {
  position: relative;
  height: 10px;
  margin: 0 5px;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.4px;
  color: var(--text-dim);
}

.data-toggle-slider-tick {
  position: absolute;
  top: 0;
  left: var(--at);
  transform: translateX(-50%);
  white-space: nowrap;
}

.data-toggle-slider-tick:first-child {
  transform: none;
}
/* ── Local RTL-SDR card (FM + Local ADS-B receiver) ── */
.sdr-radio-card {
  display: grid;
  gap: 7px;
  margin-top: 3px;
  padding: 9px;
  border: 1px solid rgba(255, 170, 60, 0.28);
  border-radius: 7px;
  background: linear-gradient(
    180deg,
    rgba(31, 18, 4, 0.58),
    rgba(4, 20, 24, 0.72)
  );
}
.sdr-radio-heading,
.sdr-radio-actions,
.sdr-mode-row,
.sdr-gain-row,
.sdr-frequency-row,
.sdr-seek-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sdr-radio-heading {
  justify-content: space-between;
}
.sdr-radio-heading strong {
  color: #ffd38a;
  font: 9px/1 var(--font-mono);
  letter-spacing: 0.1em;
}
#sdr-connection-state {
  color: #9e865f;
  font: 7px/1 var(--font-mono);
  letter-spacing: 0.1em;
}
#sdr-connection-state.active {
  color: #74f7c4;
}
.sdr-radio-card > p {
  margin: 0;
  color: rgba(213, 230, 225, 0.58);
  font: 7px/1.4 var(--font-mono);
}
.sdr-radio-card button,
.sdr-radio-card select,
.sdr-radio-card input[type='number'] {
  min-height: 28px;
  border-radius: 5px;
  font: 8px/1 var(--font-mono);
  /* The shared field paints the surface (and the select's chevron). */
  --gev-field-border-color: rgba(255, 183, 82, 0.28);
  --gev-field-color: #ffd79a;
  --gev-field-background: rgba(38, 25, 8, 0.52);
}
.sdr-radio-card button {
  padding: 6px 8px;
  cursor: pointer;
}
.sdr-radio-card button:hover:not(:disabled),
.sdr-radio-card button:focus-visible:not(:disabled),
.sdr-radio-card button.active {
  border-color: #ffd38a;
  color: #fff;
  outline: none;
  background: rgba(130, 83, 18, 0.28);
}
.sdr-radio-card button:disabled,
.sdr-radio-card select:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.sdr-radio-actions > *,
.sdr-mode-row > *,
.sdr-seek-row > * {
  flex: 1;
}
.sdr-gain-row label,
.sdr-frequency-row label {
  color: #9e865f;
  font: 7px/1 var(--font-mono);
  letter-spacing: 0.08em;
}
.sdr-gain-row select {
  flex: 1;
  min-width: 0;
  padding-block: 5px;
  padding-inline: 7px 22px;
}
.sdr-adsb-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 8px;
  color: #9e865f;
  font: 7px/1.3 var(--font-mono);
  letter-spacing: 0.08em;
}
.sdr-adsb-stats[hidden] {
  display: none;
}
.sdr-adsb-stats output {
  color: #ffd79a;
  font: 9px/1 var(--font-mono);
}
.sdr-frequency-row input[type='number'] {
  width: 78px;
  min-width: 0;
  padding: 5px 7px;
}
.sdr-frequency-row button {
  margin-left: auto;
}
.sdr-radio-card .radio-volume-row {
  color: #9e865f;
}
.sdr-radio-card .radio-playback-state {
  color: #ddbe86;
}
.sdr-radio-card .radio-playback-state.error {
  color: #ff9d8f;
}
.sdr-feed-status {
  color: #9e865f;
  font: 8px/1.3 var(--font-mono);
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
}
.sdr-feed-status[hidden] {
  display: none;
}

.data-row-list-item.unranked {
  counter-increment: none;
}
.data-row-list-item.unranked::before {
  content: '';
}
.data-row-list-note {
  flex: none;
  opacity: 0.75;
  white-space: nowrap;
}
/* A ranking reads one line a row in every language: a name is cut, not wrapped. */
html:not([lang='en']) .data-row-list.is-single-line .data-row-list-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
}
/* ── CCTV Panel ─────────────────────────────── */
#cctv-panel {
  --panel-expanded-width: 360px;
  position: fixed;
  top: var(--left-stack-top);
  left: var(--left-stack-x);
  right: auto;
  bottom: auto;
  z-index: 100;
  width: var(--panel-expanded-width);
  max-height: calc(100vh - 24px);
}

#cctv-panel .panel-glow {
  position: absolute;
  inset: -18px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 212, 255, 0.16) 0%,
    transparent 65%
  );
  filter: blur(16px);
  opacity: 0.25;
  pointer-events: none;
}

.cctv-panel-inner {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--panel-radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.cctv-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 0;
}

/* Spanish labels overflow the nowrap .scene-btn row of the fixed-width
   panel; wrap the row under es only, English stays as is. */
html[lang='es'] .cctv-controls {
  flex-wrap: wrap;
}

/* A label longer than its button wraps inside it, not past the panel edge. */
html:not([lang='en']) .cctv-controls .scene-btn {
  white-space: normal;
  overflow-wrap: break-word;
}

.cctv-calibration-block {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  padding: 8px 9px;
  background: rgba(255, 255, 255, 0.02);
}

.cctv-calibration-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.cctv-calibration-header .cctv-summary-label {
  margin: 0;
}

/* Click-to-edit effective-pose readout (viewshed/gizmo design §3d): compact
   value chips replace the seven offset sliders. */
.cctv-cal-readout {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.cctv-cal-input {
  width: 58px;
}

.cctv-cal-value {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.7px;
  color: #91edff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  padding: 4px 7px;
  cursor: text;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.cctv-cal-value:hover:not(:disabled) {
  border-color: rgba(0, 212, 255, 0.45);
  background: rgba(0, 212, 255, 0.08);
}

.cctv-calibration-actions {
  margin-top: 8px;
}

#cctv-panel input:disabled,
#cctv-panel button:disabled,
#cctv-panel select:disabled {
  opacity: 0.45;
}

#cctv-camera-select {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#cctv-enable-btn.active,
#cctv-coverage-btn.active,
#cctv-auto-hop-btn.active,
#cctv-projection-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(0, 212, 255, 0.14);
}

#cctv-quality-chip {
  min-width: 90px;
  --status-badge-border: rgba(0, 212, 255, 0.2);
  --status-badge-color: #8fe7ff;
  --status-badge-background: rgba(0, 212, 255, 0.08);
}

/* CAL badge states (cctv-v2 §3b, amended by LOCKED §9.2 — panel-only, no
   in-world tint). Three visually distinct states: calibrated / curated /
   raw-prior. */
#cctv-quality-chip[data-cal-badge='calibrated'] {
  --status-badge-color: #adffbf;
  --status-badge-border: rgba(141, 255, 135, 0.42);
  --status-badge-background: rgba(141, 255, 135, 0.12);
}

#cctv-quality-chip[data-cal-badge='curated'] {
  --status-badge-color: #ffe6a2;
  --status-badge-border: rgba(255, 217, 122, 0.35);
  --status-badge-background: rgba(255, 217, 122, 0.1);
}

/* Unsaved live edits (save-gated persistence, viewshed design §3e). */
#cctv-quality-chip[data-cal-badge='edited'] {
  --status-badge-color: #ffd08a;
  --status-badge-border: rgba(255, 176, 82, 0.5);
  --status-badge-background: rgba(255, 176, 82, 0.14);
}

.cctv-frame-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(0, 244, 255, 0.09),
      transparent 44%
    ),
    linear-gradient(180deg, rgba(8, 14, 19, 0.88), rgba(4, 7, 11, 0.96));
  min-height: 150px;
  /* .cctv-panel-inner is a scrolling column flex container, so the default
     flex-shrink:1 squeezed this wrap down to its 150px floor while the 16:9
     image inside is taller — and the wrap is overflow:hidden, which clipped
     the bottom of the frame right back off. Never shrink the preview. */
  flex-shrink: 0;
}

/* Lightweight loading shimmer while the active frame is fetching */
.cctv-frame-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 24%,
    rgba(0, 212, 255, 0.08) 44%,
    rgba(170, 244, 255, 0.14) 50%,
    rgba(0, 212, 255, 0.08) 56%,
    transparent 76%
  );
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.cctv-frame-wrap.loading::after {
  opacity: 1;
  animation: cctv-frame-shimmer 1.4s linear infinite;
}

/* "Acquiring" caption only when no previous frame is showing underneath.
   The text lives in the markup (data-i18n) so it is translated. */
.cctv-frame-caption {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 2.2px;
  color: rgba(145, 237, 255, 0.62);
  pointer-events: none;
}

.cctv-frame-wrap.loading:not(.has-frame) .cctv-frame-caption {
  display: flex;
}

@keyframes cctv-frame-shimmer {
  to {
    transform: translateX(100%);
  }
}

#cctv-frame {
  width: 100%;
  /* A fixed 16:9 box with the frame CONTAINED inside it. Providers burn their
     timestamp into a corner (TfL top-left, Austin bottom-left) and the old
     150px-tall box was ~2.2:1, so object-fit: cover ate ~18px off the top and
     bottom — exactly where those stamps live (owner field test 2026-07-31).
     Sources are not all 16:9 either (a TfL frame measures 352x288), so
     `contain` is what actually guarantees nothing is cut; the ratio just keeps
     the panel height stable as you switch cameras. */
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: contain;
  display: block;
  /* No fade: a camera change hides the old frame at once (never its pixels
     under the new camera) and shows the new one as soon as it is decoded. A
     180 ms fade-in after every arriving frame made each camera click linger
     on black. */
  opacity: 0;
}

#cctv-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

#cctv-frame.active {
  opacity: 1;
}

#cctv-video:not([hidden]) {
  opacity: 1;
}

#cctv-frame[hidden],
#cctv-video[hidden] {
  display: none;
}

#cctv-meta {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

#cctv-source-badge {
  align-self: flex-start;
}

#cctv-source-badge[data-frame-state='loading'] {
  --status-badge-color: #ffe59b;
  --status-badge-border: rgba(255, 205, 92, 0.45);
  --status-badge-background: rgba(255, 205, 92, 0.1);
}

#cctv-source-badge[data-frame-state='error'] {
  --status-badge-color: #ffb0b0;
  --status-badge-border: rgba(255, 102, 102, 0.5);
  --status-badge-background: rgba(255, 72, 72, 0.11);
}

.cctv-summary-label {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 1.7px;
  color: var(--text-dim);
}

#cctv-summary {
  min-height: 38px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.8px;
  line-height: 1.45;
  color: #a8f7ff;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.18);
}

/* Tighter calibration chips keep the seven values to two rows, so
   SAVE / RESET stay in view. */
html:not([lang='en']) .cctv-cal-readout {
  gap: 4px;
}

html:not([lang='en']) .cctv-cal-value {
  flex: 1 1 auto;
  white-space: nowrap;
  letter-spacing: 0.3px;
  padding: 4px;
}

html:not([lang='en']) #cctv-camera-select {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

/* The camera name gets its own row; PREV / NEXT share the row below it. */
html:not([lang='en']) .cctv-controls:has(#cctv-camera-select) {
  flex-wrap: wrap;
}

html:not([lang='en']) #cctv-camera-select {
  flex: 1 1 100%;
  order: -1;
}
.qci-panel {
  position: fixed;
  z-index: 2000;
  top: 80px;
  right: 24px;
  width: min(360px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid #3eabbc;
  border-radius: 8px;
  background: #071117;
  color: #e6f8fb;
  box-shadow: 0 12px 36px #000a;
  font: 12px/1.4 sans-serif;
}
.qci-panel[hidden],
.qci-live[hidden],
.qci-note[hidden],
.qci-panel a[hidden],
.qci-marker[hidden],
.qci-marker-still[hidden] {
  display: none;
}
.qci-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  cursor: move;
  touch-action: none;
}
.qci-panel button {
  border: 1px solid #43818d;
  border-radius: 4px;
  padding: 4px 8px;
  background: #102830;
  color: inherit;
  cursor: pointer;
}
.qci-panel button:focus-visible {
  outline: 2px solid #82e9f7;
  outline-offset: 2px;
}
.qci-coordinates,
.qci-credit,
.qci-note {
  margin: 0 10px 8px;
  color: #a9c5ca;
  font: 10px/1.45 'Cascadia Code', Consolas, monospace;
}
.qci-credit {
  color: #7fc7d2;
}
.qci-live {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.qci-actions {
  display: flex;
  gap: 8px;
  padding: 8px 10px 0;
}
.qci-actions[hidden] {
  display: none;
}
.qci-panel a {
  display: inline-block;
  margin: 0 10px 10px;
  color: #82e9f7;
}
.qci-marker {
  position: fixed;
  z-index: 500;
  width: 160px;
  transform: translate(-50%, -100%) scale(var(--qci-scale, 1));
  transform-origin: 50% 100%;
  pointer-events: none;
  padding: 3px;
  border: 1px solid #65d7e7;
  background: #071117;
  color: #d8f9ff;
  font: 10px/1.3 sans-serif;
}
.qci-marker-still {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.qci-marker-label {
  display: block;
  padding: 3px;
}
.qci-marker-link-only {
  width: max-content;
  max-width: 220px;
}
/* The LIVE section inside Context: a live stream in the platform's player. */

#live-panel[hidden] {
  display: none !important;
}

/* A section inside Context, laid out as the Radio section is: its +/-
   hides and shows the body, and it goes with the Context panel. */
#live-panel {
  position: relative;
  width: 100%;
  min-height: 0;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(65, 220, 231, 0.16);
}
.live-panel-inner {
  position: relative;
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(65, 220, 231, 0.18);
  border-radius: 8px;
  background: rgba(2, 15, 20, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
#live-panel .panel-header {
  margin-bottom: 0;
}
#right-context-rail #global-context-panel:not(.collapsed) #live-panel {
  flex: 0 0 auto;
}
#live-panel.collapsed .live-panel-inner > :not(.panel-header),
#global-context-panel.collapsed #live-panel {
  display: none !important;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.12em;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: none;
  flex: none;
}
.live-dot.waiting {
  background: #ffb547;
}
.live-dot.on-air {
  background: #ff3b3b;
  box-shadow: 0 0 6px rgba(255, 59, 59, 0.9);
  animation: live-blink 1.2s ease-in-out infinite;
}
@keyframes live-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot.on-air {
    animation: none;
  }
}

.live-subject {
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: 0.85;
  margin: 2px 0 6px;
}
.live-pick {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.live-stream-title {
  flex: 1;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.live-stream-title small {
  font-weight: 400;
  opacity: 0.7;
}
.live-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  background: rgba(0, 7, 12, 0.6);
  color: inherit;
  cursor: pointer;
  line-height: 1;
}
.live-step .material-symbols-outlined {
  font-size: 18px;
}
@media (pointer: coarse) {
  .live-step {
    min-width: 44px;
    min-height: 44px;
  }
}
.live-step:hover,
.live-step:focus-visible {
  border-color: var(--cockpit-accent, #00dcff);
  outline: none;
}

/* The screen keeps a 16:9 box whether a player is in it or not. */
.live-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 2px;
  overflow: hidden;
}
.live-player-host,
.live-player-host iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.live-screen:not(.active) .live-player-host {
  display: none;
}
/* The poster's Play: the only way the player is loaded. */
.live-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: max-content;
  height: max-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  background: rgba(0, 7, 12, 0.72);
  color: #f4fbff;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
}
.live-play:hover,
.live-play:focus-visible {
  border-color: #ff3b3b;
  outline: none;
}
.live-play .material-symbols-outlined {
  font-size: 20px;
}
.live-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.08em;
  background:
    radial-gradient(
      circle at 50% 40%,
      rgba(0, 220, 255, 0.08),
      transparent 60%
    ),
    #050a0f;
}
.live-card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}
.live-card.offline .live-card-dot {
  background: #ff3b3b;
  opacity: 0.6;
}
.live-card button {
  padding: 3px 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  background: rgba(0, 7, 12, 0.7);
  color: #f4fbff;
  font: inherit;
  letter-spacing: 0.12em;
  cursor: pointer;
}
.live-card button:hover,
.live-card button:focus-visible {
  border-color: var(--cockpit-accent, #00dcff);
  outline: none;
}

.live-status {
  margin: 6px 0 0;
  font-size: 11px;
  opacity: 0.85;
}
.live-credit,
.live-privacy {
  margin: 6px 0 0;
  font-size: 10px;
  opacity: 0.75;
}
.live-credit a {
  color: inherit;
}
/* The STATION section inside Context: a space station's moving parts. */

#station-panel[hidden] {
  display: none !important;
}

/* A section inside Context, laid out as the Radio section is: its +/-
   hides and shows the body, and it goes with the Context panel. */
#station-panel {
  position: relative;
  width: 100%;
  min-height: 0;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(65, 220, 231, 0.16);
}
.station-panel-inner {
  position: relative;
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(65, 220, 231, 0.18);
  border-radius: 8px;
  background: rgba(2, 15, 20, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
#station-panel .panel-header {
  margin-bottom: 0;
}
#right-context-rail #global-context-panel:not(.collapsed) #station-panel {
  flex: 0 0 auto;
}
#station-panel.collapsed .station-panel-inner > :not(.panel-header),
#global-context-panel.collapsed #station-panel {
  display: none !important;
}

.station-badge {
  font-size: 10px;
  letter-spacing: 0.12em;
}
.station-subject {
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: 0.85;
  margin: 2px 0 8px;
}
.station-modes {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.station-mode,
.station-button {
  padding: 3px 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  background: rgba(0, 7, 12, 0.6);
  color: #f4fbff;
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.12em;
  cursor: pointer;
}
.station-mode {
  flex: 1;
  font-weight: 700;
}
.station-mode.is-active,
.station-button.is-active {
  border-color: var(--cockpit-accent, #00dcff);
  color: var(--cockpit-accent, #00dcff);
}
.station-mode:focus-visible,
.station-button:focus-visible {
  outline: 1px solid var(--cockpit-accent, #00dcff);
  outline-offset: 1px;
}

.station-telemetry {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.station-telemetry-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  flex: none;
}
.station-telemetry[data-tone='live'] .station-telemetry-dot {
  background: #3bff7a;
  box-shadow: 0 0 6px rgba(59, 255, 122, 0.8);
}
.station-telemetry[data-tone='waiting'] .station-telemetry-dot {
  background: #ffb547;
}
.station-telemetry[data-tone='manual'] .station-telemetry-dot {
  background: var(--cockpit-accent, #00dcff);
}
.station-note {
  margin: 0 0 6px;
  font-size: 10px;
  opacity: 0.75;
}

.station-group {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.station-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  opacity: 0.85;
  margin-bottom: 4px;
}
.station-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.station-sliders {
  display: grid;
  gap: 4px;
}
.station-slider {
  display: grid;
  grid-template-columns: 7em 1fr 3.5em;
  align-items: center;
  gap: 6px;
  font-size: 10px;
}
.station-slider output {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.station-zoom {
  margin-top: 8px;
  width: 100%;
}
/* ── Street Level panel ─────────────────────────────────────────
   The rail owns position and width (layers.css). */
#street-level-panel {
  --sl-green: #05cb63;
  /* KartaView's purple for lines; a lighter one where it is text (WCAG AA). */
  --sl-kartaview: #635bff;
  --sl-kartaview-text: #8f8aff;
  /* Panoramax's orange; the darker one sits behind white text. */
  --sl-panoramax: #ff6f00;
  --sl-panoramax-fill: #b84e00;
  --sl-text: 0.6rem;
}

#street-level-panel .panel-glow {
  position: absolute;
  inset: -18px;
  background: radial-gradient(
    ellipse at center,
    rgba(5, 203, 99, 0.16) 0%,
    transparent 65%
  );
  filter: blur(16px);
  opacity: 0.25;
  pointer-events: none;
}

.street-level-panel-inner {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--panel-radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

/* Class-qualified, not id-qualified, so a theme's header rule still wins. */
.street-level-panel-inner > .panel-header {
  gap: 8px;
}

.sl-status {
  background: transparent;
  font: inherit;
  font-family: var(--font-mono);
  font-size: var(--sl-text);
  letter-spacing: 0.1em;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--glass-border-hover);
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition:
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.sl-status:hover,
.sl-status:focus-visible {
  color: var(--text-primary);
  border-color: var(--accent);
  outline: none;
}

.sl-status.is-on {
  color: var(--sl-green);
  border-color: rgba(5, 203, 99, 0.55);
}

.sl-status.is-busy {
  color: var(--accent);
  border-color: rgba(0, 212, 255, 0.55);
}

.sl-status.is-warn {
  color: #ffb300;
  border-color: rgba(255, 179, 0, 0.55);
}

/* Collapsed strips hide the body entirely: nothing to paint or tab into. */
#street-level-panel.collapsed .sl-body,
#street-level-panel.collapsed .sl-status {
  display: none;
}

.sl-body,
.sl-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sl-body {
  min-height: 0;
}

.sl-controls {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.sl-controls:disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* ── Providers ───────────────────────────────────────────────────────────── */
.sl-providers {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* `--chip-color` comes from the provider. */
.sl-chips .data-toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sl-chips .data-toggle-chip::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--chip-color, currentColor);
  opacity: 0.45;
  flex: none;
}

.sl-chips .data-toggle-chip.active {
  color: var(--chip-color, var(--accent));
  border-color: var(--chip-color, var(--accent));
  background: color-mix(
    in srgb,
    var(--chip-color, var(--accent)) 14%,
    transparent
  );
}

/* #635bff text on its own tint is 3.7:1 at this size; the lighter one is ~6:1. */
.sl-chips .data-toggle-chip.active[data-chip-id='kartaview'] {
  color: var(--sl-kartaview-text);
}

.sl-chips .data-toggle-chip.active::before {
  opacity: 1;
}

.sl-chips .data-toggle-chip.chip-error {
  color: #ffb300;
  border-color: rgba(255, 179, 0, 0.55);
}

/* The coverage hint and OPEN STREET VIEW share a line; the hint wraps. */
.sl-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sl-meta-row .sl-meta {
  flex: 1 1 auto;
  min-width: 0;
}

/* Scoped to outrank .scene-btn's flex: 1, which squeezed the button to its
   min-width beside a long coverage line and clipped its one-line label. */
.sl-meta-row .sl-nearest-btn {
  flex: 0 0 auto;
}

.sl-nearest-btn[hidden] {
  display: none;
}

/* When the hint and the button do not both fit, the button takes its own line. */
html:not([lang='en']) .sl-meta-row {
  flex-wrap: wrap;
}

html:not([lang='en']) .sl-meta-row .sl-meta {
  flex: 1 1 14em;
}

html:not([lang='en']) .sl-meta-row .sl-nearest-btn {
  flex: 1 0 auto;
}

/* ── Errors ──────────────────────────────────────────────────────────────── */
.sl-error {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  line-height: 1.4;
  color: #ff8a80;
}

/* ── Filters ──────────────────────────────────────────────────── */
.sl-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sl-seg[hidden],
.sl-controls[hidden],
.sl-filters[hidden],
.sl-since[hidden] {
  display: none;
}

.sl-since {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 4px 10px;
}

/* The shared slider surface, in Street Level's green. */
.sl-range {
  --accent: var(--sl-green);
  --accent-glow: color-mix(in srgb, var(--sl-green) 55%, transparent);
}

/* The value and its note share a line: ANY DATE (by upload date). */
.sl-since-value {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 6px;
  min-width: 0;
}

.sl-since-note {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.sl-since-note[hidden] {
  display: none;
}

.sl-since-label {
  font-family: var(--font-mono);
  font-size: var(--sl-text);
  letter-spacing: 0.08em;
  color: var(--text-primary);
}

/* ── Embedded viewer ─────────────────────────────────────────────────────── */
.sl-viewer-wrap {
  position: relative;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--glass-border-hover);
  background: #000;
}

.sl-viewer-wrap[hidden] {
  display: none;
}

/* Nothing sits over the image, so the provider's own controls stay clear. */
.sl-viewer-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
}

.sl-viewer {
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 180px;
}

.sl-viewer-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 3;
  background: rgba(0, 0, 0, 0.35);
}

.sl-viewer-placeholder[hidden] {
  display: none;
}

.sl-viewer-placeholder::after {
  content: '';
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--sl-green);
  animation: sl-spin 0.9s linear infinite;
}

@keyframes sl-spin {
  to {
    transform: rotate(360deg);
  }
}

.sl-viewer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 6px;
  background: rgba(10, 10, 15, 0.85);
  border-bottom: 1px solid var(--glass-border);
}

.sl-viewer-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex-wrap: wrap;
}

.sl-viewer-tools .scene-btn {
  padding: 4px 8px;
  font-size: var(--sl-text);
  background: rgba(10, 10, 15, 0.75);
  flex: none;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sl-viewer-tools .scene-btn[hidden] {
  display: none;
}

.sl-viewer-tools .sl-seg {
  background: rgba(10, 10, 15, 0.75);
}

@container (max-width: 380px) {
  .sl-viewer-tools .sl-btn-text {
    display: none;
  }
}

.sl-viewer-x {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(10, 10, 15, 0.8);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all var(--transition-fast);
}

.sl-viewer-x:hover {
  color: #0a0a0f;
  background: #fff;
  border-color: #fff;
}

.sl-image-meta {
  flex: 0 0 auto;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: var(--sl-text);
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 2px 10px;
  min-height: 26px;
}

.sl-image-by {
  color: var(--text-primary);
  overflow-wrap: anywhere;
  min-width: 0;
}

.sl-image-by:empty {
  display: none;
}

.sl-image-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  white-space: nowrap;
}

.sl-image-link {
  color: var(--sl-green);
  text-decoration: none;
  letter-spacing: 0.1em;
}

.sl-image-link[hidden] {
  display: none;
}

.sl-image-link:hover {
  text-decoration: underline;
}

.sl-meta {
  font-family: var(--font-mono);
  font-size: var(--sl-text);
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.sl-meta:empty {
  display: none;
}

/* ── Full screen (EXPAND) ────────────────────────────────────────────────── */
/* The browser lifts the viewer into the top layer; the photo takes the rest.
   iPhone Safari has no element fullscreen, so there the viewer is a popover
   sized to the viewport instead. */
.sl-viewer-wrap:fullscreen {
  border: 0;
  border-radius: 0;
}

.sl-viewer-wrap:popover-open {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.sl-viewer-wrap:is(:fullscreen, :popover-open) .sl-viewer-stage,
.sl-viewer-wrap:is(:fullscreen, :popover-open) .sl-viewer {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
}

/* ── Photo viewer (KartaView, Panoramax) ─────────────────────────────────── */
.sl-photo-viewer {
  /* The lit source's colour: a focus ring, and behind the white ‹ › glyphs. */
  --sl-photo-ring: var(--sl-kartaview-text);
  --sl-photo-fill: color-mix(in srgb, var(--sl-kartaview) 85%, transparent);
  position: absolute;
  inset: 0;
  background: #000;
  outline: none;
  overflow: hidden;
}

.sl-photo-viewer:focus-visible {
  outline: none;
}

/* The photo and canvas fill the viewer and would cover a ring drawn on it:
   draw the ring on a layer above them (clicks pass through). */
.sl-photo-viewer:focus-visible::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 2px solid var(--sl-photo-ring);
  pointer-events: none;
}

/* White on #ff6f00 is 2.8:1; on the darker orange behind ‹ › it is 5.1:1. */
.sl-photo-viewer[data-provider='panoramax'] {
  --sl-photo-ring: var(--sl-panoramax);
  --sl-photo-fill: var(--sl-panoramax-fill);
}

.sl-photo-flat,
.sl-photo-pano {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  user-select: none;
}

.sl-photo-flat {
  object-fit: contain;
}

.sl-photo-pano {
  cursor: grab;
  touch-action: none;
}

.sl-photo-pano.sl-photo-dragging {
  cursor: grabbing;
}

.sl-photo-flat[hidden],
.sl-photo-pano[hidden] {
  display: none;
}

.sl-photo-step {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 34px;
  height: 44px;
  margin-top: -22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(10, 10, 15, 0.62);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.sl-photo-step-prev {
  left: 6px;
}

.sl-photo-step-next {
  right: 6px;
}

.sl-photo-step:hover:not(:disabled),
.sl-photo-step:focus-visible {
  background: var(--sl-photo-fill);
  outline: none;
}

.sl-photo-step:disabled {
  opacity: 0.3;
  cursor: default;
}

/* Nothing to step through until a photo shows. */
.sl-photo-viewer:not([data-kind='flat']):not([data-kind='pano'])
  .sl-photo-step {
  display: none;
}

/* ── Short viewports ─────────────────────────────────────────────────────── */
@media (max-height: 640px) {
  .street-level-panel-inner {
    padding: 10px;
    gap: 6px;
  }

  .sl-viewer {
    min-height: 150px;
  }
}

/* ── Phones ──────────────────────────────────────────────────────────────── */
/* The phone rail spans 50vh + 8px to 2vh + 7.5rem from the bottom
   (responsive.css). Size the photo to that band, less ~150px of panel chrome,
   so it shows without scrolling. */
@media (max-width: 720px) {
  .sl-viewer {
    aspect-ratio: auto;
    height: clamp(110px, calc(48vh - 8px - 7.5rem - 150px), 320px);
    min-height: 0;
  }
}
/* ── Scene Director Panel ───────────────────── */
#scene-panel {
  --panel-expanded-width: 360px;
  /* Secondary text in Authoring: dimmer than labels, but legible on the globe. */
  --scene-quiet: rgba(232, 234, 237, 0.62);
  position: fixed;
  top: calc(var(--left-stack-top) + (var(--left-stack-gap) * 2));
  left: var(--left-stack-x);
  right: auto;
  bottom: auto;
  z-index: 100;
  width: var(--panel-expanded-width);
  max-height: calc(100vh - 24px);
}

#left-panel-stack > #data-panel,
#left-panel-stack > #cctv-panel,
#left-panel-stack > #global-context-panel,
#left-panel-stack > #utilities-panel,
#left-panel-stack > #scene-panel {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  z-index: auto;
  max-height: none;
  flex: 0 0 auto;
  min-height: 0;
  pointer-events: auto;
}

#left-panel-stack > #data-panel {
  order: 1;
}

#left-panel-stack > #cctv-panel {
  order: 2;
}

#left-panel-stack > #utilities-panel {
  order: 3;
}

#left-panel-stack > #scene-panel {
  order: 4;
}

/*
 * Runtime focus mode: the layout engine applies this only when the expanded
 * panel's measured natural height plus sibling labels cannot fit inside the
 * live HUD/attribution-safe corridor.
 */
#left-panel-stack.layout-focus > [data-panel-id].collapsed {
  display: none;
}

#left-panel-stack > #data-panel:not(.collapsed),
#left-panel-stack > #cctv-panel:not(.collapsed),
#left-panel-stack > #utilities-panel:not(.collapsed),
#left-panel-stack > #scene-panel:not(.collapsed) {
  box-sizing: border-box;
  flex: 0 1 var(--left-panel-allocated-height, auto);
  height: var(--left-panel-allocated-height, auto);
  max-height: var(--left-panel-allocated-height, 100%);
}

/*
 * When an expanded panel and its collapsed siblings fit together, preserve
 * the canonical control order and center their combined stack at 50vh.
 */
#left-panel-stack.layout-tail
  > :is(#data-panel, #cctv-panel, #utilities-panel, #scene-panel):not(
    .collapsed
  ) {
  box-sizing: border-box;
  flex: 0 0 var(--left-panel-allocated-height);
  height: var(--left-panel-allocated-height);
  max-height: var(--left-panel-allocated-height);
}

#left-panel-stack > #data-panel:not(.collapsed) .data-panel-inner,
#left-panel-stack > #cctv-panel:not(.collapsed) .cctv-panel-inner,
#left-panel-stack > #utilities-panel:not(.collapsed) .utilities-panel-inner,
#left-panel-stack > #scene-panel:not(.collapsed) .scene-panel-inner {
  height: 100%;
  max-height: 100%;
}

#left-panel-stack > #data-panel:not(.collapsed) .data-panel-inner {
  overflow: hidden;
}

#left-panel-stack > #cctv-panel:not(.collapsed) .cctv-panel-inner,
#left-panel-stack > #utilities-panel:not(.collapsed) .utilities-panel-inner,
#left-panel-stack > #scene-panel:not(.collapsed) .scene-panel-inner {
  overflow-y: auto;
  scrollbar-gutter: stable;
}

#left-panel-stack > [data-panel-id]:not(.collapsed) .panel-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: transparent;
}

#left-panel-stack > [data-panel-id]:not(.collapsed) .panel-divider {
  background: linear-gradient(
    90deg,
    rgb(0 212 255 / 28%),
    rgba(0, 212, 255, 0.18) 58%,
    transparent
  );
  box-shadow: 0 0 7px rgba(0, 212, 255, 0.22);
}

#right-context-rail [data-panel-id]:not(.collapsed) .panel-divider {
  background: linear-gradient(
    90deg,
    rgb(0 212 255 / 28%),
    rgba(0, 212, 255, 0.18) 58%,
    transparent
  );
  box-shadow: 0 0 7px rgba(0, 212, 255, 0.22);
}

#scene-panel .panel-glow {
  position: absolute;
  inset: -18px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 212, 255, 0.16) 0%,
    transparent 65%
  );
  filter: blur(16px);
  opacity: 0.25;
  pointer-events: none;
}

.scene-panel-inner {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--panel-radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 24px);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.scene-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

/* The scene's name takes its own row; NEW SCENE / DELETE share the next. */
#scene-select {
  flex: 1 1 100%;
  min-width: 0;
  min-height: 32px;
  font-size: 12px;
}

html:not([lang='en']) #scene-select {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

/* A translated action longer than its button wraps inside the button instead
   of running past it. English keeps its one-line buttons. */
html:not([lang='en']) #scene-panel .scene-controls .scene-btn {
  white-space: normal;
  overflow-wrap: break-word;
}

.scene-btn {
  flex: 1;
  min-width: 72px;
}

#scene-panel .scene-btn {
  font-size: 10px;
  padding: 8px 10px;
}

/* Authoring's steps: SCENE, SHOTS, PREVIEW, SAVE & SHARE. */
.scene-step-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.6px;
  color: var(--scene-quiet);
}

.scene-step-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.panel-header + .scene-step-heading {
  margin-top: 2px;
}

/* The file row is housekeeping; it stays quieter than the steps above. */
#scene-panel .scene-file-controls .scene-btn {
  font-size: 9px;
  /* Room for one long translated word (IMPORTIEREN, ІМПОРТУВАТИ) per line. */
  padding: 8px 4px;
  letter-spacing: 0.6px;
  background: transparent;
}

/* Keep the shared hover on the restyled actions; CAPTURE SHOT and PLAY take
   their resting emphasis from action-button.css. */
#scene-panel .scene-btn-primary:hover:not(:disabled),
#scene-panel .scene-file-controls .scene-btn:hover:not(:disabled) {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

/* Stories tags: small toggle chips that wrap; a pressed chip takes the
   accent. */
#scene-panel .scene-tag-chips {
  gap: 4px;
}

#scene-panel .scene-tag-chip {
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: transparent;
  color: var(--scene-quiet);
  font-size: 10px;
  line-height: 1.3;
  cursor: pointer;
}

#scene-panel .scene-tag-chip.active {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

#scene-panel .scene-tag-chip:disabled {
  opacity: 0.4;
  cursor: default;
}

/* The Stories card thumbnail, CAPTURE THUMBNAIL and SAVE TO STORIES share a
   row; the preview keeps the card's 16:9. */
#scene-panel .scene-story-controls {
  align-items: center;
}

/* Two buttons beside the preview: a label that does not fit (REMOVE FROM
   STORIES) wraps inside its button, in English too. */
#scene-panel .scene-story-controls .scene-btn {
  align-self: stretch;
  padding: 8px 6px;
  white-space: normal;
  overflow-wrap: break-word;
}

.scene-thumb-preview {
  flex: 0 0 64px;
  width: 64px;
  height: 36px;
  border-radius: 3px;
  object-fit: cover;
}

.scene-thumb-empty {
  border: 1px dashed rgba(255, 255, 255, 0.18);
  box-sizing: border-box;
}

.scene-shot-hint {
  margin: 0 0 8px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--scene-quiet);
}

#scene-panel:not(.has-shots) .scene-shot-hint {
  display: none;
}

#scene-start-btn,
#scene-stop-btn,
#scene-next-btn {
  flex: 1 1 0;
}

.scene-shot-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 260px;
  /* Two shot rows stay visible; the panel scrolls when space is short. */
  min-height: 128px;
  flex: 1;
  overflow-y: auto;
  padding: 4px 2px 6px;
  margin-bottom: 4px;
  counter-reset: scene-shot;
}

.scene-shot-empty {
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 16px 12px;
  text-align: center;
  /* A UiEmpty in the panel's weight, not the shared empty line's
     (empty-state.css). */
  font: inherit;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3px;
  line-height: 1.5;
  color: var(--scene-quiet);
}

.scene-shot-row {
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  counter-increment: scene-shot;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast);
}

.scene-shot-row.active {
  border-color: var(--accent);
  background: rgba(0, 212, 255, 0.08);
}

.scene-shot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.scene-shot-label {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.4px;
  color: var(--text-primary);
}

/* While renaming, the label holds only the editor at full width. */
.scene-shot-label:has(.scene-shot-rename) {
  overflow: visible;
  white-space: normal;
}

.scene-shot-label:has(.scene-shot-rename)::before {
  content: none;
}

/* Shots are numbered 01, 02… in playback order. */
.scene-shot-label::before {
  content: counter(scene-shot, decimal-leading-zero);
  margin-right: 8px;
  font-size: 10px;
  color: var(--scene-quiet);
}

.scene-shot-label:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.scene-shot-row.active .scene-shot-label::before {
  color: var(--accent);
}

.scene-shot-rename {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font: inherit;
  color: var(--text-primary);
  background: var(--bg-panel, #101820);
  border: 1px solid var(--accent, #00d4ff);
}

.scene-shot-meta {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.4px;
  color: var(--scene-quiet);
}

.scene-shot-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Up and down: the glyph as tall as DEL's word. */
.scene-shot-move {
  padding: 3px 4px;
}

.scene-shot-move .ui-icon {
  display: block;
  line-height: 1;
}

.scene-progress {
  margin-top: 8px;
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

#scene-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(0, 212, 255, 0.2),
    rgba(0, 212, 255, 0.75)
  );
  color: #d5f7ff;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
  transition: width 100ms linear;
  text-shadow: 0 0 6px rgba(0, 212, 255, 0.6);
}

#scene-status {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.4px;
  line-height: 1.4;
  color: var(--scene-quiet);
}

#scene-runtime {
  position: fixed;
  top: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 105;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 180ms ease,
    visibility 180ms ease;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: #bff4ff;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(0, 212, 255, 0.36);
  border-radius: 999px;
  padding: 6px 14px;
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.55);
  pointer-events: none;
}

#scene-runtime.active {
  opacity: 1;
  visibility: visible;
}

#data-panel.collapsed .data-toggle-list,
#data-panel.collapsed .data-library-footer,
#global-context-panel.collapsed #radio-panel,
#global-context-panel.collapsed #military-awareness-panel,
#global-context-panel.collapsed .global-context-actions,
#global-context-panel.collapsed .global-context-modes,
#global-context-panel.collapsed .context-mode-view,
#global-context-panel.collapsed
  > .global-context-panel-inner
  > .context-mode-standby,
#radio-panel.collapsed .radio-panel-inner > :not(.panel-header),
#cctv-panel.collapsed .cctv-controls,
#cctv-panel.collapsed .cctv-calibration-block,
#cctv-panel.collapsed .cctv-frame-wrap,
#cctv-panel.collapsed #cctv-source-badge,
#cctv-panel.collapsed #cctv-meta,
#cctv-panel.collapsed .cctv-summary-label,
#cctv-panel.collapsed #cctv-summary,
#scene-panel.collapsed .scene-controls,
#scene-panel.collapsed .scene-step-heading,
#scene-panel.collapsed .scene-shot-hint,
#scene-panel.collapsed .scene-shot-list,
#scene-panel.collapsed .scene-progress,
#scene-panel.collapsed #scene-status,
#utilities-panel.collapsed .utilities-list,
#utilities-panel.collapsed .utilities-tools,
#param-slider-panel.collapsed #param-sliders {
  display: none !important;
}

#data-panel.collapsed,
#cctv-panel.collapsed,
#utilities-panel.collapsed,
#scene-panel.collapsed {
  width: var(--left-collapsed-width);
}

#global-context-panel #radio-panel.collapsed {
  width: 100%;
}

#data-panel.collapsed .data-panel-inner,
#cctv-panel.collapsed .cctv-panel-inner,
#radio-panel.collapsed .radio-panel-inner,
#scene-panel.collapsed .scene-panel-inner,
#utilities-panel.collapsed .utilities-panel-inner,
#param-slider-panel.collapsed {
  padding-bottom: 10px;
}

#data-panel.collapsed .panel-header,
#cctv-panel.collapsed .panel-header,
#radio-panel.collapsed .panel-header,
#global-context-panel.collapsed .panel-header,
#scene-panel.collapsed .panel-header,
#utilities-panel.collapsed .panel-header,
#param-slider-panel.collapsed .param-panel-header {
  margin-bottom: 2px;
}

.director-sharing-dialog::backdrop {
  background: rgba(0, 8, 14, 0.65);
}
/* Bhote Koshi 2026 event reconstruction */
#bhote-koshi-event-panel {
  position: fixed;
  top: var(--right-stack-safe-top, 26vh);
  right: var(--right-rail-x);
  bottom: auto;
  z-index: 142;
  width: min(330px, calc(100vw - 40px));
  max-height: calc(100vh - var(--right-stack-safe-top, 26vh) - 88px);
  overflow-y: auto;
  color: var(--text-primary);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  box-shadow:
    0 18px 52px rgba(0, 0, 0, 0.48),
    inset 0 0 28px rgba(14, 78, 92, 0.12);
  backdrop-filter: blur(24px) saturate(1.4);
  font-family: var(--font-mono);
  letter-spacing: 0;
  pointer-events: auto;
  scrollbar-width: none;
}

#bhote-koshi-event-panel::-webkit-scrollbar {
  display: none;
}

#bhote-koshi-event-panel [hidden],
#bhote-koshi-split-line[hidden] {
  display: none !important;
}

#bhote-koshi-embedded-media-root {
  position: absolute;
  inset: 0;
  z-index: 7;
  overflow: hidden;
  pointer-events: none;
}

.bhote-embedded-media-warmup {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  clip-path: inset(50%);
}

.bhote-embedded-callout {
  position: absolute;
  box-sizing: border-box;
  width: min(356px, calc(100% - 36px));
  max-height: min(270px, calc(100% - 36px));
  overflow: visible;
  color: var(--text-primary);
  font-family: var(--font-mono);
  pointer-events: none;
}

.bhote-embedded-callout[hidden] {
  display: none !important;
}

.bhote-embedded-callout-leader {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 1px;
  height: 1px;
  overflow: visible;
  pointer-events: none;
}

.bhote-embedded-callout-leader circle {
  opacity: 0;
  transform: scale(0.2);
  transform-box: fill-box;
  transform-origin: center;
}

.bhote-embedded-callout-leader path {
  opacity: 0;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.bhote-embedded-callout-body {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: rgba(5, 13, 19, 0.96);
  border: 1px solid rgba(107, 232, 255, 0.32);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.56);
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  pointer-events: auto;
}

.bhote-embedded-callout-player {
  width: 100%;
  height: min(200px, 34vh);
  aspect-ratio: 16 / 9;
  min-height: 0;
  overflow: hidden;
  background: #03080d;
}

.bhote-embedded-callout.is-youtube {
  width: min(280px, calc(100% - 36px));
  max-height: min(228px, calc(100% - 36px));
}

.bhote-embedded-callout.is-youtube .bhote-embedded-callout-player {
  height: min(158px, 27vh);
}

.bhote-embedded-callout.is-portrait {
  width: min(214px, calc(100% - 36px));
  max-height: min(390px, calc(100% - 36px));
}

.bhote-embedded-callout.is-portrait .bhote-embedded-callout-player {
  width: 100%;
  height: min(320px, 48vh);
  aspect-ratio: 9 / 16;
}

.bhote-embedded-callout.is-entering .bhote-embedded-callout-leader circle {
  animation: bhote-embedded-anchor-enter 240ms ease-out both;
}

.bhote-embedded-callout.is-entering .bhote-embedded-callout-leader path {
  animation: bhote-embedded-leader-enter 420ms 150ms ease-out both;
}

.bhote-embedded-callout.is-entering .bhote-embedded-callout-body {
  animation: bhote-embedded-body-enter 420ms 510ms ease-out both;
}

.bhote-embedded-callout.is-leaving .bhote-embedded-callout-body {
  animation: bhote-embedded-body-exit 240ms ease-in both;
}

.bhote-embedded-callout.is-leaving .bhote-embedded-callout-leader path {
  animation: bhote-embedded-leader-exit 300ms 190ms ease-in both;
}

.bhote-embedded-callout.is-leaving .bhote-embedded-callout-leader circle {
  animation: bhote-embedded-anchor-exit 160ms 460ms ease-in both;
}

@keyframes bhote-embedded-anchor-enter {
  from {
    opacity: 0;
    transform: scale(0.2);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bhote-embedded-leader-enter {
  from {
    opacity: 0;
    stroke-dashoffset: 1;
  }
  to {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

@keyframes bhote-embedded-body-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes bhote-embedded-body-exit {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.985);
  }
}

@keyframes bhote-embedded-leader-exit {
  from {
    opacity: 1;
    stroke-dashoffset: 0;
  }
  to {
    opacity: 0;
    stroke-dashoffset: 1;
  }
}

@keyframes bhote-embedded-anchor-exit {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bhote-embedded-callout.is-entering .bhote-embedded-callout-leader circle,
  .bhote-embedded-callout.is-entering .bhote-embedded-callout-leader path,
  .bhote-embedded-callout.is-entering .bhote-embedded-callout-body {
    animation: none;
    opacity: 1;
    transform: none;
    stroke-dashoffset: 0;
  }
}

.bhote-embedded-callout.is-x .bhote-embedded-callout-player {
  max-height: min(200px, 34vh);
  aspect-ratio: auto;
  overflow: auto;
}

.bhote-embedded-callout:not(.is-x) .bhote-embedded-callout-player iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
}

.bhote-facebook-player-host {
  width: 100%;
  height: 100%;
}

.bhote-embedded-callout.is-x .bhote-embedded-callout-player iframe {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0;
  border: 0;
}

.bhote-embedded-callout.is-x .bhote-embedded-callout-player > * {
  margin: 0 auto !important;
}

.bhote-embedded-callout.is-unavailable .bhote-embedded-callout-player {
  min-height: 92px;
  background: repeating-linear-gradient(
    135deg,
    rgba(107, 232, 255, 0.06),
    rgba(107, 232, 255, 0.06) 12px,
    rgba(3, 8, 13, 0.92) 12px,
    rgba(3, 8, 13, 0.92) 24px
  );
}

.bhote-embedded-callout footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  padding: 7px 9px 8px;
  border-top: 3px solid #6be8ff;
}

.bhote-embedded-callout footer strong {
  overflow: hidden;
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bhote-embedded-callout footer small {
  grid-column: 1;
  color: rgba(151, 211, 224, 0.7);
  font-size: 8px;
  line-height: 1.35;
}

.bhote-embedded-callout footer a {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: #6be8ff;
  font-size: 8px;
  text-decoration: none;
}

/* The title takes the full card width and up to two lines, so a translated
   title keeps its place name; the link sits beside the status below it. */
html:not([lang='en']) .bhote-embedded-callout footer strong {
  grid-column: 1 / -1;
  display: -webkit-box;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

html:not([lang='en']) .bhote-embedded-callout footer small {
  align-self: center;
}

html:not([lang='en']) .bhote-embedded-callout footer a {
  grid-row: 2;
  white-space: nowrap;
}

.bhote-embedded-callout footer a:hover,
.bhote-embedded-callout footer a:focus-visible {
  text-decoration: underline;
}

#right-context-rail.bhote-event-active > :not(#bhote-koshi-event-panel) {
  display: none !important;
}

.bhote-event-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px 12px;
  border-bottom: 1px solid rgba(95, 213, 236, 0.18);
}

.bhote-event-kicker,
.bhote-event-section-head,
.bhote-event-status,
.bhote-event-evidence summary,
.bhote-event-report small {
  font-size: 9px;
  line-height: 1.35;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.72;
}

.bhote-event-title {
  margin-top: 5px;
  font-size: 17px;
  line-height: 1.2;
  color: var(--text-primary);
}

/* A UiCloseButton (close-button.css). */
.bhote-event-icon-btn {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(151, 211, 224, 0.26);
  border-radius: 4px;
  color: var(--text-primary);
  background: var(--accent-dim);
  font: inherit;
  font-size: 18px;
}

.bhote-event-status-row {
  display: flex;
  gap: 8px;
  padding: 11px 16px 0;
}

.bhote-event-status {
  padding: 4px 7px;
  border: 1px solid rgba(80, 206, 231, 0.24);
  border-radius: 3px;
  background: var(--accent-dim);
}

.bhote-event-status.reconstructed {
  color: var(--accent);
  border-color: rgba(80, 206, 231, 0.24);
  background: var(--accent-dim);
}

.bhote-event-section {
  padding: 13px 16px 0;
}

.bhote-event-section-head,
.bhote-event-dates,
.bhote-event-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bhote-event-section-head span:last-child {
  color: rgba(222, 240, 245, 0.88);
}

/* A longer translated heading wraps; the readout beside it stays one piece. */
html:not([lang='en']) .bhote-event-section-head span:last-child {
  flex: none;
  white-space: nowrap;
}

.bhote-event-range {
  width: 100%;
  height: 4px;
  margin: 11px 0 8px;
  accent-color: var(--accent);
  cursor: ew-resize;
}

.bhote-event-range.flood {
  accent-color: var(--accent);
  cursor: pointer;
}

.bhote-event-dates {
  font-size: 8px;
  color: rgba(174, 208, 216, 0.62);
}

/* Keep a translated date ("16 OCT 2021") together so the year never wraps
   alone. */
html:not([lang='en']) .bhote-event-date {
  white-space: nowrap;
}

.bhote-event-story-nav {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: stretch;
  gap: 6px;
  margin-top: 10px;
}

.bhote-event-story-nav > button {
  width: 34px;
  min-height: 54px;
  padding: 0;
  border: 1px solid rgba(88, 196, 218, 0.3);
  border-radius: 4px;
  color: var(--accent);
  background: rgba(7, 25, 35, 0.9);
  font:
    22px/1 'JetBrains Mono',
    'SFMono-Regular',
    Consolas,
    monospace;
  cursor: pointer;
}

.bhote-event-story-current {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: center;
  column-gap: 9px;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid rgba(88, 196, 218, 0.18);
  background: rgba(6, 19, 27, 0.72);
}

.bhote-event-story-current span,
.bhote-event-story-current small {
  color: rgba(116, 216, 235, 0.7);
  font-size: 8px;
  line-height: 1.25;
}

.bhote-event-story-current strong {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bhote-event-story-current small {
  grid-column: 1 / -1;
  margin-top: 4px;
  overflow: hidden;
  color: rgba(116, 216, 235, 0.7);
  text-overflow: ellipsis;
  white-space: nowrap;
}

html:not([lang='en']) .bhote-event-story-current {
  padding: 5px 10px;
}

/* Up to two lines: a translated beat title keeps its subject. Two title lines
   and one meta line still fit the 54px arrow buttons, so the controls stay put. */
html:not([lang='en']) .bhote-event-story-current strong {
  display: -webkit-box;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* Phase / time / sources / imagery note run long in translation: allow up to
   three lines so the last status is not cut off. */
html:not([lang='en']) .bhote-event-story-current small {
  display: -webkit-box;
  margin-top: 3px;
  text-overflow: clip;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.bhote-event-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  justify-content: flex-start;
  margin-top: 9px;
}

.bhote-event-actions button,
.bhote-event-report {
  border: 1px solid rgba(88, 196, 218, 0.24);
  border-radius: 4px;
  color: var(--text-primary);
  background: rgba(7, 25, 35, 0.9);
  font: inherit;
  font-size: 9px;
  letter-spacing: 0;
  cursor: pointer;
}

.bhote-event-actions button {
  min-width: 0;
  min-height: 30px;
  padding: 0 5px;
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* A longer translation wraps to a second line instead of being cut. */
html:not([lang='en']) .bhote-event-actions button {
  padding: 3px 5px;
  line-height: 1.2;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: break-word;
}

.bhote-event-actions button:disabled,
.bhote-event-story-nav > button:disabled {
  opacity: 0.3;
  cursor: default;
}

.bhote-event-actions button:first-child {
  color: var(--accent);
  border-color: rgba(88, 196, 218, 0.36);
}

.bhote-event-actions button[data-action='cinematic'][aria-pressed='true'] {
  color: #071017;
  border-color: var(--accent);
  background: var(--accent);
}

.bhote-event-evidence {
  margin: 13px 16px 0;
  border-top: 1px solid rgba(95, 213, 236, 0.16);
  border-bottom: 1px solid rgba(95, 213, 236, 0.16);
}

.bhote-event-evidence summary {
  padding: 10px 0;
  cursor: pointer;
}

.bhote-event-report-list {
  display: grid;
  gap: 6px;
  padding-bottom: 10px;
}

.bhote-event-report {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 8px 9px;
  text-align: left;
}

.bhote-event-report span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bhote-event-report small {
  color: rgba(115, 210, 228, 0.58);
}

.bhote-event-credit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 16px 0;
  padding: 8px 0 0;
  border-top: 1px solid rgba(95, 213, 236, 0.16);
  color: rgba(116, 216, 235, 0.62);
  font-size: 8px;
  line-height: 1.35;
}

.bhote-event-credit button {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(88, 196, 218, 0.24);
  border-radius: 4px;
  color: var(--text-primary);
  background: rgba(7, 25, 35, 0.9);
  font: inherit;
  cursor: pointer;
}

.bhote-event-caveat {
  margin: 11px 16px 14px;
  font-size: 8px;
  line-height: 1.5;
  color: rgba(179, 204, 210, 0.62);
}

#bhote-koshi-split-line {
  position: fixed;
  top: 0;
  bottom: 0;
  left: var(--bhote-koshi-split, 50%);
  z-index: 8;
  width: 1px;
  pointer-events: none;
  background: rgba(218, 241, 247, 0.76);
  box-shadow: 0 0 12px rgba(94, 216, 239, 0.72);
}

#bhote-koshi-split-line span {
  display: none;
}

#bhote-koshi-split-line .bhote-koshi-split-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(180, 215, 222, 0.72);
  border-radius: 50%;
  outline: 0;
  color: rgba(239, 247, 249, 0.96);
  background: rgba(4, 17, 27, 0.96);
  box-shadow:
    0 0 0 5px rgba(62, 112, 125, 0.3),
    0 0 13px rgba(94, 216, 239, 0.3);
  font: 700 14px/1 var(--font-mono);
  transform: translate(-50%, -50%);
  pointer-events: auto;
  touch-action: none;
  cursor: ew-resize;
}

#bhote-koshi-split-line .bhote-koshi-split-handle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

@media (max-width: 720px) {
  #bhote-koshi-event-panel {
    right: 12px;
    bottom: 88px;
    width: calc(100vw - 24px);
    max-height: 48vh;
    overflow-y: auto;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-dark);
  font-family: var(--font-sans);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}
/* Recent Imagery: a right-rail readout laid out by the rail like WEATHER; only
   the body scrolls. Every block has a fixed height, so no click moves a
   control. Card typography comes from the rail-card rules in weather.css. */
.recent-imagery-panel-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  max-height: 100%;
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--panel-radius);
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
#recent-imagery-panel .panel-glow {
  position: absolute;
  inset: -18px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 212, 255, 0.16) 0%,
    transparent 65%
  );
  filter: blur(16px);
  opacity: 0.25;
  pointer-events: none;
}
#recent-imagery-panel .panel-header {
  flex: 0 0 auto;
}
#recent-imagery-panel-count {
  color: var(--text-secondary);
  font: 9px var(--font-mono);
  letter-spacing: 1px;
  white-space: nowrap;
}
#recent-imagery-panel-body {
  min-height: 0;
  max-height: calc(var(--right-stack-max-height, 50svh) - 64px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
#recent-imagery-panel.collapsed #recent-imagery-panel-body,
#recent-imagery-panel.collapsed #recent-imagery-panel-count,
#recent-imagery-panel[hidden],
#recent-imagery-panel [hidden],
#recent-imagery-split-line[hidden] {
  display: none !important;
}
#recent-imagery-panel.collapsed .panel-header {
  margin-bottom: 2px;
}
#recent-imagery-panel.collapsed .recent-imagery-panel-inner {
  padding-bottom: 10px;
}

/* ---- the fixed stack ---------------------------------------------------- */
.recent-imagery-readout {
  --weather-card-border: rgba(98, 181, 255, 0.28);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  color: var(--text-dim);
  font: 9px/1.45 var(--font-mono);
  letter-spacing: 0.5px;
}
.recent-imagery-readout .ri-block {
  flex: 0 0 auto;
  min-width: 0;
  box-sizing: border-box;
}
/* Reserved controls keep their box; they are only invisible. */
.recent-imagery-readout .is-reserved {
  visibility: hidden;
  pointer-events: none;
}
.recent-imagery-readout .data-toggle-chip {
  box-sizing: border-box;
  min-width: 0;
  height: 22px;
  padding: 0 4px;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent-imagery-readout .data-toggle-chip:disabled {
  cursor: default;
  opacity: 0.4;
}

/* 1. SELECT BOX · USE VIEW · CLEAR, three equal cells. */
.recent-imagery-readout .ri-actions-row {
  height: 22px;
}
.recent-imagery-readout .ri-actions-row .rail-card-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}
.recent-imagery-readout .ri-actions-row .data-toggle-chip {
  height: 22px;
}

/* 2 and 3b. One-line notice and hint: always there, empty or not. */
.recent-imagery-readout .ri-line {
  height: 14px;
  line-height: 14px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
/* The notice text yields room to ZOOM IN only while it shows; the chip sits
   in a fixed slot at the line's right end either way. The ellipsis is a
   safety net: every notice is written to fit the panel. */
.recent-imagery-readout .ri-notice {
  position: relative;
}
.recent-imagery-readout .ri-notice-text {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.recent-imagery-readout .ri-notice.has-action .ri-notice-text {
  padding-right: 52px;
}
.recent-imagery-readout .ri-zoom-in {
  position: absolute;
  top: 0;
  right: 0;
  width: 46px;
  height: 14px;
  padding: 0 3px;
  font-size: 8px;
  line-height: 12px;
  letter-spacing: 0.4px;
  color: var(--accent);
  border-color: var(--accent);
}
.recent-imagery-readout .ri-notice.warn {
  color: rgba(255, 196, 120, 0.95);
}
.recent-imagery-readout .ri-notice.info {
  color: var(--accent);
}
.recent-imagery-readout .ri-hint {
  color: var(--text-secondary);
}

/* 3. The strip: fixed height, newest day first. */
.recent-imagery-readout .ri-strip {
  display: flex;
  gap: 6px;
  height: 120px;
  padding: 2px 2px 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  outline: none;
  border-radius: 6px;
}
.recent-imagery-readout .ri-strip:focus-visible {
  box-shadow: 0 0 0 1px var(--accent);
}
.recent-imagery-readout .ri-strip.searching {
  opacity: 0.7;
}
/* A UiEmpty in the readout's own colour and type, not the shared empty
   line's (empty-state.css). */
.recent-imagery-readout .ri-strip-empty {
  color: inherit;
  font: inherit;
  flex: 1 0 100%;
  align-self: center;
  text-align: center;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.recent-imagery-readout .ri-card {
  position: relative;
  flex: 0 0 94px;
  height: 112px;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: 42px 13px 11px 11px 18px;
  row-gap: 2px;
  padding: 3px 2px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  cursor: pointer;
  scroll-snap-align: start;
  transition:
    border-color var(--transition-fast),
    background-color var(--transition-fast);
}
.recent-imagery-readout .ri-card:hover {
  border-color: var(--glass-border-hover);
}
.recent-imagery-readout .ri-card.focused {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.recent-imagery-readout .ri-card.preview {
  box-shadow: inset 0 0 0 1px rgba(139, 233, 255, 0.35);
}
.recent-imagery-readout .ri-card.pinned {
  box-shadow: inset 0 0 0 1px rgba(139, 233, 255, 0.75);
}
.recent-imagery-readout .ri-thumb {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(120, 130, 140, 0.18);
}
.recent-imagery-readout .ri-thumb[data-status='empty'] {
  background: rgba(90, 96, 104, 0.22);
}
.recent-imagery-readout .ri-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.recent-imagery-readout .ri-thumb-text {
  padding: 0 4px;
  text-align: center;
  font-size: 8px;
}
.recent-imagery-readout .ri-card-flag,
.recent-imagery-readout .ri-card-start {
  position: absolute;
  padding: 0 4px;
  border-radius: 3px;
  background: rgba(4, 17, 27, 0.9);
  font-size: 7px;
  font-weight: 700;
  line-height: 12px;
  letter-spacing: 0.8px;
  white-space: nowrap;
}
.recent-imagery-readout .ri-card-flag {
  top: 3px;
  left: 3px;
  color: var(--accent);
}
.recent-imagery-readout .ri-card-start {
  right: 3px;
  bottom: 3px;
  color: rgba(255, 196, 120, 0.95);
}
.recent-imagery-readout .ri-card-date,
.recent-imagery-readout .ri-card-sensor,
.recent-imagery-readout .ri-card-cloud {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.recent-imagery-readout .ri-card-date {
  font-size: 10px;
  line-height: 13px;
  color: var(--text-primary);
}
.recent-imagery-readout .ri-card-sensor,
.recent-imagery-readout .ri-card-cloud {
  font-size: 8px;
  line-height: 11px;
  letter-spacing: 0;
  color: var(--text-dim);
}
.recent-imagery-readout .ri-card-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}
.recent-imagery-readout .ri-card-chips .data-toggle-chip {
  height: 18px;
  font-weight: 700;
}
/* Outside A / B there is one chip (SHOW): in a translation it takes the
   whole row, so a long label is not cut to a stub. English keeps the
   reserved B half. */
html:not([lang='en'])
  .recent-imagery-readout:not([data-mode='ab'])
  .ri-card-chips
  .ri-chip[data-slot='a'] {
  grid-column: 1 / -1;
}
html:not([lang='en'])
  .recent-imagery-readout:not([data-mode='ab'])
  .ri-card-chips
  .ri-chip[data-slot='b'] {
  display: none;
}

/* 4. The selection bar: 24px mode buttons plus borders, then two stable rows. */
.recent-imagery-readout .ri-selection {
  display: grid;
  grid-template-rows: 26px 20px 20px;
  row-gap: 4px;
  padding: 5px;
  border: 1px solid var(--weather-card-border);
  border-radius: 6px;
}
.recent-imagery-readout .ri-mode {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.recent-imagery-readout .ri-selection .data-toggle-chip {
  height: 20px;
}
.recent-imagery-readout .ri-slot {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 22px;
  align-items: center;
  column-gap: 6px;
  height: 20px;
}
.recent-imagery-readout .ri-slot-tag {
  height: 16px;
  line-height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  text-align: center;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
}
.recent-imagery-readout .ri-slot.lit .ri-slot-tag {
  border-color: var(--accent);
  color: var(--accent);
}
.recent-imagery-readout .ri-slot-value {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  letter-spacing: 0;
  color: var(--text-dim);
}
.recent-imagery-readout .ri-slot.lit .ri-slot-value {
  color: var(--text-primary);
}
.recent-imagery-readout .ri-slot[data-state='preview'] .ri-slot-value {
  color: var(--text-secondary);
  font-style: italic;
}
/* The slot rows share the bar's columns (subgrid), so the tag column fits
   the longest tag and both rows align; a long slot line (date · source ·
   resolution · state) takes a second line instead of losing the state. */
html:not([lang='en']) .recent-imagery-readout .ri-selection {
  grid-template-columns: minmax(44px, max-content) minmax(0, 1fr) 22px;
  column-gap: 6px;
}
html:not([lang='en']) .recent-imagery-readout .ri-mode {
  grid-column: 1 / -1;
}
html:not([lang='en']) .recent-imagery-readout .ri-slot {
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  height: auto;
  min-height: 20px;
}
html:not([lang='en']) .recent-imagery-readout .ri-slot-tag {
  padding: 0 3px;
}
html:not([lang='en']) .recent-imagery-readout .ri-slot-value {
  white-space: normal;
}
.recent-imagery-readout .ri-unpin {
  width: 22px;
  padding: 0;
  font-size: 12px;
  letter-spacing: 0;
}

/* 5. Opacity (both images), SWAP and export, one row. SWAP keeps its slot
   while no swipe is live. */
.recent-imagery-readout .ri-controls {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 40px 128px;
  align-items: center;
  column-gap: 6px;
  height: 22px;
}
.recent-imagery-readout .ri-opacity-label {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  font-size: 8px;
  letter-spacing: 1px;
  white-space: nowrap;
}
/* In a translation a label longer than its 76px column widens it to the
   label's longest word, and the value wraps under the label. */
html:not([lang='en']) .recent-imagery-readout .ri-controls {
  grid-template-columns:
    minmax(76px, min-content) minmax(0, 1fr) minmax(40px, max-content)
    128px;
}
html:not([lang='en']) .recent-imagery-readout .ri-opacity-label {
  flex-wrap: wrap;
  align-content: center;
  row-gap: 0;
  line-height: 10px;
}
.recent-imagery-readout .ri-opacity-value {
  font-variant-numeric: tabular-nums;
}
.recent-imagery-readout .ri-swap {
  width: 40px;
  padding: 0 2px;
}
html:not([lang='en']) .recent-imagery-readout .ri-swap {
  width: auto;
  min-width: 40px;
}
.recent-imagery-readout .ri-exports .rail-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
}

/* 6. DETAILS: a collapsed rail card at the bottom, for every note. */
.recent-imagery-readout .ri-details .rail-card {
  border-color: var(--weather-card-border);
}
.recent-imagery-readout .ri-details .rail-card-title {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.recent-imagery-readout .ri-details .rail-card-line.muted {
  color: var(--text-dim);
}
.recent-imagery-readout .ri-details .rail-card-actions .data-toggle-chip {
  height: 20px;
  padding: 0 7px;
}

/* ---- box tool cursor ---------------------------------------------------- */
body.gev-imagery-box #cesium-container canvas,
body.gev-imagery-box .cesium-widget canvas {
  cursor: crosshair;
}

/* ---- split line --------------------------------------------------------- */
/* Above the right rail (z-index 110) so the handle can always be grabbed. */
#recent-imagery-split-line {
  position: fixed;
  top: 0;
  bottom: 0;
  left: var(--recent-imagery-split, 50%);
  z-index: 130;
  width: 1px;
  pointer-events: none;
  background: rgba(218, 241, 247, 0.76);
  box-shadow: 0 0 12px rgba(94, 216, 239, 0.72);
}
#recent-imagery-split-line span {
  position: absolute;
  top: 14px;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(4, 17, 27, 0.82);
  color: rgba(239, 247, 249, 0.92);
  font: 700 9px/1.4 var(--font-mono);
  letter-spacing: 1.2px;
  white-space: nowrap;
  pointer-events: none;
}
#recent-imagery-split-line span.before {
  right: 8px;
}
#recent-imagery-split-line span.after {
  left: 8px;
}
#recent-imagery-split-line .recent-imagery-split-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(180, 215, 222, 0.72);
  border-radius: 50%;
  outline: 0;
  color: rgba(239, 247, 249, 0.96);
  background: rgba(4, 17, 27, 0.96);
  box-shadow:
    0 0 0 5px rgba(62, 112, 125, 0.3),
    0 0 13px rgba(94, 216, 239, 0.3);
  font: 700 14px/1 var(--font-mono);
  transform: translate(-50%, -50%);
  pointer-events: auto;
  touch-action: none;
  cursor: ew-resize;
}
#recent-imagery-split-line .recent-imagery-split-handle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

@media (max-width: 720px) {
  #recent-imagery-panel-body {
    max-height: 48vh;
  }
}
/* ── Recording Mode ─────────────────────────── */
body.recording-mode #title-bar,
body.recording-mode #style-indicator,
body.recording-mode #top-center-actions,
body.recording-mode #global-loading-status,
body.recording-mode #traffic-sync-chip,
body.recording-mode #cctv-sync-chip,
body.recording-mode #pp-toggles,
body.recording-mode #clean-view-exit,
body.recording-mode #param-slider-panel,
body.recording-mode #data-panel,
body.recording-mode #cctv-panel,
body.recording-mode #radio-panel,
body.recording-mode #global-context-panel,
body.recording-mode #space-missions-panel,
body.recording-mode #gev-voice-control,
body.recording-mode #utilities-panel,
body.recording-mode #scene-panel {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.recording-mode #scene-runtime.active {
  opacity: 1;
  visibility: visible;
}

/* Scene playback owns layer and camera sequencing until Stop or completion. */
body.scene-playback-mode
  :is(
    #clear-selected-layers,
    #tilt-map-view,
    #north-up-view,
    #reset-globe-view
  ) {
  display: none !important;
}
/* Embed mode (?embed=1): the globe alone, on top of clean view. Provider
   attribution stays visible. */
body.ui-embed #clean-view-exit,
body.ui-embed #intel-hud,
body.ui-embed #key-setup-chip,
body.ui-embed #corner-actions,
body.ui-embed #key-setup,
body.ui-embed #first-run-launcher,
body.ui-embed #command-dock,
body.ui-embed #left-panel-stack,
body.ui-embed #right-context-rail,
body.ui-embed #world-overlay-actions,
body.ui-embed #view-switcher {
  display: none !important;
}

/* Street-level photos: the rail that holds the panel is hidden here, so an
   open photo shows over the globe (streetLevelControls moves the viewer). */
body.ui-embed .sl-viewer-wrap-embed {
  position: fixed;
  inset: 12px;
  z-index: 1000;
}

/* Cockpit, recording and scene playback own the screen, as they hide the
   panel elsewhere: the lifted photo steps out of their way. */
body.ui-embed.cockpit-mode .sl-viewer-wrap-embed,
body.ui-embed.recording-mode .sl-viewer-wrap-embed,
body.ui-embed.scene-playback-mode .sl-viewer-wrap-embed {
  display: none;
}

body.ui-embed .sl-viewer-wrap-embed .sl-viewer-stage,
body.ui-embed .sl-viewer-wrap-embed .sl-viewer {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
}
/* ── Responsive ───────────────────────────────── */
@media (max-width: 720px) {
  #pp-toggles {
    --pp-expanded-width: 176px;
    position: relative;
    inset: auto;
    gap: 6px;
  }

  .pp-toggle-group,
  #clean-view-toggle {
    width: 176px;
  }

  #title-bar {
    top: 20px;
    inset-inline-start: 20px;
  }

  #top-center-actions {
    top: max(12px, env(safe-area-inset-top));
    right: 16px;
    left: auto;
    transform: none;
  }

  #style-indicator {
    display: none;
  }

  #title-bar h1 {
    font-size: 16px;
    letter-spacing: 4px;
  }

  #title-bar h1 {
    gap: 8px;
  }

  #title-bar .title-logo {
    width: 36px;
  }

  #title-bar .frame-rate-readout {
    position: fixed;
    top: 52px;
    inset-inline-start: 20px;
    margin: 0;
    font-size: 10px;
    line-height: 12px;
  }

  #title-bar:has(.frame-rate-readout:not([hidden])) .subtitle {
    visibility: hidden;
  }

  #gev-voice-control {
    right: 16px;
    bottom: 16px;
    min-width: 196px;
  }

  #gev-voice-detail {
    max-width: 112px;
  }

  .hud-top-left,
  .hud-bottom-left {
    left: 16px;
  }

  .hud-top-right,
  .hud-bottom-right {
    right: 16px;
  }

  .hud-left-edge,
  .hud-right-edge {
    display: none;
  }

  .hud-bottom-bar {
    width: calc(100vw - 24px);
    left: 12px;
    transform: none;
  }

  .hud-bottom-bar {
    bottom: 90px;
    font-size: 9px;
  }

  #data-panel {
    top: auto;
    left: 16px;
    bottom: 200px;
    width: 260px;
  }

  #data-panel.collapsed {
    width: 260px;
  }

  #cctv-panel {
    top: auto;
    left: 16px;
    right: 16px;
    width: auto;
    bottom: 308px;
  }

  #cctv-panel.collapsed {
    width: auto;
  }

  /* Narrow viewports: cap the preview height to keep the panel compact. Cap
     the IMAGE, not the wrap — the wrap is overflow:hidden, so capping it would
     re-crop the very timestamp this is protecting. object-fit: contain then
     letterboxes inside the shorter box. */
  #cctv-frame {
    aspect-ratio: auto;
    height: 120px;
  }

  .cctv-frame-wrap {
    min-height: 0;
  }

  #scene-panel {
    top: auto;
    right: 16px;
    left: 16px;
    width: auto;
    bottom: 12px;
  }

  #scene-panel.collapsed {
    width: auto;
  }

  #left-panel-stack {
    top: 70px;
    right: 16px;
    bottom: calc(50vh + 8px);
    left: 16px;
    width: auto;
    max-height: none;
    overflow-y: auto;
  }

  #right-context-rail {
    top: calc(50vh + 8px);
    right: 16px;
    /* The rail goes edge-to-edge at this width, so its floor is what decides
       whether the required Google/Cesium credit line survives. The credit's
       top edge sits at calc(2vh + 5rem) plus its own 28px, so a flat 100px
       floor cut into it at EVERY viewport height — the DISPLAY toggles were
       drawn straight over the notice. Track the credit's own anchor instead
       and the 12px of clear air holds regardless of height; the rail already
       scrolls (overflow-y below), so it loses reach, not content. */
    bottom: calc(2vh + 7.5rem + var(--world-timeline-lift, 0px));
    left: 16px;
    width: auto;
    max-height: none;
    overflow-y: auto;
  }

  /* Both stacks are scroll containers at this width (overflow-y above), which
     also makes their overflow-x compute to auto. Each panel's decorative
     .panel-glow is absolutely positioned with a negative inset (-18px/-20px),
     so inside a scroll container it stops being harmless paint and becomes
     18–20px of scrollable overflow on BOTH axes: a horizontal scrollbar band
     under the expanded panel plus a vertical scrollbar that scrolls nothing
     but glow. Pin the glow to the panel box here — its blur is ink overflow,
     which never scrolls — instead of clipping the rail, which would also clip
     legitimate content that extends past a panel's edge. */
  #left-panel-stack .panel-glow,
  #right-context-rail .panel-glow {
    inset: 0;
  }

  #right-context-rail > #pp-toggles {
    width: 100%;
  }

  #right-context-rail #pp-toggles.collapsed .pp-header-row,
  #right-context-rail #cctv-panel,
  #right-context-rail #cctv-panel.collapsed,
  #right-context-rail #street-level-panel,
  #right-context-rail #street-level-panel.collapsed,
  #right-context-rail #recent-imagery-panel,
  #right-context-rail #recent-imagery-panel.collapsed,
  #right-context-rail #radio-panel,
  #right-context-rail #radio-panel.collapsed,
  #right-context-rail #global-context-panel,
  #right-context-rail #global-context-panel.collapsed {
    width: 100%;
  }

  #left-panel-stack > #data-panel,
  #left-panel-stack > #cctv-panel,
  #left-panel-stack > #street-level-panel,
  #left-panel-stack > #global-context-panel,
  #left-panel-stack > #utilities-panel,
  #left-panel-stack > #scene-panel,
  #left-panel-stack > #data-panel.collapsed,
  #left-panel-stack > #cctv-panel.collapsed,
  #left-panel-stack > #street-level-panel.collapsed,
  #left-panel-stack > #global-context-panel.collapsed,
  #left-panel-stack > #utilities-panel.collapsed,
  #left-panel-stack > #scene-panel.collapsed {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
  }

  #scene-runtime {
    top: 16px;
    max-width: calc(100vw - 24px);
    text-align: center;
  }
}

@media (max-width: 520px) {
  /* 16px keeps the Radio broadcast waves (15px above the logo) on-screen. */
  #title-bar {
    top: 16px;
    inset-inline-start: 16px;
  }

  #title-bar h1 > span:last-child,
  #title-bar .subtitle {
    display: none;
  }
}
/* ── Unified Command Dock ────────────────────── */
#command-dock {
  position: fixed;
  right: auto;
  /* 74px up from 1200px, leaving the bottom row to the map credits and
     Power Up; above the world timeline while it shows (world-timeline.css). */
  bottom: calc(74px + var(--world-timeline-lift, 0px));
  left: 50%;
  z-index: 145;
  display: grid;
  grid-template-areas: 'locations voice presets';
  grid-template-columns: minmax(300px, 1fr) minmax(230px, 270px) minmax(
      390px,
      1.15fr
    );
  align-items: stretch;
  width: min(94vw, 1240px);
  padding: 6px;
  overflow: visible;
  background: rgba(9, 18, 27, 0.84);
  border: 1px solid rgba(123, 189, 211, 0.28);
  border-radius: 12px;
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 28px rgba(0, 212, 255, 0.06);
  backdrop-filter: blur(28px) saturate(1.35);
  -webkit-backdrop-filter: blur(28px) saturate(1.35);
  transform: translateX(-50%);
  transition:
    opacity var(--transition-smooth),
    visibility var(--transition-smooth);
}

#command-dock > #gev-voice-control {
  position: relative;
  inset: auto;
  width: auto;
  max-width: none;
  transform: none;
}

#command-dock > #gev-voice-control {
  grid-area: voice;
  z-index: 2;
  align-self: stretch;
  justify-content: center;
  min-width: 0;
  margin: -14px 0;
  padding: 19px 14px 12px;
  border-color: rgba(0, 212, 255, 0.36);
  border-radius: 12px;
  background: rgba(8, 31, 42, 0.94);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.56),
    0 0 26px rgba(0, 212, 255, 0.12),
    0 0 0 1px rgba(0, 212, 255, 0.08) inset;
}

#command-dock .gev-voice-kicker {
  position: absolute;
  top: 6px;
  right: 14px;
  left: 14px;
  overflow: hidden;
  color: rgba(190, 221, 230, 0.52);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 1.5px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#command-dock #gev-voice-button {
  width: 78px;
  height: 42px;
}

#command-dock .gev-voice-readout {
  flex: 1;
  text-align: left;
}

#command-dock #gev-voice-detail {
  max-width: 110px;
}

/* Keep required map attribution clear of the full-width command surface. */
body:not(.ui-clean-view):not(.recording-mode) #cesium-credits {
  bottom: calc(2vh + 7rem + var(--world-timeline-lift, 0px));
}

body:not(.ui-clean-view):not(.recording-mode) #gev-credits {
  bottom: calc(2vh + 7rem + var(--world-timeline-lift, 0px));
}

/* `.hud-minimal-active`: the Minimal HUD is showing, one of the page-root classes of src/ui/rail/rootClass.js. */
body:not(.ui-clean-view):not(.recording-mode):is(
    .hud-minimal-active *,
    #intel-hud[data-variant='minimal'].active
  )
  #cesium-credits {
  right: 36px;
  left: auto;
  width: min(340px, calc(100vw - 72px)) !important;
  text-align: right;
}

body:not(.ui-clean-view):not(.recording-mode):is(
    .hud-minimal-active *,
    #intel-hud[data-variant='minimal'].active
  )
  #gev-credits {
  right: 36px;
  left: auto;
  width: min(340px, calc(100vw - 72px)) !important;
  text-align: right;
}

body.ui-clean-view #command-dock,
body.recording-mode #command-dock {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.ui-clean-view #cesium-credits,
body.recording-mode #cesium-credits {
  right: auto;
  bottom: 36px;
  left: 36px;
}

body.ui-clean-view #gev-credits,
body.recording-mode #gev-credits {
  right: auto;
  bottom: 36px;
  left: 36px;
}

#intel-hud[data-variant='minimal'] .hud-bottom-left {
  bottom: calc(2vh + 7.5rem + var(--world-timeline-lift, 0px));
}

#intel-hud[data-variant='minimal'] .hud-bottom-bar {
  bottom: calc(2vh + 11.5rem + var(--world-timeline-lift, 0px));
}

/* Below 1200px the dock reaches the bottom corners, so it keeps to the
   bottom edge and the credits and coordinates sit above it. */
@media (max-width: 1199px) {
  #command-dock {
    bottom: calc(2vh + var(--world-timeline-lift, 0px));
  }
}

@media (max-width: 980px) {
  #command-dock {
    grid-template-areas:
      'locations voice'
      'presets presets';
    grid-template-columns: minmax(0, 1fr) minmax(170px, 210px);
    width: calc(100vw - 24px);
  }

  #command-dock > #gev-voice-control {
    margin: -10px 0 0;
  }

  body:not(.ui-clean-view):not(.recording-mode) #cesium-credits {
    bottom: calc(2vh + 9.5rem + var(--world-timeline-lift, 0px));
  }

  body:not(.ui-clean-view):not(.recording-mode) #gev-credits {
    bottom: calc(2vh + 9.5rem + var(--world-timeline-lift, 0px));
  }

  #intel-hud[data-variant='minimal'] .hud-bottom-left {
    bottom: calc(2vh + 12rem + var(--world-timeline-lift, 0px));
  }

  #intel-hud[data-variant='minimal'] .hud-bottom-bar {
    bottom: calc(2vh + 16rem + var(--world-timeline-lift, 0px));
  }
}

@media (max-width: 720px) {
  #command-dock {
    bottom: calc(8px + var(--world-timeline-lift, 0px));
  }

  #left-panel-stack {
    bottom: calc(50vh + 8px);
  }
}
/* ── Compact accordion command dock ──────────── */
#command-dock {
  --dock-voice-width: clamp(13.5rem, 17vw, 15rem);
  display: flex;
  grid-template-areas: none;
  grid-template-columns: none;
  align-items: center;
  width: fit-content;
  max-width: calc(100vw - 4vw);
  min-height: 3.75rem;
  padding: 0.2rem;
  border-radius: 0.4rem;
  transform: translateX(-50%);
  transition:
    transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity var(--transition-smooth),
    visibility var(--transition-smooth);
}

#command-dock > #gev-voice-control {
  position: relative;
  inset: auto;
  z-index: 3;
  display: grid;
  grid-template-columns: 3.2rem 1fr 3.6rem;
  grid-template-rows: 0.8rem 2.55rem 0.8rem;
  flex: 0 0 var(--dock-voice-width);
  width: var(--dock-voice-width);
  min-width: 0;
  height: 4.9rem;
  margin: -0.65rem 0;
  padding: 0.3rem 0.65rem;
  gap: 0 0.35rem;
  overflow: hidden;
  border-radius: var(--panel-radius);
  transform: none;
}

#command-dock .gev-voice-kicker {
  position: static;
  grid-column: 2 / 4;
  grid-row: 1;
  align-self: center;
  color: rgba(190, 221, 230, 0.58);
  font-size: 0.39rem;
  letter-spacing: 0.07rem;
  text-align: center;
}

#command-dock #gev-voice-button {
  grid-column: 1;
  grid-row: 1 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  align-self: center;
  gap: 0.15rem;
  padding: 0;
  border-radius: 50%;
  box-shadow:
    0 0 0 0.2rem rgba(0, 212, 255, 0.06),
    0 0 1rem rgba(0, 212, 255, 0.12);
}

#command-dock .gev-mic-orbit {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
}

#command-dock .gev-mic-orbit img {
  width: 1.55rem;
  height: 1.55rem;
}

#command-dock .gev-mic-label {
  font-size: 0.35rem;
  color: rgba(190, 221, 230, 0.72);
  letter-spacing: 0.02rem;
}

#command-dock .gev-voice-visualizer {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 0.12rem;
  height: 2.2rem;
  padding: 0.2rem 0.1rem;
  border-bottom: 1px solid rgba(54, 220, 255, 0.34);
}

#command-dock .gev-voice-visualizer span {
  width: 0.18rem;
  height: 0.55rem;
  background: linear-gradient(to top, #28b9db, #71eaff);
  box-shadow: 0 0 0.35rem rgba(54, 220, 255, 0.28);
  transform-origin: bottom;
}

#command-dock .gev-voice-visualizer span:nth-child(3n) {
  height: 1.35rem;
}
#command-dock .gev-voice-visualizer span:nth-child(4n) {
  height: 0.95rem;
}
#command-dock .gev-voice-visualizer span:nth-child(5n) {
  height: 1.7rem;
}
#command-dock .gev-voice-visualizer span:nth-child(7n) {
  height: 0.75rem;
}

#command-dock
  #gev-voice-control[data-status='listening']
  .gev-voice-visualizer
  span,
#command-dock
  #gev-voice-control[data-status='executing']
  .gev-voice-visualizer
  span {
  animation: gev-voice-bar 680ms ease-in-out infinite alternate;
  animation-delay: calc(var(--bar) * -45ms);
}

#command-dock .gev-voice-readout {
  display: contents;
}

#command-dock #gev-voice-status {
  grid-column: 3;
  grid-row: 2;
  align-self: start;
  padding-top: 0.2rem;
  font-size: 0.45rem;
  text-align: right;
}

#command-dock #gev-voice-detail {
  grid-column: 2 / 4;
  grid-row: 3;
  align-self: center;
  max-width: none;
  margin: 0;
  font-size: 0.39rem;
  letter-spacing: 0.08rem;
  text-align: center;
}

@keyframes gev-voice-bar {
  from {
    transform: scaleY(0.35);
    opacity: 0.5;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* Compact dock clearance keeps the reference-like low profile. */
body:not(.ui-clean-view):not(.recording-mode) #cesium-credits {
  bottom: calc(2vh + 4.7rem + var(--world-timeline-lift, 0px));
}

body:not(.ui-clean-view):not(.recording-mode) #gev-credits {
  bottom: calc(2vh + 4.7rem + var(--world-timeline-lift, 0px));
}

#intel-hud[data-variant='minimal'] .hud-bottom-left {
  bottom: calc(2vh + 5.4rem + var(--world-timeline-lift, 0px));
}

#intel-hud[data-variant='minimal'] .hud-bottom-bar {
  bottom: calc(2vh + 8.9rem + var(--world-timeline-lift, 0px));
}

@media (max-width: 900px) {
  #command-dock {
    --dock-voice-width: 11.5rem;
    max-width: calc(100vw - 1rem);
  }
}
/* ── Command dock refinement: voice states ── */
#command-dock {
  --dock-voice-width: 8.75rem;
}

#command-dock > #gev-voice-control {
  grid-template-columns: 3rem minmax(0, 1fr);
  grid-template-rows: 0.8rem 2.25rem 0.85rem;
  gap: 0.12rem 0.28rem;
  width: var(--dock-voice-width);
  flex-basis: var(--dock-voice-width);
  height: 5.35rem;
  margin-top: -0.97rem;
  margin-bottom: -0.97rem;
  padding: 0.32rem 0.38rem 0.3rem;
  overflow: visible;
}

#command-dock .gev-voice-heading {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  min-width: 0;
}

#command-dock .gev-voice-kicker {
  position: static;
  padding-right: 0;
  font-size: 0.46rem;
  font-weight: 500;
  letter-spacing: 0.08rem;
}

#command-dock #gev-voice-button {
  grid-column: 1;
  grid-row: 1 / 4;
  align-self: center;
  width: 2.65rem;
  height: 4.15rem;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#command-dock .gev-mic-orbit {
  flex: 0 0 2.45rem;
  width: 2.45rem;
  height: 2.45rem;
  aspect-ratio: 1;
  box-sizing: border-box;
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid rgba(0, 212, 255, 0.48);
  border-radius: 50%;
  box-shadow:
    0 0 0 0.18rem rgba(0, 212, 255, 0.06),
    0 0 0.9rem rgba(0, 212, 255, 0.12);
}

#command-dock .gev-mic-label {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.42rem;
  letter-spacing: 0.035rem;
}

#command-dock .gev-voice-visualizer {
  grid-column: 2;
  grid-row: 2;
  align-self: stretch;
  box-sizing: border-box;
  height: 2.25rem;
  padding: 0.3rem 0.05rem 0.12rem;
  overflow: hidden;
  visibility: visible;
  opacity: 0.54;
  transform: none;
  transition: opacity 180ms ease;
}

#command-dock
  #gev-voice-control[data-status='connecting']
  .gev-voice-visualizer,
#command-dock #gev-voice-control[data-status='listening'] .gev-voice-visualizer,
#command-dock
  #gev-voice-control[data-status='executing']
  .gev-voice-visualizer {
  visibility: visible;
  opacity: 1;
  transform: none;
}

#command-dock #gev-voice-status {
  position: static;
  width: auto;
  padding-top: 0;
  color: var(--accent);
  font-size: 0.43rem;
  text-align: left;
}

#command-dock #gev-voice-detail {
  grid-column: 2;
  grid-row: 3;
  align-self: start;
  padding-top: 0.12rem;
  max-width: 100%;
  overflow: hidden;
  font-size: 0.39rem;
  font-weight: 500;
  letter-spacing: 0.035rem;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#command-dock #gev-voice-control[data-status='connecting'] #gev-voice-detail,
#command-dock #gev-voice-control[data-status='listening'] #gev-voice-detail,
#command-dock #gev-voice-control[data-status='executing'] #gev-voice-detail {
  grid-row: 3;
  font-size: 0.43rem;
}

#command-dock #gev-voice-control[data-status='error'] {
  display: grid;
  align-items: initial;
  width: var(--dock-voice-width);
  border-color: rgba(255, 92, 110, 0.58);
  border-radius: 0.4rem;
}

#command-dock #gev-voice-control[data-status='error'] .gev-voice-readout {
  display: contents;
}

#command-dock #gev-voice-control[data-status='error'] #gev-voice-detail {
  max-width: none;
  overflow: hidden;
  color: #ffb4bd;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#command-dock .gev-voice-error-tray {
  position: absolute;
  bottom: calc(100% + 0.7rem);
  left: 50%;
  z-index: 8;
  width: clamp(19rem, 29vw, 24rem);
  padding: 0.85rem 0.9rem;
  visibility: hidden;
  opacity: 0;
  color: rgba(255, 220, 224, 0.92);
  background: rgba(34, 10, 16, 0.96);
  border: 1px solid rgba(255, 92, 110, 0.5);
  border-radius: 0.42rem;
  box-shadow:
    0 0.9rem 2.2rem rgba(0, 0, 0, 0.62),
    0 0 1.4rem rgba(255, 92, 110, 0.08);
  backdrop-filter: blur(28px) saturate(1.25);
  -webkit-backdrop-filter: blur(28px) saturate(1.25);
  pointer-events: none;
  transform: translate(-50%, 0.55rem) scale(0.985);
  transform-origin: bottom center;
  transition:
    opacity 180ms ease,
    visibility 180ms ease,
    transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Lift the voice column over its neighbours while the alert shows. */
#command-dock > #gev-voice-control[data-status='error']:not(.error-dismissed) {
  z-index: 101;
}

#command-dock
  #gev-voice-control[data-status='error']:not(.error-dismissed)
  .gev-voice-error-tray {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

#command-dock .gev-voice-error-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: #ff8f9d;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1rem;
}

#command-dock .gev-voice-error-dismiss {
  padding: 0.25rem 0.42rem;
  color: rgba(255, 220, 224, 0.72);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 143, 157, 0.32);
  border-radius: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.43rem;
  letter-spacing: 0.06rem;
  cursor: pointer;
}

#command-dock #gev-voice-error-detail {
  margin-top: 0.65rem;
  color: rgba(255, 232, 235, 0.92);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  line-height: 1.45;
}

#command-dock .gev-voice-error-hint {
  margin-top: 0.5rem;
  color: rgba(255, 196, 203, 0.58);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  line-height: 1.45;
  letter-spacing: 0.035rem;
}

/* From 1200px the attribution row sits on the bottom edge, on the Power Up
   baseline, below the raised command dock (command-dock.css). It stops 26rem
   short of the right edge, clear of the corner row (Power Up and the language
   picker), and wraps rather than running under it. Below 1200px the dock
   keeps to the bottom edge and the row sits above it. `.hud-minimal-active`
   and the Omnibar layout's classes are page-root classes (src/ui/rail/rootClass.js). */
body:not(.ui-clean-view):not(.recording-mode) #cesium-credits,
body:not(.ui-clean-view):not(.recording-mode):is(
    .hud-minimal-active *,
    #intel-hud[data-variant='minimal'].active
  )
  #cesium-credits {
  right: auto;
  bottom: 1rem;
  left: 1.5rem;
  width: auto !important;
  max-width: calc(100vw - 3rem);
  text-align: left;
}

body:not(.ui-clean-view):not(.recording-mode) #gev-credits,
body:not(.ui-clean-view):not(.recording-mode):is(
    .hud-minimal-active *,
    #intel-hud[data-variant='minimal'].active
  )
  #gev-credits {
  right: auto;
  bottom: 1rem;
  left: 1.5rem;
  width: max-content !important;
  max-width: calc(100vw - 1.5rem - 26rem);
  white-space: normal;
  text-align: left;
}

#intel-hud[data-variant='tactical'] .hud-bottom-left,
#intel-hud[data-variant='tactical'] .hud-bottom-right {
  bottom: calc(2vh + 6.5rem + var(--world-timeline-lift, 0px));
}

#intel-hud[data-variant='minimal'] .hud-bottom-left {
  bottom: calc(2vh + 5.4rem + var(--world-timeline-lift, 0px));
}

:root[data-scope-mask='off']
  #intel-hud[data-variant='minimal']
  .hud-bottom-left {
  bottom: calc(2vh + 6.5rem + var(--world-timeline-lift, 0px));
}

#intel-hud[data-variant='minimal'] .hud-bottom-bar {
  bottom: calc(2vh + 9rem + var(--world-timeline-lift, 0px));
}

/* The coordinate readout shares the bottom-left corner with the attribution
   row below 1200px: it sits clear of the row's 28px logo line, with a 6px gap
   (from 1200px, rail-split.css). */
#intel-hud:is([data-variant='tactical'], [data-variant='minimal'])
  .hud-bottom-left,
:root[data-scope-mask='off']
  #intel-hud[data-variant='minimal']
  .hud-bottom-left {
  bottom: calc(2vh + 7.125rem + var(--world-timeline-lift, 0px));
}

@media (max-width: 1199px) {
  body:not(.ui-clean-view):not(.recording-mode) #cesium-credits,
  body:not(.ui-clean-view):not(.recording-mode):is(
      .hud-minimal-active *,
      #intel-hud[data-variant='minimal'].active
    )
    #cesium-credits,
  body:not(.ui-clean-view):not(.recording-mode) #gev-credits,
  body:not(.ui-clean-view):not(.recording-mode):is(
      .hud-minimal-active *,
      #intel-hud[data-variant='minimal'].active
    )
    #gev-credits {
    bottom: calc(2vh + 5rem + var(--world-timeline-lift, 0px));
    width: auto !important;
    max-width: calc(100vw - 3rem);
    white-space: nowrap;
  }
}

/* Cesium draws the line in an absolutely placed box inside the empty
   #cesium-credits anchor, so the cap and the wrapping go on that box: from
   1200px, and in the Omnibar layout at every width, whose attribution row
   shares the bottom edge with the corner row (omnibar-dock.css). */
body:not(.mobile-shell):not(.cockpit-mode):not(.scene-playback-mode):not(
    .ui-clean-view
  ):not(.recording-mode):where(.has-omnibar.dock-has-voice *)
  #cesium-credits
  .cesium-widget-credits {
  width: max-content;
  max-width: calc(100vw - 1.5rem - 26rem);
  white-space: normal;
}

/* Right to left that layout puts the row at the bottom right at every
   width, so the box hangs from the anchor's right edge. */
html[dir='rtl']
  body:not(.mobile-shell):not(.cockpit-mode):not(.scene-playback-mode):not(
    .ui-clean-view
  ):not(.recording-mode):not(.context-docked):where(
    .has-omnibar.dock-has-voice *
  )
  #cesium-credits
  .cesium-widget-credits {
  right: 0;
  left: auto;
}

@media (min-width: 1200px) {
  #cesium-credits .cesium-widget-credits {
    width: max-content;
    max-width: calc(100vw - 1.5rem - 26rem);
    white-space: normal;
  }

  /* Right to left, the corner row sits at the bottom left
     (locale-picker.css), so the attribution row takes the bottom right.
     Expanded Context places it itself (context-dock.css). */
  /* The Minimal HUD's placement above names #intel-hud too: matched here,
     so right to left wins over it. */
  html[dir='rtl']
    body:not(.context-docked):not(.ui-clean-view):not(.recording-mode)
    :is(#cesium-credits, #gev-credits),
  html[dir='rtl']
    body:not(.context-docked):not(.ui-clean-view):not(.recording-mode):is(
      .hud-minimal-active *,
      #intel-hud[data-variant='minimal'].active
    )
    :is(#cesium-credits, #gev-credits) {
    right: 1.5rem;
    left: auto;
    text-align: right;
  }

  html[dir='rtl']
    body:not(.context-docked):not(.ui-clean-view):not(.recording-mode)
    #cesium-credits
    .cesium-widget-credits {
    right: 0;
    left: auto;
  }
}

@media (max-width: 900px) {
  body:not(.ui-clean-view):not(.recording-mode) #cesium-credits,
  body:not(.ui-clean-view):not(.recording-mode):is(
      .hud-minimal-active *,
      #intel-hud[data-variant='minimal'].active
    )
    #cesium-credits {
    bottom: calc(2vh + 5rem + var(--world-timeline-lift, 0px));
    left: 0.75rem;
    max-width: calc(100vw - 1.5rem);
  }

  body:not(.ui-clean-view):not(.recording-mode) #gev-credits,
  body:not(.ui-clean-view):not(.recording-mode):is(
      .hud-minimal-active *,
      #intel-hud[data-variant='minimal'].active
    )
    #gev-credits {
    bottom: calc(2vh + 5rem + var(--world-timeline-lift, 0px));
    left: 0.75rem;
    max-width: calc(100vw - 1.5rem);
  }

  #command-dock .gev-voice-error-tray {
    width: min(24rem, calc(100vw - 1.5rem));
  }
}

@media (max-width: 620px) {
  #command-dock {
    --dock-voice-width: 8.75rem;
  }

  #left-panel-stack {
    bottom: calc(50vh + 8px);
  }
}
/* ── Command dock: the voice control ─────────── */
#command-dock {
  transform: translateX(-50%);
}

/* Five-pixel standby baseline; live microphone analysis sets --audio-level. */
#command-dock .gev-voice-visualizer span,
#command-dock .gev-voice-visualizer span:nth-child(3n),
#command-dock .gev-voice-visualizer span:nth-child(4n),
#command-dock .gev-voice-visualizer span:nth-child(5n),
#command-dock .gev-voice-visualizer span:nth-child(7n) {
  height: var(--audio-level, 5px);
  opacity: var(--audio-opacity, 0.56);
  animation: none;
  transition:
    height 70ms linear,
    opacity 90ms linear;
}

#command-dock
  #gev-voice-control[data-status='listening']
  .gev-voice-visualizer
  span,
#command-dock
  #gev-voice-control[data-status='executing']
  .gev-voice-visualizer
  span {
  animation: none;
}

#command-dock
  #gev-voice-control[data-speaker='user']
  :is(#gev-voice-status, #gev-voice-detail) {
  color: #ffbf69;
}

#command-dock
  #gev-voice-control[data-speaker='user']
  .gev-voice-visualizer
  span {
  background: linear-gradient(to top, #d98a35, #ffcf8a);
  box-shadow: 0 0 0.35rem rgba(255, 191, 105, 0.32);
}

#command-dock
  #gev-voice-control[data-speaker='ai']
  :is(#gev-voice-status, #gev-voice-detail) {
  color: var(--accent);
}

#command-dock #gev-voice-control[data-speaker='ai'] .gev-voice-visualizer span {
  background: linear-gradient(to top, #28b9db, #71eaff);
  box-shadow: 0 0 0.35rem rgba(54, 220, 255, 0.28);
}

/* The dock draws no surface of its own; the voice control does. */
#command-dock {
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Keep the microphone neutral at rest; cyan signals hover and live states. */
#command-dock .gev-mic-orbit {
  background: rgba(232, 234, 237, 0.04);
  border-color: rgba(232, 234, 237, 0.36);
  box-shadow:
    0 0 0 0.18rem rgba(232, 234, 237, 0.04),
    0 0 0.75rem rgba(232, 234, 237, 0.08);
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

#command-dock .gev-mic-orbit img {
  filter: grayscale(1) saturate(0) brightness(1.65);
  opacity: 0.68;
  transition:
    filter var(--transition-fast),
    opacity var(--transition-fast);
}

#command-dock #gev-voice-button:hover .gev-mic-orbit,
#command-dock
  #gev-voice-control:is(
    [data-status='connecting'],
    [data-status='listening']:not([data-microphone='muted']),
    [data-status='executing']
  )
  .gev-mic-orbit {
  background: rgba(0, 212, 255, 0.06);
  border-color: rgba(0, 212, 255, 0.48);
  box-shadow:
    0 0 0 0.18rem rgba(0, 212, 255, 0.06),
    0 0 0.9rem rgba(0, 212, 255, 0.12);
}

#command-dock #gev-voice-button:hover .gev-mic-orbit img,
#command-dock
  #gev-voice-control:is(
    [data-status='connecting'],
    [data-status='listening']:not([data-microphone='muted']),
    [data-status='executing']
  )
  .gev-mic-orbit
  img {
  filter: none;
  opacity: 1;
}

#gev-voice-control .gev-voice-help-tray {
  position: absolute;
  bottom: calc(100% + 0.7rem);
  left: 50%;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.22rem;
  box-sizing: border-box;
  width: max-content;
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 0.62rem 0.72rem;
  visibility: hidden;
  opacity: 0;
  color: rgba(223, 245, 250, 0.92);
  background: rgba(7, 22, 31, 0.96);
  border: 1px solid rgba(54, 220, 255, 0.34);
  border-radius: 0.38rem;
  box-shadow:
    0 0.85rem 2rem rgba(0, 0, 0, 0.58),
    0 0 1.2rem rgba(0, 212, 255, 0.08);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  pointer-events: none;
  transform: translate(-50%, 0.65rem) scale(0.985);
  transform-origin: bottom center;
  transition:
    opacity 160ms ease,
    visibility 160ms ease,
    transform 210ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

#gev-voice-control .gev-voice-help-kicker {
  color: rgba(54, 220, 255, 0.72);
  font-family: var(--font-mono);
  font-size: 0.46rem;
  font-weight: 600;
  letter-spacing: 0.1rem;
}

#gev-voice-control .gev-voice-help-detail {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  line-height: 1.35;
  white-space: nowrap;
}

/* The ru/es push-to-talk hint is longer than the tray: wrap it instead of clipping. */
html:not([lang='en']) #gev-voice-control .gev-voice-help-detail {
  white-space: normal;
}

#gev-voice-control:not([data-status='error'])
  #gev-voice-button:enabled:is(:hover, :focus-visible)
  ~ .gev-voice-help-tray {
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  #gev-voice-control .gev-voice-help-tray {
    transition: none;
  }
  .radio-tuner-needle,
  .radio-tuner-tick {
    transition: none;
  }
}
/* ------------------------------------------------------------------ *
 * Voice cost control — model-tier toggle + running session estimate.
 * Appended (not woven into the dock passes above) so the three existing
 * #gev-voice-control cascades stay untouched; these rules only add the
 * new .gev-voice-cost cluster inside the existing .gev-voice-heading row.
 * ------------------------------------------------------------------ */
.gev-voice-cost {
  display: flex;
  align-items: center;
  gap: 0.22rem;
  margin-left: auto; /* pin right; kicker + status keep their left cluster */
  flex: 0 0 auto;
}

.gev-voice-tier-btn {
  padding: 0 0.24rem;
  height: 0.72rem;
  min-width: 1.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid rgba(0, 212, 255, 0.34);
  border-radius: 0.18rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.4rem;
  letter-spacing: 0.045rem;
  line-height: 1;
  cursor: pointer;
  transition:
    color var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast);
}

.gev-voice-tier-btn:hover {
  color: var(--text-primary);
  border-color: rgba(0, 212, 255, 0.6);
  background: rgba(0, 212, 255, 0.12);
}

/* MINI engaged — amber, distinct from the cyan default so the cheaper tier
   is legible at a glance without reading the label. */
.gev-voice-tier-btn[aria-pressed='true'] {
  color: #ffc46b;
  border-color: rgba(255, 196, 107, 0.55);
  background: rgba(255, 196, 107, 0.12);
}

.gev-voice-cost-value {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.4rem;
  letter-spacing: 0.02rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: color var(--transition-fast);
}

.gev-voice-cost-value[data-level='warn'] {
  color: #ffc46b;
}

.gev-voice-cost-warning {
  margin-left: auto;
  flex: 0 0 auto;
}

.gev-voice-cost-warning[data-level='unknown'] {
  color: #ffc46b;
}

.gev-voice-cost-value[data-level='cap'] {
  color: #ff6b6b;
  font-weight: 600;
}

/* The dock heading row is 0.8rem tall; keep the cluster inside it. */
#command-dock .gev-voice-cost {
  max-height: 0.8rem;
}

/* The dock collapses the kicker/readout when a tray is open — the cost
   cluster follows the same rule so the row never overflows. */
#command-dock.tray-open .gev-voice-cost {
  display: none;
}

.gev-voice-tier-btn[hidden],
.gev-voice-cost-value[hidden] {
  display: none;
}

/* The heading row is only as wide as the voice column: the cost cluster
   keeps its size and a long state (ПОДКЛЮЧЕНИЕ, CONECTANDO) ends in an
   ellipsis. Dropping the kicker returns its gap to the state label; the
   negative margin reaches over the gutter beside the mic ring, which has
   curved away at heading height. */
html:not([lang='en']) #command-dock .gev-voice-heading {
  gap: 0.2rem;
  margin-left: -0.6rem;
}

html:not([lang='en']) #command-dock .gev-voice-heading > .gev-voice-kicker {
  display: none;
}

html:not([lang='en']) #command-dock .gev-voice-heading > #gev-voice-status {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html:not([lang='en']) #command-dock .gev-voice-cost {
  gap: 0.16rem;
  padding-left: 0.1rem;
}

html:not([lang='en']) #command-dock .gev-voice-heading .gev-voice-tier-btn {
  min-width: 0;
  padding: 0 0.2rem;
}

html:not([lang='en']) #command-dock .gev-voice-cost-value {
  letter-spacing: 0;
}

/* Live hints and the tier switch ("СТАНДАРТ — со следующей сессии") run
   longer: a second line from the spare space under the readout, with no
   tracking so the tier line does not need a third. */
html:not([lang='en'])
  #command-dock
  #gev-voice-control:is(
    [data-status='connecting'],
    [data-status='listening'],
    [data-status='executing']
  )
  #gev-voice-detail {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: 1.15;
  letter-spacing: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

#gev-voice-control[data-provider-choice='true'] {
  --gev-provider-lift: 0px;
}

/* Provider choice belongs to the existing voice control, not a separate panel. */
.gev-voice-provider-field {
  position: absolute;
  bottom: calc(100% + var(--gev-provider-lift, 0px));
  z-index: 9;
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  padding: 8px 6px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--bg-panel, #09121b);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  opacity: 0;
  pointer-events: none;
}
.gev-voice-provider-field[hidden] {
  display: none;
}
.gev-voice-provider-field select {
  min-width: 0;
  width: 100%;
  min-height: 30px;
  border-radius: 4px;
  font: inherit;
  font-size: 0.65rem;
  --gev-field-background: #09121b;
  --gev-field-border-color: var(--glass-border);
}
#gev-voice-control:hover .gev-voice-provider-field,
#gev-voice-control:focus-within .gev-voice-provider-field {
  opacity: 1;
  pointer-events: auto;
}
#command-dock
  #gev-voice-control[data-provider-choice='true']
  .gev-voice-help-tray,
#command-dock #gev-voice-control[data-provider-choice='true'] .gev-voice-card,
#command-dock
  #gev-voice-control[data-provider-choice='true']
  .gev-voice-error-tray {
  bottom: calc(100% + 4.8rem + var(--gev-provider-lift));
}
@media (max-width: 900px) {
  /* The attribution clearance also creates a gap for mouse users in a
     narrow window, so the raised chooser must not depend on root hover. */
  .gev-voice-provider-field {
    opacity: 1;
    pointer-events: auto;
  }
  #command-dock #gev-voice-control[data-provider-choice='true'] {
    --gev-provider-lift: 3rem;
  }
}
@media (max-width: 720px) {
  #command-dock #gev-voice-control[data-provider-choice='true'] {
    --gev-provider-lift: calc(2vh + 2.5rem);
  }
}
@media (hover: none) {
  .gev-voice-provider-field {
    opacity: 1;
    pointer-events: auto;
  }
}

/* The opt-in provider and gear share a discoverable row at the existing anchor. */
#gev-voice-control:has(> .gev-voice-settings-button) {
  --gev-voice-settings-gap: 0.75rem;
  --gev-voice-tray-clearance: 0px;
}
#gev-voice-control:has(> .gev-voice-settings-button)
  .gev-voice-provider-field:not([hidden]) {
  bottom: calc(
    100% + var(--gev-provider-lift, 0px) + var(--gev-voice-settings-gap)
  );
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 46px 6px 6px;
  border-color: rgba(123, 189, 211, 0.28);
  background: rgba(9, 18, 27, 0.88);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.46);
  color-scheme: dark;
  opacity: 1;
  pointer-events: auto;
}
#gev-voice-control:has(> .gev-voice-settings-button)
  .gev-voice-provider-field
  > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
#gev-voice-control:has(> .gev-voice-settings-button)
  .gev-voice-provider-field
  select {
  min-height: 34px;
  font-size: 0.7rem;
}
#gev-voice-control .gev-voice-settings-button {
  position: absolute;
  top: 1rem;
  right: 0.25rem;
  z-index: 11;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  color: rgba(190, 221, 230, 0.72);
  background: rgba(9, 18, 27, 0.92);
  border: 1px solid var(--glass-border);
  border-radius: 0.3rem;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
#gev-voice-control[data-provider-choice='true']:has(
    .gev-voice-provider-field:not([hidden])
  )
  .gev-voice-settings-button {
  top: auto;
  right: 7px;
  bottom: calc(
    100% + var(--gev-provider-lift, 0px) + var(--gev-voice-settings-gap) + 7px
  );
}
#gev-voice-control
  .gev-voice-settings-button:is(:hover, [aria-expanded='true']) {
  color: var(--voice-panel-accent, var(--accent));
  border-color: currentColor;
  background: rgba(0, 212, 255, 0.12);
}
#gev-voice-control .gev-voice-settings-button:focus-visible {
  outline: 2px solid var(--voice-panel-accent, var(--accent));
  outline-offset: 2px;
}

@media (pointer: coarse) {
  #gev-voice-control .gev-voice-settings-button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
  #gev-voice-control:has(> .gev-voice-settings-button)
    .gev-voice-provider-field:not([hidden]) {
    padding-right: 56px;
  }
  #gev-voice-control:has(> .gev-voice-settings-button)
    .gev-voice-provider-field
    select {
    min-height: 44px;
  }
}

/* Match the attribution-aware tray offsets without moving the trays. The
   popup can scroll before the shared viewport budget caps its lift. */
@media (max-width: 900px) {
  #gev-voice-control:has(> .gev-voice-settings-button) {
    --gev-voice-tray-clearance: calc(3rem - 1.2rem);
  }
}
@media (max-width: 720px) {
  #gev-voice-control:has(> .gev-voice-settings-button) {
    --gev-voice-tray-clearance: calc(2vh + 2.5rem - 1.2rem);
  }
}

/* Short touch landscapes have room beside the dock, not above it. Keep the same chooser and gear together in that empty lower gutter;
   the open popup remains a bounded, scrollable overlay above the microphone. */
@media (pointer: coarse) and (orientation: landscape) and (min-width: 480px) and (max-height: 500px) {
  #command-dock
    > #gev-voice-control[data-provider-choice='true']:has(
      > .gev-voice-settings-button
    ) {
    --gev-provider-lift: 0px;
    --gev-landscape-row-width: clamp(
      108px,
      calc((100vw - var(--dock-voice-width)) / 2 - 0.875rem),
      calc(100% - 2px)
    );
  }
  #command-dock
    > #gev-voice-control[data-provider-choice='true']:has(
      > .gev-voice-settings-button
    )
    > .gev-voice-provider-field:not([hidden]) {
    left: calc(50% - 50vw + 0.5rem);
    right: auto;
    bottom: 0.375rem;
    width: var(--gev-landscape-row-width);
    box-sizing: border-box;
  }
  #command-dock
    > #gev-voice-control[data-provider-choice='true']:has(
      > .gev-voice-settings-button
    )
    > .gev-voice-settings-button {
    left: calc(50% - 50vw + 0.5rem + var(--gev-landscape-row-width) - 51px);
    right: auto;
    top: auto;
    bottom: calc(0.375rem + 7px);
  }
}

/* The revealed row clears pinned wings without making the Voice column's
   noninteractive gaps cover their controls. Keep hit surfaces stable so hover
   promotion cannot oscillate when the pointer crosses root padding. */
#command-dock
  > #gev-voice-control[data-provider-choice='true']:has(
    > .gev-voice-settings-button
  ) {
  pointer-events: none;
}
#command-dock
  > #gev-voice-control[data-provider-choice='true']:has(
    > .gev-voice-settings-button
  )
  > :is(
    #gev-voice-button,
    .gev-voice-heading,
    .gev-voice-readout,
    .gev-voice-provider-field,
    .gev-voice-settings-button,
    .gev-voice-panel,
    .gev-voice-error-tray
  ) {
  pointer-events: auto;
}

/* Pointer grace crosses pinned trays without covering their controls. Keyboard
   focus, the provider select and an open panel hold the shared row visible. */
@media (hover: hover) and (pointer: fine) {
  #command-dock
    #gev-voice-control[data-provider-choice='true']:has(
      > .gev-voice-settings-button
    )
    :is(.gev-voice-provider-field, .gev-voice-settings-button) {
    transition:
      opacity 160ms ease,
      transform 180ms ease;
  }
  #command-dock
    #gev-voice-control[data-provider-choice='true']:has(
      > .gev-voice-settings-button
    ):not(:hover):not([data-row-grace]):not(
      :has(
        :focus-visible,
        #gev-voice-provider:focus,
        .gev-voice-panel[data-view='settings']:not([hidden])
      )
    )
    :is(.gev-voice-provider-field, .gev-voice-settings-button) {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
  }
  #command-dock
    #gev-voice-control[data-provider-choice='true']:has(
      > .gev-voice-settings-button
    )
    .gev-voice-provider-field::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    height: calc(var(--gev-voice-settings-gap) + 8px);
  }
}

/* Existing tier and estimate controls are readable Settings content in panel mode. */
.gev-voice-cost-settings {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.75rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--glass-border);
}
.gev-voice-cost-settings:has(#gev-voice-tier[hidden]):has(
    #gev-voice-cost-value[hidden]
  ),
.gev-voice-cost-setting-row:has(> [hidden]) {
  display: none;
}
.gev-voice-cost-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2rem;
  color: var(--text-primary);
  font-size: 0.68rem;
}
.gev-voice-cost-setting-row > span {
  min-width: 0;
}
#gev-voice-control .gev-voice-cost-settings .gev-voice-tier-btn {
  flex: 0 0 auto;
  min-height: 2rem;
  min-width: 3.25rem;
  padding: 0.3rem 0.55rem;
  font-size: 0.67rem;
}
.gev-voice-cost-settings .gev-voice-cost-value {
  flex: 0 0 auto;
  font-size: 0.75rem;
}
.gev-voice-cost-settings .gev-voice-cost-value[data-level='ok'] {
  color: var(--voice-panel-accent, var(--accent));
}
#gev-voice-control .gev-voice-settings-icon {
  font-size: 18px;
  line-height: 1;
}
@media (pointer: coarse) {
  #gev-voice-control .gev-voice-cost-settings .gev-voice-tier-btn {
    min-height: 44px;
    min-width: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #command-dock
    #gev-voice-control:has(> .gev-voice-settings-button)
    :is(.gev-voice-provider-field, .gev-voice-settings-button) {
    transition: none;
  }
}
/* ------------------------------------------------------------------ *
 * Voice card — captions, plan steps and the latest result, nested in
 * #gev-voice-control beside its help and error trays. It shares their
 * anchor and glass treatment, and it hides with the control in Clean-UI
 * and recording mode because it lives inside it.
 * ------------------------------------------------------------------ */
#gev-voice-control .gev-voice-card {
  position: absolute;
  bottom: calc(100% + 0.7rem);
  left: 50%;
  z-index: 7;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  box-sizing: border-box;
  width: clamp(18rem, 26vw, 22rem);
  max-height: min(24rem, 55vh);
  overflow-y: auto;
  padding: 0.62rem 0.72rem 0.7rem;
  color: rgba(223, 245, 250, 0.92);
  background: rgba(7, 22, 31, 0.96);
  border: 1px solid rgba(54, 220, 255, 0.34);
  border-radius: 0.38rem;
  box-shadow:
    0 0.85rem 2rem rgba(0, 0, 0, 0.58),
    0 0 1.2rem rgba(0, 212, 255, 0.08);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  text-align: start;
  transform: translateX(-50%);
  transform-origin: bottom center;
  animation: gev-voice-card-in 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* The visible card must clear its neighbours' stacking contexts. */
#command-dock
  > #gev-voice-control:not([data-status='error']):has(
    .gev-voice-card:not([hidden])
  ) {
  z-index: 101;
}

#gev-voice-control .gev-voice-card[hidden],
#gev-voice-control .gev-voice-card [hidden],
#gev-voice-control[data-status='error'] .gev-voice-card {
  display: none;
}

/* The card takes the tray slot; the hover hint yields to it. */
#gev-voice-control:has(.gev-voice-card:not([hidden])) .gev-voice-help-tray {
  display: none;
}

@keyframes gev-voice-card-in {
  from {
    opacity: 0;
    transform: translate(-50%, 0.45rem);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.gev-voice-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gev-voice-card-kicker,
.gev-voice-card-phase,
.gev-voice-card-who,
.gev-voice-card-notes summary {
  font-family: var(--font-mono);
  font-size: 0.46rem;
  font-weight: 600;
  letter-spacing: 0.1rem;
}

.gev-voice-card-kicker {
  color: rgba(54, 220, 255, 0.72);
}

.gev-voice-card-phase {
  color: var(--text-dim);
}

.gev-voice-card[data-busy='true'] .gev-voice-card-phase {
  color: #ffc46b;
}

/* A UiCloseButton (close-button.css). */
.gev-voice-card-dismiss {
  margin-inline-start: auto;
  width: 1.1rem;
  height: 1.1rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(54, 220, 255, 0.24);
  border-radius: 0.2rem;
  font-size: 0.72rem;
  line-height: 1;
  transition:
    color var(--transition-fast),
    border-color var(--transition-fast);
}

.gev-voice-card-dismiss:hover,
.gev-voice-card-dismiss:focus-visible {
  color: var(--text-primary);
  border-color: rgba(54, 220, 255, 0.6);
}

.gev-voice-card-caption {
  display: flex;
  gap: 0.45rem;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  line-height: 1.38;
}

.gev-voice-card-who {
  flex: 0 0 1.7rem;
  padding-top: 0.14rem;
  color: var(--text-dim);
}

.gev-voice-card-caption[data-role='assistant'] .gev-voice-card-who {
  color: rgba(54, 220, 255, 0.72);
}

.gev-voice-card-caption[data-role='user'] .gev-voice-card-text {
  color: var(--text-secondary);
}

/* What "this" / "here" resolved to at the start of the turn. */
.gev-voice-card-pointer {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.03rem;
}

.gev-voice-card-pointer .gev-voice-card-who {
  color: rgba(54, 220, 255, 0.72);
}

.gev-voice-card-pointer-label {
  padding: 0.06rem 0.32rem;
  color: var(--text-primary);
  border: 1px solid rgba(54, 220, 255, 0.34);
  border-radius: 0.18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gev-voice-card-plan,
.gev-voice-card-lines,
.gev-voice-card-referents {
  margin: 0;
  padding: 0;
  list-style: none;
}

.gev-voice-card-plan {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  padding-top: 0.38rem;
  border-top: 1px solid var(--glass-border);
}

.gev-voice-card-step {
  display: grid;
  grid-template-columns: 0.9rem 1fr;
  column-gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  line-height: 1.4;
  letter-spacing: 0.02rem;
}

.gev-voice-card-step::before {
  content: '◻';
  color: var(--text-dim);
}

.gev-voice-card-step[data-status='running']::before {
  content: '◌';
  color: #ffc46b;
}

.gev-voice-card-step[data-status='done']::before {
  content: '✓';
  color: var(--accent);
}

.gev-voice-card-step[data-status='failed']::before,
.gev-voice-card-step[data-status='cancelled']::before {
  content: '✕';
  color: #ff8f9d;
}

.gev-voice-card-step-detail {
  grid-column: 2;
  color: var(--text-dim);
  font-size: 0.52rem;
}

.gev-voice-card-result {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-top: 0.42rem;
  border-top: 1px solid var(--glass-border);
}

.gev-voice-card-result-title {
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  overflow-wrap: break-word;
}

.gev-voice-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

/* A UiChip in the card's own type: the card's line height and weight, not
   the shared chip's (chip.css). */
.gev-voice-card-chip {
  padding: 0.08rem 0.3rem;
  color: var(--text-secondary);
  border: 1px solid rgba(54, 220, 255, 0.3);
  border-radius: 0.18rem;
  font: inherit;
  font-family: var(--font-mono);
  font-size: 0.44rem;
  letter-spacing: 0.06rem;
  text-transform: uppercase;
}

.gev-voice-card-chip:is(
  [data-tone='stale'],
  [data-tone='degraded'],
  [data-tone='fallback'],
  [data-tone='partial']
) {
  color: #ffc46b;
  border-color: rgba(255, 196, 107, 0.45);
}

.gev-voice-card-chip[data-tone='unavailable'] {
  color: #ff8f9d;
  border-color: rgba(255, 143, 157, 0.45);
}

.gev-voice-card-lines li,
.gev-voice-card-referents li {
  font-family: var(--font-sans);
  font-size: 0.66rem;
  line-height: 1.4;
  color: rgba(223, 245, 250, 0.82);
  /* A whole error line or a long headline wraps inside the card. */
  overflow-wrap: break-word;
}

.gev-voice-card-referents {
  counter-reset: gev-referent;
}

.gev-voice-card-referents li {
  counter-increment: gev-referent;
}

.gev-voice-card-referents li::before {
  content: counter(gev-referent);
  display: inline-block;
  min-width: 0.9rem;
  margin-inline-end: 0.3rem;
  color: rgba(54, 220, 255, 0.72);
  font-family: var(--font-mono);
  font-size: 0.52rem;
}

.gev-voice-card-notes summary {
  color: var(--text-dim);
  cursor: pointer;
}

.gev-voice-card-notes[open] summary {
  margin-bottom: 0.2rem;
}

.gev-voice-card-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Point-and-ask reticle: a fixed overlay at the pointed pixel. */
.gev-pointer-reticle {
  position: fixed;
  z-index: 6;
  width: 1.9rem;
  height: 1.9rem;
  margin: -0.95rem 0 0 -0.95rem;
  border: 1.5px solid rgba(120, 235, 255, 0.95);
  border-radius: 50%;
  box-shadow: 0 0 0.7rem rgba(0, 212, 255, 0.35);
  pointer-events: none;
  animation: gev-pointer-reticle-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gev-pointer-reticle::before,
.gev-pointer-reticle::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(54, 220, 255, 0.85);
  transform: translate(-50%, -50%);
}

.gev-pointer-reticle::before {
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
}

.gev-pointer-reticle::after {
  width: 2.6rem;
  height: 2.6rem;
  background: none;
  border: 1px dashed rgba(54, 220, 255, 0.35);
  border-radius: 50%;
}

.gev-pointer-reticle[data-target='ground'] {
  border-color: rgba(255, 196, 107, 0.85);
  box-shadow: 0 0 0.7rem rgba(255, 196, 107, 0.3);
}

.gev-pointer-reticle[data-target='ground']::before {
  background: rgba(255, 196, 107, 0.9);
}

.gev-pointer-reticle[hidden],
body.ui-clean-view .gev-pointer-reticle,
body.recording-mode .gev-pointer-reticle {
  display: none;
}

/* Scale only: a frame caught at the animation start still shows the mark. */
@keyframes gev-pointer-reticle-in {
  from {
    transform: scale(1.6);
  }
  to {
    transform: scale(1);
  }
}

@media (max-width: 900px) {
  #gev-voice-control .gev-voice-card {
    width: min(22rem, calc(100vw - 1.5rem));
  }
}

@media (prefers-reduced-motion: reduce) {
  #gev-voice-control .gev-voice-card,
  .gev-pointer-reticle {
    animation: none;
  }
}

/* Opt-in shared panel: header stays fixed while only the body scrolls. */
#gev-voice-control .gev-voice-panel {
  position: absolute;
  bottom: calc(100% + 0.7rem);
  left: 50%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  width: clamp(18rem, 26vw, 22rem);
  max-width: calc(100vw - 1.5rem);
  max-height: min(
    28rem,
    max(7.5rem, calc(100dvh - 12rem - var(--gev-provider-lift, 0px)))
  );
  box-sizing: border-box;
  padding: 0.6rem 0.7rem 0.65rem;
  color: rgba(223, 245, 250, 0.92);
  background: rgba(7, 22, 31, 0.96);
  border: 1px solid rgba(54, 220, 255, 0.34);
  border-radius: 0.6rem;
  box-shadow:
    0 0.85rem 2rem rgba(0, 0, 0, 0.58),
    0 0 1.2rem rgba(0, 212, 255, 0.08);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  color-scheme: dark;
  font: 0.75rem/1.45 var(--font-sans);
  text-align: start;
  transform: translateX(-50%);
}

#gev-voice-control .gev-voice-panel[hidden],
#gev-voice-control .gev-voice-panel [hidden] {
  display: none;
}
#gev-voice-control .gev-voice-panel-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0 0 0.5rem;
  border-bottom: 1px solid var(--glass-border);
}
.gev-voice-panel-title {
  color: var(--voice-panel-accent, var(--accent));
  font: 600 0.65rem/1 var(--font-mono);
  letter-spacing: 0.14em;
}
.gev-voice-panel-tabs {
  margin-inline-start: auto;
}
#gev-voice-control .gev-voice-panel-header .gev-voice-panel-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  padding: 0;
}
#gev-voice-control .gev-voice-panel-tab-icon {
  font-size: 18px;
}
.gev-voice-panel-header [role='tablist'] {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  min-width: 0;
}
#gev-voice-control
  .gev-voice-panel
  :is(.gev-voice-panel-header button, select, input[type='number']) {
  min-height: 2rem;
  box-sizing: border-box;
  color: var(--text-primary);
  /* background-color, so a .gev-field select keeps its chevron. */
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 0.3rem;
  font: inherit;
}
#gev-voice-control .gev-voice-panel .gev-voice-panel-header button {
  padding: 0 0.6rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  line-height: 1;
  cursor: pointer;
}
#gev-voice-control #gev-voice-settings-close {
  width: 2rem;
  padding: 0;
  font-size: 1rem;
}
#gev-voice-control .gev-voice-panel-header button:hover {
  color: var(--text-primary);
  border-color: var(--voice-panel-accent, var(--accent));
}
#gev-voice-control .gev-voice-panel [role='tab'][aria-selected='true'] {
  color: var(--voice-panel-accent, var(--accent));
  border-color: currentColor;
  box-shadow: 0 -2px 0 currentColor inset;
}
#gev-voice-control .gev-voice-panel [role='tab']:focus,
#gev-voice-control .gev-voice-panel :focus-visible {
  outline: 2px solid var(--voice-panel-accent, var(--accent));
  outline-offset: 2px;
}
.gev-voice-panel-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0.55rem 0.75rem 3px 3px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.gev-voice-panel-body .gev-voice-card-who {
  overflow-wrap: break-word;
}
.gev-voice-panel-body p {
  margin: 0;
}
.gev-voice-preference {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: var(--text-primary);
}
.gev-voice-preference-toggle {
  flex-direction: row-reverse;
  justify-content: space-between;
  min-height: 2.75rem;
  font-weight: 600;
  cursor: pointer;
}
.gev-voice-preference-toggle input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--voice-panel-accent, var(--accent));
}
.gev-voice-setting-title {
  margin-bottom: 0.4rem;
  font-weight: 600;
}
.gev-voice-timeout-group {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--glass-border);
}
.gev-voice-timeout-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
#gev-voice-timeout-select {
  flex: 1 1 auto;
  min-width: 0;
  padding-block: 0;
  padding-inline: 0.45rem 22px;
}
#gev-voice-timeout-input {
  flex: 0 0 4.5rem;
  width: 4.5rem;
  padding: 0 0.45rem;
  font-variant-numeric: tabular-nums;
}
.gev-voice-timeout-unit {
  order: 1;
  color: var(--text-dim);
  font-size: 0.63rem;
}
.gev-voice-timeout-controls:has(#gev-voice-timeout-input[hidden])
  .gev-voice-timeout-unit {
  display: none;
}
.gev-voice-settings-note {
  color: rgba(190, 221, 230, 0.72);
  font-size: 0.63rem;
  line-height: 1.45;
}
.gev-voice-settings-note:not(:empty) {
  margin-top: 0.25rem;
}
#gev-voice-control .gev-voice-panel .gev-voice-card {
  position: static;
  width: 100%;
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  animation: none;
}
#command-dock > #gev-voice-control:has(.gev-voice-panel:not([hidden])) {
  z-index: 101;
}
#gev-voice-control:has(.gev-voice-panel:not([hidden])) .gev-voice-help-tray {
  display: none;
}
#command-dock #gev-voice-control[data-provider-choice='true'] .gev-voice-panel {
  bottom: min(
    calc(100% + 4.8rem + var(--gev-provider-lift)),
    calc(100dvh - 7.75rem)
  );
}
@media (pointer: coarse) {
  #gev-voice-control
    .gev-voice-panel
    :is(
      .gev-voice-panel-header button,
      select,
      input[type='number'],
      .gev-voice-card-dismiss
    ) {
    min-height: 44px;
  }
  #gev-voice-control
    .gev-voice-panel
    :is(.gev-voice-panel-header button, .gev-voice-card-dismiss) {
    min-width: 44px;
  }
}

/* A connection error remains reachable even while the manual panel is open. */
#gev-voice-control:has(.gev-voice-panel) .gev-voice-error-tray {
  z-index: 12;
}
/* ── First-run mission launcher ───────────────────────────────────
   Compact and non-modal: it gives a new visitor a meaningful starting
   choice without blocking manual map interaction or spending API quota. */
#first-run-launcher {
  --first-run-step-offset: 1.5rem;
  position: fixed;
  z-index: 175;
  /* Spans the HUD's deco band: its top meets the HUD's top readouts
     (`top: max(14vh, 136px)` on the tactical HUD) and its bottom meets the
     bottom readouts. The sections scroll inside, so the heading, the
     checkbox, the main action and the status line stay reachable. */
  top: max(14vh, 136px);
  bottom: auto;
  max-height: calc(100vh - 4rem);
  max-height: calc(100dvh - 4rem);
  left: 50%;
  width: min(54vw, 52rem);
  min-width: min(40rem, calc(100vw - 2rem));
  display: flex;
  flex-direction: column;
  padding: 1.35rem 1.5rem 1.1rem;
  overflow: hidden;
  color: var(--text-primary);
  /* The same frosted glass as the side panels, so the card reads as part of
     the shell rather than a separate dialog. */
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--panel-radius);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  opacity: 0;
  transform: translate(-50%, 0.8rem) scale(0.985);
  transition:
    opacity 220ms ease,
    transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
  /* Inert until revealed AND again while fading out, so a click during the
     dismiss animation cannot launch a second mission behind the fade. */
  pointer-events: none;
}

/* An AUTHOR `display` on this id beats the UA's `[hidden] { display: none }` in
   the cascade, so the flex above would otherwise leave the card in the
   accessibility tree from page parse until it is revealed — or, on a share
   link, until it is removed. Restore the attribute's meaning explicitly. */
#first-run-launcher[hidden] {
  display: none;
}

#first-run-launcher.visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
  pointer-events: auto;
}

/* A light tint over the globe behind the card, with no blur, so the globe
   stays sharp. Decorative and click-through: the card stays non-modal, so
   the map underneath still works. */
.first-run-backdrop {
  position: fixed;
  z-index: 174;
  inset: 0;
  background: rgba(3, 8, 14, 0.28);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.first-run-backdrop.visible {
  opacity: 1;
}

.first-run-scanline {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(48, 194, 224, 0.8),
    transparent
  );
  box-shadow: 0 0 1rem rgba(48, 194, 224, 0.45);
  pointer-events: none;
}

.first-run-header,
.first-run-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(171, 210, 220, 0.6);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
}

.first-run-kicker {
  color: rgba(48, 194, 224, 0.86);
}

#first-run-launcher h2 {
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.045rem;
}

#first-run-description {
  max-width: 29rem;
  margin-top: 0.3rem;
  color: rgba(215, 231, 235, 0.66);
  font-size: 0.78rem;
  line-height: 1.5;
}

.first-run-choices {
  display: grid;
  gap: 1rem;
  margin-top: 1.1rem;
  padding-inline-end: 0.2rem;
  /* The one part of the card allowed to scroll when the viewport is too short.
     min-height:0 is what actually lets this flex child shrink below its content. */
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  /* A visible, non-overlaying affordance that the list continues; the
     scrollbar itself is the kit's .ui-scroll. */
  scrollbar-gutter: stable;
}

.first-run-section {
  display: grid;
  gap: 0.5rem;
}

/* A numbered rule: label, then a hairline to the edge. */
.first-run-section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  color: rgba(171, 210, 220, 0.6);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.14rem;
  text-transform: uppercase;
}

.first-run-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(100, 200, 220, 0.16);
}

.first-run-tag {
  padding: 0.08rem 0.4rem;
  color: rgba(48, 194, 224, 0.86);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  border: 1px solid rgba(48, 194, 224, 0.38);
  border-radius: 999px;
  white-space: nowrap;
}

.first-run-tag--soon {
  color: rgba(199, 225, 231, 0.55);
  border-color: rgba(199, 225, 231, 0.22);
}

/* Shared tile surface: modes, tiers, missions and link cards. */
.first-run-mode,
.first-run-missions button,
.first-run-link-card {
  color: rgba(225, 244, 248, 0.92);
  background: rgba(29, 69, 81, 0.18);
  border: 1px solid rgba(100, 200, 220, 0.18);
  border-radius: 0.5rem;
}

/* ── 1 · Mode ── */
.first-run-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.first-run-mode {
  position: relative;
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.85rem;
  padding: 0.7rem 2.2rem 0.7rem 0.7rem;
}

.first-run-mode[data-first-run-mode='god'] {
  background: rgba(25, 151, 178, 0.14);
  border-color: rgba(48, 194, 224, 0.62);
  box-shadow: 0 0 1.4rem rgba(0, 212, 255, 0.08);
}

.first-run-mode[data-first-run-mode='analyst'] {
  opacity: 0.55;
}

.first-run-radio {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 0.85rem;
  height: 0.85rem;
  border: 1px solid rgba(199, 225, 231, 0.45);
  border-radius: 50%;
}

.first-run-mode[data-first-run-mode='god'] .first-run-radio {
  border-color: #30c2e0;
  box-shadow: inset 0 0 0 0.2rem rgba(7, 17, 25, 0.96);
  background: #30c2e0;
}

.first-run-mode-body,
.first-run-link-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.first-run-mode-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
}

.first-run-mode-title strong,
.first-run-link-body strong,
.first-run-missions strong {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04rem;
}

.first-run-mode-copy {
  margin: 0;
  color: rgba(215, 231, 235, 0.66);
  font-size: 0.68rem;
  line-height: 1.45;
}

.first-run-mode-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(199, 225, 231, 0.6);
  font-size: 0.6rem;
}

.first-run-mode-points li::before {
  content: '\2022\00a0';
  color: rgba(48, 194, 224, 0.7);
}

/* Drawn previews, so the card needs no image assets. */
.first-run-preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 5rem;
  overflow: hidden;
  border: 1px solid rgba(100, 200, 220, 0.16);
  border-radius: 0.35rem;
}

.first-run-preview--god {
  background:
    repeating-linear-gradient(
      0deg,
      rgba(48, 194, 224, 0.05) 0 1px,
      transparent 1px 7px
    ),
    #050d14;
}

.first-run-preview--god i {
  width: 3.4rem;
  height: 3.4rem;
  border: 1px solid rgba(48, 194, 224, 0.75);
  border-radius: 50%;
}

.first-run-preview--analyst {
  background:
    linear-gradient(rgba(199, 225, 231, 0.08), rgba(199, 225, 231, 0.08)) 0.6rem
      0.7rem / 55% 0.3rem no-repeat,
    linear-gradient(rgba(199, 225, 231, 0.06), rgba(199, 225, 231, 0.06)) 0.6rem
      1.3rem / 40% 0.3rem no-repeat,
    #0b141c;
}

.first-run-preview--analyst i {
  position: absolute;
  inset: auto 0.6rem 0.6rem;
  height: 1.8rem;
  background: linear-gradient(
    90deg,
    rgba(199, 225, 231, 0.12) 0 18%,
    transparent 18% 22%,
    rgba(199, 225, 231, 0.2) 22% 48%,
    transparent 48% 52%,
    rgba(199, 225, 231, 0.1) 52% 100%
  );
  border-radius: 0.2rem;
}

.first-run-preview--stories {
  width: 4.2rem;
  min-height: 4.2rem;
  color: rgba(48, 194, 224, 0.8);
  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(48, 194, 224, 0.18),
      transparent 60%
    ),
    #071520;
}

/* ── 2 · Performance (a preview: no setting yet) ── */

.first-run-missions small,
.first-run-link-body small {
  color: rgba(198, 220, 226, 0.55);
  font-size: 0.62rem;
}

/* ── Start with: where ENTER GOD MODE begins ── */
.first-run-missions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.first-run-missions button {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  align-items: start;
  gap: 0.45rem;
  width: 100%;
  min-height: 0;
  padding: 0.45rem 0.55rem;
  text-align: start;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast);
}

.first-run-missions button > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.first-run-missions strong {
  font-size: 0.6rem;
  letter-spacing: 0.07rem;
}

.first-run-missions small {
  font-size: 0.56rem;
  line-height: 1.3;
}

.first-run-missions button > .material-symbols-outlined:first-child {
  color: rgba(85, 223, 245, 0.75);
  font-size: 1rem;
}

/* The selected start: what ENTER GOD MODE will run. */
.first-run-missions button[aria-pressed='true'] {
  background: rgba(25, 151, 178, 0.18);
  border-color: rgba(48, 194, 224, 0.75);
  box-shadow: inset 0 0 0 1px rgba(48, 194, 224, 0.35);
}

.first-run-missions
  button[aria-pressed='true']
  > .material-symbols-outlined:first-child {
  color: #4bc4d8;
}

.first-run-missions button:hover,
.first-run-missions button:focus-visible,
a.first-run-link-card:hover,
a.first-run-link-card:focus-visible {
  background: rgba(25, 151, 178, 0.16);
  border-color: rgba(48, 194, 224, 0.62);
  outline: none;
}

/* aria-disabled, not :disabled — the JS keeps the buttons focusable while a
   mission runs so the keyboard is never dumped out of the launcher mid-flight. */
.first-run-missions button[aria-disabled='true'],
.first-run-enter[aria-disabled='true'] {
  cursor: wait;
  opacity: 0.48;
  pointer-events: none;
}

/* ── Link cards: Stories, source, more ── */
.first-run-link-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.7rem;
  text-decoration: none;
}

.first-run-link-body {
  flex: 1;
}

.first-run-stories {
  padding: 0.7rem;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(48, 194, 224, 0.035) 0 0.5rem,
      transparent 0.5rem 1rem
    ),
    rgba(29, 69, 81, 0.18);
  border-color: rgba(48, 194, 224, 0.34);
}

.first-run-link-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.first-run-link-card--quiet {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.02);
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast);
}

.first-run-link-badge {
  display: grid;
  flex: none;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: rgba(48, 194, 224, 0.85);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  border: 1px solid rgba(100, 200, 220, 0.25);
  border-radius: 0.35rem;
}

.first-run-link-badge.material-symbols-outlined {
  font-size: 1.05rem;
}

.first-run-link-button {
  flex: none;
  padding: 0.42rem 0.7rem;
  color: rgba(225, 244, 248, 0.92);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1rem;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid rgba(48, 194, 224, 0.5);
  border-radius: 0.35rem;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast);
}

.first-run-link-button:not([aria-disabled='true']):hover,
.first-run-link-button:focus-visible {
  background: rgba(25, 151, 178, 0.2);
  border-color: #30c2e0;
  outline: none;
}

.first-run-link-button[aria-disabled='true'] {
  color: rgba(199, 225, 231, 0.5);
  border-color: rgba(199, 225, 231, 0.2);
  cursor: default;
}

/* ── The main action ── */
.first-run-enter {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.62rem 1rem;
  color: #031018;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12rem;
  text-transform: none;
  background: #30c2e0;
  border: 1px solid #30c2e0;
  border-radius: 0.4rem;
  box-shadow: 0 0 1.4rem rgba(48, 194, 224, 0.25);
  cursor: pointer;
  transition:
    background var(--transition-fast),
    box-shadow var(--transition-fast);
}

.first-run-enter .material-symbols-outlined {
  font-size: 1rem;
}

.first-run-enter:hover,
.first-run-enter:focus-visible {
  background: #6bcde0;
  box-shadow: 0 0 1.8rem rgba(48, 194, 224, 0.45);
  outline: 2px solid rgba(48, 194, 224, 0.5);
  outline-offset: 2px;
}

/* ── Compact rows: everything below the mode choice stays short, so the card
   fits its band without scrolling. ── */

/* Start with: chips. The description stays in the accessible name. */
.first-run-missions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.first-run-missions button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: auto;
  padding: 0.32rem 0.75rem 0.32rem 0.55rem;
  border-radius: 999px;
}

.first-run-missions button > span:nth-child(2) {
  display: inline;
}

.first-run-missions small {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.first-run-missions strong {
  font-size: 0.58rem;
  white-space: nowrap;
}

.first-run-missions button > .material-symbols-outlined:first-child {
  font-size: 0.95rem;
}

/* Tiers: one line each. */

/* Link cards: one line of copy, smaller badges. */
.first-run-section {
  gap: 0.4rem;
}

.first-run-choices {
  gap: 0.75rem;
}

.first-run-link-card,
.first-run-stories {
  gap: 0.6rem;
  padding: 0.42rem 0.6rem;
}

.first-run-link-body {
  gap: 0.1rem;
}

.first-run-link-body strong,
.first-run-link-body .first-run-mode-title strong {
  font-size: 0.7rem;
}

.first-run-link-body .first-run-mode-copy,
.first-run-link-body small {
  overflow: hidden;
  font-size: 0.6rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.first-run-link-badge {
  width: 1.6rem;
  height: 1.6rem;
}

.first-run-preview--stories {
  width: 2.6rem;
  min-height: 2.6rem;
}

.first-run-link-button {
  padding: 0.3rem 0.6rem;
}

/* More from Halfpixel: one-line link chips. */
.first-run-link-card--quiet {
  padding: 0.28rem 0.6rem 0.28rem 0.4rem;
  border-radius: 999px;
}

.first-run-link-card--quiet small {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.first-run-link-card--quiet .first-run-link-badge {
  width: 1.3rem;
  height: 1.3rem;
  font-size: 0.5rem;
  border-radius: 50%;
}

.first-run-link-card--quiet .first-run-link-body strong {
  font-size: 0.64rem;
}

/* Tighter rhythm between sections and in the heading. */
.first-run-choices {
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.first-run-section {
  gap: 0.32rem;
}

.first-run-preview--stories {
  width: 2.1rem;
  min-height: 2.1rem;
}

.first-run-stories .first-run-preview--stories .material-symbols-outlined {
  font-size: 1.1rem;
}

#first-run-launcher h2 {
  margin-top: 0.35rem;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
}

#first-run-description {
  margin-top: 0.2rem;
  max-width: 40rem;
}

/* Final trims so the band fits on a 900px-tall window. */
.first-run-link-card,
.first-run-stories {
  padding-block: 0.32rem;
}

.first-run-link-badge {
  width: 1.45rem;
  height: 1.45rem;
}

.first-run-preview--stories {
  width: 1.9rem;
  min-height: 1.9rem;
}

/* More from Halfpixel: a wrapping row of link chips. */
.first-run-link-row--chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.first-run-link-row--chips .first-run-link-card {
  flex: 0 0 auto;
}

/* The sections take the card's spare height, so the footer sits on its
   bottom edge. */
.first-run-choices {
  flex: 1 1 auto;
}

/* Start with: taller chips. */
.first-run-missions button {
  gap: 0.5rem;
  padding: 0.55rem 1rem 0.55rem 0.75rem;
}

.first-run-missions strong {
  font-size: 0.64rem;
}

.first-run-missions button > .material-symbols-outlined:first-child {
  font-size: 1.1rem;
}

/* A near-square card: as wide as the HUD band is tall, but never so narrow
   that the start chips wrap. Sections may shrink below their content, so
   long copy truncates instead of clipping. */
.first-run-choices,
.first-run-section {
  grid-template-columns: minmax(0, 1fr);
}

#first-run-launcher {
  width: min(
    52rem,
    calc(100vw - 2rem),
    max(44rem, calc(100vh - max(14vh, 136px) - max(13.5vh, 7.5rem)))
  );
  min-width: 0;
}

.first-run-preview--god i {
  display: grid;
  place-items: center;
}

.first-run-globe {
  width: 82%;
  height: 82%;
  color: rgba(48, 194, 224, 0.55);
}

/* The globe's meridians are full circles squeezed sideways; a squeeze that
   cycles reads as the globe turning. Still until God mode is selected. */
.first-run-meridians ellipse {
  transform: scaleX(var(--m));
  transform-box: fill-box;
  transform-origin: center;
  vector-effect: non-scaling-stroke;
}

.first-run-mode[data-first-run-mode='god'] .first-run-meridians ellipse {
  animation: first-run-globe-turn 6s linear infinite;
}

.first-run-mode[data-first-run-mode='god']
  .first-run-meridians
  ellipse:nth-child(2) {
  animation-delay: -1.5s;
}

.first-run-mode[data-first-run-mode='god']
  .first-run-meridians
  ellipse:nth-child(3) {
  animation-delay: -3s;
}

.first-run-mode[data-first-run-mode='god']
  .first-run-meridians
  ellipse:nth-child(4) {
  animation-delay: -4.5s;
}

/* One meridian's width over half a turn: |cos| sampled. */
@keyframes first-run-globe-turn {
  0% {
    transform: scaleX(1);
  }
  12.5% {
    transform: scaleX(0.92);
  }
  25% {
    transform: scaleX(0.71);
  }
  37.5% {
    transform: scaleX(0.38);
  }
  50% {
    transform: scaleX(0);
  }
  62.5% {
    transform: scaleX(0.38);
  }
  75% {
    transform: scaleX(0.71);
  }
  87.5% {
    transform: scaleX(0.92);
  }
  100% {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .first-run-mode[data-first-run-mode='god'] .first-run-meridians ellipse {
    animation: none;
  }
}

/* HUD callouts over the God preview: brackets, an orbit, and two target
   blips whose leader lines draw out to a label stub, taking turns. They play
   only while God mode is selected. */
.first-run-callouts {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: rgba(48, 194, 224, 0.6);
  pointer-events: none;
}

.first-run-brackets {
  opacity: 0.45;
}

.first-run-orbit {
  opacity: 0.35;
  stroke-dasharray: 2 5;
  transform-box: fill-box;
  transform-origin: center;
}

.first-run-blip {
  fill: currentColor;
  stroke: none;
}

.first-run-ping {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.first-run-leader {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.first-run-label {
  opacity: 0;
  stroke-width: 1.4;
}

.first-run-callout {
  opacity: 0;
}

.first-run-mode[data-first-run-mode='god'] .first-run-orbit {
  animation: first-run-orbit-turn 24s linear infinite;
}

.first-run-mode[data-first-run-mode='god'] .first-run-callout {
  animation: first-run-callout-show 6s ease-in-out infinite;
}

.first-run-mode[data-first-run-mode='god']
  .first-run-callout
  .first-run-leader {
  animation: first-run-leader-draw 6s ease-out infinite;
}

.first-run-mode[data-first-run-mode='god'] .first-run-callout .first-run-label {
  animation: first-run-label-show 6s ease-out infinite;
}

.first-run-mode[data-first-run-mode='god'] .first-run-callout .first-run-ping {
  animation: first-run-ping 6s ease-out infinite;
}

.first-run-mode[data-first-run-mode='god'] .first-run-callout--b,
.first-run-mode[data-first-run-mode='god'] .first-run-callout--b * {
  animation-delay: -3s;
}

@keyframes first-run-orbit-turn {
  to {
    transform: rotate(360deg);
  }
}

@keyframes first-run-callout-show {
  0%,
  45%,
  100% {
    opacity: 0;
  }
  5%,
  40% {
    opacity: 1;
  }
}

@keyframes first-run-leader-draw {
  0%,
  5% {
    stroke-dashoffset: 1;
  }
  18%,
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes first-run-label-show {
  0%,
  18% {
    opacity: 0;
  }
  24%,
  100% {
    opacity: 1;
  }
}

@keyframes first-run-ping {
  0%,
  5% {
    opacity: 0.9;
    transform: scale(1);
  }
  25%,
  100% {
    opacity: 0;
    transform: scale(4);
  }
}

/* Reduced motion: the callouts stand still, fully drawn. The parts are
   named as specifically as their animation rules above, or those would win. */
@media (prefers-reduced-motion: reduce) {
  .first-run-mode[data-first-run-mode='god'] .first-run-orbit,
  .first-run-mode[data-first-run-mode='god'] .first-run-callout,
  .first-run-mode[data-first-run-mode='god'] .first-run-callout *,
  .first-run-mode[data-first-run-mode='god']
    .first-run-callout
    :is(.first-run-leader, .first-run-label, .first-run-ping) {
    animation: none;
  }
  .first-run-mode[data-first-run-mode='god']
    .first-run-callout
    .first-run-ping {
    opacity: 0;
  }
  .first-run-mode[data-first-run-mode='god'] .first-run-callout,
  .first-run-mode[data-first-run-mode='god'] .first-run-label {
    opacity: 1;
  }
  .first-run-mode[data-first-run-mode='god'] .first-run-leader {
    stroke-dashoffset: 0;
  }
}

/* Callout tooltips: on hover or keyboard focus a leader line grows up from
   the control, then a HUD label opens out of it. The text describes a chip
   that shows only its name; it is visual only (see ::after), so the chip's
   accessible name stays its visible name. */
#first-run-launcher [data-callout] {
  position: relative;
}

#first-run-launcher [data-callout]::before,
#first-run-launcher [data-callout]::after {
  position: absolute;
  z-index: 3;
  pointer-events: none;
}

#first-run-launcher [data-callout]::before {
  content: '';
  bottom: 100%;
  inset-inline-start: 1.1rem;
  width: 1px;
  height: 0.7rem;
  background: rgba(48, 194, 224, 0.8);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 140ms ease-out;
}

#first-run-launcher [data-callout]::after {
  /* Visual only: the empty alternative keeps the callout out of the link's
     accessible name. Browsers without alt text for generated content drop the
     second declaration and fall back to the first. */
  content: attr(data-callout);
  content: attr(data-callout) / '';
  bottom: calc(100% + 0.7rem);
  inset-inline-start: 0.5rem;
  padding: 0.28rem 0.5rem;
  color: rgba(225, 244, 248, 0.95);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 400;
  letter-spacing: 0.04rem;
  text-transform: none;
  /* Long descriptions wrap rather than run past the card on a narrow window. */
  width: max-content;
  max-width: min(15rem, var(--first-run-callout-max, 15rem));
  box-sizing: border-box;
  white-space: normal;
  background: rgba(5, 14, 20, 0.94);
  border: 1px solid rgba(48, 194, 224, 0.5);
  border-radius: 3px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  transition:
    clip-path 200ms 120ms ease-out,
    opacity 80ms 120ms linear;
}

#first-run-launcher [data-callout]:hover::before,
#first-run-launcher [data-callout]:focus-visible::before {
  transform: scaleY(1);
}

/* A chip near the far edge opens its callout toward the card instead, so the
   label is not cut off by the scrolling list (WelcomeView sets the flag). */
#first-run-launcher [data-callout][data-callout-align='end']::before {
  inset-inline-start: auto;
  inset-inline-end: 1.1rem;
}

#first-run-launcher [data-callout][data-callout-align='end']::after {
  inset-inline-start: auto;
  inset-inline-end: 0.5rem;
}

#first-run-launcher [data-callout]:hover::after,
#first-run-launcher [data-callout]:focus-visible::after {
  opacity: 1;
  clip-path: inset(0);
}

@media (prefers-reduced-motion: reduce) {
  #first-run-launcher [data-callout]::before,
  #first-run-launcher [data-callout]::after {
    transition: none;
  }
}

/* No hover on touch screens: the callouts would only flash on tap. */
@media (hover: none) {
  #first-run-launcher [data-callout]::before,
  #first-run-launcher [data-callout]::after {
    display: none;
  }
}

/* Selection reads in orange: the chosen mode and the chosen start. */
.first-run-mode[data-first-run-mode='god'],
.first-run-missions button[aria-pressed='true'] {
  border-color: rgba(255, 159, 67, 0.85);
  box-shadow: inset 0 0 0 1px rgba(255, 159, 67, 0.3);
}

.first-run-mode[data-first-run-mode='god'] .first-run-radio {
  border-color: #ff9f43;
  background: #ff9f43;
}

/* A mini timeline under the globe: the playhead sweeps the track and the
   played part lights up behind it. Paused partway while not selected. */
.first-run-time-track,
.first-run-time-ticks {
  opacity: 0.35;
}

.first-run-time-played {
  stroke-width: 1.4;
  transform: scaleX(0.4);
  transform-box: fill-box;
  transform-origin: left center;
}

.first-run-time-head {
  transform: translateX(27.2px);
}

.first-run-time-head path {
  fill: currentColor;
  stroke: none;
}

.first-run-mode[data-first-run-mode='god'] .first-run-time-played {
  animation: first-run-time-played 8s linear infinite;
}

.first-run-mode[data-first-run-mode='god'] .first-run-time-head {
  animation: first-run-time-head 8s linear infinite;
}

@keyframes first-run-time-played {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes first-run-time-head {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(68px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .first-run-mode[data-first-run-mode='god'] .first-run-time-played,
  .first-run-mode[data-first-run-mode='god'] .first-run-time-head {
    animation: none;
  }
}

/* The accent rests dimmed and lights up to full cyan on hover or focus. */
.first-run-missions button:hover,
.first-run-missions button:focus-visible,
a.first-run-link-card:hover,
a.first-run-link-card:focus-visible {
  border-color: rgba(54, 220, 255, 0.62);
}

.first-run-missions button:hover > .material-symbols-outlined:first-child,
.first-run-missions
  button:focus-visible
  > .material-symbols-outlined:first-child,
a.first-run-link-card:hover .first-run-link-badge,
a.first-run-link-card:focus-visible .first-run-link-badge {
  color: #55dff5;
}

.first-run-link-button:not([aria-disabled='true']):hover,
.first-run-link-button:focus-visible {
  color: #e1f4f8;
  border-color: #36dcff;
}

.first-run-enter:hover,
.first-run-enter:focus-visible {
  background: #36dcff;
  border-color: #36dcff;
  box-shadow: 0 0 1.4rem rgba(54, 220, 255, 0.35);
  outline-color: rgba(54, 220, 255, 0.5);
}

#first-run-launcher [data-callout]:hover::before,
#first-run-launcher [data-callout]:focus-visible::before {
  background: rgba(54, 220, 255, 0.85);
}

#first-run-launcher [data-callout]:hover::after,
#first-run-launcher [data-callout]:focus-visible::after {
  border-color: rgba(54, 220, 255, 0.55);
}

/* A selected chip keeps its orange border on hover. */
.first-run-missions button[aria-pressed='true']:hover,
.first-run-missions button[aria-pressed='true']:focus-visible {
  border-color: rgba(255, 159, 67, 0.85);
}

/* ── Steps ── */
.first-run-header {
  position: relative;
}

.first-run-dots {
  position: absolute;
  left: 50%;
  display: flex;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  transform: translateX(-50%);
}

/* The dots sit centred over the row, outside its flow, so the kicker and
   Skip each keep to their own half: a long locale wraps instead of running
   under the dots. (At 620px and below the dots join the flow.) */
@media (min-width: 621px) {
  .first-run-kicker,
  .first-run-dismiss {
    max-width: calc(50% - 2.4rem);
  }
}

.first-run-dots li {
  width: 0.45rem;
  height: 0.45rem;
  background: rgba(199, 225, 231, 0.18);
  border-radius: 999px;
  transition:
    width 220ms ease,
    background 220ms ease;
}

.first-run-dots li.done {
  background: rgba(48, 194, 224, 0.45);
}

.first-run-dots li.on {
  width: 1.4rem;
  background: #30c2e0;
}

.first-run-step {
  display: grid;
  gap: 0.9rem;
  align-content: start;
}

/* Steps slide sideways: forward to the left, back to the right. */
.first-run-step-forward-enter-active,
.first-run-step-forward-leave-active,
.first-run-step-back-enter-active,
.first-run-step-back-leave-active {
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.first-run-step-forward-enter-from,
.first-run-step-back-leave-to {
  opacity: 0;
  transform: translateX(var(--first-run-step-offset));
}

.first-run-step-forward-leave-to,
.first-run-step-back-enter-from {
  opacity: 0;
  transform: translateX(calc(-1 * var(--first-run-step-offset)));
}

@media (prefers-reduced-motion: reduce) {
  .first-run-step-forward-enter-from,
  .first-run-step-forward-leave-to,
  .first-run-step-back-enter-from,
  .first-run-step-back-leave-to {
    transform: none;
  }
}

/* Step 1: the mode tiles get the room the other sections used to take. */
.first-run-step .first-run-modes .first-run-mode {
  grid-template-columns: 9.5rem 1fr;
  padding-block: 0.9rem;
}

.first-run-step .first-run-preview--god,
.first-run-step .first-run-preview--analyst {
  min-height: 9rem;
}

.first-run-step .first-run-mode-copy {
  font-size: 0.74rem;
}

/* Step 2: the start options as tiles, descriptions shown. */
.first-run-missions--tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.first-run-missions--tiles button {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  align-items: start;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  border-radius: 0.5rem;
}

.first-run-missions--tiles button:last-child:nth-child(odd) {
  /* An odd last tile takes the whole row, so three tiles read as a balanced
     pair plus the default, not as a gap. One column on a phone already. */
  grid-column: 1 / -1;
}

.first-run-missions--tiles button > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.first-run-missions--tiles strong {
  font-size: 0.72rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.first-run-missions--tiles small {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
  white-space: normal;
  font-size: 0.66rem;
  line-height: 1.4;
}

.first-run-missions--tiles button > .material-symbols-outlined:first-child {
  font-size: 1.35rem;
}

/* Step 3: three tips, each with a small looping sketch. */
.first-run-tips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.first-run-tip {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem;
  background: rgba(29, 69, 81, 0.18);
  border: 1px solid rgba(100, 200, 220, 0.18);
  border-radius: 0.5rem;
}

.first-run-tip strong {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05rem;
}

.first-run-tip small {
  color: rgba(198, 220, 226, 0.6);
  font-size: 0.64rem;
  line-height: 1.4;
}

.first-run-tip-art {
  position: relative;
  display: grid;
  place-items: center;
  height: 3.2rem;
  margin-bottom: 0.2rem;
  color: rgba(48, 194, 224, 0.85);
  background: #050d14;
  border: 1px solid rgba(100, 200, 220, 0.14);
  border-radius: 0.35rem;
}

.first-run-tip-art .material-symbols-outlined {
  font-size: 1.4rem;
}

/* Search: a caret blinks after the glass. */
.first-run-tip-caret {
  position: absolute;
  left: calc(50% + 1rem);
  width: 1px;
  height: 0.9rem;
  background: currentColor;
  animation: first-run-caret 1s steps(1) infinite;
}

/* Layers: a dot switches on and off beside the stack. */
.first-run-tip-dot {
  position: absolute;
  left: calc(50% + 1rem);
  top: calc(50% - 0.6rem);
  width: 0.4rem;
  height: 0.4rem;
  background: #ff9f43;
  border-radius: 50%;
  animation: first-run-dot 2.4s ease-in-out infinite;
}

/* Click: a ring ripples out from the target. */
.first-run-tip-ring {
  position: absolute;
  width: 1.2rem;
  height: 1.2rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  animation: first-run-ring 1.8s ease-out infinite;
}

@keyframes first-run-caret {
  50% {
    opacity: 0;
  }
}

@keyframes first-run-dot {
  0%,
  40% {
    opacity: 0.15;
    transform: scale(0.7);
  }
  50%,
  90% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes first-run-ring {
  from {
    opacity: 0.9;
    transform: scale(0.6);
  }
  to {
    opacity: 0;
    transform: scale(2.4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .first-run-tip-caret,
  .first-run-tip-dot,
  .first-run-tip-ring {
    animation: none;
  }
}

/* Footer: Back sits before the main action. */
.first-run-back {
  padding: 0.5rem 0.9rem;
  color: rgba(199, 225, 231, 0.75);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12rem;
  background: none;
  border: 1px solid rgba(199, 225, 231, 0.2);
  border-radius: 0.4rem;
  cursor: pointer;
}

.first-run-back:hover,
.first-run-back:focus-visible {
  color: #e1f4f8;
  border-color: rgba(54, 220, 255, 0.6);
}

/* Each step is short, so the card fits its content: its top stays on the
   HUD band, and it may grow at most to the band's bottom. */
#first-run-launcher {
  bottom: auto;
  max-height: calc(100vh - max(14vh, 136px) - max(13.5vh, 7.5rem));
  max-height: calc(100dvh - max(14vh, 136px) - max(13.5vh, 7.5rem));
}

.first-run-choices {
  flex: 0 1 auto;
}

.first-run-step .first-run-modes .first-run-mode {
  grid-template-columns: 8rem 1fr;
}

.first-run-mode-title {
  flex-wrap: wrap;
  row-gap: 0.25rem;
}

/* One footer row: checkbox, status line, main action. */
.first-run-footer .first-run-note {
  flex: 1;
  min-width: 0;
  min-height: 0;
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.56rem;
  line-height: 1.35;
  text-align: center;
  text-transform: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.first-run-footer .first-run-enter {
  padding: 0.5rem 0.9rem;
}

.first-run-footer {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(100, 200, 220, 0.14);
  font-size: 0.48rem;
  letter-spacing: 0.055rem;
}

.first-run-dismiss {
  position: relative;
  padding: 0;
  padding-inline-start: 0.75rem;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

/* A 44px touch target drawn outside the layout, so the header row keeps the
   height of its one line of text; a 44px button box would nearly treble it. */
.first-run-dismiss::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 44px;
  transform: translateY(-50%);
}

.first-run-dismiss:hover,
.first-run-dismiss:focus-visible {
  color: rgba(48, 194, 224, 0.86);
}

.first-run-dismiss-touch {
  display: none;
}

/* No hover and a coarse pointer: a phone or tablet, where ESC means nothing. */
@media (hover: none) and (pointer: coarse) {
  .first-run-dismiss-key {
    display: none;
  }
  .first-run-dismiss-touch {
    display: inline;
  }
}

.first-run-suppress {
  gap: 0.4rem;
  color: rgba(199, 225, 231, 0.66);
  text-transform: none;
  font-size: 0.62rem;
  letter-spacing: 0.02rem;
  cursor: pointer;
}

.first-run-suppress input {
  width: 0.82rem;
  height: 0.82rem;
  margin: 0;
  accent-color: #30c2e0;
  cursor: pointer;
}

.first-run-suppress:hover {
  color: rgba(225, 244, 248, 0.92);
}

/* The live region carries mission progress and failures, so it owns a full row
   and reserves its height — otherwise the card resizes as it speaks. */
.first-run-note {
  min-height: 1.1rem;
  margin-top: 0.35rem;
  color: rgba(199, 225, 231, 0.62);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  line-height: 1.35;
}

#first-run-launcher[data-state='loading'] .first-run-note {
  color: rgba(48, 194, 224, 0.85);
}

/* Every surface that claims the screen hides the launcher. This list is the CSS
   half of the ESC arbitration: src/firstRunExperience.js watches these same
   classes and makes the launcher step aside, so a hidden card is never left
   holding a keyboard handler. Keep the two lists in step —
   EXCLUSIVE_SURFACE_CLASSES pins them together. */
body.ui-clean-view #first-run-launcher,
body.recording-mode #first-run-launcher,
body.cockpit-mode #first-run-launcher,
body.scene-playback-mode #first-run-launcher {
  display: none;
}

body.ui-clean-view .first-run-backdrop,
body.recording-mode .first-run-backdrop,
body.cockpit-mode .first-run-backdrop,
body.scene-playback-mode .first-run-backdrop {
  display: none;
}

@media (max-width: 620px) {
  #first-run-launcher {
    top: auto;
    bottom: 5.8rem;
    width: calc(100vw - 2rem);
    min-width: 0;
    /* Sits above the dock, so it may only use the height above it. */
    max-height: calc(100vh - 6.55rem);
    max-height: calc(100dvh - 6.55rem);
    padding: 0.9rem;
    transform: translate(-50%, 0.8rem) scale(0.985);
  }

  #first-run-launcher.visible {
    transform: translate(-50%, 0) scale(1);
  }
  /* The card has to clear the dock on a 375 x 812 phone, so the sections
     stack into one column and scroll. The dismiss button stays: it is the only
     way to close the card without choosing on a phone, which has no ESC key. */
  #first-run-launcher h2 {
    margin-top: 0.45rem;
  }
  #first-run-description {
    margin-top: 0.25rem;
    font-size: 0.72rem;
  }
  .first-run-choices {
    margin-top: 0.75rem;
  }
  .first-run-modes,
  .first-run-link-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .first-run-missions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* A phone has no room for drawn previews: the choices that work come
     first. */
  .first-run-mode {
    grid-template-columns: minmax(0, 1fr);
  }
  .first-run-preview {
    display: none;
  }
  .first-run-footer {
    flex-wrap: wrap;
  }
  .first-run-enter {
    flex: 1 0 100%;
    justify-content: center;
    white-space: nowrap;
  }
  /* A status line (a mission that could not open) takes its own row above
     the buttons instead of a sliver beside the checkbox and BACK. */
  .first-run-footer .first-run-note:not(:empty) {
    flex: 1 0 100%;
    order: -1;
  }
}

/* Short viewports — landscape phones, small laptop windows. The chrome tightens
   so the sections keep a usable share of the height. The intro line STAYS: it
   is the only copy that says what this thing is. */
@media (max-height: 620px) {
  /* The height cap and bottom edge come from the shell rules at the end of
     this file; the tighter padding (and the mobile shell's top) stay here. */
  #first-run-launcher {
    top: 0.75rem;
    padding: 0.75rem 0.85rem;
  }
  /* As on a phone: no drawn previews, so the choices that work stay within
     reach. */
  .first-run-mode {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 0.5rem;
  }
  .first-run-mode-points {
    display: none;
  }
  .first-run-preview {
    display: none;
  }
  #first-run-launcher h2 {
    margin-top: 0.3rem;
    font-size: 1.1rem;
  }
  #first-run-description {
    margin-top: 0.2rem;
    font-size: 0.7rem;
    line-height: 1.4;
  }
  .first-run-choices {
    margin-top: 0.55rem;
    gap: 0.7rem;
  }
  .first-run-missions button {
    padding: 0.36rem 0.5rem;
  }
  .first-run-footer {
    margin-top: 0.5rem;
  }
  .first-run-note {
    margin-top: 0.3rem;
    min-height: 0;
  }
}

/* A soft edge on the list, so a tile cut by the fold reads as "more below"
   rather than as a rendering seam. Gated on `data-scrollable`, which the JS sets
   only when the list ACTUALLY overflows — a fade on a list that fits would
   promise content that is not there, which is the opposite of the affordance
   it is meant to be. Decorative only: the list scrolls under it. */
.first-run-choices[data-scrollable='true'] {
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 calc(100% - 1.4rem),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 calc(100% - 1.4rem),
    transparent 100%
  );
}

/* Scrolled to the end, there is nothing left to promise, so the fade lifts.
   Browsers without scroll-driven animations keep the static fade, which is
   still honest — there IS more list, it is just above rather than below. */
@supports (animation-timeline: scroll(self block)) {
  .first-run-choices[data-scrollable='true'] {
    animation: first-run-scroll-fade linear both;
    animation-timeline: scroll(self block);
    animation-range: contain 80% contain 100%;
  }
}

@keyframes first-run-scroll-fade {
  to {
    -webkit-mask-image: linear-gradient(to bottom, #000 100%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 100%, transparent 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  #first-run-launcher,
  .first-run-backdrop,
  .first-run-back,
  .first-run-missions button,
  .first-run-link-card,
  .first-run-link-button,
  .first-run-enter {
    transition: none;
  }
  /* Scrolling a tile into view must not animate either. */
  .first-run-choices {
    scroll-behavior: auto;
  }
}

/* Centred on the screen, top to bottom as well as side to side, at its own
   height (capped so its sections still scroll on short screens). */
body:not(.mobile-shell) #first-run-launcher {
  top: 50%;
  bottom: auto;
  max-height: calc(100vh - 4rem);
  max-height: calc(100dvh - 4rem);
  transform: translate(-50%, calc(-50% + 0.8rem)) scale(0.985);
}

body:not(.mobile-shell) #first-run-launcher.visible {
  transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 620px) {
  .first-run-dots {
    position: static;
    transform: none;
  }
  .first-run-tips,
  .first-run-missions--tiles {
    grid-template-columns: minmax(0, 1fr);
  }
  .first-run-step .first-run-modes .first-run-mode {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-height: 620px) {
  .first-run-step .first-run-modes .first-run-mode {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 0.5rem;
  }
  .first-run-missions--tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.mobile-shell #first-run-launcher {
    bottom: 5.8rem;
    max-height: calc(100vh - 6.55rem);
    max-height: calc(100dvh - 6.55rem);
  }
}
.first-run-back[aria-disabled='true'] {
  opacity: 0.5;
  cursor: wait;
}
@media (prefers-reduced-motion: reduce) {
  .first-run-dots li {
    transition: none;
  }
}
[dir='rtl'] #first-run-launcher {
  --first-run-step-offset: -1.5rem;
}
[dir='rtl'] .first-run-enter .material-symbols-outlined {
  transform: scaleX(-1);
}
[dir='rtl'] #first-run-launcher [data-callout]::after {
  clip-path: inset(0 0 0 100%);
}

[dir='rtl'] #first-run-launcher [data-callout]:hover::after,
[dir='rtl'] #first-run-launcher [data-callout]:focus-visible::after {
  clip-path: inset(0);
}

.first-run-step-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
/* The Stories announcement waits behind onboarding without consuming its
   unseen state: from startup while the card is pending, through its reveal,
   until it is removed (not shown this session, or dismissed). It also stays
   hidden while BROWSE STORIES is loading Stories. `.launcher-shown`
   is a page-root class (src/ui/rail/rootClass.js). */
body:is(.launcher-shown *, #first-run-launcher) #gev-stories #hPop,
body.first-run-opening-stories #gev-stories #hPop {
  visibility: hidden;
  pointer-events: none;
}
/* ============================================================
   POWER UP — in-app key setup (dev server only, src/keySetup.js)
   Same voice as the first-run launcher: glass card, cyan trim,
   mono kickers. The chip retires once every key is configured.
   ============================================================ */

/* The chip sits in the bottom-right corner row (#corner-actions,
   locale-picker.css), which owns the position. */
#key-setup-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem;
  color: rgba(225, 244, 248, 0.92);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.09rem;
  background: linear-gradient(
    145deg,
    rgba(10, 27, 37, 0.92),
    rgba(7, 13, 22, 0.9)
  );
  border: 1px solid rgba(54, 220, 255, 0.38);
  border-radius: 0.42rem;
  box-shadow:
    0 0.4rem 1.6rem rgba(0, 0, 0, 0.5),
    0 0 1.2rem rgba(0, 212, 255, 0.07);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  cursor: pointer;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-fast);
}

#key-setup-chip:hover,
#key-setup-chip:focus-visible {
  background: linear-gradient(
    145deg,
    rgba(14, 38, 51, 0.95),
    rgba(9, 18, 28, 0.93)
  );
  border-color: rgba(54, 220, 255, 0.7);
  outline: none;
  transform: translateY(-1px);
}

#key-setup-chip .material-symbols-outlined {
  color: #55dff5;
  font-size: 0.95rem;
}

#key-setup-chip[hidden] {
  display: none;
}

#key-setup {
  position: fixed;
  z-index: 190; /* above the first-run launcher (175), below attribution (200) */
  top: 50%;
  left: 50%;
  width: min(36rem, calc(100vw - 2rem));
  max-height: calc(100vh - 1.5rem);
  max-height: calc(100dvh - 1.5rem);
  display: flex;
  flex-direction: column;
  padding: 1.15rem;
  overflow: hidden;
  color: var(--text-primary);
  background:
    linear-gradient(145deg, rgba(10, 27, 37, 0.97), rgba(7, 13, 22, 0.95)),
    rgba(7, 17, 25, 0.96);
  border: 1px solid rgba(54, 220, 255, 0.42);
  border-radius: 0.65rem;
  box-shadow:
    0 1.4rem 4.5rem rgba(0, 0, 0, 0.72),
    0 0 2.5rem rgba(0, 212, 255, 0.09),
    inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(28px) saturate(1.25);
  -webkit-backdrop-filter: blur(28px) saturate(1.25);
  opacity: 0;
  transform: translate(-50%, calc(-50% + 0.8rem)) scale(0.985);
  transition:
    opacity 220ms ease,
    transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

/* Same cascade note as the launcher: an author display beats [hidden]. */
#key-setup[hidden] {
  display: none;
}

#key-setup.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.key-setup-scanline {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(54, 220, 255, 0.8),
    transparent
  );
  box-shadow: 0 0 1rem rgba(54, 220, 255, 0.45);
  pointer-events: none;
}

.key-setup-header,
.key-setup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(171, 210, 220, 0.6);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
}

.key-setup-kicker {
  color: rgba(54, 220, 255, 0.86);
}

/* A UiCloseButton (close-button.css). */
.key-setup-close {
  display: grid;
  place-items: center;
  padding: 0.15rem;
  color: rgba(171, 210, 220, 0.6);
  border: 1px solid transparent;
  border-radius: 0.3rem;
  transition:
    color var(--transition-fast),
    border-color var(--transition-fast);
}

.key-setup-close:hover,
.key-setup-close:focus-visible {
  color: rgba(225, 244, 248, 0.95);
  border-color: rgba(54, 220, 255, 0.5);
  outline: none;
}

.key-setup-close .material-symbols-outlined {
  font-size: 1rem;
}

#key-setup h2 {
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.045rem;
}

#key-setup-description {
  max-width: 31rem;
  margin-top: 0.3rem;
  color: rgba(215, 231, 235, 0.66);
  font-size: 0.78rem;
  line-height: 1.5;
}

#key-setup-description code {
  padding: 0.05rem 0.25rem;
  font-size: 0.92em;
  background: rgba(54, 220, 255, 0.08);
  border-radius: 0.2rem;
}

.key-setup-rows {
  display: grid;
  gap: 0.42rem;
  margin-top: 1rem;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.key-setup-row {
  display: grid;
  gap: 0.35rem;
  padding: 0.6rem 0.7rem;
  background: rgba(29, 69, 81, 0.14);
  border: 1px solid rgba(100, 200, 220, 0.15);
  border-radius: 0.42rem;
}

.key-setup-row[data-set='true'] {
  background: rgba(30, 81, 57, 0.12);
  border-color: rgba(84, 227, 156, 0.32);
}

.key-setup-row-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
}

.key-setup-row-head strong {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08rem;
}

.key-setup-led {
  width: 0.5rem;
  height: 0.5rem;
  flex: none;
  background: rgba(148, 178, 188, 0.35);
  border-radius: 50%;
}

.key-setup-row[data-set='true'] .key-setup-led {
  background: #54e39c;
  box-shadow: 0 0 0.5rem rgba(84, 227, 156, 0.66);
}

.key-setup-tier {
  font-size: 0.55rem;
}

.key-setup-exposed {
  padding: 0.05rem 0.3rem;
  color: rgba(255, 200, 120, 0.75);
  font-size: 0.5rem;
  letter-spacing: 0.06rem;
  text-transform: uppercase;
  border: 1px solid rgba(255, 200, 120, 0.3);
  border-radius: 0.3rem;
}

.key-setup-get {
  margin-left: auto;
  color: rgba(54, 220, 255, 0.75);
  font-size: 0.58rem;
  letter-spacing: 0.08rem;
  text-decoration: none;
  white-space: nowrap;
}

.key-setup-get:hover,
.key-setup-get:focus-visible {
  color: rgba(54, 220, 255, 1);
  text-decoration: underline;
  outline: none;
}

.key-setup-unlocks {
  margin: 0;
  color: rgba(198, 220, 226, 0.6);
  font-size: 0.66rem;
}

.key-setup-fields {
  display: grid;
  gap: 0.3rem;
}

.key-setup-fields input {
  width: 100%;
  padding: 0.42rem 0.55rem;
  color: rgba(225, 244, 248, 0.92);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  background: rgba(4, 14, 20, 0.72);
  border: 1px solid rgba(100, 200, 220, 0.22);
  border-radius: 0.32rem;
}

.key-setup-fields input:focus {
  border-color: rgba(54, 220, 255, 0.65);
  outline: none;
}

.key-setup-fields input::placeholder {
  color: rgba(148, 178, 188, 0.42);
}

.key-setup-cloud-auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.key-setup-cloud-auth-state {
  color: rgba(190, 214, 222, 0.7);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.05rem;
}

.key-setup-cloud-auth-toggle {
  margin-left: auto;
  padding: 0.28rem 0.55rem;
  color: rgba(54, 220, 255, 0.9);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.06rem;
  background: rgba(54, 220, 255, 0.08);
  border: 1px solid rgba(54, 220, 255, 0.28);
  border-radius: 0.32rem;
  cursor: pointer;
}

.key-setup-cloud-auth-toggle:hover,
.key-setup-cloud-auth-toggle:focus-visible {
  border-color: rgba(54, 220, 255, 0.65);
  outline: none;
}

.key-setup-cloud-auth-toggle[aria-disabled='true'] {
  cursor: wait;
  opacity: 0.5;
}

.key-setup-footer {
  margin-top: 0.85rem;
}

.key-setup-apply {
  padding: 0.5rem 0.95rem;
  color: #04141c;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.09rem;
  background: linear-gradient(180deg, #45e0ff, #1fb9dd);
  border: none;
  border-radius: 0.38rem;
  cursor: pointer;
  transition: filter var(--transition-fast);
}

.key-setup-apply:hover,
.key-setup-apply:focus-visible {
  filter: brightness(1.08);
  outline: none;
}

.key-setup-apply[aria-disabled='true'] {
  cursor: wait;
  opacity: 0.5;
  pointer-events: none;
}

.key-setup-note {
  min-height: 1.1rem;
  margin-top: 0.5rem;
  color: rgba(199, 225, 231, 0.62);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  line-height: 1.35;
}

/* The same exclusive surfaces that hide the launcher hide this surface —
   nothing about key setup belongs in a recording, a cockpit, or a scene. */
body.ui-clean-view #key-setup-chip,
body.recording-mode #key-setup-chip,
body.cockpit-mode #key-setup-chip,
body.scene-playback-mode #key-setup-chip,
body.ui-clean-view #key-setup,
body.recording-mode #key-setup,
body.cockpit-mode #key-setup,
body.scene-playback-mode #key-setup {
  display: none;
}

/* Provider Settings additions: externally-managed badge + per-row remove. */
.key-setup-external {
  padding: 0.05rem 0.3rem;
  color: rgba(148, 200, 220, 0.7);
  font-size: 0.5rem;
  letter-spacing: 0.06rem;
  text-transform: uppercase;
  border: 1px solid rgba(148, 200, 220, 0.28);
  border-radius: 0.3rem;
  white-space: nowrap;
}

.key-setup-remove {
  justify-self: start;
  padding: 0.28rem 0.55rem;
  color: rgba(255, 170, 150, 0.8);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.08rem;
  background: none;
  border: 1px solid rgba(255, 170, 150, 0.3);
  border-radius: 0.32rem;
  cursor: pointer;
  transition:
    color var(--transition-fast),
    border-color var(--transition-fast);
}

.key-setup-remove:hover,
.key-setup-remove:focus-visible {
  color: rgba(255, 190, 170, 1);
  border-color: rgba(255, 170, 150, 0.65);
  outline: none;
}
/* ============================================================
   Bottom-right corner row: the POWER UP chip (provider-settings.css)
   and, in the very corner, the interface language picker
   (src/ui/views/panels/LocalePicker.vue). Logical properties throughout, so a
   right-to-left page mirrors the row and the list.
   ============================================================ */

#corner-actions {
  position: fixed;
  inset-inline-end: 0.9rem;
  inset-block-end: 0.9rem;
  /* Above the dock (145), the cockpit HUD and panel stacks (146–147);
     below the first-run launcher (175) and Provider Settings (190). */
  z-index: 150;
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
  pointer-events: none;
}

#corner-actions > * {
  pointer-events: auto;
}

.locale-picker {
  position: relative;
  display: flex;
}

/* Same HUD frame as #key-setup-chip, so the two read as one group. */
.locale-picker-button {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.45rem 0.6rem;
  color: rgba(225, 244, 248, 0.92);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.09rem;
  line-height: 1;
  background: linear-gradient(
    145deg,
    rgba(10, 27, 37, 0.92),
    rgba(7, 13, 22, 0.9)
  );
  border: 1px solid rgba(54, 220, 255, 0.38);
  border-radius: 0.42rem;
  box-shadow:
    0 0.4rem 1.6rem rgba(0, 0, 0, 0.5),
    0 0 1.2rem rgba(0, 212, 255, 0.07);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  cursor: pointer;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-fast);
}

.locale-picker-button:hover,
.locale-picker-button:focus-visible,
.locale-picker.is-open .locale-picker-button {
  background: linear-gradient(
    145deg,
    rgba(14, 38, 51, 0.95),
    rgba(9, 18, 28, 0.93)
  );
  border-color: rgba(54, 220, 255, 0.7);
  outline: none;
}

.locale-picker-button:hover,
.locale-picker-button:focus-visible {
  transform: translateY(-1px);
}

.locale-picker-globe {
  flex: none;
  width: 0.95rem;
  height: 0.95rem;
  color: #55dff5;
}

.locale-picker-caret {
  flex: none;
  width: 0.62rem;
  height: 0.62rem;
  margin-inline-start: -0.1rem;
  opacity: 0.75;
  transition: transform var(--transition-fast);
}

.locale-picker.is-open .locale-picker-caret {
  transform: rotate(180deg);
}

/* Opens upward, aligned to the corner edge. */
.locale-picker-popup {
  position: absolute;
  inset-block-end: calc(100% + 0.4rem);
  inset-inline-end: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: max-content;
  min-width: 14rem;
  max-width: calc(100vw - 1.8rem);
  max-height: min(26rem, calc(100vh - 4.5rem));
  max-height: min(26rem, calc(100dvh - 4.5rem));
  padding: 0.45rem;
  color: var(--text-primary);
  background:
    linear-gradient(145deg, rgba(10, 27, 37, 0.97), rgba(7, 13, 22, 0.95)),
    rgba(7, 17, 25, 0.96);
  border: 1px solid rgba(54, 220, 255, 0.42);
  border-radius: 0.55rem;
  box-shadow:
    0 1rem 3rem rgba(0, 0, 0, 0.65),
    0 0 2rem rgba(0, 212, 255, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(24px) saturate(1.25);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
}

.locale-picker-popup[hidden] {
  display: none;
}

.locale-picker-heading {
  padding: 0.2rem 0.4rem 0.45rem;
  color: rgba(85, 223, 245, 0.85);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.14rem;
  text-transform: uppercase;
}

.locale-picker-search {
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 0.4rem;
  padding: 0.45rem 0.55rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(54, 220, 255, 0.28);
  border-radius: 0.35rem;
  outline: none;
}

.locale-picker-search:focus {
  border-color: rgba(54, 220, 255, 0.7);
}

.locale-picker-list {
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  outline: none;
  overscroll-behavior: contain;
}

.locale-picker-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 0.35rem;
  cursor: pointer;
}

.locale-picker-option.is-active {
  background: rgba(54, 220, 255, 0.09);
  border-color: rgba(54, 220, 255, 0.28);
}

/* Keyboard focus lives on the list (aria-activedescendant): show it. */
.locale-picker-list:focus-visible .locale-picker-option.is-active,
.locale-picker-search:focus
  ~ .locale-picker-list
  .locale-picker-option.is-active {
  border-color: rgba(54, 220, 255, 0.75);
}

.locale-picker-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.locale-picker-native {
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  line-height: 1.2;
}

.locale-picker-option[aria-selected='true'] .locale-picker-native {
  color: #55dff5;
}

.locale-picker-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  color: rgba(199, 225, 231, 0.6);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.05rem;
}

.locale-picker-check {
  flex: none;
  width: 0.95rem;
  height: 0.95rem;
  margin-inline-start: auto;
  color: #55dff5;
}

.locale-picker-empty {
  margin: 0;
  padding: 0.5rem;
  color: rgba(199, 225, 231, 0.62);
  font-family: var(--font-mono);
  font-size: 0.6rem;
}

.locale-picker-empty[hidden] {
  display: none;
}

/* The surfaces that hide the rest of the chrome hide the corner too. The
   cockpit keeps the language picker (provider-settings.css hides the chip). */
body.ui-clean-view #corner-actions,
body.recording-mode #corner-actions,
body.scene-playback-mode #corner-actions {
  display: none;
}

/* The cockpit's position readout shares this corner: it steps up to clear
   the picker row (0.9rem inset + one ~2rem button + a gap). */
body.cockpit-mode .cockpit-position-readout {
  bottom: max(clamp(22px, 4vh, 42px), 3.5rem);
}

/* Below this width the full chip label runs into the centred dock: the chip
   keeps its bolt, and its count stays in its title and aria-label. */
@media (max-width: 1180px) {
  #corner-actions #key-setup-chip [data-key-setup-chip-label] {
    display: none;
  }
}

@media (max-width: 767.98px) {
  /* Phone: the corner beside the dock, clear of the attribution above it.
     There is room for one button across, so the chip stacks on the globe. */
  #corner-actions {
    inset-inline-end: 10px;
    inset-block-end: max(16px, env(safe-area-inset-bottom));
    flex-direction: column;
  }

  #corner-actions #key-setup-chip {
    justify-content: center;
    padding-inline: 0.5rem;
  }

  /* Phone: the globe alone; the label stays in aria-label. */
  .locale-picker-code,
  .locale-picker-caret {
    display: none;
  }

  .locale-picker-button {
    padding-inline: 0.5rem;
  }

  /* The list becomes a bottom sheet across the screen. */
  .locale-picker-popup {
    position: fixed;
    inset-inline: 16px;
    inset-block-end: 16px;
    width: auto;
    min-width: 0;
    max-width: none;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    padding: 0.6rem;
  }

  .locale-picker-option {
    padding-block: 0.7rem;
  }
}
/* The rail owns placement and height; only the product body scrolls. */
.weather-panel-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  max-height: 100%;
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--panel-radius);
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
#weather-panel .panel-glow {
  position: absolute;
  inset: -18px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 212, 255, 0.16) 0%,
    transparent 65%
  );
  filter: blur(16px);
  opacity: 0.25;
  pointer-events: none;
}
#weather-panel .panel-header {
  flex: 0 0 auto;
}
#weather-panel-count {
  color: var(--text-secondary);
  font: 9px var(--font-mono);
}
#weather-panel-body {
  min-height: 0;
  max-height: calc(var(--right-stack-max-height, 50svh) - 64px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
#weather-panel.collapsed #weather-panel-body,
#weather-panel[hidden],
.weather-readout[hidden] {
  display: none !important;
}
#weather-panel.collapsed .panel-header {
  margin-bottom: 2px;
}
#weather-panel.collapsed .weather-panel-inner {
  padding-bottom: 10px;
}
/* Card typography follows the layer rows and app tokens. */
.weather-readout,
.rail-card {
  min-width: 0;
  color: var(--text-dim);
  font: 9px/1.45 var(--font-mono);
  letter-spacing: 0.5px;
}
.weather-readout {
  --weather-card-border: rgba(98, 181, 255, 0.28);
}
.rail-card {
  padding: 0;
  overflow-wrap: anywhere;
  border: 1px solid transparent;
  border-radius: 6px;
}
.rail-card + .rail-card {
  border-top-color: var(--weather-card-border);
}
.rail-card:not(.is-open):hover,
.rail-card:not(.is-open):focus-within {
  border-color: #79c2ff;
}
.rail-card.is-open {
  border-color: rgba(0, 212, 255, 0.55);
  background: rgba(42, 113, 171, 0.09);
}
.rail-card-labels {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  min-width: 0;
}
.rail-card-heading {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.rail-card-heading .data-icon {
  color: var(--text-primary);
}
.rail-card-disclosure {
  color: var(--text-dim);
  font: 9px/1.45 var(--font-mono);
}
.rail-card-title {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}
.rail-card.is-open .rail-card-title {
  color: #e8feff;
}
.rail-card-nowrap {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rail-card-badge {
  flex: 0 1 auto;
  min-width: 0;
  margin-left: auto;
  text-align: right;
}
.rail-card-line,
.weather-frame-time {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.5px;
  color: var(--text-dim);
}
.rail-card-lines {
  margin-top: 4px;
}
.rail-card-line {
  white-space: pre-line;
}
.weather-card [data-line-id='status'] {
  height: 1.45em;
  overflow-y: auto;
  color: var(--accent);
}
/* One line stays reserved so the card does not jump when a status appears;
   a translated status runs longer and wraps instead of being cut. */
html:not([lang='en']) .weather-card [data-line-id='status'] {
  height: auto;
  min-height: 1.45em;
  overflow-y: visible;
}
.rail-card-ramp {
  position: relative;
  height: 4px;
  border-radius: 2px;
  margin-top: 5px;
}
.rail-card-scale {
  text-align: right;
  font: 9px/1.45 var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}
.rail-card-actions,
.rail-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  min-width: 0;
}
.rail-card .data-toggle-chip {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.rail-card .data-row-list {
  padding-left: 0;
  margin-left: 0;
}
.rail-card .data-row-list-item {
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.5px;
}
.rail-card [hidden],
.weather-frame-time[hidden],
.weather-observed-group[hidden] {
  display: none !important;
}
.weather-frame-time {
  padding: 5px;
  border-bottom: 1px solid var(--weather-card-border);
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}
body.ui-clean-view .gev-wind-inspection-marker,
body.recording-mode .gev-wind-inspection-marker {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.rail-card-zero {
  position: absolute;
  top: -2px;
  height: 8px;
  border-left: 1px solid var(--text-primary);
}
.rail-card-zero::after {
  content: '0°C';
  position: absolute;
  top: 8px;
  left: 0;
  transform: translateX(-50%);
  font: 9px/1.45 var(--font-mono);
  color: var(--text-dim);
}
html:not([lang='en']) .rail-card-zero::after {
  white-space: nowrap;
}

.weather-observed-group {
  border: 1px solid var(--weather-card-border);
  border-radius: 6px;
  padding: 6px;
  margin-top: 6px;
  min-width: 0;
}
.weather-observed-group > .panel-title {
  margin: 0;
}
.weather-observed-scope {
  margin-top: 4px;
  color: var(--text-dim);
}
.rail-card-header {
  width: 100%;
  padding: 8px 5px;
  align-items: baseline;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 8px;
  row-gap: 2px;
  color: inherit;
}
.rail-card-header:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}
.rail-card-compact {
  grid-column: 1 / -1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* Dim and secondary fall below 4.5:1 over bright imagery through glass. */
  color: var(--text-primary);
  font: 9px/1.45 var(--font-mono);
  letter-spacing: 0.5px;
}
.rail-card-compact.status {
  color: var(--accent);
}
.rail-card-setting {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: baseline;
  gap: 6px;
  margin-top: 6px;
}
/* One label column per card, as wide as its longest label: chips line up
   across rows, and a long translated label never runs under its chips. */
html:not([lang='en']) .rail-card-settings {
  display: grid;
  grid-template-columns: minmax(56px, max-content) minmax(0, 1fr);
  column-gap: 6px;
}
html:not([lang='en']) .rail-card-setting {
  grid-column: 1 / -1;
  grid-template-columns: minmax(56px, max-content) minmax(0, 1fr);
  grid-template-columns: subgrid;
}
.rail-card-setting-label {
  color: var(--text-dim);
  font: 9px var(--font-mono);
  letter-spacing: 3px;
  text-transform: uppercase;
}
.rail-card-setting .rail-card-chips {
  margin-top: 0;
}
.rail-card-setting-range-row {
  display: flex;
  grid-column: 2;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.rail-card-setting-range-label {
  flex: 0 0 6ch;
  color: var(--text-dim);
  font: 8px var(--font-mono);
  white-space: nowrap;
}
.rail-card-setting-range-value {
  flex: 0 0 4ch;
  white-space: nowrap;
}
.rail-card-result {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  border: 1px solid rgba(65, 220, 231, 0.18);
  border-radius: 7px;
  background: rgba(2, 15, 20, 0.48);
  padding: 10px;
}
.rail-card-result-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.rail-card-result-header .panel-title {
  white-space: normal;
  flex: 1;
  min-width: 0;
  color: var(--text-dim);
  font: 9px/1.45 var(--font-mono);
  letter-spacing: 0.5px;
}
.rail-card-result .rail-card-lines {
  display: grid;
  gap: 4px;
  margin-top: 0;
}
.rail-card-result [data-line-id='wind'] {
  color: #e8feff;
  font: 13px/1.25 var(--font-mono);
}
.rail-card-result [data-line-id='explanation'] {
  font: 8px/1.35 var(--font-mono);
}
.rail-card-actions {
  align-items: center;
}

.rail-card-legend-entry {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}
.rail-card-legend-swatch {
  width: 12px;
  height: 4px;
  flex: 0 0 12px;
}

.rail-card-body {
  padding: 0 5px 8px;
}
.rail-card[data-open='true'] > .rail-card-header {
  padding-bottom: 0;
}

/* Tiles inside a card: the Globe view's worldwide tiles
   (view-context__world-tile, entity-card.css), each a choice that shows its
   value, with a band-colour bar where that tile has its icon. */
.rail-card-tiles.view-context__world {
  margin: 0.6rem 0 0.15rem;
}

.rail-card-tiles h4 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.rail-card-tiles-sub {
  overflow: hidden;
  color: rgba(199, 214, 222, 0.78);
  letter-spacing: 0.04rem;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.rail-card-tile {
  width: 100%;
  cursor: pointer;
}

/* A group of one tile (the Index group's US AQI) spans its row. */
.rail-card-tile.is-wide {
  grid-column: 1 / -1;
}

.rail-card-tile:hover,
.rail-card-tile:focus-visible {
  background: rgba(54, 220, 255, 0.08);
  border-color: rgba(54, 220, 255, 0.3);
}

.rail-card-tile.is-active {
  background: rgba(54, 220, 255, 0.1);
  border-color: rgba(54, 220, 255, 0.75);
}

.rail-card-tile-swatch {
  grid-row: 1 / 3;
  width: 6px;
  height: 1.7rem;
  background: rgba(199, 214, 222, 0.3);
  border-radius: 3px;
}

.rail-card-tile strong {
  min-width: 0;
  overflow-wrap: break-word;
}

/* The band in words beside a tile's value. */
.rail-card-tile strong small {
  color: rgba(199, 214, 222, 0.78);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.02rem;
}

/* A one-button switch row. */
.rail-card-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.5rem 0 0.25rem;
}

/* A result that heads its card (a selected station): framed, its name in
   full. */
.rail-card-result.is-lead {
  margin-top: 6px;
  border-color: rgba(54, 220, 255, 0.45);
}

.rail-card-result.is-lead .panel-title {
  color: #e8feff;
  font: 600 12px/1.3 var(--font-mono);
  letter-spacing: 0.2px;
  text-transform: none;
}
/* News rail panel (#news-panel): the last 24 hours as a doom-scroll of event
   cards drawn with GEV's own tokens. Colour is
   severity only (the layer sets --news-color per card); never a side. The
   rail owns placement and height; only the body scrolls. */
.news-panel-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  max-height: 100%;
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--panel-radius);
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
#news-panel .panel-glow {
  position: absolute;
  inset: -18px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 212, 255, 0.16) 0%,
    transparent 65%
  );
  filter: blur(16px);
  opacity: 0.25;
  pointer-events: none;
}
#news-panel .panel-header {
  flex: 0 0 auto;
}
#news-panel-count {
  color: var(--text-secondary);
  font: 9px var(--font-mono);
}
#news-panel-body {
  min-height: 0;
  max-height: calc(var(--right-stack-max-height, 50svh) - 64px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
#news-panel.collapsed #news-panel-body,
#news-panel[hidden] {
  display: none !important;
}
#right-context-rail > #news-panel {
  position: relative;
  inset: auto;
  flex: 0 0 auto;
  width: 100%;
  max-height: 100%;
  pointer-events: auto;
}
#right-context-rail > #news-panel:not(.collapsed) {
  display: flex;
  flex-direction: column;
  flex-shrink: 1;
  min-height: 0;
}
#right-context-rail.layout-focus > #news-panel:not(.collapsed) {
  flex: 0 1 var(--right-panel-allocated-height);
  height: var(--right-panel-allocated-height);
  min-height: 0;
  max-height: var(--right-panel-allocated-height);
}
#right-context-rail.layout-focus
  > #news-panel:not(.collapsed)
  .news-panel-inner {
  height: 100%;
}
#right-context-rail[data-rail-measuring]
  > #news-panel:not(.collapsed)
  > .news-panel-inner {
  height: auto !important;
}
#right-context-rail #news-panel.collapsed {
  width: var(--right-display-collapsed-width);
  margin-inline-start: auto;
}
#right-context-rail #news-panel.collapsed .news-panel-inner {
  height: 50px;
  min-height: 50px;
  padding-bottom: 10px;
}
@media (max-width: 720px) {
  #right-context-rail #news-panel.collapsed {
    width: 100%;
  }
}

.news-readout {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  color: var(--text-primary);
  font: 11px/1.4 var(--font-sans);
}
.news-readout__window,
.news-readout__head {
  margin: 0;
  color: var(--text-secondary);
  font: 600 9px var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
/* What Local reads, in the primary colour so it reads before the list. */
.news-readout__area {
  color: var(--text-primary);
}
.news-readout__sections,
.news-readout__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
/* One select per row: at the rail's width two side by side cut off
   "Significant and above" (and longer translations). */
.news-readout__filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}
.news-filter {
  min-width: 0;
}
/* The window choice sits where the window label does, as narrow as its text. */
.news-readout__window-choice {
  align-self: flex-start;
  font-family: var(--font-mono);
}
.news-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 10px;
  cursor: pointer;
}
.news-toggle input {
  accent-color: var(--accent);
}
.news-readout__section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.news-readout__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.news-readout__list.is-stale {
  opacity: 0.5;
}
.news-readout__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.news-card {
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}
.news-card:hover,
.news-card.is-open {
  border-color: var(--glass-border-hover);
  background: rgba(0, 212, 255, 0.06);
}
.news-card.is-open {
  border-color: rgba(0, 212, 255, 0.45);
}
.news-card.is-unmapped .news-card__title {
  color: var(--text-secondary);
}
.news-card__main {
  display: grid;
  grid-template-columns: 96px 1fr;
  column-gap: 8px;
  row-gap: 3px;
  width: 100%;
  padding: 6px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.news-card__main > :not(.news-card__thumb) {
  grid-column: 1 / -1;
}
.news-card__thumb ~ * {
  grid-column: 2 !important;
}
.news-card__thumb {
  position: relative;
  grid-row: 1 / span 5;
  width: 96px;
  height: 64px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-dark);
}
.news-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* A clip waits behind its picture; the open card plays it. */
.news-card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text-primary);
  font-size: 14px;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}
.news-card__clip {
  display: block;
  width: 100%;
  max-height: 220px;
  margin-bottom: 6px;
  border-radius: 4px;
  background: #000;
}
.news-card__credit {
  position: absolute;
  inset-inline-end: 0;
  bottom: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 0 4px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--text-primary);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.news-card__title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}
.news-card__note,
.news-card__sides {
  color: var(--text-secondary);
  font-size: 10px;
}
.news-card__meta {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--text-secondary);
  font: 10px var(--font-mono);
}
/* The globe's marker in small: a dark disc, rim and icon in the severity
   colour (sprites.js). */
.news-card__marker {
  flex: none;
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--news-color);
  border-radius: 50%;
  background: var(--bg-dark);
}
.news-card__marker svg {
  width: 8px;
  height: 8px;
  fill: none;
  stroke: var(--news-color);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.news-card__marker.solid svg {
  fill: var(--news-color);
  stroke: none;
}
/* The service a report came through: credited, and kept quiet. */
.news-card__via {
  color: var(--text-dim);
  font: 9px var(--font-mono);
}
.news-card__severity {
  flex: none;
  color: var(--news-color);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.news-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
/* A report's chips wear the shared chip (chip.css), neutral unless attested;
   a claim is dashed. */
.news-chip--claimed {
  border-style: dashed;
}
.news-card__open {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 8px 8px;
}
.news-card__original,
.news-card__snippet {
  margin: 0;
  color: var(--text-primary);
  font-size: 11px;
}
.news-card__original {
  color: var(--text-secondary);
}
.news-card__others {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 10px;
}
.news-card__others a,
.news-card__link {
  color: var(--accent);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.news-card__others a:hover,
.news-card__link:hover {
  text-decoration: underline;
}
.news-card__side {
  margin-inline-end: 6px;
  color: var(--text-secondary);
}
.news-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font: 10px var(--font-mono);
}
.news-legend {
  color: var(--text-secondary);
  font-size: 10px;
}
.news-legend summary {
  cursor: pointer;
}
.news-legend p {
  margin: 4px 0;
}
.news-legend__severity {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 4px 0;
  padding: 0;
  list-style: none;
}
.news-legend__severity li::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-inline-end: 4px;
  border-radius: 50%;
  background: var(--news-color);
}
@media (prefers-reduced-motion: no-preference) {
  .news-card,
  .news-readout__list {
    transition:
      background var(--transition-fast),
      border-color var(--transition-fast),
      opacity var(--transition-fast);
  }
}
/* ── World timeline ─────────────────────────── */
/* Shown while a layer with time to show is on, centred along the bottom of
   the screen; the command dock and what sits above it rise by its height. */
:root {
  --world-timeline-lift: 0px;
}

/* The bar and the time's bubble over its handle. `.has-world-timeline` is a
   page-root class (src/ui/rail/rootClass.js). */
body:is(.has-world-timeline *, #world-timeline) {
  --world-timeline-lift: 66px;
}

/* Clean view, recording and the cockpit put the dock away; the bar goes too. */
body.ui-clean-view,
body.recording-mode,
body.cockpit-mode {
  --world-timeline-lift: 0px !important;
}

body.ui-clean-view #world-timeline,
body.recording-mode #world-timeline,
body.cockpit-mode #world-timeline {
  display: none;
}

/* Time runs left to right in every language, so the handle, the fill, the
   ticks and the bubble agree under a right-to-left page too. */
#world-timeline {
  direction: ltr;
  position: fixed;
  /* The dock's floor (command-dock.css); the dock rises above the bar. */
  bottom: 74px;
  left: 50%;
  z-index: 146;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(820px, calc(100vw - 24px));
  height: 42px;
  box-sizing: border-box;
  padding: 4px 6px;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  transform: translateX(-50%);
}

#world-timeline .world-timeline-play,
#world-timeline .world-timeline-live {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid rgba(123, 189, 211, 0.28);
  border-radius: 8px;
  background: rgba(0, 212, 255, 0.08);
  color: var(--text-primary);
  font: inherit;
  cursor: pointer;
}

#world-timeline .world-timeline-play:hover,
#world-timeline .world-timeline-live:hover {
  background: rgba(0, 212, 255, 0.18);
}

#world-timeline .world-timeline-live.is-live {
  border-color: rgba(0, 212, 255, 0.6);
  background: rgba(0, 212, 255, 0.2);
  color: var(--accent);
  cursor: default;
}

#world-timeline .world-timeline-live {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#world-timeline .world-timeline-speed {
  flex: none;
}

/* The time rides over the handle. It slides across itself as the handle
   crosses the track (its start at the handle at the track's start, its end at
   the end), so however wide its date it stays within the track. */
#world-timeline .world-timeline-time {
  --inset: 0px;
  position: absolute;
  bottom: calc(100% + 6px);
  left: calc(var(--inset) + (100% - var(--inset)) * var(--at));
  padding: 2px 8px;
  border: 1px solid rgba(0, 212, 255, 0.4);
  border-radius: 6px;
  background: var(--glass-bg);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transform: translateX(calc(var(--at) * -100%));
  pointer-events: none;
}

/* Playing, held while a layer loads the time's data: a spinner by the time. */
#world-timeline .world-timeline-time.is-waiting {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#world-timeline .world-timeline-spinner {
  width: 10px;
  height: 10px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: world-timeline-spin 0.9s linear infinite;
}

@keyframes world-timeline-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  #world-timeline .world-timeline-spinner {
    animation: none;
    border-color: var(--accent);
  }
}

/* The track: ticks for each launch or strong earthquake, the elapsed fill, and a native
   range input on top for dragging and the keyboard. */
#world-timeline .world-timeline-track {
  position: relative;
  /* Two fingers pinch the track, not the page. */
  touch-action: none;
  flex: 1 1 auto;
  cursor: pointer;
  min-width: 80px;
  height: 24px;
}

/* Zoomed, the track's ends fade, as it goes on past them. */
#world-timeline .world-timeline-track.is-zoomed::before {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(123, 189, 211, 0.22) 12px,
    rgba(123, 189, 211, 0.22) calc(100% - 12px),
    transparent
  );
}

#world-timeline .world-timeline-track::before {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 4px;
  border-radius: 2px;
  background: rgba(123, 189, 211, 0.22);
  content: '';
  transform: translateY(-50%);
}

#world-timeline .world-timeline-fill {
  position: absolute;
  top: 50%;
  left: 0;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.7;
  transform: translateY(-50%);
  pointer-events: none;
}

#world-timeline .world-timeline-tick {
  position: absolute;
  top: 50%;
  width: 2px;
  height: 12px;
  margin-left: -1px;
  border-radius: 1px;
  background: rgba(0, 212, 255, 0.75);
  transform: translateY(-50%);
  pointer-events: none;
}

/* A tick's label, shown over the time's bubble while the pointer is on the
   tick (or the handle rests on its mark). It slides across itself as the
   bubble does, so it stays within the track, and is never wider than the
   track: a long label ends in an ellipsis. */
#world-timeline .world-timeline-mark-label {
  position: absolute;
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  bottom: calc(100% + 30px);
  left: calc(100% * var(--at));
  z-index: 1;
  padding: 2px 8px;
  border: 1px solid rgba(0, 212, 255, 0.4);
  border-radius: 6px;
  background: var(--glass-bg);
  color: var(--text-primary);
  font-size: 11px;
  line-height: 1.4;
  white-space: pre;
  transform: translateX(calc(var(--at) * -100%));
  pointer-events: none;
}

/* Zoomed, the track drags along. */
#world-timeline .world-timeline-track.is-zoomed {
  cursor: grab;
}

#world-timeline .world-timeline-track.is-zoomed:active {
  cursor: grabbing;
}

/* Only the handle takes the pointer as a slider; the track around it takes
   taps, drags and pinches itself. */
#world-timeline .world-timeline-scrub {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  background: transparent;
  appearance: none;
  pointer-events: none;
}

#world-timeline .world-timeline-scrub::-webkit-slider-thumb {
  cursor: ew-resize;
  pointer-events: auto;
}

#world-timeline .world-timeline-scrub::-moz-range-thumb {
  cursor: ew-resize;
  pointer-events: auto;
}

/* The time dragged off the track: the handle waits at its edge, unseen. */
#world-timeline .world-timeline-scrub.is-off-view::-webkit-slider-thumb {
  opacity: 0;
  pointer-events: none;
}

#world-timeline .world-timeline-scrub.is-off-view::-moz-range-thumb {
  opacity: 0;
  pointer-events: none;
}

#world-timeline .world-timeline-scrub::-webkit-slider-runnable-track {
  height: 100%;
  background: transparent;
}

#world-timeline .world-timeline-scrub::-moz-range-track {
  background: transparent;
}

#world-timeline .world-timeline-scrub::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: 5px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: #031018;
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
  appearance: none;
}

#world-timeline .world-timeline-scrub::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: #031018;
}

/* A finger needs a bigger handle. */
@media (pointer: coarse) {
  #world-timeline .world-timeline-scrub::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
    margin-top: 1px;
  }

  #world-timeline .world-timeline-scrub::-moz-range-thumb {
    width: 20px;
    height: 20px;
  }
}

#world-timeline .world-timeline-scrub:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 1199px) {
  #world-timeline {
    bottom: 2vh;
  }
}

@media (max-width: 720px) {
  #world-timeline {
    bottom: 8px;
  }
}

/* On phones the bar sits just above the tab bar, under the voice dock, with
   the track and the speed on a row of their own beneath play and live. */
body.mobile-shell:is(.has-world-timeline *, #world-timeline) {
  --world-timeline-lift: 80px;
}

body.mobile-shell #world-timeline {
  bottom: calc(var(--mobile-tab-space) + 6px);
  flex-wrap: wrap;
  row-gap: 4px;
  height: auto;
}

/* The bubble rises into the first row, clear of play on its left. */
body.mobile-shell #world-timeline .world-timeline-time {
  --inset: 48px;
}

/* The speed sits on the track's row, a full-size target beside it. */
body.mobile-shell #world-timeline .world-timeline-track {
  order: 1;
  flex: 1 1 calc(100% - 96px);
}

body.mobile-shell #world-timeline .world-timeline-live {
  margin-inline-start: auto;
}

body.mobile-shell #world-timeline .world-timeline-speed {
  order: 2;
  height: 32px;
}
/* Shared structural hooks for panels admitted by the existing rail owners.
   Specific legacy component rules retain priority; no panel IDs are registered
   here. The rail itself remains pointer-transparent over the globe. */
:is(#left-panel-stack, #right-context-rail)
  > [data-panel-id]:has(> [data-panel-surface]) {
  position: relative;
  inset: auto;
  flex: 0 0 auto;
  min-height: 0;
  pointer-events: auto;
}

#left-panel-stack
  > [data-panel-id]:has(> [data-panel-surface]):not(.collapsed) {
  flex: 0 1 var(--left-panel-allocated-height, auto);
  height: var(--left-panel-allocated-height, auto);
  max-height: var(--left-panel-allocated-height, 100%);
}

#left-panel-stack.layout-tail
  > [data-panel-id]:has(> [data-panel-surface]):not(.collapsed) {
  flex: 0 0 var(--left-panel-allocated-height);
}

#right-context-rail.layout-focus
  > [data-panel-id]:has(> [data-panel-surface]):not(.collapsed) {
  flex: 0 1 var(--right-panel-allocated-height);
  height: var(--right-panel-allocated-height);
  max-height: var(--right-panel-allocated-height);
}

/* Opt-in skin: the positioned surface can contain an outward popup. Only the
   non-interactive decoration is clipped; only data-panel-body scrolls. */
:root {
  --panel-surface-font: var(--font-sans);
  --panel-surface-detail: none;
  --panel-surface-frame: none;
  --panel-surface-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
  --panel-surface-title: var(--text-secondary);
  --panel-surface-error: #ff9b8e;
  --panel-surface-width: 300px;
  --panel-surface-collapsed-width: var(--left-collapsed-width);
}

:is([data-panel-surface], [data-panel-popup]) {
  isolation: isolate;
  min-width: 0;
  min-height: 0;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: var(--panel-radius);
  background: none;
  color: var(--text-primary);
  font: 12px/1.5 var(--panel-surface-font);
  overflow: visible;
}

[data-panel-surface]:not(dialog) {
  position: relative;
}

:is([data-panel-surface], [data-panel-popup])::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  border: 1px solid var(--glass-border);
  border-radius: inherit;
  background-color: var(--glass-bg);
  background-image: var(--panel-surface-detail);
  box-shadow: var(--panel-surface-shadow);
  clip-path: var(--panel-surface-frame);
  pointer-events: none;
}

/* A closed native dialog must retain the browser's display:none. */
[data-panel-surface]:not([hidden]):not(dialog:not([open])) {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

:is(#left-panel-stack, #right-context-rail)
  > [data-panel-id]:has(> [data-panel-surface]) {
  width: min(100%, var(--panel-expanded-width, var(--panel-surface-width)));
  background: none;
  box-shadow: none;
}

:is(#left-panel-stack, #right-context-rail)
  > [data-panel-id]
  > [data-panel-surface] {
  height: 100%;
  max-height: 100%;
}

:is(#left-panel-stack, #right-context-rail)
  > [data-panel-id].collapsed:has(> [data-panel-surface]) {
  width: min(
    100%,
    var(--panel-collapsed-width, var(--panel-surface-collapsed-width))
  );
}

#right-context-rail[data-rail-measuring]
  > [data-panel-id]
  > [data-panel-surface] {
  height: auto;
  max-height: none;
}

[data-panel-header] {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  min-height: 30px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--glass-border);
}

.panel-surface-title {
  flex: 1;
  min-width: 0;
  color: var(--panel-surface-title);
  font: 600 11px/1.4 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

[data-panel-body] {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  /* Keep an inset focus ring inside the intentional scrolling boundary. */
  padding: 3px;
}

.panel-surface-control {
  min-width: 0;
  min-height: 30px;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--glass-border);
  border-radius: var(--btn-radius);
  background: var(--bg-dark);
  color: var(--text-primary);
  font: inherit;
  accent-color: var(--accent);
}

button.panel-surface-control {
  cursor: pointer;
}

.panel-surface-control:hover:not(:disabled):not([aria-disabled='true']) {
  border-color: var(--glass-border-hover);
  background: var(--accent-dim);
}

.panel-surface-control:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: -3px;
}

.panel-surface-control:is(:disabled, [aria-disabled='true']) {
  opacity: 0.5;
  cursor: not-allowed;
}

.panel-surface-error,
.panel-surface-control[aria-invalid='true'] {
  color: var(--panel-surface-error);
  border-color: var(--panel-surface-error);
}

[data-panel-popup] {
  position: absolute;
  z-index: 5;
  /* The owner supplies placement, width, collision handling and disclosure. */
}

[data-panel-surface].collapsed > :is([data-panel-body], [data-panel-popup]),
[data-panel-id].collapsed
  > [data-panel-surface]
  > :is([data-panel-body], [data-panel-popup]),
:is(#left-panel-stack, #right-context-rail)
  > [data-panel-id]:has(> [data-panel-surface])[hidden],
:is(
  [data-panel-surface],
  [data-panel-header],
  [data-panel-body],
  [data-panel-popup]
)[hidden],
dialog[data-panel-surface]:not([open]) {
  display: none !important;
}

/* Conforming additions follow the same concealment policy as existing chrome.
   Cockpit continues to own rail/dock placement and exclusions in cockpit.css. */
body:is(.ui-clean-view, .recording-mode)
  :is([data-panel-surface], [data-panel-popup]),
body:is(.ui-clean-view, .recording-mode)
  :is(#left-panel-stack, #right-context-rail)
  > [data-panel-id]:has(> [data-panel-surface]) {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
/* Shared one-of-many control. Feature classes retain surrounding placement.
   The kit's UiSegmented (.ui-segmented, .ui-segmented__item) wears it. */
.ui-segmented,
.gev-segmented {
  display: inline-flex;
  min-width: 0;
  border: 1px solid var(--glass-border-hover);
  border-radius: 6px;
  overflow: hidden;
}
.ui-segmented[hidden],
.gev-segmented[hidden] {
  display: none;
}
.ui-segmented__item,
.gev-segment {
  flex: 1;
  min-width: min-content;
  min-height: 24px;
  margin: 0;
  padding: 4px 8px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font: 9px/1.25 var(--font-mono);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  overflow-wrap: normal;
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast);
}
.ui-segmented__item + .ui-segmented__item,
.gev-segment + .gev-segment {
  border-left: 1px solid var(--glass-border);
}
.ui-segmented__item:hover:not(:disabled),
.gev-segment:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
.ui-segmented__item[aria-checked='true'],
.gev-segment[aria-checked='true'] {
  background: var(--accent);
  color: #000;
}
.ui-segmented__item:focus-visible,
.gev-segment:focus-visible {
  position: relative;
  outline: 2px solid var(--text-primary);
  outline-offset: -3px;
  box-shadow: inset 0 0 0 4px #061014;
}
.ui-segmented__item:disabled,
.gev-segment:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
/* Data Library: the Browse button under DATA LAYERS and its dialog.
   The dialog is a dialog[data-panel-surface] (docs/panel-surfaces.md): the
   shared skin draws the surface; this file owns geometry and the list. */

.data-library-footer {
  padding: 8px 10px 4px;
  border-top: 1px solid var(--glass-border);
}

.data-library-browse {
  width: 100%;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px dashed var(--glass-border-hover);
  border-radius: var(--btn-radius);
  background: transparent;
  color: var(--text-secondary);
  font: 600 10px/1.4 var(--font-mono);
  letter-spacing: 1.2px;
  cursor: pointer;
  transition:
    color var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast);
}

.data-library-browse:hover,
.data-library-browse:focus-visible {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.data-library-browse:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

.data-library-dialog {
  /* Frosted rather than opaque: a lighter surface than the rail panels
     (0.72) keeps the globe's colour visible, and the blur stops the HUD text
     behind the dialog from competing with the dialog's own. */
  --glass-bg: rgba(12, 12, 20, 0.55);
  width: min(560px, calc(100vw - 32px));
  max-height: min(720px, calc(100dvh - 48px));
  margin: auto;
  color: var(--text-primary);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  backdrop-filter: blur(22px) saturate(1.3);
  /* The blur follows the surface's shape. The dialog has no outward popups
     for a clip to hide. */
  clip-path: var(--panel-surface-frame);
}

.data-library-dialog::backdrop {
  background: rgba(0, 0, 0, 0.12);
}

.data-library-close {
  min-width: 30px;
  font-size: 16px;
  line-height: 1;
}

/* At a glance: four stat tiles above the intro. Text tokens only. */
.data-library-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 12px;
}

.data-library-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(8, 10, 16, 0.38);
}

.data-library-stat-label {
  color: var(--text-secondary);
  font: 600 9px/1.3 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.data-library-stat-value {
  margin: 0;
  color: var(--text-primary);
  font: 600 20px/1.15 var(--font-sans);
}

.data-library-stat-detail {
  margin: 0;
  color: rgba(232, 234, 237, 0.68);
  font-size: 10px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.data-library-intro {
  margin: 0 0 10px;
  color: rgba(232, 234, 237, 0.72);
}

.data-library-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 6px;
}

.data-library-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  color: var(--text-secondary);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.data-library-field .panel-surface-control {
  text-transform: none;
  letter-spacing: normal;
  font-size: 12px;
}

.data-library-check {
  grid-column: 1 / -1;
  gap: 6px;
  color: var(--text-secondary);
}

.data-library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 4px 0 8px;
}

.data-library-status {
  margin: 0;
  color: var(--text-secondary);
  font: 10px/1.4 var(--font-mono);
}

.data-library-reset {
  min-height: 26px;
  padding: 3px 10px;
  font: 600 10px/1.4 var(--font-mono);
  letter-spacing: 1px;
}

.data-library-reset.is-armed {
  border-color: var(--panel-surface-error);
  color: var(--panel-surface-error);
}

.data-library-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.data-library-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 10px;
  row-gap: 4px;
  padding: 10px;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: rgba(8, 10, 16, 0.38);
}

.data-library-item.is-on {
  border-color: var(--accent-glow);
}

.data-library-item.is-unavailable .data-library-name,
.data-library-item.is-unavailable .data-library-description {
  color: var(--text-secondary);
}

.data-library-item > :not(.data-library-actions) {
  grid-column: 1;
}

.data-library-actions {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.data-library-action {
  min-width: 82px;
  font: 600 10px/1.4 var(--font-mono);
  letter-spacing: 1px;
}

.data-library-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.data-library-icon {
  width: 14px;
  color: var(--accent);
  text-align: center;
}

.data-library-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.data-library-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.data-library-badge {
  padding: 0 5px;
  border: 1px solid var(--glass-border-hover);
  border-radius: 4px;
  color: var(--text-secondary);
  font: 600 9px/1.6 var(--font-mono);
  letter-spacing: 0.08em;
}

.data-library-badge--good {
  border-color: var(--accent-glow);
  color: var(--accent);
}

.data-library-badge--warn {
  border-color: rgba(255, 194, 61, 0.45);
  color: #ffc23d;
}

.data-library-description,
.data-library-meta,
.data-library-reason {
  margin: 0;
  overflow-wrap: anywhere;
}

.data-library-meta {
  color: rgba(232, 234, 237, 0.68);
  font-size: 11px;
}

.data-library-meta a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.data-library-meta a:hover,
.data-library-meta a:focus-visible {
  color: var(--text-primary);
}

/* Imagery specs: label over value, wrapping into as many columns as fit. */
.data-library-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
}

.data-library-spec {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.data-library-spec dt {
  color: rgba(232, 234, 237, 0.56);
  font: 9px/1.4 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.data-library-spec dd {
  margin: 0;
  color: var(--text-primary);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.data-library-reason {
  color: #ffc23d;
  font: 10px/1.5 var(--font-mono);
}

@media (max-width: 720px) {
  .data-library-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-library-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .data-library-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .data-library-actions {
    grid-column: 1;
    grid-row: auto;
    flex-direction: row;
    justify-self: start;
  }
}

body:is(.ui-clean-view, .recording-mode) .data-library-dialog {
  display: none;
}

/* Library rows list their legend one item per line, as Fire Perimeters'
   longer labels do, with the zoom and remove icons on their own line. */
.data-toggle-row[data-library-entry] .data-toggle-legend-item {
  flex-basis: 100%;
}
/* Generic components in src/ui/kit. The surfaces use this application's
   glass, accent and type tokens. */

/* The thin themed scrollbar every scrolling surface wears (.ui-scroll). Without it a surface draws the platform's light scrollbar,
   because the page declares no dark color-scheme. */
/* Cesium builds its credit list and the rail card builder its lines, so
   those two surfaces are named here instead of carrying the class. */
.ui-scroll,
.cesium-credit-lightbox > ul,
.weather-card [data-line-id='status'] {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}
.ui-scroll::-webkit-scrollbar,
.cesium-credit-lightbox > ul::-webkit-scrollbar,
.weather-card [data-line-id='status']::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.ui-scroll::-webkit-scrollbar-thumb,
.cesium-credit-lightbox > ul::-webkit-scrollbar-thumb,
.weather-card [data-line-id='status']::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--scroll-thumb);
}
.ui-scroll::-webkit-scrollbar-track,
.cesium-credit-lightbox > ul::-webkit-scrollbar-track,
.weather-card [data-line-id='status']::-webkit-scrollbar-track {
  background: var(--scroll-track);
}

.ui-icon {
  display: inline-block;
  line-height: 1;
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 20;
  user-select: none;
}

/* The icon is a font ligature; `ui-icon` is also jQuery UI's sprite-icon class, and a stylesheet
   that brings jQuery UI's rule into the page (some browser extensions inject it everywhere) pushes
   the glyph out of its box (`text-indent: -99999px`, `overflow: hidden`, a 16 px box). The doubled
   class outranks that rule and sets only what the kit never sets elsewhere. */
.ui-icon.ui-icon {
  text-indent: 0;
  overflow: visible;
  background-image: none;
  width: auto;
  height: auto;
}

.ui-tooltip {
  position: relative;
  display: inline-flex;
}
.ui-tooltip__tip {
  position: absolute;
  top: 50%;
  z-index: 1;
  padding: 4px 8px;
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  background: var(--menu-bg);
  color: var(--dock-label-color);
  font: var(--dock-label-font-weight) var(--dock-label-font-size) / 1.4
    var(--font-sans);
  letter-spacing: var(--dock-label-letter-spacing);
  white-space: nowrap;
  pointer-events: none;
  transform: translateY(-50%);
}
/* Sides are for left-to-right; a right-to-left page mirrors them with the
   rails, so a tip still opens toward the middle of the screen. */
.ui-tooltip__tip--right {
  inset-inline-start: calc(100% + 10px);
}
.ui-tooltip__tip--left {
  inset-inline-end: calc(100% + 10px);
}

.ui-rail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--glass-border);
  border-radius: calc(var(--btn-radius) + 4px);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  pointer-events: auto;
}
.ui-rail__sep {
  height: 1px;
  margin: 3px 6px;
  background: var(--glass-border);
}
.ui-rail__item {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: var(--btn-radius);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast);
}
.ui-rail__item:hover:not(:disabled) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}
.ui-rail__item--on,
.ui-rail__item--on:hover:not(:disabled) {
  border-color: var(--accent-dim);
  background: var(--accent-dim);
  color: var(--accent);
}
.ui-rail__item:disabled {
  opacity: 0.35;
  cursor: default;
}

/* A collapsible rail shows each item as an icon and its label while no panel
   is open, and folds the labels away once one is. The collapsed item keeps
   the plain rail's 32px square. */
.ui-rail--collapsible {
  transition: border-radius var(--transition-fast);
}
.ui-rail--collapsible .ui-rail__item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-width: 32px;
  padding: 0 6px;
  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast),
    border-radius var(--transition-fast);
}
.ui-rail__label {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: var(--dock-label-font-weight) var(--dock-label-font-size) / 1
    var(--font-sans);
  letter-spacing: var(--dock-label-letter-spacing);
  transition:
    max-width var(--transition-fast),
    margin var(--transition-fast),
    opacity var(--transition-fast);
}
.ui-rail--expanded {
  border-radius: 21px;
}
.ui-rail--expanded .ui-rail__item {
  border-radius: 16px;
}
.ui-rail--expanded .ui-rail__label {
  max-width: 220px;
  margin-inline: 8px 8px;
  opacity: 1;
}
.ui-rail__badge {
  position: absolute;
  top: 1px;
  inset-inline-end: 1px;
  min-width: 14px;
  padding: 0 3px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--bg-dark);
  font: 600 9px/14px var(--font-mono);
  text-align: center;
}

/* Application view hosts (src/ui/views): the view's own elements lay out as
   children of the page, as the static markup they replace did. */
.gev-view {
  display: contents;
}
/* Chinese and Japanese text. Tight tracking keeps CJK labels readable;
   preserve Latin tracking for intel HUD readouts and content marked
   translate="no", including its containers. */
html:is(:lang(zh), :lang(ja))
  body
  :not(
    #intel-hud,
    #intel-hud *,
    [translate='no'],
    [translate='no'] *,
    :has([translate='no'])
  ) {
  letter-spacing: 0.02em !important;
}

/* Japanese line breaking: never start a line with ー, a small kana or closing
   punctuation (プレビュ / ー). */
html:lang(ja) body {
  line-break: strict;
}

/* Keep small CJK labels legible at a minimum of 9px. */
html:is(:lang(zh), :lang(ja)) #command-dock .gev-mic-label,
html:is(:lang(zh), :lang(ja)) #command-dock #gev-voice-detail,
html:is(:lang(zh), :lang(ja)) .gev-voice-tier-btn,
html:is(:lang(zh), :lang(ja)) .panel-layer-toggle {
  font-size: 9px;
}

/* A two-glyph button label must not break between its glyphs. */
html:is(:lang(zh), :lang(ja)) .pp-mode-btn {
  white-space: nowrap;
}

/* Japanese segment labels are short words (すべて, 平面): keep each whole. */
html:lang(ja) .gev-segment {
  white-space: nowrap;
}

/* Keep unit symbols in their catalog case, including the cockpit readouts. */
html:is(:lang(zh), :lang(ja)) #intel-hud *,
html:is(:lang(zh), :lang(ja)) #cockpit-hud * {
  text-transform: none;
}

/* Move short travel modes (步行 / 骑行, 徒歩 / 自転車) to the next line as
   whole words. */
html:is(:lang(zh), :lang(ja)) [data-layer-id='directions'] .data-toggle-meta {
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* Leave room for the complete sensor name and resolution on two lines. */
html:is(:lang(zh), :lang(ja)) .recent-imagery-readout .ri-strip {
  height: 131px;
}
html:is(:lang(zh), :lang(ja)) .recent-imagery-readout .ri-card {
  height: 123px;
  grid-template-rows: 42px 13px 22px 11px 18px;
}
html:is(:lang(zh), :lang(ja)) .recent-imagery-readout .ri-card-sensor {
  white-space: normal;
  text-overflow: clip;
}

/* The Japanese imagery slot line wraps at its · separators, never inside a
   word (プレ / ビュー); a run too long for the line still breaks. */
html:lang(ja) .recent-imagery-readout .ri-slot-value {
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* Japanese layer status lines wrap at their spaces and · separators, so an
   age such as 1分以内 stays whole (更新 1 / 分以内); a run too long for the
   line still breaks. */
html:lang(ja) .data-toggle-meta {
  word-break: keep-all;
  overflow-wrap: break-word;
}
/* Right-to-left languages (Arabic, Hebrew). The chrome mirrors through
   logical properties in the component sheets (inset-inline-*,
   margin-inline-*); this sheet holds only what logical properties cannot
   express. */

/* Arabic letters join: letter-spacing tears every word into separate glyphs.
   Hebrew letters do not join, but tracking only spaces their words out.
   Latin marked translate="no" and the intel HUD's Latin telemetry keep their
   tracking; the HUD's translated lines are released below. Unlike cjk.css, a
   container that merely holds a translate="no" span is not spared: its own
   text would come apart. */
html:is(:lang(ar), :lang(he))
  body
  :not(#intel-hud, #intel-hud *, [translate='no'], [translate='no'] *) {
  letter-spacing: 0 !important;
}

/* The intel HUD is an instrument overlay: corners, brackets, coordinates and
   sensor codes keep the English geometry. Its translated lines still read
   right to left inside that frame. */
html[dir='rtl'] #intel-hud {
  direction: ltr;
}
html[dir='rtl'] #intel-hud :is(.hud-mode, .hud-summary-label, .hud-summary) {
  unicode-bidi: plaintext;
  text-align: left;
  letter-spacing: 0 !important;
}

/* Font stacks: JetBrains Mono and Inter have no Arabic glyphs, and the
   generic monospace fallback is a fixed-pitch Arabic face that spaces every
   letter apart. Noto Sans Arabic (loaded with the other Google fonts; its
   files download only when the page shows Arabic) leads the mono stack, so
   the spaces between Arabic words come from it too and not from the
   fixed-pitch Latin face. */
html:lang(ar) {
  --font-mono:
    'Noto Sans Arabic', 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Geeza Pro',
    Tahoma, monospace;
  --font-sans:
    'Inter', 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, 'Geeza Pro',
    Tahoma, sans-serif;
}

/* Hebrew: JetBrains Mono and Inter also lack Hebrew glyphs. Noto Sans Hebrew
   (loaded with the other Google fonts; its files download only when the page
   shows Hebrew) leads the stack so the body text keeps one proportional
   Hebrew face across platforms. */
html:lang(he) {
  --font-mono:
    'Noto Sans Hebrew', 'JetBrains Mono', 'SF Mono', 'Fira Code', Tahoma,
    monospace;
  --font-sans:
    'Inter', 'Noto Sans Hebrew', -apple-system, BlinkMacSystemFont, Tahoma,
    sans-serif;
}
/* The Global Context lines and their buttons set ui-monospace through the
   `font` shorthand; in both RTL languages the words come from the page's
   own font stack. */
html:is(:lang(ar), :lang(he))
  :is(
    #military-awareness-panel,
    .military-awareness-controls button,
    .military-awareness-standby button,
    .military-awareness-compass-label,
    .military-awareness-compass-heading,
    .military-awareness-direction-label,
    .tr3b-toggle
  ) {
  font-family: var(--font-mono);
}
/* The intel and cockpit HUDs keep JetBrains Mono leading for their Latin
   telemetry and column-aligned digits, with the language's face behind it. */
html:lang(ar) :is(#intel-hud, #cockpit-hud) {
  --font-mono:
    'JetBrains Mono', 'SF Mono', 'Fira Code', 'Noto Sans Arabic', 'Geeza Pro',
    Tahoma, monospace;
}
html:lang(he) :is(#intel-hud, #cockpit-hud) {
  --font-mono:
    'JetBrains Mono', 'SF Mono', 'Fira Code', 'Noto Sans Hebrew', Tahoma,
    monospace;
}

/* The Display/Context rail moves to the left edge. It keeps a physical
   `right` in layers.css because the attribution-clearance model
   (creditAttribution.test.mjs) reads that rule; the swap only applies above
   the 720px band, where the rail is not edge-to-edge. */
@media (min-width: 721px) {
  html[dir='rtl'] #right-context-rail {
    right: auto;
    left: var(--right-rail-x);
  }
}

/* The right rail sits on the left: its expand/collapse arrows point the
   other way. (The first-run card flips its own arrow in first-run.css.) */
html[dir='rtl'] #right-context-rail .panel-collapse-btn {
  transform: scaleX(-1);
}

/* The cockpit is an aircraft panel, not page chrome: its windows keep their
   physical sides, so the data-layer stack goes back to the left edge instead
   of landing on the utility controls. Gauges, tapes and the roll counters stay
   left to right (speed left, altitude right, -10 not 10-); the cards keep
   reading right to left. */
html[dir='rtl'] body.cockpit-mode #left-panel-stack {
  left: var(--left-stack-x);
  right: auto;
}
html[dir='rtl']
  #cockpit-hud
  :is(
    .cockpit-instrument-row,
    .cockpit-compass,
    .cockpit-pitch-rail,
    .cockpit-altitude-rim,
    .cockpit-roll-arc,
    .cockpit-vision-controls
  ) {
  direction: ltr;
}

/* Feed text (news headlines, station names) arrives in its own language:
   each line takes its direction from its first letter, so an English headline
   reads and aligns left to right instead of moving its punctuation. */
html[dir='rtl']
  :is(
    .cockpit-news-list li *,
    #radio-station-name,
    #radio-station-tags,
    .cockpit-radio-station
  ) {
  unicode-bidi: plaintext;
}

/* Clock readouts (~0:05 / 5:19) are numbers, not prose. */
html[dir='rtl'] #bhote-koshi-event-panel [data-role='time'] {
  direction: ltr;
  unicode-bidi: isolate;
}

/* Physical controls keep their left-to-right sense: FM seek down/up and the
   radio dial. The worded PREV / PLAY / NEXT row follows the reading
   direction like any other button row. */
html[dir='rtl'] :is(.sdr-seek-row, .radio-tuner) {
  direction: ltr;
}

/* Canvas labels (installations, map cards, detections) are measured and drawn
   with left-to-right geometry: a card's text starts at its left padding. A
   canvas inherits the page direction, which turned that start into the right
   edge and pushed every title out of its card. */
html[dir='rtl'] canvas {
  direction: ltr;
}

/* Scene callouts on the screen whiteboard: the card grows to the right of the
   text's x, so right-to-left text ends there instead of starting there. The
   injected stack (JetBrains Mono) has no Arabic glyphs; use the Arabic-aware
   one. */
html[dir='rtl'] .gev-anno-text {
  text-anchor: end;
  font-family: var(--font-mono);
  letter-spacing: 0;
}

/* Position counters built from bare numbers (01 / 25, 1 / 3) read as a number
   pair, left to right, as an unspaced 1/3 does; otherwise the slash swaps
   them and the current item looks like the total. Translated counters say
   «من» instead. */
html[dir='rtl']
  :is(
    #bhote-koshi-event-panel [data-role='beat-index'],
    #cockpit-brief-position,
    [data-mission-index]
  ) {
  direction: ltr;
  unicode-bidi: isolate;
}

/* The radio tuner header is a left-to-right instrument row; its channel
   readout («القناة 01 من 750») still reads in its own language. */
html[dir='rtl'] #radio-tuner-value {
  unicode-bidi: plaintext;
}

/* The select chevron sits at the end of the field, where the text stops
   (form-field.css pads that side through padding-inline-end). */
html[dir='rtl'] select.gev-field {
  background-position: left 8px center;
}
html[dir='rtl'] select.gev-field--compact {
  background-position: left 6px center;
}

/* A legend's range is printed under its colour ramp, which always runs low
   to high from left to right; the numbers keep that order. */
html[dir='rtl'] .rail-card-scale {
  direction: ltr;
}

/* ── Side rails, mirrored ──────────────────────────────────────────────
   The left stack sits on the right edge, so the left rail's name panel
   opens to its left and the right rail's to its right, each toward the
   middle of the screen, as they do in left-to-right. */
html[dir='rtl'] .gev-panel-rail--left .ui-rail--expanded::after {
  right: calc(100% + 6px);
  left: auto;
}
html[dir='rtl'] .gev-panel-rail--left .ui-rail--expanded .ui-rail__label {
  right: calc(100% + 24px);
  left: auto;
}
html[dir='rtl'] .gev-panel-rail--right .ui-rail--expanded::after {
  right: auto;
  left: calc(100% + 6px);
}
html[dir='rtl'] .gev-panel-rail--right .ui-rail--expanded .ui-rail__label {
  right: auto;
  left: calc(100% + 24px);
}

/* Panels moved to the screen edge slide over their rail toward that edge. */
html[dir='rtl']
  body.panels-edge-left:not(.mobile-shell):not(.cockpit-mode)
  #left-panel-stack
  > :not(.gev-panel-rail) {
  transform: translateX(var(--panel-rail-clearance, 48px));
}
html[dir='rtl']
  body.panels-edge-left:not(.mobile-shell):not(.cockpit-mode)
  #left-panel-stack
  > :not(.gev-panel-rail):not(.collapsed) {
  transform: translate(var(--panel-rail-clearance, 48px), var(--edge-rail-row));
}
html[dir='rtl']
  body.panels-edge-right:not(.mobile-shell):not(.cockpit-mode)
  #right-context-rail
  > :not(.gev-panel-rail) {
  transform: translate(
    calc(-1 * var(--panel-rail-clearance, 48px)),
    var(--edge-rail-row)
  );
}
/* ── Phone shell (≤720px, body.mobile-shell; src/ui/mobileShell.js) ─────────
 * The globe is full screen. A bottom tab bar opens one sheet; the sheet shows
 * the panels of that tab from the rails or dock, everything else stays hidden.
 */
:root {
  --mobile-tab-height: 58px;
  --mobile-bottom-inset: env(safe-area-inset-bottom, 0px);
  --mobile-top-inset: env(safe-area-inset-top, 0px);
  --mobile-tab-space: calc(
    var(--mobile-tab-height) + var(--mobile-bottom-inset)
  );
  --mobile-sheet-max-height: min(62vh, calc(100vh - 168px));
}

/* Dynamic viewport units keep sheets inside the area a mobile browser's
   toolbars leave visible. */
@supports (height: 1dvh) {
  :root {
    --mobile-sheet-max-height: min(62dvh, calc(100dvh - 168px));
  }
}

#mobile-tab-bar,
#mobile-sheet-backdrop {
  display: none;
}

body.mobile-shell #mobile-tab-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 170;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  height: var(--mobile-tab-space);
  padding: 0 max(4px, env(safe-area-inset-right, 0px))
    var(--mobile-bottom-inset) max(4px, env(safe-area-inset-left, 0px));
  background: rgba(8, 14, 22, 0.94);
  border-top: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body.mobile-shell .mobile-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  padding: 6px 0 4px;
  color: var(--text-secondary);
  background: none;
  border: 0;
  font: 500 10px/1.2 var(--font-sans);
  letter-spacing: 0.04em;
  -webkit-tap-highlight-color: transparent;
}

/* Long locales clip to one line instead of widening their column. */
body.mobile-shell .mobile-tab-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.mobile-shell .mobile-tab-icon {
  font-size: 24px;
  line-height: 1;
}

body.mobile-shell .mobile-tab[aria-expanded='true'] {
  color: var(--accent);
}

body.mobile-shell .mobile-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}

body.mobile-shell[data-mobile-sheet] #mobile-sheet-backdrop:not([hidden]) {
  position: fixed;
  inset: 0 0 var(--mobile-tab-space);
  z-index: 155;
  display: block;
  background: rgba(0, 0, 0, 0.18);
}

/* ── Top bar: logo at the start, globe actions at the end ──────────────── */
body.mobile-shell #title-bar {
  top: calc(var(--mobile-top-inset) + 10px);
  inset-inline-start: 14px;
}

body.mobile-shell #title-bar .title-logo {
  width: 58px;
}

body.mobile-shell #title-bar h1 > :not(.title-logo),
body.mobile-shell #title-bar .subtitle {
  display: none;
}

body.mobile-shell #top-center-actions {
  top: calc(var(--mobile-top-inset) + 10px);
  inset-inline-start: auto;
  inset-inline-end: 12px;
}

/* ── HUD: one compact readout under the top bar ────────────────────────── */
body.mobile-shell #intel-hud .hud-edge,
body.mobile-shell #intel-hud .hud-corner,
body.mobile-shell #intel-hud .hud-bottom-bar {
  display: none;
}

body.mobile-shell #intel-hud .hud-bottom-left {
  top: calc(var(--mobile-top-inset) + 62px);
  bottom: auto;
  left: 16px;
  font-size: 9px;
  opacity: 0.8;
}

/* ── Panels: hidden unless their tab's sheet is open ───────────────────── */
body.mobile-shell #left-panel-stack,
body.mobile-shell #right-context-rail {
  display: none;
}

body.mobile-shell[data-mobile-sheet='layers'] #left-panel-stack,
body.mobile-shell[data-mobile-sheet='cameras'] #right-context-rail,
body.mobile-shell[data-mobile-sheet='context'] #right-context-rail,
body.mobile-shell[data-mobile-sheet='missions'] #right-context-rail,
/* Visual opens from the left rail on wider screens, so it lives in the left
   stack and the More sheet is that stack showing Visual alone. */
body.mobile-shell[data-mobile-sheet='more'] #left-panel-stack {
  position: fixed;
  top: auto;
  right: 0;
  bottom: var(--mobile-tab-space);
  left: 0;
  z-index: 160;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: auto;
  max-width: none;
  max-height: var(--mobile-sheet-max-height);
  padding: 14px 10px 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  pointer-events: auto;
  background: rgba(8, 14, 22, 0.96);
  border: 1px solid var(--glass-border);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  transform: none;
}

body.mobile-shell #left-panel-stack > *,
body.mobile-shell #right-context-rail > *,
/* Rail rules show expanded Weather, News and Recent Imagery by id; on phones
   they belong to the Context sheet only. */
body.mobile-shell #right-context-rail > #weather-panel,
body.mobile-shell #right-context-rail > #news-panel,
body.mobile-shell #right-context-rail > #recent-imagery-panel {
  display: none;
}

/* Rail-scoped ids so a rail's own hiding rules (for example the Tactical HUD
   hiding collapsed siblings) never take a panel out of an open sheet. */
body.mobile-shell[data-mobile-sheet='layers'] #left-panel-stack > #data-panel,
body.mobile-shell[data-mobile-sheet='layers']
  #left-panel-stack
  > #utilities-panel,
body.mobile-shell[data-mobile-sheet='layers'] #left-panel-stack > #scene-panel,
body.mobile-shell[data-mobile-sheet='cameras']
  #right-context-rail
  > #cctv-panel,
body.mobile-shell[data-mobile-sheet='cameras']
  #right-context-rail
  > #street-level-panel,
body.mobile-shell[data-mobile-sheet='context']
  #right-context-rail
  > #global-context-panel,
body.mobile-shell[data-mobile-sheet='context']
  #right-context-rail
  > #weather-panel:not([hidden]),
body.mobile-shell[data-mobile-sheet='context']
  #right-context-rail
  > #news-panel:not([hidden]),
body.mobile-shell[data-mobile-sheet='context']
  #right-context-rail
  > #recent-imagery-panel:not([hidden]),
body.mobile-shell[data-mobile-sheet='missions']
  #right-context-rail
  > #space-missions-panel:not([hidden]),
body.mobile-shell[data-mobile-sheet='more'] #left-panel-stack > #pp-toggles {
  position: relative;
  inset: auto;
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  transform: none;
}

/* The sheet scrolls: News keeps its height instead of shrinking under the
   panel below it, as the rail makes it do on a desktop. */
body.mobile-shell #right-context-rail > #news-panel:not(.collapsed) {
  flex-shrink: 0;
}

/* ── Dock: [mic] [Omnibar] [chat] above the World Timeline ─────────────
   The desktop dock (omnibar-dock.css), spanning the width above the tab
   bar, with touch-sized targets. A keyboard on screen lifts it above the
   keyboard (--mobile-keyboard-inset, mobileShell.js). An open sheet puts it
   away. */
body.mobile-shell:not(.cockpit-mode):not(.scene-playback-mode):not(
    .ui-clean-view
  ):not(.recording-mode):where(.has-omnibar.dock-has-voice *) {
  --omnibar-dock-width: calc(
    100vw - 24px - env(safe-area-inset-left, 0px) -
      env(safe-area-inset-right, 0px)
  );
  --omnibar-dock-bottom: calc(var(--mobile-tab-space) + 10px);
  --omnibar-dock-raised: max(
    calc(var(--omnibar-dock-bottom) + var(--world-timeline-lift, 0px)),
    calc(var(--mobile-keyboard-inset, 0px) + 8px)
  );

  #command-dock > #gev-voice-control {
    padding: 0 6px;
  }
  #command-dock > #gev-voice-control::before {
    inset-inline-start: 56px;
  }
  #command-dock > #gev-voice-control::after {
    inset-inline-end: 56px;
  }
  #gev-voice-control > :is(#gev-voice-button, #gev-chat-button) {
    width: 44px;
    height: 44px;
  }
  #gev-omnibar {
    bottom: calc(var(--omnibar-dock-raised) + 6px);
    width: calc(var(--omnibar-dock-width) - 124px);
  }
  #gev-omnibar .omnibar-field {
    height: 44px;
  }
  /* Under 16px a phone browser zooms the page into the focused field. */
  #gev-omnibar-input {
    font-size: 16px;
  }
  /* Results fill the height above the field (44px, 6px above the dock,
     11px gap) up to the top inset, so a keyboard on a short screen still
     leaves rows: the desktop reserve of 144px left none at 375px tall. */
  #gev-omnibar .omnibar-results {
    inset-inline: -62px;
    max-height: min(
      360px,
      max(
        0px,
        calc(
          100dvh - var(--omnibar-dock-raised) - 69px -
            env(safe-area-inset-top, 0px) - 8px
        )
      )
    );
  }
  #gev-omnibar :is(.omnibar-item, .omnibar-strip__chip) {
    min-height: 44px;
  }

  &[data-mobile-sheet] :is(#command-dock, #gev-omnibar) {
    display: none;
  }
}

/* ── Credits and corner chips clear the tab bar ────────────────────────── */
/* While the tab bar shows, the credit line sits above the dock. The desktop
   placements (including the Minimal HUD's :has() variant) outrank any phone
   selector, so the offset must win. Clean view keeps its own corner. */
body.mobile-shell:not(.recording-mode):not(.cockpit-mode):not(.ui-clean-view)
  #cesium-credits {
  right: auto;
  bottom: calc(
    var(--mobile-tab-space) + 74px + var(--world-timeline-lift, 0px)
  ) !important;
  left: 10px;
  /* With the base rule's nowrap the credits run off the right edge, and a
     max-width alone wrapped them into a narrow column: the line needs wrapping
     and a real width. The width applies before the 0.8 scale, keeping the
     scaled line 10px from the right edge, so every credit and "Data
     attribution" stay on screen. Like the offset above, it must win. */
  width: calc((100vw - 20px) / 0.8) !important;
  max-width: none !important;
  white-space: normal;
  transform-origin: left bottom;
  scale: 0.8;
}

body.mobile-shell:not(.recording-mode):not(.cockpit-mode):not(.ui-clean-view)
  #gev-credits {
  right: auto;
  bottom: calc(
    var(--mobile-tab-space) + 74px + var(--world-timeline-lift, 0px)
  ) !important;
  left: 10px;
  width: calc((100vw - 20px) / 0.8) !important;
  max-width: none !important;
  white-space: normal;
  transform-origin: left bottom;
  scale: 0.8;
}

/* An open sheet lifts the required attribution above everything it covers. */
body.mobile-shell[data-mobile-sheet]:not(.recording-mode):not(
    .cockpit-mode
  ):not(.ui-clean-view)
  #cesium-credits {
  bottom: calc(var(--mobile-sheet-cover, 0px) + 6px) !important;
  z-index: 166;
}

body.mobile-shell[data-mobile-sheet]:not(.recording-mode):not(
    .cockpit-mode
  ):not(.ui-clean-view)
  #gev-credits {
  bottom: calc(var(--mobile-sheet-cover, 0px) + 6px) !important;
  z-index: 166;
}

/* The view switcher clears the tab bar and the dock, opposite the credit. */
body.mobile-shell:not(.cockpit-mode) #view-switcher {
  right: 12px;
  bottom: calc(
    var(--mobile-tab-space) + 74px + var(--world-timeline-lift, 0px)
  );
}

body.mobile-shell #corner-actions {
  top: calc(var(--mobile-top-inset) + 60px);
  inset-inline-end: 12px;
  bottom: auto;
}

/* A keyboard up leaves a landscape phone ~170px above it: the dock and its
   results take that, so the corner buttons the dock would cover step aside. */
body.mobile-shell.mobile-keyboard-open #corner-actions {
  visibility: hidden;
}

/* Full-screen modes hide the phone chrome like the desktop chrome. Scene
   playback keeps it: the Scenes panel (Layers tab) holds its STOP control. */
body.mobile-shell.ui-clean-view #mobile-tab-bar,
body.mobile-shell.recording-mode #mobile-tab-bar,
body.mobile-shell.cockpit-mode #mobile-tab-bar {
  display: none;
}

/* Outside the Omnibar layout (scene playback) the dock still clears the tab
   bar. */
body.mobile-shell #command-dock {
  bottom: calc(
    var(--mobile-tab-space) + 10px + var(--world-timeline-lift, 0px)
  );
}
/* ── Screen-space annotations (src/annotations/screenAnnotationRenderer.js) ── */
.gev-screen-whiteboard { position: fixed; inset: 0; pointer-events: none; z-index: 90; }
.gev-screen-whiteboard-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
/* No CSS opacity transition here on purpose: group opacity is driven per-frame in JS
   (the 260ms fade-in via computeAlpha, and the tracked-entity z-order ease). A CSS
   transition fought those per-frame writes and made the tracked-fade opacity oscillate
   (flicker). Fade-OUT keeps its own transition via .gev-anno.gev-out below. */
.gev-anno-ring { filter: drop-shadow(0 0 6px currentColor); }
.gev-anno-dot { filter: drop-shadow(0 0 5px rgba(255,255,255,0.6)); }
.gev-anno-area { filter: drop-shadow(0 0 5px currentColor); }
.gev-anno-arrow { filter: drop-shadow(0 0 4px currentColor); stroke-linecap: round; }
.gev-anno-leader { stroke-dasharray: 2 3; }
.gev-anno-card { fill: rgba(8,18,28,0.78); stroke: rgba(255,255,255,0.14); stroke-width: 1; }
.gev-anno-text { fill: #eaf6ff; font: 600 13px "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0.02em; }
/* draw-on: outlined shapes reveal their stroke */
.gev-draw { stroke-dasharray: 1400; stroke-dashoffset: 1400; }
.gev-anno.gev-in .gev-draw { transition: stroke-dashoffset 900ms ease-out; stroke-dashoffset: 0; }
/* opacity-only fade-in: a CSS transform here would override the SVG transform
   attribute used to POSITION the callout and snap it to 0,0. */
.gev-anno-callout { opacity: 0; }
.gev-anno.gev-in .gev-anno-callout { animation: gev-pop 320ms ease-out both; }
.gev-anno.gev-out { opacity: 0 !important; transition: opacity 320ms ease; }
.gev-pulse { animation: gev-ring-pulse 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes gev-ring-pulse { 0%,100% { opacity: 0.9; stroke-width: 2; } 50% { opacity: 0.35; stroke-width: 3.5; } }
@keyframes gev-pop { from { opacity: 0; } to { opacity: 1; } }
/* ── Side rails: sliding highlight and edge scrolling ──────────────────
   The open item's highlight is drawn once per rail, under the icons, and
   slides from item to item when the panel changes. With the pointer in a
   screen edge's strip, the rail's border lights up a little to say the wheel
   now steps through its panels; the panel that opens slides in from the
   direction of travel. */
.ui-rail {
  position: relative;
  transition:
    border-color 240ms ease,
    border-radius var(--transition-fast);
}

.ui-rail.ui-rail--edge-hot {
  border-color: rgba(48, 194, 224, 0.4);
}

/* The highlight itself, matching an open item's own look. */
.ui-rail::before {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: var(--rail-glide-w, 32px);
  height: var(--rail-glide-h, 32px);
  background: var(--accent-dim);
  border: 1px solid var(--accent-dim);
  border-radius: var(--btn-radius);
  box-sizing: border-box;
  content: '';
  opacity: 0;
  pointer-events: none;
  transform: translate(var(--rail-glide-x, 0), var(--rail-glide-y, 0));
  /* Only the position slides. The size follows at once: it changes only
     when the rail changes shape (its labelled pills folding to icons as a
     panel opens), and a size easing there reads as a stretch. */
  transition:
    transform 380ms cubic-bezier(0.22, 1, 0.36, 1),
    border-radius var(--transition-fast),
    opacity 200ms ease;
}

.ui-rail--expanded::before {
  border-radius: 16px;
}

.ui-rail.ui-rail--glide::before {
  opacity: 1;
}

.ui-rail.ui-rail--glide-jump::before {
  transition: opacity 200ms ease;
}

/* While the shared highlight shows, the items stay clear and sit above it;
   the open item keeps its accent colour, which eases in as it arrives. */
.ui-rail--glide .ui-rail__item {
  z-index: 1;
  transition:
    color 300ms ease,
    background var(--transition-fast),
    border-color var(--transition-fast),
    border-radius var(--transition-fast);
}

.ui-rail--glide .ui-rail__item--on,
.ui-rail--glide .ui-rail__item--on:hover:not(:disabled) {
  background: transparent;
  border-color: transparent;
}

.rail-switch-down {
  animation: rail-switch-down 340ms cubic-bezier(0.22, 1, 0.36, 1);
}

.rail-switch-up {
  animation: rail-switch-up 340ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes rail-switch-down {
  from {
    opacity: 0;
    translate: 0 16px;
  }
}

@keyframes rail-switch-up {
  from {
    opacity: 0;
    translate: 0 -16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ui-rail::before {
    transition: opacity 200ms ease;
  }

  .rail-switch-down,
  .rail-switch-up {
    animation: none;
  }
}
/* The left rail's icons keep their places whether or not a panel is open;
   only the highlight moves to the open one. */

/* With nothing open, the icons and their names split into two glass panels
   side by side: the plain icon rail, and a name panel beside it with one row
   per icon. A name is part of its button, so clicking it opens that panel. */
.gev-panel-rail--left .ui-rail--expanded {
  position: relative;
  border-radius: calc(var(--btn-radius) + 4px);
}

.gev-panel-rail--left .ui-rail--expanded .ui-rail__item {
  width: 32px;
  border-radius: var(--btn-radius);
}

.gev-panel-rail--left .ui-rail--expanded::after {
  content: '';
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: calc(100% + 6px);
  width: 170px;
  border: 1px solid var(--glass-border);
  border-radius: calc(var(--btn-radius) + 4px);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  pointer-events: none;
}

.gev-panel-rail--left .ui-rail--expanded .ui-rail__label {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  /* Past the rail's padding and border, the 6px gap, and the name panel's
     border and inner padding. */
  left: calc(100% + 24px);
  display: flex;
  align-items: center;
  max-width: 150px;
  margin: 0;
}

.gev-panel-rail--left .ui-rail--expanded .ui-rail__item:hover .ui-rail__label {
  color: var(--text-primary);
}

/* The column rises to sit just under the HUD readout instead of leaving a
   gap above it, with or without a panel open, so opening one doesn't move
   the rail down. */
#left-panel-stack {
  top: calc(
    var(--left-stack-safe-top, var(--left-stack-top)) +
      var(--panel-rail-lift, 0px)
  );
}

/* The right rail splits the same way with nothing open, mirrored: the icon
   rail stays on the screen edge and the name panel sits to its left. */
.gev-panel-rail--right .ui-rail--expanded {
  position: relative;
  border-radius: calc(var(--btn-radius) + 4px);
}

.gev-panel-rail--right .ui-rail--expanded .ui-rail__item {
  width: 32px;
  border-radius: var(--btn-radius);
}

.gev-panel-rail--right .ui-rail--expanded::after {
  content: '';
  position: absolute;
  top: -1px;
  bottom: -1px;
  right: calc(100% + 6px);
  width: 170px;
  border: 1px solid var(--glass-border);
  border-radius: calc(var(--btn-radius) + 4px);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  pointer-events: none;
}

.gev-panel-rail--right .ui-rail--expanded .ui-rail__label {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  /* From the button's left edge back past the rail's padding and border,
     the 6px gap and the 170px name panel, to the panel's inner padding. */
  left: -168px;
  display: flex;
  align-items: center;
  max-width: 150px;
  margin: 0;
}

.gev-panel-rail--right .ui-rail--expanded .ui-rail__item:hover .ui-rail__label {
  color: var(--text-primary);
}

/* In clean view the screen-edge gutters stay empty: the HUD's vertical edge
   readouts (ONA / COLL on the left, BAND / BITS / LVL on the right) are not
   shown. */
:root body.ui-clean-view #intel-hud .hud-edge {
  display: none !important;
}

/* The bottom-right readout (GSD / ALT / AIS) has one more line than the
   bottom-left one (MGRS / coordinates); it drops by that line so the two
   corners start level. */
#intel-hud[data-variant='tactical'] .hud-bottom-right {
  bottom: calc(2vh + 6.5rem - 26px);
}

/* From 1200px the dock sits 74px up (command-dock.css) and clears both
   corners, which are at most ~340px wide beside a ~500px dock. The readout
   sits 8px above the bottom-right corner row (Power Up and the language
   picker: 32px tall, 14px up) and the coordinates start level with it. The
   World Timeline sits on the dock's floor between the corners (44rem
   narrower than the screen), so the corners stay put while it shows. */
@media (min-width: 1200px) {
  #intel-hud[data-variant='tactical'] .hud-bottom-right {
    bottom: 3.375rem;
  }

  /* Right to left the attribution row takes the bottom right
     (command-dock-trays.css): the readout clears two lines of it. */
  html[dir='rtl'] #intel-hud[data-variant='tactical'] .hud-bottom-right {
    bottom: calc(3.375rem + 1.5rem);
  }

  #intel-hud:is([data-variant='tactical'], [data-variant='minimal'])
    .hud-bottom-left,
  :root[data-scope-mask='off']
    #intel-hud[data-variant='minimal']
    .hud-bottom-left {
    bottom: calc(3.375rem + 26px);
  }

  #world-timeline {
    width: min(820px, calc(100vw - 44rem));
  }

  /* The raised dock is 74px - 2vh higher than the bottom-edge dock these
     height budgets were written for. Toasts keep 12px above the 62px dock. */
  #gev-voice-control .gev-voice-panel {
    max-height: min(
      28rem,
      max(
        7.5rem,
        calc(100dvh - 12rem - 74px + 2vh - var(--gev-provider-lift, 0px))
      )
    );
  }

  body:not(.ui-clean-view):not(.recording-mode):not(.cockpit-mode) #toast {
    bottom: calc(148px + var(--world-timeline-lift, 0px));
  }
}

/* ── Contrast: rails and name panels read clearly over dark space as well
   as bright imagery. ── */
:is(.gev-panel-rail--left, .gev-panel-rail--right) .ui-rail {
  background: rgba(16, 20, 28, 0.82) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

:is(.gev-panel-rail--left, .gev-panel-rail--right) .ui-rail--expanded::after {
  background: rgba(16, 20, 28, 0.82) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

:is(.gev-panel-rail--left, .gev-panel-rail--right) .ui-rail__item {
  color: rgba(225, 236, 242, 0.88);
}

:is(.gev-panel-rail--left, .gev-panel-rail--right) .ui-rail__label {
  color: rgba(225, 236, 242, 0.82) !important;
}

:is(.gev-panel-rail--left, .gev-panel-rail--right) .ui-rail__item:hover {
  color: #fff;
}

/* The open item takes the accent colour; its highlight is the rail's shared
   one, which slides to it. The button carries no fill of its own: as a rail
   folds its labelled pills to icons, a fill on the shrinking button would
   read as the highlight stretching. */
:is(.gev-panel-rail--left, .gev-panel-rail--right)
  .ui-rail__item.ui-rail__item--on {
  color: #00d4ff !important;
}

:is(.gev-panel-rail--left, .gev-panel-rail--right)
  .ui-rail:not(.ui-rail--glide)
  .ui-rail__item.ui-rail__item--on {
  background: none;
  border-color: transparent;
}

:is(.gev-panel-rail--left, .gev-panel-rail--right) .ui-rail::before {
  background: rgba(0, 212, 255, 0.15);
  border-color: rgba(0, 212, 255, 0.28);
}

/* ── The open icon is its own island ──
   With a panel open, the rail's glass is drawn in pieces behind its icons:
   one piece for the open icon, and one for each run of icons above and below
   it. The icons keep their places, open or not; the spacing between them is
   what leaves room for the break. */
:is(.gev-panel-rail--left, .gev-panel-rail--right) .ui-rail {
  gap: 12px;
}

:is(
    body:not(.panels-edge-left) .gev-panel-rail--left,
    body:not(.panels-edge-right) .gev-panel-rail--right
  )
  .ui-rail--collapsible:not(.ui-rail--expanded):has(.ui-rail__item--on) {
  background: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

:is(
    body:not(.panels-edge-left) .gev-panel-rail--left,
    body:not(.panels-edge-right) .gev-panel-rail--right
  )
  .ui-rail--collapsible:not(.ui-rail--expanded):has(.ui-rail__item--on)
  > .ui-tooltip::before {
  position: absolute;
  inset: -6px -5px;
  z-index: -1;
  background: rgba(16, 20, 28, 0.82);
  border: solid rgba(255, 255, 255, 0.14);
  border-width: 0 1px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  content: '';
  pointer-events: none;
}

/* The ends of the rail. */
:is(
    body:not(.panels-edge-left) .gev-panel-rail--left,
    body:not(.panels-edge-right) .gev-panel-rail--right
  )
  .ui-rail--collapsible:not(.ui-rail--expanded):has(.ui-rail__item--on)
  > .ui-tooltip:first-child::before {
  top: -5px;
  border-top-width: 1px;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

:is(
    body:not(.panels-edge-left) .gev-panel-rail--left,
    body:not(.panels-edge-right) .gev-panel-rail--right
  )
  .ui-rail--collapsible:not(.ui-rail--expanded):has(.ui-rail__item--on)
  > .ui-tooltip:last-child::before {
  bottom: -5px;
  border-bottom-width: 1px;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
}

/* The runs stop short of the open icon. */
:is(
    body:not(.panels-edge-left) .gev-panel-rail--left,
    body:not(.panels-edge-right) .gev-panel-rail--right
  )
  .ui-rail--collapsible:not(.ui-rail--expanded):has(.ui-rail__item--on)
  > .ui-tooltip:has(+ .ui-tooltip > .ui-rail__item--on)::before {
  bottom: -1px;
  border-bottom-width: 1px;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
}

:is(
    body:not(.panels-edge-left) .gev-panel-rail--left,
    body:not(.panels-edge-right) .gev-panel-rail--right
  )
  .ui-rail--collapsible:not(.ui-rail--expanded):has(.ui-rail__item--on)
  > .ui-tooltip:has(> .ui-rail__item--on)
  + .ui-tooltip::before {
  top: -1px;
  border-top-width: 1px;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

/* The open icon's own piece. */
:is(
    body:not(.panels-edge-left) .gev-panel-rail--left,
    body:not(.panels-edge-right) .gev-panel-rail--right
  )
  .ui-rail--collapsible:not(.ui-rail--expanded):has(.ui-rail__item--on)
  > .ui-tooltip:has(> .ui-rail__item--on)::before {
  inset: -4px -5px;
  border-width: 1px;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

/* The side rails fold their labels away at once when a panel opens, and back
   when it closes: easing the labels' width made every button visibly
   stretch and shrink. Only their fade eases. */
:is(.gev-panel-rail--left, .gev-panel-rail--right) .ui-rail__label {
  transition: opacity var(--transition-fast);
}
/* Visual in the left column: it takes clicks (the column itself lets them
   through to the globe) and stays inside the column, scrolling as a whole. */
#left-panel-stack > #pp-toggles {
  position: relative;
  inset: auto;
  flex: 0 1 var(--left-panel-allocated-height, auto);
  min-height: 0;
  max-height: var(--left-panel-allocated-height, 100%);
  overflow-y: auto;
  pointer-events: auto;
}

#left-panel-stack > #pp-toggles.collapsed {
  display: none;
}

/* ── Expanded panel width ───────────────────────────────────────────────
   Data Layers opens 15px wider than it used to (280 → 295px), and that is
   the narrowest any side panel opens to; wider ones (Context, CCTV,
   Authoring) keep their own width. */
:root {
  --side-panel-min-expanded-width: 295px;
}

#data-panel,
#utilities-panel {
  --panel-expanded-width: var(--side-panel-min-expanded-width);
}

#left-panel-stack > #pp-toggles:not(.collapsed) {
  --pp-expanded-width: var(--side-panel-min-expanded-width);
  width: var(--side-panel-min-expanded-width);
}

:is(#left-panel-stack, #right-context-rail) > [data-panel-id]:not(.collapsed) {
  min-width: var(--side-panel-min-expanded-width);
}
/* ── Context panel: the card for one thing on the map ──────────────────
   Sits at the top of the Context panel, above the mode switch. Glass like
   the omnibar sheet; the title in the mono face the HUD uses. */
.entity-card {
  margin: 0 0 0.75rem;
  padding: 0.7rem 0.75rem 0.6rem;
  color: rgba(225, 236, 242, 0.92);
  background: rgba(40, 44, 52, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
}

.entity-card__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.entity-card__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  color: #36dcff;
  font-size: 1.1rem;
  background: rgba(29, 69, 81, 0.35);
  border: 1px solid rgba(48, 194, 224, 0.35);
  border-radius: 7px;
}

.entity-card__kind {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  font-size: 0.62rem;
  letter-spacing: 0.06rem;
  text-transform: uppercase;
}

.entity-card__kind > span:first-child {
  color: rgba(225, 236, 242, 0.85);
}

.entity-card__layer {
  overflow: hidden;
  color: rgba(199, 214, 222, 0.5);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-card__status {
  flex: none;
  padding: 0.12rem 0.45rem;
  font-size: 0.58rem;
  white-space: nowrap;
  border: 1px solid currentColor;
  border-radius: 999px;
}

.entity-card__status--live {
  color: #5ee6a0;
}

.entity-card__status--live::before {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 0.3rem;
  vertical-align: middle;
  background: currentColor;
  border-radius: 50%;
  content: '';
  animation: entity-card-pulse 1.6s ease-in-out infinite;
}

.entity-card__status--aged {
  color: rgba(199, 214, 222, 0.6);
}

.entity-card__status--lost {
  color: #ff9f43;
}

/* A UiCloseButton: close-button.css draws no padding, border or background. */
.entity-card__close {
  display: grid;
  flex: none;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  color: rgba(199, 214, 222, 0.6);
  border-radius: 6px;
}

.entity-card__close:hover,
.entity-card__close:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.entity-card__close .material-symbols-outlined {
  font-size: 1rem;
}

/* Find it: shown while the selected item is off screen or out of its feed. */
.entity-card__find {
  display: grid;
  flex: none;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  color: #36dcff;
  background: rgba(29, 69, 81, 0.35);
  border: 1px solid rgba(48, 194, 224, 0.55);
  border-radius: 7px;
}

.entity-card__find:hover,
.entity-card__find:focus-visible {
  color: #fff;
  background: rgba(48, 194, 224, 0.3);
}

.entity-card__find:disabled {
  opacity: 0.55;
}

.entity-card__find .material-symbols-outlined {
  font-size: 1.1rem;
}

.entity-card__title {
  margin: 0.55rem 0 0.1rem;
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02rem;
}

.entity-card__where {
  margin: 0 0 0.5rem;
  color: rgba(199, 214, 222, 0.5);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  white-space: pre;
}

.entity-card__facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 0.75rem;
  margin: 0 0 0.55rem;
}

.entity-card__fact {
  min-width: 0;
}

.entity-card__fact dt {
  color: rgba(199, 214, 222, 0.5);
  font-size: 0.56rem;
  letter-spacing: 0.05rem;
  text-transform: uppercase;
}

.entity-card__fact dd {
  margin: 0.1rem 0 0;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-card__empty {
  margin: 0 0 0.55rem;
  color: rgba(199, 214, 222, 0.55);
  font-size: 0.68rem;
}

.entity-card__links,
.entity-card__attribution-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.55rem;
}

.entity-card__links a,
.entity-card__attribution-links a {
  padding: 0.15rem 0.5rem;
  color: #36dcff;
  font-size: 0.64rem;
  text-decoration: none;
  border: 1px solid rgba(48, 194, 224, 0.35);
  border-radius: 999px;
}

.entity-card__links a:hover,
.entity-card__links a:focus-visible,
.entity-card__attribution-links a:hover,
.entity-card__attribution-links a:focus-visible {
  background: rgba(48, 194, 224, 0.12);
}

.entity-card__actions {
  display: flex;
  gap: 0.35rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.entity-card__action {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  height: 1.9rem;
  padding: 0 0.4rem;
  color: rgba(225, 236, 242, 0.88);
  font-size: 0.66rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  cursor: pointer;
  transition:
    background 140ms ease,
    border-color 140ms ease;
}

.entity-card__action .material-symbols-outlined {
  font-size: 0.95rem;
}

.entity-card__action:hover,
.entity-card__action:focus-visible {
  background: rgba(48, 194, 224, 0.12);
  border-color: rgba(48, 194, 224, 0.45);
}

.entity-card__action--ask {
  color: #ffb877;
}

.entity-card__action--ask:hover,
.entity-card__action--ask:focus-visible {
  background: rgba(255, 159, 67, 0.12);
  border-color: rgba(255, 159, 67, 0.5);
}

.entity-card__nearby {
  margin-top: 0.65rem;
}

.entity-card__nearby h4 {
  margin: 0 0 0.25rem;
  color: rgba(199, 214, 222, 0.5);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.06rem;
  text-transform: uppercase;
}

.entity-card__nearby ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.entity-card__nearby button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.3rem 0.35rem;
  color: rgba(225, 236, 242, 0.85);
  font-size: 0.68rem;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.entity-card__nearby button:hover,
.entity-card__nearby button:focus-visible {
  background: rgba(255, 255, 255, 0.06);
}

.entity-card__nearby .material-symbols-outlined {
  color: rgba(199, 214, 222, 0.6);
  font-size: 0.95rem;
}

.entity-card__row-title {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-card__row-title small {
  color: rgba(199, 214, 222, 0.45);
  font-size: 0.56rem;
}

.entity-card__row-meta {
  flex: none;
  color: rgba(199, 214, 222, 0.55);
  font-family: var(--font-mono);
  font-size: 0.6rem;
}

.entity-card-enter-active,
.entity-card-leave-active {
  transition:
    opacity 200ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.entity-card-enter-from,
.entity-card-leave-to {
  opacity: 0;
  transform: translateY(-6px);
}

@keyframes entity-card-pulse {
  50% {
    opacity: 0.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .entity-card-enter-active,
  .entity-card-leave-active {
    transition: opacity 120ms ease;
  }

  .entity-card-enter-from,
  .entity-card-leave-to {
    transform: none;
  }

  .entity-card__status--live::before {
    animation: none;
  }
}

/* The Properties tab shows only the layers' settings. The idle hint gives
   way to the view summary, and Contacts' Cockpit entry to the card's own
   while the card offers one. */
#global-context-panel[data-context-tab='props']
  :is(.global-context-modes, .context-mode-view, #radio-panel),
#global-context-panel #context-mode-standby,
#global-context-panel:has([data-entity-cockpit-entry]) #cockpit-entry {
  display: none !important;
}

#global-context-panel .global-context-actions:has(#tr3b-toggle:not([hidden])) {
  grid-template-columns: minmax(0, 1fr) auto;
}

.context-empty {
  display: grid;
  justify-items: start;
  gap: 6px;
  padding: 14px 4px 6px;
  color: var(--text-secondary);
  font: 12px/1.45 var(--font-sans);
}

.context-empty .material-symbols-outlined {
  color: var(--accent);
  font-size: 22px;
}

.context-empty strong {
  color: var(--text-primary);
  font: 600 11px/1.2 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* A warning leads the card, above the name: an emergency, a tsunami flag. */
.entity-card__warning {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0.55rem 0 0;
  padding: 0.4rem 0.55rem;
  color: #ffd6d0;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.35;
  background: rgba(255, 75, 62, 0.16);
  border: 1px solid rgba(255, 75, 62, 0.55);
  border-radius: 7px;
}

.entity-card__warning .material-symbols-outlined {
  flex: none;
  color: #ff6b5e;
  font-size: 1rem;
}

/* Where the card's data comes from, and how fresh it is. */
.entity-card__source {
  margin: 0.6rem 0 0;
  padding-top: 0.45rem;
  color: rgba(199, 214, 222, 0.5);
  font-size: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.entity-card__source span {
  letter-spacing: 0.06rem;
  text-transform: uppercase;
}

/* Open, Context fills the right column top to bottom, its card scrolling
   inside rather than the panel growing and shrinking with each selection. */
#right-context-rail > #global-context-panel:not(.collapsed),
#right-context-rail.layout-focus > #global-context-panel:not(.collapsed) {
  flex: 0 0 var(--right-stack-max-height, auto);
  height: var(--right-stack-max-height, auto);
  max-height: var(--right-stack-max-height, 100%);
}

#right-context-rail
  > #global-context-panel:not(.collapsed)
  .global-context-panel-inner {
  height: 100%;
}

/* The icon font's own rules (display: block, 24px) beat the badge's; keep
   the glyph centred in its square at the badge's size. */
.entity-card__head .entity-card__icon.material-symbols-outlined {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 1.9rem;
  height: 1.9rem;
  font-size: 1.1rem;
  line-height: 1;
  overflow: hidden;
}

/* The aircraft's model, turning at the top of its card on a soft spotlight. */

/* Origin to destination, as one line with the craft on it. */
.entity-card__route {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.15rem 0 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.entity-card__route-line {
  position: relative;
  display: grid;
  flex: 1;
  place-items: center;
  height: 1rem;
  background: linear-gradient(
      90deg,
      rgba(199, 214, 222, 0.35) 50%,
      transparent 0
    )
    center / 7px 1px repeat-x;
}

.entity-card__route-line .material-symbols-outlined {
  padding: 0 0.25rem;
  color: #36dcff;
  font-size: 0.95rem;
  background: rgba(40, 44, 52, 1);
  transform: rotate(90deg);
}

/* Headline figures: big numbers, small labels. */
.entity-card__tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0.2rem 0 0.55rem;
}

.entity-card__tile {
  display: grid;
  gap: 0.2rem;
  padding: 0.45rem 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
}

.entity-card__tile span {
  color: rgba(199, 214, 222, 0.5);
  font-size: 0.54rem;
  letter-spacing: 0.06rem;
  text-transform: uppercase;
}

.entity-card__tile strong {
  overflow: hidden;
  color: rgba(236, 244, 248, 0.95);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The callout on the turning model, in the frame's top-left corner. The
   leader sits under the text: a dot near the craft lights first, the line
   draws from it up to the corner, then the label and value fade in. */

/* The parts legend and the scan caption, bottom right of the model. */

/* ── Card, second pass ──────────────────────────────────────────────────
   One surface: inside Context the card is the panel's content, not a box in
   a box. Identity leads (kind, name, who and what), then status and place,
   the model, headline figures, details, actions, what is near, the source. */
#global-context-panel .entity-card,
#global-context-panel .view-context {
  margin: 0;
  padding: 0.15rem 0 0.4rem;
  background: none;
  border: 0;
  border-radius: 0;
}

.entity-card__head {
  align-items: flex-start;
  gap: 0.6rem;
}

.entity-card__name {
  display: grid;
  flex: 1;
  gap: 0.12rem;
  min-width: 0;
}

#entity-card .entity-card__kind {
  display: block;
  color: rgba(199, 214, 222, 0.5);
  font-size: 0.56rem;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

#entity-card .entity-card__title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.1;
  letter-spacing: 0.03rem;
}

.entity-card__subtitle {
  overflow: hidden;
  color: rgba(225, 236, 242, 0.72);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
  margin: 0.55rem 0 0.15rem;
}

#entity-card .entity-card__where {
  margin: 0;
  font-size: 0.6rem;
}

/* The model sits edge to edge under the name, framed by hairlines. */

/* Tiles: the number leads, its unit sits small beside it. */
#entity-card .entity-card__tile strong {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

#entity-card .entity-card__tile small {
  color: rgba(199, 214, 222, 0.6);
  font-size: 0.6rem;
  font-weight: 500;
}

/* Sections get a quiet heading with a hairline under it. */
.entity-card__section {
  margin-top: 0.75rem;
}

.entity-card__section > h4,
#entity-card .entity-card__nearby h4 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.35rem;
  padding-bottom: 0.3rem;
  color: rgba(199, 214, 222, 0.55);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.entity-card__section > h4 span {
  padding: 0 0.3rem;
  color: rgba(54, 220, 255, 0.85);
  font-family: var(--font-mono);
  background: rgba(54, 220, 255, 0.1);
  border-radius: 999px;
}

/* Actions: the three moves in a row, then asking GEV across the width. */
#entity-card .entity-card__actions {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.8rem;
  padding-top: 0;
  border-top: 0;
}

.entity-card__action-row {
  display: flex;
  gap: 0.35rem;
}

#entity-card .entity-card__action--ask {
  width: 100%;
  height: 2.1rem;
  color: #ffb86b;
  background: rgba(255, 159, 67, 0.08);
  border-color: rgba(255, 159, 67, 0.35);
}

#entity-card .entity-card__action--ask:hover,
#entity-card .entity-card__action--ask:focus-visible {
  background: rgba(255, 159, 67, 0.16);
  border-color: rgba(255, 159, 67, 0.6);
}

/* ── Callout states ──────────────────────────────────────────────────────
   Enter 0-2.3 s (dot, leader, text), hold to 5.2 s (dot breathes, timer
   fills), exit over 1 s (text, then leader back into the dot, then dot). */

/* Exit: text first, then the leader retracts toward the dot, then the dot. */

/* The route on its small globe, and the Route / Model switch above it. */

/* A scheduled route that does not fit the plane's position: amber, dashed,
   with a note, so it cannot pass for the flight's actual route. */
.entity-card__route--unverified strong {
  color: #ffb86b;
}

.entity-card__route--unverified .entity-card__route-line {
  background-image: linear-gradient(
    90deg,
    rgba(255, 184, 107, 0.55) 50%,
    transparent 0
  );
}

.entity-card__route--unverified
  .entity-card__route-line
  .material-symbols-outlined {
  color: #ffb86b;
}

.entity-card__route-note {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin: -0.3rem 0 0.55rem;
  color: rgba(255, 184, 107, 0.85);
  font-size: 0.6rem;
}

.entity-card__route-note .material-symbols-outlined {
  font-size: 0.85rem;
}

/* Route progress: the line filled from the origin up to the plane, which
   sits at its share of the way, and dashed beyond it to the destination. */
.entity-card__route--progress .entity-card__route-line {
  display: block;
  background:
    linear-gradient(90deg, #36dcff, #36dcff) left center /
      var(--route-share, 0%) 2px no-repeat,
    linear-gradient(90deg, rgba(199, 214, 222, 0.35) 50%, transparent 0)
      center / 7px 1px repeat-x;
  transition: background-size 600ms ease;
}

.entity-card__route--progress
  .entity-card__route-line
  .material-symbols-outlined {
  position: absolute;
  top: 50%;
  left: var(--route-share, 0%);
  padding: 0 0.15rem;
  transform: translate(-50%, -50%) rotate(90deg);
  transition: left 600ms ease;
}

.entity-card__route-stats {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin: -0.3rem 0 0.6rem;
  color: rgba(199, 214, 222, 0.6);
  font-family: var(--font-mono);
  font-size: 0.58rem;
}

/* The route globe's corner label: each airport's code over its city and
   state, on a soft scrim so it reads over the imagery. */

/* The airports' cities, under the progress bar: origin left, destination right. */
.entity-card__route-places {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin: -0.35rem 0 0.65rem;
  color: rgba(225, 236, 242, 0.75);
  font-size: 0.64rem;
}

.entity-card__route-places span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-card__route-places span:last-child {
  text-align: right;
}

/* While the preview takes turns, a hairline under the active tab fills until
   the switch; a tab the viewer picked stays put and shows no timer. */
/* The minimap's compass, top right: north at the top (the view is north up),
   the cyan needle on the course to the destination, its bearing beneath. */

/* Follow, while the camera is on the craft. */
#entity-card .entity-card__action--on {
  color: #36dcff;
  background: rgba(54, 220, 255, 0.12);
  border-color: rgba(54, 220, 255, 0.45);
}

/* ── Context refinements: one heading style, one tile style, even rhythm ── */
.spot-conditions__block h4,
.entity-card__section h4,
.entity-card__nearby h4 {
  margin: 0 0 0.4rem;
  color: rgba(199, 214, 222, 0.55);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.14rem;
  text-transform: uppercase;
}

.spot-conditions__block,
.entity-card__section {
  margin-top: 0.85rem;
}

.entity-card__tile,
.spot-conditions__weather {
  border-radius: 8px;
  border-color: rgba(255, 255, 255, 0.07);
}

/* ── Selected camera: thumbnail, facts, More info ── */
.cctv-preview {
  display: grid;
  gap: 0.5rem;
  margin: 0.5rem 0 0.75rem;
}

.cctv-preview__frame {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #05080b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.cctv-preview__frame img,
.cctv-preview__live {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cctv-preview__frame.is-empty span:first-child {
  color: rgba(199, 214, 222, 0.5);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
}

.cctv-preview__badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 2px 7px;
  color: #4be3a0;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1rem;
  background: rgba(5, 8, 11, 0.8);
  border: 1px solid rgba(75, 227, 160, 0.45);
  border-radius: 999px;
}

.cctv-preview__name {
  margin: 0;
  color: rgba(236, 244, 248, 0.94);
  font-size: 0.78rem;
}

.cctv-preview__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0;
}

.cctv-preview__facts div {
  padding: 0.35rem 0.5rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 7px;
}

.cctv-preview__facts dt {
  color: rgba(199, 214, 222, 0.5);
  font-size: 0.52rem;
  letter-spacing: 0.06rem;
  text-transform: uppercase;
}

.cctv-preview__facts dd {
  overflow: hidden;
  margin: 0.1rem 0 0;
  color: rgba(236, 244, 248, 0.92);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cctv-preview__more {
  justify-content: center;
}

.cctv-preview__expand {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  color: rgba(236, 244, 248, 0.9);
  background: rgba(5, 8, 11, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  cursor: pointer;
}

.cctv-preview__expand .material-symbols-outlined {
  font-size: 15px;
}

.cctv-preview__expand:hover,
.cctv-preview__expand:focus-visible {
  color: #7af0ff;
  border-color: rgba(54, 220, 255, 0.6);
}

/* ── Bigger camera view ── */
.cctv-popup {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: rgba(2, 4, 8, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: cctv-popup-in 160ms ease;
}

@keyframes cctv-popup-in {
  from {
    opacity: 0;
  }
}

.cctv-popup__card {
  display: grid;
  gap: 0.6rem;
  width: min(960px, 92vw);
  margin: 0;
  padding: 0.7rem;
  background: rgba(12, 12, 20, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.cctv-popup__head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.2rem;
  color: rgba(236, 244, 248, 0.94);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.cctv-popup__head > .material-symbols-outlined {
  color: #36dcff;
  font-size: 18px;
}

.cctv-popup__badge {
  padding: 2px 8px;
  color: #4be3a0;
  font-size: 0.55rem;
  letter-spacing: 0.1rem;
  border: 1px solid rgba(75, 227, 160, 0.45);
  border-radius: 999px;
}

/* A UiCloseButton (close-button.css). */
.cctv-popup__close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-inline-start: auto;
  color: rgba(236, 244, 248, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.cctv-popup__close:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.cctv-popup__card img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: #000;
  border-radius: 8px;
}

.cctv-popup__card figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  padding: 0 0.2rem 0.1rem;
  color: rgba(199, 214, 222, 0.6);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

.cctv-popup__card figcaption b {
  color: rgba(236, 244, 248, 0.92);
  font-weight: 500;
}

/* CCTV, open, fills the right column top to bottom like Context. */
#right-context-rail > #cctv-panel:not(.collapsed),
#right-context-rail.layout-focus > #cctv-panel:not(.collapsed) {
  flex: 0 0 var(--right-stack-max-height, auto);
  height: var(--right-stack-max-height, auto);
  max-height: var(--right-stack-max-height, 100%);
}

#right-context-rail > #cctv-panel:not(.collapsed) > .cctv-panel-inner,
#right-context-rail > #cctv-panel:not(.collapsed) > [class$='-inner'] {
  height: 100%;
}

/* ── Hero tile ───────────────────────────────────────────────────────────
   One slot at the top of every card: an aircraft's route globe and turning
   model, a camera's frame, or a quiet placeholder with the item's icon and
   name. */
.entity-hero {
  position: relative;
  margin: 0 0 0.6rem;
  overflow: hidden;
  border-radius: 10px;
}

/* Both previews fill the tile, one over the other; the hidden one keeps its
   size, so showing it needs no layout and no fresh canvas. */

.entity-hero .cctv-preview {
  margin: 0;
}

.entity-hero__placeholder {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.9rem;
  min-height: 84px;
  padding: 0.7rem 0.9rem;
  background:
    radial-gradient(
      ellipse 45% 90% at 12% 50%,
      rgba(54, 220, 255, 0.1),
      transparent 70%
    ),
    rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
}

.entity-hero__placeholder--bare {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 0.3rem;
  text-align: center;
}

.entity-hero__glyph.material-symbols-outlined {
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  color: #36dcff;
  font-size: 1.9rem;
  background: rgba(54, 220, 255, 0.08);
  border: 1px solid rgba(54, 220, 255, 0.18);
  border-radius: 50%;
}

.entity-hero__figures {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  min-width: 0;
}

.entity-hero__figure {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.entity-hero__figure strong {
  overflow: hidden;
  color: rgba(240, 247, 250, 0.98);
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-hero__figure strong small {
  margin-inline-start: 0.2rem;
  color: rgba(199, 214, 222, 0.7);
  font-size: 0.62rem;
  font-weight: 500;
}

.entity-hero__figure span,
.entity-hero__kind {
  color: rgba(199, 214, 222, 0.55);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
}

/* ── Cockpit leads an aircraft's actions ─────────────────────────────── */
#entity-card .entity-card__action--primary {
  width: 100%;
  height: 2.3rem;
  color: #04131a;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04rem;
  background: #36dcff;
  border-color: #36dcff;
  box-shadow: 0 0 18px rgba(54, 220, 255, 0.28);
}

#entity-card .entity-card__action--primary:hover,
#entity-card .entity-card__action--primary:focus-visible {
  color: #04131a;
  background: #7be8ff;
  border-color: #7be8ff;
}

/* Following is a state, not the main action: outlined, not filled. */
#entity-card .entity-card__action--on {
  background: transparent;
}

/* An aircraft's altitude as a filled graph, graded by height: bright at
   the top, fading towards the baseline. */
.altitude-graph {
  margin: 0 0 0.7rem;
  padding: 0.5rem 0.6rem 0.45rem;
  border: 1px solid rgba(160, 200, 220, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.altitude-graph__head,
.altitude-graph__foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0;
}

.altitude-graph__label,
.altitude-graph__foot {
  color: rgba(199, 214, 222, 0.6);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.altitude-graph__now {
  color: #eef6fa;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
}

.altitude-graph__plot {
  position: relative;
  height: 3.4rem;
  margin: 0.35rem 0 0.3rem;
  border-bottom: 1px solid rgba(160, 200, 220, 0.22);
  background: repeating-linear-gradient(
    to bottom,
    rgba(160, 200, 220, 0.08) 0 1px,
    transparent 1px 25%
  );
}

.altitude-graph__plot svg {
  display: block;
  width: 100%;
  height: 100%;
}

.altitude-graph__stop--high {
  stop-color: var(--accent);
  stop-opacity: 0.75;
}

.altitude-graph__stop--mid {
  stop-color: var(--accent);
  stop-opacity: 0.3;
}

.altitude-graph__stop--low {
  stop-color: var(--accent);
  stop-opacity: 0.04;
}

.altitude-graph__line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.altitude-graph__head-dot {
  position: absolute;
  right: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  transform: translateY(-50%);
}

.altitude-graph__scale {
  position: absolute;
  top: 1px;
  left: 2px;
  color: rgba(199, 214, 222, 0.45);
  font-family: var(--font-mono);
  font-size: 0.5rem;
}

.altitude-graph[data-trend='up'] .altitude-graph__change {
  color: #7fe0a8;
}

.altitude-graph[data-trend='down'] .altitude-graph__change {
  color: #f0b46a;
}

.altitude-graph__scale--low {
  top: auto;
  bottom: 1px;
}

/* The compact graph: caption, figure and a short line, nothing else. */
.altitude-graph--compact {
  padding-bottom: 0.5rem;
}

.altitude-graph--compact .altitude-graph__plot {
  height: 1.9rem;
  margin-bottom: 0;
  background: none;
}

/* ── Card previews: the photo, route globe, turning model, cockpit view and
   satellite ground view in the hero tile ─────────────────────────────── */

.aircraft-hero {
  position: relative;
  height: 150px;
  margin: 0.55rem -0.25rem 0.2rem;
  overflow: hidden;
  background:
    radial-gradient(
      ellipse 60% 55% at 50% 58%,
      rgba(54, 220, 255, 0.14),
      transparent 70%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0));
  border-radius: 8px;
}

.aircraft-hero__scene,
.aircraft-hero__scene .cesium-widget,
.aircraft-hero__scene canvas {
  width: 100% !important;
  height: 100% !important;
}

.aircraft-hero__scene canvas {
  display: block;
}
.aircraft-hero__callout {
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 1;
  display: grid;
  gap: 1px;
  max-width: 62%;
  pointer-events: none;
}

.aircraft-hero__label,
.aircraft-hero__value {
  opacity: 0;
  animation: aircraft-hero-text 700ms ease-out 200ms forwards;
}

.aircraft-hero__value {
  animation-delay: 1650ms;
}

.aircraft-hero__label {
  color: rgba(54, 220, 255, 0.75);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
}

.aircraft-hero__value {
  overflow: hidden;
  color: #e8fbff;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.aircraft-hero-callout-leave-active {
  transition:
    opacity 600ms ease-in,
    filter 600ms ease-in;
}

.aircraft-hero-callout-leave-to {
  opacity: 0;
  filter: blur(2px);
}

@keyframes aircraft-hero-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes aircraft-hero-dot {
  from {
    opacity: 0;
    transform: scale(0);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes aircraft-hero-text {
  from {
    opacity: 0;
    transform: translateX(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aircraft-hero__label,
  .aircraft-hero__value {
    animation: none;
    opacity: 1;
    stroke-dashoffset: 0;
  }
  .aircraft-hero-callout-leave-active {
    transition: none;
  }
}
.aircraft-hero__scan {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 1;
  margin: 0;
  pointer-events: none;
}

.aircraft-hero__scan {
  color: #36dcff;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.14rem;
  text-transform: uppercase;
  animation: aircraft-hero-blink 1.1s steps(1, end) infinite;
}

@keyframes aircraft-hero-blink {
  50% {
    opacity: 0.35;
  }
}

.aircraft-hero-legend-enter-active,
.aircraft-hero-legend-leave-active {
  transition: opacity 500ms ease;
}

.aircraft-hero-legend-enter-from,
.aircraft-hero-legend-leave-to {
  opacity: 0;
}
#entity-card .aircraft-hero {
  height: 168px;
  margin: 0.55rem 0 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0;
}
.aircraft-hero__label {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}

.aircraft-hero__label em {
  color: rgba(199, 214, 222, 0.4);
  font-style: normal;
  letter-spacing: 0.04rem;
}

.aircraft-hero__timer {
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 4px;
  background:
    linear-gradient(90deg, rgba(54, 220, 255, 0.7), rgba(54, 220, 255, 0.7))
      left / 0 100% no-repeat,
    rgba(255, 255, 255, 0.08);
  opacity: 0;
  animation:
    aircraft-hero-text 300ms ease-out 2000ms forwards,
    aircraft-hero-timer 2900ms linear 2300ms forwards;
}

.aircraft-hero__label,
.aircraft-hero__value {
  animation-name: aircraft-hero-slide;
}
.aircraft-hero-callout-leave-active .aircraft-hero__label,
.aircraft-hero-callout-leave-active .aircraft-hero__value,
.aircraft-hero-callout-leave-active .aircraft-hero__timer {
  opacity: 1;
  animation: aircraft-hero-fade-out 350ms ease-in forwards;
}

.aircraft-hero-callout-leave-active .aircraft-hero__timer {
  background-size:
    100% 100%,
    auto;
}

.aircraft-hero-callout-leave-active,
.aircraft-hero-callout-leave-to {
  transition: none;
  opacity: 1;
  filter: none;
}

@keyframes aircraft-hero-slide {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes aircraft-hero-timer {
  to {
    background-size:
      100% 100%,
      auto;
  }
}

@keyframes aircraft-hero-breathe {
  50% {
    opacity: 0.45;
  }
}

@keyframes aircraft-hero-fade-out {
  to {
    opacity: 0;
    transform: translateX(-4px);
  }
}

@keyframes aircraft-hero-retract {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: 1;
  }
}

@keyframes aircraft-hero-dot-out {
  to {
    opacity: 0;
    transform: scale(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .aircraft-hero__timer,
  .aircraft-hero-callout-leave-active .aircraft-hero__label,
  .aircraft-hero-callout-leave-active .aircraft-hero__value {
    animation: none;
  }
  .aircraft-hero__timer {
    opacity: 1;
  }
}
.route-globe {
  position: relative;
  height: 168px;
  margin: 0.35rem 0 0.6rem;
  overflow: hidden;
  background: radial-gradient(
    ellipse 55% 60% at 50% 55%,
    rgba(54, 220, 255, 0.1),
    transparent 70%
  );
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.route-globe__scene,
.route-globe__scene .cesium-widget,
.route-globe__scene canvas {
  width: 100% !important;
  height: 100% !important;
}

.route-globe__codes {
  position: absolute;
  top: 8px;
  left: 10px;
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
  color: rgba(199, 214, 222, 0.6);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  pointer-events: none;
}

.route-globe__codes strong {
  color: #e8fbff;
  font-size: 0.8rem;
}

.entity-card__preview-switch {
  display: inline-flex;
  gap: 2px;
  margin-top: 0.55rem;
  padding: 2px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
}

.entity-card__preview-switch button {
  padding: 0.22rem 0.6rem;
  color: rgba(199, 214, 222, 0.65);
  font-size: 0.6rem;
  letter-spacing: 0.06rem;
  text-transform: uppercase;
  background: none;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
}

.entity-card__preview-switch button.active {
  color: #36dcff;
  background: rgba(54, 220, 255, 0.12);
}
.route-globe__codes {
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.3rem 0.5rem 0.35rem;
  background: rgba(6, 12, 16, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.route-globe__end {
  display: grid;
  gap: 1px;
}

.route-globe__end small {
  max-width: 7.5rem;
  overflow: hidden;
  color: rgba(199, 214, 222, 0.7);
  font-family: var(--font-sans, inherit);
  font-size: 0.56rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-globe__arrow {
  padding-top: 0.05rem;
  color: rgba(54, 220, 255, 0.8);
}
.route-globe__compass {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  justify-items: center;
  gap: 2px;
  pointer-events: auto;
}

.route-globe__compass svg {
  width: 46px;
  height: 46px;
  overflow: visible;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}

.route-globe__compass-ring {
  fill: rgba(6, 12, 16, 0.6);
  stroke: rgba(199, 214, 222, 0.35);
  stroke-width: 1;
}

.route-globe__compass-ticks line {
  stroke: rgba(199, 214, 222, 0.55);
  stroke-width: 1;
}

.route-globe__compass-n {
  fill: #ff6b5e;
  font: 700 7px var(--font-mono);
  text-anchor: middle;
}

.route-globe__compass-needle path {
  fill: #36dcff;
  filter: drop-shadow(0 0 2px rgba(54, 220, 255, 0.8));
}

.route-globe__compass-needle {
  transition: transform 600ms ease;
}

.route-globe__compass-hub {
  fill: #e8fbff;
}

.route-globe__compass span {
  padding: 0 0.3rem;
  color: rgba(225, 236, 242, 0.85);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  background: rgba(6, 12, 16, 0.6);
  border-radius: 3px;
}

.entity-hero:is(
  [data-hero='flight'],
  [data-hero='satellite'],
  [data-hero='photo']
) {
  height: 168px;
  background: radial-gradient(
    ellipse 55% 60% at 50% 55%,
    rgba(54, 220, 255, 0.1),
    rgba(255, 255, 255, 0.02) 70%
  );
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.entity-hero .entity-hero__layer {
  position: absolute;
  inset: 0;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  visibility: hidden;
}

.entity-hero .entity-hero__layer.is-shown {
  visibility: visible;
}

.entity-hero__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entity-hero__photo small {
  position: absolute;
  inset-block-start: 6px;
  inset-inline-end: 6px;
  max-width: calc(100% - 12px);
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(10, 14, 20, 0.86);
  color: #fff;
  font-size: 0.6875rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.entity-hero__photo:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -2px;
}

.entity-hero .entity-card__preview-switch {
  position: absolute;
  z-index: 2;
  bottom: 6px;
  left: 6px;
  margin: 0;
  background: rgba(10, 14, 20, 0.78);
  border-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.satellite-ground {
  overflow: hidden;
  background: #05080b;
}

.satellite-ground__map {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  filter: grayscale(1) brightness(0.78) contrast(1.2);
  transform-origin: 0 0;
}

.satellite-ground__map.is-drifting {
  animation: satellite-ground-drift 9s ease-out both;
}

@keyframes satellite-ground-drift {
  from {
    transform: scale(1.18);
  }
  to {
    transform: scale(1);
  }
}

.satellite-ground__tile {
  position: absolute;
  top: 0;
  left: 0;
  width: 256px;
  height: 256px;
  max-width: none;
  user-select: none;
}

.satellite-ground__rings {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150px;
  height: 150px;
  overflow: visible;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.satellite-ground__ring {
  fill: none;
  stroke: rgba(150, 236, 220, 0.85);
  vector-effect: non-scaling-stroke;
}

.satellite-ground__ring--inner {
  fill: rgba(150, 236, 220, 0.06);
  stroke-width: 1.5;
  animation: satellite-ground-pulse 2.4s ease-in-out infinite;
}

.satellite-ground__ring--middle,
.satellite-ground__ring--outer {
  stroke: rgba(150, 236, 220, 0.5);
  stroke-dasharray: 1 4;
  stroke-linecap: round;
  stroke-width: 1.5;
  transform-origin: 0 0;
  animation: satellite-ground-turn 40s linear infinite;
}

.satellite-ground__ring--outer {
  stroke: rgba(150, 236, 220, 0.3);
  animation-direction: reverse;
}

@keyframes satellite-ground-pulse {
  50% {
    stroke: rgba(150, 236, 220, 0.5);
  }
}

@keyframes satellite-ground-turn {
  to {
    transform: rotate(360deg);
  }
}

.satellite-ground__label {
  position: absolute;
  top: 8px;
  left: 10px;
  display: grid;
  gap: 1px;
  color: rgba(54, 220, 255, 0.75);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
}

.satellite-ground__label strong {
  color: #e8fbff;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.satellite-ground__credit {
  position: absolute;
  right: 8px;
  bottom: 5px;
  color: rgba(225, 236, 242, 0.5);
  font-size: 0.48rem;
}

@media (prefers-reduced-motion: reduce) {
  .satellite-ground__map.is-drifting,
  .satellite-ground__ring {
    animation: none;
  }
}
.preview-hud {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  --hud-line: rgba(200, 236, 248, 0.55);
  --hud-dim: rgba(200, 236, 248, 0.22);
}

.preview-hud__corner {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 0 solid var(--hud-line);
  animation: preview-hud-breathe 3.2s ease-in-out infinite;
}

.preview-hud__corner--tl {
  top: 5px;
  left: 5px;
  border-top-width: 1px;
  border-left-width: 1px;
}
.preview-hud__corner--tr {
  top: 5px;
  right: 5px;
  border-top-width: 1px;
  border-right-width: 1px;
}
.preview-hud__corner--bl {
  bottom: 5px;
  left: 5px;
  border-bottom-width: 1px;
  border-left-width: 1px;
}
.preview-hud__corner--br {
  right: 5px;
  bottom: 5px;
  border-right-width: 1px;
  border-bottom-width: 1px;
  animation-delay: 1.6s;
}
.preview-hud__ruler {
  position: absolute;
  top: 34%;
  right: 9px;
  width: 5px;
  height: 40%;
  background: repeating-linear-gradient(
    to bottom,
    var(--hud-dim) 0 1px,
    transparent 1px 6px
  );
}

.preview-hud__ruler i {
  position: absolute;
  right: -3px;
  width: 8px;
  height: 1px;
  background: #e8fbff;
  box-shadow: 0 0 4px rgba(200, 236, 248, 0.8);
  animation: preview-hud-ride 5.5s ease-in-out infinite alternate;
}
.preview-hud__scale {
  position: absolute;
  bottom: 9px;
  left: 12px;
  width: 38%;
  height: 4px;
  background:
    repeating-linear-gradient(
      to right,
      var(--hud-dim) 0 1px,
      transparent 1px 5px
    ),
    repeating-linear-gradient(
      to right,
      var(--hud-line) 0 1px,
      transparent 1px 25px
    );
  background-size:
    100% 3px,
    100% 4px;
  background-repeat: repeat-x;
  background-position:
    0 bottom,
    0 bottom;
  mask-image: linear-gradient(
    to right,
    transparent,
    #000 20%,
    #000 80%,
    transparent
  );
  animation: preview-hud-crawl 6s linear infinite;
}
.preview-hud__meter {
  position: absolute;
  top: 9px;
  right: 12px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 9px;
}

.preview-hud__meter i {
  width: 2px;
  height: 100%;
  background: var(--hud-line);
  transform-origin: bottom;
  animation: preview-hud-level 1.4s ease-in-out infinite;
}

.preview-hud__meter i:nth-child(2) {
  animation-delay: 0.2s;
}
.preview-hud__meter i:nth-child(3) {
  animation-delay: 0.45s;
}
.preview-hud__meter i:nth-child(4) {
  animation-delay: 0.7s;
}

.preview-hud__meter b {
  width: 4px;
  height: 4px;
  margin: 0 0 3px 4px;
  border-radius: 50%;
  background: #ff5a5a;
  animation: preview-hud-blink 1.2s steps(1, end) infinite;
}
.preview-hud__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 132px;
  height: 132px;
  overflow: visible;
  transform: translate(-50%, -50%);
}

.preview-hud__dash {
  fill: none;
  stroke: var(--hud-dim);
  stroke-dasharray: 2 6;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transform-origin: 0 0;
  animation: preview-hud-turn 30s linear infinite;
}

.preview-hud__ticks {
  stroke: var(--hud-line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.preview-hud--ground .preview-hud__ring {
  display: none;
}
.preview-hud__sweep {
  position: absolute;
  right: 0;
  left: 0;
  height: 22px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(150, 236, 220, 0.08) 80%,
    rgba(150, 236, 220, 0.5) 100%
  );
  animation: preview-hud-sweep 4.5s linear infinite;
}

@keyframes preview-hud-breathe {
  50% {
    opacity: 0.45;
  }
}
@keyframes preview-hud-ride {
  from {
    top: 8%;
  }
  to {
    top: 88%;
  }
}
@keyframes preview-hud-crawl {
  to {
    background-position:
      -25px bottom,
      -25px bottom;
  }
}
@keyframes preview-hud-level {
  0%,
  100% {
    transform: scaleY(0.35);
  }
  50% {
    transform: scaleY(1);
  }
}
@keyframes preview-hud-blink {
  50% {
    opacity: 0.15;
  }
}
@keyframes preview-hud-turn {
  to {
    transform: rotate(360deg);
  }
}
@keyframes preview-hud-sweep {
  from {
    top: -22px;
  }
  to {
    top: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .preview-hud *,
  .preview-hud__dash {
    animation: none !important;
  }

  .preview-hud__sweep {
    display: none;
  }
}
.preview-hud__grid {
  position: absolute;
  border: 1px solid rgba(200, 236, 248, 0.14);
  background:
    repeating-linear-gradient(
      to right,
      rgba(200, 236, 248, 0.14) 0 1px,
      transparent 1px 22px
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(200, 236, 248, 0.14) 0 1px,
      transparent 1px 22px
    );
}

.preview-hud__cell {
  position: absolute;
  top: 0;
  left: 0;
  width: 23px;
  height: 23px;
  border: 1px solid rgba(150, 236, 220, 0.85);
  background: rgba(150, 236, 220, 0.16);
  box-shadow: 0 0 6px rgba(150, 236, 220, 0.35);
  transition: opacity 160ms linear;
}
.preview-hud--ground {
  opacity: 0.4;
}

.preview-hud--ground .preview-hud__grid {
  opacity: 0.6;
}

.preview-hud--ground .preview-hud__cell {
  border-color: rgba(150, 236, 220, 0.5);
  background: rgba(150, 236, 220, 0.08);
  box-shadow: none;
}

.satellite-ground__rings {
  opacity: 0.45;
}
.flight-cockpit {
  overflow: hidden;
  background: #05080b;
}

.flight-cockpit__scene,
.flight-cockpit__scene .cesium-widget,
.flight-cockpit__scene canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.flight-cockpit__horizon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 1px;
  transform: translate(-50%, -50%);
  background: linear-gradient(
    to right,
    rgba(232, 251, 255, 0.7) 0 16px,
    transparent 16px 30px,
    rgba(232, 251, 255, 0.7) 30px
  );
}

.flight-cockpit__horizon i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(232, 251, 255, 0.75);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.flight-cockpit__label {
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 2;
  display: grid;
  gap: 1px;
  color: rgba(54, 220, 255, 0.85);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.flight-cockpit__label strong {
  color: #e8fbff;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04rem;
}

.flight-cockpit__credit {
  position: absolute;
  right: 8px;
  bottom: 5px;
  z-index: 2;
  color: rgba(225, 236, 242, 0.6);
  font-size: 0.48rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
.preview-hud--cockpit {
  opacity: 0.45;
}

.preview-hud--cockpit .preview-hud__ring {
  display: none;
}
.flight-cockpit__tape {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  justify-items: center;
  width: 44px;
  height: 92px;
  transform: translateY(-50%);
  pointer-events: none;
}

.flight-cockpit__tape--speed {
  left: 12px;
}

.flight-cockpit__tape--alt {
  right: 12px;
  width: 52px;
}

.flight-cockpit__ticks {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(232, 251, 255, 0.55) 0 1px,
    transparent 1px 8px
  );
  background-size: 9px 100%;
  background-repeat: repeat-y;
  mask-image: linear-gradient(
    to bottom,
    transparent,
    #000 25%,
    #000 75%,
    transparent
  );
  transition: background-position-y 1.2s linear;
  animation: flight-cockpit-jitter 2.6s ease-in-out infinite;
}

.flight-cockpit__tape--speed .flight-cockpit__ticks {
  background-position-x: right;
  border-right: 1px solid rgba(232, 251, 255, 0.35);
}

.flight-cockpit__tape--alt .flight-cockpit__ticks {
  border-left: 1px solid rgba(232, 251, 255, 0.35);
}

.flight-cockpit__tape b {
  position: relative;
  align-self: center;
  grid-row: 1;
  grid-column: 1;
  min-width: 34px;
  padding: 1px 4px;
  border: 1px solid rgba(232, 251, 255, 0.8);
  background: rgba(5, 8, 11, 0.7);
  color: #e8fbff;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.flight-cockpit__tape em {
  position: absolute;
  bottom: -12px;
  color: rgba(54, 220, 255, 0.85);
  font-family: var(--font-mono);
  font-size: 0.45rem;
  font-style: normal;
  letter-spacing: 0.1rem;
}

@keyframes flight-cockpit-jitter {
  50% {
    transform: translateY(2px);
  }
}

.preview-hud--cockpit .preview-hud__ruler {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .flight-cockpit__ticks {
    animation: none;
    transition: none;
  }
}
.entity-card__preview-switch button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 22px;
  padding: 0;
}

.entity-card__preview-switch button .material-symbols-outlined {
  font-size: 15px;
}

.entity-card__preview-switch button:not(:has(.material-symbols-outlined)) {
  width: auto;
  padding: 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
}
.satellite-ground__credit,
.flight-cockpit__credit {
  left: 8px;
  max-width: none;
  line-height: 1.25;
  text-align: right;
}
.satellite-ground__credit,
.flight-cockpit__credit {
  left: auto;
  max-width: calc(100% - 110px);
}

.view-context__empty {
  margin: 0 0 0.4rem;
  color: rgba(199, 214, 222, 0.7);
  font-size: 0.68rem;
  line-height: 1.45;
}

.view-context {
  margin: 0 0 0.75rem;
  padding: 0.7rem 0.75rem 0.6rem;
  color: rgba(225, 236, 242, 0.92);
  background: rgba(40, 44, 52, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
}

.view-context__title {
  margin: 0.55rem 0 0.1rem;
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.view-context__region {
  margin: 0 0 0.15rem;
  color: rgba(225, 236, 242, 0.7);
  font-size: 0.7rem;
}

.view-context__region--clock {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.45rem;
  white-space: pre;
}

.view-context__region--clock span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-context__region--clock span:last-child {
  flex-shrink: 0;
  max-width: 100%;
}

.view-context__eyebrow,
.view-context__label,
.nearby-lists__title {
  margin: 0;
  color: rgba(199, 214, 222, 0.55);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.14rem;
  text-transform: uppercase;
}

.view-context__tiles--facts .view-context__tile strong {
  display: block;
}

.view-context__tiles--facts .view-context__tile strong:not(.view-context__tile-status) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-context__eyebrow + .view-context__title {
  margin-top: 0.3rem;
}

.view-context__label {
  margin-top: 0.75rem;
  margin-bottom: 0.4rem;
}

/* The weather with layers on, zoomed in, under the place and time. */
.view-context__weather {
  margin-top: 0.6rem;
}

.view-context__weather-credit {
  color: inherit;
  font-size: 0.65rem;
}

.view-context__radius {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.15rem 0.6rem;
  margin-top: 0.7rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.view-context__radius-label {
  color: rgba(199, 214, 222, 0.7);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

.view-context__radius-value {
  color: rgba(240, 247, 250, 0.95);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
}

.view-context__radius-steps {
  display: flex;
  grid-column: 2;
  justify-content: space-between;
  color: rgba(199, 214, 222, 0.45);
  font-family: var(--font-mono);
  font-size: 0.5rem;
}

.view-context__radius-steps .is-on {
  color: #36dcff;
}

.view-context__tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.2rem, 1fr));
  gap: 0.35rem;
}

.view-context__tile-age {
  color: rgba(199, 214, 222, 0.5);
  font-family: var(--font-mono);
  font-size: 0.52rem;
}

.view-context__tiles--facts {
  margin-top: 0.7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.view-context__tile {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
}

.view-context__tile-name {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  color: rgba(199, 214, 222, 0.7);
  font-size: 0.58rem;
  line-height: 1.25;
}

.view-context__tile-name > span:last-child {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow-wrap: break-word;
}

.view-context__tile-name .material-symbols-outlined {
  flex: none;
  color: #36dcff;
  font-size: 0.85rem;
}

.view-context__tile strong {
  /* Tiles in a row are as tall as the tallest; the counts line up below. */
  margin-top: auto;
  color: rgba(240, 247, 250, 0.98);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.1;
}

.view-context__tile strong.view-context__tile-status,
.view-context__tile--value strong {
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.view-context__dot {
  flex: none;
  width: 0.45rem;
  height: 0.45rem;
  background: #4be3a0;
  border-radius: 50%;
}

.view-context__dot--loading {
  background: #36dcff;
}

.view-context__dot--stale,
.view-context__dot--fallback,
.view-context__dot--degraded,
.view-context__dot--partial {
  background: #ffb547;
}

.view-context__dot--unavailable {
  background: #ff5c6c;
}

.view-context__problem,
.view-context__hint {
  margin: 0.5rem 0 0;
  color: rgba(199, 214, 222, 0.65);
  font-size: 0.62rem;
  line-height: 1.45;
}

.view-context__problem {
  color: #ffcf8a;
}

.view-context__blocks {
  display: grid;
  gap: 0.4rem;
}

.view-context__block {
  padding: 0.5rem 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
}

.view-context__block-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  color: rgba(199, 214, 222, 0.8);
  font-size: 0.66rem;
}

.view-context__block-head .entity-mark {
  flex: none;
  color: #36dcff;
  font-size: 0.9rem;
}

.view-context__block-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-context__block-head strong {
  color: rgba(240, 247, 250, 0.98);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
}

.view-context__block-rows {
  margin-top: 0.4rem;
}

.view-context__block-rows ul {
  display: grid;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.view-context__bar {
  display: flex;
  gap: 2px;
  height: 0.3rem;
  margin-top: 0.45rem;
  overflow: hidden;
  border-radius: 3px;
}

.view-context__bar span {
  flex-basis: 0;
  min-width: 2px;
}

.view-context__bar [data-tone='0'],
.view-context__bar-key [data-tone='0']::before {
  background: #36dcff;
}

.view-context__bar [data-tone='1'],
.view-context__bar-key [data-tone='1']::before {
  background: #4be3a0;
}

.view-context__bar [data-tone='2'],
.view-context__bar-key [data-tone='2']::before {
  background: #ffb547;
}

.view-context__bar [data-tone='3'],
.view-context__bar-key [data-tone='3']::before {
  background: #c89bff;
}

.view-context__bar-key [data-tone='4']::before,
.view-context__bar [data-tone='4'] {
  background: rgba(199, 214, 222, 0.35);
}

.view-context__bar-key,
.view-context__count-unit {
  margin: 0.3rem 0 0;
  color: rgba(199, 214, 222, 0.65);
  font-size: 0.56rem;
}

.view-context__bar-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.6rem;
}

.view-context__bar-key span::before {
  content: '';
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin-inline-end: 0.25rem;
  border-radius: 2px;
}

.view-context__pointer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.7rem;
  padding: 0.55rem 0.65rem;
  color: rgba(225, 236, 242, 0.92);
  font: inherit;
  font-size: 0.7rem;
  text-align: start;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  cursor: pointer;
}

.view-context__pointer:hover,
.view-context__pointer:focus-visible {
  background: rgba(54, 220, 255, 0.08);
  border-color: rgba(54, 220, 255, 0.4);
}

.view-context__pointer-text {
  flex: 1;
}

.view-context__pointer-go {
  color: #36dcff;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

.nearby-lists {
  margin-top: 0.85rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.nearby-lists__layer {
  margin-top: 0.45rem;
}

.nearby-lists__head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.2rem;
  color: rgba(199, 214, 222, 0.6);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
}

.nearby-lists__head .material-symbols-outlined {
  font-size: 0.9rem;
}

.nearby-lists__count {
  color: #36dcff;
}

.nearby-lists ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nearby-lists button {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  /* Room at the end for the panel's scrollbar, which draws over the rows. */
  padding-block: 0.3rem;
  padding-inline: 0.4rem 0.75rem;
  color: rgba(225, 236, 242, 0.88);
  font: inherit;
  font-size: 0.68rem;
  text-align: start;
  background: none;
  border: 0;
  border-inline-start: 2px solid transparent;
  border-radius: 4px;
  cursor: pointer;
}

.nearby-lists button:hover,
.nearby-lists button:focus-visible {
  background: rgba(255, 255, 255, 0.06);
}

.nearby-lists__row--nearest button {
  background: rgba(54, 220, 255, 0.07);
  border-inline-start-color: #36dcff;
}

.nearby-lists__name {
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
}

.nearby-lists__badge {
  flex: none;
  padding: 0.05rem 0.3rem;
  color: #36dcff;
  font-family: var(--font-mono);
  font-size: 0.48rem;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  border: 1px solid rgba(54, 220, 255, 0.5);
  border-radius: 3px;
}

.nearby-lists__meta {
  flex: none;
  color: rgba(199, 214, 222, 0.55);
  font-family: var(--font-mono);
  font-size: 0.6rem;
}

.nearby-lists__motion {
  flex: none;
  color: rgba(199, 214, 222, 0.5);
  font-size: 14px;
}

.nearby-lists__motion[data-motion='moving'] {
  color: #5dff9f;
}

.nearby-lists__motion[data-motion='stopped'] {
  color: #ffb86b;
}

.view-context__camera.altitude-graph--compact {
  display: block;
  margin: 0.55rem 0 0;
  padding: 0.5rem 0.6rem;
}

.view-context__camera.altitude-graph--compact .altitude-graph__head {
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
}

.view-context__camera.altitude-graph--compact .altitude-graph__plot {
  height: 1.9rem;
}

.view-context__suggest {
  margin-top: 0.8rem;
}

.view-context__suggest-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.35rem 0 0;
}

.view-context__suggest-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  color: rgba(225, 236, 242, 0.88);
  font-size: 0.62rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

.view-context__suggest-item .material-symbols-outlined {
  color: #36dcff;
  font-size: 0.8rem;
}
/* ── Context expanded ───────────────────────────────────────────────────
   Expanded, Context becomes a full-height column over the right edge of the
   screen. The globe and HUD stay where they are, under it. */
:root {
  --context-dock-width: clamp(360px, 30vw, 460px);
}

/* The column: edge to edge, top to bottom, no rail beside it. */
body.context-docked #right-context-rail {
  z-index: 170;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: var(--context-dock-width) !important;
  max-height: none !important;
  height: 100vh !important;
}

/* The map credits stay readable beside the column: their row ends short of
   it. creditAttribution.test.mjs pins this. `.hud-minimal-active` is a
   page-root class (src/ui/rail/rootClass.js). */
body.context-docked:not(.ui-clean-view):not(.recording-mode) #cesium-credits,
body.context-docked:not(.ui-clean-view):not(.recording-mode) #gev-credits,
body.context-docked:not(.ui-clean-view):not(.recording-mode):is(
    .hud-minimal-active *,
    #intel-hud[data-variant='minimal'].active
  )
  #cesium-credits,
body.context-docked:not(.ui-clean-view):not(.recording-mode):is(
    .hud-minimal-active *,
    #intel-hud[data-variant='minimal'].active
  )
  #gev-credits {
  max-width: calc(100vw - 3rem - var(--context-dock-width));
}

body.context-docked #right-context-rail > .gev-panel-rail {
  display: none;
}

/* The Bhote Koshi panel stays beside the expanded column while open so its
   evidence controls remain accessible. */
body.context-docked
  #right-context-rail:not(.bhote-event-active)
  > :not(#global-context-panel):not(.gev-panel-rail) {
  display: none !important;
}

body.context-docked #right-context-rail > #global-context-panel {
  flex: 1 1 auto !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
}

body.context-docked #global-context-panel .global-context-panel-inner {
  height: 100%;
  padding: 22px 24px 16px;
  background: rgba(10, 11, 16, 0.94);
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  box-shadow: -18px 0 40px rgba(0, 0, 0, 0.35);
}

body.context-docked #global-context-panel .panel-glow {
  display: none;
}

/* The expand button sits beside the collapse button in the header. */
.context-dock-btn {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-inline-end: 6px;
  padding: 0;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: var(--btn-radius);
  cursor: pointer;
}

.context-dock-btn .material-symbols-outlined {
  font-size: 16px;
}

.context-dock-btn:hover,
.context-dock-btn:focus-visible,
.context-dock-btn[aria-pressed='true'] {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: var(--accent-dim);
}

/* Phones keep their sheets; the dock is a desktop layout. */
body.mobile-shell .context-dock-btn {
  display: none;
}

/* Context's own search field, under the header: narrows what the panel shows.
   Sized and framed like the tab bar beneath it. */
/* A UiSearchField (search-field.css). */
.context-search {
  position: sticky;
  top: 0;
  z-index: 2;
  flex: none;
  box-sizing: border-box;
  gap: 8px;
  min-height: 34px;
  margin: 0 0 0.5rem;
  padding: 0 6px 0 10px;
  color: rgba(199, 214, 222, 0.65);
  background: rgba(16, 22, 28, 0.94);
  border: 1px solid rgba(54, 220, 255, 0.35);
  border-radius: 10px;
  backdrop-filter: blur(8px);
}

.context-search:focus-within {
  color: #7af0ff;
  border-color: rgba(54, 220, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(54, 220, 255, 0.1);
}

.context-search .material-symbols-outlined {
  font-size: 17px;
}

.context-search__input::placeholder {
  color: rgba(199, 214, 222, 0.45);
}

.context-search__input {
  flex: 1;
  height: 100%;
  padding: 0;
  color: var(--text-primary, #e8eaed);
  font: inherit;
  font-size: 0.74rem;
  line-height: 32px;
  outline: 0;
}

.context-search__input::-webkit-search-cancel-button {
  display: none;
}

/* A UiCloseButton (close-button.css). */
.context-search__clear {
  display: grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  color: rgba(199, 214, 222, 0.65);
  border-radius: 50%;
}

.context-search__clear:hover,
.context-search__clear:focus-visible {
  color: var(--accent);
}

.entity-card__no-match {
  margin: 0 0 0.7rem;
  color: rgba(199, 214, 222, 0.6);
  font-size: 0.66rem;
}

.context-search__input:focus,
.context-search__input:focus-visible {
  outline: 0;
  box-shadow: none;
}

/* During a search, keep the radius and matching rows in view. A matching
   globe group keeps its layer name and loaded total. The Data Layers pointer stays. */
.context-searching
  :is(
    .spot-conditions__weather,
    .spot-conditions__loading,
    .spot-conditions__source,
    .view-context__tiles,
    .view-context__label,
    .view-context__hint,
    .view-context__problem,
    .view-context__suggest,
    .view-context__bar,
    .view-context__bar-key,
    .altitude-graph,
    .entity-card__route,
    .entity-card__route-stats,
    .entity-card__route-places,
    .entity-card__route-note,
    .entity-card__links
  ) {
  display: none;
}

/* With the minimal HUD the credits sit at the bottom right, where the
   column is: they move out to its left. */
body.context-docked:not(.ui-clean-view):not(.recording-mode):is(
    .hud-minimal-active *,
    #intel-hud[data-variant='minimal'].active
  )
  :is(#cesium-credits, #gev-credits) {
  right: calc(36px + var(--context-dock-width));
}

/* Right to left, the rail sits on the left edge (rtl.css), and so does the
   expanded column; the credits start past it. */
html[dir='rtl']
  body.context-docked:not(.ui-clean-view):not(.recording-mode)
  :is(#cesium-credits, #gev-credits) {
  left: calc(36px + var(--context-dock-width));
}

html[dir='rtl']
  body.context-docked:not(.ui-clean-view):not(.recording-mode):is(
    .hud-minimal-active *,
    #intel-hud[data-variant='minimal'].active
  )
  :is(#cesium-credits, #gev-credits) {
  right: 36px;
  left: auto;
}

html[dir='rtl'] body.context-docked #right-context-rail {
  right: auto !important;
  left: 0 !important;
}

html[dir='rtl']
  body.context-docked
  #global-context-panel
  .global-context-panel-inner {
  border-left: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 18px 0 40px rgba(0, 0, 0, 0.35);
}
/* ── Conditions around a spot (entity card, In view) ────────────────────── */
.spot-conditions {
  display: grid;
  gap: 0.6rem;
  margin: 0.5rem 0 0.75rem;
}

.spot-conditions__weather {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.3rem 0.65rem;
  padding: 0.6rem 0.7rem;
  background: linear-gradient(135deg, rgba(54, 220, 255, 0.09), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(54, 220, 255, 0.16);
  border-radius: 10px;
}

.spot-conditions__weather-icon {
  color: #36dcff;
  font-size: 2rem;
}

.spot-conditions__weather-now {
  display: grid;
  gap: 0.1rem;
}

.spot-conditions__weather-now strong {
  color: rgba(240, 247, 250, 0.98);
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
}

.spot-conditions__weather-now span {
  color: rgba(199, 214, 222, 0.72);
  font-size: 0.68rem;
}

.spot-conditions__weather-facts {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.3rem;
  margin: 0.25rem 0 0;
}

.spot-conditions__weather-facts div {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.spot-conditions__weather-facts dt {
  color: rgba(199, 214, 222, 0.5);
  font-size: 0.52rem;
  letter-spacing: 0.06rem;
  text-transform: uppercase;
}

.spot-conditions__weather-facts dd {
  overflow: hidden;
  margin: 0;
  color: rgba(236, 244, 248, 0.92);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spot-conditions__loading,
.spot-conditions__none {
  margin: 0;
  color: rgba(199, 214, 222, 0.55);
  font-size: 0.66rem;
}

.spot-conditions__block h4 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.25rem;
  color: rgba(199, 214, 222, 0.6);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.06rem;
  text-transform: uppercase;
}

.spot-conditions__block h4 .material-symbols-outlined {
  font-size: 0.95rem;
}

.spot-conditions__count {
  margin-inline-start: auto;
  color: rgba(199, 214, 222, 0.6);
  font-family: var(--font-mono);
}

.spot-conditions__count--hot {
  color: #ffb547;
}

.spot-conditions__query {
  overflow: hidden;
  margin-inline-start: auto;
  max-width: 50%;
  color: rgba(199, 214, 222, 0.45);
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.spot-conditions__block ul {
  display: grid;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.spot-conditions__block button,
.spot-conditions__block a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.4rem 0.5rem;
  color: inherit;
  text-align: start;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 2px solid var(--hazard-tone, rgba(54, 220, 255, 0.5));
  border-radius: 7px;
  cursor: pointer;
}

.spot-conditions__block button:hover,
.spot-conditions__block a:hover,
.spot-conditions__block button:focus-visible,
.spot-conditions__block a:focus-visible {
  background: rgba(54, 220, 255, 0.08);
  border-color: rgba(54, 220, 255, 0.25);
  border-left-color: var(--hazard-tone, #36dcff);
}

.spot-conditions__block button > .material-symbols-outlined {
  color: var(--hazard-tone, #36dcff);
  font-size: 1.05rem;
}

.spot-conditions__hazard--quake { --hazard-tone: #ffd166; }
.spot-conditions__hazard--storm { --hazard-tone: #c792ff; }
.spot-conditions__hazard--wildfire,
.spot-conditions__hazard--hotspots { --hazard-tone: #ff7a45; }
.spot-conditions__hazard--alert { --hazard-tone: #ff5c6c; }

.spot-conditions__row-main {
  display: grid;
  flex: 1 1 auto;
  gap: 0.08rem;
  min-width: 0;
}

.spot-conditions__row-title {
  overflow: hidden;
  color: rgba(236, 244, 248, 0.94);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spot-conditions__row-title--wrap {
  display: -webkit-box;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.spot-conditions__row-detail {
  overflow: hidden;
  color: rgba(199, 214, 222, 0.55);
  font-size: 0.6rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spot-conditions__row-layer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  color: rgba(199, 214, 222, 0.5);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.spot-conditions__row-dot {
  width: 6px;
  height: 6px;
  border: 1px solid rgba(199, 214, 222, 0.55);
  border-radius: 50%;
}

.spot-conditions__row-layer.is-on {
  color: rgba(0, 212, 255, 0.85);
}

.spot-conditions__row-layer.is-on .spot-conditions__row-dot {
  background: #00d4ff;
  border-color: #00d4ff;
  box-shadow: 0 0 5px rgba(0, 212, 255, 0.7);
}

.spot-conditions__row-meta {
  flex: none;
  color: rgba(199, 214, 222, 0.7);
  font-family: var(--font-mono);
  font-size: 0.6rem;
}

.spot-conditions__source {
  margin: 0;
  color: rgba(199, 214, 222, 0.4);
  font-size: 0.55rem;
}

/* The hazard tone as an L along the left edge and the bottom-left corner,
   in place of a solid left edge. */
.spot-conditions__block button,
.spot-conditions__block a {
  position: relative;
  border-radius: 0;
  border-left-width: 1px;
  border-left-color: rgba(255, 255, 255, 0.06);
}

.spot-conditions__block button::before,
.spot-conditions__block a::before {
  content: '';
  position: absolute;
  inset: -1px auto -1px -1px;
  width: 9px;
  border-radius: 0;
  pointer-events: none;
  --tone: var(--hazard-tone, rgba(54, 220, 255, 0.6));
  background:
    linear-gradient(var(--tone), var(--tone)) left bottom / 9px 1.5px no-repeat,
    linear-gradient(var(--tone), var(--tone)) left bottom / 1.5px 100% no-repeat;
}

.spot-conditions__block button:hover,
.spot-conditions__block a:hover,
.spot-conditions__block button:focus-visible,
.spot-conditions__block a:focus-visible {
  border-left-color: rgba(54, 220, 255, 0.25);
}

/* A grey rule under each list: hazards, alerts, news. */
.spot-conditions__block {
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Local time beside the weather on a selected item's card. */
.spot-conditions__weather--timed {
  grid-template-columns: auto 1fr auto;
}

.spot-conditions__weather-wait {
  grid-column: 1 / 3;
}

.spot-conditions__time {
  display: grid;
  gap: 0.1rem;
  justify-items: end;
  grid-column: 3;
}

.spot-conditions__time strong {
  color: rgba(240, 247, 250, 0.98);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1;
}

.spot-conditions__time span {
  color: rgba(199, 214, 222, 0.6);
  font-size: 0.56rem;
  letter-spacing: 0.05rem;
  text-transform: uppercase;
}

/* The one distance every nearby block looks out to. */
.spot-conditions__radius {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
}

.spot-conditions__radius-label {
  color: rgba(199, 214, 222, 0.6);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.06rem;
  text-transform: uppercase;
}

.spot-conditions__radius-slider {
  width: 100%;
  min-width: 0;
}

.spot-conditions__radius-value {
  min-width: 4.2rem;
  color: #36dcff;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-align: end;
}
/* ── Panels over the rail ───────────────────────────────────────────────
   Each panel header's edge switch (UiPanelEdge) slides that side's open
   panels over their rail to the screen edge; the rail stays underneath. */
.ui-panel-edge {
  display: grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  color: rgba(206, 232, 239, 0.6);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  cursor: pointer;
}

.ui-panel-edge .material-symbols-outlined {
  font-size: 14px;
}

.ui-panel-edge:hover,
.ui-panel-edge:focus-visible {
  color: var(--text-primary, #e8eaed);
  border-color: rgba(255, 255, 255, 0.24);
}

.ui-panel-edge[aria-pressed='true'] {
  color: #36dcff;
  background: rgba(54, 220, 255, 0.12);
  border-color: rgba(54, 220, 255, 0.45);
}

/* Collapsed panels hide the switch; it only means something once open. */
.panel-collapsible.collapsed .ui-panel-edge {
  display: none;
}

/* Right: open panels move right by the rail's width and sit over it. */
body.panels-edge-right:not(.mobile-shell):not(.cockpit-mode)
  #right-context-rail
  > :not(.gev-panel-rail) {
  z-index: 2;
  transform: translateX(var(--panel-rail-clearance, 48px));
}

/* Left: the same, moving left. */
body.panels-edge-left:not(.mobile-shell):not(.cockpit-mode)
  #left-panel-stack
  > :not(.gev-panel-rail) {
  z-index: 2;
  transform: translateX(calc(-1 * var(--panel-rail-clearance, 48px)));
}

body.mobile-shell .ui-panel-edge,
body.cockpit-mode .ui-panel-edge {
  display: none;
}

/* ── Edge mode with a panel open: the rail's icons move to a row along the
   top of the panel, and the panel steps down to make room. ── */
:root {
  --edge-rail-row: 50px;
}

body.panels-edge-left:not(.mobile-shell):not(.cockpit-mode)
  .gev-panel-rail--left:has(.ui-rail--collapsible:not(.ui-rail--expanded)),
body.panels-edge-right:not(.mobile-shell):not(.cockpit-mode)
  .gev-panel-rail--right:has(.ui-rail--collapsible:not(.ui-rail--expanded)) {
  top: 0 !important;
  z-index: 3;
}

body.panels-edge-left:not(.mobile-shell):not(.cockpit-mode)
  .gev-panel-rail--left
  .ui-rail--collapsible:not(.ui-rail--expanded),
body.panels-edge-right:not(.mobile-shell):not(.cockpit-mode)
  .gev-panel-rail--right
  .ui-rail--collapsible:not(.ui-rail--expanded) {
  flex-direction: row;
  width: max-content;
  gap: 4px;
}

body.panels-edge-left:not(.mobile-shell):not(.cockpit-mode)
  #left-panel-stack
  > :not(.gev-panel-rail):not(.collapsed) {
  transform: translate(
    calc(-1 * var(--panel-rail-clearance, 48px)),
    var(--edge-rail-row)
  );
  max-height: calc(100% - var(--edge-rail-row)) !important;
}

body.panels-edge-right:not(.mobile-shell):not(.cockpit-mode)
  #right-context-rail
  > :not(.gev-panel-rail):not(.collapsed) {
  transform: translate(var(--panel-rail-clearance, 48px), var(--edge-rail-row));
  max-height: calc(100% - var(--edge-rail-row)) !important;
}
/* ── Visual panel: sections and one card style for every control ───────
   Look · Map source · Overlay (HUD, detection, 3D, Scope, Clean UI) ·
   Effects (Celestial, Bloom, Sharpen) · Reset. Each control is a card: a
   header row with its icon, name and an on/off pill, and its settings
   underneath. */

/* ── Presets and map source at the top of the panel ─────────────────── */
.visual-presets {
  display: grid;
  gap: 8px;
  padding: 2px 0 12px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--glass-border);
}

.visual-presets__heading {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font: 600 10px/1.2 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.visual-presets__heading--row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.visual-presets__status {
  color: var(--accent);
}

.visual-presets__status.warn {
  color: #ff9f43;
}

.visual-presets__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.visual-presets__style {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 9px 4px 7px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--btn-radius);
  cursor: pointer;
}

.visual-presets__style:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.visual-presets__style.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--accent-dim);
}

.visual-presets__icon {
  font-size: 15px;
  line-height: 1;
}

.visual-presets__label {
  font: 500 11px/1 var(--font-sans);
}

.visual-presets__key {
  position: absolute;
  top: 4px;
  inset-inline-end: 5px;
  color: var(--text-secondary);
  font: 9px/1 var(--font-mono);
  opacity: 0.6;
}

.visual-presets__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.visual-presets__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  color: var(--text-secondary);
  font: 500 11px/1.2 var(--font-sans);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  cursor: pointer;
}

.visual-presets__chip small {
  font-size: 9px;
  opacity: 0.6;
}

.visual-presets__chip:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.visual-presets__chip.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--accent-dim);
}

.visual-presets__chip.unavailable {
  opacity: 0.45;
  cursor: default;
}

/* The body is display: contents, so its children are the panel's own flex
   items: keep them full width and unshrunk. */
#pp-toggles .pp-panel-body > * {
  flex: none !important;
  align-self: stretch !important;
  box-sizing: border-box;
}

#pp-toggles .pp-panel-body > .pp-toggle-group,
#pp-toggles .pp-panel-body > .pp-toggle-btn {
  margin-bottom: 0.4rem !important;
}

#pp-toggles .pp-section-heading,
#pp-toggles .visual-presets__heading {
  margin: 0.7rem 2px 0.35rem;
  text-align: start;
  color: rgba(199, 214, 222, 0.55);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.14rem;
  text-transform: uppercase;
}

#pp-toggles .visual-presets__heading:first-child {
  margin-top: 0.2rem;
}

/* The Display panel's card skin. */
:root #pp-toggles .pp-toggle-group {
  width: 100%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
}

/* The header row of a card, and the lone Clean UI button. */
:root #pp-toggles .pp-toggle-group > .pp-toggle-btn,
:root #pp-toggles .pp-panel-body > .pp-toggle-btn {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  gap: 10px;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

:root #pp-toggles .pp-panel-body > .pp-toggle-btn {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 10px !important;
}

:root #pp-toggles .pp-toggle-btn .pp-icon {
  width: 18px;
  font-size: 15px;
  text-align: center;
  color: rgba(199, 214, 222, 0.75);
}

:root #pp-toggles .pp-toggle-btn .pp-label {
  color: rgba(236, 244, 248, 0.9);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
}

/* An on/off pill at the right of every button header (Scope keeps its
   checkbox, which already says it). */
:root #pp-toggles .pp-toggle-group > button.pp-toggle-btn::after,
:root #pp-toggles .pp-panel-body > button.pp-toggle-btn::after {
  /* The state is the button's own (aria-pressed); the pill only shows it. */
  content: var(--pp-pill-off, 'OFF') / '';
  margin-inline-start: auto;
  padding: 2px 8px;
  color: rgba(199, 214, 222, 0.5);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.12rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

:root #pp-toggles .pp-toggle-group > button.pp-toggle-btn.active::after,
:root
  #pp-toggles
  .pp-toggle-group
  > button.pp-toggle-btn[aria-pressed='true']::after,
:root #pp-toggles .pp-panel-body > button.pp-toggle-btn.active::after {
  content: var(--pp-pill-on, 'ON') / '';
  color: #7af0ff;
  border-color: rgba(54, 220, 255, 0.5);
  background: rgba(54, 220, 255, 0.1);
}

:root #pp-toggles .pp-toggle-btn.active .pp-icon,
:root #pp-toggles .pp-toggle-btn[aria-pressed='true'] .pp-icon,
:root #pp-toggles .pp-toggle-btn.active .pp-label,
:root #pp-toggles .pp-toggle-btn[aria-pressed='true'] .pp-label {
  color: #7af0ff;
}

:root #pp-toggles .pp-toggle-group > .pp-toggle-btn:hover,
:root #pp-toggles .pp-panel-body > .pp-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.04) !important;
}

:root #pp-toggles .pp-scope-toggle input[type='checkbox'] {
  margin-inline-start: auto;
}

/* Settings inside a card: separated by hairlines, no boxes of their own. */
:root #pp-toggles .pp-toggle-group .pp-slider-row.visible,
:root
  #pp-toggles
  .pp-toggle-group
  .pp-slider-row:is(.visible, #scope-slider-row, #scope-opacity-row) {
  margin: 0;
  padding: 7px 12px;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0;
}

/* The Dense button lights green elsewhere; in a card it uses the shared pill. */
:root #pp-toggles .pp-toggle-group > .pp-toggle-btn.panoptic,
:root #pp-toggles .pp-toggle-group > .pp-toggle-btn.active {
  color: inherit;
}

/* Reset to default, at the foot of the Visual panel. */
#pp-toggles .pp-reset-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0.6rem 0 0.2rem !important;
  padding: 0.55rem;
  color: rgba(225, 236, 242, 0.85);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  cursor: pointer;
}

#pp-toggles .pp-reset-btn .material-symbols-outlined {
  font-size: 15px;
}

#pp-toggles .pp-reset-btn:hover,
#pp-toggles .pp-reset-btn:focus-visible {
  color: #fff;
  border-color: rgba(54, 220, 255, 0.5);
  background: rgba(54, 220, 255, 0.06);
}

/* Clean UI is an action, not a setting, so it has no on/off pill. */
#pp-toggles #clean-view-toggle::after {
  content: none;
}

/* A map layer row under Map Source (`publishMapLayer`). */
.visual-presets__layer {
  width: 100%;
}
/* ── Data Layers group index: ticks along the panel's right edge ─────── */
#data-panel {
  position: relative;
}

.layer-section-index {
  position: absolute;
  top: 64px;
  inset-inline-end: 2px;
  bottom: 24px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 10px;
}

#data-panel.collapsed .layer-section-index {
  display: none;
}

.layer-section-index__tick {
  position: relative;
  width: 10px;
  height: 16px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.layer-section-index__tick::before {
  content: '';
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 4px;
  width: 2px;
  border-radius: 2px;
  background: rgba(199, 214, 222, 0.32);
  transition:
    background 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.layer-section-index__tick:hover::before,
.layer-section-index__tick:focus-visible::before {
  background: rgba(236, 244, 248, 0.85);
  transform: scaleX(1.5);
}

.layer-section-index__tick.is-current::before {
  background: #36dcff;
  box-shadow: 0 0 6px rgba(54, 220, 255, 0.6);
}

.layer-section-index__tick:focus-visible {
  outline: none;
}

/* The group's name, drawn on the page just outside the panel's edge while a
   tick is pointed at or focused, so it covers none of the rows. */
.layer-section-index__label {
  position: fixed;
  z-index: 30;
  padding: 0.25rem 0.5rem;
  color: rgba(236, 244, 248, 0.92);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  white-space: nowrap;
  background: rgba(12, 12, 20, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  transform: translateY(-50%);
  pointer-events: none;
  animation: layer-section-index-label 120ms ease both;
}

/* Drawn before the tick when there is no room after it. */
.layer-section-index__label--before {
  transform: translate(-100%, -50%);
}

@keyframes layer-section-index-label {
  from {
    opacity: 0;
    translate: -4px 0;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .layer-section-index__label {
    animation: none;
  }
}

body.mobile-shell .layer-section-index {
  display: none;
}
/* ── Data Layers search and filter ── */
.layer-finder__btn {
  display: grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  color: rgba(206, 232, 239, 0.65);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  cursor: pointer;
}

.layer-finder__btn .material-symbols-outlined {
  font-size: 14px;
}

.layer-finder__btn:hover,
.layer-finder__btn:focus-visible {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.24);
}

.layer-finder__btn.active {
  color: #36dcff;
  background: rgba(54, 220, 255, 0.12);
  border-color: rgba(54, 220, 255, 0.45);
}

.layer-finder__filter {
  position: relative;
  display: inline-flex;
}

.layer-finder__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 140px;
  padding: 4px;
  background: rgba(16, 20, 28, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

.layer-finder__menu button {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.55rem;
  color: rgba(225, 236, 242, 0.85);
  font-size: 0.72rem;
  text-align: start;
  background: none;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}

.layer-finder__menu button .material-symbols-outlined {
  font-size: 14px;
  color: rgba(199, 214, 222, 0.6);
}

.layer-finder__menu button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.layer-finder__menu button.active,
.layer-finder__menu button.active .material-symbols-outlined {
  color: #7af0ff;
}

.layer-finder__bar {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.4rem;
  margin: 0.2rem 0 0.5rem;
}

/* A UiSearchField (search-field.css). */
.layer-finder__field {
  flex: 1 1 auto;
  gap: 0.35rem;
  padding: 0 0.55rem;
  height: 30px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(54, 220, 255, 0.3);
  border-radius: 8px;
}

.layer-finder__field .material-symbols-outlined {
  color: rgba(199, 214, 222, 0.6);
  font-size: 15px;
}

.layer-finder__field input {
  flex: 1 1 auto;
  color: rgba(236, 244, 248, 0.95);
  font-size: 0.75rem;
  outline: none;
}

/* Focus shows on the field's frame, as a soft ring, in place of the hard
   keyboard outline round the bare input. */
.layer-finder__field input:focus,
.layer-finder__field input:focus-visible {
  outline: none !important;
  box-shadow: none;
}

.layer-finder__field:focus-within {
  border-color: rgba(54, 220, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(54, 220, 255, 0.1);
}

.layer-finder__chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.25rem;
  height: 26px;
  padding: 0 0.5rem;
  color: #7af0ff;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  background: rgba(54, 220, 255, 0.12);
  border: 1px solid rgba(54, 220, 255, 0.45);
  border-radius: 999px;
  cursor: pointer;
}

.layer-finder__chip .material-symbols-outlined {
  font-size: 12px;
}

/* Rows and group headings the search or filter leaves out. */
.data-toggle-row.is-filtered,
.data-layer-group-heading.is-filtered {
  display: none !important;
}

.layer-finder__empty {
  flex-basis: 100%;
  margin: 0;
  padding: 0.6rem 0.5rem;
  color: rgba(199, 214, 222, 0.5);
  font-size: 0.72rem;
  text-align: center;
}

.layer-finder__menu {
  max-height: 60vh;
  box-sizing: border-box;
  overflow-y: auto;
  min-width: 170px;
}

.layer-finder__menu-head {
  padding: 0.45rem 0.55rem 0.2rem;
  color: rgba(199, 214, 222, 0.5);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.14rem;
  text-transform: uppercase;
}

/* Each group of options lays out as part of the menu's grid. */
.layer-finder__menu > span {
  display: contents;
}

.layer-finder__menu > span + span > .layer-finder__menu-head {
  margin-top: 0.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Several chips can show at once. */
.layer-finder__bar {
  flex-wrap: wrap;
}

/* Chips sized like the rows' ON/OFF switches: small and square. */
.layer-finder__chip {
  height: 20px;
  gap: 0.2rem;
  padding: 0 6px 0 8px;
  font-size: 9px;
  letter-spacing: 0.08rem;
  border-radius: 4px;
}

.layer-finder__chip .material-symbols-outlined {
  font-size: 11px;
}
/* ── Context layer tabs ─────────────────────────────────────────────────
   Settings for the layers that are on, as tabs beside the card. */
.context-tabs {
  display: flex;
  flex: none;
  min-height: 34px;
  box-sizing: border-box;
  gap: 4px;
  margin: 0 0 0.7rem;
  padding: 3px;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  scrollbar-width: none;
}

.context-tabs::-webkit-scrollbar {
  display: none;
}

.context-tabs__tab {
  display: inline-flex;
  flex: none;
  min-height: 26px;
  align-items: center;
  gap: 0.3rem;
  max-width: 9.5rem;
  padding: 0.3rem 0.55rem;
  color: rgba(199, 214, 222, 0.65);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  background: none;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
}

.context-tabs__tab .material-symbols-outlined {
  font-size: 14px;
}

.context-tabs__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-tabs__tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.context-tabs__tab.active {
  color: #7af0ff;
  background: rgba(54, 220, 255, 0.12);
  border-color: rgba(54, 220, 255, 0.35);
}

.context-tab-pane[hidden] {
  display: none !important;
}

/* Controls moved in from Visual show their rows openly here. */
.context-tab-pane .pp-toggle-group {
  margin: 0;
}

/* Two even tabs: Inspector and Properties. */
.context-tabs__tab {
  flex: 1 1 0;
  justify-content: center;
  max-width: none;
}

.context-props[hidden] {
  display: none !important;
}

.context-props__section + .context-props__section {
  margin-top: 0.9rem;
}

.context-props__heading {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.45rem;
  color: rgba(199, 214, 222, 0.55);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.14rem;
  text-transform: uppercase;
}

.context-props__heading .material-symbols-outlined {
  font-size: 14px;
}

.context-props__layers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin: -0.15rem 0 0.5rem;
  padding: 0;
  list-style: none;
}

.context-props__layers li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: rgba(214, 228, 236, 0.8);
  font-size: 0.66rem;
}

.context-props__layers i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}
/* ── Cockpit side windows in the app's panel look ───────────────────────
   Contact (left), the briefing carousel (right) and the Display / Radio
   controls get the same smoked glass, 16px corners and card rows as the
   main panels. They keep cockpit.css's slight 3D slant toward the centre,
   and stand the same height. The text glow goes; the state colours on the
   top edge (uncertain, lost) stay. */

.cockpit-context-window,
.cockpit-signal-window {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top-color: rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(12, 12, 20, 0.72);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  text-shadow: none;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

/* Open, both windows share one compact size; their lists scroll. */
.cockpit-context-window:not([data-collapsed='true']),
.cockpit-signal-window:not([data-collapsed='true']) {
  width: min(280px, 23vw);
  height: min(27vh, 260px);
}

/* Contact's header: the buttons share the kicker's row, so the subject runs
   the full width on at most two lines instead of wrapping beside them. */
.cockpit-context-window:not([data-collapsed='true'])
  .cockpit-context-header
  > div {
  display: contents;
}

.cockpit-context-window:not([data-collapsed='true']) .cockpit-context-kicker {
  grid-column: 1;
  grid-row: 1;
}

.cockpit-context-window:not([data-collapsed='true']) .cockpit-context-actions {
  grid-column: 2;
  grid-row: 1;
}

.cockpit-context-window:not([data-collapsed='true']) #cockpit-context-subject {
  display: -webkit-box;
  grid-column: 1 / -1;
  grid-row: 2;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

/* Their foot sits just above the bottom HUD readouts (MGRS / GSD), which
   stand at clamp(84px, 11vh, 118px) and are about 38px tall. */
.cockpit-context-window,
.cockpit-signal-window {
  bottom: calc(clamp(84px, 11vh, 118px) + 54px);
}

.cockpit-context-window[data-state='uncertain'] {
  border-top-color: rgba(116, 219, 255, 0.72);
}

.cockpit-context-window[data-state='lost'] {
  border-top-color: rgba(213, 168, 99, 0.72);
}

.cockpit-context-window[data-collapsed='true'],
.cockpit-signal-window[data-collapsed='true'] {
  border-radius: 12px;
  background: rgba(12, 12, 20, 0.66);
}

/* Headers: a quiet hairline like the panel headers. */
.cockpit-card-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.cockpit-card-actions button {
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(224, 236, 242, 0.82);
}

.cockpit-card-actions button:hover,
.cockpit-card-actions button:focus-visible {
  border-color: rgba(0, 212, 255, 0.45);
  background: rgba(0, 212, 255, 0.1);
  color: #fff;
}

/* Rows and tiles inside: the card style used in Context and Visual. */
.cockpit-context-cohorts > div,
.cockpit-signal-list li,
.cockpit-news-list li,
.cockpit-local-grid > div {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

/* The weather tiles stand apart as cards, with no lit grid behind them,
   and are short enough to fit the shorter window. */
.cockpit-local-grid {
  gap: 5px;
  background: none;
}

.cockpit-local-grid > div {
  min-height: 0;
  gap: 2px;
  padding: 6px 9px;
}

.cockpit-route-card {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* Display / Radio: the closed launchers and the open panels match too. */
:root
  body.cockpit-mode:not(.mobile-shell)
  .cockpit-utility-control.is-expanded {
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(12, 12, 20, 0.72);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ── Cockpit uses the main page's rails ───────────────────────────────
   The left rail shows Data Layers only (Authoring has no place in first
   person, Utilities has nothing to do there, and the cockpit's own Display
   panel stands in for Visual), one panel opens beside it, and the collapsed
   header strips the cockpit used instead are hidden. */
:root
  body.cockpit-mode:not(.mobile-shell)
  #left-panel-stack
  > .gev-panel-rail--left {
  display: block;
}

:root
  body.cockpit-mode:not(.mobile-shell)
  #left-panel-stack
  > .gev-panel-rail--left
  :is(
    [data-rail-item='scene-panel'],
    [data-rail-item='utilities-panel'],
    [data-rail-item='pp-toggles']
  ),
:root
  body.cockpit-mode:not(.mobile-shell)
  #left-panel-stack
  > .gev-panel-rail--left
  .ui-tooltip:has(
    > :is(
      [data-rail-item='scene-panel'],
      [data-rail-item='utilities-panel'],
      [data-rail-item='pp-toggles']
    )
  ) {
  display: none;
}

/* With some icons hidden, the runs between them break up: with a panel
   open, each icon left is its own island. */
:root
  body.cockpit-mode:not(.mobile-shell)
  #left-panel-stack
  > .gev-panel-rail--left
  .ui-rail--collapsible:not(.ui-rail--expanded):has(.ui-rail__item--on)
  > .ui-tooltip::before {
  inset: -4px -5px;
  border-width: 1px;
  border-radius: 14px;
}

/* Authoring, Utilities or Visual may still be open underneath; its hidden icon must
   not split the rail into islands. */
:root
  body.cockpit-mode:not(.mobile-shell)
  #left-panel-stack
  > .gev-panel-rail--left
  .ui-rail:has(
    :is(
      [data-rail-item='scene-panel'],
      [data-rail-item='utilities-panel'],
      [data-rail-item='pp-toggles']
    )[aria-pressed='true']
  )
  > .ui-tooltip::before,
:root
  body.cockpit-mode:not(.mobile-shell)
  #left-panel-stack
  > .gev-panel-rail--left
  .ui-rail:has(
    :is(
      [data-rail-item='scene-panel'],
      [data-rail-item='utilities-panel'],
      [data-rail-item='pp-toggles']
    )[aria-pressed='true']
  )::before {
  /* Nor may the sliding highlight stay where the hidden icon was. */
  display: none;
}

:root
  body.cockpit-mode:not(.mobile-shell)
  #left-panel-stack
  > .gev-panel-rail--left
  .ui-rail:has(
    :is(
      [data-rail-item='scene-panel'],
      [data-rail-item='utilities-panel'],
      [data-rail-item='pp-toggles']
    )[aria-pressed='true']
  ) {
  background: rgba(16, 20, 28, 0.82) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

:root
  body.cockpit-mode:not(.mobile-shell)
  #left-panel-stack
  > [data-panel-id].collapsed,
:root
  body.cockpit-mode:not(.mobile-shell)
  #left-panel-stack
  > :is(
    [data-panel-id='scene-panel'],
    [data-panel-id='utilities-panel'],
    [data-panel-id='pp-toggles']
  ) {
  display: none;
}

/* Both rails start at one height, just under the top HUD text, so their top
   edges line up; the cockpit layout pass places Display and Radio at the
   same height (COCKPIT_UTILITY_MIN_TOP_PX / _RATIO in cockpitPresentation.js). */
:root body.cockpit-mode:not(.mobile-shell) #left-panel-stack {
  top: max(206px, 22vh) !important;
}

/* Bottom HUD readouts: scale from their foot, and drop the three-line right
   block (GSD / ALT / AIS) by one scaled line so both start level, as on the
   main page. */
body.cockpit-mode #intel-hud .hud-bottom-left {
  transform-origin: left bottom;
}

body.cockpit-mode #intel-hud .hud-bottom-right {
  bottom: calc(clamp(84px, 11vh, 118px) - 20px);
  transform-origin: right bottom;
}

/* ── Live signals rows ──────────────────────────────────────────────────
   Callsign on the left, time small at the top right, the detail under it.
   The status colour is a slim inset bar (cyan for the aircraft you ride,
   white for nearby, amber for military / warnings), not a bent border. */
.cockpit-signal-list {
  gap: 4px;
}

.cockpit-signal-list li {
  position: relative;
  display: block;
  padding: 5px 10px 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 2px 0 0 rgba(244, 251, 255, 0.22);
}

.cockpit-signal-list li:is(.track, .current) {
  border-color: rgba(0, 212, 255, 0.22);
  background: rgba(0, 212, 255, 0.06);
  box-shadow: inset 2px 0 0 var(--cockpit-accent, #00d4ff);
}

.cockpit-signal-list li:is(.nearby) {
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: inset 2px 0 0 rgba(244, 251, 255, 0.55);
}

.cockpit-signal-list li:is(.military, .warning) {
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: inset 2px 0 0 #d5a863;
}

.cockpit-signal-list li.actionable:is(:hover, :focus-within) {
  border-color: rgba(0, 212, 255, 0.3);
  background: rgba(0, 212, 255, 0.08);
}

.cockpit-signal-list time {
  position: absolute;
  top: 6px;
  inset-inline-end: 28px;
  color: rgba(224, 236, 242, 0.4);
  font: 7px/1 var(--font-mono);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.cockpit-signal-list li > div {
  gap: 1px;
}

.cockpit-signal-target {
  grid-template-columns: minmax(0, 1fr) 14px;
  gap: 8px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
}

.cockpit-signal-target-rule {
  display: none;
}

.cockpit-signal-target-chevron {
  justify-self: end;
  color: rgba(224, 236, 242, 0.5) !important;
}

.cockpit-signal-list
  li.actionable:is(:hover, :focus-within)
  .cockpit-signal-target-chevron {
  color: #fff !important;
}

.cockpit-signal-list span:not([class]) {
  color: rgba(224, 236, 242, 0.62);
  font-size: 8px;
  letter-spacing: 0.08em;
}

/* Keep a long callsign clear of the time at the row's end. */
.cockpit-signal-list .cockpit-signal-target-label {
  margin-inline-end: 50px;
}

/* ── Briefing content fits the narrower window ────────────────────────── */
.cockpit-signal-window {
  grid-template-columns: minmax(0, 1fr);
}

.cockpit-signal-window > *,
.cockpit-brief-stage,
.cockpit-brief-stage > section,
.cockpit-signal-list,
.cockpit-signal-list li {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* Route: a quiet heading, endpoints that truncate. */
.cockpit-route-card {
  padding-inline: 4px;
}

.cockpit-route-heading {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

#cockpit-route-status {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cockpit-route-airport strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Header: the title on one line, the controls on the row under it. */
.cockpit-signal-window:not([data-collapsed='true']) .cockpit-signal-header {
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  padding-inline: 4px;
}

.cockpit-signal-window:not([data-collapsed='true']) .cockpit-brief-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
}

.cockpit-signal-window:not([data-collapsed='true']) .cockpit-signal-kicker {
  white-space: nowrap;
}

.cockpit-signal-window:not([data-collapsed='true']) .cockpit-brief-actions {
  justify-content: flex-start;
}

.cockpit-signal-window:not([data-collapsed='true']) #cockpit-signal-toggle {
  margin-inline-start: auto;
}

/* ── Open Display / Radio panels: the main panels' header and size ───── */
:root
  body.cockpit-mode:not(.mobile-shell)
  .cockpit-utility-control.is-expanded {
  min-width: 295px;
  box-sizing: border-box;
}

:root
  body.cockpit-mode:not(.mobile-shell)
  .cockpit-utility-control.is-expanded
  .cockpit-utility-launcher {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 10px 8px;
  color: rgba(224, 236, 242, 0.78);
  font: 9px/1 var(--font-mono);
  letter-spacing: 0.22em;
}

:root
  body.cockpit-mode:not(.mobile-shell)
  .cockpit-utility-control.is-expanded
  .cockpit-utility-divider {
  flex: 0 1 22px;
  height: 1px;
  margin-right: auto;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

/* The launcher's own toggle steps aside: the rail and "−" open and close
   the panel instead. */
:root
  body.cockpit-mode:not(.mobile-shell)
  .cockpit-utility-control.is-expanded
  .cockpit-utility-glyph {
  display: none;
}

:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-collapse {
  display: grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(206, 232, 239, 0.75);
  font: 13px/1 var(--font-mono);
  cursor: pointer;
}

:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-collapse:hover,
:root
  body.cockpit-mode:not(.mobile-shell)
  .cockpit-utility-collapse:focus-visible {
  border-color: rgba(0, 212, 255, 0.45);
  color: #fff;
  outline: none;
}

/* ── Right rail as on the left: an icon column that stays, labels beside it
   while nothing is open, and the open panel to its left. The launchers'
   own strips give way to it. ─────────────────────────────────────────── */
:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-controls {
  display: grid;
  grid-template-columns: auto auto;
  align-items: start;
  justify-content: end;
  column-gap: 6px;
}

:root
  body.cockpit-mode:not(.mobile-shell)
  .cockpit-utility-control:not(.is-expanded) {
  display: none;
}

:root
  body.cockpit-mode:not(.mobile-shell)
  .cockpit-utility-control.is-expanded {
  grid-column: 1;
  grid-row: 1;
  margin-top: 0 !important;
}

/* The phone keeps the launchers' own toggles, so the rail and "−" are for
   the desktop look only. */
.cockpit-utility-rail,
.cockpit-utility-collapse {
  display: none;
}

:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-rail {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  gap: 4px;
  align-items: stretch;
  pointer-events: auto;
}

:root
  body.cockpit-mode:not(.mobile-shell)
  :is(.cockpit-utility-rail__labels, .cockpit-utility-rail__icons) {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(16, 20, 28, 0.82);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-rail__labels {
  box-sizing: border-box;
  width: 170px;
  padding-inline: 14px;
}

:root
  body.cockpit-mode:not(.mobile-shell)
  .cockpit-utility-rail__labels
  > span {
  display: flex;
  align-items: center;
  height: 32px;
  color: rgba(225, 236, 242, 0.82);
  font:
    500 9.28px/1 Inter,
    -apple-system,
    system-ui,
    sans-serif;
  letter-spacing: 2.08px;
}

:root
  body.cockpit-mode:not(.mobile-shell)
  .cockpit-utility-rail.is-open
  .cockpit-utility-rail__labels {
  display: none;
}

:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-rail__item {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary, rgba(206, 232, 239, 0.75));
  cursor: pointer;
  transition:
    color var(--transition-fast, 120ms),
    background var(--transition-fast, 120ms),
    border-color var(--transition-fast, 120ms);
}

:root
  body.cockpit-mode:not(.mobile-shell)
  .cockpit-utility-rail__item
  .material-symbols-outlined {
  font-size: 18px;
}

:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-rail__item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary, #fff);
}

:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-rail__item.is-on,
:root
  body.cockpit-mode:not(.mobile-shell)
  .cockpit-utility-rail__item.is-on:hover {
  border-color: rgba(0, 212, 255, 0.15);
  background: rgba(0, 212, 255, 0.15);
  color: #00d4ff;
}

/* With a panel open, each icon is its own island, as on the main rails. */
:root
  body.cockpit-mode:not(.mobile-shell)
  .cockpit-utility-rail.is-open
  .cockpit-utility-rail__icons {
  border-color: transparent;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

:root
  body.cockpit-mode:not(.mobile-shell)
  .cockpit-utility-rail.is-open
  .cockpit-utility-rail__item {
  position: relative;
}

:root
  body.cockpit-mode:not(.mobile-shell)
  .cockpit-utility-rail.is-open
  .cockpit-utility-rail__item::before {
  position: absolute;
  inset: -5px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(16, 20, 28, 0.82);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  content: '';
  pointer-events: none;
}

/* Hovering an icon lights its label too, as on the left. */
:root
  body.cockpit-mode:not(.mobile-shell)
  .cockpit-utility-rail:has(.cockpit-utility-rail__item:nth-child(1):hover)
  .cockpit-utility-rail__labels
  > span:nth-child(1),
:root
  body.cockpit-mode:not(.mobile-shell)
  .cockpit-utility-rail:has(.cockpit-utility-rail__item:nth-child(2):hover)
  .cockpit-utility-rail__labels
  > span:nth-child(2) {
  color: var(--text-primary, #fff);
}

/* Mirror the left rail's 52px inset, clear of the HUD's vertical readouts. */
:root body.cockpit-mode:not(.mobile-shell) .cockpit-utility-controls {
  right: 52px;
}

/* Like the cockpit's other windows (rtl.css), the rail keeps its physical
   side in a right-to-left language: icons at the screen edge, the open panel
   inside them. Only the text reads right to left. */
html[dir='rtl'] body.cockpit-mode:not(.mobile-shell) .cockpit-utility-controls {
  direction: ltr;
}

html[dir='rtl']
  body.cockpit-mode:not(.mobile-shell)
  :is(.cockpit-utility-control.is-expanded, .cockpit-utility-rail__labels) {
  direction: rtl;
}
/* The dock offers two input choices; detail lives in the panels. */
#command-dock > #gev-voice-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 3.65rem;
  margin: 0;
  padding: 0 0.6rem;
}
#command-dock
  #gev-voice-control
  > :is(.gev-voice-heading, .gev-voice-visualizer, .gev-voice-readout),
#command-dock #gev-voice-control > .gev-voice-provider-field {
  display: none;
}
#command-dock #gev-voice-button,
#command-dock #gev-chat-button {
  position: static;
  display: grid;
  grid-template-rows: 2.45rem 0.55rem;
  justify-items: center;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  width: 3rem;
  height: 3.2rem;
  padding: 0;
  color: var(--text-secondary);
  background: transparent;
  border: 0;
  border-radius: 0.5rem;
  cursor: pointer;
  box-shadow: none;
}
#command-dock #gev-chat-button > svg {
  box-sizing: border-box;
  width: 2.45rem;
  height: 2.45rem;
  padding: 0.48rem;
  border: 1px solid rgba(232, 234, 237, 0.36);
  border-radius: 0.65rem;
  background: rgba(232, 234, 237, 0.04);
  box-shadow:
    0 0 0 0.18rem rgba(232, 234, 237, 0.04),
    0 0 0.75rem rgba(232, 234, 237, 0.08);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}
#command-dock #gev-chat-button:hover:not(:disabled) > svg,
#command-dock
  #gev-voice-control[data-assistant-mode='chat']
  #gev-chat-button
  > svg {
  border-color: rgba(54, 220, 255, 0.48);
  box-shadow:
    0 0 0 0.18rem #36dcff0f,
    0 0 0.75rem #36dcff1f;
}
#command-dock :is(.gev-mic-label, .gev-chat-label) {
  margin: 0;
  font: 0.48rem var(--font-mono);
  letter-spacing: 0.08em;
}
#command-dock #gev-chat-button:hover,
#command-dock #gev-voice-control[data-assistant-mode='chat'] #gev-chat-button,
#command-dock #gev-voice-button:hover {
  color: var(--accent);
  background: rgba(54, 220, 255, 0.08);
}
#command-dock #gev-chat-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
#gev-chat-panel {
  position: absolute;
  bottom: calc(100% + 1rem);
  left: 50%;
  transform: translateX(-50%);
  width: min(25rem, calc(100vw - 1.5rem));
  max-height: min(34rem, calc(100dvh - 10rem));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--text-primary);
  background: rgba(7, 22, 31, 0.97);
  border: 1px solid rgba(54, 220, 255, 0.3);
  border-radius: 0.9rem;
  box-shadow: 0 1rem 3rem #0008;
  text-align: left;
  font: 0.8rem/1.5 var(--font-sans);
  color-scheme: dark;
}
#gev-chat-panel[hidden],
#gev-chat-panel [hidden] {
  display: none;
}
#command-dock > #gev-voice-control[data-chat-open='true'] {
  z-index: 102;
}
#command-dock
  > #gev-voice-control:is(
    [data-assistant-mode='voice'],
    [data-assistant-mode='chat']
  ) {
  z-index: 104;
}
#gev-voice-control[data-chat-open='true']
  :is(.gev-voice-panel, .gev-voice-card, .gev-voice-help-tray) {
  display: none;
}
.gev-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1rem;
  border-bottom: 1px solid var(--glass-border);
}
.gev-chat-header strong {
  font: 600 0.7rem var(--font-mono);
  letter-spacing: 0.15em;
  color: var(--accent);
}
.gev-chat-header p {
  margin: 0.3rem 0 0;
  font-size: 0.7rem;
  color: var(--text-secondary);
}
#gev-chat-header-actions {
  display: flex;
  align-items: center;
}
#gev-chat-header-actions button {
  position: static;
  display: grid;
  place-items: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0.3rem;
  color: var(--text-secondary);
  border: 0;
  background: transparent;
  cursor: pointer;
}
#gev-chat-close {
  font-size: 1.25rem;
}
#gev-chat-messages {
  min-height: 8rem;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
#gev-chat-empty {
  text-align: center;
  padding: 1.5rem 0.2rem;
  color: var(--text-secondary);
}
#gev-chat-empty > span {
  font-size: 32px;
  color: var(--accent);
  opacity: 0.7;
}
#gev-chat-empty h3 {
  color: var(--text-primary);
  margin: 0.6rem 0 0.3rem;
  font-size: 1rem;
  font-weight: 500;
}
#gev-chat-empty p {
  margin: 0 0 1rem;
}
#gev-chat-auth-note {
  margin: 0;
  padding: 0 1rem 0.3rem;
  color: var(--text-secondary);
  font-size: 0.7rem;
}
#gev-chat-empty button {
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  background: #ffffff05;
  color: var(--text-secondary);
  padding: 0.35rem 0.65rem;
  margin: 0.2rem;
  cursor: pointer;
  font: inherit;
}
.gev-chat-message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 0.65rem 0.8rem;
  border-radius: 0.6rem;
  background: #ffffff05;
}
.gev-chat-message[data-role='user'] {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  align-self: flex-end;
  max-width: 90%;
  padding: 0;
  background: transparent;
  border: 0;
}
.gev-chat-message small {
  display: block;
  margin-bottom: 0.3rem;
  font: 0.6rem var(--font-mono);
  color: var(--accent);
  letter-spacing: 0.08em;
}
#gev-chat-status {
  margin: 0;
  padding: 0.3rem 1rem;
  color: var(--text-secondary);
  font-size: 0.7rem;
}
#gev-chat-form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.4rem 0.8rem 0.8rem;
  padding: 0.65rem;
  border: 1px solid #36dcff40;
  border-radius: 0.65rem;
  background: #020a1080;
}
#gev-chat-input {
  box-sizing: border-box;
  field-sizing: content;
  min-height: 2rem;
  max-height: 7rem;
  padding: 0.4rem 0;
  flex: 1;
  min-width: 0;
  resize: none;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  line-height: 1.2rem;
}
#gev-chat-form:focus-within {
  border-color: rgba(54, 220, 255, 0.45);
}
#gev-chat-send {
  width: 2rem;
  height: 2rem;
  align-self: center;
  border: 0;
  border-radius: 0.4rem;
  background: var(--accent);
  color: #06141b;
  cursor: pointer;
}
#gev-chat-send:disabled {
  opacity: 0.3;
  cursor: default;
}
#gev-voice-settings-panel .gev-voice-provider-field {
  position: static;
  display: flex;
  width: auto;
  margin: 0 0 0.75rem;
  transform: none;
}
#gev-chat-panel button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#command-dock
  #gev-voice-control
  #gev-chat-header-actions
  #gev-voice-settings-button {
  position: static;
  inset: auto;
  transform: none;
  flex: 0 0 2rem;
  width: 2rem;
  min-width: 2rem;
  height: 2rem;
}
#gev-chat-header-actions {
  flex: 0 0 auto;
  gap: 0.25rem;
}
#gev-chat-panel .gev-chat-header > div:first-child {
  min-width: 0;
}

/* Keep the original voice-card height while giving the selected mode room. */
#command-dock > #gev-voice-control {
  height: 5.35rem;
  margin-top: -0.97rem;
  margin-bottom: -0.97rem;
  transition:
    width 220ms ease,
    flex-basis 220ms ease;
}
#command-dock
  #gev-voice-control[data-assistant-mode='voice']
  > .gev-voice-visualizer {
  display: flex;
  order: 2;
  width: 3.5rem;
  height: 2rem;
  align-self: center;
  align-items: center;
  transform: translateY(-0.375rem);
  padding: 0;
  border: 0;
}
#command-dock #gev-voice-button {
  order: 1;
  flex-shrink: 0;
}
#command-dock #gev-chat-button {
  order: 3;
  flex-shrink: 0;
}
#command-dock :is(#gev-voice-button, #gev-chat-button):disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: transparent;
  box-shadow: none;
}
#command-dock #gev-voice-control .gev-panel-layout {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}
#command-dock #gev-voice-control .gev-panel-layout button {
  display: grid;
  place-items: center;
  width: 1.65rem;
  min-width: 1.65rem;
  height: 1.8rem;
  min-height: 1.8rem;
  padding: 0;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}
#command-dock
  #gev-voice-control
  .gev-panel-layout
  button:is(:hover, [aria-pressed='true']) {
  color: var(--accent);
  background: #36dcff14;
}
#gev-chat-panel .gev-chat-header {
  align-items: flex-start;
  padding: 0.75rem;
}
#gev-chat-panel .gev-chat-header p {
  max-width: none;
}
#gev-chat-header-actions {
  gap: 0;
}
#gev-chat-panel {
  width: min(25rem, calc(100vw - 1.5rem));
}
@media (prefers-reduced-motion: reduce) {
  #command-dock > :is(#gev-voice-control) {
    transition: none;
  }
}

#gev-chat-attach {
  align-self: center;
  display: grid;
  place-items: center;
  flex: 0 0 2rem;
  height: 2rem;
  border: 0;
  border-radius: 0.4rem;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
}
#gev-chat-attach:is(:hover, [aria-expanded='true']) {
  color: var(--accent);
  background: #36dcff14;
}
#gev-chat-attach:disabled {
  opacity: 0.3;
  cursor: default;
}
#gev-chat-attach-menu {
  margin: 0.4rem 0.8rem;
  padding: 0.7rem;
  border: 1px solid var(--glass-border);
  border-radius: 0.6rem;
  background: #020a10;
}
#gev-chat-attach-menu label {
  display: block;
  margin-bottom: 0.4rem;
}
#gev-chat-attach-menu select,
#gev-chat-attach-menu button {
  max-width: 100%;
  padding: 0.4rem;
  border: 1px solid var(--glass-border);
  border-radius: 0.3rem;
  color: var(--text-primary);
  background: #10232d;
  font: inherit;
}
#gev-chat-layer-row {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}
#gev-chat-layer-row select {
  flex: 1 1 auto;
  min-width: 0;
}
#gev-chat-attach-menu button:disabled {
  opacity: 0.5;
  cursor: default;
}
#gev-chat-attach-menu p {
  margin-bottom: 0;
  font-size: 0.65rem;
  color: var(--text-secondary);
}
#gev-chat-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
}
#gev-chat-attachments button,
#gev-chat-attachments .chat-map-reference {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.3rem 0.5rem;
  border: 1px solid #36dcff40;
  border-radius: 1rem;
  background: #36dcff14;
  color: var(--accent);
  font: inherit;
  font-size: 0.7rem;
}
#gev-chat-attachments button {
  cursor: pointer;
}
/* The composer owns focus indication; avoid a second box around its textarea. */
#gev-chat-panel #gev-chat-input:focus-visible {
  /* Override the global white focus ring; the composer shows focus instead. */
  outline: none !important;
  box-shadow: none;
}

#gev-chat-restore {
  display: none;
}
#gev-chat-panel[data-minimized='true'] {
  width: min(15rem, calc(100vw - 1.5rem));
  transition: width 180ms ease;
  border-radius: 1rem;
  overflow: visible;
}
#gev-chat-panel[data-minimized='true'] > :not(#gev-chat-form) {
  display: none;
}
#gev-chat-panel[data-minimized='true'] #gev-chat-form {
  align-items: center;
  margin: 0;
  padding: 0.55rem;
  border: 0;
  border-radius: inherit;
  gap: 0.4rem;
}
#gev-chat-panel[data-minimized='true'] #gev-chat-attach {
  display: none;
}
#gev-chat-panel[data-minimized='true'] #gev-chat-restore {
  display: grid;
  place-items: center;
  flex: 0 0 2rem;
  height: 2rem;
  border: 0;
  border-radius: 0.5rem;
  color: var(--accent);
  background: #36dcff14;
  cursor: pointer;
}
#gev-chat-panel[data-minimized='true'] #gev-chat-input {
  height: 2rem;
  max-height: 2rem;
  padding: 0.4rem 0;
}
#gev-chat-panel[data-minimized='true'] #gev-chat-send {
  align-self: center;
}

#gev-chat-panel[data-minimized='true']:focus-within {
  width: min(25rem, calc(100vw - 1.5rem));
  border-color: rgba(54, 220, 255, 0.45);
  box-shadow:
    0 0.5rem 1.5rem #0006,
    0 0 0 1px #36dcff14;
}

@media (prefers-reduced-motion: reduce) {
  #gev-chat-panel[data-minimized='true'] {
    transition: none;
  }
}

#gev-chat-mini-reply {
  display: none;
}
#gev-chat-panel[data-minimized='true'] > #gev-chat-mini-reply:not([hidden]) {
  display: block;
  position: absolute;
  bottom: calc(100% + 0.4rem);
  left: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.8rem;
  border: 1px solid #36dcff26;
  border-radius: 0.85rem;
  background: rgba(12, 26, 34, 0.96);
  box-shadow: 0 0.5rem 1.5rem #0005;
  animation: gev-reply-slide 180ms ease-out;
}
#gev-chat-mini-reply header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-secondary);
  font: 0.6rem var(--font-mono);
  letter-spacing: 0.1em;
}
#gev-chat-expand-reply {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border: 0;
  border-radius: 0.3rem;
  color: var(--text-secondary);
  background: #ffffff06;
  cursor: pointer;
}
#gev-chat-expand-reply:hover {
  color: var(--accent);
  background: #36dcff14;
}
#gev-chat-mini-text {
  margin: 0.4rem 0 0;
  max-height: 6.5rem;
  overflow: auto;
  overscroll-behavior: contain;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.75rem;
  line-height: 1.5;
}
@keyframes gev-reply-slide {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  #gev-chat-panel[data-minimized='true'] > #gev-chat-mini-reply {
    animation: none;
  }
}

#gev-voice-control > .gev-chat-thinking {
  display: none;
}
#command-dock
  #gev-voice-control[data-assistant-mode='chat']
  > .gev-chat-thinking {
  display: flex;
  order: 2;
  flex: 0 0 3.5rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transform: translateY(-0.375rem);
}
.gev-chat-thinking span {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.3;
}
#gev-voice-control[data-chat-busy='true'] .gev-chat-thinking span {
  animation: gev-thinking-pulse 1.2s ease-in-out infinite;
}
#gev-voice-control .gev-chat-thinking span:nth-child(2) {
  animation-delay: 0.16s;
}
#gev-voice-control .gev-chat-thinking span:nth-child(3) {
  animation-delay: 0.32s;
}
@keyframes gev-thinking-pulse {
  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  40% {
    opacity: 0.95;
    transform: translateY(-0.2rem);
  }
}
@media (prefers-reduced-motion: reduce) {
  #gev-voice-control[data-chat-busy='true'] .gev-chat-thinking span {
    animation: none;
    opacity: 0.8;
  }
}

#gev-voice-control .gev-voice-panel #gev-chat-back[hidden] {
  display: none;
}
#gev-voice-control .gev-voice-panel :is(#gev-chat-back, #gev-voice-back) {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0.3rem 0.75rem 0.3rem 0.45rem;
  border: 1px solid #36dcff66;
  border-radius: 0.45rem;
  background: #36dcff1f;
  color: var(--accent);
  font: 600 0.75rem var(--font-sans);
  letter-spacing: 0.02em;
  cursor: pointer;
}
#gev-voice-control .gev-voice-panel :is(#gev-chat-back, #gev-voice-back):hover {
  background: #36dcff33;
}
#gev-chat-back:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
#gev-voice-panel[data-context='chat'] .gev-voice-panel-title {
  display: none;
}

#gev-chat-send .gev-chat-stop-icon {
  display: none;
}
#gev-chat-send[data-busy='true'] .gev-chat-enter-icon {
  display: none;
}
#gev-chat-send[data-busy='true'] .gev-chat-stop-icon {
  display: block;
}

.gev-chat-message[data-role='user'] small {
  order: 2;
  flex: 0 0 1.75rem;
  width: 1.75rem;
  height: 1.75rem;
  margin: 0.4rem 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.45rem;
  background: #fff;
  color: #132630;
  font-size: 0;
  letter-spacing: 0;
}
.gev-chat-message[data-role='user'] small::after {
  content: '';
  display: block;
  width: 1rem;
  height: 1rem;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='7' r='3.5'/%3E%3Cpath d='M5 21v-2a7 7 0 0 1 14 0v2'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.gev-chat-message[data-role='user'] > span {
  min-width: 0;
  padding: 0.65rem 0.8rem;
  border-radius: 0.6rem;
  background: #36dcff14;
  border: 1px solid #36dcff20;
}

.gev-chat-message[data-role='assistant'] {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0;
  background: transparent;
}
.gev-chat-message[data-role='assistant'] > span {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.8rem;
  border-radius: 0.6rem;
  background: #ffffff05;
}
.gev-chat-message[data-role='assistant'] small {
  order: 0;
  flex: 0 0 1.75rem;
  width: 1.75rem;
  height: 1.75rem;
  margin: 0.4rem 0 0;
  border-radius: 0.45rem;
  background: #10242e url('/logo.svg') center / 1.45rem 1.45rem no-repeat;
  font-size: 0;
  letter-spacing: 0;
}

/* Raised teal instrument dock, with quiet detail and real activity indicators. */
#command-dock,
#command-dock:has(#gev-voice-control[data-assistant-mode]) {
  --dock-voice-width: 11rem;
}
#command-dock > #gev-voice-control {
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.9rem 0.85rem;
  border: 1px solid rgba(54, 220, 255, 0.32);
  border-radius: 1.35rem;
  background: linear-gradient(
    155deg,
    rgba(14, 39, 50, 0.98),
    rgba(7, 25, 35, 0.98) 70%
  );
  box-shadow:
    inset 0 0 0 1px #8ae5f00a,
    inset 0 1px 0 #c3f5ff14,
    0 8px 24px #0006,
    0 0 18px #36dcff12;
}
#command-dock #gev-voice-button,
#command-dock #gev-chat-button {
  color: #a8c5ce;
  transform: translateY(0.1rem);
}
#command-dock #gev-voice-control .gev-mic-orbit,
#command-dock #gev-chat-button > svg {
  border-color: #90b7c366;
  background: linear-gradient(145deg, #1a3743, #0b202b);
  box-shadow:
    0 0 0 3px #061d2980,
    0 0 0 4px #a4e7f029,
    inset 0 1px 3px #c6f5ff12,
    0 3px 7px #0006;
}
#command-dock #gev-voice-control > .gev-chat-thinking,
#command-dock
  #gev-voice-control[data-assistant-mode='chat']
  > .gev-chat-thinking {
  display: flex;
  position: absolute;
  top: 0.65rem;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  height: 0.3rem;
  gap: 0.35rem;
  align-items: center;
}
#gev-voice-control[data-assistant-mode='idle']
  .gev-chat-thinking
  span:first-child {
  opacity: 0.7;
}
#command-dock #gev-voice-control > .gev-voice-visualizer,
#command-dock
  #gev-voice-control[data-assistant-mode='voice']
  > .gev-voice-visualizer {
  position: absolute;
  display: flex;
  bottom: 0.45rem;
  left: 1rem;
  right: 1rem;
  width: auto;
  height: 0.6rem;
  transform: none;
  align-items: flex-end;
  gap: 3px;
  padding: 0;
  border: 0;
  pointer-events: none;
  opacity: 0.8;
}
#command-dock
  #gev-voice-control:not([data-assistant-mode='voice'])
  > .gev-voice-visualizer
  span {
  height: 5px;
  animation: none;
  opacity: 0.4;
}
#command-dock
  #gev-voice-control[data-assistant-mode='chat']
  > .gev-voice-visualizer {
  opacity: 0.25;
}

#gev-voice-control #gev-voice-panel {
  width: min(25rem, calc(100vw - 1.5rem));
}
#gev-voice-panel .gev-voice-panel-header [role='tablist'] {
  flex-wrap: nowrap;
  align-items: center;
}

/* Bring the selected mode's indicator between the two controls. */
#command-dock:has(
  #gev-voice-control:is(
    [data-assistant-mode='chat'],
    [data-assistant-mode='voice']
  )
) {
  --dock-voice-width: 14rem;
}
#command-dock
  > #gev-voice-control:is(
    [data-assistant-mode='chat'],
    [data-assistant-mode='voice']
  ) {
  justify-content: space-between;
}
#command-dock
  #gev-voice-control[data-assistant-mode='chat']
  > .gev-chat-thinking {
  top: 50%;
  height: 2rem;
  gap: 0.5rem;
  transform: translate(-50%, -50%);
}
#gev-voice-control[data-assistant-mode='chat'] .gev-chat-thinking span {
  width: 0.6rem;
  height: 0.6rem;
  opacity: 0.65;
}
#command-dock
  #gev-voice-control[data-assistant-mode='voice']
  > .gev-voice-visualizer {
  top: 50%;
  bottom: auto;
  left: 50%;
  right: auto;
  width: 3.75rem;
  height: 2rem;
  gap: 2px;
  align-items: center;
  transform: translate(-50%, -50%);
}
#command-dock
  #gev-voice-control[data-assistant-mode='voice']
  > .gev-voice-visualizer
  span {
  min-height: 6px;
  max-height: 2rem;
}
@media (prefers-reduced-motion: no-preference) {
  #command-dock #gev-voice-control > .gev-chat-thinking {
    transition:
      top 220ms ease,
      height 220ms ease,
      transform 220ms ease,
      gap 220ms ease;
  }
  #gev-voice-control .gev-chat-thinking span {
    transition:
      width 220ms ease,
      height 220ms ease;
  }
}

#gev-chat-panel .gev-chat-message > span,
#gev-chat-panel #gev-chat-input,
#gev-chat-panel #gev-chat-mini-text {
  color: #dcebf0;
  font-size: 13px;
}
#gev-chat-suggestions {
  padding: 0 14px 8px;
}
#gev-chat-suggestions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
#gev-chat-suggestions small {
  width: 100%;
  color: var(--text-secondary);
  font-size: 10px;
}
#gev-chat-suggestions button {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 5px 8px;
  border: 1px solid #70c8dd26;
  border-radius: 6px;
  color: #b4cdd5;
  background: #36dcff08;
  font: 11px var(--font-sans);
  cursor: pointer;
}
#gev-chat-suggestions button:hover {
  background: #36dcff18;
}
#gev-chat-panel[data-minimized='true'] #gev-chat-suggestions {
  display: none;
}

#gev-voice-panel .gev-voice-preference-toggle {
  min-height: 2.2rem;
}
#gev-voice-panel .gev-voice-timeout-group {
  margin-top: 0.4rem;
  padding-top: 0.4rem;
}

#command-dock > #gev-voice-control[data-assistant-mode='idle']::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 2rem;
  transform: translate(-50%, -50%);
  background: linear-gradient(
    transparent,
    rgba(145, 190, 204, 0.35) 25%,
    rgba(145, 190, 204, 0.35) 75%,
    transparent
  );
  pointer-events: none;
}

@property --gev-edge-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.gev-active-border {
  display: none;
}
#command-dock
  > #gev-voice-control:is(
    [data-assistant-mode='voice'],
    [data-assistant-mode='chat']
  )
  > .gev-active-border {
  display: block;
  position: absolute;
  inset: -1px;
  padding: 2px;
  border-radius: inherit;
  pointer-events: none;
  background: conic-gradient(
    from var(--gev-edge-angle),
    transparent 0deg,
    #36dcff18 55deg,
    #36dcffb3 90deg,
    #b6f5ff 105deg,
    transparent 145deg,
    transparent 220deg,
    #36dcff70 270deg,
    transparent 310deg
  );
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
}
/* The edge orbits only while voice is live or a chat reply is on its way;
   an idle or minimized chat keeps it still. Touch screens and reduced
   motion keep it still too. */
@media (prefers-reduced-motion: no-preference) and (pointer: fine) {
  #command-dock
    > #gev-voice-control:is(
      [data-assistant-mode='voice'],
      [data-assistant-mode='chat'][data-chat-busy='true']
    )
    > .gev-active-border {
    animation: gev-border-orbit 4s linear infinite;
  }
}
@keyframes gev-border-orbit {
  to {
    --gev-edge-angle: 360deg;
  }
}
@media (prefers-reduced-motion: reduce) {
  #command-dock > #gev-voice-control > .gev-active-border {
    animation: none;
    --gev-edge-angle: 45deg;
  }
}

/* A rounded, tapered waveform; live audio still owns each bar's height. */
#command-dock #gev-voice-control > .gev-voice-visualizer {
  justify-content: center;
  align-items: center;
  gap: 2px;
  filter: drop-shadow(0 0 3px #36dcff24);
}
#command-dock #gev-voice-control > .gev-voice-visualizer span {
  flex: 1 1 0;
  min-width: 0;
  max-width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #a3edf4, #42bfd7 55%, #238ba8);
  box-shadow: none;
  transform-origin: center;
  transform: scaleY(calc(0.4 + min(var(--bar), 14 - var(--bar)) * 0.085));
  transition:
    height 120ms ease-out,
    opacity 180ms ease-out;
}
#command-dock
  #gev-voice-control:not([data-assistant-mode='voice'])
  > .gev-voice-visualizer {
  left: 50%;
  right: auto;
  width: 4.5rem;
  height: 0.75rem;
  transform: translateX(-50%);
}
#command-dock
  #gev-voice-control:not([data-assistant-mode='voice'])
  > .gev-voice-visualizer
  span {
  height: 7px;
  opacity: 0.4;
}
#command-dock
  #gev-voice-control[data-assistant-mode='voice']
  > .gev-voice-visualizer {
  width: 4rem;
  height: 2rem;
}
#command-dock
  #gev-voice-control[data-speaker='user']
  > .gev-voice-visualizer
  span {
  background: linear-gradient(180deg, #f4dcab, #d9ac61);
}
@media (prefers-reduced-motion: reduce) {
  #command-dock #gev-voice-control > .gev-voice-visualizer span {
    transition: none;
  }
}

/* Errors use the alert tray without changing the two-button dock layout. */
#command-dock #gev-voice-control[data-status='error'] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 1.35rem;
}
#command-dock #gev-voice-control[data-status='error'] > .gev-voice-readout {
  display: none;
}

#gev-voice-settings-panel > .gev-voice-provider-field {
  position: static;
  display: flex;
  opacity: 1;
  pointer-events: auto;
  margin: 4px 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
}
#gev-voice-settings-panel > .gev-voice-provider-field[hidden] {
  display: none;
}
#gev-voice-settings-panel > .gev-voice-provider-field {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font: inherit;
  color: var(--text-primary);
}
#gev-voice-settings-panel > .gev-voice-provider-field select {
  flex: 0 1 10rem;
  width: 10rem;
  min-width: 0;
  font: inherit;
}

/* Keep connection/turn state beside the selected mode's indicator. */
#command-dock #gev-assistant-phase {
  position: absolute;
  top: calc(50% + 1rem);
  left: 50%;
  transform: translateX(-50%);
  max-width: 6rem;
  color: #a8c5ce;
  font: 8px/1.2 var(--font-mono, monospace);
  text-align: center;
  pointer-events: none;
}
#command-dock #gev-assistant-phase:empty {
  display: none;
}
@media (prefers-reduced-motion: no-preference) {
  #command-dock
    #gev-voice-control[data-assistant-mode='voice'][data-status='connecting']
    > .gev-voice-visualizer
    span {
    animation: gev-voice-connecting 1.2s ease-in-out infinite;
    animation-delay: calc(var(--bar) * 60ms);
  }
}
@keyframes gev-voice-connecting {
  0%,
  100% {
    opacity: 0.25;
  }
  50% {
    opacity: 1;
  }
}

/* Placement: above the dock by default, or docked into the right rail lane. */
body[data-assistant-docked='true'] #right-context-rail {
  visibility: hidden;
  pointer-events: none;
}
#gev-voice-control [data-assistant-panel] {
  max-width: calc(100vw - 1rem);
}
#gev-voice-control [data-assistant-panel][data-placement='docked'] {
  max-width: none;
  max-height: none;
}
#gev-chat-panel[data-placement='docked'] #gev-chat-messages {
  flex: 1 1 auto;
}
/* The lane is narrow: quick commands below already offer these prompts. */
#gev-chat-panel[data-placement='docked'] #gev-chat-empty > :is(svg, button) {
  display: none;
}

/* Settings opened from chat: same frame as chat, chat options first, then
   the voice preferences, the only pointer route to them while Preview is off. */
#command-dock
  #gev-voice-control
  #gev-voice-panel[data-context='chat']
  :is(.gev-voice-panel-tabs, .gev-panel-layout),
#gev-voice-panel:not([data-context='chat']) #gev-settings-chat {
  display: none;
}
#gev-voice-panel[data-context='chat'] #gev-settings-voice {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--glass-border);
}
#gev-voice-control
  #gev-voice-panel[data-context='chat'][data-placement='compact']:not(
    [data-minimized]
  ) {
  width: var(--chat-frame-width, min(25rem, calc(100vw - 1.5rem)));
  height: var(--chat-frame-height, auto);
  max-height: none;
}
#gev-voice-panel[data-context='chat'] .gev-voice-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

/* Minimized voice reads like chat's minimized reply card. */
#command-dock #gev-voice-control #gev-voice-panel[data-minimized] {
  width: min(15rem, calc(100vw - 1rem));
  height: auto;
  min-height: 0;
  max-height: none;
  justify-content: center;
  gap: 0;
  padding: 0.65rem 0.8rem;
  border: 1px solid #36dcff26;
  border-radius: 0.85rem;
  background: rgba(12, 26, 34, 0.96);
  box-shadow: 0 0.5rem 1.5rem #0005;
}
#command-dock
  #gev-voice-control
  #gev-voice-panel[data-minimized]
  .gev-voice-panel-header {
  min-height: 0;
  padding: 0;
  border: 0;
}
#command-dock
  #gev-voice-control
  #gev-voice-panel[data-minimized]
  .gev-voice-panel-title {
  color: var(--text-secondary);
  font: 0.6rem var(--font-mono);
  letter-spacing: 0.1em;
}
#command-dock
  #gev-voice-control
  #gev-voice-panel[data-minimized]
  .gev-voice-panel-header
  button:not(#gev-chat-back, #gev-voice-back) {
  display: grid;
  place-items: center;
  width: 1.65rem;
  min-width: 1.65rem;
  height: 1.65rem;
  min-height: 1.65rem;
  padding: 0;
  border: 0;
  border-radius: 0.3rem;
  color: var(--text-secondary);
  background: #ffffff06;
  box-shadow: none;
}
#command-dock
  #gev-voice-control
  #gev-voice-panel[data-minimized]
  .gev-voice-panel-header
  button:not(#gev-chat-back, #gev-voice-back):hover {
  color: var(--accent);
  background: #36dcff14;
}
#command-dock
  #gev-voice-control
  #gev-voice-panel[data-minimized]
  :is(
    .gev-voice-panel-body,
    .gev-voice-panel-tabs,
    .gev-panel-layout [data-layout-dock]
  ) {
  display: none;
}
#command-dock
  #gev-voice-control
  #gev-voice-panel:not([data-context='chat'])
  #gev-chat-back {
  display: none;
}

/* Title leads; tabs, layout and close group on the right. */
#gev-voice-panel .gev-voice-panel-title {
  margin-right: auto;
}

/* Phones have no right rail to dock into. It outranks the shared header
   button rule, which would otherwise show the dock button again. */
@media (max-width: 720px) {
  #command-dock #gev-voice-control .gev-panel-layout [data-layout-dock] {
    display: none !important;
  }
}

/* Minimized voice previews the last sentence from each side. */
.gev-voice-mini {
  display: none;
}
#command-dock
  #gev-voice-control
  #gev-voice-panel[data-minimized]
  .gev-voice-mini {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.4rem;
}
#command-dock
  #gev-voice-control
  #gev-voice-panel[data-minimized]:has(.gev-voice-mini p:not([hidden])) {
  width: min(25rem, calc(100vw - 1rem));
}
.gev-voice-mini p {
  display: flex;
  gap: 0.6rem;
  min-width: 0;
  margin: 0;
  color: var(--text-primary);
  font: 0.75rem/1.5 var(--font-sans);
}
.gev-voice-mini p[hidden] {
  display: none;
}
.gev-voice-mini-who {
  flex: 0 0 2.25rem;
  padding-top: 0.15rem;
  color: var(--text-secondary);
  font: 0.6rem var(--font-mono);
  letter-spacing: 0.1em;
}
.gev-voice-mini p > span:last-child {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* The mode not in use steps back until pointed at. */
#command-dock #gev-voice-control :is(#gev-voice-button, #gev-chat-button) {
  transition: opacity 160ms ease;
}
#command-dock
  #gev-voice-control[data-assistant-mode='voice']
  #gev-chat-button:not(:hover, :focus-visible),
#command-dock
  #gev-voice-control[data-assistant-mode='chat']
  #gev-voice-button:not(:hover, :focus-visible) {
  opacity: 0.4;
}

/* A focused tab that is already selected shows one highlight, not two. */
#command-dock
  #gev-voice-control
  #gev-voice-panel
  [role='tab'][aria-selected='true']:is(:focus, :focus-visible) {
  outline: none !important;
  box-shadow:
    0 0 0 1px currentColor,
    0 -2px 0 currentColor inset;
}

/* Minimized, like chat's reply card: the preview reads above and the
   controls sit at the bottom. The expanded panel keeps its header on top. */
#command-dock
  #gev-voice-control
  #gev-voice-panel[data-minimized]
  .gev-voice-panel-header {
  order: 2;
}
#command-dock
  #gev-voice-control
  #gev-voice-panel[data-minimized]
  .gev-voice-mini {
  order: 1;
  margin: 0 0 0.4rem;
}

/* A focused toggle that is already pressed shows one highlight, not two. */
#command-dock
  #gev-voice-control
  .gev-panel-layout
  button[aria-pressed='true']:is(:focus, :focus-visible) {
  outline: none !important;
  box-shadow: 0 0 0 1px currentColor;
}

/* Assistant panels share the left panels' glass surface (layers.css). */
:root #gev-voice-control {
  --assistant-glass: var(--glass-bg);
  --assistant-glass-border: var(--glass-border);
  --assistant-glass-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
:root
  #command-dock
  #gev-voice-control
  :is(
    #gev-chat-panel,
    #gev-voice-panel,
    #gev-voice-panel[data-minimized],
    #gev-chat-panel[data-minimized='true'] > #gev-chat-mini-reply
  ) {
  background: var(--assistant-glass);
  border-color: var(--assistant-glass-border);
  box-shadow: var(--assistant-glass-shadow);
}
/* The mini reply sits inside the chat panel, whose own blur makes it the
   backdrop root: a blur on the reply could not reach the map. */
:root
  #command-dock
  #gev-voice-control
  :is(#gev-chat-panel, #gev-voice-panel, #gev-voice-panel[data-minimized]) {
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
}
:root
  #command-dock
  #gev-voice-control
  #gev-chat-panel[data-minimized='true']:focus-within {
  border-color: rgba(54, 220, 255, 0.45);
}

/* A backdrop-filter on the voice control would stop the panels inside it
   from blurring the map, so its own blur moves to a layer behind it. */
:root #command-dock > #gev-voice-control {
  isolation: isolate;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
:root #command-dock > #gev-voice-control::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
}

/* The empty voice preview suggests a few things to say until voice starts. */
.gev-voice-hints {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  color: var(--text-secondary);
  font: 0.75rem/1.4 var(--font-sans);
}
.gev-voice-hints small {
  flex-basis: 100%;
  text-align: center;
  font: 0.6rem var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.gev-voice-hints q {
  padding: 0.25rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.45rem;
  color: var(--text-primary);
}
#gev-voice-preview-empty[hidden] + .gev-voice-hints,
#gev-voice-control[data-voice-exchange] .gev-voice-hints {
  display: none;
}

/* One icon-button style across the chat and voice headers: plain at rest,
   a soft fill on hover, accent only when the button is active. */
#command-dock #gev-voice-control #gev-voice-preview-tab {
  display: none;
}
#command-dock
  #gev-voice-control
  :is(
    #gev-chat-header-actions,
    #gev-voice-panel:not([data-minimized]) .gev-voice-panel-header
  )
  button:not(#gev-chat-back, #gev-voice-back, #gev-voice-preview-tab) {
  display: grid;
  place-items: center;
  width: 2rem;
  min-width: 2rem;
  height: 2rem;
  min-height: 2rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 0.45rem;
  color: var(--text-secondary);
  background: transparent;
  box-shadow: none;
  font-size: 1.1rem;
  line-height: 1;
}
#command-dock
  #gev-voice-control
  :is(
    #gev-chat-header-actions,
    #gev-voice-panel:not([data-minimized]) .gev-voice-panel-header
  )
  button:not(#gev-chat-back, #gev-voice-back, #gev-voice-preview-tab):hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}
#command-dock
  #gev-voice-control
  :is(
    #gev-chat-header-actions,
    #gev-voice-panel:not([data-minimized]) .gev-voice-panel-header
  )
  button:not(#gev-chat-back, #gev-voice-back, #gev-voice-preview-tab):is(
    [aria-pressed='true'],
    [aria-selected='true']
  ) {
  color: var(--accent);
  background: rgba(54, 220, 255, 0.12);
  border-color: rgba(54, 220, 255, 0.35);
}
#command-dock
  #gev-voice-control
  :is(
    #gev-chat-header-actions,
    #gev-voice-panel:not([data-minimized]) .gev-voice-panel-header
  )
  button:not(#gev-chat-back, #gev-voice-back, #gev-voice-preview-tab):is(
    [aria-pressed='true'],
    [aria-selected='true']
  ):is(:focus, :focus-visible) {
  outline: none !important;
  box-shadow: 0 0 0 1px currentColor;
}

/* Keyboard focus on Back to chat uses the accent, matching the button. */
#command-dock
  #gev-voice-control
  #gev-voice-panel
  :is(#gev-chat-back, #gev-voice-back):focus-visible {
  outline: 2px solid var(--accent) !important;
  outline-offset: 2px;
}

/* Inside the panel, the reply card's own title and close repeat the
   panel's; its status stays. The standalone card keeps both. */
#command-dock
  #gev-voice-control
  #gev-voice-preview-panel
  :is(.gev-voice-card-kicker, #gev-voice-card-dismiss) {
  display: none;
}

/* Voice Settings follow chat Settings: Back to voice and close only. */
#command-dock #gev-voice-control #gev-voice-panel #gev-voice-back {
  display: none;
}
#command-dock
  #gev-voice-control
  #gev-voice-panel[data-view='settings']:not(
    [data-context='chat'],
    [data-minimized]
  )
  #gev-voice-back {
  display: inline-flex;
}
#command-dock
  #gev-voice-control
  #gev-voice-panel[data-view='settings']:not(
    [data-context='chat'],
    [data-minimized]
  )
  :is(.gev-voice-panel-title, .gev-voice-panel-tabs, .gev-panel-layout) {
  display: none;
}

/* Voice header buttons follow chat's order: dock, minimize, settings, close. */
#command-dock
  #gev-voice-control
  #gev-voice-panel
  .gev-voice-panel-header
  .gev-panel-layout {
  order: 1;
}
#command-dock
  #gev-voice-control
  #gev-voice-panel
  .gev-voice-panel-header
  .gev-voice-panel-tabs {
  order: 2;
  margin-left: 0;
}
#command-dock
  #gev-voice-control
  #gev-voice-panel
  .gev-voice-panel-header
  #gev-voice-settings-close {
  order: 3;
}

/* The empty voice preview centres like chat's empty state. */
#command-dock
  #gev-voice-control
  #gev-voice-preview-panel
  #gev-voice-preview-empty {
  padding-top: 0.5rem;
  text-align: center;
}
#command-dock #gev-voice-control #gev-voice-preview-panel .gev-voice-hints {
  padding-bottom: 0.5rem;
}

/* Inside the voice panel the reply card sits on the panel's glass; its own
   standalone blur would draw a grey box there. */
#command-dock #gev-voice-control #gev-voice-panel .gev-voice-card {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* From 1200px the dock sits 74px up (command-dock.css), 74px - 2vh higher
   than the bottom-edge dock this height budget was written for. */
@media (min-width: 1200px) {
  #gev-chat-panel {
    max-height: min(34rem, calc(100dvh - 10rem - 74px + 2vh));
  }
}
/* With Scope off the map fills the whole screen. The HUD keeps its black
   plates (overlays.css); the glass chrome lifts off the map with a soft
   drop shadow. */
:root[data-scope-mask='off'] {
  --scope-off-panel-shadow:
    0 10px 30px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.45);
}

/* Glass surfaces (rails, the rails' name panels, open panels and
   the dock) get a lift so their edges hold against bright imagery. */
:root[data-scope-mask='off'] .ui-rail,
:root[data-scope-mask='off'] .gev-panel-rail .ui-rail--expanded::after,
:root[data-scope-mask='off']
  :is(.data-panel-inner, .utilities-panel-inner, .ui-panel__inner),
:root[data-scope-mask='off'] #left-panel-stack > #pp-toggles,
:root[data-scope-mask='off']
  #right-context-rail
  > [data-panel-id]:not(.collapsed),
:root[data-scope-mask='off'] #command-dock > * {
  box-shadow: var(--scope-off-panel-shadow);
}

:root[data-scope-mask='off'] .ui-rail__label,
:root[data-scope-mask='off'] .ui-rail__item .ui-icon {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}
/* Stories, closed: the Stories button, its first-visit popup and the
   back-to-story toast, which every GEV page shows. The rest of Stories'
   styles (stories.css) load with Stories itself. */
/* Ported from the GEV Stories prototype (gev-stories-real-globe.html), scoped to #gev-stories. */
#gev-stories {
  --bg-dark: #0a0a0f;
  --glass-bg: rgba(12, 12, 20, 0.72);
  --glass-strong: rgba(14, 14, 24, 0.9);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.15);
  --accent: #00d4ff;
  --accent-dim: rgba(0, 212, 255, 0.15);
  --accent-glow: rgba(0, 212, 255, 0.4);
  --text-primary: #e8eaed;
  --text-secondary: rgba(232, 234, 237, 0.64);
  --text-dim: rgba(232, 234, 237, 0.42);
  --menu-bg: #12121c;
  --warn: #ffb45a;
  --cable: #a9b8ff;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --panel-radius: 16px;
  --btn-radius: 10px;
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --review-h: 46px;
  color-scheme: dark;
}
#gev-stories {
  background: #050508;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  overflow: hidden;
}
#gev-stories .glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
#gev-stories .tbtn {
  height: 38px;
  padding: 0 14px;
  border-radius: var(--btn-radius);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font: 500 12px var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
  white-space: nowrap;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast);
}
#gev-stories .tbtn:hover {
  border-color: var(--glass-border-hover);
}
#gev-stories .tbtn svg {
  width: 16px;
  height: 16px;
  flex: none;
}
#gev-stories .tbtn.accent {
  border-color: rgba(0, 212, 255, 0.55);
  color: var(--accent);
  background: rgba(0, 212, 255, 0.08);
  box-shadow: 0 0 18px -6px var(--accent-glow);
}
#gev-stories .tbtn.accent:hover {
  background: rgba(0, 212, 255, 0.14);
}
#gev-stories .tbtn.solid {
  background: var(--accent);
  color: #001820;
  border-color: transparent;
  font-weight: 600;
}
#gev-stories .h-pop {
  position: absolute;
  z-index: 9;
  top: 84px;
  right: 74px;
  width: 300px;
  padding: 16px;
  border-radius: var(--panel-radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  animation: gsx-popIn 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
#gev-stories .h-pop::before {
  content: '';
  position: absolute;
  top: -7px;
  right: 60px;
  width: 12px;
  height: 12px;
  background: var(--glass-strong);
  border-left: 1px solid var(--glass-border);
  border-top: 1px solid var(--glass-border);
  transform: rotate(45deg);
}
#gev-stories .h-pop {
  background: var(--glass-strong);
}
#gev-stories .h-pop .k {
  font: 600 11px var(--font-mono);
  letter-spacing: 0.16em;
  color: var(--accent);
}
#gev-stories .h-pop h2 {
  font-size: 17px;
  margin: 4px 0 6px;
}
#gev-stories .h-pop p {
  color: var(--text-secondary);
  font-size: 13px;
}
#gev-stories .h-pop .row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
#gev-stories .h-toast {
  position: absolute;
  z-index: 9;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 16px;
  border-radius: 14px;
  background: rgba(12, 12, 20, 0.92);
  border: 1px solid rgba(0, 212, 255, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  animation: gsx-popIn 0.25s ease;
  max-width: calc(100% - 28px);
}
#gev-stories .h-toast[hidden] {
  display: none;
}
#gev-stories .h-toast b {
  font: 600 11px var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
#gev-stories .h-toast span {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
#gev-stories .h-toast .tbtn {
  height: 32px;
  flex: none;
}

/* The root only hosts fixed layers; it takes no room of its own. */
#gev-stories {
  position: static;
  height: 0 !important;
  overflow: visible !important;
  background: none !important;
}

/* GEV: the Stories entry sits in GEV's top-right row. */
#gev-stories .gs-entry {
  position: fixed;
  z-index: 1200;
  height: 36px;
  font: 600 11px var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
#gev-stories .gs-entry svg {
  width: 17px;
  height: 17px;
}
/* `.loading-screen-shown` is a page-root class (src/ui/rail/rootClass.js). */
body:is(.loading-screen-shown *, #loading-screen:not(.hidden))
  #gev-stories
  .gs-entry,
body:is(.loading-screen-shown *, #loading-screen:not(.hidden))
  #gev-stories
  .gs-pop,
body.recording-mode #gev-stories .gs-entry,
body.recording-mode #gev-stories .gs-pop,
body.ui-clean-view #gev-stories .gs-entry,
body.ui-clean-view #gev-stories .gs-pop {
  display: none;
}
#gev-stories .gs-pop {
  position: fixed;
  z-index: 1201;
  left: auto;
}
#gev-stories .gs-opened-toast {
  position: fixed;
  z-index: 1201;
  bottom: 110px;
}
@media (max-width: 720px) {
  #gev-stories .gs-pop {
    left: 12px;
    right: 12px !important;
    width: auto;
  }
}
/* Shared with the screens' panels (stories.css). */
@keyframes gsx-popIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Over a live globe a backdrop blur is redrawn every frame (costly on
   software WebGL): the closed-state pieces use a near-opaque fill instead. */
#gev-stories .gs-entry,
#gev-stories .gs-pop,
#gev-stories .gs-opened-toast {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
#gev-stories .gs-entry {
  background: rgba(6, 24, 34, 0.92);
}
#gev-stories .gs-pop,
#gev-stories .gs-opened-toast {
  background: rgba(12, 12, 20, 0.95);
}

/* GEV's phone layout: icon-only, the size of the icon buttons beside it. */
#gev-stories .gs-entry.gs-entry-compact {
  width: 36px;
  padding: 0;
  justify-content: center;
}
#gev-stories .gs-entry.gs-entry-compact span {
  display: none;
}
/* The command surface: [mic] [Omnibar] [chat] in one row above the World
   Timeline, on desktop and on phones alike. Exclusive owners keep their
   layout. It applies while the Omnibar is on the page and the voice control
   is in the dock; that state, and the states its rules select on below, are
   the page-root classes of src/ui/rail/rootClass.js. */
body:not(.cockpit-mode):not(.scene-playback-mode):not(.ui-clean-view):not(
    .recording-mode
  ):where(.has-omnibar.dock-has-voice *) {
  --omnibar-dock-width: clamp(400px, 32vw, 460px);
  /* Clear of the attribution line under it, however many lines it wraps
     onto (--credit-line-height, src/ui/creditLineHeight.js). */
  --omnibar-credits-clear: calc(1rem + var(--credit-line-height, 28px) + 6px);
  /* The World Timeline, and the dock and narrow corners placed from it,
     rise over a line wrapped taller than its usual one or two lines. */
  --omnibar-dock-bottom: max(74px, calc(var(--omnibar-credits-clear) + 2px));
  /* The dock sits above the World Timeline, rising by its height
     (--world-timeline-lift, world-timeline.css) as the plain dock does. */
  --omnibar-dock-raised: calc(
    var(--omnibar-dock-bottom) + var(--world-timeline-lift, 0px)
  );

  #command-dock {
    --dock-voice-width: var(--omnibar-dock-width);
    top: auto;
    bottom: var(--omnibar-dock-raised);
    z-index: 149;
    width: var(--omnibar-dock-width);
    max-width: none;
    height: 56px;
    min-height: 0;
    overflow: visible;
    align-items: center;
    padding: 0;
  }
  #command-dock > #gev-voice-control {
    box-sizing: border-box;
    flex: none;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 56px;
    margin: 0;
    padding: 0 8px;
    gap: 0;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(120, 220, 255, 0.16);
    border-radius: 18px;
    background: linear-gradient(
      180deg,
      rgba(16, 28, 36, 0.9),
      rgba(6, 14, 20, 0.94)
    );
    box-shadow:
      inset 0 1px 0 rgba(200, 245, 255, 0.07),
      0 12px 32px rgba(0, 0, 0, 0.45);
    backdrop-filter: none;
  }
  &:is(.omnibar-focus-within *, #gev-omnibar:focus-within)
    #command-dock
    > #gev-voice-control {
    border-color: rgba(54, 220, 255, 0.5);
    box-shadow:
      0 12px 32px rgba(0, 0, 0, 0.45),
      0 0 0 3px rgba(54, 220, 255, 0.1);
  }
  #command-dock > #gev-voice-control::before,
  #command-dock > #gev-voice-control::after {
    content: '';
    position: absolute;
    top: 16px;
    bottom: 16px;
    width: 1px;
    height: auto;
    transform: none;
    background: rgba(120, 220, 255, 0.12);
    pointer-events: none;
  }
  #command-dock > #gev-voice-control::before {
    inset-inline-start: 54px;
    inset-inline-end: auto;
  }
  #command-dock > #gev-voice-control::after {
    inset-inline-start: auto;
    inset-inline-end: 54px;
  }
  #gev-voice-control > :is(#gev-voice-button, #gev-chat-button):focus-visible {
    outline: 2px solid #7bd3ef;
    outline-offset: 2px;
  }
  #gev-voice-control > :is(#gev-voice-button, #gev-chat-button) {
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(120, 220, 255, 0.18);
    border-radius: 50%;
    background: rgba(5, 17, 24, 0.48);
    box-shadow:
      inset 0 2px 4px rgba(0, 0, 0, 0.58),
      inset 0 -1px 0 rgba(169, 226, 245, 0.12),
      0 1px 0 rgba(169, 226, 245, 0.1);
    transform: none;
  }
  #gev-voice-control
    > :is(#gev-voice-button, #gev-chat-button):is(
      :hover,
      [aria-pressed='true'],
      [aria-expanded='true']
    ) {
    background: rgba(54, 220, 255, 0.14);
    border-color: rgba(54, 220, 255, 0.6);
  }
  #command-dock #gev-voice-control .gev-mic-orbit,
  #command-dock #gev-chat-button > svg {
    box-sizing: border-box;
    width: 19px;
    height: 19px;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  #gev-voice-button .gev-mic-orbit img {
    width: 19px;
    height: 19px;
    filter: saturate(0.35) brightness(1.25);
  }
  #gev-voice-button .gev-mic-orbit::before,
  #gev-voice-button .gev-mic-orbit::after {
    display: none;
  }
  #gev-voice-control :is(.gev-mic-label, .gev-chat-label) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  /* Status remains readable while live; idle meter is decorative. */
  #command-dock
    #gev-voice-control:not([data-assistant-mode='voice'])
    > .gev-voice-visualizer,
  #command-dock
    #gev-voice-control:not([data-chat-busy='true'])
    > .gev-chat-thinking {
    display: none;
  }
  #command-dock #gev-voice-control[data-chat-busy='true'] > .gev-chat-thinking {
    position: absolute;
    top: 10px;
    left: 50%;
    height: 0;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 151;
  }
  #gev-voice-control > .gev-voice-readout {
    position: absolute;
    inset-inline: 0;
    top: auto;
    bottom: calc(100% + 8px);
    pointer-events: none;
  }
  #gev-voice-control[data-assistant-mode='idle'] > .gev-voice-readout {
    visibility: hidden;
  }

  #gev-omnibar {
    top: auto;
    bottom: calc(var(--omnibar-dock-raised) + 11px);
    left: 50%;
    width: calc(var(--omnibar-dock-width) - 120px);
    transform: translateX(-50%);
  }
  #gev-omnibar .omnibar-field {
    height: 34px;
    padding-inline: 9px 6px;
    border: 1px solid rgba(151, 213, 231, 0.27);
    border-radius: 9px;
    background: rgba(172, 219, 239, 0.07);
    box-shadow: none;
    backdrop-filter: none;
  }
  #gev-omnibar-input {
    font-size: 0.86rem;
    text-overflow: ellipsis;
  }
  #gev-omnibar-input::placeholder {
    color: #b6cbd4;
  }
  #gev-omnibar .omnibar-field:focus-within {
    border-color: rgba(95, 230, 255, 0.66);
    background: rgba(109, 206, 232, 0.1);
  }
  #gev-omnibar .omnibar-search-icon {
    color: #a9cfda;
  }
  #gev-omnibar :is(.omnibar-mic, .omnibar-edge) {
    display: none;
  }
  #gev-omnibar .omnibar-results {
    position: absolute;
    inset-inline: -60px;
    top: auto;
    bottom: calc(100% + 11px);
    max-height: min(
      360px,
      max(0px, calc(100dvh - var(--omnibar-dock-raised) - 144px))
    );
    overflow: auto;
    border-radius: 18px 18px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(50, 54, 62, 0.86);
    backdrop-filter: blur(26px) saturate(1.2);
    -webkit-backdrop-filter: blur(26px) saturate(1.2);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
  }
  &:is(.omnibar-has-results *, #gev-omnibar.has-results):not(
      .assistant-voice-mode *,
      #gev-voice-control[data-assistant-mode='voice']
    )
    #command-dock
    > #gev-voice-control {
    border-start-start-radius: 0;
    border-start-end-radius: 0;
  }
  #command-dock
    #gev-voice-control[data-assistant-mode='voice']
    > .gev-voice-visualizer {
    position: absolute;
    display: block;
    inset: auto 64px 10px;
    width: auto;
    height: 28px;
    opacity: 1;
    transform: none;
    pointer-events: none;
  }
  #gev-voice-control > .gev-voice-visualizer > span {
    display: none;
  }
  #gev-voice-control > .gev-voice-visualizer > .gev-voice-wave {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    mask-image: linear-gradient(
      90deg,
      transparent,
      #000 16%,
      #000 84%,
      transparent
    );
  }
  .gev-voice-wave path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .gev-voice-wave__main {
    stroke: #5fe6ff;
    stroke-width: 2;
    filter: drop-shadow(0 0 4px rgba(54, 220, 255, 0.55));
  }
  .gev-voice-wave__echo {
    stroke: #36dcff;
    stroke-width: 1.2;
    opacity: 0.35;
  }
  .gev-voice-wave__soft {
    stroke: #9ff1ff;
    stroke-width: 1;
    opacity: 0.6;
  }
  &:is(.assistant-voice-mode *, #gev-voice-control[data-assistant-mode='voice'])
    #gev-omnibar {
    .omnibar-field {
      background: transparent;
    }
    :is(input, .omnibar-kbd, .omnibar-search-icon) {
      visibility: hidden;
    }
    /* Suggestions give way to the waveform; an error stays in view. */
    .omnibar-results:not(.has-feedback),
    .omnibar-results .omnibar-list {
      display: none;
    }
  }
  @media (prefers-reduced-motion: no-preference) {
    #command-dock #gev-voice-control[data-assistant-mode='voice'] {
      animation: omnibar-listening 2.4s ease-in-out infinite;
    }
  }
}

/* Desktop places the corners, the HUD and the credits around the dock;
   phones place them in mobile-shell.css. */
body:not(.mobile-shell):not(.cockpit-mode):not(.scene-playback-mode):not(
    .ui-clean-view
  ):not(.recording-mode):where(.has-omnibar.dock-has-voice *) {
  --omnibar-coordinates-bottom: max(4.25rem, var(--omnibar-credits-clear));

  #intel-hud:is([data-variant='tactical'], [data-variant='minimal'])
    :is(.hud-top-left, .hud-top-right) {
    top: clamp(92px, 10vh, 112px);
  }

  #intel-hud:is([data-variant='tactical'], [data-variant='minimal'])
    .hud-top-left
    .hud-readout:has(> #hud-mode) {
    display: none;
  }
  /* The globe actions sit on the title row, level with the title, with the
     loading line under them (status.css). Narrower, where the row would reach
     the title, they drop to the HUD's top rows and the loading line drops
     with them, so it never covers the actions. */
  #top-center-actions {
    top: 32px;
  }
  @media (max-width: 1179px) {
    #top-center-actions {
      top: clamp(86px, 9.55vh, 108px);
    }
    #global-loading-status {
      top: calc(clamp(86px, 9.55vh, 108px) + 42px);
    }
  }
  #left-panel-stack.layout-focus {
    bottom: var(--left-stack-safe-bottom, 4vh);
  }

  #world-timeline {
    bottom: var(--omnibar-dock-bottom);
    width: var(--omnibar-dock-width);
  }

  /* Align the plain credits with Power Up. The line wraps at every width
     rather than running under the corner row (Power Up and the language
     picker), whose side it stays clear of. */
  :is(#cesium-credits, #gev-credits),
  &:is(.hud-minimal-active *, #intel-hud[data-variant='minimal'].active)
    :is(#cesium-credits, #gev-credits) {
    bottom: 1rem;
  }
  #gev-credits {
    width: max-content !important;
    max-width: calc(100vw - 1.5rem - 26rem);
    white-space: normal;
  }
  /* Right to left the corner row is at the bottom left, so the line takes
     the bottom right at every width. Expanded Context places it itself. */
  &:where(html[dir='rtl'] *):not(.context-docked) {
    :is(#cesium-credits, #gev-credits),
    &:is(.hud-minimal-active *, #intel-hud[data-variant='minimal'].active)
      :is(#cesium-credits, #gev-credits) {
      right: 1.5rem;
      left: auto;
      text-align: right;
    }
  }
  /* 8px above the bottom-right corner row (Power Up and the language picker:
     32px tall, 14px up), as outside the Omnibar layout. */
  #intel-hud[data-variant='tactical'] .hud-bottom-right {
    bottom: 3.375rem;
  }
  /* Right to left the attribution line is under the readout, which clears
     it however many lines it wraps onto. */
  &:where(html[dir='rtl'] *):not(.context-docked)
    #intel-hud[data-variant='tactical']
    .hud-bottom-right {
    bottom: max(3.375rem, var(--omnibar-credits-clear));
  }
  /* Narrower than the two corners and the dock between them, the corners
     rise above the dock. */
  @media (max-width: 1119px) {
    --omnibar-coordinates-bottom: max(
      calc(var(--omnibar-dock-raised) + 56px + 10px),
      var(--omnibar-credits-clear)
    );
    #intel-hud[data-variant='tactical'] .hud-bottom-right,
    &:where(html[dir='rtl'] *):not(.context-docked)
      #intel-hud[data-variant='tactical']
      .hud-bottom-right {
      bottom: var(--omnibar-coordinates-bottom);
    }
  }
  #intel-hud:is([data-variant='tactical'], [data-variant='minimal'])
    .hud-bottom-left {
    bottom: var(--omnibar-coordinates-bottom);
  }
  &:not(.context-docked):is(
      .hud-minimal-active *,
      #intel-hud[data-variant='minimal'].active
    )
    #right-context-rail {
    --omnibar-minimal-rail-height: min(
      var(--right-stack-max-height, 70vh),
      calc(
        100dvh - var(--right-stack-safe-top, 26vh) -
          var(--omnibar-coordinates-bottom) - 3.1rem - 1.2vh
      )
    );
    max-height: var(--omnibar-minimal-rail-height);
    > [data-panel-id]:not(.collapsed) {
      max-height: var(--omnibar-minimal-rail-height);
    }
  }
}

@keyframes omnibar-listening {
  0%,
  100% {
    border-color: rgba(54, 220, 255, 0.35);
  }
  50% {
    border-color: rgba(54, 220, 255, 0.75);
  }
}
/* ── "Show me how" guide ───────────────────────────────────────────────
   A spotlight dims everything but the control to press and frames it with
   tactical corner brackets; a second frame marks a part of it (a layer's
   switch). A glass callout beside it, with an arrow to the target, says
   what to do and how far along the walk is. Clicks pass through to the
   app: the guide only points. */
.gev-guide {
  --gev-guide-accent: #ff9f43;
  --gev-guide-accent-soft: rgba(255, 159, 67, 0.5);
  position: fixed;
  z-index: 400;
  inset: 0;
  pointer-events: none;
}

/* ── Spotlight ── */
.gev-guide-ring {
  position: fixed;
  border: 1px solid rgba(255, 159, 67, 0.28);
  border-radius: 8px;
  box-shadow: 0 0 0 200vmax rgba(3, 8, 14, 0.55);
  opacity: 0;
  transition:
    left 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
    top 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
    width 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
    height 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 160ms ease;
}

/* Corner brackets, drawn as eight short gradient strokes. */
.gev-guide-ring::before {
  position: absolute;
  inset: -3px;
  background:
    linear-gradient(var(--gev-guide-accent) 0 0) top left / 12px 2px,
    linear-gradient(var(--gev-guide-accent) 0 0) top left / 2px 12px,
    linear-gradient(var(--gev-guide-accent) 0 0) top right / 12px 2px,
    linear-gradient(var(--gev-guide-accent) 0 0) top right / 2px 12px,
    linear-gradient(var(--gev-guide-accent) 0 0) bottom left / 12px 2px,
    linear-gradient(var(--gev-guide-accent) 0 0) bottom left / 2px 12px,
    linear-gradient(var(--gev-guide-accent) 0 0) bottom right / 12px 2px,
    linear-gradient(var(--gev-guide-accent) 0 0) bottom right / 2px 12px;
  background-repeat: no-repeat;
  content: '';
  filter: drop-shadow(0 0 4px rgba(255, 159, 67, 0.6));
}

/* A soft ping that grows out of the frame: "press here". */
.gev-guide-ring > i {
  position: absolute;
  inset: 0;
  border: 1px solid var(--gev-guide-accent-soft);
  border-radius: inherit;
  animation: gev-guide-ping 1.8s cubic-bezier(0.2, 0.7, 0.3, 1) infinite;
}

/* A second frame inside the spotlight does not dim the screen again. */
.gev-guide-ring--sub {
  border-color: rgba(255, 159, 67, 0.4);
  border-radius: 6px;
  box-shadow: none;
}

.gev-guide-ring--sub::before {
  inset: -2px;
  background-size:
    8px 2px,
    2px 8px,
    8px 2px,
    2px 8px,
    8px 2px,
    2px 8px,
    8px 2px,
    2px 8px;
}

/* ── Callout ── */
.gev-guide-callout {
  position: fixed;
  width: 280px;
  padding: 0.7rem 0.8rem 0.65rem;
  color: rgba(232, 238, 242, 0.95);
  background: rgba(40, 44, 52, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  opacity: 0;
  transform: translateY(4px);
  transition:
    left 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
    top 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 180ms ease,
    transform 180ms ease;
  pointer-events: auto;
}

.gev-guide.visible .gev-guide-callout {
  opacity: 1;
  transform: none;
}

/* A leader line from the callout to the target's frame, ending in a dot. */
.gev-guide-callout::before,
.gev-guide-callout::after {
  position: absolute;
  top: var(--gev-guide-arrow-y, 50%);
  content: '';
  transition: top 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gev-guide-callout::before {
  width: 18px;
  height: 1px;
  background: var(--gev-guide-accent);
  box-shadow: 0 0 6px rgba(255, 159, 67, 0.7);
}

.gev-guide-callout::after {
  width: 5px;
  height: 5px;
  margin-top: -2px;
  background: var(--gev-guide-accent);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255, 159, 67, 0.9);
}

.gev-guide-callout[data-side='right']::before {
  right: 100%;
}

.gev-guide-callout[data-side='right']::after {
  right: calc(100% + 15px);
}

.gev-guide-callout[data-side='left']::before {
  left: 100%;
}

.gev-guide-callout[data-side='left']::after {
  left: calc(100% + 15px);
}

.gev-guide-callout[data-side='none']::before,
.gev-guide-callout[data-side='none']::after {
  display: none;
}

/* The edge the line leaves from picks up the accent. */
.gev-guide-callout[data-side='right'] {
  border-left-color: rgba(255, 159, 67, 0.55);
}

.gev-guide-callout[data-side='left'] {
  border-right-color: rgba(255, 159, 67, 0.55);
}

/* Header: what this walk is about, how far along, and a close. */
.gev-guide-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gev-guide-title,
.gev-guide-count {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
}

.gev-guide-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--gev-guide-accent);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gev-guide-count {
  color: rgba(214, 220, 226, 0.55);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06rem;
}

/* Shares close-button.css: no padding, border or background, a pointer. */
.gev-guide-close {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin: -2px -4px 0 0;
  color: rgba(214, 220, 226, 0.55);
  font-size: 0.95rem;
  line-height: 1;
  border-radius: 5px;
}

.gev-guide-close:hover,
.gev-guide-close:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* Progress: one segment per step. */
.gev-guide-progress {
  display: flex;
  gap: 3px;
  margin: 0.45rem 0 0.6rem;
  padding: 0;
  list-style: none;
}

.gev-guide-progress li {
  flex: 1;
  height: 2px;
  background: rgba(214, 220, 226, 0.16);
  border-radius: 2px;
  transition: background 220ms ease;
}

.gev-guide-progress li.done {
  background: rgba(255, 159, 67, 0.55);
}

.gev-guide-progress li.current {
  background: var(--gev-guide-accent);
  box-shadow: 0 0 6px rgba(255, 159, 67, 0.6);
}

.gev-guide-callout.swap .gev-guide-body {
  animation: gev-guide-swap 260ms ease both;
}

.gev-guide-text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
}

/* "Press the highlighted control", with a live dot. */
.gev-guide-hint {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.4rem 0 0;
  color: rgba(214, 220, 226, 0.6);
  font-size: 0.68rem;
}

.gev-guide-hint[hidden] {
  display: none;
}

.gev-guide-hint-dot {
  width: 6px;
  height: 6px;
  flex: none;
  background: var(--gev-guide-accent);
  border-radius: 50%;
  animation: gev-guide-blink 1.4s ease-in-out infinite;
}

/* Footer: the Esc hint on the left, the buttons on the right. */
.gev-guide-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-top: 0.7rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.gev-guide-actions > span {
  display: flex;
  gap: 0.4rem;
}

.gev-guide-keys {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  color: rgba(214, 220, 226, 0.45);
  font-size: 0.62rem;
}

.gev-guide-keys[hidden] {
  display: none;
}

/* With the Esc hint gone, the offer's buttons sit on the right. */
.gev-guide-actions > span:only-of-type {
  margin-left: auto;
}

.gev-guide-keys kbd {
  padding: 0.05rem 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.54rem;
  border: 1px solid rgba(214, 220, 226, 0.22);
  border-radius: 4px;
}

.gev-guide-actions button {
  padding: 0.28rem 0.6rem;
  color: #1a1206;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--gev-guide-accent);
  border: 1px solid var(--gev-guide-accent);
  border-radius: 6px;
  cursor: pointer;
  transition:
    background 140ms ease,
    color 140ms ease,
    border-color 140ms ease;
}

.gev-guide-actions button[hidden] {
  display: none;
}

.gev-guide-actions button:hover,
.gev-guide-actions button:focus-visible {
  background: #ffb36b;
  border-color: #ffb36b;
}

/* Secondary buttons: skip a step that waits, or decline the offer. */
.gev-guide-actions button.quiet,
.gev-guide-actions .gev-guide-skip {
  color: rgba(214, 220, 226, 0.75);
  font-weight: 400;
  background: none;
  border-color: rgba(214, 220, 226, 0.2);
}

.gev-guide-actions button.quiet:hover,
.gev-guide-actions button.quiet:focus-visible,
.gev-guide-actions .gev-guide-skip:hover,
.gev-guide-actions .gev-guide-skip:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 159, 67, 0.6);
}

@keyframes gev-guide-ping {
  0% {
    opacity: 0.9;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.12);
  }
}

@keyframes gev-guide-blink {
  50% {
    opacity: 0.3;
  }
}

@keyframes gev-guide-swap {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gev-guide-ring,
  .gev-guide-callout,
  .gev-guide-callout::before {
    transition: none;
  }

  .gev-guide-ring > i,
  .gev-guide-hint-dot,
  .gev-guide-callout.swap .gev-guide-body {
    animation: none;
  }
}

/* The guide's live status: read by screen readers, not shown. */
.gev-guide-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
/* Sonar is an opt-in visual style over any HUD layout (Display > HUD >
   Sonar). Off by default; cockpit mode and reduced motion keep the map still. */

.hud-sonar {
  display: none;
}

:root[data-cyber-sonar='on'] #intel-hud .hud-sonar {
  position: fixed;
  top: 50%;
  left: 50%;
  display: block;
  width: min(
    var(--cyber-sonar-size-vw, 80vw),
    var(--cyber-sonar-size-vh, 104vh)
  );
  aspect-ratio: 1;
  border: 1px solid rgba(226, 235, 236, 0.2);
  border-radius: 50%;
  opacity: var(--cyber-sonar-visual-intensity, 0.57);
  overflow: hidden;
  pointer-events: none;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 0 1px rgba(196, 84, 84, 0.12),
    inset 0 0 48px rgba(196, 84, 84, 0.035);
}

:root[data-cyber-sonar='on'] #intel-hud .hud-sonar::before,
:root[data-cyber-sonar='on'] #intel-hud .hud-sonar::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  content: '';
}

:root[data-cyber-sonar='on'] #intel-hud .hud-sonar::before {
  opacity: 0.52;
  background: repeating-radial-gradient(
    circle,
    transparent 0 calc(var(--cyber-sonar-ring-step, 12.5%) - 1px),
    rgba(226, 235, 236, 0.17) calc(var(--cyber-sonar-ring-step, 12.5%) - 1px)
      var(--cyber-sonar-ring-step, 12.5%)
  );
}

:root[data-cyber-sonar='on'] #intel-hud .hud-sonar::after {
  background: conic-gradient(
    from 0deg,
    rgba(245, 250, 250, 0.3) 0deg,
    rgba(235, 116, 116, 0.14) 0.55deg,
    rgba(196, 84, 84, 0.075) var(--cyber-sonar-sector-quarter, 6deg),
    rgba(150, 206, 215, 0.035) var(--cyber-sonar-sector-middle, 14.4deg),
    transparent var(--cyber-sonar-sector-width, 24deg) 360deg
  );
  filter: drop-shadow(0 0 4px rgba(226, 235, 236, 0.1));
  mask-image: radial-gradient(
    circle,
    #000 0 84%,
    rgba(0, 0, 0, 0.65) 92%,
    transparent 100%
  );
  transform-origin: 50% 50%;
  will-change: transform;
  animation: cyber-sonar-sweep 5.2s linear infinite;
  animation-delay: var(--cyber-sonar-phase-delay, 0ms);
}

@keyframes cyber-sonar-sweep {
  to {
    transform: rotate(360deg);
  }
}

#cyber-sonar-status:empty {
  display: none;
}

:root[data-cyber-sonar='on'] body.cockpit-mode #intel-hud .hud-sonar,
:root[data-cyber-sonar='on'] #intel-hud:not(.active) .hud-sonar {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  :root[data-cyber-sonar='on'] #intel-hud .hud-sonar::after {
    display: none;
    animation: none;
  }
}
