/* ORBIT — shared design tokens, components, then responsive layouts. */
* {
  box-sizing: border-box;
}
:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
  font-size: 100%;
  --tap: 2.75rem;
  --radius: 1rem;
  --fast: 160ms;
}
body {
  --bg: #0c1521;
  --surface: #142130;
  --map: #101d2d;
  --land: #2c4054;
  --border: #344c62;
  --text: #f1f3f6;
  --muted: #aebdcd;
  --accent: #dfbd85;
  --accent-ink: #171b21;
  --line: #6e859b;
  --glass: rgba(19, 33, 48, 0.88);
  --glass-edge: rgba(255, 255, 255, 0.22);
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
body[data-theme="ivory"] {
  color-scheme: light;
  --bg: #f6f3ed;
  --surface: #fffdf8;
  --map: #eeeae1;
  --land: #d2cbbb;
  --border: #b5b4a7;
  --text: #24302d;
  --muted: #59655e;
  --accent: #386859;
  --accent-ink: #fff;
  --line: #a79f8c;
  --glass: rgba(255, 253, 247, 0.91);
  --glass-edge: rgba(55, 75, 64, 0.22);
}
body[data-theme="atlantic"] {
  --bg: #081f2c;
  --surface: #0e2d3d;
  --map: #0b293b;
  --land: #245169;
  --border: #3e657b;
  --text: #f0f8fc;
  --muted: #afcbd9;
  --accent: #8fd8d3;
  --accent-ink: #08242c;
  --line: #54839a;
  --glass: rgba(12, 40, 53, 0.9);
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
  border: 0;
  background: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background var(--fast),
    opacity var(--fast),
    box-shadow var(--fast);
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:active:not(:disabled),
a.primary:active,
a.secondary:active {
  opacity: 0.68;
  box-shadow: inset 0 0 0 99px #80808018;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
a {
  color: var(--accent);
}
svg {
  display: block;
}
svg[aria-hidden="true"] {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  width: 1.4375rem;
  height: 1.4375rem;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.app-shell {
  max-width: 1040px;
  margin: auto;
  padding: env(safe-area-inset-top) 22px
    calc(108px + env(safe-area-inset-bottom));
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 78px;
  gap: 12px;
}
.brand {
  font-size: 1.1875rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}
.brand-mark {
  font-size: 2.125rem;
  line-height: 1;
  color: var(--accent);
  font-weight: 300;
}
.beta {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 3px 5px;
  border-radius: 5px;
}
.icon-button {
  width: var(--tap);
  height: var(--tap);
  min-width: var(--tap);
  min-height: var(--tap);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  flex-shrink: 0;
  padding: 0;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 24px;
  gap: 12px;
}
.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 8px;
}
h1 {
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  margin: 0;
  line-height: 1.15;
}
h2 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 600;
}
h3 {
  font-size: 1.0625rem;
  margin: 0 0 8px;
}
.round-add {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1.8rem;
  flex-shrink: 0;
}
.small-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  font-weight: 650;
  color: var(--muted);
}
.badge {
  font-size: 0.8125rem;
  line-height: 1.3;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  font-weight: 550;
}
.quiet {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}
.text-button {
  color: var(--accent);
  font-size: 0.875rem;
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 10px 4px;
  font-weight: 550;
}
.primary,
.secondary {
  min-height: 3rem;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}
.primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.button-row > * {
  flex: 1 1 125px;
  min-width: 0;
}
.full-width {
  width: 100%;
  margin-top: 12px;
}
.danger {
  color: #ffaeae;
}
body[data-theme="ivory"] .danger {
  color: #ac3535;
}
/* Map artwork and its own legible overlays. */
.map-card {
  position: relative;
  background: var(--map);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate;
}
.map-card #map {
  width: 100%;
  height: 360px;
  touch-action: none;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.map-card #map.moving {
  cursor: grabbing;
}
.map-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 16px;
  right: 16px;
  pointer-events: none;
}
.map-bottomline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px 12px;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}
.map-bottomline .text-button {
  white-space: nowrap;
  flex-shrink: 0;
}
.map-controls {
  position: absolute;
  z-index: 2;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid var(--glass-edge);
  background: var(--glass);
  box-shadow: 0 6px 22px #0003;
}
.map-controls button {
  min-width: var(--tap);
  width: 48px;
  min-height: var(--tap);
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text);
  padding: 0;
}
.map-controls button + button {
  border-top: 1px solid var(--border);
}
.map-controls #map-world {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}
.flight-depth-note {
  position: absolute;
  right: 16px;
  top: 108px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 8px;
  background: #102638e8;
  color: #e8edf4;
  font-size: 11px;
  pointer-events: auto;
}
.flight-depth-note[hidden] {
  display: none;
}
.display-mode .flight-depth-note {
  top: calc(145px + env(safe-area-inset-top));
}
@media (max-width: 559px) {
  .flight-depth-note {
    top: 112px;
    right: 12px;
    font-size: 10px;
  }
}
@media (orientation: landscape) and (max-height: 600px) {
  .flight-depth-note,
  .display-mode .flight-depth-note {
    top: 103px;
    right: max(20px, env(safe-area-inset-right));
  }
}
.map-style-switch {
  position: absolute;
  left: 12px;
  top: 58px;
  z-index: 2;
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 28px;
  border: 1px solid var(--glass-edge);
  background: var(--glass);
  box-shadow: 0 6px 20px #0003;
}
.map-style-switch button {
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 0 12px;
  font-size: 0.875rem;
  border-radius: 24px;
  white-space: nowrap;
}
.map-style-options {
  display: flex;
  gap: 2px;
}
.map-style-switch .map-style-toggle {
  display: none;
}
@media (orientation: landscape) {
  .map-style-switch .map-style-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 600;
  }
  .map-style-options {
    display: none;
  }
  .map-style-switch.is-open .map-style-options {
    display: flex;
  }
  .map-style-switch.is-open .map-style-toggle {
    display: none;
  }
  .map-style-switch {
    max-width: calc(100% - 24px);
  }
  .map-style-options {
    flex-wrap: wrap;
  }
  .map-style-chevron {
    font-size: 1rem;
    line-height: 1;
    opacity: 0.7;
  }
}
.map-style-switch [aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.map-style-switch,
.map-controls,
.tabbar {
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
}
.map-attribution {
  position: absolute;
  right: 16px;
  bottom: 66px;
  font-size: 0.75rem;
  color: var(--muted);
  pointer-events: none;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--glass);
  text-shadow: 0 1px 3px #001824;
}
.land {
  fill: var(--land);
  stroke: var(--country-edge, var(--map));
  stroke-width: 0.6;
}
.graticule {
  fill: none;
  stroke: var(--border);
  stroke-width: 0.55;
  opacity: 0.55;
}
.route-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  opacity: 0.8;
}
.route-halo {
  fill: none;
  stroke: var(--route-halo, #0a1a27);
  stroke-width: 4.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  opacity: 0.8;
  pointer-events: none;
}
.route-halo.halo-travelled {
  stroke-width: 5.5px;
}
.route-halo.halo-remaining {
  stroke-dasharray: 6 6;
  opacity: 0.55;
}
.route-halo.halo-estimated {
  stroke-dasharray: 10 7;
  opacity: 0.65;
}
.atlas-map-pin {
  pointer-events: none;
}
.atlas-pin-marker {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  pointer-events: auto;
}
.atlas-pin-marker > svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke: none;
  overflow: visible;
}
.atlas-pin-label {
  position: absolute;
  top: calc(50% + var(--atlas-label-offset, 17px));
  left: 50%;
  transform: translateX(-50%);
  color: #ffffff;
  white-space: nowrap;
  font:
    650 14px/1.2 system-ui,
    sans-serif;
  text-shadow:
    0 1px 2px #0a192b,
    1px 0 2px #0a192b,
    -1px 0 2px #0a192b;
}
.atlas-pin-marker.globe-atlas-pin {
  pointer-events: none;
  position: absolute;
  transform: translate(-50%, -50%);
}
.atlas-setting-field {
  border: 0;
  padding: 0;
  margin: 0 0 24px;
  min-inline-size: 0;
}
.atlas-setting-field legend {
  font-size: 1rem;
  font-weight: 650;
  padding: 0;
  margin-bottom: 12px;
}
.atlas-choice-row,
.atlas-shape-choices {
  display: flex;
  gap: 8px;
}
.atlas-choice-row button,
.atlas-shape-choices button {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 10px 8px;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: var(--surface);
}
.atlas-shape-choices button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.atlas-setting-field button[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.atlas-shape-icon {
  display: block;
  width: 40px;
  height: 40px;
}
.atlas-shape-icon svg {
  width: 40px;
  height: 48px;
  stroke: none;
}
.atlas-colour-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.atlas-colour-choices button {
  position: relative;
  min-width: 44px;
  height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
}
.atlas-colour-choices button:not(.atlas-auto-colour)::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--pin-swatch);
  border: 1px solid #24384766;
}
.atlas-auto-colour {
  font-size: 0.875rem;
}
.atlas-custom-colour input[type="color"] {
  flex: none;
  width: 64px;
  min-width: 64px;
  height: 44px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}
.route-line.demo-remaining {
  stroke-dasharray: 5 7;
  opacity: 0.4;
}
.route-line.demo-travelled {
  stroke-width: 3;
  opacity: 1;
}
.route-line,
.land,
.graticule {
  vector-effect: non-scaling-stroke;
}
.route-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 18px;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
}
.airport-dot {
  fill: var(--accent);
  stroke: var(--map);
  stroke-width: 2;
}
.airport-label {
  fill: var(--text);
  font-weight: 650;
  paint-order: stroke;
  stroke: var(--map);
  stroke-width: 5;
  stroke-linejoin: round;
}
.airport-dot,
.airport-label {
  pointer-events: none;
}
.city-label {
  font-size: 12px;
  fill: var(--muted);
  paint-order: stroke;
  stroke: var(--map);
  stroke-width: 4px;
  stroke-linejoin: round;
  pointer-events: none;
}
.plane-icon {
  fill: #fff;
  stroke: #102130;
  stroke-width: 2px;
  stroke-linejoin: round;
  paint-order: stroke;
  filter: drop-shadow(0 2px 2px #0009);
}
.plane-icon.stale {
  opacity: 0.85;
}
body[data-theme="ivory"] .map-card[data-style="classic"] .plane-icon {
  fill: #153e34;
  stroke: #ffffff;
  stroke-width: 2.8px;
  filter: drop-shadow(0 1px 2px #10213070);
}
body[data-theme="ivory"] .map-card[data-style="classic"] .position-pulse-ring {
  fill: #386859;
  stroke: #245043;
}
.position-pulse-ring {
  fill: #ffe0a4;
  fill-opacity: 0.32;
  stroke: #fff0c7;
  stroke-width: 1.5px;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  pointer-events: none;
  transform-origin: 0 0;
}
.position-fresh .position-pulse-ring {
  opacity: 0.4;
}
.position-animating .position-pulse-ring {
  animation: aircraft-location-pulse 2.6s linear infinite;
}
@keyframes aircraft-location-pulse {
  0% {
    transform: scale(1);
    opacity: 0.72;
  }
  50% {
    opacity: 0.36;
  }
  100% {
    transform: scale(2.3636);
    opacity: 0;
  }
}
.natural-texture,
.natural-tile {
  filter: saturate(1.05) contrast(1.04) brightness(0.9);
}
.natural-land {
  fill: none;
  stroke: #dbe5d1;
  stroke-opacity: 0.18;
  stroke-width: 0.45;
  vector-effect: non-scaling-stroke;
}
.natural-lake {
  fill: #477f91;
  stroke: #315c72;
  stroke-width: 0.3;
  vector-effect: non-scaling-stroke;
}
.natural-river {
  fill: none;
  stroke: #b7d8df;
  stroke-width: 0.55;
  opacity: 0.7;
  vector-effect: non-scaling-stroke;
}
.map-card[data-style="apple"],
.map-card[data-style="natural"],
.map-card[data-style="globe"] {
  --accent: #ffe0a0;
  --accent-ink: #152639;
  --text: #fff;
  --muted: #d6e2e5;
  --map: #143044;
  --surface: #142130;
  --border: #78919e;
  --glass: rgba(14, 35, 47, 0.9);
  --glass-edge: #d8edff55;
  background: #233f50;
  color: var(--text);
}
.map-card[data-style="globe"] {
  background: #071522;
  --map: #071522;
}
.map-card[data-style="natural"] .route-line {
  filter: drop-shadow(0 1px 2px #06101c);
}
.map-card[data-style="apple"] .small-label,
.map-card[data-style="natural"] .small-label,
.map-card[data-style="globe"] .small-label {
  text-shadow: 0 1px 5px #000;
}
.map-card[data-style="apple"] .badge,
.map-card[data-style="natural"] .badge,
.map-card[data-style="globe"] .badge {
  background: #102638e8;
  border-color: #78919e;
  color: #ffe0a0;
}
#globe {
  position: absolute;
  inset: 0 0 68px;
  background: #071522;
  touch-action: none;
  overflow: hidden;
}
#globe canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline-offset: -4px;
}
#globe-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.globe-label {
  position: absolute;
  transform: translate(-50%, -100%);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  color: #fff;
  text-shadow: 0 1px 4px #000;
  padding: 4px 7px;
  background: #06101ccc;
  border-radius: 8px;
  white-space: nowrap;
}
.globe-label.aircraft {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  transform: translate(-50%, -50%);
}
.globe-label.stale {
  color: #cad3da;
}
body[data-text-size="large"] .globe-label {
  font-size: 1.125rem;
}
body[data-text-size="large"] .globe-label.aircraft {
  font-size: 1.625rem;
}
#map-loading {
  position: absolute;
  z-index: 4;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 10px 16px;
  background: #142130;
  color: #fff;
  border: 1px solid #78919e;
  border-radius: 16px;
  font-size: 0.875rem;
  max-width: 85%;
  text-align: center;
  pointer-events: none;
}
#map-recovery {
  position: absolute;
  z-index: 4;
  top: 120px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  background: #142130;
  color: #fff;
  border: 1px solid #78919e;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.875rem;
}
#map-recovery .text-button {
  color: #ffe0a0;
}
.landscape-add,
#panel-toggle,
.panel-heading {
  display: none;
}
/* Atlas and flight panels. */
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 25px;
  gap: 8px;
}
.stats > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stats > div + div {
  border-left: 1px solid var(--border);
  padding-left: 16px;
}
.stats strong {
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.stats span {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.35;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 22px 0 14px;
}
.year-picker select {
  font-size: 0.875rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 10px;
  color: var(--text);
  min-height: var(--tap);
  max-width: 140px;
}
.journey-list {
  display: grid;
  gap: 10px;
}
.journey-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 15px 14px;
  border-radius: 14px;
  width: 100%;
  text-align: left;
  color: var(--text);
}
.journey-row:hover {
  border-color: var(--accent);
}
.journey-symbol {
  height: 42px;
  width: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--accent);
  flex-shrink: 0;
}
.journey-info {
  flex: 1;
  min-width: 0;
}
.journey-info strong {
  font-weight: 550;
  font-size: 1rem;
  display: block;
  margin-bottom: 5px;
}
.journey-info small {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
  display: block;
}
.sample-note {
  padding: 12px 16px;
  margin-bottom: 15px;
  border-left: 2px solid var(--accent);
  background: var(--surface);
  border-radius: 0 10px 10px 0;
}
.sample-note p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
}
.local-note {
  text-align: center;
  font-size: 0.875rem;
  margin: 20px 10px;
}
.empty-state {
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 25px 15px;
  grid-column: 1/-1;
}
.empty-state h3 {
  margin: 0 0 8px;
}
.composition-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}
.composition-bar > .small-label {
  flex-basis: 100%;
}
.composition-bar select,
.setting-row select {
  max-width: 100%;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 10px;
  font-size: 1rem;
  min-height: var(--tap);
}
.composition-bar select {
  flex: 1 1 150px;
}
.view-note {
  font-size: 0.875rem;
  margin: 7px 0 0;
}
.flight-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  margin-top: 18px;
}
.flight-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.flight-heading .quiet {
  font-size: 0.875rem;
}
.flight-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0;
  gap: 8px;
}
.flight-route > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.flight-route strong {
  font-size: 2.375rem;
  letter-spacing: -0.04em;
  font-weight: 500;
}
.flight-route span {
  color: var(--muted);
  font-size: 1rem;
}
.destination {
  text-align: right;
}
.flight-route .route-arrow {
  font-size: 1.5rem;
  color: var(--accent);
}
.progress-track {
  height: 4px;
  border-radius: 4px;
  background: var(--border);
  overflow: hidden;
}
.progress-track > span {
  height: 100%;
  display: block;
  background: var(--accent);
  width: 62%;
  border-radius: 4px;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--muted);
  margin: 10px 0 25px;
}
.range-label {
  font-size: 0.9375rem;
  color: var(--muted);
  display: block;
}
input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  height: var(--tap);
}
.segmented {
  display: flex;
  background: var(--surface);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--border);
  margin: 20px 0 0;
  gap: 4px;
}
.segmented button {
  flex: 1;
  padding: 10px 8px;
  min-height: var(--tap);
  border-radius: 10px;
  font-size: 0.9375rem;
  color: var(--muted);
}
.segmented [aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
#follow-title {
  margin-top: 20px;
  font-size: 1.5rem;
  line-height: 1.3;
  letter-spacing: -0.025em;
}
.flight-times {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 22px 0;
}
.flight-times dt {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.flight-times dd {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}
.flight-candidate {
  display: block;
  text-align: left;
  width: 100%;
  margin-top: 10px;
  padding: 16px;
  line-height: 1.6;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.explanatory {
  padding: 0 4px;
}
/* Customize. */
.theme-field,
.map-style-field {
  border: 0;
  padding: 0;
  margin: 20px 0 26px;
}
.theme-field legend,
.map-style-field legend {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 14px;
}
.theme-grid,
.map-style-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.theme-option {
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--border);
  font-size: 0.9375rem;
  min-height: 105px;
  background: var(--surface);
}
.theme-option[aria-pressed="true"],
.map-style-choices [aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.swatch {
  height: 51px;
  display: block;
  border-radius: 8px;
  margin-bottom: 9px;
  border: 1px solid #ffffff20;
}
.swatch.midnight {
  background: linear-gradient(130deg, #101d2d 50%, #2c4054 50%);
}
.swatch.ivory {
  background: linear-gradient(130deg, #eeeae1 50%, #d2cbbb 50%);
}
.swatch.atlantic {
  background: linear-gradient(130deg, #0b293b 50%, #245169 50%);
}
.classic-collection {
  min-inline-size: 0;
  border: 0;
  padding: 0;
  margin: 22px 0 28px;
  scroll-margin-top: 80px;
}
.classic-collection legend {
  font-size: 1.125rem;
  font-weight: 650;
  padding: 0;
}
.classic-collection > .quiet {
  margin: 8px 0 16px;
}
.classic-collection-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.classic-collection-filters button {
  width: auto;
  min-height: 44px;
  padding: 9px 15px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}
.classic-collection-filters button[aria-pressed="true"] {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}
#classic-style-status {
  font-size: 0.875rem;
}
.classic-style-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.classic-style-grid button {
  position: relative;
  min-width: 0;
  padding: 0 0 14px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}
.classic-style-grid button[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}
.classic-style-grid .classic-style-preview {
  display: block;
  stroke: none;
  width: 100%;
  height: auto;
  aspect-ratio: 280 / 156;
  border-radius: 15px 15px 0 0;
  border-bottom: 1px solid var(--border);
}
.classic-style-grid strong,
.classic-style-description {
  display: block;
  padding: 0 14px;
}
.classic-style-grid strong {
  font-size: 1rem;
  margin-top: 12px;
}
.classic-style-description {
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--muted);
  margin-top: 4px;
}
.classic-style-check {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  border: 2px solid var(--surface);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  text-align: center;
  font-weight: 750;
  line-height: 24px;
}
[aria-pressed="true"] > .classic-style-check {
  display: block;
}
#map[data-classic-style] {
  background: var(--map);
}
[data-classic-kind="minimal"] .graticule,
[data-classic-kind="line"] .graticule,
[data-classic-kind="wood"] .graticule,
[data-classic-kind="relief"] .graticule {
  display: none;
}
[data-classic-kind="gold"] .graticule {
  opacity: 0.22;
}
[data-classic-kind="paper"] .graticule {
  stroke-dasharray: 2 3;
  opacity: 0.35;
}
#map[data-classic-kind="paper"] .city-label,
#map[data-classic-kind="atlas"] .city-label {
  font-family: Georgia, "Times New Roman", serif;
}
[data-classic-kind="blueprint"] .graticule {
  opacity: 0.5;
  stroke-dasharray: 2 3;
}
[data-classic-kind="blueprint"] .land {
  stroke-width: 0.75px;
}
#map[data-classic-kind="blueprint"] .city-label {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.classic-raised {
  filter: drop-shadow(0 2px 2px #382b2066);
}
#map[data-classic-style]:not([data-classic-style="signature"]) .plane-icon {
  fill: var(--plane-fill);
  stroke: var(--plane-edge);
  stroke-width: 2.4px;
  filter: drop-shadow(0 1px 2px #0007);
}
#map[data-classic-style]:not([data-classic-style="signature"])
  .position-pulse-ring {
  fill: var(--accent);
  stroke: var(--accent);
}
#map[data-classic-style]:not([data-classic-style="signature"]) .route-line {
  filter: none;
  opacity: 1;
  stroke-width: 2.5px;
}
#map[data-classic-style]:not([data-classic-style="signature"])
  .route-line.demo-travelled {
  stroke-width: 3px;
}
#map[data-classic-style]:not([data-classic-style="signature"])
  .route-line.demo-remaining {
  opacity: 0.72;
}
.classic-grain,
.classic-paper {
  pointer-events: none;
}
@media (min-width: 900px) {
  #settings-panel .classic-style-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 500px) {
  .classic-collection-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .classic-collection-filters button {
    padding-inline: 8px;
  }
}
@media (max-width: 359px) {
  .classic-style-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.map-style-choices button {
  padding: 16px 12px;
  min-height: 110px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
}
.map-style-choices strong,
.map-style-choices span {
  display: block;
}
.map-style-choices strong {
  font-size: 1rem;
  margin-bottom: 8px;
}
.map-style-choices span {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
}
.account-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  margin: 18px 0 28px;
}
.account-card p {
  margin: 8px 0 14px;
}
.account-card #cloud-status {
  font-size: 0.875rem;
  color: var(--accent);
}
.settings-card {
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.setting-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 14px;
  font-size: 1rem;
  margin: 0;
  min-width: 0;
}
.setting-row + .setting-row {
  border-top: 1px solid var(--border);
}
.setting-row input[type="text"],
#owner-name {
  width: 45%;
  background: transparent;
  border: 0;
  text-align: right;
  color: var(--text);
  min-height: var(--tap);
  font-size: 1rem;
  padding: 0;
}
.setting-row input[type="checkbox"] {
  width: 26px;
  height: 26px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.action-row {
  width: 100%;
  text-align: left;
}
.night-times {
  flex-wrap: wrap;
}
.night-times label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
}
.night-times input {
  min-width: 0;
  width: 112px;
  min-height: var(--tap);
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px;
  font-size: 1rem;
}
.device-help {
  padding: 0 16px;
}
.device-actions {
  margin: 14px;
}
.settings-card > #copy-display-link {
  margin: 0 16px 14px;
}
.device-list {
  padding: 0 16px;
  font-size: 0.875rem;
  color: var(--muted);
}
.device-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding: 8px 0;
}
.device-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.device-row > button {
  flex-shrink: 0;
}
.install-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-top: 22px;
}
.install-card p {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
/* Navigation: stable positions and visible labels in portrait. */
.tabbar {
  position: fixed;
  z-index: 5;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  gap: 3px;
  padding: 5px;
  width: max-content;
  max-width: calc(100vw - 24px);
  border: 1px solid var(--glass-edge);
  border-radius: 32px;
  background: var(--glass);
  box-shadow:
    0 10px 30px #0003,
    inset 0 1px 0 #ffffff18;
}
.tabbar button {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 48px;
  min-width: 48px;
  padding: 0 12px;
  border-radius: 25px;
  font-size: 0.875rem;
  font-weight: 550;
  color: var(--muted);
}
.tabbar button svg {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
}
.tabbar button[aria-current="page"] {
  background: color-mix(in srgb, var(--accent) 17%, transparent);
  color: var(--accent);
}
/* Forms, dialogs and feedback. */
dialog {
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px;
  width: calc(100% - 24px);
  max-width: 500px;
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #0009;
  backdrop-filter: blur(5px);
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 15px;
}
.dialog-heading h2 {
  font-size: 1.5rem;
}
.dialog-heading .icon-button {
  border: 0;
}
dialog label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9375rem;
  margin: 18px 0;
}
dialog
  input:where(
    :not([type="file"], [type="checkbox"], [type="radio"], [type="range"])
  ),
dialog select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  min-height: 49px;
  padding: 10px;
  font-size: 1rem;
}
dialog form > .primary,
dialog > .primary {
  width: 100%;
}
.form-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 12px;
}
.form-pair > label {
  min-width: 0;
}
dialog input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
}
dialog input::-webkit-date-and-time-value {
  text-align: left;
}
.form-error {
  font-size: 0.9375rem;
  color: #ffaeae;
  line-height: 1.5;
  min-height: 20px;
}
body[data-theme="ivory"] .form-error {
  color: #a12e2e;
}
dialog p {
  line-height: 1.6;
}
dialog code {
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}
input[type="file"] {
  max-width: 100%;
  font-size: 0.875rem;
  line-height: 1.6;
}
dialog .checkbox-label {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
}
dialog .checkbox-label input {
  width: 24px;
  min-height: 24px;
  height: 24px;
  accent-color: var(--accent);
  min-height: 24px;
  padding: 0;
}
.time-field {
  border: 1px solid var(--border);
  border-radius: 14px;
  margin: 18px 0;
  padding: 0 14px;
}
.time-field legend {
  padding: 0 6px;
  font-weight: 600;
}
.airport-picker {
  position: relative;
  display: block;
}
.airport-picker input[type="text"] {
  width: 100%;
}
.airport-results {
  position: relative;
  display: block;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 7px;
  background: var(--surface);
  max-height: 240px;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
.airport-results > [role="option"] {
  display: block;
  padding: 12px;
  cursor: pointer;
  min-height: 58px;
  border-bottom: 1px solid var(--border);
  touch-action: pan-y;
}
.airport-results > [role="option"]:last-child {
  border-bottom: 0;
}
.airport-results > [role="option"][aria-selected="true"],
.airport-results > [role="option"]:hover {
  background: color-mix(in srgb, var(--accent) 15%, var(--surface));
}
.airport-results strong,
.airport-results small {
  display: block;
  line-height: 1.5;
}
.airport-results strong {
  font-size: 1rem;
  font-weight: 600;
}
.airport-results small {
  color: var(--muted);
  font-size: 0.875rem;
}
.no-results {
  display: block;
  padding: 12px;
  font-size: 0.875rem;
  color: var(--muted);
}
.toast {
  position: fixed;
  z-index: 20;
  bottom: calc(90px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 8px 30px #0004;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.storage-warning {
  position: relative;
  z-index: 6;
  padding: 15px;
  background: #70341c;
  color: white;
  font-size: 0.9375rem;
  line-height: 1.5;
  margin-bottom: 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.storage-warning span {
  flex: 1 1 200px;
}
/* A quiet frame uses contrast independent of the chosen interface palette. */
.display-mode {
  overflow: hidden;
}
.display-mode .topbar,
.display-mode .heading,
.display-mode #world-panel,
.display-mode #settings-panel,
.display-mode .tabbar {
  display: none !important;
}
.display-mode .app-shell {
  max-width: none;
  padding: 0;
}
.display-mode .map-card {
  position: fixed;
  inset: 0;
  border: 0;
  border-radius: 0;
}
.display-mode .map-card #map {
  height: 100dvh;
  width: 100%;
}
.display-mode #globe {
  inset: 0;
}
.display-mode .map-topline {
  top: calc(84px + env(safe-area-inset-top));
  left: 25px;
  right: 25px;
}
.display-mode .map-bottomline {
  position: absolute;
  bottom: calc(108px + env(safe-area-inset-bottom));
  left: 16px;
  right: 16px;
  z-index: 2;
}
.display-mode .map-bottomline #map-caption {
  background: #102638e8;
  color: #e8f0f5;
  border-radius: 10px;
  padding: 8px 12px;
  max-width: 65%;
}
.display-mode .map-bottomline .text-button {
  background: #102638e8;
  color: #ffe0a0;
  border-radius: 22px;
  padding: 8px 14px;
}
.display-mode .map-style-switch {
  top: auto;
  bottom: calc(175px + env(safe-area-inset-bottom));
}
.display-mode .map-attribution {
  bottom: calc(168px + env(safe-area-inset-bottom));
}
.display-mode .map-controls {
  right: 25px;
}
.display-ui {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  padding: calc(18px + env(safe-area-inset-top))
    max(25px, env(safe-area-inset-right))
    calc(20px + env(safe-area-inset-bottom))
    max(25px, env(safe-area-inset-left));
  --text: #fff;
  --muted: #d6e2e5;
  --accent: #ffe0a0;
  --surface: #142130;
  --border: #78919e;
  color: var(--text);
  text-shadow: 0 1px 5px #0009;
}
.display-header,
.display-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.display-header .brand {
  color: #fff;
  background: #071522b8;
  padding: 8px 12px;
  border-radius: 12px;
}
.display-header button {
  pointer-events: auto;
  font-size: 0.9375rem;
  min-height: var(--tap);
  padding: 10px 13px;
}
.display-footer {
  position: absolute;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: max(18px, env(safe-area-inset-left));
  right: max(18px, env(safe-area-inset-right));
  padding: 12px 16px;
  border-radius: 16px;
  background: #071522d9;
}
.display-footer > div {
  min-width: 0;
}
.display-footer p {
  font-size: clamp(1.125rem, 2.1vw, 2rem);
  font-weight: 500;
  margin: 0 0 4px;
}
.display-footer span {
  font-size: clamp(0.875rem, 1.3vw, 1.25rem);
  color: var(--muted);
  display: block;
  line-height: 1.5;
}
.display-footer time {
  font-size: clamp(1.75rem, 3.2vw, 3.5rem);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  white-space: nowrap;
}
.display-ui #wake-message {
  font-size: 0.8125rem;
  color: #fff;
  position: absolute;
  bottom: 0;
  left: 25px;
  right: 25px;
  text-align: center;
  line-height: 1.4;
  background: #071522db;
  border-radius: 8px;
  margin: 0;
}
.display-mode .map-controls,
.display-header,
.display-mode .map-bottomline,
.display-mode .map-style-switch,
.display-ui #wake-message {
  transition:
    opacity 0.25s,
    visibility 0.25s;
}
.display-mode.controls-hidden .map-controls,
.display-mode.controls-hidden .display-header,
.display-mode.controls-hidden .map-bottomline,
.display-mode.controls-hidden #wake-message,
.display-mode.controls-hidden .map-style-switch {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.display-mode.controls-hidden .route-hit,
.paired-frame .route-hit {
  pointer-events: none;
}
.display-mode.night-mode.controls-idle .map-card,
.display-mode.night-mode.controls-idle .display-footer {
  filter: brightness(0.3);
}
body[data-text-size="large"] .display-footer p {
  font-size: clamp(1.375rem, 2.6vw, 2.5rem);
}
body[data-text-size="large"] .display-footer span {
  font-size: clamp(1rem, 1.6vw, 1.5rem);
}
body[data-text-size="large"] .display-footer time {
  font-size: clamp(2rem, 4vw, 4rem);
}
body[data-text-size="large"].display-mode .badge {
  font-size: 1rem;
}
.frame-error {
  position: fixed;
  inset: 0;
  z-index: 8;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 32px;
}
.frame-error h1 {
  font-size: 2rem;
}
.frame-error p {
  max-width: 480px;
}
.frame-error a {
  margin-top: 20px;
}
/* Larger editing surfaces. */
@media (min-width: 700px) {
  .app-shell {
    padding-left: 40px;
    padding-right: 40px;
  }
  .map-card #map {
    height: 460px;
  }
  .stats {
    padding: 26px 16px;
  }
  .stats strong {
    font-size: 2.125rem;
  }
  .journey-list {
    grid-template-columns: 1fr 1fr;
  }
  .flight-card,
  .explanatory,
  .segmented {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
  }
  .theme-grid {
    max-width: 500px;
  }
  .account-card {
    display: flex;
    align-items: center;
    gap: 20px;
  }
  .account-card > div {
    flex: 1;
  }
  .composition-bar > .small-label {
    flex-basis: auto;
  }
  .composition-bar select {
    flex: 0 1 230px;
  }
  .composition-bar .text-button {
    margin-left: auto;
  }
}
@media (max-width: 380px) {
  .app-shell {
    padding-left: 14px;
    padding-right: 14px;
  }
  .beta {
    display: none;
  }
  .tabbar button {
    padding: 0 9px;
    gap: 5px;
  }
  .tabbar button svg {
    width: 19px;
  }
  .stats > div + div {
    padding-left: 10px;
  }
  .stats strong {
    font-size: 1.5rem;
  }
  .form-pair,
  .flight-times {
    grid-template-columns: 1fr;
  }
  .map-style-choices {
    grid-template-columns: 1fr;
  }
  .map-style-choices button {
    min-height: var(--tap);
  }
  .map-style-switch {
    left: 8px;
  }
  .map-style-switch button {
    padding: 0 9px;
  }
  .map-attribution {
    bottom: 132px;
  }
  .display-footer {
    gap: 10px;
    padding: 10px;
  }
  .display-footer time {
    font-size: 1.5rem;
  }
}
/* Landscape keeps the map in place; details are an explicitly opened sheet. */
@media (min-width: 560px) and (orientation: landscape) and (max-height: 600px) {
  body:not(.display-mode) .app-shell {
    max-width: none;
    padding: 0;
  }
  body:not(.display-mode)[data-view="settings"] .app-shell {
    padding: 0 max(22px, env(safe-area-inset-left)) 90px;
  }
  body:not(.display-mode):not([data-view="settings"]) .topbar {
    position: absolute;
    top: 12px;
    left: max(20px, env(safe-area-inset-left));
    right: max(20px, env(safe-area-inset-right));
    height: 44px;
    min-height: 44px;
    z-index: 3;
    pointer-events: none;
  }
  body:not(.display-mode):not([data-view="settings"]) .topbar > * {
    pointer-events: auto;
  }
  body:not(.display-mode):not([data-view="settings"]) .topbar .brand {
    font-size: 1rem;
    background: var(--glass);
    padding: 6px 12px;
    border-radius: 22px;
  }
  body:not(.display-mode):not([data-view="settings"]) .topbar .brand-mark {
    font-size: 1.625rem;
  }
  body:not(.display-mode):not([data-view="settings"]) .topbar .beta {
    display: none;
  }
  body:not(.display-mode):not([data-view="settings"]) .topbar .icon-button {
    background: var(--glass);
    border-color: var(--glass-edge);
  }
  body:not(.display-mode):not([data-view="settings"]) .heading {
    display: none;
  }
  .map-card {
    height: 100dvh;
    min-height: 270px;
    border: 0;
    border-radius: 0;
  }
  .map-card #map {
    height: 100%;
    width: 100%;
  }
  #globe {
    inset: 0;
  }
  .map-topline {
    top: 22px;
    left: 200px;
    right: 140px;
    justify-content: flex-end;
  }
  .map-topline .small-label {
    display: none;
  }
  .map-style-switch {
    top: 70px;
    bottom: auto;
    left: max(20px, env(safe-area-inset-left));
  }
  .map-style-switch button {
    min-height: var(--tap);
    padding: 0 12px;
    font-size: 0.875rem;
  }
  .map-attribution {
    bottom: 78px;
    left: max(20px, env(safe-area-inset-left));
    right: auto;
  }
  .map-controls {
    top: auto;
    bottom: calc(12px + env(safe-area-inset-bottom));
    right: max(20px, env(safe-area-inset-right));
    transform: none;
    flex-direction: row;
    border-radius: 26px;
  }
  .map-controls button {
    width: 46px;
    height: 46px;
  }
  .map-controls button + button {
    border-top: 0;
    border-left: 1px solid var(--border);
  }
  .map-controls #map-world {
    width: 58px;
  }
  .map-bottomline {
    position: absolute;
    left: auto;
    right: max(20px, env(safe-area-inset-right));
    bottom: 74px;
    padding: 0;
  }
  .map-bottomline #map-caption {
    display: none;
  }
  .map-bottomline .text-button {
    padding: 8px 14px;
    background: var(--glass);
    border: 1px solid var(--glass-edge);
    border-radius: 24px;
    min-height: var(--tap);
  }
  .tabbar button:not([aria-current="page"]) span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .tabbar button {
    width: 60px;
    padding: 0;
    min-height: 46px;
  }
  .tabbar button[aria-current="page"] {
    width: 116px;
    padding: 0 12px;
  }
  .tabbar {
    bottom: calc(10px + env(safe-area-inset-bottom));
  }
  .landscape-add {
    display: grid;
    place-items: center;
    position: absolute;
    z-index: 3;
    top: 12px;
    right: max(74px, calc(env(safe-area-inset-right) + 52px));
    height: 44px;
    width: 44px;
    border-radius: 50%;
    font-size: 1.625rem;
    background: var(--glass);
    border: 1px solid var(--glass-edge);
    color: var(--text);
  }
  body:not([data-view="world"]) .landscape-add {
    display: none;
  }
  #panel-toggle {
    display: block;
    position: absolute;
    z-index: 3;
    left: max(20px, env(safe-area-inset-left));
    bottom: calc(12px + env(safe-area-inset-bottom));
    min-height: 46px;
    padding: 8px 16px;
    border: 1px solid var(--glass-edge);
    border-radius: 25px;
    background: var(--glass);
    font-size: 0.9375rem;
    color: var(--text);
  }
  #world-panel,
  #flight-panel {
    position: fixed;
    z-index: 4;
    right: max(20px, env(safe-area-inset-right));
    bottom: calc(80px + env(safe-area-inset-bottom));
    width: min(380px, calc(100vw - 40px));
    max-height: calc(100dvh - 148px - env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 18px 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg);
    box-shadow: 0 10px 35px #0005;
    scroll-padding: 70px;
  }
  body:not([data-panel-open="true"]) #world-panel,
  body:not([data-panel-open="true"]) #flight-panel {
    display: none;
  }
  .panel-heading {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--bg);
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }
  .panel-heading h2 {
    font-size: 1.125rem;
  }
  .panel-heading .icon-button {
    border: 0;
  }
  .journey-list {
    grid-template-columns: 1fr;
  }
  .flight-card {
    padding: 16px;
  }
  .stats strong {
    font-size: 1.5rem;
  }
  .stats {
    padding: 20px 0;
  }
  .composition-bar > .small-label {
    flex-basis: 100%;
  }
  .composition-bar select {
    flex: 1 1 150px;
  }
  .flight-times {
    grid-template-columns: 1fr;
  }
  body[data-map-style="apple"]:not([data-view="settings"]) .topbar,
  body[data-map-style="natural"]:not([data-view="settings"]) .topbar,
  body[data-map-style="globe"]:not([data-view="settings"]) .topbar {
    --text: #fff;
    --accent: #ffe0a0;
    --glass: rgba(14, 35, 47, 0.9);
    --glass-edge: #d8edff55;
  }
  .display-mode .landscape-add,
  .display-mode #panel-toggle {
    display: none;
  }
  .display-mode .map-topline {
    top: 80px;
    left: 25px;
    right: 25px;
  }
  .display-mode .map-style-switch {
    top: auto;
    bottom: 100px;
  }
  .display-mode .map-controls {
    bottom: 100px;
  }
  .display-mode .map-bottomline {
    left: auto;
    right: max(25px, env(safe-area-inset-right));
    bottom: 156px;
  }
  .display-mode .map-attribution {
    bottom: 154px;
  }
  .display-mode .display-footer {
    bottom: 12px;
  }
  .display-ui #wake-message {
    display: none;
  }
}
@media (min-width: 560px) and (max-width: 740px) and (orientation: landscape) and (max-height: 600px) {
  .tabbar {
    left: max(18px, env(safe-area-inset-left));
    transform: none;
  }
  #panel-toggle {
    bottom: 78px;
  }
  .map-attribution {
    display: none;
  }
  .map-style-switch {
    top: 66px;
  }
  .map-topline {
    top: 70px;
    left: auto;
    right: max(20px, env(safe-area-inset-right));
  }
}
@media (prefers-reduced-transparency: reduce) {
  .tabbar,
  .map-style-switch,
  .map-controls,
  .map-bottomline .text-button,
  #panel-toggle,
  .landscape-add,
  .topbar .brand,
  .topbar .icon-button {
    background: var(--surface) !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .display-footer {
    background: #071522;
  }
  dialog::backdrop {
    backdrop-filter: none;
  }
}
@supports not (
  (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))
) {
  .tabbar,
  .map-style-switch,
  .map-controls {
    background: var(--surface);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}

/* Satellite maps share the existing glass controls; provider credit stays visible. */
#satellite {
  position: absolute;
  inset: 0 0 68px;
  overflow: hidden;
  background: #071522;
  touch-action: none;
  font-family: inherit;
}
#satellite .mapboxgl-canvas {
  outline-offset: -4px;
}
#satellite .mapboxgl-ctrl-attrib {
  font:
    11px/1.5 system-ui,
    sans-serif;
}
#satellite .mapboxgl-ctrl-attrib a {
  color: #172332;
}
#satellite .mapboxgl-ctrl-attrib-button {
  min-width: 44px;
  min-height: 44px;
  top: -10px;
  right: 0;
  border-radius: 50%;
}
#satellite .mapboxgl-ctrl-attrib.mapboxgl-compact {
  min-height: 24px;
  padding-right: 44px;
}
#explore-dialog .toggle-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
}
#explore-dialog .toggle-row input {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  accent-color: var(--accent);
  min-height: 24px;
  padding: 0;
}
#explore-dialog .button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.display-mode #satellite {
  inset: 0;
}
.display-mode #satellite .mapboxgl-ctrl-bottom-left,
.display-mode #satellite .mapboxgl-ctrl-bottom-right {
  bottom: calc(120px + env(safe-area-inset-bottom));
}
@media (min-width: 560px) and (orientation: landscape) and (max-height: 600px) {
  #satellite {
    inset: 0;
  }
  #satellite .mapboxgl-ctrl-bottom-left,
  #satellite .mapboxgl-ctrl-bottom-right,
  .display-mode #satellite .mapboxgl-ctrl-bottom-left,
  .display-mode #satellite .mapboxgl-ctrl-bottom-right {
    bottom: calc(132px + env(safe-area-inset-bottom));
  }
  #satellite .mapboxgl-ctrl-bottom-left {
    left: env(safe-area-inset-left);
  }
  #satellite .mapboxgl-ctrl-bottom-right {
    right: env(safe-area-inset-right);
  }
}

/* Explore belongs to the map control group in every orientation. */
.map-controls #satellite-explore {
  min-width: 68px;
  padding: 0 10px;
  font-size: 0.8125rem;
  font-weight: 600;
}
.map-style-choices {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.map-style-switch button {
  padding-inline: 12px;
}
#apple-map {
  position: absolute;
  inset: 0 0 56px;
  overflow: hidden;
}
.volume-aircraft-pulse,
.apple-aircraft {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: transparent;
}
.apple-aircraft svg,
.globe-label.aircraft svg {
  position: relative;
  display: block;
  width: 43px;
  height: 43px;
  fill: currentColor;
  stroke: #102130;
  stroke-width: 1.2px;
  stroke-linejoin: round;
  paint-order: stroke;
  filter: drop-shadow(0 1px 1px #0008);
}
.globe-label.aircraft.stale {
  opacity: 0.5;
}
.apple-aircraft.stale svg {
  opacity: 0.5;
}
.volume-aircraft-pulse::before,
.apple-aircraft::before,
.globe-label.aircraft::before {
  content: "";
  position: absolute;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  left: 0;
  top: 0;
  border-radius: 50%;
  background: #ffe0a452;
  border: 1.5px solid #fff0c7;
  box-shadow: 0 0 12px #ffe0a466;
  opacity: 0;
  pointer-events: none;
}
.volume-aircraft-pulse.position-fresh::before,
.apple-aircraft.position-fresh::before,
.globe-label.aircraft.position-fresh::before {
  opacity: 0.4;
}
.volume-aircraft-pulse.position-animating::before,
.apple-aircraft.position-animating::before,
.globe-label.aircraft.position-animating::before {
  animation: aircraft-location-pulse 2.6s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .volume-aircraft-pulse.position-animating::before,
  .position-animating .position-pulse-ring,
  .apple-aircraft.position-animating::before,
  .globe-label.aircraft.position-animating::before {
    animation: none;
    opacity: 0.4;
  }
}
.volume-aircraft-pulse {
  pointer-events: none;
}
.volume-aircraft-pulse[hidden] {
  display: none;
}
.display-mode #apple-map {
  bottom: calc(112px + env(safe-area-inset-bottom));
}
@media (max-width: 430px) {
  .map-style-switch {
    gap: 0;
    left: 8px;
    right: auto;
    max-width: calc(100% - 16px);
  }
  .map-style-switch button {
    padding-inline: 10px;
    font-size: 0.8125rem;
  }
}
@media (min-width: 560px) and (orientation: landscape) and (max-height: 600px) {
  #apple-map {
    inset: 0 0 84px;
  }
  .display-mode #apple-map {
    bottom: calc(96px + env(safe-area-inset-bottom));
  }
  .map-controls #satellite-explore {
    min-width: 70px;
  }
}

.apple-airport {
  min-width: 44px;
  height: 44px;
  padding: 18px 4px 0;
  position: relative;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-shadow:
    0 1px 3px #000,
    1px 0 3px #000;
}
body[data-text-size="large"] .apple-airport {
  font-size: 18px;
}
.apple-airport::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid #102130;
  background: #ffe0a4;
  border-radius: 50%;
  top: 0;
  left: calc(50% - 5px);
}
@media (orientation: portrait), (max-width: 559px) {
  .map-controls {
    top: auto;
    bottom: 74px;
    transform: none;
    flex-direction: row;
    border-radius: 26px;
  }
  .map-controls button {
    width: 44px;
    height: 44px;
  }
  .map-controls button + button {
    border-top: 0;
    border-left: 1px solid var(--border);
  }
  .map-controls #map-world {
    width: 56px;
  }
  .display-mode .map-controls {
    bottom: calc(238px + env(safe-area-inset-bottom));
  }
}
@media (min-width: 560px) and (max-width: 740px) and (orientation: landscape) and (max-height: 600px) {
  .display-mode .map-style-switch {
    top: 70px;
    bottom: auto;
  }
}

/* Follow uses shape and colour to distinguish a fixed reference from observed movement. */
.map-card {
  --track-color: #ffe0a4;
  --guide-color: var(--muted);
}
body[data-theme="ivory"] .map-card {
  --track-color: #88652e;
  --guide-color: #59666b;
}
body .map-card[data-style="natural"],
body .map-card[data-style="globe"],
body .map-card[data-style="apple"] {
  --track-color: #ffe0a4;
  --guide-color: #e8edf4;
}
.route-line.demo-travelled {
  stroke: var(--track-color);
  stroke-width: 3.5px;
  filter: drop-shadow(0 1px 1px #10213088);
  stroke-dasharray: none;
  opacity: 1;
}
.route-line.demo-remaining {
  stroke: var(--guide-color);
  stroke-width: 2px;
  stroke-dasharray: 6 6;
  stroke-linecap: round;
  opacity: 0.8;
}

/* Estimated gaps are distinct from measured track and the pale route guide. */
.route-line.estimated-track {
  stroke: var(--track-color);
  stroke-width: 2.5px;
  stroke-dasharray: 10 7;
  stroke-linecap: round;
  opacity: 0.75;
}

/* Map workspace: one layout contract for the map, docks and sheets. */
body {
  --dock-bottom: calc(
    var(--nav-height, 60px) + 26px + env(safe-area-inset-bottom)
  );
  --utility-bottom: calc(
    var(--flight-dock-height, 140px) + var(--nav-height, 60px) + 36px +
      env(safe-area-inset-bottom)
  );
  --flight-glass: linear-gradient(
    120deg,
    rgba(10, 28, 37, 0.82),
    rgba(10, 28, 37, 0.74)
  );
}
body:not([data-view="settings"]) .app-shell {
  max-width: none;
  padding: 0;
}
body:not([data-view="settings"]) .heading {
  display: none;
}
body:not([data-view="settings"]) .topbar {
  position: absolute;
  z-index: 3;
  top: max(12px, env(safe-area-inset-top));
  left: max(18px, env(safe-area-inset-left));
  right: max(18px, env(safe-area-inset-right));
  height: 44px;
  min-height: 44px;
  pointer-events: none;
}
body:not([data-view="settings"]) .topbar > * {
  pointer-events: auto;
}
body:not([data-view="settings"]) .brand {
  font-size: 1rem;
  padding: 6px 12px;
  border-radius: 25px;
  background: var(--glass);
}
.brand .brand-mark {
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
  stroke-width: 1.15;
  color: var(--accent);
}
body:not([data-view="settings"]) .beta {
  display: none;
}
body:not([data-view="settings"]) .topbar .icon-button {
  background: var(--glass);
}
.map-card {
  height: 100dvh;
  min-height: 280px;
  border: 0;
  border-radius: 0;
}
.map-card #map {
  width: 100%;
  height: 100%;
}
#globe,
#satellite,
#apple-map,
.display-mode #apple-map {
  inset: 0;
}
.map-style-switch,
.display-mode .map-style-switch {
  left: max(18px, env(safe-area-inset-left));
  top: calc(70px + env(safe-area-inset-top));
  bottom: auto;
  max-width: calc(100% - 36px);
}
.map-style-options {
  flex-wrap: wrap;
}
.map-style-switch button {
  font-size: 0.875rem;
  min-height: 44px;
}
.map-topline,
.display-mode .map-topline {
  display: none;
}
.map-controls,
.display-mode .map-controls {
  top: 46%;
  bottom: auto;
  right: max(18px, env(safe-area-inset-right));
  left: auto;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  width: max-content;
  min-width: 54px;
}
.map-controls button,
.map-controls #satellite-explore {
  min-width: 54px;
  width: auto;
  min-height: 44px;
  border-left: 0;
  border-right: 0;
  border-bottom: 1px solid var(--glass-edge);
  font-size: 0.875rem;
  padding: 4px 8px;
}
.map-controls #zoom-in,
.map-controls #zoom-out {
  font-size: 1.75rem;
  line-height: 1;
}
.map-controls button:last-child {
  border-bottom: 0;
}
.map-bottomline,
.display-mode .map-bottomline {
  position: absolute;
  z-index: 3;
  padding: 0;
  left: auto;
  right: max(18px, env(safe-area-inset-right));
  bottom: calc(86px + env(safe-area-inset-bottom));
}
#map-caption {
  display: none;
}
.map-controls #map-reset {
  min-height: 44px;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 4px 8px;
  font-size: 0.875rem;
}
.map-attribution,
.display-mode .map-attribution {
  left: 12px;
  right: auto;
  bottom: calc(76px + env(safe-area-inset-bottom));
  font-size: 0.75rem;
  padding: 2px 5px;
}
#satellite .mapboxgl-ctrl-bottom-left,
#satellite .mapboxgl-ctrl-bottom-right {
  bottom: calc(74px + env(safe-area-inset-bottom));
}
#satellite .mapboxgl-ctrl-bottom-right {
  right: 0;
}
.landscape-add {
  display: none;
}
.atlas-actions {
  position: absolute;
  z-index: 3;
  left: max(18px, env(safe-area-inset-left));
  bottom: var(--dock-bottom);
  display: flex;
  align-items: center;
  gap: 8px;
}
.atlas-actions .atlas-add,
.atlas-actions #panel-toggle {
  position: static;
  min-height: 44px;
  border-radius: 24px;
  font-size: 0.875rem;
  padding: 8px 14px;
  white-space: nowrap;
}
.atlas-actions .atlas-add {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid transparent;
  font-weight: 650;
  box-shadow: 0 3px 14px #0003;
}
.atlas-add > span {
  font-size: 1.25rem;
  line-height: 1;
}
.display-mode .atlas-actions,
.paired-frame .atlas-actions,
body:not([data-view="world"]) .atlas-actions {
  display: none;
}
#panel-toggle {
  display: block;
  position: absolute;
  z-index: 3;
  left: max(18px, env(safe-area-inset-left));
  bottom: var(--dock-bottom);
  min-height: 44px;
  border-radius: 24px;
  border: 1px solid var(--glass-edge);
  background: var(--glass);
  color: var(--text);
  padding: 8px 14px;
  font-size: 0.875rem;
}
.has-flight #panel-toggle,
.display-mode #panel-toggle,
body[data-view="flight"] #panel-toggle {
  display: none;
}
#world-panel,
#flight-panel {
  position: fixed;
  z-index: 6;
  right: max(18px, env(safe-area-inset-right));
  bottom: calc(84px + env(safe-area-inset-bottom));
  width: min(380px, calc(100vw - 36px));
  max-height: calc(
    100dvh - 162px - env(safe-area-inset-top) - env(safe-area-inset-bottom)
  );
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 18px 18px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 12px 45px #0004;
  scroll-padding: 80px;
}
body:not([data-panel-open="true"]) #world-panel,
body:not([data-panel-open="true"]) #flight-panel {
  display: none;
}
.panel-heading {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 2;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.panel-heading h2 {
  font-size: 1.125rem;
  margin-right: auto;
}
.panel-close {
  display: grid;
  min-width: 44px;
  min-height: 44px;
}
.panel-size {
  font-size: 0.875rem;
  min-height: 44px;
}
.panel-quick-summary {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
  padding: 14px 0;
}
.flight-card {
  padding: 16px 0;
  border: 0;
  background: transparent;
}
.flight-card h2 {
  font-size: 1.5rem;
}
.flight-heading {
  gap: 8px;
}
.flight-heading .quiet {
  display: none;
}
.flight-times {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.flight-times dt {
  font-size: 0.875rem;
}
.flight-times dd {
  font-size: 1rem;
}
.tabbar {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom));
  width: min(390px, calc(100% - 32px));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  padding: 5px;
}
.tabbar button,
.tabbar button[aria-current="page"] {
  width: auto;
  min-width: 0;
  max-width: none;
  min-height: 48px;
  padding: 6px;
  gap: 7px;
  font-size: 0.875rem;
}
.tabbar button span {
  display: inline;
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  overflow: visible;
  white-space: nowrap;
}
.tabbar .nav-aircraft {
  width: 1.625rem;
  height: 1.625rem;
  fill: currentColor;
  stroke: none;
  transform: rotate(35deg);
}
.flight-glass {
  position: absolute;
  z-index: 3;
  left: 50%;
  transform: translateX(-50%);
  bottom: var(--dock-bottom);
  width: min(690px, calc(100% - 196px));
  border-radius: 25px;
  padding: 14px 18px;
  color: #fff;
  background: var(--flight-glass);
  border: 1px solid #ffffff40;
  box-shadow:
    0 8px 32px #06101a2e,
    inset 0 1px 0 #ffffff16;
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  backdrop-filter: blur(22px) saturate(130%);
  text-shadow: 0 1px 2px #07152240;
}
.glass-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
  padding: 0;
  min-height: 44px;
  background: none;
  border: 0;
  border-radius: 8px;
  color: inherit;
  text-align: left;
}
.glass-heading > span:first-child {
  display: flex;
  align-items: baseline;
  gap: 3px 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.glass-heading small {
  font-size: 0.875rem;
  font-weight: 500;
  color: #f0f5f7;
}
.glass-heading strong {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.glass-cities {
  flex-basis: 100%;
  font-size: 0.875rem;
  line-height: 1.35;
  color: #e7eef0;
}
.glass-status {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: right;
  font-size: 0.875rem;
  line-height: 1.35;
  flex-shrink: 0;
  max-width: 47%;
}
.glass-status #glass-status {
  font-weight: 600;
}
.glass-status small {
  font-size: 0.75rem;
  letter-spacing: 0;
}
#glass-delay {
  color: #ffe0a4;
}
#glass-clock {
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.glass-timeline {
  height: 2px;
  margin: 11px 0;
  background: #ffffff38;
  border-radius: 2px;
  overflow: hidden;
}
.glass-timeline > span {
  display: block;
  height: 100%;
  background: #ffe0a0;
  border-radius: 2px;
  transition: width 0.6s ease;
}
.glass-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-variant-numeric: tabular-nums;
  margin-top: 10px;
}
.glass-metrics > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.glass-metrics small {
  font-size: 0.75rem;
  color: #e7eef0;
}
.glass-metrics strong {
  font-size: 1rem;
  font-weight: 500;
}
.glass-metrics button {
  font-size: 0.875rem;
  min-height: 44px;
  padding: 6px 10px;
  border: 0;
  border-radius: 18px;
  background: #ffffff17;
  color: #fff;
}

.flight-depth-note {
  top: calc(124px + env(safe-area-inset-top));
  bottom: auto;
  right: max(18px, env(safe-area-inset-right));
  font-size: 0.875rem;
  max-width: min(250px, calc(100% - 36px));
  min-height: 44px;
  border: 1px solid var(--glass-edge);
  cursor: pointer;
}
.flight-depth-note[data-state="ready"] {
  display: none;
}
.has-flight .display-footer {
  display: none;
}
.display-mode {
  --dock-bottom: calc(28px + env(safe-area-inset-bottom));
  --utility-bottom: calc(
    var(--flight-dock-height, 140px) + 40px + env(safe-area-inset-bottom)
  );
}
.wake-warning.display-mode {
  --dock-bottom: calc(
    var(--wake-height, 36px) + 14px + env(safe-area-inset-bottom)
  );
  --utility-bottom: calc(
    var(--flight-dock-height, 140px) + var(--wake-height, 36px) + 26px +
      env(safe-area-inset-bottom)
  );
}
.display-mode .display-footer {
  bottom: var(--dock-bottom);
}
.display-mode[data-panel-open="true"] #flight-panel {
  display: block;
  bottom: calc(26px + env(safe-area-inset-bottom));
}
.display-footer {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 36px);
  padding: 12px 20px;
  border-radius: 25px;
  background: var(--flight-glass);
  border: 1px solid #ffffff40;
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  gap: 24px;
}
.display-footer p {
  font-size: 1.125rem;
}
.display-footer span {
  font-size: 0.875rem;
  color: #e9eff2;
}
.display-footer time {
  font-size: 1.75rem;
}
.display-ui #wake-message {
  display: none;
}
.wake-warning.display-mode #wake-message {
  display: block;
  position: fixed;
  bottom: 0;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 32px);
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 10px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.display-mode.controls-hidden
  :is(.map-legend-button, .map-compass, .sample-preview, .flight-depth-note) {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.paired-frame
  :is(
    .segmented,
    .saved-flight-numbers,
    #follow-panel .button-row,
    #clear-watch,
    #live-unavailable
  ) {
  display: none;
}
.track-legend {
  display: grid;
  gap: 16px;
}
.track-legend dt {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}
.track-legend dd {
  margin: 6px 0 0;
  line-height: 1.55;
}
.track-legend i {
  width: 38px;
  border-top: 3px solid #c49b55;
}
.track-legend .legend-estimated {
  border-top-style: dashed;
}
.track-legend .legend-guide {
  border-top: 2px dashed var(--muted);
}
.settings-card {
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
}
.settings-card h3 {
  font-size: 1.125rem;
  margin: 0 0 12px;
}
.settings-toolbar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 4px 0 18px;
}
.settings-toolbar h2 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: -0.025em;
}
.settings-toolbar h2:focus {
  outline: none;
}
#settings-back {
  min-height: 44px;
  padding: 4px 0;
}
#settings-back span {
  font-size: 1.5rem;
  margin-right: 5px;
}
#settings-home {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
}
.settings-destination {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 15px;
  min-height: 80px;
  padding: 14px 18px;
  text-align: left;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
}
.settings-destination:last-child {
  border-bottom: 0;
}
.settings-destination:hover,
.settings-destination:focus-visible {
  background: var(--accent-soft);
}
.settings-destination strong,
.settings-destination small {
  display: block;
}
.settings-destination strong {
  font-size: 1rem;
  font-weight: 600;
}
.settings-destination small {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 4px;
}
.settings-symbol {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 13px;
  color: var(--accent);
  background: var(--accent-soft);
}
.settings-symbol svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.settings-chevron {
  margin-left: auto;
  color: var(--muted);
  font-size: 1.5rem;
}
#settings-panel .settings-section > summary,
#frame-options-dialog .settings-section > summary {
  display: none;
}
#settings-panel .settings-section,
#frame-options-dialog .settings-section {
  padding-top: 18px;
}
.settings-advanced {
  border-top: 1px solid var(--border);
  margin: 14px 0;
}
.settings-advanced > summary {
  cursor: pointer;
  padding: 17px 0;
  min-height: 52px;
  font-size: 0.95rem;
  font-weight: 500;
}
.settings-advanced[open] > summary {
  margin-bottom: 5px;
}
#settings-preview {
  max-height: 210px;
  margin-bottom: 18px;
}
body[data-view="settings"] #eyebrow {
  display: none;
}
body[data-view="settings"] #page-title {
  font-size: 2rem;
}
@media (max-width: 500px) {
  .settings-destination {
    min-height: 76px;
    padding: 12px 14px;
    gap: 12px;
  }
  #settings-preview {
    max-height: 170px;
  }
}
.settings-section {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  margin: 0 0 16px;
  overflow: clip;
}
.settings-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  min-height: 76px;
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
}
.settings-section > summary::-webkit-details-marker {
  display: none;
}
.settings-section > summary strong,
.settings-section > summary small {
  display: block;
}
.settings-section > summary strong {
  font-size: 1.125rem;
  font-weight: 600;
}
.settings-section > summary small {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 3px;
}
.settings-section > summary::after {
  content: "+";
  font-size: 1.5rem;
  margin-left: 12px;
}
.settings-section[open] > summary::after {
  content: "−";
}
.settings-section-content {
  padding: 0 18px 6px;
}
.settings-section-content > fieldset {
  margin-top: 8px;
}
.settings-section-content .account-card {
  margin-top: 0;
}
.settings-section-content .settings-card {
  padding: 12px;
}
.setting-row {
  min-height: 58px;
  gap: 18px;
}
.setting-row input[role="switch"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 48px;
  height: 29px;
  min-height: 29px;
  min-width: 48px;
  padding: 0;
  border: 1px solid var(--muted);
  border-radius: 18px;
  background: var(--border);
  cursor: pointer;
  flex: 0 0 48px;
  transition: background 160ms;
}
.setting-row input[role="switch"]::before {
  content: "";
  position: absolute;
  width: 23px;
  height: 23px;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px #0003;
  transition: transform 160ms;
}
.setting-row input[role="switch"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.setting-row input[role="switch"]:checked::before {
  transform: translateX(19px);
  background: var(--accent-ink);
}
.setting-row select {
  max-width: 50%;
}
.saved-flight-numbers {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.saved-flight-numbers > span {
  display: inline-flex;
}
.saved-flight-numbers button {
  min-height: 44px;
}
.saved-flight-numbers button:last-child {
  min-width: 44px;
}
.flight-candidate {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
  padding: 16px;
}
.flight-candidate strong {
  font-size: 1rem;
}
.flight-candidate small {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}
.sample-preview {
  position: absolute;
  top: calc(128px + env(safe-area-inset-top));
  left: max(18px, env(safe-area-inset-left));
  z-index: 3;
  min-height: 44px;
  padding: 7px 13px;
  border-radius: 22px;
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  font-size: 0.875rem;
}
.flight-empty {
  position: absolute;
  z-index: 3;
  left: 50%;
  transform: translateX(-50%);
  bottom: var(--dock-bottom);
  width: min(370px, calc(100% - 32px));
  padding: 22px;
  border: 1px solid var(--glass-edge);
  border-radius: 26px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
}
.flight-empty h2 {
  font-size: 1.375rem;
  margin: 0 0 6px;
}
.flight-empty p {
  color: var(--muted);
  font-size: 1rem;
  margin: 0 0 16px;
}
.flight-empty > .primary {
  display: block;
  text-align: center;
  width: 100%;
  text-decoration: none;
}
.empty-alternatives {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}
.empty-alternatives button {
  font-size: 0.875rem;
  min-height: 44px;
  padding: 4px 0;
}
.map-compass {
  position: absolute;
  z-index: 3;
  right: max(18px, env(safe-area-inset-right));
  top: calc(78px + env(safe-area-inset-top));
  width: 48px;
  min-height: 48px;
  border-radius: 50%;
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  display: grid;
  place-items: center;
}
.map-compass svg {
  width: 20px;
  height: 20px;
}
.map-compass span {
  font-size: 0.75rem;
}
#map-recovery {
  max-width: min(460px, calc(100% - 36px));
  left: 18px;
  right: auto;
  top: calc(125px + env(safe-area-inset-top));
  padding: 10px 14px;
  font-size: 0.875rem;
  border-radius: 18px;
}
#map-recovery .text-button {
  min-height: 44px;
}
body[data-text-size="large"] .flight-glass {
  padding: 18px 22px;
}
body[data-text-size="large"] .glass-heading strong {
  font-size: 1.625rem;
}
body[data-text-size="large"] .glass-heading small,
body[data-text-size="large"] .glass-cities,
body[data-text-size="large"] .glass-status {
  font-size: 1.0625rem;
}
body[data-text-size="large"] .glass-status small,
body[data-text-size="large"] .glass-metrics small {
  font-size: 0.9375rem;
}
body[data-text-size="large"] .glass-metrics strong {
  font-size: 1.25rem;
}
body[data-text-size="large"] #glass-clock {
  font-size: 1.125rem;
}
@media (orientation: portrait), (max-width: 559px) {
  .flight-glass {
    width: min(610px, calc(100% - 32px));
  }
  .glass-heading > span:first-child {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
  .glass-cities {
    flex-basis: auto;
  }
  .has-flight .map-bottomline,
  .display-mode.has-flight .map-bottomline {
    bottom: var(--utility-bottom);
  }
  .has-flight .map-attribution,
  .has-flight #satellite .mapboxgl-ctrl-bottom-left,
  .has-flight #satellite .mapboxgl-ctrl-bottom-right {
    bottom: calc(var(--utility-bottom) + 46px);
  }
  .display-mode .map-bottomline {
    bottom: calc(120px + env(safe-area-inset-bottom));
  }
  #world-panel,
  #flight-panel {
    left: 12px;
    right: 12px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    width: auto;
    max-height: calc(100dvh - 176px - env(safe-area-inset-top));
  }
  body[data-panel-size="compact"] :is(#world-panel, #flight-panel) {
    max-height: min(42dvh, 410px);
  }
  body[data-panel-open="true"] .flight-glass {
    visibility: hidden;
  }
}
@media (min-width: 560px) and (orientation: landscape) {
  .flight-glass {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 0 18px;
    align-items: center;
  }
  .glass-heading {
    grid-column: 1;
    grid-row: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  .glass-heading strong {
    font-size: 1.125rem;
  }
  .glass-status {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 3px 8px;
    max-width: none;
    text-align: left;
    align-items: baseline;
  }
  .glass-metrics {
    grid-column: 2;
    grid-row: 1;
    margin-top: 0;
    gap: 6px 12px;
  }
  .glass-metrics #glass-share {
    display: none;
  }
  .glass-timeline {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 8px 0 0;
  }
  .sample-preview {
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
  }
}
@media (orientation: landscape) and (max-height: 600px) {
  .tabbar {
    width: 168px;
    left: max(18px, env(safe-area-inset-left));
    transform: none;
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .tabbar button {
    min-height: 44px;
  }
  .tabbar button span {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    clip: rect(0, 0, 0, 0);
    overflow: hidden;
  }
  .flight-glass {
    left: auto;
    right: max(96px, calc(env(safe-area-inset-right) + 80px));
    transform: none;
    width: min(720px, calc(100% - 298px));
    bottom: calc(16px + env(safe-area-inset-bottom));
    padding: 10px 14px;
  }
  .glass-heading strong {
    font-size: 1.0625rem;
  }
  .glass-heading small,
  .glass-cities {
    font-size: 0.8125rem;
  }
  .glass-status {
    font-size: 0.875rem;
  }
  .glass-metrics strong {
    font-size: 0.9375rem;
  }
  .glass-metrics > span:last-of-type {
    flex-basis: 100%;
  }
  .glass-metrics small {
    font-size: 0.75rem;
  }
  .map-bottomline,
  .display-mode .map-bottomline {
    bottom: calc(86px + env(safe-area-inset-bottom));
  }
  .map-controls,
  .display-mode .map-controls {
    top: max(202px, 45%);
    right: 14px;
  }
  #world-panel,
  #flight-panel {
    top: calc(66px + env(safe-area-inset-top));
    bottom: 16px;
    max-height: none;
    width: min(360px, calc(100% - 160px));
  }
  .display-mode .flight-glass {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(700px, calc(100% - 212px));
    bottom: var(--dock-bottom);
  }
  .flight-empty {
    bottom: 18px;
    left: auto;
    right: 96px;
    transform: none;
    width: min(410px, calc(100% - 290px));
    padding: 16px 20px;
  }
  .flight-empty p {
    font-size: 0.875rem;
  }
  #panel-toggle {
    bottom: 84px;
  }
  .flight-depth-note {
    top: 72px;
    right: 80px;
    max-width: 220px;
  }
  body[data-text-size="large"] .flight-glass {
    padding: 12px 16px;
  }
  body[data-text-size="large"] .glass-heading strong {
    font-size: 1.375rem;
  }
  body[data-text-size="large"] .glass-cities,
  body[data-text-size="large"] .glass-heading small,
  body[data-text-size="large"] .glass-status {
    font-size: 1rem;
  }
}
@media (max-width: 360px) and (orientation: portrait) {
  .tabbar button {
    flex-direction: column;
    gap: 2px;
  }
  body {
    --dock-bottom: calc(98px + env(safe-area-inset-bottom));
    --utility-bottom: calc(
      var(--flight-dock-height, 160px) + 110px + env(safe-area-inset-bottom)
    );
  }
  .flight-glass {
    padding: 12px;
  }
  .glass-heading {
    gap: 10px;
  }
}
.large-ui .map-style-switch .map-style-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}
.large-ui .map-style-switch {
  top: calc(116px + env(safe-area-inset-top));
}
.large-ui .map-style-options {
  display: none;
}
.large-ui .map-style-switch.is-open .map-style-options {
  display: flex;
}
.large-ui .map-style-switch.is-open .map-style-toggle {
  display: none;
}
.large-ui .flight-glass,
.large-ui .flight-empty {
  max-height: 45dvh;
  overflow: auto;
  overscroll-behavior: contain;
}
.large-ui .flight-glass {
  display: block;
}
.large-ui .glass-heading {
  flex-direction: column;
  align-items: flex-start;
}
.large-ui .glass-status {
  max-width: none;
  text-align: left;
}
.large-ui .glass-metrics {
  margin-top: 12px;
}
.large-ui .tabbar button {
  flex-direction: column;
  padding-inline: 2px;
}
.large-ui .tabbar button span {
  font-size: 0.75rem;
}
.large-ui .map-controls,
.large-ui.display-mode .map-controls {
  top: calc(184px + env(safe-area-inset-top));
  left: 18px;
  right: auto;
  transform: none;
  flex-direction: row;
  flex-wrap: wrap;
  max-width: calc(100% - 36px);
}
.large-ui .map-controls button {
  min-width: 44px;
  width: auto;
  flex: 1;
  border-top: 0;
  border-bottom: 0;
}
.large-ui #map-sample {
  top: calc(198px + env(safe-area-inset-top));
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .flight-glass,
  .display-footer {
    background: #172d3e;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-color: #b7c6cc;
  }
}
@media (prefers-reduced-motion: reduce) {
  .glass-timeline > span,
  .setting-row input[role="switch"],
  .setting-row input[role="switch"]::before {
    transition: none;
  }
}
@supports not (
  (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))
) {
  .flight-glass,
  .display-footer {
    background: #172d3e;
  }
}

/* Screen-specific presentation, map detail and City lights. */
:root {
  --glass-alpha: 0.84;
}
.map-style-switch .map-style-toggle,
.large-ui .map-style-switch .map-style-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  font-weight: 600;
}
.map-style-switch .map-style-options {
  display: none;
}
.map-style-switch.is-open .map-style-toggle {
  display: flex;
}
.map-style-switch.is-open .map-style-options {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 190px;
  max-height: min(330px, calc(100dvh - 180px));
  overflow: auto;
  padding: 7px;
  border: 1px solid var(--glass-edge);
  border-radius: 22px;
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 12px 32px #0003;
}
.map-style-switch.is-open .map-style-options button {
  text-align: left;
  padding: 10px 15px;
  min-height: 44px;
}
.map-style-switch {
  max-width: calc(100% - 32px);
}
.globe-live-switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}
.globe-live-switch input,
.setting-row.globe-live-switch input[role="switch"] {
  position: absolute;
  width: 1px;
  height: 1px;
  min-width: 1px;
  min-height: 1px;
  opacity: 0;
}
.switch-track {
  flex: 0 0 34px;
  width: 34px;
  height: 20px;
  border-radius: 20px;
  background: #71808c;
  box-shadow: inset 0 0 0 1px #ffffff26;
}
.switch-track::after {
  content: "";
  display: block;
  margin: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
}
.globe-live-switch input:checked + .switch-track {
  background: #2d9588;
}
.globe-live-switch input:checked + .switch-track::after {
  transform: translateX(14px);
}
.globe-live-switch input:focus-visible + .switch-track {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}
#globe-live-quick {
  min-height: 44px;
  padding: 0 13px 0 10px;
  font-size: 0.78rem;
  font-weight: 500;
  border-left: 1px solid var(--glass-edge);
  white-space: nowrap;
}
#globe-view-options .quiet {
  margin-top: 0;
}
.setting-row.globe-live-switch > span:first-child {
  flex: 1;
}
.map-more-panel {
  position: absolute;
  z-index: 35;
  right: max(78px, calc(68px + env(safe-area-inset-right)));
  top: 50%;
  transform: translateY(-35%);
  width: 195px;
  padding: 8px;
  border: 1px solid var(--glass-edge);
  border-radius: 22px;
  background: var(--glass);
  color: var(--text);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 12px 32px #0003;
}
.map-more-panel button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 13px;
  text-align: left;
  font-size: 0.9rem;
}
.map-more-panel button:hover,
.map-more-panel button:focus-visible {
  background: var(--accent-soft);
}
#map-more-toggle {
  font-size: 1.05rem;
  letter-spacing: 1px;
}
.map-more-panel #satellite-explore,
.map-more-panel #map-legend-button {
  position: static;
  transform: none;
  border: 0;
  box-shadow: none;
  margin: 0;
}
.map-card.hide-route-guide .demo-remaining,
.map-card.hide-route-guide .halo-remaining {
  visibility: hidden;
}
.map-card.hide-borders .country {
  stroke: transparent;
}
.map-card[data-style="night"] {
  background: #030a14;
  --land: #111c31;
  --ocean: #030a14;
  --line: #ffe0a4;
  --point: #ffe0a4;
}
.map-card[data-style="night"] .natural-land {
  fill: transparent;
  stroke: #8795b633;
}
.map-card[data-style="night"] .natural-texture {
  /* Night artwork is already graded; the daylight filter dims its fine lights. */
  filter: none;
}
.map-card[data-style="night"] .route-line {
  stroke: #ffe0a4;
}
.map-card[data-style="night"] .demo-remaining {
  stroke: #c5d5e4;
}
.map-card[data-style="night"] .airport-label,
.map-card[data-style="night"] .city-label {
  fill: #f1eee2;
  stroke: #0a1428;
}
.map-card[data-style="night"] .airport-dot {
  fill: #ffe0a4;
  stroke: #101b2c;
}
.map-card[data-style="night"] .plane-icon {
  fill: #fff;
  stroke: #102130;
}
.plane-icon.stale,
.apple-aircraft.stale,
.globe-label.aircraft.stale {
  opacity: 0.85;
}
body[data-theme="ivory"] .map-card[data-style="classic"] .plane-icon {
  fill: #24584b;
  stroke: #fffdf3;
  stroke-width: 1.4px;
  filter: drop-shadow(0 1px 2px #15292060);
}
body[data-theme="ivory"] .display-header .brand {
  color: var(--text);
}
.frame-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}
.frame-header-actions button {
  min-height: 44px;
  padding: 9px 15px;
  font-size: 0.875rem;
}
.flight-glass {
  background: rgba(11, 29, 40, var(--glass-alpha));
  backdrop-filter: blur(24px) saturate(1.1);
  -webkit-backdrop-filter: blur(24px) saturate(1.1);
  border: 1px solid #edf1e533;
  color: #fffdf5;
  box-shadow:
    0 8px 28px #0002,
    inset 0 1px 0 #ffffff12;
  border-radius: 24px;
}
.manual-glass .flight-glass {
  text-shadow: 0 1px 3px #0009;
}
.flight-glass[data-layout="compact"] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 24px;
  row-gap: 0;
  width: max-content;
  max-width: min(660px, calc(100% - 40px));
  padding: 12px 18px;
}
.flight-glass[data-layout="compact"] .glass-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  grid-column: 1;
  grid-row: 1;
  min-height: 44px;
}
.flight-glass[data-layout="compact"] .glass-heading > span:first-child {
  align-items: baseline;
}
.flight-glass[data-layout="compact"] .glass-heading strong {
  font-size: 1.1rem;
}
.flight-glass[data-layout="compact"] .glass-status {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 3px 8px;
  max-width: none;
  text-align: left;
  font-size: 0.75rem;
}
.flight-glass[data-layout="compact"] .glass-status small {
  font-size: 0.75rem;
}
.flight-glass[data-layout="compact"] .glass-metrics {
  display: flex;
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  gap: 12px 22px;
  align-content: center;
  justify-content: flex-start;
  max-width: 320px;
}
.flight-glass[data-layout="compact"] .glass-metrics strong {
  font-size: 0.95rem;
}
.flight-glass[data-layout="compact"] .glass-timeline {
  grid-column: 1/-1;
  grid-row: 2;
  margin: 9px 0 0;
}
.frame-status {
  position: absolute;
  z-index: 12;
  bottom: calc(20px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 36px);
  padding: 8px 14px;
  border-radius: 24px;
  background: #0b1d28dc;
  color: #fff4d8;
  border: 1px solid #d6e0dc38;
  font-size: 0.75rem;
  text-align: center;
}
.display-mode[data-presentation="map"] .display-footer {
  display: none;
}
#frame-hint {
  position: fixed;
  z-index: 65;
  left: 50%;
  top: calc(80px + env(safe-area-inset-top));
  transform: translateX(-50%);
  max-width: min(420px, calc(100% - 32px));
  width: max-content;
  padding: 12px 18px;
  border-radius: 18px;
  background: #0b1d28ed;
  border: 1px solid #d6e0dc4d;
  color: #fff4d8;
  font-size: 0.875rem;
  text-align: center;
  pointer-events: none;
}
.display-mode.controls-hidden .map-more-panel {
  display: none;
}
#frame-options-dialog {
  width: min(740px, calc(100% - 24px));
  max-width: 740px;
  max-height: calc(100dvh - 24px);
  padding: 24px;
}
#frame-options-dialog > .dialog-heading {
  position: sticky;
  top: -24px;
  margin: 0 -4px 20px;
  padding: 12px 4px;
  background: var(--surface);
  z-index: 4;
}
#display-customization {
  min-width: 0;
}
.appearance-preview {
  position: sticky;
  top: 14px;
  z-index: 3;
  width: 100%;
  height: clamp(200px, 28vw, 280px);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  background: #0c1922;
  margin: 0 0 14px;
  box-shadow: 0 10px 35px #00101a14;
}
#frame-options-dialog .appearance-preview {
  top: 62px;
}
@media (max-height: 600px) {
  .appearance-preview {
    height: 150px;
  }
}
.appearance-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}
.preview-caption {
  position: absolute;
  left: 14px;
  top: 12px;
  background: #10212ab8;
  color: #f6f4e9;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 6px 11px;
  border: 1px solid #ffffff22;
  border-radius: 16px;
  font-size: 0.75rem;
}
.screen-scope {
  margin: 0 0 22px;
  font-size: 0.875rem;
}
.presentation-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 20px;
}
.presentation-choices button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-height: 100px;
  padding: 12px 8px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
}
.presentation-choices button[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  background: var(--accent-soft);
}
.presentation-choices strong {
  font-size: 0.9rem;
  font-weight: 600;
}
.presentation-choices small {
  font-size: 0.75rem;
  color: var(--muted);
}
.presentation-icon {
  font-size: 1.6rem;
  line-height: 1;
  height: 28px;
  color: var(--accent);
}
.info-fields {
  min-inline-size: 0;
  border: 0;
  padding: 0;
  margin: 16px 0;
}
.info-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 18px;
}
.info-fields legend {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 10px;
}
.info-fields label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 0.875rem;
  font-weight: 400;
  margin: 0;
  min-width: 0;
}
.info-fields input[type="checkbox"] {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  max-width: 24px;
  margin: 0;
  padding: 0;
  flex: 0 0 24px;
  accent-color: var(--accent);
}
.opacity-control {
  margin: 8px 0 16px;
}
.opacity-control label {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 0.95rem;
}
.opacity-control output {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.opacity-control input {
  width: 100%;
  min-height: 32px;
  accent-color: var(--accent);
  padding: 0;
}
.units-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}
.units-grid label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin: 0;
  font-size: 0.875rem;
}
.units-grid select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.opacity-control .quiet {
  font-size: 0.8rem;
  margin: 4px 0 0;
}
.setting-row select {
  max-width: 55%;
  min-width: 0;
  min-height: 44px;
  font-size: 0.875rem;
}
.map-style-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}
.map-style-choices button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 7px 7px 12px;
  min-width: 0;
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  gap: 5px;
  text-align: left;
}
.map-style-choices button[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.map-style-choices strong {
  padding: 0 6px;
  font-size: 0.875rem;
  font-weight: 600;
}
.map-style-choices button > span:last-child {
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.75rem;
}
.style-thumbnail {
  display: block;
  width: 100%;
  aspect-ratio: 1.65;
  border-radius: 12px;
  margin-bottom: 4px;
  background: #0b1c29;
}
.thumb-classic {
  background-color: #dbd8cd;
  filter: grayscale(1);
  opacity: 0.8;
}
.thumb-relief {
  background-size: contain;
  background-repeat: no-repeat;
}
.thumb-globe {
  background-size: 150%;
  background-position: 30% center;
  border-radius: 50%;
  width: 80%;
  align-self: center;
}
.thumb-night {
  background-color: #071522;
}
.thumb-apple {
  background-position: 10% center;
  background-size: 200%;
}
.advanced-map-details {
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding-top: 4px;
}
.advanced-map-details summary {
  min-height: 48px;
  padding: 14px 0;
  cursor: pointer;
  font-size: 0.9rem;
}
#map-provider-note,
#terrain-setting-note,
#night-view-options .quiet {
  font-size: 0.8rem;
  line-height: 1.5;
}
.save-look-form > div {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.save-look-form input {
  min-width: 0;
  flex: 1;
}
.saved-look {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
}
.saved-look .secondary {
  flex: 1;
  text-align: left;
}
#use-account-look,
#save-account-look {
  display: block;
  margin-top: 10px;
  text-align: left;
}
.preview-mode {
  font-size: 12px;
  --dock-bottom: 18px;
}
.preview-mode .topbar,
.preview-mode .display-ui,
.preview-mode .tabbar,
.preview-mode .map-style-switch,
.preview-mode .map-controls,
.preview-mode .map-more-panel,
.preview-mode #map-sample,
.preview-mode #panel-toggle,
.preview-mode #atlas-actions,
.preview-mode #flight-depth-note,
.preview-mode #map-recovery,
.preview-mode #frame-hint,
.preview-mode #wake-message,
.preview-mode #map-loading,
.preview-mode #data-badge {
  display: none !important;
}
.preview-mode .map-card {
  height: 100dvh !important;
  min-height: 0 !important;
}
.preview-mode .flight-glass {
  bottom: 18px;
  max-width: calc(100% - 40px);
  padding: 10px 14px;
  border-radius: 18px;
}
.preview-mode .glass-heading strong {
  font-size: 14px !important;
}
.preview-mode .glass-heading small,
.preview-mode .glass-metrics strong {
  font-size: 12px !important;
}
.preview-mode .glass-metrics small,
.preview-mode .glass-status,
.preview-mode .glass-status small {
  font-size: 10px !important;
}
.preview-mode .map-attribution {
  font-size: 9px;
}
@media (min-width: 800px) {
  body[data-card-position="left"] .flight-glass {
    left: max(24px, env(safe-area-inset-left));
    right: auto;
    transform: none;
  }
  body[data-card-position="right"] .flight-glass {
    left: auto;
    right: max(24px, env(safe-area-inset-right));
    transform: none;
  }
  body[data-card-position="left"] .flight-glass,
  body[data-card-position="right"] .flight-glass {
    max-width: min(620px, calc(100% - 48px));
  }
}
@media (max-width: 600px) {
  .map-style-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .presentation-choices {
    gap: 6px;
  }
  .presentation-choices small {
    font-size: 0.68rem;
  }
  #frame-options-dialog {
    padding: 18px;
  }
  #frame-options-dialog > .dialog-heading {
    top: -18px;
  }
  .flight-glass[data-layout="compact"] {
    max-width: calc(100% - 28px);
    width: calc(100% - 28px);
    padding: 11px 14px;
    column-gap: 12px;
  }
  .flight-glass[data-layout="compact"] .glass-metrics {
    max-width: 160px;
    gap: 9px;
  }
  .flight-glass[data-layout="compact"] .glass-heading strong {
    font-size: 0.95rem;
  }
  .flight-glass[data-layout="compact"] .glass-metrics strong {
    font-size: 0.825rem;
  }
  .frame-header-actions {
    gap: 6px;
  }
  .frame-header-actions button {
    padding: 8px 11px;
    font-size: 0.75rem;
  }
  .frame-header-actions #exit-display {
    max-width: 80px;
  }
  .display-header .brand {
    font-size: 1rem;
    letter-spacing: 0.15em;
  }
  .display-header .brand .brand-mark {
    width: 24px;
    height: 24px;
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  .map-style-switch.is-open .map-style-options {
    flex-direction: row;
    flex-wrap: wrap;
    width: 280px;
    max-height: calc(100dvh - 120px);
  }
  .flight-glass[data-layout="compact"] {
    bottom: max(14px, env(safe-area-inset-bottom));
    padding: 8px 16px;
    border-radius: 20px;
  }
  body:not(.display-mode) .flight-glass[data-layout="compact"] {
    bottom: var(--dock-bottom);
  }
  .frame-header-actions button {
    min-height: 44px;
  }
  #frame-hint {
    top: 76px;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .flight-glass {
    background: #0b1d28;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
@media (prefers-contrast: more) {
  .flight-glass {
    background: #0b1d28;
    border: 2px solid #fff;
  }
  .map-style-switch,
  .map-more-panel {
    border-width: 2px;
  }
}
body[data-theme="ivory"] .display-header .brand {
  color: #24302d;
  text-shadow: none;
}
body[data-theme="ivory"] .display-header .brand .brand-mark {
  color: #406759;
}
@media (orientation: landscape) and (max-height: 600px) {
  body:not(.display-mode) .flight-glass[data-layout="compact"] {
    max-width: calc(100% - 298px);
  }
}
.apple-aircraft.stale svg {
  opacity: 1;
}
body[data-text-size="large"]
  .flight-glass[data-layout="compact"]
  .glass-heading
  strong {
  font-size: 1.25rem;
}
body[data-text-size="large"]
  .flight-glass[data-layout="compact"]
  .glass-metrics
  strong {
  font-size: 1.125rem;
}
body[data-text-size="large"] .flight-glass[data-layout="compact"] .glass-status,
body[data-text-size="large"]
  .flight-glass[data-layout="compact"]
  .glass-status
  small {
  font-size: 0.875rem;
}

/* Field labels remain readable when the same settings move into a phone dialog. */
@media (max-width: 460px) {
  .info-fields-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Map style and map shape are independent, shared by settings and the map picker. */
.map-view-field {
  border: 0;
  padding: 0;
  margin: 0 0 20px;
  min-inline-size: 0;
}
.map-view-field legend {
  font-size: 1.125rem;
  font-weight: 650;
  margin-bottom: 12px;
}
.map-projection-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
}
.map-projection-choices button {
  border: 0;
  border-radius: 13px;
  padding: 13px 8px;
  background: transparent;
  color: var(--muted);
  min-height: 44px;
}
.map-projection-choices button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
}
.map-projection-choices strong,
.map-projection-choices span {
  display: block;
}
.map-projection-choices span {
  font-size: 0.75rem;
  margin-top: 4px;
}
.map-projection-choices.compact {
  margin-top: 5px;
  padding: 3px;
  border-radius: 14px;
}
.map-style-switch.is-open .map-projection-choices button {
  padding: 8px 2px;
  text-align: center;
  font-size: 0.78rem;
}
.browse-map-styles {
  display: block;
  margin: 18px auto 0;
  min-height: 44px;
}
.globe-city-label {
  font-size: 0.75rem;
  font-weight: 450;
  color: var(--text);
  background: transparent;
  text-shadow:
    0 1px 3px var(--map),
    0 -1px 3px var(--map);
  padding: 0;
}

/* Aircraft families share the geometry used by the live globe marker. */
.aircraft-picker {
  min-width: 0;
  margin: 24px 0 14px;
  padding: 0;
  border: 0;
}
.aircraft-picker legend {
  padding: 0;
  font-size: 1rem;
  font-weight: 650;
}
.aircraft-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.aircraft-choices button {
  position: relative;
  min-width: 0;
  padding: 12px 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}
.aircraft-choices button[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.aircraft-choices button[aria-pressed="true"]::after {
  content: "✓";
  position: absolute;
  top: 12px;
  right: 14px;
  color: var(--accent);
  font-weight: 700;
}
.aircraft-choices img {
  display: block;
  width: 100%;
  max-height: 180px;
  height: auto;
  object-fit: contain;
  margin: 0 auto 4px;
}
.aircraft-choices strong,
.aircraft-choices small {
  display: block;
}
.aircraft-choices strong {
  font-size: 1rem;
}
.aircraft-choices small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.4;
}
.aircraft-choices .aircraft-auto {
  grid-column: 1 / -1;
  padding: 16px 44px 16px 16px;
}
.aircraft-picker > .quiet {
  margin: 10px 0 0;
}
@media (max-width: 370px) {
  .aircraft-choices button {
    padding: 10px;
  }
}
