/* Starship Live. Mobile first. */

:root {
  --bg: #05070f;
  --bg-2: #0a1022;
  --panel: rgba(16, 23, 44, 0.82);
  --panel-solid: #10172c;
  --line: rgba(150, 170, 220, 0.2);
  --text: #eef2ff;
  --muted: #a9b4d0;
  --booster: #ff9d4d;
  --ship: #8fd3ff;
  --shared: #f2c94c;
  --ok: #6ee7a8;
  --warn: #ffb454;
  --danger: #ff7a7a;
  --sim: #c79bff;
  --now: #ffffff;
  --radius: 16px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 620px at 85% -10%, rgba(255, 157, 77, 0.16), transparent 60%),
    radial-gradient(900px 600px at 0% 10%, rgba(143, 211, 255, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: var(--ship); text-underline-offset: 3px; }
a:hover { color: #c5e8ff; }

:focus-visible {
  outline: 3px solid var(--shared);
  outline-offset: 3px;
  border-radius: 6px;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--shared);
  color: #1a1400;
  font-weight: 700;
  border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* ---------- Starfield ---------- */

.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.stars::before,
.stars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  background-repeat: repeat;
  will-change: transform;
}
.stars::before {
  height: calc(100% + 600px);
  background-image:
    radial-gradient(1.2px 1.2px at 40px 70px, rgba(255, 255, 255, 0.9), transparent 60%),
    radial-gradient(1px 1px at 210px 150px, rgba(255, 255, 255, 0.7), transparent 60%),
    radial-gradient(1.4px 1.4px at 330px 420px, rgba(190, 220, 255, 0.9), transparent 60%),
    radial-gradient(1px 1px at 520px 260px, rgba(255, 255, 255, 0.6), transparent 60%),
    radial-gradient(1.2px 1.2px at 120px 520px, rgba(255, 230, 200, 0.8), transparent 60%),
    radial-gradient(1px 1px at 450px 40px, rgba(255, 255, 255, 0.7), transparent 60%);
  background-size: 600px 600px;
  opacity: 0.75;
  animation: drift-far 180s linear infinite;
}
.stars::after {
  height: calc(100% + 400px);
  background-image:
    radial-gradient(1.6px 1.6px at 90px 110px, rgba(255, 255, 255, 0.95), transparent 60%),
    radial-gradient(1.4px 1.4px at 300px 300px, rgba(200, 225, 255, 0.85), transparent 60%),
    radial-gradient(1.8px 1.8px at 200px 30px, rgba(255, 215, 170, 0.8), transparent 60%);
  background-size: 400px 400px;
  opacity: 0.55;
  animation: drift-near 110s linear infinite;
}

@keyframes drift-far { to { transform: translate3d(0, -600px, 0); } }
@keyframes drift-near { to { transform: translate3d(0, -400px, 0); } }

/* ---------- Header ---------- */

.site-header { padding-top: 28px; padding-bottom: 18px; }

.kicker {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.kicker-sep { color: var(--booster); margin: 0 0.35em; }

h1 {
  margin-top: 6px;
  font-size: clamp(2.1rem, 9vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fff 0%, var(--ship) 55%, var(--booster) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  margin-top: 8px;
  color: var(--shared);
  font-size: clamp(1.05rem, 4.2vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.facts {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  font-size: 0.98rem;
}
.fact-key {
  display: inline-block;
  min-width: 4.6em;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* Flight switcher: only rendered when the index lists more than one flight. */
.flight-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.88rem;
}
.flight-nav[hidden] { display: none; }
.flight-nav-key {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.flight-nav-link[aria-current="page"] {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: rgba(255, 255, 255, 0.13); color: #fff; }
.button--primary {
  border-color: transparent;
  background: linear-gradient(90deg, var(--booster), #ffc27a);
  color: #1d0f00;
}
.button--primary:hover { background: linear-gradient(90deg, #ffb06b, #ffd19b); color: #1d0f00; }
.button--small { min-height: 40px; padding: 8px 14px; font-size: 0.9rem; }

/* ---------- Boot and fallback ---------- */

.boot {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  text-align: center;
}
.boot--error {
  border-color: rgba(255, 122, 122, 0.55);
  color: #ffd9d9;
}

/* ---------- Hero ---------- */

.hero {
  --accent: var(--shared);
  position: relative;
  margin-top: 8px;
  padding: 18px 16px 20px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.hero[data-vehicle="booster"] { --accent: var(--booster); }
.hero[data-vehicle="ship"] { --accent: var(--ship); }
.hero[data-mode="scrubbed"] { --accent: var(--danger); }
.hero[data-mode="complete"] { --accent: var(--ok); }

.status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-size: 0.88rem;
}
.status-item { color: var(--text); }
.status-key {
  margin-right: 0.4em;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.badge {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.badge--scheduled { color: var(--ship); background: rgba(143, 211, 255, 0.12); }
.badge--delayed { color: var(--warn); background: rgba(255, 180, 84, 0.14); }
.badge--scrubbed { color: var(--danger); background: rgba(255, 122, 122, 0.14); }
.badge--launched { color: var(--ok); background: rgba(110, 231, 168, 0.14); }

.operator-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--shared);
  border-radius: 8px;
  background: rgba(242, 201, 76, 0.1);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.eyebrow {
  margin-top: 20px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-event {
  margin-top: 4px;
  font-size: clamp(1.6rem, 7vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.count {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.count-block {
  flex: 1 1 calc(33.33% - 8px);
  min-width: 0;
  padding: 10px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(3, 6, 16, 0.6);
  text-align: center;
}
.count-num {
  display: block;
  color: #fff;
  font-size: clamp(1.7rem, 9vw, 6rem);
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  text-shadow: 0 0 28px color-mix(in srgb, var(--accent) 55%, transparent);
}
.count-unit {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-flash {
  margin-top: 16px;
  padding: 18px 12px;
  border: 1px solid var(--accent);
  border-radius: 14px;
  background: rgba(3, 6, 16, 0.6);
  color: var(--accent);
  font-size: clamp(1.6rem, 8vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.hero[data-mode="now"] .hero-flash { animation: pulse 1s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 34px 2px color-mix(in srgb, var(--accent) 55%, transparent); }
}

.hero-detail {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.hero-detail dt,
.stat-title {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero-detail dd {
  font-size: 1.08rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.hero-note {
  margin-top: 16px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 0.95rem;
}

/* ---------- Stats ---------- */

.stats {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.stat {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.stat-big {
  margin-top: 6px;
  font-size: clamp(1.7rem, 8vw, 2.3rem);
  font-weight: 700;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.stat-mid {
  margin-top: 6px;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.stat-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.tz-label {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
}
.tz-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.tz-select {
  flex: 1 1 12rem;
  min-width: 12rem;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-solid);
  color: var(--text);
  font: inherit;
}

/* ---------- Timeline ---------- */

.timeline { margin-top: 32px; }

.timeline-head h2 {
  font-size: clamp(1.5rem, 6vw, 2.1rem);
  letter-spacing: -0.01em;
}
.zone-note { margin-top: 4px; color: var(--muted); font-size: 0.92rem; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  font-size: 0.85rem;
  font-weight: 650;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.v-booster { --accent: var(--booster); }
.v-ship { --accent: var(--ship); }
.v-both, .v-mission { --accent: var(--shared); }

.callout {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(242, 201, 76, 0.45);
  border-radius: 12px;
  background: rgba(242, 201, 76, 0.09);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.phase { margin-top: 28px; }
.phase-title {
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}
.phase-blurb { margin-top: 2px; color: var(--muted); font-size: 0.92rem; }

.phase-list {
  position: relative;
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.phase-list::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 7px;
  width: 2px;
  background: linear-gradient(180deg, var(--line), rgba(150, 170, 220, 0.06));
}

.event {
  position: relative;
  padding-left: 28px;
}
.event::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 20px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
}

.event-card {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: var(--panel);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.event-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.event-clock {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 700;
}
.tag {
  padding: 2px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.catch-badge {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: #10131f;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.event-state {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.event-state:empty { display: none; }

.event-name {
  margin-top: 6px;
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 14px;
  margin-top: 6px;
  font-size: 0.93rem;
}
.event-local { color: var(--text); }
.event-until { color: var(--muted); }
.event-until:empty { display: none; }

/* States */

.event.is-done .event-card { opacity: 0.62; border-left-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.event.is-done .event-name { text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.5); }
.event.is-done::before { background: var(--accent); }
.event.is-done .event-state { color: var(--ok); }
.event.is-done .event-state::before { content: "\2713\00a0"; }

.event.is-next .event-card {
  border-color: var(--accent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 16%, transparent), var(--panel) 70%);
  box-shadow: 0 0 0 1px var(--accent), 0 10px 34px color-mix(in srgb, var(--accent) 22%, transparent);
}
.event.is-next .event-state {
  padding: 2px 9px;
  border-radius: 999px;
  background: #fff;
  color: #0b1020;
}
.event.is-next .event-until { color: #fff; font-weight: 700; }
.event.is-next::before { background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 28%, transparent); }

.event.is-current .event-card {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 22%, var(--panel-solid));
  animation: pulse 1s ease-in-out infinite;
}
.event.is-current .event-state { color: var(--accent); }
.event.is-current::before { background: #fff; }

.event.is-hold .event-card { opacity: 0.7; }
.event.is-hold .event-state { color: var(--danger); }

/* The two catches and liftoff are the big moments */

.event.is-catch .event-card,
.event.is-liftoff .event-card {
  padding: 16px;
  border-width: 1px 1px 1px 6px;
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--accent) 20%, transparent), transparent 65%),
    var(--panel);
}
.event.is-catch .event-name,
.event.is-liftoff .event-name {
  font-size: 1.3rem;
  font-weight: 800;
}
.event.is-catch::before,
.event.is-liftoff::before {
  left: -1px;
  top: 22px;
  width: 18px;
  height: 18px;
}

.complete {
  margin-top: 28px;
  padding: 20px 16px;
  border: 1px solid rgba(110, 231, 168, 0.5);
  border-radius: var(--radius);
  background: rgba(110, 231, 168, 0.08);
  text-align: center;
}
.complete h3 { color: var(--ok); font-size: 1.4rem; }
.complete p { margin-top: 8px; }
.complete p:last-child { color: var(--muted); font-size: 0.95rem; }

/* ---------- Sticky bar ---------- */

.sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  visibility: hidden;
  transform: translateY(-100%);
  transition: transform 0.25s ease, visibility 0s linear 0.25s;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 10, 22, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.sticky.is-visible {
  visibility: visible;
  transform: none;
  transition: transform 0.25s ease, visibility 0s;
}
.sticky-button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 1040px;
  min-height: 52px;
  margin: 0 auto;
  padding: 8px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
  padding-top: max(8px, env(safe-area-inset-top));
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.sticky-clock {
  flex: none;
  color: var(--shared);
  font-size: 1.05rem;
  font-weight: 700;
}
.sticky-next {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.sticky-label {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.sticky-name {
  overflow: hidden;
  font-size: 0.92rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sticky-until {
  flex: none;
  color: var(--muted);
  font-size: 0.82rem;
}
.sticky-until:empty { display: none; }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 40px;
  padding-top: 20px;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}
.site-footer p + p { margin-top: 8px; }
.site-footer strong { color: var(--text); }
.fine { font-size: 0.82rem; }

/* ---------- Narrow phones ---------- */
@media (max-width: 599px) {
  .count {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .count:has(#count-days-block:not([hidden])) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .count-block {
    flex: none;
    min-width: 0;
    width: auto;
  }
  .count-num { font-size: clamp(1.6rem, 8vw, 2.4rem); }

  .tz-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .tz-select {
    flex: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .tz-controls .button {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- Wider screens ---------- */

@media (min-width: 600px) {
  .hero { padding: 24px 28px 28px; }
  .hero-detail { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .count { gap: 12px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts li:last-child { grid-column: 1 / -1; }
}

@media (min-width: 760px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-header { padding-top: 44px; }
}

/* Two tracks: Super Heavy on the left, Starship on the right, shared events across the middle. */
@media (min-width: 900px) {
  .legend { justify-content: space-between; }

  .phase-list::before { left: calc(50% - 1px); }

  .event {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 56px;
    padding-left: 0;
  }
  .event::before { left: calc(50% - 7px); }
  .event.is-catch::before,
  .event.is-liftoff::before { left: calc(50% - 9px); }

  .event.v-booster .event-card { grid-column: 1; border-left-width: 1px; border-right: 4px solid var(--accent); }
  .event.v-ship .event-card { grid-column: 2; }
  .event.v-both .event-card,
  .event.v-mission .event-card {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(100%, 560px);
    position: relative;
    z-index: 1;
  }
  .event.v-both::before,
  .event.v-mission::before { display: none; }

  .event.v-booster.is-catch .event-card { border-width: 1px 6px 1px 1px; }
  .event.v-booster.is-done .event-card { border-right-color: color-mix(in srgb, var(--accent) 50%, transparent); }
}

/* ---------- Live ops: banners, hold, committed cue ---------- */

.banner {
  --tone: var(--warn);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin-top: 8px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 2px solid var(--tone);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--tone) 16%, var(--panel-solid));
  overflow-wrap: anywhere;
}
.banner--hold { --tone: var(--warn); }
.banner--scrub { --tone: var(--danger); }
.banner--sim {
  --tone: var(--sim);
  background:
    repeating-linear-gradient(135deg, color-mix(in srgb, var(--sim) 22%, transparent) 0 14px, transparent 14px 28px),
    var(--panel-solid);
}
.banner-title {
  flex: 0 1 auto;
  color: var(--tone);
  font-size: clamp(1.25rem, 5.5vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.banner-text { flex: 1 1 16rem; min-width: 0; font-size: 1rem; }
.banner-text:empty { display: none; }
.banner .button { flex: none; border-color: var(--tone); }

.badge--hold { color: var(--warn); background: rgba(255, 180, 84, 0.14); }
.badge--sim { color: var(--sim); background: rgba(199, 155, 255, 0.14); }

.commit-cue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--booster);
  color: #1d0f00;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.commit-cue::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1d0f00;
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

.status-item--quiet { color: var(--muted); font-size: 0.82rem; font-style: italic; }

.hero[data-mode="hold"] { --accent: var(--warn); }
body[data-ops="sim"] .hero { --accent: var(--sim); }

/* ---------- Now / phase indicator ---------- */

.now-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--now);
  border-radius: 12px;
  background: var(--panel);
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.35;
}
.now-pill,
.now-marker-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--now);
  color: #06101d;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.now-text { min-width: 0; overflow-wrap: anywhere; }

.now-marker {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0;
}
.now-marker::before,
.now-marker::after {
  content: "";
  flex: 1 1 0;
  height: 2px;
  border-radius: 2px;
  background: var(--now);
  box-shadow: 0 0 12px color-mix(in srgb, var(--now) 70%, transparent);
}
.now-marker::before { flex: 0 0 14px; }
.now-marker-pill { padding: 4px 12px; font-size: 0.76rem; }
.now-marker-clock { letter-spacing: 0.02em; }

body[data-ops="hold"] { --now: var(--warn); }
body[data-ops="sim"] { --now: var(--sim); }

.sticky-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Simulator ---------- */

.sim {
  margin-top: 12px;
  border: 1px dashed color-mix(in srgb, var(--sim) 55%, transparent);
  border-radius: var(--radius);
  background: var(--panel);
}
.sim-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  min-height: 44px;
  padding: 10px 16px;
  cursor: pointer;
}
.sim-summary-title {
  color: var(--sim);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.sim-summary-state { color: var(--muted); font-size: 0.9rem; }
.sim-body { padding: 0 16px 16px; }
.sim-help { color: var(--muted); font-size: 0.92rem; }
.sim-clock {
  margin-top: 12px;
  color: var(--sim);
  font-size: clamp(1.4rem, 6vw, 2rem);
  font-weight: 700;
}
.sim-label {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
}
.sim-range {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 0;
  accent-color: var(--sim);
}
.sim-scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
}
.sim-jump { display: block; width: 100%; min-width: 0; margin-top: 6px; }
.sim-controls,
.sim-speeds {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.sim-controls { margin-top: 14px; }
.sim-speed[aria-pressed="true"] {
  border-color: var(--sim);
  background: color-mix(in srgb, var(--sim) 28%, transparent);
  color: #fff;
}
.button:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- Board view (TV or monitor) ---------- */

body.board { display: flex; flex-direction: column; }
.board-wrap {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: clamp(14px, 2.6vw, 44px);
  padding-left: max(clamp(14px, 2.6vw, 44px), env(safe-area-inset-left));
  padding-right: max(clamp(14px, 2.6vw, 44px), env(safe-area-inset-right));
}
.board #app {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2vh, 26px);
}
.board-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px clamp(12px, 2vw, 28px);
}
.board-mission {
  margin: 0;
  font-size: clamp(1.3rem, 3.2vw, 3rem);
  letter-spacing: 0;
}
.board .badge,
.board .commit-cue { font-size: clamp(0.8rem, 1.6vw, 1.5rem); padding: 0.35em 0.9em; }
.board .banner { margin: 0; padding: clamp(12px, 1.8vw, 26px) clamp(14px, 2vw, 30px); }
.board .banner-title { font-size: clamp(1.6rem, 5.2vw, 5rem); }
.board .banner-text { font-size: clamp(1rem, 2vw, 1.9rem); }

.board-hero {
  --accent: var(--shared);
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(6px, 1.6vh, 20px);
  min-width: 0;
  text-align: center;
}
.board-hero[data-vehicle="booster"] { --accent: var(--booster); }
.board-hero[data-vehicle="ship"] { --accent: var(--ship); }
.board-hero[data-mode="hold"] { --accent: var(--warn); }
.board-hero[data-mode="scrubbed"] { --accent: var(--danger); }
.board-hero[data-mode="complete"] { --accent: var(--ok); }
body[data-ops="sim"] .board-hero { --accent: var(--sim); }

.board-clock {
  color: #fff;
  font-size: min(13.5vw, 34vh);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 0 60px color-mix(in srgb, var(--accent) 55%, transparent);
}
.board-hero[data-mode="hold"] .board-clock { color: var(--warn); }
.board-hero[data-mode="scrubbed"] .board-clock { opacity: 0.35; }
.board-clock-sub {
  color: var(--muted);
  font-size: clamp(0.9rem, 1.7vw, 1.6rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.board .eyebrow { margin-top: clamp(8px, 2vh, 28px); font-size: clamp(0.9rem, 1.8vw, 1.7rem); }
.board-event {
  font-size: clamp(1.7rem, 5.2vw, 5.4rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
}
.board-until {
  color: var(--accent);
  font-size: clamp(1.5rem, 4.4vw, 4.6rem);
  font-weight: 700;
  line-height: 1.1;
}
.board-local { color: var(--muted); font-size: clamp(1rem, 2.1vw, 2.1rem); }
.board .hero-flash {
  align-self: center;
  margin-top: 0;
  padding: 0.3em 0.8em;
  font-size: clamp(1.4rem, 3.6vw, 3.6rem);
}
.board .now-line {
  justify-content: center;
  margin-top: 0;
  padding: clamp(10px, 1.4vw, 22px) clamp(14px, 2vw, 30px);
  border-left-width: 6px;
  font-size: clamp(1.15rem, 2.7vw, 2.8rem);
  text-align: center;
}
.board .now-pill { font-size: 0.55em; padding: 0.2em 0.8em; }
.board-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  color: var(--muted);
  font-size: clamp(0.85rem, 1.3vw, 1.25rem);
}
.board-foot strong { color: var(--text); }
.board-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.board-controls .tz-select { flex: 0 1 16rem; min-width: 0; min-height: 40px; }
.board .sim { margin-top: 0; }
.board .boot { margin: auto 0; }

/* ---------- Admin ---------- */

.admin-wrap { max-width: 760px; padding-bottom: 40px; }
.admin-title { font-size: clamp(1.7rem, 7vw, 2.6rem); }
.admin-lead { margin-top: 6px; color: var(--muted); }
.admin-card {
  min-width: 0;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.admin-card > h2 {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.admin-help { margin-top: 6px; color: var(--muted); font-size: 0.9rem; }
.admin-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin-top: 10px;
}
.admin-field { flex: 1 1 9rem; min-width: 0; }
.admin-field--narrow { flex: 1 1 4.5rem; }
.admin-field label,
.admin-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
}
.admin-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-solid);
  color: var(--text);
  font: inherit;
  color-scheme: dark;
}
.admin-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.admin-button {
  --tone: var(--ship);
  min-height: 56px;
  padding: 10px 12px;
  border: 2px solid var(--tone);
  border-radius: 14px;
  background: color-mix(in srgb, var(--tone) 16%, var(--panel-solid));
  color: #fff;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
}
.admin-button:hover { background: color-mix(in srgb, var(--tone) 30%, var(--panel-solid)); }
.admin-button:disabled { opacity: 0.5; cursor: progress; }
.admin-button small { display: block; color: var(--muted); font-size: 0.74rem; font-weight: 600; }
.admin-button--go { --tone: var(--ok); }
.admin-button--hold { --tone: var(--warn); }
.admin-button--lock { --tone: var(--booster); }
.admin-button--danger { --tone: var(--danger); }
.admin-button--chip { min-height: 46px; font-size: 0.95rem; }

.admin-state {
  display: grid;
  grid-template-columns: minmax(6.5rem, auto) minmax(0, 1fr);
  gap: 6px 14px;
  margin-top: 10px;
}
.admin-state dt {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  align-self: center;
}
.admin-state dd { min-width: 0; font-weight: 650; overflow-wrap: anywhere; }
.admin-clock { font-size: clamp(1.6rem, 8vw, 2.4rem); font-weight: 700; line-height: 1.1; }

.admin-message {
  position: sticky;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 5;
  margin-top: 14px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--panel-solid);
  font-weight: 650;
  overflow-wrap: anywhere;
}
.admin-message--ok { border-color: var(--ok); color: var(--ok); }
.admin-message--error { border-color: var(--danger); color: #ffd9d9; }
.admin-links { margin-top: 18px; color: var(--muted); font-size: 0.92rem; }

@media (min-width: 900px) {
  .now-marker::before { flex: 1 1 0; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .stars::before,
  .stars::after,
  .commit-cue::before,
  .hero[data-mode="now"] .hero-flash,
  .event.is-current .event-card { animation: none; }
  .sticky,
  .sticky.is-visible,
  .event-card { transition: none; }
  html { scroll-behavior: auto; }
}
