:root {
  --bg: #020808;
  --bg-deep: #010404;
  --panel: rgba(5, 20, 19, 0.93);
  --panel-2: rgba(4, 15, 15, 0.96);
  --green: #39ff88;
  --green-soft: #a8ffcb;
  --green-dim: #15945a;
  --green-dark: #073b27;
  --cyan: #58f7ff;
  --amber: #ffd166;
  --red: #ff647a;
  --text: #e0ffeb;
  --muted: #7fa995;
  --line: rgba(84, 230, 166, 0.24);
  --line-strong: rgba(84, 230, 166, 0.42);
  --shadow: 0 0 24px rgba(35, 190, 130, 0.09), inset 0 1px 0 rgba(170, 255, 210, 0.035);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg-deep); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Courier New", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 4%, rgba(32, 141, 105, 0.18), transparent 27rem),
    radial-gradient(circle at 86% 11%, rgba(45, 126, 156, 0.13), transparent 34rem),
    radial-gradient(circle at 48% 115%, rgba(20, 98, 77, 0.2), transparent 42rem),
    linear-gradient(145deg, #020909 0%, #071311 48%, #010506 100%);
  isolation: isolate;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -2;
  opacity: 0.72;
  background-image:
    linear-gradient(rgba(77, 220, 161, 0.052) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 220, 161, 0.052) 1px, transparent 1px),
    linear-gradient(rgba(88, 247, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 247, 255, 0.03) 1px, transparent 1px);
  background-size: 42px 42px, 42px 42px, 210px 210px, 210px 210px;
  mask-image: linear-gradient(to bottom, #000, rgba(0,0,0,.8) 65%, transparent);
}

body::after {
  z-index: -1;
  opacity: .42;
  background:
    radial-gradient(circle at 9% 23%, rgba(88,247,255,.72) 0 1px, transparent 2px),
    radial-gradient(circle at 21% 23%, rgba(57,255,136,.65) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 14%, rgba(57,255,136,.65) 0 1px, transparent 2px),
    radial-gradient(circle at 91% 34%, rgba(88,247,255,.65) 0 1px, transparent 2px),
    linear-gradient(90deg, transparent 9%, rgba(88,247,255,.09) 9.1%, transparent 9.2%, transparent 78%, rgba(57,255,136,.07) 78.1%, transparent 78.2%),
    linear-gradient(transparent 23%, rgba(57,255,136,.07) 23.1%, transparent 23.2%, transparent 72%, rgba(88,247,255,.06) 72.1%, transparent 72.2%);
}

button, a { font: inherit; }
a { color: inherit; }

.shell {
  width: min(1770px, calc(100% - 28px));
  margin: 14px auto 30px;
  position: relative;
}

.panel {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(7, 25, 23, 0.95), rgba(2, 12, 12, 0.92));
  box-shadow: var(--shadow), inset 0 0 36px rgba(0,0,0,.25);
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(95,255,180,.025), transparent 26%, transparent 76%, rgba(88,247,255,.02));
}

.topbar {
  min-height: 94px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-left: 4px solid var(--green);
}

.eyebrow, .object-line, .panel-heading, dt, .countdown-label, .pass-route span, footer,
.camera-toolbar small, .expedition-lockup span, .station-summary-grid span, .shadow-event span,
.facts-strip span, .model-overlay, .camera-footer, .camera-live-badge, .configuration-note {
  text-transform: uppercase;
  letter-spacing: .12em;
}

.eyebrow { color: var(--green); font-size: 12px; }
h1 {
  margin: 4px 0 4px;
  font-size: clamp(25px, 3vw, 43px);
  line-height: 1;
  text-shadow: 0 0 18px rgba(57,255,136,.36);
}
.object-line { color: var(--muted); font-size: 10px; }

.header-readouts { display: flex; gap: 26px; text-align: right; }
.header-readouts > div { display: grid; gap: 5px; }
.header-readouts span { color: var(--muted); font-size: 9px; letter-spacing: .14em; }
.header-readouts strong { color: var(--green-soft); font-size: 15px; white-space: nowrap; }
.state.live { color: var(--green); }
.state.stale { color: var(--amber); }
.state.failed { color: var(--red); }
.state.waiting { color: var(--cyan); }

.alert-bar {
  margin-top: 10px;
  min-height: 44px;
  padding: 10px 15px;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 11px;
  font-size: 12px;
}
.alert-bar strong { color: var(--green-soft); }
.alert-bar span:last-child { color: var(--muted); }
.alert-bar.warning { border-color: rgba(255,209,102,.45); }
.alert-bar.warning strong { color: var(--amber); }
.alert-bar.visible { border-color: rgba(255,255,255,.55); box-shadow: 0 0 28px rgba(57,255,136,.22); }
.alert-bar.error { border-color: rgba(255,100,122,.48); }
.alert-bar.error strong { color: var(--red); }
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 13px var(--green); animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .35; transform: scale(.75); } }

.panel-heading {
  min-height: 35px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--green);
  font-size: 10px;
}
.panel-heading span:last-child { color: var(--muted); }

.hero-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr) minmax(280px, .7fr);
  gap: 10px;
}
.next-pass-panel { min-height: 400px; }
.countdown {
  padding: 30px 18px 4px;
  color: var(--green-soft);
  font-size: clamp(43px, 5vw, 76px);
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-shadow: 0 0 22px rgba(57,255,136,.35);
}
.countdown.imminent { color: var(--amber); text-shadow: 0 0 22px rgba(255,209,102,.28); }
.countdown.active { color: #fff; animation: liveGlow 1.5s ease-in-out infinite; }
@keyframes liveGlow { 50% { text-shadow: 0 0 28px var(--green); } }
.countdown-label { text-align: center; color: var(--muted); font-size: 10px; }
.pass-route {
  margin: 28px 24px 22px;
  display: grid;
  grid-template-columns: minmax(100px,1fr) minmax(120px,1.2fr) minmax(100px,1fr);
  align-items: center;
  text-align: center;
  gap: 12px;
}
.pass-route > div:not(.route-line) { display: grid; gap: 5px; }
.pass-route span { color: var(--muted); font-size: 9px; }
.pass-route strong { font-size: 24px; color: var(--green-soft); }
.pass-route small { color: var(--cyan); }
.route-line { display: flex; align-items: center; color: var(--green); gap: 9px; }
.route-line i { height: 1px; background: linear-gradient(90deg, transparent, var(--green)); flex: 1; }
.route-line i:last-child { background: linear-gradient(90deg, var(--green), transparent); }
.route-line b { border: 1px solid var(--green); padding: 8px; border-radius: 50%; box-shadow: 0 0 14px rgba(57,255,136,.25); }
.mini-grid, .station-summary-grid, .facts-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.mini-grid > div, .station-summary-grid > div, .facts-strip > div {
  padding: 14px 12px;
  min-width: 0;
  border-right: 1px solid var(--line);
  display: grid;
  gap: 5px;
}
.mini-grid > div:last-child, .station-summary-grid > div:nth-child(2n), .facts-strip > div:last-child { border-right: 0; }
.mini-grid span, .station-summary-grid span, .facts-strip span { color: var(--muted); font-size: 8px; }
.mini-grid strong, .station-summary-grid strong, .facts-strip strong { color: var(--green-soft); font-size: 14px; overflow-wrap: anywhere; }

.radar-panel { min-height: 400px; }
#sky-radar { display: block; width: 100%; height: 315px; }
.radar-footer { min-height: 48px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3,1fr); align-items: center; text-align: center; font-size: 10px; color: var(--muted); }
.radar-footer span + span { border-left: 1px solid var(--line); }
.radar-footer strong { color: var(--green-soft); }

.station-summary-panel { min-height: 400px; }
.expedition-lockup { padding: 24px 18px 18px; display: grid; gap: 8px; }
.expedition-lockup span { color: var(--muted); font-size: 9px; }
.expedition-lockup strong { color: var(--green-soft); font-size: clamp(24px, 3vw, 36px); line-height: 1; }
.expedition-lockup small { color: var(--cyan); line-height: 1.5; }
.station-summary-grid { grid-template-columns: repeat(2, 1fr); }
.station-summary-grid > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.station-summary-grid strong { font-size: 19px; }
.shadow-event { margin: 16px; padding: 13px; border: 1px solid var(--line); background: rgba(2,10,10,.55); display: grid; gap: 6px; }
.shadow-event span { color: var(--muted); font-size: 8px; }
.shadow-event strong { color: var(--amber); font-size: 13px; }

.camera-section, .station-grid, .operations-grid, .map-and-telemetry, .lower-grid { margin-top: 10px; }
.camera-heading { background: linear-gradient(90deg, rgba(57,255,136,.06), transparent); }
.camera-toolbar {
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr)) auto;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(1,8,8,.65);
}
.camera-source, .camera-external-link {
  min-height: 54px;
  border: 1px solid var(--line);
  background: rgba(4,18,17,.85);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  padding: 9px 11px;
  display: grid;
  align-content: center;
  gap: 4px;
  text-align: left;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.camera-source strong { color: var(--green-soft); font-size: 12px; }
.camera-source small { color: var(--muted); font-size: 7px; }
.camera-source:hover, .camera-external-link:hover { border-color: var(--line-strong); background: rgba(9,35,30,.85); }
.camera-source.active { border-color: var(--green); background: rgba(18,66,47,.48); box-shadow: inset 3px 0 0 var(--green), 0 0 16px rgba(57,255,136,.08); }
.camera-external-link { text-align: center; min-width: 120px; color: var(--cyan); font-size: 9px; letter-spacing: .1em; }
.camera-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8.6;
  min-height: 420px;
  background: #030707;
  overflow: hidden;
}
.camera-stage::before {
  content: ""; position: absolute; inset: 12px; border: 1px solid rgba(84,230,166,.16); pointer-events: none; z-index: 4;
}
.camera-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: linear-gradient(rgba(255,255,255,.014) 50%, rgba(0,0,0,.02) 50%); background-size: 100% 4px; opacity: .42;
}
.camera-player, .camera-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.camera-player { z-index: 1; }
.camera-offline {
  position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; text-align: center; padding: 30px;
  background: radial-gradient(circle, rgba(9,40,31,.9), rgba(2,8,8,.98));
  transition: opacity .25s, visibility .25s;
}
.camera-stage.live .camera-offline { opacity: 0; visibility: hidden; }
.camera-offline h2 { color: var(--green-soft); margin: 11px 0 5px; font-size: 30px; letter-spacing: .12em; }
.camera-offline p { color: var(--muted); max-width: 650px; line-height: 1.55; }
.camera-reticle { width: 108px; height: 108px; border: 1px solid var(--green); border-radius: 50%; position: relative; box-shadow: 0 0 24px rgba(57,255,136,.16); }
.camera-reticle::before, .camera-reticle::after { content:""; position:absolute; background:var(--green); opacity:.55; }
.camera-reticle::before { width:1px; height:140%; left:50%; top:-20%; }
.camera-reticle::after { height:1px; width:140%; top:50%; left:-20%; }
.camera-lock-code { margin-top: 22px; color: var(--cyan); font-size: 9px; letter-spacing: .17em; }
.camera-contact { margin-top: 18px; border: 1px solid var(--line); padding: 10px 13px; display: grid; gap: 5px; }
.camera-contact span { color: var(--muted); font-size: 8px; letter-spacing: .12em; }
.camera-contact strong { color: var(--green-soft); font-size: 11px; }
.camera-live-badge { position: absolute; z-index: 5; top: 23px; left: 23px; border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.72); padding: 8px 11px; font-size: 8px; display: flex; gap: 8px; align-items: center; }
.camera-live-badge span { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 9px var(--red); }
.camera-footer { min-height: 36px; padding: 9px 12px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 7px; border-top: 1px solid var(--line); }

.station-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, .8fr);
  gap: 10px;
}
.model-panel { min-height: 670px; }
.model-stage { position: relative; height: 575px; background: radial-gradient(circle at 50% 45%, rgba(23,75,62,.42), rgba(1,6,7,.98) 68%); overflow: hidden; }
model-viewer { width: 100%; height: 100%; --poster-color: transparent; --progress-bar-color: var(--green); background: transparent; }
.model-progress { position: absolute; width: 60%; height: 4px; left: 20%; bottom: 22px; background: rgba(57,255,136,.12); }
.model-progress i { display:block; height:100%; width:38%; background:var(--green); box-shadow:0 0 12px var(--green); animation: modelLoad 1.3s ease-in-out infinite alternate; }
@keyframes modelLoad { to { transform: translateX(160%); } }
.model-overlay { position: absolute; z-index: 2; color: var(--muted); font-size: 8px; pointer-events: none; }
.model-overlay.top-left { top: 15px; left: 15px; }
.model-overlay.bottom-left { bottom: 15px; left: 15px; color: var(--amber); }
.model-fallback { position: absolute; z-index: 3; right: 15px; bottom: 15px; border: 1px solid var(--line); background: rgba(0,0,0,.6); color: var(--cyan); text-decoration: none; padding: 8px 10px; font-size: 8px; }
.facts-strip { grid-template-columns: repeat(4,1fr); }

.station-side-stack { display: grid; grid-template-rows: minmax(0,1fr) auto; gap: 10px; }
.crew-panel { min-height: 385px; }
.crew-list { padding: 10px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
.crew-card, .vehicle-card, .operation-card, .empty-card {
  border: 1px solid rgba(84,230,166,.16);
  background: rgba(2,11,11,.66);
  padding: 10px;
}
.crew-card { min-height: 74px; display: grid; align-content: center; gap: 4px; }
.crew-card strong { color: var(--green-soft); font-size: 11px; line-height: 1.25; }
.crew-card span { color: var(--cyan); font-size: 8px; }
.crew-card small { color: var(--muted); font-size: 8px; }
.vehicles-panel { min-height: 274px; }
.vehicles-list { padding: 10px; display: grid; gap: 6px; }
.vehicle-card { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
.vehicle-card strong { color: var(--green-soft); font-size: 11px; }
.vehicle-card b { color: var(--amber); font-size: 8px; font-weight: normal; text-transform: uppercase; }
.vehicle-card span, .vehicle-card small { color: var(--muted); font-size: 8px; }
.vehicle-card small { grid-column: 1 / -1; }
.configuration-note { margin: 0; padding: 0 11px 12px; color: var(--muted); font-size: 7px; line-height: 1.55; }
.empty-card { color: var(--muted); min-height: 70px; display: grid; place-content: center; text-align: center; }

.operations-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(380px,.7fr); gap:10px; }
.operations-list { padding: 10px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap:8px; }
.operation-card { text-decoration: none; display: grid; gap: 7px; min-height: 132px; transition: border-color .2s, transform .2s, background .2s; }
.operation-card:hover { border-color: var(--line-strong); background: rgba(8,31,27,.8); transform: translateY(-1px); }
.operation-card time { color: var(--cyan); font-size: 8px; letter-spacing: .08em; }
.operation-card strong { color: var(--green-soft); font-size: 12px; line-height: 1.32; }
.operation-card p { margin:0; color:var(--muted); font-size:9px; line-height:1.45; }
.telemetry-panel dl, .system-panel dl { margin: 0; }
.telemetry-panel dl > div, .system-panel dl > div { min-height: 45px; padding: 10px 12px; display: flex; justify-content: space-between; gap: 12px; align-items: center; border-bottom: 1px solid rgba(84,230,166,.12); }
.telemetry-panel dl > div:last-child, .system-panel dl > div:last-child { border-bottom: 0; }
dt { color: var(--muted); font-size: 8px; }
dd { margin:0; color:var(--green-soft); font-size:11px; text-align:right; }

.map-and-telemetry { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(330px,.55fr); gap:10px; }
.map-panel { min-height: 540px; }
#world-map { display:block; width:100%; height:465px; }
.map-key { min-height:38px; padding:9px 12px; border-top:1px solid var(--line); display:flex; flex-wrap:wrap; gap:18px; align-items:center; color:var(--muted); font-size:8px; letter-spacing:.1em; }
.map-key span { display:flex; gap:7px; align-items:center; }
.key-dot { width:7px; height:7px; border-radius:50%; display:inline-block; }
.key-dot.iss { background:var(--green); box-shadow:0 0 8px var(--green); }
.key-dot.jersey { background:var(--amber); box-shadow:0 0 8px var(--amber); }
.key-line { display:inline-block; width:22px; height:1px; }
.key-line.past { background:var(--green-dim); }
.key-line.future { background:var(--green); box-shadow:0 0 6px var(--green); }
.telemetry-stack { display:grid; grid-template-rows:auto 1fr; gap:10px; }
.fact-panel { padding-bottom: 12px; }
.fact-panel p { margin: 12px 13px 0; color:var(--muted); font-size:9px; line-height:1.55; }
.fact-panel p::before { content:"> "; color:var(--green); }

.lower-grid { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(350px,.65fr); gap:10px; }
.table-wrap { overflow:auto; }
table { width:100%; border-collapse:collapse; font-size:10px; }
th, td { padding:11px 12px; border-bottom:1px solid rgba(84,230,166,.12); text-align:left; white-space:nowrap; }
th { color:var(--muted); font-size:8px; letter-spacing:.1em; }
td { color:#bdebd0; }
td strong { color:var(--green-soft); }
td.empty { color:var(--muted); text-align:center; padding:25px; }
.terminal-panel { min-height:300px; }
.terminal-log { padding:12px; height:260px; overflow:hidden; color:#8de8b3; font-size:9px; line-height:1.5; }
.terminal-log p { margin:0 0 5px; }
.cursor { animation:cursor 1s steps(1) infinite; }
@keyframes cursor { 50% { opacity:0; } }

footer { margin-top:10px; padding:10px 4px; display:flex; justify-content:space-between; gap:16px; color:var(--muted); font-size:7px; }

@media (max-width: 1240px) {
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .station-summary-panel { grid-column: 1 / -1; min-height: auto; }
  .station-summary-panel .expedition-lockup { padding-bottom: 12px; }
  .station-summary-grid { grid-template-columns: repeat(4,1fr); }
  .station-summary-grid > div:nth-child(-n+2) { border-bottom: 0; }
  .station-summary-grid > div:nth-child(2) { border-right:1px solid var(--line); }
  .station-grid, .operations-grid, .map-and-telemetry, .lower-grid { grid-template-columns:1fr; }
  .station-side-stack { grid-template-columns:1fr 1fr; grid-template-rows:auto; }
  .telemetry-stack { grid-template-columns:1fr 1fr; grid-template-rows:auto; }
}

@media (max-width: 850px) {
  .shell { width:min(100% - 14px,1770px); margin-top:7px; }
  .topbar { align-items:flex-start; flex-direction:column; }
  .header-readouts { width:100%; justify-content:space-between; text-align:left; gap:12px; }
  .header-readouts strong { font-size:12px; }
  .hero-grid { grid-template-columns:1fr; }
  .station-summary-panel { grid-column:auto; }
  .camera-toolbar { grid-template-columns:1fr; }
  .camera-external-link { min-height:40px; }
  .camera-stage { min-height:280px; }
  .station-side-stack, .telemetry-stack { grid-template-columns:1fr; }
  .operations-list { grid-template-columns:1fr; }
  .model-panel { min-height:auto; }
  .model-stage { height:430px; }
  .camera-footer, footer { flex-direction:column; }
}

@media (max-width: 560px) {
  h1 { font-size:25px; }
  .alert-bar { grid-template-columns:auto 1fr; }
  .alert-bar span:last-child { grid-column:1 / -1; }
  .header-readouts { display:grid; grid-template-columns:1fr 1fr; }
  .header-readouts > div:last-child { grid-column:1 / -1; }
  .pass-route { margin-left:10px; margin-right:10px; grid-template-columns:1fr; }
  .route-line { transform:rotate(90deg); margin:12px auto; width:100px; }
  .mini-grid, .facts-strip, .station-summary-grid { grid-template-columns:repeat(2,1fr); }
  .mini-grid > div:nth-child(2), .facts-strip > div:nth-child(2) { border-right:0; }
  .mini-grid > div:nth-child(-n+2), .facts-strip > div:nth-child(-n+2) { border-bottom:1px solid var(--line); }
  .crew-list { grid-template-columns:1fr; }
  #sky-radar { height:280px; }
  #world-map { height:320px; }
  .map-panel { min-height:auto; }
  .model-stage { height:340px; }
  .model-overlay.bottom-left { max-width:180px; }
}


/* === GRUNTY LOCAL SATELLITE PANEL v1 === */
.status-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(330px, .72fr);
  gap: 10px;
}

.status-grid .next-pass-panel,
.status-grid .station-summary-panel {
  min-height: 360px;
}

.observation-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(360px, .72fr) minmax(560px, 1.45fr);
  gap: 10px;
  align-items: stretch;
}

.observation-grid .radar-panel,
.observation-grid .satellite-panel {
  min-height: 430px;
}

.observation-grid #sky-radar {
  height: 345px;
}

.satellite-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.satellite-video-stage {
  position: relative;
  min-height: 350px;
  background:
    radial-gradient(circle at 50% 50%, rgba(21, 80, 63, .2), transparent 50%),
    #010505;
  overflow: hidden;
}

.satellite-video-stage::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 3;
  border: 1px solid rgba(84, 230, 166, .18);
  pointer-events: none;
}

.satellite-video-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .3;
  background: linear-gradient(rgba(255,255,255,.018) 50%, transparent 50%);
  background-size: 100% 4px;
}

#satellite-current-video {
  width: 100%;
  height: 100%;
  min-height: 350px;
  display: block;
  object-fit: contain;
  background: #000;
}

.satellite-video-hud {
  position: absolute;
  z-index: 4;
  top: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--green-soft);
  font-size: 8px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px #000;
  pointer-events: none;
}

.satellite-rec {
  padding: 7px 9px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(0,0,0,.68);
}

.satellite-rec i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

#satellite-video-clock {
  padding: 7px 9px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.58);
}

.satellite-video-error {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  background: rgba(1,7,7,.94);
}

.satellite-video-error[hidden] { display: none; }
.satellite-video-error strong { color: var(--red); letter-spacing: .12em; }
.satellite-video-error span { color: var(--muted); font-size: 10px; }

.satellite-video-footer {
  min-height: 38px;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 7px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.satellite-video-footer a {
  color: var(--cyan);
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 1240px) {
  .status-grid { grid-template-columns: 1fr; }
  .status-grid .station-summary-panel { min-height: auto; }
  .observation-grid { grid-template-columns: minmax(330px, .8fr) minmax(470px, 1.2fr); }
}

@media (max-width: 900px) {
  .observation-grid { grid-template-columns: 1fr; }
  .observation-grid .radar-panel,
  .observation-grid .satellite-panel { min-height: auto; }
  .satellite-video-stage,
  #satellite-current-video { min-height: 280px; }
}

@media (max-width: 560px) {
  .satellite-video-hud { top: 16px; left: 16px; right: 16px; }
  .satellite-video-footer { align-items: flex-start; flex-direction: column; }
}
/* === END GRUNTY LOCAL SATELLITE PANEL v1 === */


/* === EQUAL RADAR + SATELLITE PANELS v2 === */
/* Keep the local satellite loop exactly the same footprint as Local Sky Radar. */
.observation-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.observation-grid .radar-panel,
.observation-grid .satellite-panel {
  width: 100%;
  min-width: 0;
  min-height: 430px;
}

.observation-grid #sky-radar,
.observation-grid .satellite-video-stage,
.observation-grid #satellite-current-video {
  height: 345px;
  min-height: 345px;
  max-height: 345px;
}

@media (max-width: 900px) {
  .observation-grid {
    grid-template-columns: 1fr;
  }

  .observation-grid .radar-panel,
  .observation-grid .satellite-panel {
    min-height: auto;
  }

  .observation-grid #sky-radar,
  .observation-grid .satellite-video-stage,
  .observation-grid #satellite-current-video {
    height: 300px;
    min-height: 300px;
    max-height: 300px;
  }
}
/* === END EQUAL RADAR + SATELLITE PANELS v2 === */


/* === ISS 3D MODEL REPAIR v3 === */
/* The poster sits behind the WebGL layer, so the station is never a blank panel. */
.model-stage {
  position: relative;
  isolation: isolate;
  background-image:
    radial-gradient(circle at 50% 45%, rgba(23,75,62,.30), rgba(1,6,7,.90) 70%),
    url("assets/iss-nasa.png?v=1782498856");
  background-repeat: no-repeat, no-repeat;
  background-position: center, center;
  background-size: cover, min(78%, 980px) auto;
}

#iss-model {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
  --poster-color: transparent;
  --progress-bar-color: var(--green);
  --progress-bar-height: 3px;
}

#iss-model::part(default-progress-bar) {
  height: 3px;
  background: var(--green);
  box-shadow: 0 0 12px rgba(57,255,136,.8);
}

.model-progress { display: none !important; }
.model-stage .model-overlay,
.model-stage .model-fallback,
.model-stage .model-reset-view { z-index: 3; }

.model-reset-view {
  position: absolute;
  right: 145px;
  bottom: 15px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.64);
  color: var(--green-soft);
  padding: 8px 10px;
  font: inherit;
  font-size: 8px;
  letter-spacing: .1em;
  cursor: pointer;
}
.model-reset-view:hover { border-color: var(--green); color: var(--green); }

.model-stage.model-error #iss-model { opacity: .08; pointer-events: none; }
.model-stage.model-error::after {
  content: "3D RENDERER UNAVAILABLE — SHOWING NASA MODEL IMAGE";
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.78);
  color: var(--amber);
  font-size: 9px;
  letter-spacing: .1em;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .model-stage { background-size: cover, 90% auto; }
  .model-reset-view { right: 15px; bottom: 52px; }
}
/* === END ISS 3D MODEL REPAIR v3 === */


/* === ISS 3D INTERACTION FIX === */
.model-stage { position: relative; }
#iss-model {
  position: absolute !important;
  inset: 0 !important;
  z-index: 5 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  pointer-events: auto !important;
  cursor: grab;
  user-select: none;
  touch-action: none;
  --poster-color: transparent;
}
#iss-model:active { cursor: grabbing; }
.model-stage .model-overlay { pointer-events: none !important; z-index: 7 !important; }
.model-stage .model-fallback,
.model-stage .model-reset-view { z-index: 8 !important; }

/* Once the WebGL model has produced a frame, remove the static poster behind it. */
.model-stage.model-interactive {
  background-image: radial-gradient(circle at 50% 45%, rgba(23,75,62,.30), rgba(1,6,7,.94) 70%) !important;
}
.model-stage.model-interactive::after { display: none !important; }
.model-stage.model-interactive #iss-model { opacity: 1 !important; }

.model-interaction-state {
  position: absolute;
  left: 50%;
  bottom: 15px;
  transform: translateX(-50%);
  z-index: 8;
  pointer-events: none;
  border: 1px solid rgba(84,230,166,.28);
  background: rgba(0,8,8,.72);
  color: var(--green-soft);
  padding: 6px 9px;
  font-size: 8px;
  letter-spacing: .11em;
}
/* === END ISS 3D INTERACTION FIX === */
