:root {
  --navy: #0b1b33;
  --navy-deep: #071224;
  --sky: #e8a317;
  --sky-glow: #f0c14d;
  --rail: #e8a317;
  --rail-glow: #f0c14d;
  --signal-green: #3dcf7a;
  --gold: #f5c542;
  --mist: #9bb0c8;
  --text: #e8f1ff;
  --panel: rgba(16, 36, 64, 0.82);
  --danger: #ff6b7a;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --touch: 48px;
  --font-display: "Outfit", "Trebuchet MS", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: var(--font-body);
  background:
    radial-gradient(ellipse 120% 80% at 50% -10%, #1a3048 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 20%, rgba(232, 163, 23, 0.10), transparent 50%),
    linear-gradient(180deg, var(--navy) 0%, #0a1628 100%);
  background-attachment: fixed;
}

/* Keep scrolled content from showing through Android's transparent status bar. */
body::before {
  content: "";
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: var(--safe-top);
  background: #102540;
  pointer-events: none;
}

a { color: var(--sky-glow); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, .brand, .brand-hero {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0.2rem 0 0.4rem; }
h2 { font-size: 1.2rem; margin: 1.2rem 0 0.6rem; }

.app-shell {
  display: flex;
  min-height: 100dvh;
  max-width: 72rem;
  margin: 0 auto;
  padding-top: var(--safe-top);
}
.app-shell:has(.main--sky) {
  height: 100dvh;
  overflow: hidden;
}

.side-nav {
  display: none;
  width: 7.5rem;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.2rem 0.7rem;
  border-right: 1px solid rgba(255,255,255,0.1);
  background: rgba(7, 18, 36, 0.7);
  position: sticky;
  top: 0;
  height: 100dvh;
}

.brand {
  color: var(--text);
  font-weight: 800;
  font-size: 1.05rem;
  margin: 0 0 1rem;
  padding: 0.35rem 0.35rem 0.55rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-decoration: none;
  text-align: center;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 3.1rem;
  height: 3.1rem;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
.side-nav .brand-wordmark {
  font-size: 1.05rem;
}
.brand-wordmark,
.brand-hero {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.brand-my,
.brand-dex { color: #fff; }
.brand-sky,
.brand-train { color: var(--rail); }
.brand-hero {
  font-size: clamp(2.6rem, 10vw, 4rem);
  margin: 0;
  display: inline-block;
  animation: rise 0.7s ease-out both;
}
.brand-logo {
  display: block;
  width: min(100%, 14rem);
  height: auto;
  margin: 0 auto 0.75rem;
}
.brand-logo--hero {
  width: min(100%, 16rem);
}
.auth-hero .brand-logo,
.story-hero .brand-logo {
  margin-left: 0;
}

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-shell:has(.main--sky) .main-col {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.main { flex: 1; padding: 1rem 1rem 6.5rem; }
.main--flush { padding-bottom: 2rem; }
.main--sky {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0.55rem 0.85rem 0;
  /* leave room for bottom nav + safe area */
  padding-bottom: 0;
  height: 100%;
}
.main-col:has(.bottom-nav) .main--sky {
  max-height: calc(100dvh - 4.6rem - var(--safe-bottom));
}
.main-col:has(.admin-bar) .main--sky {
  max-height: calc(100dvh - 4.6rem - var(--safe-bottom) - 2rem);
}

.sky-screen {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  gap: 0.35rem;
}
.sky-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
}
.sky-top-text {
  min-width: 0;
  flex: 1 1 auto;
}
.sky-top h1 {
  font-size: 1.45rem;
  margin: 0;
  line-height: 1.15;
}
.sky-top-text .eyebrow { margin-bottom: 0.1rem; }
.sky-top-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
}
.sky-compass-btn[hidden],
.sky-compass-btn[aria-hidden="true"] {
  display: none !important;
}
.sky-geo,
.sky-guest {
  flex: 0 0 auto;
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--mist);
  line-height: 1.3;
}
.sky-guest a { font-weight: 600; }
.sky-away {
  flex: 0 0 auto;
  min-width: 0;
  padding: 0.3rem 0.4rem;
  border-radius: 0.85rem;
  background: rgba(58, 160, 255, 0.12);
  border: 1px solid rgba(110, 200, 255, 0.25);
  font-size: 0.85rem;
}
.sky-away-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.sky-away-toggle {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.25rem 0.4rem;
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.sky-away-toggle:disabled {
  cursor: default;
}
.sky-away-toggle:not(:disabled):hover {
  background: rgba(8, 18, 36, 0.28);
}
.sky-away-copy {
  min-width: 0;
  flex: 1;
}
.sky-away-copy strong {
  display: block;
  line-height: 1.15;
}
.sky-away-copy > span {
  display: block;
  color: var(--mist);
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sky-away-chevron {
  flex-shrink: 0;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--mist);
  border-bottom: 2px solid var(--mist);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  opacity: 0.85;
}
.sky-away.is-open .sky-away-chevron {
  transform: rotate(225deg);
  margin-top: 0.2rem;
}
.sky-away .btn { flex-shrink: 0; }
.sky-away-sheet {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 0.75rem 0.75rem calc(0.75rem + var(--safe-bottom) + 4.6rem);
}
.sky-away-sheet[hidden] { display: none !important; }
.sky-away-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(4, 12, 28, 0.72);
  cursor: pointer;
}
.sky-away-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  max-height: min(70vh, 32rem);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem 0.85rem 0.9rem;
  border-radius: 1.1rem 1.1rem 0.85rem 0.85rem;
  background: rgba(12, 28, 52, 0.97);
  border: 1px solid rgba(110, 200, 255, 0.28);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}
.sky-away-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}
.sky-away-panel-head strong {
  display: block;
  font-size: 1rem;
}
.sky-away-panel-head span {
  display: block;
  color: var(--mist);
  font-size: 0.8rem;
  line-height: 1.3;
  margin-top: 0.15rem;
}
.sky-away-details {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  flex: 1 1 auto;
}
.sky-away-item a {
  display: grid;
  gap: 0.1rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.55rem;
  background: rgba(8, 18, 36, 0.45);
  text-decoration: none;
  color: inherit;
}
.sky-away-item a:hover { background: rgba(8, 18, 36, 0.65); }
.sky-away-item strong {
  display: inline;
  font-size: 0.95rem;
}
.sky-away-sub,
.sky-away-outcome {
  display: block;
  color: var(--mist);
  font-size: 0.78rem;
}
.sky-away-item--missed .sky-away-outcome {
  color: #f0b4b4;
  font-weight: 600;
}
.sky-away-item--seen .sky-away-outcome {
  color: #9fd6a8;
}
.sky-away-panel-actions {
  display: flex;
  gap: 0.5rem;
}
.sky-away-panel-actions .btn {
  flex: 1;
}
body.sky-away-open {
  overflow: hidden;
}
.btn-compact {
  min-height: 2.2rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  white-space: nowrap;
}
.sky-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.sky-filter { margin: 0; gap: 0.35rem; }
.sky-filter .chip {
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
}
.sky-status {
  margin: 0;
  font-size: 0.8rem;
}
.sky-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sky-stage--setup {
  flex-direction: column;
  gap: 0.75rem;
  text-align: center;
  color: var(--mist);
}
.sky-map-wrap {
  position: relative;
  width: min(100%, 34rem);
  height: min(100%, 28rem);
  max-height: 100%;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(110, 200, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  background: #071224;
}
.sky-screen--empty .sky-map-wrap {
  width: min(96%, 36rem);
  height: min(78vmin, 32rem);
  max-height: calc(100% - 0.5rem);
}
.sky-map {
  width: 100%;
  height: 100%;
  z-index: 1;
  position: relative;
  background: #0a1628;
  overflow: hidden;
}
.sky-map-fallback {
  margin: 0;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--mist);
  font-size: 0.9rem;
}
.sky-map-world {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
}
.sky-map-basemap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
  opacity: 0.92;
}
.sky-compass {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 7;
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  pointer-events: none;
}
.sky-compass-dial {
  position: relative;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  border: 1px solid rgba(110, 200, 255, 0.35);
  background: rgba(7, 18, 36, 0.82);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}
.sky-compass-mark {
  position: absolute;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--mist);
}
.sky-compass-mark--n { top: 0.2rem; left: 50%; transform: translateX(-50%); color: var(--gold); }
.sky-compass-mark--e { right: 0.28rem; top: 50%; transform: translateY(-50%); }
.sky-compass-mark--s { bottom: 0.2rem; left: 50%; transform: translateX(-50%); }
.sky-compass-mark--w { left: 0.28rem; top: 50%; transform: translateY(-50%); }
.sky-compass-needle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  margin: -0.85rem 0 0 -0.4rem;
  border-left: 0.4rem solid transparent;
  border-right: 0.4rem solid transparent;
  border-bottom: 1.15rem solid var(--gold);
  transform-origin: 50% 100%;
  filter: drop-shadow(0 0 5px rgba(245, 197, 66, 0.65));
  transition: transform 0.35s ease-out;
}
.sky-compass-facing {
  margin: 0;
  padding: 0.15rem 0.4rem;
  border-radius: 0.45rem;
  background: rgba(7, 18, 36, 0.82);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.sky-compass-btn {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 7;
  min-height: 2.1rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  background: rgba(7, 18, 36, 0.82);
}
.sky-compass-status {
  position: absolute;
  top: 2.7rem;
  right: 0.55rem;
  z-index: 7;
  margin: 0;
  max-width: 55%;
  padding: 0.25rem 0.55rem;
  border-radius: 0.55rem;
  background: rgba(7, 18, 36, 0.82);
  color: var(--mist);
  font-size: 0.75rem;
  text-align: right;
  pointer-events: none;
}
.look-dir--relative {
  color: var(--sky-glow);
  font-weight: 700;
}
@media (prefers-reduced-motion: reduce) {
  .sky-compass-needle {
    transition: none;
  }
}
.sky-map-rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
}
.sky-map-ring {
  fill: transparent;
  stroke-width: 1.5;
  stroke-linecap: round;
}
.sky-map-ring--glow {
  fill: none;
  stroke-width: 6;
  opacity: 0.22;
}
.sky-map-ring--watch {
  stroke: rgba(110, 200, 255, 0.7);
  fill: rgba(58, 160, 255, 0.05);
}
.sky-map-ring--watch.sky-map-ring--glow {
  stroke: rgba(58, 160, 255, 0.9);
}
.sky-map-ring--spot {
  stroke: rgba(245, 197, 66, 0.75);
  fill: rgba(245, 197, 66, 0.06);
}
.sky-map-ring--spot.sky-map-ring--glow {
  stroke: rgba(245, 197, 66, 0.85);
}
.sky-map-you-mark {
  fill: var(--gold);
  stroke: rgba(7, 18, 36, 0.9);
  stroke-width: 2;
  filter: drop-shadow(0 0 6px rgba(245, 197, 66, 0.7));
}
.sky-map-ac {
  fill: #6ec8ff;
  stroke: rgba(7, 18, 36, 0.85);
  stroke-width: 1.5;
  filter: drop-shadow(0 0 5px rgba(58, 160, 255, 0.65));
}
.sky-map-ac--claimable {
  fill: var(--gold);
  filter: drop-shadow(0 0 6px rgba(245, 197, 66, 0.75));
}
.sky-map-ac--missed {
  fill: #9aa8bc;
  filter: none;
}
.sky-map-ac--approaching {
  fill: #7dd3fc;
}
/* Soft vignette + HUD — watch/spot rings are the real distance rings. */
.radar-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: inherit;
  overflow: hidden;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 68%, transparent 78%);
  mask-image: radial-gradient(circle at 50% 50%, #000 68%, transparent 78%);
  background: radial-gradient(circle at 50% 50%, transparent 35%, rgba(4, 12, 24, 0.35) 100%);
}
.radar-overlay .radar-grid {
  inset: 8%;
  border-color: rgba(110, 200, 255, 0.14);
  background:
    repeating-radial-gradient(
      circle at 50% 50%,
      transparent 0,
      transparent 14%,
      rgba(110, 200, 255, 0.04) 14.4%,
      transparent 15%
    );
}
.radar-overlay .radar-cross {
  background: rgba(110, 200, 255, 0.14);
}
.radar-overlay .radar-sweep {
  inset: 6%;
  opacity: 0.55;
  background: conic-gradient(
    from 0deg,
    rgba(110, 200, 255, 0.28) 0deg,
    rgba(110, 200, 255, 0.06) 22deg,
    transparent 48deg,
    transparent 360deg
  );
}
.sky-map-legend {
  position: absolute;
  left: 0.65rem;
  bottom: 0.65rem;
  z-index: 5;
  margin: 0;
  padding: 0.45rem 0.6rem;
  list-style: none;
  display: grid;
  gap: 0.25rem;
  border-radius: 0.7rem;
  background: rgba(7, 18, 36, 0.82);
  border: 1px solid rgba(110, 200, 255, 0.2);
  color: var(--mist);
  font-size: 0.75rem;
  font-weight: 600;
  pointer-events: none;
}
.sky-map-attrib {
  position: absolute;
  right: 0.55rem;
  bottom: 0.45rem;
  z-index: 5;
  margin: 0;
  font-size: 0.65rem;
  color: rgba(143, 184, 232, 0.7);
  background: rgba(7, 18, 36, 0.55);
  padding: 0.15rem 0.35rem;
  border-radius: 0.35rem;
  pointer-events: none;
}
.sky-map-legend li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.sky-map-swatch {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  box-sizing: border-box;
  flex: 0 0 auto;
}
.sky-map-swatch--watch {
  border: 2px solid #6ec8ff;
  background: rgba(58, 160, 255, 0.2);
}
.sky-map-swatch--spot {
  border: 2px solid #f5c542;
  background: rgba(245, 197, 66, 0.22);
}
.sky-map-you {
  background: transparent !important;
  border: 0 !important;
}
.sky-map-you-dot {
  display: block;
  width: 12px;
  height: 12px;
  margin: 2px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 2px rgba(7, 18, 36, 0.9), 0 0 12px rgba(245, 197, 66, 0.85);
}
.sky-map-blip {
  background: transparent !important;
  border: 0 !important;
}
.sky-map-blip-dot {
  display: block;
  width: 10px;
  height: 10px;
  margin: 2px;
  border-radius: 50%;
  background: var(--sky-glow);
  box-shadow: 0 0 0 2px rgba(7, 18, 36, 0.85), 0 0 8px rgba(58, 160, 255, 0.7);
}
.sky-map-blip--claimable .sky-map-blip-dot {
  width: 12px;
  height: 12px;
  margin: 1px;
  background: var(--gold);
  box-shadow: 0 0 0 2px rgba(7, 18, 36, 0.85), 0 0 10px rgba(245, 197, 66, 0.8);
}
.sky-map-blip--missed .sky-map-blip-dot {
  background: #9aa8bc;
  box-shadow: 0 0 0 2px rgba(7, 18, 36, 0.85);
}
.sky-map-blip--approaching .sky-map-blip-dot {
  background: #7dd3fc;
}
.radar-caption {
  position: absolute;
  left: 50%;
  bottom: 22%;
  transform: translateX(-50%);
  margin: 0;
  z-index: 6;
  font-family: var(--font-display);
  font-size: 0.95rem;
  white-space: nowrap;
  color: var(--text);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75);
  pointer-events: none;
}
.sky-map-wrap--empty .radar-caption {
  bottom: auto;
  top: 42%;
  transform: translate(-50%, -50%);
}
.sky-encounters {
  flex: 0 1 38%;
  min-height: 0;
  max-height: 38%;
  overflow-y: auto;
  margin: 0;
  padding-bottom: 0.35rem;
  -webkit-overflow-scrolling: touch;
}
.sky-encounters .encounter {
  padding: 0.65rem 0.8rem;
  margin-bottom: 0.45rem;
}
.sky-encounters .btn-claim,
.sky-encounters .btn-claim-heard {
  min-height: 2.4rem;
  margin-top: 0;
}
.claim-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.45rem;
}
.claim-actions .btn {
  flex: 1 1 8.5rem;
}
.btn-claim-heard {
  font-weight: 700;
  letter-spacing: 0.02em;
  background: color-mix(in srgb, var(--panel, #132844) 70%, #38bdf8);
  color: #f8fafc;
  border: 1px solid color-mix(in srgb, #38bdf8 55%, white);
}
.btn-claim-heard:disabled {
  opacity: 0.65;
}
.claim-hint {
  margin: 0.35rem 0 0;
}
.encounter--heard {
  border-color: color-mix(in srgb, #38bdf8 45%, transparent);
}
.state-pill--heard {
  background: color-mix(in srgb, #38bdf8 35%, var(--panel, #132844));
  color: #e0f2fe;
}
.ac-card--heard,
.panel--heard {
  border-color: color-mix(in srgb, #38bdf8 40%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #38bdf8 18%, transparent);
}
.ac-photo--heard img,
.silhouette.heard {
  filter: grayscale(0.35) sepia(0.35) hue-rotate(170deg) saturate(1.35);
}
.heard-label {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.15rem 0.45rem;
  border-radius: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #e0f2fe;
  background: color-mix(in srgb, #0284c7 70%, #0b1b33);
}
.heard-text {
  color: #7dd3fc;
}

.bottom-nav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 40;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: rgba(11, 27, 51, 0.96);
  backdrop-filter: blur(10px);
  padding-bottom: var(--safe-bottom);
}

.bottom-nav ul {
  list-style: none;
  margin: 0 auto;
  padding: 0.35rem 0.4rem;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.2rem;
  max-width: 32rem;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: var(--touch);
  border-radius: 0.9rem;
  color: var(--mist);
  font-size: 0.65rem;
  font-weight: 600;
  text-decoration: none !important;
  padding: 0.35rem 0.2rem;
}

.nav-item span[aria-hidden],
.nav-item .nav-icon { font-size: 1.15rem; line-height: 1; }
.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
}
.nav-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.side-nav .nav-icon {
  width: 1.45rem;
  height: 1.45rem;
}
.bottom-nav .nav-icon {
  width: 1.35rem;
  height: 1.35rem;
}
.nav-item.active,
.nav-item.is-active {
  background: rgba(232, 163, 23, 0.18);
  color: var(--rail-glow);
}

/* Elevated centre Station tab (FAV) */
.bottom-nav__fav {
  position: relative;
  z-index: 1;
}
.bottom-nav .nav-item--fav {
  position: relative;
  margin-top: -0.85rem;
  padding-top: 0.45rem;
  gap: 0.2rem;
}
.bottom-nav .nav-item--fav .nav-icon {
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 50%;
  background: linear-gradient(160deg, #f0b93a 0%, #d4890f 100%);
  color: #0b1b33;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(11, 27, 51, 0.96);
}
.bottom-nav .nav-item--fav .nav-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}
.bottom-nav .nav-item--fav.active,
.bottom-nav .nav-item--fav.is-active {
  background: transparent;
  color: var(--rail-glow);
}
.bottom-nav .nav-item--fav.active .nav-icon,
.bottom-nav .nav-item--fav.is-active .nav-icon {
  box-shadow: 0 4px 16px rgba(232, 163, 23, 0.45), 0 0 0 3px rgba(11, 27, 51, 0.96);
}
.side-nav .nav-item--fav {
  background: rgba(232, 163, 23, 0.12);
}

.page-header {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.75rem;
  align-items: stretch;
  margin-bottom: 1rem;
}
.page-header > .btn,
.page-header > button.btn,
.page-header .hero-actions {
  align-self: stretch;
}
@media (min-width: 720px) {
  .page-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem 1rem;
  }
  .page-header > .btn,
  .page-header > button.btn {
    flex: 0 0 auto;
    white-space: nowrap;
    align-self: flex-start;
  }
}

.admin-bar,
.top-pills {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem 0;
  flex: 0 0 auto;
}
.admin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: #041018;
  background: var(--gold);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.admin-badge:hover { text-decoration: none; filter: brightness(1.05); }
.discord-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: #5865f2;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.discord-badge:hover { text-decoration: none; filter: brightness(1.08); }
.discord-badge--inline,
.admin-badge--inline {
  position: static;
  box-shadow: none;
  padding: 0.2rem 0.55rem;
  font-size: 0.65rem;
}

.eyebrow { color: var(--mist); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; margin: 0; }
.lede { color: var(--mist); margin: 0; max-width: 36rem; line-height: 1.45; }
.meta { color: var(--mist); font-size: 0.9rem; }
.sub { color: var(--mist); margin: 0.15rem 0; font-size: 0.92rem; }
.hint { color: var(--mist); margin: 0.6rem 0 0; }
.error { color: var(--danger); }
.success {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.12);
  color: #a7f3d0;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1.25rem;
  padding: 1rem 1.1rem;
  margin-bottom: 0.85rem;
  backdrop-filter: blur(6px);
}

.panel--ghost, .ac-card--ghost { filter: grayscale(1); opacity: 0.85; }
.ghost-text { filter: grayscale(1); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  min-width: var(--touch);
  padding: 0.7rem 1.1rem;
  border-radius: 1rem;
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--sky); color: #041018; }
.btn-secondary { background: rgba(255,255,255,0.08); color: var(--text); border: 1px solid rgba(255,255,255,0.12); }
.btn-ghost { background: transparent; color: var(--sky-glow); border: 1px solid rgba(110,200,255,0.35); }
.btn-claim {
  width: 100%;
  margin-top: 0.75rem;
  background: linear-gradient(135deg, var(--gold), #ffd978);
  color: #1a1400;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 24px rgba(245, 197, 66, 0.25);
  animation: pulse-claim 2.2s ease-in-out infinite;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255,255,255,0.1);
}
.rarity-ultra-rare { background: rgba(245,197,66,0.28); color: var(--gold); }
.rarity-legendary { background: rgba(245,197,66,0.25); color: var(--gold); }
.rarity-epic { background: rgba(180,120,255,0.25); color: #d2b4ff; }
.rarity-rare { background: rgba(58,160,255,0.25); color: var(--sky-glow); }
.rarity-uncommon { background: rgba(80,200,140,0.2); color: #8dffc0; }
.rarity-common { background: rgba(255,255,255,0.1); color: #c9d8ef; }

.sky-filter { display: flex; gap: 0.5rem; margin: 0.75rem 0 1rem; flex-wrap: wrap; }
.sky-toolbar .sky-filter { margin: 0; gap: 0.35rem; }
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.8rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(8, 18, 36, 0.35);
  color: var(--mist);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.2;
}
.chip.is-active {
  background: rgba(58,160,255,0.22);
  border-color: rgba(110, 200, 255, 0.45);
  color: var(--text);
}
.seg {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  padding: 0.18rem;
  gap: 0.12rem;
  border-radius: 0.8rem;
  background: rgba(8, 18, 36, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.3rem 0.7rem;
  border-radius: 0.6rem;
  color: var(--mist);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1;
}
.seg a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
.seg a.is-active {
  background: rgba(58, 160, 255, 0.28);
  color: var(--text);
}
.ghosts-controls {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 0.85rem;
}
.ghosts-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: space-between;
}
.ghosts-sort {
  flex: 1 1 auto;
  min-width: 0;
}
.ghosts-view {
  flex: 0 0 auto;
}
.ghosts-view a {
  min-width: 3.6rem;
}
.ghosts-find {
  display: grid;
  gap: 0.4rem;
  margin: 0;
}
.ghosts-find-bar {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.ghosts-search-inline {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.ghosts-search-inline input {
  width: 100%;
  min-height: 2.4rem;
  margin: 0;
}
.ghosts-more {
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 18, 36, 0.28);
}
.ghosts-more > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.35rem;
  padding: 0.35rem 0.75rem;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--sky-glow);
  outline: none;
}
.ghosts-more > summary:focus-visible {
  border-radius: 0.75rem;
  box-shadow: inset 0 0 0 2px rgba(110, 200, 255, 0.45);
}
.ghosts-more > summary::-webkit-details-marker { display: none; }
.ghosts-more > summary::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.8;
}
.ghosts-more[open] > summary::after {
  transform: rotate(225deg);
  margin-top: 0.2rem;
}
.ghosts-more-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(58, 160, 255, 0.28);
  color: var(--text);
  font-size: 0.75rem;
}
.ghosts-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  align-items: end;
  margin: 0;
  padding: 0.15rem 0.75rem 0.75rem;
  border: 0;
  background: transparent;
  border-radius: 0;
}
.ghosts-type-field {
  display: grid;
  gap: 0.35rem;
  align-content: start;
}
.ghosts-type-search {
  width: 100%;
}
.ghosts-filters-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (min-width: 720px) {
  .ghosts-filters {
    grid-template-columns: minmax(7rem, 0.9fr) minmax(9rem, 1.05fr) minmax(11rem, 1.4fr) auto;
  }
}

.ghost-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}
.ghost-row {
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.ghost-row > a {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  color: inherit;
  text-decoration: none !important;
}
.ghost-row-photo .ac-photo,
.ghost-row-photo .silhouette {
  height: 3.35rem;
  border-radius: 0.55rem;
  margin: 0;
}
.ghost-row-photo .ac-photo-credit {
  display: none;
}
.ghost-row-photo .silhouette::after {
  inset: 32% 10% 38%;
}
.ghost-row-body {
  min-width: 0;
}
.ghost-row-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.45rem;
  align-items: center;
}
.ghost-row-top strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.2;
}
.ghost-row .missed-label {
  margin-left: 0;
}
.ghost-row .ac-make-model {
  margin: 0.15rem 0 0.1rem;
  font-size: 0.88rem;
}
.ghost-row .sub {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
}
.ghost-row .badge {
  margin-left: auto;
}
@media (min-width: 560px) {
  .ghost-row > a {
    grid-template-columns: 5rem minmax(0, 1fr);
    padding: 0.6rem 0.8rem;
  }
  .ghost-row-photo .ac-photo,
  .ghost-row-photo .silhouette {
    height: 3.75rem;
  }
}
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 0.85rem;
  margin: 1.25rem 0 1.5rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.9rem;
  background: rgba(8, 18, 36, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.pager-status {
  font-size: 0.88rem;
  color: var(--mist);
}
.btn.is-disabled,
.btn[aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}
.where-pill {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
}
.location-status { margin-bottom: 0.75rem; }

/* legacy sky-status outside sky-toolbar */
.sky-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: baseline;
}
.sky-toolbar .sky-status {
  margin: 0;
  font-size: 0.8rem;
}
.sky-status-sep { opacity: 0.45; }

.missed-label {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.15rem 0.45rem;
  border: 1px solid rgba(255,255,255,0.35);
  color: #c8d2e0;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.state-pill {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--sky-glow);
}

.encounter-list, .card-grid, .mission-list, .ach-list, .history-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.encounter-top, .mission-top {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
}
.reg { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--text); text-decoration: none !important; }
.encounter-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.55rem;
  color: var(--mist);
  font-size: 0.9rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.75rem;
}
.ac-card a { color: inherit; text-decoration: none !important; display: block; }
.ac-card-body { margin-top: 0.4rem; }
.ac-make-model {
  margin: 0.2rem 0 0.15rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--sky-glow);
  line-height: 1.25;
}
.fav { color: var(--gold); margin-left: 0.25rem; }

.ac-photo {
  position: relative;
  height: 8.5rem;
  border-radius: 0.85rem;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}
.ac-card .ac-photo {
  margin-bottom: 0.15rem;
}
.ac-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ac-photo--large {
  height: 12rem;
  margin-bottom: 0.8rem;
  border-radius: 1rem;
}
.ac-photo--ghost {
  filter: grayscale(1);
  opacity: 0.88;
}
.ac-photo-credit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.25rem 0.45rem;
  font-size: 0.65rem;
  line-height: 1.2;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}
.ac-photo-credit a {
  color: #fff;
  text-decoration: underline;
}

.silhouette {
  height: 3.2rem;
  border-radius: 0.8rem;
  background:
    linear-gradient(180deg, rgba(110,200,255,0.35), rgba(58,160,255,0.08)),
    radial-gradient(ellipse at 50% 70%, rgba(255,255,255,0.2), transparent 60%);
  position: relative;
  overflow: hidden;
}
.silhouette::after {
  content: "";
  position: absolute;
  inset: 35% 12% 40%;
  background: rgba(232,241,255,0.7);
  clip-path: polygon(0 60%, 18% 45%, 40% 50%, 55% 20%, 62% 50%, 88% 42%, 100% 55%, 100% 70%, 0 70%);
}
.silhouette.large { height: 6rem; margin-bottom: 0.8rem; }
.silhouette.ghost { filter: grayscale(1); opacity: 0.7; }

.filters {
  display: grid;
  gap: 0.7rem;
}
.form-stack { display: grid; gap: 0.8rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }

.location-picker {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem 0.95rem;
  border-radius: 1rem;
  border: 1px solid rgba(110, 200, 255, 0.22);
  background: rgba(7, 18, 36, 0.35);
}
.location-picker-label {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
}

.radius-controls {
  display: grid;
  gap: 0.85rem;
  padding: 0.85rem 0.95rem;
  border-radius: 1rem;
  border: 1px solid rgba(110, 200, 255, 0.22);
  background: rgba(7, 18, 36, 0.35);
}
.radius-field { display: grid; gap: 0.35rem; }
.radius-field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.radius-field-head label {
  display: inline;
  margin: 0;
  font-weight: 600;
  color: var(--mist);
  font-size: 0.9rem;
}
.radius-value {
  font-variant-numeric: tabular-nums;
  color: var(--sky-glow);
  font-size: 0.95rem;
}
.radius-controls input[type="range"] {
  width: 100%;
  min-height: 1.5rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  accent-color: var(--sky);
  cursor: pointer;
}
.radius-hint {
  margin: 0;
  color: var(--mist);
  font-size: 0.82rem;
  line-height: 1.4;
  font-weight: 400;
}
.radius-hint--scale { opacity: 0.85; }
.place-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: end;
}
.place-search-field { margin: 0; }
.place-results {
  display: grid;
  gap: 0.35rem;
}
.place-result {
  text-align: left;
  padding: 0.65rem 0.8rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.place-result:hover { border-color: var(--sky-glow); }
.place-chosen {
  margin: 0;
  color: var(--sky-glow);
  font-size: 0.9rem;
}
.place-attribution { opacity: 0.75; font-size: 0.75rem; margin: 0; }
.manual-coords input {
  font-variant-numeric: tabular-nums;
}

label { display: grid; gap: 0.35rem; font-weight: 600; color: var(--mist); font-size: 0.9rem; }
input, select, textarea {
  width: 100%;
  min-height: var(--touch);
  border-radius: 0.9rem;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  padding: 0.65rem 0.8rem;
  font: inherit;
}
.check { display: flex; align-items: center; gap: 0.55rem; font-weight: 600; }
.check input { width: auto; min-height: 1.25rem; }

.progress {
  height: 0.65rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  margin: 0.55rem 0 0.3rem;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--sky), var(--gold));
  border-radius: inherit;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}
.stat { text-align: center; }
.stat strong { display: block; font-family: var(--font-display); font-size: 1.5rem; }

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0;
}
.facts dt { color: var(--mist); font-size: 0.8rem; }
.facts dd { margin: 0.1rem 0 0; font-weight: 700; }

.ach { display: flex; gap: 0.8rem; align-items: center; }
.ach-icon { font-size: 1.5rem; }

.return-banner {
  border: 1px solid rgba(245,197,66,0.35);
  background: rgba(245,197,66,0.1);
  border-radius: 1.1rem;
  padding: 0.9rem 1rem;
  margin-bottom: 0.9rem;
  animation: rise 0.5s ease-out both;
}

.offline-banner {
  background: #3a2030;
  color: #ffd0d8;
  text-align: center;
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
}

.radar {
  position: relative;
  height: 12rem;
  margin-bottom: 1rem;
  overflow: hidden;
  border-radius: 1rem;
  background:
    radial-gradient(circle at 50% 50%, rgba(58,160,255,0.12) 0%, transparent 62%),
    rgba(7, 18, 36, 0.55);
}
.radar--empty {
  /* size controlled by .sky-screen .radar */
}
.radar-grid {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 1px solid rgba(110,200,255,0.12);
  background:
    repeating-radial-gradient(
      circle at 50% 50%,
      transparent 0,
      transparent 11%,
      rgba(110,200,255,0.05) 11.5%,
      transparent 12%
    );
}
.radar-ring {
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(110,200,255,0.25);
  border-radius: 50%;
  animation: radar-pulse 3s ease-out infinite;
}
.radar-ring--2 { inset: 32%; animation-delay: 1s; }
.radar-ring--3 { inset: 8%; animation-delay: 1.8s; opacity: 0.7; }
.radar-cross {
  position: absolute;
  background: rgba(110,200,255,0.14);
  left: 50%;
  top: 50%;
}
.radar-cross--h {
  width: 84%;
  height: 1px;
  transform: translate(-50%, -50%);
}
.radar-cross--v {
  width: 1px;
  height: 84%;
  transform: translate(-50%, -50%);
}
.radar-sweep {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(110, 200, 255, 0.35) 0deg,
    rgba(110, 200, 255, 0.08) 28deg,
    transparent 55deg,
    transparent 360deg
  );
  animation: radar-sweep 3.6s linear infinite;
  mask-image: radial-gradient(circle, #000 68%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle, #000 68%, transparent 70%);
}
.radar-dot {
  position: absolute;
  left: 50%; top: 50%;
  width: 0.55rem; height: 0.55rem;
  margin: -0.275rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
  z-index: 2;
}
.radar-ghost {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.4rem;
  height: 0.4rem;
  margin: -0.2rem;
  border-radius: 50%;
  background: rgba(110, 200, 255, 0.55);
  box-shadow: 0 0 10px rgba(58, 160, 255, 0.45);
  transform:
    rotate(var(--a))
    translate(var(--d))
    rotate(calc(-1 * var(--a)));
  animation: radar-ghost 4.5s ease-in-out infinite;
}
.radar-ghost:nth-child(odd) { animation-delay: 1.2s; }
.radar-ghost:nth-child(3n) { animation-delay: 2.4s; }
.empty-sky {
  display: none;
}
.empty-sky-title {
  display: none;
}
.blip {
  position: absolute;
  width: 0.55rem; height: 0.55rem;
  margin: -0.275rem;
  border-radius: 50%;
  background: var(--sky-glow);
  box-shadow: 0 0 8px var(--sky);
  z-index: 2;
}
.blip.state-claimable { background: var(--gold); width: 0.7rem; height: 0.7rem; }
.blip.state-missed { background: #9aa8bc; }

.onboarding-hero { display: block; margin-top: 1rem; }
.login-hero,
.onboarding-hero {
  text-align: center;
}
.login-hero .brand-logo,
.onboarding-hero .brand-logo {
  margin-left: auto;
  margin-right: auto;
}
.login-hero h1,
.onboarding-hero h1,
.login-hero .lede,
.onboarding-hero .lede {
  text-align: center;
}

.login-panel {
  max-width: 26rem;
  margin: 0 auto;
  text-align: center;
  padding: 1.5rem;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 3.25rem;
  border-radius: 999px;
  background: #fff;
  color: #1f1f1f !important;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.btn-google:hover { filter: brightness(0.97); }

.google-g {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: #fff;
  color: #4285f4;
  font-family: var(--font-display);
  font-weight: 800;
  border: 1px solid #dadce0;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--mist);
  font-size: 0.85rem;
}
.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.15);
}
.guest-banner .btn { margin: 0.35rem 0.35rem 0 0; }


.mono-box {
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  word-break: break-all;
  background: rgba(0,0,0,0.25);
  padding: 0.75rem;
  border-radius: 0.75rem;
  text-align: left;
}

.profile-avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  object-fit: cover;
  border: 2px solid rgba(110,200,255,0.35);
  flex-shrink: 0;
}


@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes pulse-claim {
  0%, 100% { box-shadow: 0 8px 24px rgba(245, 197, 66, 0.22); }
  50% { box-shadow: 0 10px 30px rgba(245, 197, 66, 0.4); }
}
@keyframes radar-pulse {
  0% { transform: scale(0.92); opacity: 0.8; }
  100% { transform: scale(1.08); opacity: 0; }
}

@keyframes radar-sweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes radar-ghost {
  0%, 100% { opacity: 0.15; }
  40% { opacity: 0.7; }
  70% { opacity: 0.25; }
}

@media (min-width: 700px) {
  .main--sky {
    padding: 0.85rem 1.25rem 0;
  }
  .sky-screen {
    gap: 0.55rem;
  }
  .sky-top h1 {
    font-size: 1.85rem;
  }
  .sky-geo,
  .sky-guest {
    font-size: 0.92rem;
  }
  .sky-filter .chip {
    padding: 0.4rem 0.9rem;
    font-size: 0.9rem;
  }
  .sky-status {
    font-size: 0.9rem;
  }
  .sky-screen .sky-map-wrap {
    width: min(100%, 38rem);
    height: min(100%, 32rem);
  }
  .sky-screen--empty .sky-map-wrap {
    width: min(92%, 40rem);
    height: min(74vmin, 34rem);
  }
  .radar-caption {
    font-size: 1.15rem;
  }
  .sky-encounters {
    flex-basis: 42%;
    max-height: 42%;
  }
}

/* Tablet landscape / desktop: radar + list side by side */
@media (min-width: 860px) {
  .side-nav { display: flex; }
  .bottom-nav { display: none; }
  .main:not(.main--sky) { padding: 1.5rem 2rem; }
  .main-col:has(.admin-bar) .main--sky {
    max-height: calc(100dvh - 2rem);
  }
  .main-col:not(:has(.admin-bar)) .main--sky,
  .main--sky {
    max-height: 100dvh;
  }
  .main--sky {
    padding: 1.1rem 1.75rem 1.25rem;
  }
  .sky-screen {
    gap: 0.75rem;
  }
  .sky-top h1 {
    font-size: 2.1rem;
  }
  .sky-toolbar {
    margin-bottom: 0.15rem;
  }
  .sky-screen:not(.sky-screen--empty) {
    display: grid;
    grid-template-columns: minmax(18rem, 1.05fr) minmax(16rem, 0.95fr);
    grid-template-rows: auto auto auto minmax(0, 1fr);
    column-gap: 1.25rem;
    row-gap: 0.55rem;
    align-items: stretch;
  }
  .sky-screen:not(.sky-screen--empty) > .sky-top,
  .sky-screen:not(.sky-screen--empty) > .sky-away,
  .sky-screen:not(.sky-screen--empty) > .sky-toolbar {
    grid-column: 1 / -1;
  }
  .sky-screen:not(.sky-screen--empty) > .sky-stage {
    grid-column: 1;
    grid-row: 4;
    align-self: stretch;
  }
  .sky-screen:not(.sky-screen--empty) > .sky-encounters {
    grid-column: 2;
    grid-row: 4;
    max-height: none;
    flex: none;
    height: 100%;
    align-self: stretch;
    padding-bottom: 0.25rem;
  }
  .sky-screen .sky-map-wrap {
    width: 100%;
    height: 100%;
    max-height: none;
    min-height: 18rem;
  }
  .sky-screen:not(.sky-screen--empty) > .sky-stage:has(.sky-map-wrap) {
    align-items: stretch;
    justify-content: stretch;
  }
  .sky-screen--empty .sky-map-wrap {
    width: min(92%, 40rem);
    height: min(70vmin, 36rem);
  }
  .sky-encounters .encounter {
    padding: 0.85rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Content pages */
.main--content {
  padding-bottom: 5.5rem;
}
.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: center;
  padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom));
  margin-bottom: 3.75rem;
  border-top: 1px solid color-mix(in srgb, var(--line, #1e3a5f) 70%, transparent);
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.9rem;
}
.side-nav-meta {
  margin-top: auto;
  display: grid;
  gap: 0.45rem;
  padding: 1rem 0.85rem 0.25rem;
  font-size: 0.82rem;
}
.side-nav-meta a {
  color: color-mix(in srgb, var(--mist, #9eb6d4) 85%, white);
  text-decoration: none;
}
.side-nav-meta a:hover {
  color: var(--sky, #5ec8f2);
}
.site-footer a {
  color: color-mix(in srgb, var(--mist, #9eb6d4) 90%, white);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--sky, #5ec8f2);
  text-decoration: underline;
}
@media (min-width: 860px) {
  .site-footer {
    margin-bottom: 0;
    justify-content: flex-start;
    padding-left: 2rem;
  }
}

.story-page {
  max-width: 40rem;
}
.story-hero .brand-logo {
  margin: 0.35rem 0 0.75rem;
}
.brand-wordmark--inline {
  font-size: 1em;
  font-weight: 800;
}
.story-block {
  margin-bottom: 1rem;
}
.story-block h2 {
  margin: 0 0 0.55rem;
  font-size: 1.25rem;
}
.story-block p {
  margin: 0 0 0.75rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--ink, #e8f1fb) 92%, transparent);
}
.story-block p:last-child {
  margin-bottom: 0;
}
.story-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.25rem 0 0.5rem;
}

.how-steps {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.how-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  margin: 0;
}
.how-step h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}
.how-step p {
  margin: 0;
  line-height: 1.5;
}
.how-num {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  background: color-mix(in srgb, var(--sky, #5ec8f2) 22%, transparent);
  color: var(--sky, #5ec8f2);
  font-family: Outfit, sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
}
.plain-list {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
  line-height: 1.55;
}
.plain-list li + li {
  margin-top: 0.4rem;
}

.faq-list {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}
.faq-item {
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 0.95rem 1.05rem;
  font-family: Outfit, sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--sky, #5ec8f2);
  font-weight: 800;
}
.faq-item[open] summary::after {
  content: "–";
}
.faq-item p {
  margin: 0;
  padding: 0 1.05rem 1rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--ink, #e8f1fb) 90%, transparent);
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* Profile page */
.profile {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 0;
}
.profile__hero {
  margin: 0;
  flex: 0 0 auto;
}
.profile__hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.profile__hero h1 {
  margin: 0.1rem 0 0.25rem;
  font-size: clamp(1.45rem, 5vw, 1.95rem);
}
.profile__settings-btn {
  appearance: none;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
  padding: 0;
  border-radius: 0.75rem;
  border: 1px solid color-mix(in srgb, #1e3a5f 80%, transparent);
  background: var(--panel);
  color: var(--mist);
  cursor: pointer;
}
.profile__settings-btn:hover,
.profile__settings-btn:focus-visible {
  color: var(--sky-glow);
  border-color: color-mix(in srgb, var(--rail) 50%, #1e3a5f);
  outline: none;
}
.profile__settings-btn svg {
  display: block;
}
.profile__meta {
  margin: 0;
  color: var(--mist);
  font-size: 0.85rem;
}
.progress--profile {
  margin: 0.5rem 0 0.25rem;
  max-width: 22rem;
  height: 0.45rem;
}
.profile__xp-hint {
  margin: 0;
  color: var(--mist);
  font-size: 0.72rem;
}
.profile__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  flex: 0 0 auto;
}
.profile__stat {
  text-align: center;
  padding: 0.55rem 0.25rem;
  border-radius: 0.7rem;
  background: var(--panel);
  border: 1px solid color-mix(in srgb, #1e3a5f 80%, transparent);
}
.profile__stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.1;
  color: var(--sky-glow);
}
.profile__stat span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mist);
}
.profile__badges-wrap {
  flex: 0 0 auto;
  margin: 0;
  min-width: 0;
}
.profile__badges-empty {
  margin: 0;
  padding: 0.35rem 0.15rem;
  color: var(--mist);
  font-size: 0.82rem;
}
.profile__badge-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0.1rem 0 0.15rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.profile__badge-scroll--overflow {
  mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 1.4rem), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 1.4rem), transparent 100%);
}
.profile__badge-scroll::-webkit-scrollbar {
  display: none;
}
.profile__badge {
  appearance: none;
  flex: 0 0 auto;
  width: 2.65rem;
  height: 2.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 0.65rem;
  border: 1px solid color-mix(in srgb, var(--rail) 40%, #1e3a5f);
  background: color-mix(in srgb, var(--panel) 92%, #000);
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}
.profile__badge:hover,
.profile__badge:focus-visible {
  border-color: var(--rail-glow);
  outline: none;
  text-decoration: none;
}
.profile__badge-icon {
  font-size: 1.2rem;
  line-height: 1;
}
.profile__hub {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  flex: 1 1 auto;
  min-height: 0;
  align-content: stretch;
}
.profile__hub-tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  min-height: 0;
  padding: 0.7rem 0.75rem;
  border-radius: 0.8rem;
  border: 1px solid color-mix(in srgb, var(--rail) 35%, #1e3a5f);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--rail) 12%, transparent), transparent 55%),
    var(--panel);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.profile__hub-tile:hover,
.profile__hub-tile:focus-visible {
  text-decoration: none;
  border-color: color-mix(in srgb, var(--rail-glow) 70%, #1e3a5f);
  transform: translateY(-1px);
}
.profile__hub-tile strong {
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: var(--text);
}
.profile__hub-tile span {
  color: var(--mist);
  font-size: 0.72rem;
}
.profile-badge-modal__sheet {
  max-width: 22rem;
}
.profile-badge-modal__icon {
  margin: 0 0 0.65rem;
  font-size: 2.4rem;
  line-height: 1;
  text-align: center;
}
.profile-badge-modal__when {
  margin: 0.75rem 0 0;
  font-weight: 700;
  color: var(--sky-glow);
}
.profile__card h2 {
  margin: 0;
}
.profile__picked {
  margin: 0.35rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 0.55rem;
  border: 1px solid color-mix(in srgb, #1e3a5f 70%, transparent);
  background: color-mix(in srgb, var(--panel) 90%, transparent);
}
.profile__inline-actions {
  margin: 0.45rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.profile__station-hits {
  margin-top: 0.65rem;
}
.profile__prefs .form-row {
  align-items: end;
}
.profile__settings-block {
  margin: 0 0 1.25rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid color-mix(in srgb, #1e3a5f 70%, transparent);
}
.profile__settings-block:last-of-type {
  border-bottom: 0;
  margin-bottom: 0.5rem;
  padding-bottom: 0;
}
.profile__settings-block h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
}
.profile-settings-modal__sheet {
  max-width: 26rem;
  max-height: min(88vh, 40rem);
}
.profile__signout {
  margin: 0.85rem 0 0;
}

/* Activity feed */
.activity-filters {
  margin: 0 0 0.85rem;
}
.activity-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.activity-item {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.85rem 0.9rem;
  border-radius: 0.9rem;
  background: var(--panel);
  border: 1px solid color-mix(in srgb, #1e3a5f 75%, transparent);
}
.activity-item__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--navy-deep);
  background: linear-gradient(145deg, var(--rail-glow), var(--rail));
}
.activity-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.activity-type {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.activity-type--sighting {
  color: var(--sky-glow);
  border-color: color-mix(in srgb, var(--rail) 45%, transparent);
  background: color-mix(in srgb, var(--rail) 14%, transparent);
}
.activity-type--photo {
  color: #9fd0ff;
  border-color: color-mix(in srgb, #6eb6ff 45%, transparent);
  background: color-mix(in srgb, #6eb6ff 12%, transparent);
}
.activity-type--station {
  color: var(--signal-green);
  border-color: color-mix(in srgb, var(--signal-green) 40%, transparent);
  background: color-mix(in srgb, var(--signal-green) 12%, transparent);
}
.activity-type--other {
  color: var(--mist);
  border-color: color-mix(in srgb, #1e3a5f 80%, transparent);
}
.activity-item__when {
  color: var(--mist);
  font-size: 0.75rem;
  white-space: nowrap;
}
.activity-item__who {
  margin: 0 0 0.2rem;
  font-size: 0.92rem;
}
.activity-item__summary {
  margin: 0;
  color: color-mix(in srgb, var(--text) 88%, var(--mist));
  font-size: 0.92rem;
  line-height: 1.35;
}
.activity-item__link {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
  font-weight: 700;
}
.activity-item__link a {
  text-decoration: none;
}
.activity-item__link a:hover {
  text-decoration: underline;
}
.activity-item__photo {
  margin: 0.65rem 0 0;
  border-radius: 0.65rem;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, #1e3a5f 70%, transparent);
  background: rgba(0, 0, 0, 0.25);
}
.activity-item__photo img {
  display: block;
  width: 100%;
  max-height: 14rem;
  object-fit: cover;
}
.activity-item__photo figcaption {
  padding: 0.4rem 0.55rem;
  font-size: 0.7rem;
  color: var(--mist);
}

@media (max-width: 420px) {
  .profile__stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 700px) {
  .profile__hub {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Profile viewport lock moved below — see body[data-page="profile"] near home lock */

.push-status {
  margin: 0.55rem 0 0.75rem;
}
.push-status--ok {
  color: color-mix(in srgb, #6fd3a0 80%, white);
}
.alert-toggle-list {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.alert-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-top: 1px solid color-mix(in srgb, var(--line, #1e3a5f) 70%, transparent);
}
.alert-toggle-row:first-child {
  border-top: 0;
  padding-top: 0.15rem;
}
.alert-toggle-copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}
.alert-toggle-copy strong {
  font-size: 1.02rem;
}
.alert-toggle-copy span {
  color: color-mix(in srgb, var(--muted, #94a3b8) 92%, white);
  font-size: 0.9rem;
  line-height: 1.35;
}
.alert-toggle-row .btn {
  flex-shrink: 0;
  min-width: 5.75rem;
}
.alert-toggle-row .btn.is-on {
  background: transparent;
  border-color: color-mix(in srgb, var(--line, #1e3a5f) 80%, white);
  color: inherit;
}
.alert-test-row {
  margin-top: 0.85rem;
}
.alert-option-block {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid color-mix(in srgb, var(--line, #1e3a5f) 70%, transparent);
}
.alert-option-block h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}
.skydex-alert-host {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  top: calc(0.75rem + env(safe-area-inset-top));
  z-index: 8500;
  display: grid;
  gap: 0.55rem;
  pointer-events: none;
}
.skydex-alert-banner {
  pointer-events: auto;
  display: grid;
  gap: 0.45rem;
  padding: 0.95rem 1rem;
  border-radius: 0.85rem;
  background: #12365a;
  border: 2px solid var(--sky, #5ec8f2);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  color: #e8f1fb;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.skydex-alert-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.skydex-alert-banner-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: center;
}
.skydex-alert-plane {
  width: 56px;
  height: 56px;
  border-radius: 0.65rem;
  object-fit: cover;
  background: #0b1b33;
}
.skydex-alert-banner strong {
  display: block;
  font-family: Outfit, sans-serif;
  font-size: 1.15rem;
}
.skydex-alert-banner span {
  display: block;
  margin-top: 0.2rem;
  line-height: 1.35;
}

.skydex-alert-banner .btn {
  justify-self: start;
}
@media (min-width: 860px) {
  .skydex-alert-host {
    left: auto;
    right: 1.25rem;
    width: min(24rem, calc(100vw - 2rem));
  }
}


.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin: 0 0 0.55rem;
  font-size: 0.85rem;
  color: var(--mist, #9eb6d4);
}
.breadcrumb a {
  color: inherit;
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--sky, #5ec8f2);
  text-decoration: underline;
}
.aircraft-seo-type {
  margin: 0.15rem 0 0.35rem;
  font-family: Outfit, sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: color-mix(in srgb, var(--sky, #5ec8f2) 85%, white);
}
.aircraft-seo-h2 {
  margin: 1rem 0 0.65rem;
  font-size: 1.1rem;
}
.aircraft-seo-intro p,
.aircraft-seo-about p {
  margin: 0 0 0.75rem;
  line-height: 1.55;
}
.aircraft-seo-about p:last-child {
  margin-bottom: 0;
}

.admin-user-list {
  display: grid;
  gap: 1rem;
}
.admin-user-card h2 {
  margin: 0 0 0.2rem;
  font-size: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.admin-user-top {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}
.admin-user-identity {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.admin-user-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}
.admin-user-stats .stat {
  margin: 0;
  text-align: center;
  padding: 0.55rem 0.35rem;
}
#opensky-limits .admin-user-stats,
.admin-tracking-stats {
  margin: 0.35rem 0 0.85rem;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
}
#opensky-limits .admin-user-stats .stat strong,
.admin-tracking-stats .stat strong {
  display: block;
  font-size: 1.1rem;
  line-height: 1.2;
}
#opensky-limits .admin-user-stats .stat span,
.admin-tracking-stats .stat span {
  display: block;
  font-size: 0.78rem;
  opacity: 0.75;
}
.admin-tracking-stats {
  margin: 0;
}
.admin-tracking-stats .stat--warn strong {
  color: var(--danger);
}
.admin-tracking-stats .stat--live strong {
  color: var(--sky-glow, #5ec8f2);
}
#admin-tracking-status > .meta,
#admin-tracking-status > .error {
  margin: 0.55rem 0 0;
}
#opensky-limits input[readonly] {
  opacity: 0.7;
}
.admin-user-dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.55rem 1rem;
  margin: 0 0 0.9rem;
}
.admin-user-dl > div {
  margin: 0;
}
.admin-user-dl dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mist, #9eb6d4);
}
.admin-user-dl dd {
  margin: 0.15rem 0 0;
}
.admin-user-dl .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  word-break: break-all;
}
.admin-user-locations h3 {
  margin: 0.65rem 0 0.3rem;
  font-size: 0.95rem;
}
@media (min-width: 860px) {
  .admin-user-top {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
  .admin-user-stats {
    min-width: 18rem;
  }
}

/* Guided tour */
.tour-root {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
}
.tour-backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: auto;
}
.tour-hole {
  position: fixed;
  border-radius: 0.85rem;
  box-shadow: 0 0 0 9999px rgba(4, 12, 24, 0.72);
  outline: 2px solid color-mix(in srgb, var(--sky, #5ec8f2) 75%, white);
  pointer-events: none;
  transition: top 0.2s ease, left 0.2s ease, width 0.2s ease, height 0.2s ease;
  z-index: 1;
}
.tour-card {
  position: fixed;
  z-index: 2;
  width: min(22rem, calc(100vw - 1.5rem));
  padding: 1rem 1.1rem 1.05rem;
  border-radius: 0.9rem;
  background: #10243f;
  border: 1px solid color-mix(in srgb, var(--sky, #5ec8f2) 35%, #1e3a5f);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  color: var(--ink, #e8f1fb);
}
.tour-progress {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mist, #9eb6d4);
}
.tour-card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}
.tour-body {
  margin: 0 0 0.9rem;
  line-height: 1.45;
  color: color-mix(in srgb, var(--ink, #e8f1fb) 92%, transparent);
}
.tour-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
.tour-target {
  position: relative;
  z-index: 1;
}
body.tour-active {
  overflow: hidden;
}
@media (prefers-reduced-motion: reduce) {
  .tour-hole {
    transition: none;
  }
}


/* Claim celebration */
.claim-celebrate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.25rem 1rem calc(1.25rem + var(--safe-bottom));
  background:
    radial-gradient(ellipse 90% 60% at 50% 15%, rgba(58, 160, 255, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 50% at 80% 80%, rgba(245, 197, 66, 0.12), transparent 50%),
    rgba(4, 12, 28, 0.82);
  opacity: 0;
  transition: opacity 0.28s ease;
}
.claim-celebrate.is-in { opacity: 1; }
.claim-celebrate.is-out { opacity: 0; }
.claim-celebrate-sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.claim-celebrate-plane {
  position: absolute;
  top: var(--top, 40%);
  left: -20%;
  width: clamp(3.2rem, 12vw, 5.5rem);
  color: rgba(232, 241, 255, 0.78);
  transform: translate3d(0, 0, 0) scale(var(--scale, 1));
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
  animation: claim-plane-fly var(--duration, 3s) linear var(--delay, 0s) both;
}
.claim-celebrate-plane:nth-child(3n) { color: rgba(110, 200, 255, 0.85); }
.claim-celebrate-plane:nth-child(4n) { color: rgba(245, 197, 66, 0.8); }
.claim-celebrate-plane svg {
  display: block;
  width: 100%;
  height: auto;
  transform: scaleX(-1);
}
.claim-celebrate-card {
  position: relative;
  z-index: 1;
  width: min(100%, 24rem);
  padding: 1.35rem 1.25rem 1.2rem;
  border-radius: 1.25rem;
  background: rgba(12, 28, 52, 0.94);
  border: 1px solid rgba(110, 200, 255, 0.35);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
  text-align: center;
  transform: translateY(1rem) scale(0.96);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.claim-celebrate.is-in .claim-celebrate-card {
  transform: none;
  opacity: 1;
}
.claim-celebrate-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mist);
}
.claim-celebrate-card h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 6vw, 2.2rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--gold);
}
.claim-celebrate-aircraft {
  display: grid;
  gap: 0.15rem;
  margin: 0 0 0.85rem;
}
.claim-celebrate-aircraft strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
}
.claim-celebrate-aircraft span {
  color: var(--mist);
  font-size: 0.92rem;
}
.claim-celebrate-rarity {
  justify-self: center;
  margin-top: 0.25rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(58, 160, 255, 0.2);
  color: var(--sky-glow);
  font-size: 0.75rem;
  font-weight: 700;
}
.claim-celebrate-msg {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  line-height: 1.35;
}
.claim-celebrate-bits {
  margin: 0 0 1rem;
  color: var(--mist);
  font-size: 0.9rem;
}
.claim-celebrate-card .btn {
  width: 100%;
}
@keyframes claim-plane-fly {
  0% {
    transform: translate3d(0, 0, 0) scale(var(--scale, 1));
    opacity: 0;
  }
  8% { opacity: 1; }
  100% {
    transform: translate3d(130vw, var(--drift, 0), 0) scale(var(--scale, 1));
    opacity: 0.15;
  }
}

/* Receiver setup / dashboard */
.receiver-benefits {
  margin: 0.75rem 0 1rem;
  padding-left: 1.2rem;
}
.receiver-benefits li {
  margin: 0.35rem 0;
}
.receiver-dash-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}
.receiver-dash-head h3 {
  margin: 0.15rem 0 0;
}
.receiver-stats {
  margin: 1rem 0;
}
.receiver-actions {
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}
#receiver-status.error {
  color: #ff8f8f;
  font-weight: 600;
}
.receiver-advanced {
  margin-top: 1rem;
}
.receiver-advanced summary {
  cursor: pointer;
  color: var(--mist);
}
.receiver-wizard-step {
  opacity: 0.45;
  margin: 0.75rem 0;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.receiver-wizard-step.is-active,
.receiver-wizard-step.is-done {
  opacity: 1;
}
.receiver-setup-code {
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin: 0.5rem 0;
}
.receiver-code-block {
  overflow-x: auto;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
}

/* —— MyRailDex railway accents —— */
.departure-board {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.board-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: 0.04em;
  color: var(--rail-glow);
}
.board-meta {
  color: var(--mist);
  font-size: 0.95rem;
}
.signal-green { color: var(--signal-green); }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.9rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}
label.check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
}
.empty-state {
  color: var(--mist);
  margin: 0.4rem 0;
}
.dashboard-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 1rem;
}
.track-train {
  position: absolute;
  right: -2rem;
  bottom: 0.4rem;
  opacity: 0.35;
  pointer-events: none;
}
.track-train__car {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  color: var(--rail-glow);
  animation: train-pass 12s linear infinite;
}
@keyframes train-pass {
  0% { transform: translateX(0); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateX(-18rem); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .track-train__car { animation: none; }
}
.ac-card--seen {
  outline: 1px solid rgba(61, 207, 122, 0.35);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.45rem; }
.confirm-panel .departure-board { margin-bottom: 0.8rem; }
.brand-wordmark--hero { font-size: clamp(1.8rem, 5vw, 2.6rem); display: inline-block; margin-bottom: 0.6rem; }

/* —— Home stage (replaces card-stack dashboard) —— */
body[data-page="home"] .main {
  padding-top: 0.75rem;
}

.home-stage {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 1.15rem;
  margin: 0 0 1.1rem;
  padding: 1.35rem 1.15rem 1.35rem;
  border: 1px solid rgba(240, 193, 77, 0.18);
  border-radius: 1.4rem;
  background:
    linear-gradient(160deg, rgba(232, 163, 23, 0.12) 0%, transparent 42%),
    linear-gradient(180deg, rgba(18, 38, 68, 0.95) 0%, rgba(8, 18, 34, 0.92) 100%);
}
.home-stage__copy,
.home-stage__rail {
  position: relative;
  z-index: 1;
  min-width: 0;
}
.home-stage__glow {
  position: absolute;
  inset: -20% 40% auto -10%;
  height: 12rem;
  background: radial-gradient(circle, rgba(232, 163, 23, 0.22), transparent 70%);
  pointer-events: none;
}
.home-stage__tracks {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.2rem;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 18px,
      rgba(255,255,255,0.06) 18px 20px
    ),
    linear-gradient(180deg, transparent, rgba(0,0,0,0.25));
  opacity: 0.7;
  pointer-events: none;
}
.home-kicker {
  margin: 0 0 0.55rem;
  color: var(--rail-glow);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.home-kicker[data-platform="closed"] {
  color: rgba(148, 163, 184, 0.9);
}
.home-brand {
  margin: 0 0 0.55rem;
  line-height: 1;
}
.brand-wordmark--home {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: baseline;
  white-space: nowrap;
  font-size: clamp(2.35rem, 8vw, 3.6rem);
  letter-spacing: -0.03em;
}
.home-hello {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}
.home-lede {
  margin: 0;
  max-width: 36rem;
  color: var(--mist);
  line-height: 1.45;
}
.home-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.1rem;
}
.btn-home {
  min-height: 3rem;
  padding: 0.75rem 1.25rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.home-meter {
  margin: 0;
  max-width: none;
}
.home-meter__top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--mist);
  font-size: 0.82rem;
  font-weight: 600;
}
.progress--home {
  height: 0.85rem;
  margin-top: 0.4rem;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.08);
}
.progress--home .progress-bar {
  background: linear-gradient(90deg, #c8890f, var(--rail-glow));
  box-shadow: 0 0 12px rgba(232, 163, 23, 0.35);
}
.home-guest-meta {
  margin: 1rem 0 0;
  color: var(--mist);
  font-size: 0.9rem;
}

.home-stage__rail {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.home-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0;
  padding: 0.85rem 0.35rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.home-strip__item {
  text-align: center;
  min-width: 0;
}
.home-strip__item strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 3.4vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.home-strip__item span {
  display: block;
  margin-top: 0.2rem;
  color: var(--mist);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (min-width: 860px) {
  .home-stage {
    grid-template-columns: minmax(0, 1.35fr) minmax(16rem, 0.9fr);
    align-items: stretch;
    gap: 1.75rem 2rem;
    padding: 1.75rem 1.75rem 1.85rem;
  }
  .home-stage__rail {
    justify-content: center;
    padding: 1.1rem 1.15rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 1.1rem;
    background: rgba(5, 12, 24, 0.45);
    backdrop-filter: blur(4px);
  }
  .home-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 0.75rem;
    padding: 0.95rem 0 0;
  }
  .home-strip__item {
    text-align: left;
    padding: 0.35rem 0.15rem;
  }
  .home-strip__item strong {
    font-size: 1.7rem;
  }
  .home-lede {
    max-width: 28rem;
  }
  .home-stage--guest {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1100px) {
  .home-stage {
    grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.85fr);
    padding: 2rem 2.1rem 2.1rem;
  }
  .brand-wordmark--home {
    font-size: clamp(2.8rem, 4.5vw, 3.8rem);
  }
}

.board {
  margin: 0 0 1.25rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1rem;
  background: #07101d;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.board__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.9rem;
  background: rgba(232, 163, 23, 0.1);
  border-bottom: 1px solid rgba(232, 163, 23, 0.2);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.board__live { color: var(--rail-glow); }
.board__clock { color: var(--mist); font-variant-numeric: tabular-nums; }
.board__row {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.board__row:last-child { border-bottom: 0; }
.board__row--quiet { opacity: 0.92; }
.board__code {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--rail-glow);
}
.board__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
}
a.board__title:hover { color: var(--rail-glow); text-decoration: none; }
.board__title--muted { color: var(--mist); font-weight: 700; }
.board__title--small { font-size: 0.95rem; }
.board__sub {
  margin: 0.2rem 0 0;
  color: var(--mist);
  font-size: 0.88rem;
  line-height: 1.35;
}
.board__status {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mist);
  text-align: right;
  white-space: nowrap;
}
.board__status--ok { color: var(--signal-green); }
.board__status a {
  color: var(--rail-glow);
  text-decoration: none;
}
.board__status a:hover { text-decoration: underline; }

.home-section { margin: 0 0 1.4rem; }
.home-section__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}
.home-section__head h2 {
  margin: 0;
  font-size: 1.05rem;
}
.home-section__head a {
  color: var(--rail-glow);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}
.need-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(10, 22, 40, 0.72);
}
.need-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.need-list li:last-child { border-bottom: 0; }
.need-list a {
  text-decoration: none;
  color: inherit;
}
.need-list__num {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.02em;
}
.need-list__meta {
  display: block;
  margin-top: 0.15rem;
  color: var(--mist);
  font-size: 0.86rem;
}
.need-list__spot {
  flex: 0 0 auto;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(232, 163, 23, 0.35);
  color: var(--rail-glow) !important;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.need-list__spot:hover {
  background: rgba(232, 163, 23, 0.12);
  text-decoration: none !important;
}
.need-list--plain li { display: block; }

/* ---- Shed / collection dashboard ---- */
body[data-page="collection"] .collection-hero {
  margin-bottom: 0.8rem;
}
body[data-page="collection"] .collection-hero h1 {
  margin: 0.12rem 0 0.2rem;
}
body[data-page="collection"] .collection-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0 0 0.75rem;
}
body[data-page="collection"] .collection-stats .stat {
  min-width: 0;
  margin: 0;
  padding: 0.8rem 0.35rem;
  border-radius: 0.9rem;
  background: linear-gradient(160deg, rgba(25, 57, 94, 0.9), rgba(10, 25, 46, 0.9));
}
body[data-page="collection"] .collection-stats .stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 6vw, 1.8rem);
  font-weight: 800;
  line-height: 1;
  color: var(--rail-glow);
}
body[data-page="collection"] .collection-stats .stat-label {
  margin-top: 0.3rem;
  color: var(--mist);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
body[data-page="collection"] .collection-filters {
  display: flex;
  gap: 0.4rem;
  margin: 0 -0.1rem 0.9rem;
  padding: 0.1rem 0.1rem 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
body[data-page="collection"] .collection-filters::-webkit-scrollbar { display: none; }
body[data-page="collection"] .collection-filters .chip {
  flex: 0 0 auto;
  min-height: 2.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
}
body[data-page="collection"] .collection-filters .chip.is-active {
  color: #111827;
  border-color: var(--rail);
  background: var(--rail-glow);
}
body[data-page="collection"] .collection-suggestions {
  margin-top: 0.2rem;
}
body[data-page="collection"] .collection-suggestions .home-section__head {
  margin-bottom: 0.45rem;
}
body[data-page="collection"] .collection-suggestions .need-list {
  border-radius: 0.85rem;
}
body[data-page="collection"] .collection-suggestions .need-list li {
  min-height: 4.2rem;
  padding: 0.65rem 0.75rem;
}
body[data-page="collection"] .collection-suggestions .need-list__spot {
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 0.6rem;
  background: rgba(232, 163, 23, 0.1);
}

@media (max-width: 859px) {
  body[data-page="collection"] .main {
    padding: 0.65rem 0.75rem calc(5.6rem + var(--safe-bottom));
  }
  body[data-page="collection"] .collection-hero .eyebrow {
    font-size: 0.65rem;
  }
  body[data-page="collection"] .collection-hero h1 {
    font-size: 1.75rem;
  }
  body[data-page="collection"] .collection-hero .lede {
    max-width: 30rem;
    font-size: 0.82rem;
    line-height: 1.35;
  }
  body[data-page="collection"] .collection-stats.card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

.side-nav .brand-wordmark {
  display: inline-flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  font-size: 0.95rem;
}
.nav-item.active,
.nav-item.is-active {
  background: rgba(232, 163, 23, 0.16);
  color: var(--rail-glow);
}

@media (max-width: 560px) {
  /* board stacking handled in max-width: 859px block below */
}

@media (prefers-reduced-motion: reduce) {
  .home-stage__glow { display: none; }
}

/* —— Mobile-first fixes (nav + home + forms) —— */
.main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.bottom-nav ul {
  list-style: none;
  margin: 0 auto;
  padding: 0.35rem 0.4rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.15rem;
  max-width: 32rem;
  width: 100%;
}
.bottom-nav li {
  min-width: 0;
}
.bottom-nav .nav-item {
  width: 100%;
  min-height: 3.1rem;
  font-size: 0.62rem;
  padding: 0.3rem 0.1rem;
}
.bottom-nav .nav-icon {
  font-size: 1.2rem;
}

/* Keep content clear of fixed bottom nav */
.main {
  padding: 0.85rem 0.85rem calc(5.6rem + var(--safe-bottom));
}
.main.main--flush {
  padding-bottom: 1.25rem;
}

@media (max-width: 859px) {
  body[data-page="home"] .main {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .home-stage {
    margin: 0 0 0.85rem;
    padding: 1.05rem 0.95rem 1.1rem;
    border-radius: 1.1rem;
  }
  .home-stage__tracks { height: 1.4rem; }
  .brand-wordmark--home {
    font-size: clamp(1.85rem, 9.5vw, 2.45rem);
    letter-spacing: -0.04em;
  }
  .home-hello { font-size: 1.02rem; }
  .home-lede { font-size: 0.95rem; }
  .home-cta {
    flex-direction: column;
    align-items: stretch;
    margin-top: 0.9rem;
  }
  .home-cta .btn {
    width: 100%;
    justify-content: center;
  }
  .home-meter { max-width: none; }

  .home-stage__rail .home-strip,
  .home-strip {
    gap: 0.15rem;
    padding: 0.7rem 0 0;
    margin-bottom: 0;
  }
  .home-strip__item strong {
    font-size: 1.2rem;
  }
  .home-strip__item span {
    font-size: 0.62rem;
    letter-spacing: 0.04em;
  }

  .board__row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "code status"
      "main main";
    gap: 0.25rem 0.6rem;
    padding: 0.8rem 0.8rem;
  }
  .board__code { grid-area: code; }
  .board__status { grid-area: status; align-self: start; }
  .board__main { grid-area: main; }
  .board__title { font-size: 1rem; }
  .board__sub { font-size: 0.84rem; }

  .need-list li {
    padding: 0.75rem 0.8rem;
    gap: 0.5rem;
  }
  .need-list__spot {
    padding: 0.4rem 0.65rem;
  }

  .stats.card-grid,
  .card-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .form-row {
    grid-template-columns: 1fr !important;
  }
  .departure-board .board-number {
    font-size: clamp(1.35rem, 7vw, 1.8rem);
  }

  /* Station: lock to one viewport, no page scroll */
  body[data-page="home"] {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }
  body[data-page="home"] .app-shell,
  body[data-page="home"] .main-col {
    height: 100%;
    min-height: 0;
  }
  body[data-page="home"] .main {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 0.4rem 0.6rem calc(4.25rem + var(--safe-bottom));
  }
  body[data-page="home"] .home-stage {
    flex: 0 0 auto;
    margin: 0;
    padding: 0.5rem 0.65rem 0.55rem;
    gap: 0.35rem;
    border-radius: 0.85rem;
  }
  body[data-page="home"] .home-stage__glow,
  body[data-page="home"] .home-stage__tracks {
    display: none;
  }
  body[data-page="home"] .home-kicker {
    margin: 0 0 0.1rem;
    font-size: 0.58rem;
    letter-spacing: 0.14em;
  }
  body[data-page="home"] .home-brand {
    margin: 0;
  }
  body[data-page="home"] .brand-wordmark--home {
    font-size: clamp(1.2rem, 5.8vw, 1.55rem);
  }
  body[data-page="home"] .home-meter__top {
    font-size: 0.68rem;
  }
  body[data-page="home"] .progress--home {
    height: 0.4rem;
    margin-top: 0.2rem;
  }
  body[data-page="home"] .home-strip {
    padding: 0.35rem 0 0;
    gap: 0.1rem;
  }
  body[data-page="home"] .home-strip__item strong {
    font-size: 0.95rem;
    line-height: 1.05;
  }
  body[data-page="home"] .home-strip__item span {
    font-size: 0.55rem;
  }
  body[data-page="home"] .live-nearby--home {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0.5rem 0.55rem 0.45rem;
    overflow: hidden;
    border-radius: 0.85rem;
  }
  body[data-page="home"] .live-nearby__head {
    flex: 0 0 auto;
    margin-bottom: 0.35rem;
    gap: 0.1rem;
  }
  body[data-page="home"] .live-nearby__head-top {
    gap: 0.3rem 0.4rem;
  }
  body[data-page="home"] .live-nearby__eyebrow {
    font-size: 0.58rem;
  }
  body[data-page="home"] .live-nearby__title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.15;
  }
  body[data-page="home"] .live-nearby__clock {
    font-size: 0.58rem;
    gap: 0.1rem 0.25rem;
    padding: 0;
  }
  body[data-page="home"] .live-nearby__actions .btn-sm {
    min-height: 2rem;
    min-width: 0;
    padding: 0.2rem 0.55rem;
    font-size: 0.72rem;
  }
  body[data-page="home"] .live-nearby__pills {
    flex: 0 0 auto;
    margin: 0 0 0.35rem;
    gap: 0.28rem;
  }
  body[data-page="home"] .live-pill {
    padding: 0.28rem 0.4rem;
    border-radius: 0.45rem;
    font-size: 0.72rem;
    row-gap: 0;
  }
  body[data-page="home"] .live-pill__meta {
    font-size: 0.6rem;
  }
  body[data-page="home"] .live-pill__count {
    font-size: 0.7rem;
  }
  body[data-page="home"] .live-nearby__body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
  }
  body[data-page="home"] .train-crossing {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    margin: 0;
    min-height: 0;
    padding: 0.3rem 0.45rem 0.35rem;
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  body[data-page="home"] .train-crossing__board {
    margin-bottom: 0.2rem;
  }
  body[data-page="home"] .train-crossing__count {
    font-size: clamp(1.45rem, 6.5vw, 1.95rem);
  }
  body[data-page="home"] .train-crossing__label {
    font-size: 0.62rem;
  }
  body[data-page="home"] .train-crossing__scene {
    height: 2.6rem;
    margin: 0;
  }
  body[data-page="home"] .train-crossing__train svg {
    width: clamp(7rem, 34vw, 9rem);
  }
  body[data-page="home"] .train-crossing__hint {
    flex: 0 0 auto;
    margin: 0.25rem 0 0;
    font-size: 0.74rem;
    line-height: 1.25;
  }
  body[data-page="home"] .train-crossing__prefs {
    flex: 0 0 auto;
    display: block;
    margin: 0.2rem 0 0;
    font-size: 0.68rem;
    line-height: 1.2;
  }
  body[data-page="home"] .train-crossing__link {
    flex: 0 0 auto;
    display: block;
    margin: 0.25rem 0 0;
    font-size: 0.72rem;
    line-height: 1.25;
  }
  body[data-page="home"] .bottom-nav {
    padding-top: 0;
  }
  body[data-page="home"] .bottom-nav ul {
    padding: 0.2rem 0.3rem;
  }
  body[data-page="home"] .bottom-nav .nav-item {
    min-height: 2.85rem;
    font-size: 0.58rem;
  }
  body[data-page="home"] .bottom-nav .nav-item--fav {
    margin-top: -0.55rem;
  }
  body[data-page="home"] .bottom-nav .nav-item--fav .nav-icon {
    width: 2.45rem;
    height: 2.45rem;
  }

  /* Profile: one viewport — hero, stats, badge scroller, hub */
  body[data-page="profile"] {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }
  body[data-page="profile"] .app-shell,
  body[data-page="profile"] .main-col {
    height: 100%;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }
  body[data-page="profile"] .main {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    height: auto;
    max-height: calc(100dvh - 4.6rem - var(--safe-bottom));
    min-height: 0;
    overflow: hidden;
    padding: 0.4rem 0.65rem 0.35rem;
    gap: 0;
  }
  body[data-page="profile"] .main > dialog {
    /* keep dialogs out of the flex height calculation when open via top-layer */
    position: fixed;
  }
  body[data-page="profile"] .profile {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    gap: 0.4rem;
    overflow: hidden;
  }
  body[data-page="profile"] .profile__hero h1 {
    font-size: clamp(1.25rem, 5.5vw, 1.65rem);
    margin: 0.05rem 0 0.15rem;
  }
  body[data-page="profile"] .profile__meta {
    font-size: 0.78rem;
  }
  body[data-page="profile"] .progress--profile {
    margin: 0.35rem 0 0.15rem;
    height: 0.38rem;
  }
  body[data-page="profile"] .profile__xp-hint {
    font-size: 0.66rem;
  }
  body[data-page="profile"] .profile__settings-btn {
    width: 2.35rem;
    height: 2.35rem;
  }
  body[data-page="profile"] .profile__stat {
    padding: 0.4rem 0.2rem;
  }
  body[data-page="profile"] .profile__stat strong {
    font-size: 1.05rem;
  }
  body[data-page="profile"] .profile__stat span {
    font-size: 0.55rem;
  }
  body[data-page="profile"] .profile__badge {
    width: 2.4rem;
    height: 2.4rem;
  }
  body[data-page="profile"] .profile__badge-icon {
    font-size: 1.1rem;
  }
  body[data-page="profile"] .profile__hub {
    flex: 1 1 auto;
    min-height: 0;
    gap: 0.35rem;
    grid-auto-rows: minmax(0, 1fr);
  }
  body[data-page="profile"] .profile__hub-tile {
    padding: 0.4rem 0.55rem;
    min-height: 0;
  }
  body[data-page="profile"] .profile__hub-tile strong {
    font-size: 0.88rem;
  }
  body[data-page="profile"] .profile__hub-tile span {
    font-size: 0.62rem;
  }
  body[data-page="profile"] .bottom-nav ul {
    padding: 0.2rem 0.3rem;
  }
  body[data-page="profile"] .bottom-nav .nav-item {
    min-height: 2.85rem;
    font-size: 0.58rem;
  }
}

@media (max-width: 859px) and (max-height: 700px) {
  body[data-page="home"] .home-meter,
  body[data-page="nearby"] .home-meter {
    display: none;
  }
  body[data-page="profile"] .profile__xp-hint {
    display: none;
  }
  body[data-page="home"] .home-strip__item span,
  body[data-page="nearby"] .home-strip__item span {
    display: none;
  }
  body[data-page="home"] .train-crossing__scene {
    height: 2.4rem;
  }
}

@media (max-width: 859px) and (max-height: 620px) {
  body[data-page="home"] .home-strip {
    display: none;
  }
  body[data-page="home"] .live-pill__meta {
    display: none;
  }
}

@media (min-width: 860px) {
  .main {
    padding: 1.5rem 2rem 2rem;
  }
}

/* ---- Live nearby (local spotting) ---- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.live-nearby {
  margin: 0 0 1.5rem;
  padding: 1rem 1.05rem 1.15rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(20, 48, 82, 0.92), rgba(12, 28, 48, 0.88)),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 10px,
      rgba(255, 255, 255, 0.015) 10px,
      rgba(255, 255, 255, 0.015) 11px
    );
}
.live-nearby__head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
  margin-bottom: 0.85rem;
}
.live-nearby__head-top {
  display: flex;
  align-items: center;
  gap: 0.45rem 0.65rem;
  min-width: 0;
}
.live-nearby__eyebrow {
  margin: 0;
  flex: 0 0 auto;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rail-glow, #f0b429);
}
.live-nearby__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foam, #f8fafc);
}
.live-nearby__actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
  flex: 0 0 auto;
  margin-left: auto;
}
.live-nearby__actions [hidden],
[data-live-locate][hidden],
[data-live-refresh][hidden] {
  display: none !important;
}
.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
}
.live-nearby__station {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}
.live-nearby__station strong {
  font-size: 1.05rem;
  color: var(--foam, #f8fafc);
}
.live-nearby__station span {
  color: var(--mist, #94a3b8);
  font-size: 0.88rem;
}
.live-nearby__switch select {
  max-width: 16rem;
  font-size: 0.85rem;
}
.live-nearby__refresh {
  opacity: 0.75;
}
.live-nearby__refresh:hover,
.live-nearby__refresh:focus-visible {
  opacity: 1;
}
.live-nearby__clock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.15rem 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0 0.15rem;
  color: var(--mist, #94a3b8);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  text-align: center;
  line-height: 1.2;
}
.live-nearby__clock[hidden] {
  display: none !important;
}
.live-nearby__clock-sep {
  opacity: 0.55;
}
.live-nearby__prompt,
.live-nearby__empty,
.live-nearby__error {
  margin: 0;
  color: var(--mist, #94a3b8);
  line-height: 1.45;
}
.live-nearby__error { color: #fca5a5; }
.live-nearby__stations {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}
.live-nearby__station-block {
  padding-top: 0.15rem;
}
.live-nearby__station-block + .live-nearby__station-block {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding-top: 1rem;
}
.live-nearby__station-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.7rem;
  margin-bottom: 0.65rem;
}
.live-nearby__station-name {
  font-size: 1.05rem;
  color: var(--foam, #f8fafc);
}
.live-nearby__station-meta {
  color: var(--mist, #94a3b8);
  font-size: 0.88rem;
}
.live-nearby__list-label {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mist, #94a3b8);
}
.live-nearby__list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.live-card {
  display: grid;
  grid-template-columns: 4.6rem 1fr;
  gap: 0.75rem;
  padding: 0.75rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(8, 20, 36, 0.45);
}
.live-card--urgent {
  border-color: rgba(240, 180, 41, 0.55);
  background: linear-gradient(120deg, rgba(240, 180, 41, 0.14), rgba(8, 20, 36, 0.5));
  box-shadow: 0 0 0 1px rgba(240, 180, 41, 0.12);
}
.live-card--needed {
  border-color: rgba(52, 211, 153, 0.45);
}
.live-card--cancelled {
  opacity: 0.72;
  border-style: dashed;
}
.live-card__when {
  text-align: center;
}
.live-card__mins {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--rail-glow, #f0b429);
  line-height: 1.1;
}
.live-card--urgent .live-card__mins {
  font-size: 1.55rem;
  color: #ffe08a;
}
.live-card__status {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.72rem;
  color: var(--mist, #94a3b8);
  line-height: 1.25;
}
.live-card__need-banner {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal-green, #34d399);
  font-weight: 700;
}
.live-card__op {
  margin: 0;
  font-size: 0.8rem;
  color: var(--mist, #94a3b8);
}
.live-card__route {
  margin: 0.15rem 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--foam, #f8fafc);
}
.live-card__times {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin: 0.3rem 0 0.15rem;
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--foam, #f8fafc);
  letter-spacing: 0.01em;
}
.live-card__time {
  white-space: nowrap;
}
.live-card__meta {
  margin: 0.2rem 0 0.45rem;
  font-size: 0.82rem;
  color: var(--mist, #94a3b8);
}
.live-card__alloc-missing {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: var(--mist, #94a3b8);
  font-style: italic;
}
.live-card__units {
  list-style: none;
  margin: 0 0 0.55rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.live-card__units li {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.live-card__thumb {
  border-radius: 6px;
  object-fit: cover;
  background: rgba(255,255,255,0.06);
}
.live-card__class {
  display: block;
  font-size: 0.78rem;
  color: var(--mist, #94a3b8);
}
.live-card__badge {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.live-card__badge--need { color: var(--signal-green, #34d399); }
.live-card__badge--seen { color: var(--mist, #94a3b8); }
.live-card__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.live-card__spot {
  width: 100%;
  margin-top: 0.25rem;
  justify-content: center;
  border-radius: 0.65rem;
}

@media (max-width: 520px) {
  .live-card {
    grid-template-columns: 3.8rem 1fr;
  }
  .live-card__mins { font-size: 1.15rem; }
}

/* ---- Station filter (aligned grid, not pills) ---- */
.live-nearby__pills,
.live-modal__pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0 0 0.9rem;
}
.live-pill {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(8, 20, 36, 0.55);
  color: var(--foam, #f8fafc);
  border-radius: 0.55rem;
  padding: 0.45rem 0.55rem;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 0.4rem;
  row-gap: 0.1rem;
  align-items: center;
  width: 100%;
  min-width: 0;
  text-align: left;
}
.live-pill:hover,
.live-pill:focus-visible {
  border-color: rgba(240, 180, 41, 0.45);
  outline: none;
}
.live-pill--on {
  border-color: rgba(240, 180, 41, 0.7);
  background: rgba(240, 180, 41, 0.14);
  color: #ffe08a;
}
.live-pill__name {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
}
.live-pill__meta {
  color: var(--mist, #94a3b8);
  font-size: 0.68rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  grid-column: 1;
  grid-row: 2;
}
.live-pill--on .live-pill__meta { color: rgba(255, 224, 138, 0.75); }
.live-pill__count {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 0.78rem;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  min-width: 1.25rem;
  text-align: right;
  color: inherit;
  opacity: 0.9;
}
@media (min-width: 520px) {
  .live-nearby__pills,
  .live-modal__pills {
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  }
}

/* ---- Home train crossing (replaces radar) ---- */
.live-nearby--home {
  text-align: center;
  padding: 1.15rem 1rem 1.25rem;
}
.live-nearby--home .live-nearby__head--home {
  text-align: left;
}
.live-nearby--home .live-nearby__pills {
  text-align: left;
}

/* ---- Nearby detail boards ---- */
.live-nearby--detail {
  margin: 0 0 1.5rem;
}

@media (max-width: 859px) {
  body[data-page="nearby"] .main {
    padding: 0.45rem 0.6rem calc(4.25rem + var(--safe-bottom));
  }
  body[data-page="nearby"] .home-stage {
    margin: 0 0 0.4rem;
    padding: 0.5rem 0.65rem 0.55rem;
    gap: 0.35rem;
    border-radius: 0.85rem;
  }
  body[data-page="nearby"] .home-stage__glow,
  body[data-page="nearby"] .home-stage__tracks {
    display: none;
  }
  body[data-page="nearby"] .home-kicker {
    margin: 0 0 0.1rem;
    font-size: 0.58rem;
    letter-spacing: 0.14em;
  }
  body[data-page="nearby"] .home-brand {
    margin: 0;
  }
  body[data-page="nearby"] .brand-wordmark--home {
    font-size: clamp(1.2rem, 5.8vw, 1.55rem);
  }
  body[data-page="nearby"] .home-meter__top {
    font-size: 0.68rem;
  }
  body[data-page="nearby"] .progress--home {
    height: 0.4rem;
    margin-top: 0.2rem;
  }
  body[data-page="nearby"] .home-strip {
    padding: 0.35rem 0 0;
    gap: 0.1rem;
  }
  body[data-page="nearby"] .home-strip__item strong {
    font-size: 0.95rem;
    line-height: 1.05;
  }
  body[data-page="nearby"] .home-strip__item span {
    font-size: 0.55rem;
  }
  body[data-page="nearby"] .live-nearby--detail {
    margin: 0;
    padding: 0.55rem 0.6rem 0.75rem;
    border-radius: 0.85rem;
  }
  body[data-page="nearby"] .live-nearby__head {
    margin-bottom: 0.45rem;
    gap: 0.1rem;
  }
  body[data-page="nearby"] .live-nearby__head-top {
    gap: 0.3rem 0.4rem;
  }
  body[data-page="nearby"] .live-nearby__eyebrow {
    font-size: 0.58rem;
  }
  body[data-page="nearby"] .live-nearby__title {
    font-size: 1.05rem;
    line-height: 1.2;
  }
  body[data-page="nearby"] .live-nearby__clock {
    font-size: 0.58rem;
    gap: 0.1rem 0.25rem;
  }
  body[data-page="nearby"] .live-nearby__actions .btn-sm {
    min-height: 2rem;
    min-width: 0;
    padding: 0.2rem 0.55rem;
    font-size: 0.72rem;
  }
  body[data-page="nearby"] .live-nearby__pills {
    margin: 0 0 0.55rem;
    gap: 0.28rem;
  }
  body[data-page="nearby"] .live-pill {
    padding: 0.28rem 0.4rem;
    border-radius: 0.45rem;
    font-size: 0.72rem;
  }
  body[data-page="nearby"] .live-pill__meta {
    font-size: 0.6rem;
  }
  body[data-page="nearby"] .live-nearby__stations {
    gap: 0.75rem;
  }
  body[data-page="nearby"] .live-nearby__station-block + .live-nearby__station-block {
    padding-top: 0.7rem;
  }
  body[data-page="nearby"] .live-nearby__station-head {
    margin-bottom: 0.45rem;
    gap: 0.2rem 0.5rem;
  }
  body[data-page="nearby"] .live-nearby__station-name {
    font-size: 0.95rem;
  }
  body[data-page="nearby"] .live-nearby__station-meta {
    font-size: 0.75rem;
  }
  body[data-page="nearby"] .live-nearby__list {
    gap: 0.45rem;
  }
  body[data-page="nearby"] .live-nearby__list-label {
    margin: 0 0 0.4rem;
    font-size: 0.62rem;
  }
  body[data-page="nearby"] .live-card {
    grid-template-columns: 3.6rem 1fr;
    gap: 0.55rem;
    padding: 0.55rem 0.6rem;
    border-radius: 0.65rem;
  }
  body[data-page="nearby"] .live-card__mins {
    font-size: 1.1rem;
  }
  body[data-page="nearby"] .live-card--urgent .live-card__mins {
    font-size: 1.2rem;
  }
  body[data-page="nearby"] .live-card__status {
    font-size: 0.64rem;
  }
  body[data-page="nearby"] .live-card__op {
    font-size: 0.72rem;
  }
  body[data-page="nearby"] .live-card__route {
    font-size: 0.9rem;
  }
  body[data-page="nearby"] .live-card__times {
    gap: 0.25rem;
  }
  body[data-page="nearby"] .live-card__time {
    font-size: 0.72rem;
  }
  body[data-page="nearby"] .live-card__meta {
    font-size: 0.72rem;
  }
  body[data-page="nearby"] .live-card__spot {
    margin-top: 0.25rem;
    min-height: 2.4rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
  }
  body[data-page="nearby"] .live-card__units {
    margin-top: 0.3rem;
    gap: 0.25rem;
  }
  body[data-page="nearby"] .bottom-nav ul {
    padding: 0.2rem 0.3rem;
  }
  body[data-page="nearby"] .bottom-nav .nav-item {
    min-height: 2.85rem;
    font-size: 0.58rem;
  }
  body[data-page="nearby"] .bottom-nav .nav-item--fav {
    margin-top: -0.55rem;
  }
  body[data-page="nearby"] .bottom-nav .nav-item--fav .nav-icon {
    width: 2.45rem;
    height: 2.45rem;
  }

  /* Log New: compact header + panels */
  body[data-page="spot"] .main {
    padding: 0.45rem 0.6rem calc(4.25rem + var(--safe-bottom));
  }
  body[data-page="spot"] .home-stage {
    margin: 0 0 0.4rem;
    padding: 0.5rem 0.65rem 0.55rem;
    gap: 0.35rem;
    border-radius: 0.85rem;
  }
  body[data-page="spot"] .home-stage__glow,
  body[data-page="spot"] .home-stage__tracks {
    display: none;
  }
  body[data-page="spot"] .home-kicker {
    margin: 0 0 0.1rem;
    font-size: 0.58rem;
    letter-spacing: 0.14em;
  }
  body[data-page="spot"] .home-brand { margin: 0; }
  body[data-page="spot"] .brand-wordmark--home {
    font-size: clamp(1.2rem, 5.8vw, 1.55rem);
  }
  body[data-page="spot"] .home-meter__top { font-size: 0.68rem; }
  body[data-page="spot"] .progress--home {
    height: 0.4rem;
    margin-top: 0.2rem;
  }
  body[data-page="spot"] .home-strip {
    padding: 0.35rem 0 0;
    gap: 0.1rem;
  }
  body[data-page="spot"] .home-strip__item strong {
    font-size: 0.88rem;
    line-height: 1.05;
  }
  body[data-page="spot"] .home-strip__item span { font-size: 0.55rem; }
  body[data-page="spot"] .bottom-nav ul { padding: 0.2rem 0.3rem; }
  body[data-page="spot"] .bottom-nav .nav-item {
    min-height: 2.85rem;
    font-size: 0.58rem;
  }
  body[data-page="spot"] .bottom-nav .nav-item--fav { margin-top: -0.55rem; }
  body[data-page="spot"] .bottom-nav .nav-item--fav .nav-icon {
    width: 2.45rem;
    height: 2.45rem;
  }
}

.log-new-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.35rem 0 1rem;
}
.log-new-tile {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.35rem;
  aspect-ratio: 1;
  width: 100%;
  padding: 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.85rem;
  background:
    linear-gradient(160deg, rgba(232, 163, 23, 0.1) 0%, transparent 42%),
    linear-gradient(180deg, rgba(18, 38, 68, 0.95) 0%, rgba(8, 18, 34, 0.96) 100%);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition: border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}
.log-new-tile:hover,
.log-new-tile:focus-visible {
  border-color: rgba(240, 180, 41, 0.55);
  box-shadow:
    inset 0 0 0 1px rgba(240, 180, 41, 0.18),
    0 10px 28px rgba(0, 0, 0, 0.28);
  outline: none;
}
.log-new-tile:active {
  transform: scale(0.985);
}
.log-new-tile__icon {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  margin-bottom: auto;
  color: var(--rail-glow, #f0b429);
}
.log-new-tile__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.log-new-tile__title {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 3.6vw, 1.15rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--foam, #f8fafc);
}
.log-new-tile__meta {
  color: var(--mist, #94a3b8);
  font-size: 0.75rem;
  line-height: 1.25;
}
.log-new-modal .live-modal__sheet {
  max-height: min(88vh, 44rem);
}
.log-new-result-meta {
  margin: 0.75rem 0 0;
  color: var(--mist, #94a3b8);
  font-size: 0.78rem;
}
.log-new-selected .departure-board {
  margin-bottom: 0.85rem;
}
.log-new-recent {
  margin: 1rem 0 0.45rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mist);
}
.log-new-inline-form { margin: 0; }
.log-new-inline-form__btn {
  appearance: none;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.45rem;
  padding: 0.55rem 0.15rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.log-new-inline-form__cta {
  margin-left: auto;
  color: var(--rail-glow, #f0b429);
  font-weight: 700;
  font-size: 0.78rem;
}
.log-new-station-picker {
  margin: 0 0 0.85rem;
}
.log-new-station-picked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--line, #334155) 70%, transparent);
  border-radius: 0.55rem;
  background: color-mix(in srgb, var(--panel, #0f172a) 88%, transparent);
}
.log-new-station-hint {
  margin: 0.45rem 0 0;
  color: var(--mist, #94a3b8);
  font-size: 0.78rem;
}
.traindex-photo {
  margin: 0 0 0.85rem;
}
.traindex-photo .ac-photo-credit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.45rem 0.6rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  color: #f8fafc;
  font-size: 0.72rem;
  line-height: 1.3;
}

@media (max-width: 420px) {
  .log-new-grid {
    gap: 0.55rem;
  }
  .log-new-tile {
    padding: 0.8rem;
    border-radius: 0.75rem;
  }
  .log-new-tile__title {
    font-size: 0.92rem;
  }
}

.train-crossing {
  position: relative;
  display: block;
  width: min(22rem, 100%);
  margin: 0.35rem auto 0.55rem;
  padding: 0.85rem 0.75rem 0.7rem;
  border: 0;
  border-radius: 1.1rem;
  background:
    linear-gradient(180deg, rgba(18, 38, 68, 0.55) 0%, rgba(8, 18, 34, 0.92) 100%);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
  cursor: pointer;
  color: inherit;
  overflow: hidden;
  text-align: center;
}
.train-crossing:hover,
.train-crossing:focus-visible {
  box-shadow:
    inset 0 0 0 1px rgba(240, 180, 41, 0.4),
    0 0 28px rgba(240, 180, 41, 0.12);
  outline: none;
}
.train-crossing__board {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.08rem;
  margin-bottom: 0.55rem;
}
.train-crossing__count {
  font-size: clamp(2.2rem, 9vw, 3rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--rail-glow, #f0b429);
  letter-spacing: -0.03em;
}
.train-crossing__label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mist, #94a3b8);
  font-weight: 700;
}
.train-crossing__scene {
  position: relative;
  display: block;
  height: 4.6rem;
  margin: 0 -0.35rem;
  overflow: hidden;
  border-radius: 0.65rem;
  background:
    linear-gradient(180deg, rgba(56, 90, 130, 0.18) 0%, transparent 55%),
    linear-gradient(180deg, rgba(10, 22, 40, 0.2) 40%, rgba(6, 14, 26, 0.85) 100%);
}
.train-crossing__rails {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.55rem;
  height: 1.15rem;
  pointer-events: none;
}
.train-crossing__rail {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(203, 213, 225, 0.55);
  border-radius: 1px;
}
.train-crossing__rail--top { top: 0.12rem; }
.train-crossing__rail--bot { bottom: 0.12rem; }
.train-crossing__sleepers {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0 0.55rem,
    rgba(148, 163, 184, 0.28) 0.55rem 0.72rem
  );
  opacity: 0.85;
  mask-image: linear-gradient(180deg, transparent 0, #000 35%, #000 65%, transparent 100%);
}
.train-crossing__train {
  position: absolute;
  left: 0;
  bottom: 0.72rem;
  color: var(--rail-glow, #f0b429);
  animation: train-crossing-pass 6s linear infinite;
  will-change: transform;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
.train-crossing__train svg {
  display: block;
  width: clamp(9.5rem, 42vw, 11.5rem);
  height: auto;
}
.train-crossing--empty .train-crossing__train {
  animation: none;
  opacity: 0;
}
.train-crossing__trolley {
  position: absolute;
  left: 0;
  bottom: 0.68rem;
  color: var(--rail-glow, #f0b429);
  opacity: 0;
  transform: translateX(-110%);
  pointer-events: none;
}
.train-crossing__trolley svg {
  display: block;
  width: clamp(3.6rem, 17vw, 4.6rem);
  height: auto;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.4));
}
.train-crossing--empty .train-crossing__trolley {
  animation: maintenance-trolley-pass 18s linear 2s infinite;
  will-change: left, transform, opacity;
}
.train-crossing--empty .train-crossing__count {
  color: rgba(148, 163, 184, 0.85);
}
.train-crossing__hint {
  margin: 0.2rem 0 0;
  color: var(--mist, #94a3b8);
  font-size: 0.9rem;
}
.train-crossing__link {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
}
.train-crossing__link a {
  color: var(--rail-glow, #f0b429);
  text-decoration: none;
}
.train-crossing__link a:hover { text-decoration: underline; }
.train-crossing__prefs {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--mist, #94a3b8);
  letter-spacing: 0.02em;
}

@keyframes train-crossing-pass {
  0% {
    left: 0;
    transform: translateX(-105%);
  }
  100% {
    left: 100%;
    transform: translateX(5%);
  }
}

@keyframes maintenance-trolley-pass {
  0%, 8% {
    left: 0;
    transform: translateX(-110%);
    opacity: 0;
  }
  12% { opacity: 0.9; }
  34% {
    left: 100%;
    transform: translateX(8%);
    opacity: 0.9;
  }
  38%, 100% {
    left: 100%;
    transform: translateX(8%);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .train-crossing__train {
    animation: none;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.85;
  }
  .train-crossing--empty .train-crossing__train { opacity: 0; }
  .train-crossing__trolley,
  .train-crossing--empty .train-crossing__trolley {
    display: none;
    animation: none;
  }
}

/* ---- Spot modal ---- */
.live-modal {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(32rem, calc(100vw - 1.25rem));
  width: 100%;
  color: inherit;
}
.live-modal::backdrop {
  background: rgba(4, 10, 20, 0.72);
  backdrop-filter: blur(2px);
}
.live-modal__sheet {
  background:
    linear-gradient(160deg, rgba(20, 48, 82, 0.98), rgba(10, 24, 42, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  padding: 1rem 1rem 0.85rem;
  max-height: min(82vh, 40rem);
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}
.live-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.live-modal__title {
  margin: 0.15rem 0 0;
  font-size: 1.15rem;
  color: var(--foam, #f8fafc);
}
.live-modal__body {
  overflow: auto;
  flex: 1;
  padding-right: 0.15rem;
  margin-bottom: 0.55rem;
}
.live-modal__foot {
  margin: 0;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 0.82rem;
  text-align: center;
}
.live-modal__foot a {
  color: var(--rail-glow, #f0b429);
  text-decoration: none;
}
.live-modal__foot a:hover { text-decoration: underline; }
.live-card--compact {
  grid-template-columns: 3.6rem 1fr;
  padding: 0.65rem 0.7rem;
}
.live-card__station-line,
.live-card__unit-line {
  margin: 0.15rem 0;
  font-size: 0.8rem;
  color: var(--mist, #94a3b8);
}
.live-nearby__switch { display: none !important; }

/* Navigation between the Dex apps. */
.dex-links { display: flex; align-items: center; gap: .4rem; padding: .5rem 1rem; }
.dex-links .sister-badge { box-sizing: border-box; display: grid; place-items: center; width: 2rem; height: 2rem; flex: 0 0 2rem; padding: 0; border-radius: .65rem; border: 1px solid rgba(255,255,255,.24); box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 3px 10px rgba(0,0,0,.25); transition: filter 150ms ease, border-color 150ms ease; }
.dex-links .sister-badge--sky { color: #d5edff; background: linear-gradient(145deg,#287cc4,#143a78); }
.dex-links .sister-badge--rail { color: #ffe3b0; background: linear-gradient(145deg,#a65b1e,#532810); }
.dex-links .sister-badge--sea { color: #b8fff3; background: linear-gradient(145deg,#137e8e,#073c58); }
.dex-links .sister-badge:hover { filter: brightness(1.2); border-color: currentColor; text-decoration: none; }
.dex-links .sister-badge:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.beta-tag { display: inline-block; margin-left: .35rem; padding: .14rem .28rem; border-radius: .3rem; background: #f6c444; color: #271b00; font: 800 .52rem/1 var(--font-display); letter-spacing: .07em; vertical-align: middle; }

/* —— Guest landing: sell the story before the live board —— */
.rail-landing { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(16rem, .9fr); gap: 1.5rem; padding: clamp(1.5rem, 4vw, 3.3rem); margin: 0 0 1.4rem; border: 1px solid rgba(240,193,77,.25); border-radius: 1.5rem; background: radial-gradient(circle at 80% 20%,rgba(255,190,35,.2),transparent 21rem),linear-gradient(125deg,#10294a 0%,#091a31 52%,#070f20 100%); isolation: isolate; }
.rail-landing__ambient { position: absolute; z-index: -1; width: 28rem; height: 28rem; top: -15rem; left: -11rem; border: 1px solid rgba(245,188,43,.16); border-radius: 50%; box-shadow: 0 0 0 4rem rgba(245,188,43,.025),0 0 0 8rem rgba(245,188,43,.018); }
.rail-landing__copy { align-self: center; }
.rail-landing__eyebrow,.rail-landing__reasons header p { margin: 0 0 .8rem; color: var(--rail-glow); font: 800 .68rem/1.2 var(--font-display); letter-spacing: .15em; text-transform: uppercase; }
.rail-landing__eyebrow span,.rail-landing__live-intro>span { display: inline-block; width: .55rem; height: .55rem; margin-right: .42rem; border-radius: 50%; background: var(--rail-glow); box-shadow: 0 0 12px var(--rail-glow); }
.rail-landing h1 { margin: 0; max-width: 12ch; font: 800 clamp(2.35rem,5vw,4.6rem)/.95 var(--font-display); letter-spacing: -.055em; color: #fff; }
.rail-landing h1 em { color: var(--rail-glow); font-style: normal; }
.rail-landing__lede { max-width: 35rem; margin: 1.1rem 0 0; color: #c4d2e2; font-size: clamp(1rem,1.7vw,1.17rem); line-height: 1.55; }
.rail-landing__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; margin-top: 1.45rem; }
.rail-landing__primary { min-height: 3.35rem; padding-inline: 1.35rem; box-shadow: 0 12px 28px rgba(232,163,23,.26); }
.rail-landing__primary span { margin-left: .4rem; font-size: 1.2em; }
.rail-landing__browse { color: #fff; font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.32); padding-bottom: .15rem; }
.rail-landing__browse:hover { color: var(--rail-glow); text-decoration: none; border-color: var(--rail-glow); }
.rail-landing__note { margin: 1rem 0 0; color: #93a9c0; font-size: .78rem; }
.rail-landing__note span { color: var(--rail-glow); font-weight: 900; }
.rail-landing__visual { position: relative; align-self: stretch; min-height: 18rem; overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 1.1rem; background: linear-gradient(155deg,rgba(39,79,117,.55),rgba(7,16,31,.55)); }
.rail-landing__signal { position: absolute; top: 1.2rem; right: 1.1rem; display: grid; gap: .25rem; padding: .4rem; border: 1px solid rgba(255,255,255,.12); border-radius: .7rem; background: rgba(4,12,24,.56); }
.rail-landing__signal i { width: .38rem; height: .38rem; border-radius: 50%; background: #5d7186; }.rail-landing__signal i:first-child { background: #edb027; box-shadow: 0 0 9px #edb027; }
.rail-landing__route { position: absolute; top: 1.4rem; left: 1.2rem; color: #b9c9d8; font: 700 .61rem/1.2 ui-monospace,monospace; letter-spacing: .09em; }.rail-landing__route span { display: block; margin-top: .3rem; color: var(--rail-glow); font-size: .52rem; }
.rail-landing__train { position: absolute; left: 7%; right: -13%; bottom: 3.6rem; height: 6.3rem; filter: drop-shadow(0 1.3rem 1rem rgba(0,0,0,.45)); transform: skewX(-6deg); }
.rail-landing__cab,.rail-landing__carriage { position: absolute; bottom: 1rem; height: 4.4rem; border: 2px solid #f5b51d; background: linear-gradient(180deg,#f1b720 0 20%,#12314d 21% 100%); }.rail-landing__cab { left: 0; width: 31%; border-radius: 1.6rem .35rem .35rem .35rem; }.rail-landing__carriage { left: 30%; width: 43%; border-color: #dce9f4; background: linear-gradient(180deg,#e9f3fb 0 18%,#1c4565 19% 100%); }.rail-landing__carriage--rear { left: 72%; width: 32%; border-radius: .25rem 1rem .25rem .25rem; }
.rail-landing__cab b,.rail-landing__carriage i { display: inline-block; width: .85rem; height: .85rem; margin: 1.35rem .22rem 0 .35rem; border-radius: .12rem; background: #081a2c; box-shadow: inset 0 0 0 1px rgba(139,213,255,.28); }.rail-landing__cab b { background: #d8efff; }
.rail-landing__wheels { position: absolute; left: 6%; right: 4%; bottom: .38rem; display: flex; justify-content: space-around; }.rail-landing__wheels i { width: 1rem; height: 1rem; border: .22rem solid #121a28; border-radius: 50%; background: #8b9bae; }
.rail-landing__rails { position: absolute; left: -5%; right: -5%; bottom: 1.55rem; height: .45rem; border-block: 2px solid rgba(222,237,246,.5); transform: perspective(80px) rotateX(25deg); }.rail-landing__caption { position: absolute; right: 1rem; bottom: .65rem; margin: 0; text-align: right; color: #a8b8c9; font: 700 .5rem/1.45 var(--font-display); letter-spacing: .13em; }.rail-landing__caption strong { color: #fff; font-size: .65rem; }
.rail-landing__stats { grid-column: 1/-1; display: grid; grid-template-columns: repeat(3,1fr); position: relative; z-index: 1; border-top: 1px solid rgba(255,255,255,.12); padding-top: 1rem; }.rail-landing__stats div { padding: 0 .85rem; border-right: 1px solid rgba(255,255,255,.1); }.rail-landing__stats div:first-child { padding-left: 0; }.rail-landing__stats div:last-child { border: 0; }.rail-landing__stats strong,.rail-landing__stats span { display: block; }.rail-landing__stats strong { color: #fff; font: 800 clamp(1.25rem,2.5vw,1.8rem)/1 var(--font-display); }.rail-landing__stats span { margin-top: .28rem; color: #9fb0c1; font-size: .7rem; }
.rail-landing__reasons { margin: 0 0 1.4rem; padding: .2rem .15rem 0; }.rail-landing__reasons header { margin-bottom: .9rem; }.rail-landing__reasons header p { margin-bottom: .4rem; }.rail-landing__reasons h2 { margin: 0; font-size: clamp(1.45rem,3vw,2.05rem); }.rail-landing__reason-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: .75rem; }.rail-landing__reason-grid article { padding: 1rem; border: 1px solid rgba(255,255,255,.1); border-radius: 1rem; background: linear-gradient(145deg,rgba(27,55,86,.62),rgba(7,18,35,.62)); }.rail-landing__icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; margin-bottom: .75rem; border-radius: .7rem; background: rgba(232,163,23,.14); color: var(--rail-glow); font-size: 1.2rem; }.rail-landing__reason-grid h3 { margin: 0; font-size: 1rem; }.rail-landing__reason-grid p { margin: .35rem 0 0; color: #9db0c3; font-size: .8rem; line-height: 1.45; }
.rail-landing__live-intro { display: flex; align-items: center; gap: .45rem; margin: .2rem 0 .65rem; }.rail-landing__live-intro>span { margin: 0; width: .45rem; height: .45rem; }.rail-landing__live-intro p { margin: 0; color: var(--mist); font-size: .83rem; }.rail-landing__live-intro strong { color: #fff; }
@media (max-width: 859px) { .rail-landing { grid-template-columns: 1fr; gap: 1.15rem; padding: 1.35rem 1.15rem 1.1rem; border-radius: 1.15rem; }.rail-landing h1 { font-size: clamp(2.2rem,10vw,3.2rem); }.rail-landing__visual { min-height: 13.25rem; }.rail-landing__lede { font-size: .98rem; }.rail-landing__actions { gap: .65rem; margin-top: 1.1rem; }.rail-landing__primary { flex: 1; justify-content: center; }.rail-landing__stats { margin-top: -.1rem; }.rail-landing__reason-grid { grid-template-columns: 1fr; gap: .55rem; }.rail-landing__reason-grid article { display: grid; grid-template-columns: 2.25rem 1fr; column-gap: .75rem; padding: .85rem; }.rail-landing__icon { grid-row: span 2; margin: 0; }.rail-landing__reason-grid p { margin-top: .1rem; }.rail-landing__reasons { margin-bottom: 1.15rem; } }
@media (max-width: 420px) { .rail-landing { padding-inline: .95rem; }.rail-landing__note { font-size: .69rem; }.rail-landing__visual { min-height: 11.6rem; }.rail-landing__train { bottom: 2.7rem; transform: scale(.88) skewX(-6deg); transform-origin: left bottom; }.rail-landing__stats div { padding-inline: .5rem; }.rail-landing__stats span { font-size: .61rem; } }

/* A guest is choosing whether to join, so let this page breathe and scroll. */
@media (max-width: 859px) {
  body[data-page="home"][data-guest="true"] { height: auto; max-height: none; overflow: auto; }
  body[data-page="home"][data-guest="true"] .app-shell,
  body[data-page="home"][data-guest="true"] .main-col { height: auto; min-height: 100dvh; }
  body[data-page="home"][data-guest="true"] .main { display: block; height: auto; min-height: 0; overflow: visible; padding: .7rem .6rem calc(5.25rem + var(--safe-bottom)); }
  body[data-page="home"][data-guest="true"] .live-nearby--home { display: block; min-height: auto; overflow: visible; margin: 0; padding: .8rem; }
}

/* A quieter, photographic guest hero. */
.rail-landing--photo { display: flex; min-height: clamp(31rem, 72svh, 43rem); padding: clamp(1.4rem, 4vw, 3rem); align-items: flex-end; border-color: rgba(255,255,255,.17); background: #071426; }
.rail-landing--photo .rail-landing__photo { position: absolute; inset: 0; z-index: 0; background-image: linear-gradient(90deg,rgba(4,13,27,.94) 0%,rgba(4,13,27,.7) 43%,rgba(4,13,27,.08) 75%),linear-gradient(0deg,rgba(4,13,27,.93) 0%,transparent 52%),url('/assets/images/rail-landing-hero-v1.png'); background-position: center,center,center 63%; background-size: cover; }
.rail-landing--photo .rail-landing__copy { position: relative; z-index: 1; width: min(100%,35rem); }.rail-landing--photo h1 { max-width: 10ch; font-size: clamp(2.7rem,6vw,5.3rem); }.rail-landing--photo .rail-landing__lede { max-width: 31rem; color: #d4dfeb; }.rail-landing--photo .rail-landing__actions { margin-top: 1.35rem; }.rail-landing--photo .rail-landing__browse { display: inline-block; margin-top: .9rem; color: #d7e6f4; font-size: .85rem; }.rail-landing--photo .rail-landing__stats { position: absolute; z-index: 1; right: clamp(1.4rem,4vw,3rem); bottom: clamp(1.4rem,4vw,3rem); grid-column: auto; width: min(33%,18rem); padding: 0; border: 0; border-radius: .85rem; background: rgba(5,16,32,.62); backdrop-filter: blur(9px); }.rail-landing--photo .rail-landing__stats div { padding: .65rem .8rem; border: 0; border-bottom: 1px solid rgba(255,255,255,.12); }.rail-landing--photo .rail-landing__stats div:last-child { border: 0; }.rail-landing--photo .rail-landing__stats strong,.rail-landing--photo .rail-landing__stats span { display: inline; }.rail-landing--photo .rail-landing__stats strong { margin-right: .38rem; font-size: 1rem; }.rail-landing--photo .rail-landing__stats span { font-size: .68rem; }
@media (max-width: 859px) { .rail-landing--photo { display: flex; flex-direction: column; min-height: 39rem; padding: 1.45rem 1.35rem 1.25rem; align-items: stretch; border-radius: 1.2rem; }.rail-landing--photo .rail-landing__photo { background-image: linear-gradient(180deg,rgba(4,13,27,.58) 0%,rgba(4,13,27,.18) 28%,rgba(4,13,27,.96) 82%),url('/assets/images/rail-landing-hero-v1.png'); background-position: center,center 59%; }.rail-landing--photo .rail-landing__copy { width: 100%; margin-top: auto; }.rail-landing--photo h1 { max-width: none; font-size: clamp(2.35rem,11vw,3.25rem); }.rail-landing--photo .rail-landing__lede { max-width: 20rem; font-size: 1rem; }.rail-landing--photo .rail-landing__actions { display: block; margin-top: 1.15rem; }.rail-landing--photo .rail-landing__primary { display: inline-flex; width: 100%; min-height: 3.45rem; flex: 0 0 100%; flex-direction: row; justify-content: space-between; align-items: center; padding-inline: 1.15rem; }.rail-landing--photo .rail-landing__browse { display: block; width: max-content; max-width: 100%; margin-top: .95rem; }.rail-landing--photo .rail-landing__stats { position: static; display: grid; grid-template-columns: repeat(3,1fr); width: 100%; margin-top: 1.15rem; border-radius: .7rem; }.rail-landing--photo .rail-landing__stats div { padding: .6rem .4rem; text-align: center; border-right: 1px solid rgba(255,255,255,.12); border-bottom: 0; }.rail-landing--photo .rail-landing__stats div:first-child { padding-left: .4rem; }.rail-landing--photo .rail-landing__stats div:last-child { border: 0; }.rail-landing--photo .rail-landing__stats strong,.rail-landing--photo .rail-landing__stats span { display: block; margin: 0; }.rail-landing--photo .rail-landing__stats strong { font-size: 1.15rem; }.rail-landing--photo .rail-landing__stats span { margin-top: .16rem; font-size: .59rem; } }
@media (max-width: 859px) { .rail-landing--photo { display: flex; flex-direction: column; min-height: 39rem; padding: 1.45rem 1.35rem 1.25rem; align-items: stretch; border-radius: 1.2rem; }.rail-landing--photo .rail-landing__photo { background-image: linear-gradient(180deg,rgba(4,13,27,.62) 0%,rgba(4,13,27,.13) 32%,rgba(4,13,27,.72) 100%),url('/assets/images/rail-landing-hero-v1.png'); background-position: center,center 28%; }.rail-landing--photo .rail-landing__copy { width: 100%; margin-top: 4.5rem; }.rail-landing--photo h1 { max-width: none; font-size: clamp(2.35rem,11vw,3.25rem); }.rail-landing--photo .rail-landing__lede { max-width: 20rem; font-size: 1rem; }.rail-landing--photo .rail-landing__actions { display: block; margin-top: 1.15rem; }.rail-landing--photo .rail-landing__primary { display: inline-flex; width: 100%; min-height: 3.45rem; flex: 0 0 100%; flex-direction: row; justify-content: space-between; align-items: center; padding-inline: 1.15rem; }.rail-landing--photo .rail-landing__browse { display: block; width: max-content; max-width: 100%; margin-top: .95rem; }.rail-landing--photo .rail-landing__stats { display: none; } }

/* The app shell already applies the status-bar inset. */
.dex-links { padding-top: .5rem; flex-shrink: 0; }
