/* ISS Orbital Explorer — mission-control chrome */
:root {
  --beta: #edeae2;
  --beta-2: #c9c6be;
  --truss: #8e98a3;
  --truss-2: #5f6873;
  --amber: #f2a93b;
  --amber-2: #ffcf7f;
  --limb: #6db8ff;
  --live: #5be49b;
  --rec: #ff5a4e;
  --glass: rgba(12, 18, 26, 0.68);
  --glass-2: rgba(16, 24, 34, 0.84);
  --hair: rgba(237, 234, 226, 0.11);
  --hair-2: rgba(237, 234, 226, 0.2);
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --cond: 'IBM Plex Sans Condensed', 'IBM Plex Sans', system-ui, sans-serif;
  --r: 3px;
  --pad: 16px;
  --top-h: 56px;
  --time-h: 86px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; color: var(--beta); font-family: var(--sans); overflow: hidden; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible, [tabindex]:focus-visible, input:focus-visible, select:focus-visible { outline: 1.5px solid var(--amber); outline-offset: 2px; }
canvas#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; touch-action: none; }
.hidden { display: none !important; }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* viewfinder corner marks */
#frame i { position: fixed; width: 18px; height: 18px; border-color: rgba(237, 234, 226, .28); border-style: solid; border-width: 0; pointer-events: none; z-index: 2; transition: opacity .6s; }
#frame .tl { top: 12px; left: 12px; border-top-width: 1px; border-left-width: 1px; }
#frame .tr { top: 12px; right: 12px; border-top-width: 1px; border-right-width: 1px; }
#frame .bl { bottom: 12px; left: 12px; border-bottom-width: 1px; border-left-width: 1px; }
#frame .br { bottom: 12px; right: 12px; border-bottom-width: 1px; border-right-width: 1px; }

.ui { position: fixed; inset: 0; pointer-events: none; z-index: 10; transition: opacity .5s var(--ease); }
.ui > * { pointer-events: auto; }
body.cinema .ui > *:not(.caption):not(.title-card):not(.cine-hud):not(.toast) { opacity: 0; pointer-events: none; transition: opacity .6s var(--ease); }
body.cinema.reveal .ui > .top { opacity: 1; pointer-events: auto; }
body.cinema #labels, body.cinema #frame { opacity: 0; }
.inside .glass, .inside .card { background: rgba(12, 18, 26, .88); }
.glass { background: var(--glass); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border: 1px solid var(--hair); border-radius: var(--r); }

/* ---------- top bar ---------- */
.top { position: fixed; top: 0; left: 0; right: 0; height: var(--top-h); display: flex; align-items: center; gap: 16px; padding: 0 20px 0 22px; pointer-events: none; }
.top > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 210px; }
.brand strong { font-family: var(--cond); font-weight: 600; font-size: 18px; letter-spacing: .01em; display: block; line-height: 1; white-space: nowrap; }
.brand span { font-family: var(--mono); font-size: 11px; color: var(--truss); display: block; margin-top: 3px; }
.modes { margin: 0 auto; display: flex; padding: 3px; gap: 2px; }
.modes button { font-family: var(--cond); font-weight: 500; font-size: 14.5px; padding: 7px 18px; border-radius: 2px; color: var(--beta-2); transition: background .2s, color .2s; }
.modes button:hover { color: var(--beta); background: rgba(237, 234, 226, .06); }
.modes button[aria-selected="true"] { background: var(--beta); color: #0d131a; }
.tools { display: flex; align-items: center; gap: 2px; padding: 3px; }
.tools button { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px; border-radius: 2px; color: var(--beta-2); font-size: 13px; transition: background .2s, color .2s; }
.tools button span { white-space: nowrap; }
.tools button:hover { background: rgba(237, 234, 226, .07); color: var(--beta); }
.tools button[aria-pressed="true"] { color: var(--amber); }
.tools button.on { background: rgba(242, 169, 59, .14); color: var(--amber-2); }
.tools .sep { width: 1px; height: 20px; background: var(--hair-2); margin: 0 4px; }
.tools .compact span { display: none; }

/* ---------- telemetry console (left) ---------- */
.rail { position: fixed; left: 16px; top: calc(var(--top-h) + 8px); bottom: 16px; width: 256px; padding: 14px 16px 12px; font-family: var(--mono); display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail .clock { font-size: 30px; font-weight: 500; letter-spacing: .01em; line-height: 1; font-variant-numeric: tabular-nums; }
.rail .clock small { font-size: 12px; color: var(--truss); margin-left: 6px; font-weight: 400; }
.rail .date { font-size: 11.5px; color: var(--truss); margin: 7px 0 0; }
.rail .state { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--live); margin-top: 9px; padding: 3px 7px; border: 1px solid rgba(91, 228, 155, .3); border-radius: 2px; }
.rail .state.warp { color: var(--amber); border-color: rgba(242, 169, 59, .4); }
.rail .state.sim { color: var(--limb); border-color: rgba(109, 184, 255, .4); }
.rail .state.paused { color: var(--truss); border-color: var(--hair-2); }
.rail dl { margin: 12px 0 0; display: grid; grid-template-columns: 54px 1fr; }
.rail dt, .rail dd { margin: 0; padding: 6px 0; border-top: 1px solid var(--hair); font-size: 12.5px; line-height: 1.35; }
.rail dt { color: var(--truss); font-size: 11px; padding-top: 7.5px; }
.rail dd { font-variant-numeric: tabular-nums; color: var(--beta); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail dd em { font-style: normal; color: var(--truss); }
.rail dd.wrap { white-space: normal; text-align: right; }
.rail .bar { height: 3px; background: rgba(237, 234, 226, .1); margin-top: 5px; position: relative; overflow: hidden; border-radius: 1px; }
.rail .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--amber); }
.rail .sun-day { color: var(--amber-2); }
.rail .sun-night { color: var(--limb); }
.rail .foot { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--hair); font-size: 10.5px; color: var(--truss-2); line-height: 1.5; flex: none; }
.rail .toggle { position: absolute; right: 8px; top: 8px; width: 24px; height: 24px; display: grid; place-items: center; color: var(--truss); border-radius: 2px; }
.rail .toggle:hover { color: var(--beta); background: rgba(237, 234, 226, .06); }
.rail.min { bottom: auto; width: auto; padding: 10px 44px 10px 14px; }
.rail.min dl, .rail.min .date, .rail.min .foot, .rail.min .state, .rail.min .mapbox { display: none; }
.rail.min .clock { font-size: 20px; }
.crew-line { cursor: pointer; }
.crew-line:hover { color: var(--amber-2); }

/* ground track inside the console */
.mapbox { margin-top: 12px; border-top: 1px solid var(--hair); padding-top: 9px; flex: none; display: flex; flex-direction: column; }
.rail .spacer { flex: 1 1 auto; }
.mapbox header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.mapbox header b { font-family: var(--cond); font-weight: 600; font-size: 13.5px; }
.mapbox header button { width: 24px; height: 24px; display: grid; place-items: center; color: var(--truss); border-radius: 2px; }
.mapbox header button:hover { color: var(--beta); background: rgba(237, 234, 226, .07); }
.mapbox canvas { display: block; width: 100%; aspect-ratio: 2 / 1; max-height: 100%; cursor: crosshair; border: 1px solid var(--hair); border-radius: 2px; flex: none; }
.mapbox .hint { font-family: var(--mono); font-size: 10.5px; color: var(--truss-2); margin-top: 6px; line-height: 1.45; }
.mapbox.big { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(1100px, 92vw); z-index: 30; padding: 14px 16px 12px; margin: 0; border: 1px solid var(--hair-2); border-radius: var(--r); background: var(--glass-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.mapbox.big canvas { width: 100%; }
@media (max-height: 840px) { .mapbox:not(.big) .hint { display: none; } }
@media (max-height: 700px) { .mapbox:not(.big) canvas { display: none; } }

/* ---------- info card (placard) ---------- */
.card { position: fixed; right: 16px; top: calc(var(--top-h) + 8px); bottom: calc(var(--time-h) + 22px); width: 392px; display: flex; flex-direction: column; overflow: hidden; transform: translateX(0); transition: transform .45s var(--ease), opacity .3s; background: var(--glass-2); }
.card[hidden] { display: flex !important; transform: translateX(calc(100% + 30px)); opacity: 0; pointer-events: none; }
.card .head { padding: 18px 20px 14px; border-bottom: 1px solid var(--hair); position: relative; }
.card .kind { font-family: var(--mono); font-size: 11.5px; color: var(--truss); display: flex; align-items: center; gap: 8px; }
.card .kind .ag { display: inline-flex; align-items: center; gap: 6px; color: var(--beta-2); }
.card .kind .ag i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.card h2 { font-family: var(--cond); font-weight: 600; font-size: 34px; line-height: 1.02; margin: 10px 0 0; letter-spacing: -.005em; }
.card .sub { font-family: var(--cond); font-size: 16px; color: var(--truss); margin-top: 4px; }
.card .x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 2px; color: var(--truss); }
.card .x:hover { background: rgba(237, 234, 226, .07); color: var(--beta); }
.card .scroll { overflow-y: auto; padding: 16px 20px 20px; flex: 1; scrollbar-width: thin; scrollbar-color: rgba(237, 234, 226, .2) transparent; }
.card .lede { font-size: 17px; line-height: 1.5; color: var(--beta); margin: 0 0 16px; }
.card .stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--hair-2); border-left: 1px solid var(--hair); margin-bottom: 18px; }
.card .stats div { padding: 9px 10px 10px; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); min-width: 0; }
.card .stats b { display: block; font-family: var(--mono); font-weight: 400; font-size: 10.5px; color: var(--truss); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .stats span { font-family: var(--mono); font-size: 14px; color: var(--beta); }
.card .arrive { font-family: var(--mono); font-size: 12px; color: var(--beta-2); margin: -4px 0 16px; display: flex; gap: 14px; flex-wrap: wrap; }
.card .arrive em { font-style: normal; color: var(--truss); margin-right: 6px; }
.card p { font-size: 15px; line-height: 1.62; color: rgba(237, 234, 226, .86); margin: 0 0 12px; max-width: 62ch; }
.card h3 { font-family: var(--cond); font-weight: 600; font-size: 15px; color: var(--amber-2); margin: 20px 0 8px; letter-spacing: .01em; }
.card .facts { list-style: none; padding: 0; margin: 0; }
.card .facts li { position: relative; padding: 10px 0 10px 18px; border-top: 1px solid var(--hair); font-size: 14.5px; line-height: 1.55; color: rgba(237, 234, 226, .86); }
.card .facts li::before { content: ''; position: absolute; left: 2px; top: 18px; width: 6px; height: 6px; border: 1.2px solid var(--amber); transform: rotate(45deg); }
.card .inside { border-left: 2px solid var(--amber); padding: 2px 0 2px 14px; margin: 4px 0 6px; }
.card .actions { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--hair); flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 2px; border: 1px solid var(--hair-2); font-size: 13.5px; color: var(--beta); transition: background .2s, border-color .2s; }
.btn:hover { background: rgba(237, 234, 226, .07); border-color: rgba(237, 234, 226, .35); }
.btn.primary { background: var(--amber); color: #1b1307; border-color: var(--amber); font-weight: 500; }
.btn.primary:hover { background: var(--amber-2); }
.btn.ghost { border-color: transparent; color: var(--beta-2); }
.card .crewlist { margin: 0; padding: 0; list-style: none; }
.card .crewlist li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--hair); font-size: 14px; }
.card .crewlist li span:last-child { font-family: var(--mono); font-size: 12px; color: var(--truss); }
.card .now { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid rgba(91, 228, 155, .25); background: rgba(91, 228, 155, .05); border-radius: 2px; margin-bottom: 14px; font-size: 14px; }
.card .now i { width: 7px; height: 7px; border-radius: 50%; background: var(--live); flex: none; }

/* ---------- time + orbit band ---------- */
.time { position: fixed; left: calc(16px + 256px + 16px); right: 16px; bottom: 16px; max-width: 1100px; height: var(--time-h); display: grid; grid-template-columns: auto 1fr; gap: 0; overflow: hidden; }
.time .ctl { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 10px 12px; border-right: 1px solid var(--hair); }
.time .row { display: flex; gap: 4px; }
.time .row button { height: 30px; min-width: 30px; padding: 0 9px; border-radius: 2px; font-family: var(--mono); font-size: 12px; color: var(--beta-2); border: 1px solid var(--hair); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.time .row button:hover { border-color: var(--hair-2); color: var(--beta); }
.time .row button[aria-pressed="true"] { background: var(--beta); color: #0d131a; border-color: var(--beta); }
.time .row button.now[aria-pressed="true"] { background: var(--live); border-color: var(--live); color: #062013; }
.time .row button.warp[aria-pressed="true"] { background: var(--amber); border-color: var(--amber); color: #1b1307; }
.time .offset { font-family: var(--mono); font-size: 11px; color: var(--truss); padding-left: 2px; }
.time .band { position: relative; cursor: ew-resize; }
.time .band canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- popovers / drawers ---------- */
.pop { position: fixed; top: calc(var(--top-h) + 8px); right: 16px; width: 360px; max-height: calc(100vh - var(--top-h) - var(--time-h) - 40px); overflow: auto; padding: 16px 18px 18px; z-index: 25; background: var(--glass-2); transition: opacity .25s, transform .3s var(--ease); scrollbar-width: thin; }
.pop[hidden] { display: block !important; opacity: 0; transform: translateY(-6px); pointer-events: none; }
.pop h4 { font-family: var(--cond); font-weight: 600; font-size: 20px; margin: 0 0 4px; }
.pop .intro-text { font-size: 14px; color: var(--beta-2); line-height: 1.55; margin: 0 0 14px; }
.pop .list { list-style: none; margin: 0; padding: 0; }
.pop .item { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 10px; border-top: 1px solid var(--hair); border-radius: 2px; cursor: pointer; }
.pop .item:hover { background: rgba(237, 234, 226, .05); }
.pop .item b { font-family: var(--cond); font-weight: 600; font-size: 16px; }
.pop .item small { grid-column: 1 / -1; font-size: 13.5px; color: var(--beta-2); line-height: 1.5; }
.pop .item .meta { font-family: var(--mono); font-size: 11px; color: var(--truss); }
.pop .item.ev { cursor: default; align-items: start; }
.pop .item.ev .meta { color: var(--amber-2, var(--amber)); padding-top: 3px; }
.pop .item.ev small.desc { color: var(--truss); font-size: 13px; }
.pop .item.ev.past { opacity: .55; }
.pop .item .acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pop .item .acts .btn { height: 30px; font-size: 12.5px; padding: 0 10px; text-decoration: none; }
.pop .live-foot { display: flex; gap: 12px; align-items: center; justify-content: space-between; border-top: 1px solid var(--hair); margin-top: 6px; padding-top: 12px; font-size: 12px; color: var(--truss); line-height: 1.45; }
.pop .live-foot .btn { flex: none; height: 30px; font-size: 12.5px; }
.rail dd.next-line { cursor: pointer; }
.pop .seg { display: flex; border: 1px solid var(--hair-2); border-radius: 2px; overflow: hidden; margin: 6px 0 14px; }
.pop .seg button { flex: 1; padding: 9px 8px; font-size: 13.5px; color: var(--beta-2); }
.pop .seg button[aria-pressed="true"] { background: var(--beta); color: #0d131a; }
.pop label.field { display: block; font-size: 12.5px; color: var(--truss); margin: 12px 0 6px; }
.pop select, .pop input[type="text"], .pop input[type="number"] { width: 100%; background: rgba(0, 0, 0, .3); border: 1px solid var(--hair-2); color: var(--beta); font: inherit; font-size: 14px; padding: 8px 10px; border-radius: 2px; }
.pop input[type="range"] { width: 100%; accent-color: var(--amber); }
.pop .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pop .note { font-size: 12.5px; color: var(--truss); line-height: 1.5; margin-top: 12px; }
.pop .stream { display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-top: 1px solid var(--hair); cursor: pointer; border-radius: 2px; }
.pop .stream:hover { background: rgba(237, 234, 226, .05); }
.pop .stream .eq { width: 16px; height: 14px; display: flex; gap: 2px; align-items: flex-end; }
.pop .stream .eq i { flex: 1; background: var(--truss-2); height: 30%; }
.pop .stream.on .eq i { background: var(--amber); animation: eq 1s infinite ease-in-out alternate; }
.pop .stream.on .eq i:nth-child(2) { animation-delay: -.4s; }
.pop .stream.on .eq i:nth-child(3) { animation-delay: -.7s; }
@keyframes eq { from { height: 20%; } to { height: 100%; } }
.pop .stream b { font-weight: 500; font-size: 14.5px; display: block; }
.pop .stream small { font-size: 12.5px; color: var(--truss); }
.pop .keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13.5px; color: var(--beta-2); }
.pop kbd { font-family: var(--mono); font-size: 11.5px; color: var(--beta); border: 1px solid var(--hair-2); border-bottom-width: 2px; border-radius: 3px; padding: 1px 6px; justify-self: start; white-space: nowrap; }

/* pass list */
.passes .pass { padding: 11px 10px; border-top: 1px solid var(--hair); cursor: pointer; border-radius: 2px; display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; }
.passes .pass:hover, .passes .pass.sel { background: rgba(237, 234, 226, .05); }
.passes .pass b { font-family: var(--mono); font-weight: 500; font-size: 13.5px; }
.passes .pass .vis { font-family: var(--mono); font-size: 11px; color: var(--live); }
.passes .pass .vis.no { color: var(--truss-2); }
.passes .pass small { grid-column: 1 / -1; font-family: var(--mono); font-size: 11.5px; color: var(--truss); }
.skychart { display: block; width: 100%; aspect-ratio: 1; margin: 6px 0 4px; }

/* history drawer (replaces orbit band) */
.history { position: fixed; left: calc(16px + 256px + 16px); right: 16px; max-width: 1100px; bottom: calc(var(--time-h) + 26px); padding: 14px 18px 16px; z-index: 20; }
.history[hidden] { display: none; }
.history .top-row { display: flex; align-items: baseline; gap: 16px; }
.history .yr { font-family: var(--mono); font-size: 34px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.history .ev { flex: 1; min-width: 0; }
.history .ev b { font-family: var(--cond); font-weight: 600; font-size: 18px; display: block; }
.history .ev span { font-size: 13.5px; color: var(--beta-2); display: block; margin-top: 3px; line-height: 1.45; }
.history .hctl { display: flex; gap: 6px; }
.history .track { position: relative; height: 44px; margin-top: 12px; cursor: pointer; }
.history .track canvas { width: 100%; height: 100%; display: block; }

/* caption (director / tours) */
.caption { position: fixed; left: calc(16px + 256px + 40px); bottom: calc(var(--time-h) + 40px); max-width: 560px; pointer-events: none; opacity: 0; transition: opacity .8s var(--ease), transform .8s var(--ease); transform: translateY(8px); z-index: 15; }
.caption.on { opacity: 1; transform: none; }
.caption .k { font-family: var(--mono); font-size: 12px; color: var(--amber-2); margin-bottom: 8px; }
.caption h5 { font-family: var(--cond); font-weight: 600; font-size: 40px; line-height: 1.02; margin: 0; text-shadow: 0 2px 30px rgba(0, 0, 0, .6); }
.caption p { font-size: 17px; line-height: 1.5; margin: 10px 0 0; color: rgba(237, 234, 226, .9); text-shadow: 0 1px 20px rgba(0, 0, 0, .8); max-width: 48ch; }
body.cinema .caption { bottom: 64px; left: 48px; }
.title-card { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 16; opacity: 0; transition: opacity 1.2s var(--ease); text-align: center; }
.title-card.on { opacity: 1; }
.title-card .big { font-family: var(--cond); font-weight: 600; font-size: clamp(40px, 7vw, 104px); line-height: .95; letter-spacing: -.01em; text-shadow: 0 4px 60px rgba(0, 0, 0, .5); }
.title-card .small { font-family: var(--mono); font-size: 14px; color: var(--beta-2); margin-top: 16px; }

/* director / tour HUD */
.cine-hud { position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; display: flex; align-items: center; gap: 6px; padding: 5px; z-index: 18; opacity: 0; pointer-events: none; transition: opacity .4s; }
.cine-hud.on { opacity: 1; pointer-events: auto; }
body.cinema .cine-hud.on { opacity: .35; }
body.cinema .cine-hud.on:hover, body.cinema.reveal .cine-hud.on { opacity: 1; }
.cine-hud .lbl { font-family: var(--mono); font-size: 11.5px; color: var(--beta-2); padding: 0 10px; white-space: nowrap; }
.cine-hud .dots { display: flex; gap: 4px; padding: 0 6px; }
.cine-hud .dots i { width: 14px; height: 3px; background: rgba(237, 234, 226, .2); border-radius: 1px; }
.cine-hud .dots i.done { background: var(--beta-2); }
.cine-hud .dots i.cur { background: var(--amber); }
.cine-hud button { height: 30px; padding: 0 11px; border-radius: 2px; font-size: 13px; color: var(--beta-2); display: inline-flex; align-items: center; gap: 6px; }
.cine-hud button:hover { background: rgba(237, 234, 226, .08); color: var(--beta); }
.cine-hud .rec { color: var(--rec); font-family: var(--mono); font-size: 12px; display: none; align-items: center; gap: 6px; padding: 0 8px; }
.cine-hud .rec.on { display: inline-flex; }
.cine-hud .rec i { width: 8px; height: 8px; border-radius: 50%; background: var(--rec); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* labels */
#labels { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.lb { position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; transform: translate3d(-9999px, 0, 0); white-space: nowrap; transition: opacity .25s; }
.lb .dot { position: absolute; left: -3.5px; top: -3.5px; width: 7px; height: 7px; border-radius: 50%; border: 1.3px solid var(--beta); background: rgba(0, 0, 0, .35); }
.lb .stem { position: absolute; left: 0; bottom: 3px; width: 1px; background: linear-gradient(to top, rgba(237, 234, 226, .7), rgba(237, 234, 226, .25)); transform-origin: bottom; }
.lb .tag { position: absolute; left: -1px; bottom: 26px; padding: 4px 8px 5px; background: rgba(10, 15, 22, .72); border-left: 1px solid var(--beta); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lb .tag b { font-family: var(--cond); font-weight: 500; font-size: 13.5px; display: block; line-height: 1.15; }
.lb .tag span { font-family: var(--mono); font-size: 10.5px; color: var(--amber-2); display: block; margin-top: 1px; }
.lb:hover .tag, .lb.sel .tag { background: rgba(242, 169, 59, .92); border-color: var(--amber-2); color: #170f04; }
.lb:hover .tag span, .lb.sel .tag span { color: #3a2608; }
.lb:hover .dot, .lb.sel .dot { border-color: var(--amber); background: var(--amber); }
.lb.small .tag b { font-size: 12px; }
.lb.hatch .tag { border-left-color: var(--limb); }
.lb.hatch .dot { border-color: var(--limb); }
.lb.obj .tag { padding: 3px 7px 4px; }
.lb.obj .tag b { font-size: 12.5px; }
.lb.obj:not(:hover):not(.sel) .tag { opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s; }
.lb.obj .dot { border-color: var(--amber); }
.lb.crew .dot { border-color: var(--live); }
.lb.crew .tag { border-left-color: var(--live); }

/* hover tooltip for 3D picking */
.tip { position: fixed; z-index: 40; pointer-events: none; font-family: var(--cond); font-size: 14px; padding: 5px 9px; background: rgba(10, 15, 22, .85); border-left: 2px solid var(--amber); transform: translate(14px, 14px); opacity: 0; transition: opacity .15s; white-space: nowrap; }
.tip.on { opacity: 1; }
.tip small { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--truss); }

/* interior HUD */
.ihud { position: fixed; left: 50%; top: calc(var(--top-h) + 8px); transform: translateX(-50%); padding: 7px 14px; font-family: var(--mono); font-size: 12px; color: var(--beta-2); display: flex; gap: 14px; align-items: center; opacity: 0; pointer-events: none; transition: opacity .3s; }
.ihud.on { opacity: 1; pointer-events: auto; }
.ihud b { font-family: var(--cond); font-size: 15px; color: var(--beta); font-weight: 600; }
.reticle { position: fixed; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; pointer-events: none; opacity: 0; z-index: 4; }
.reticle.on { opacity: .55; }
.reticle::before, .reticle::after { content: ''; position: absolute; background: var(--beta); }
.reticle::before { left: 10.5px; top: 4px; width: 1px; height: 14px; }
.reticle::after { top: 10.5px; left: 4px; height: 1px; width: 14px; }

/* toast */
.toast { position: fixed; left: 50%; top: calc(var(--top-h) + 14px); transform: translate(-50%, -8px); padding: 9px 14px; font-size: 13.5px; opacity: 0; transition: opacity .3s, transform .3s var(--ease); pointer-events: none; z-index: 50; background: var(--glass-2); border: 1px solid var(--hair-2); border-radius: var(--r); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- intro / loading ---------- */
.intro { position: fixed; inset: 0; z-index: 100; background: #000; display: grid; place-items: center; transition: opacity 1.4s var(--ease), visibility 1.4s; }
.intro.gone { opacity: 0; visibility: hidden; }
.intro.scene { background: transparent; }
.intro .wrap { text-align: left; width: min(560px, 86vw); }
.intro .mark { font-family: var(--mono); font-size: 12px; color: var(--truss); display: flex; align-items: center; gap: 10px; }
.intro .mark i { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 3px rgba(91, 228, 155, .16); }
.intro h1 { font-family: var(--cond); font-weight: 600; font-size: clamp(44px, 7.4vw, 86px); line-height: .94; margin: 18px 0 14px; letter-spacing: -.012em; }
.intro p { font-size: 17px; line-height: 1.55; color: var(--beta-2); margin: 0 0 26px; max-width: 46ch; }
.intro .load { height: 2px; background: rgba(237, 234, 226, .1); overflow: hidden; position: relative; margin-bottom: 22px; }
.intro .load i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--amber); transition: width .4s; animation: preload 6s cubic-bezier(.1,.6,.2,1) forwards; }
@keyframes preload { from { width: 0; } to { width: 22%; } }
.intro .go { display: flex; gap: 10px; flex-wrap: wrap; opacity: 0; transition: opacity .6s; }
.intro .go.on { opacity: 1; }
.intro .go .btn { height: 44px; padding: 0 20px; font-size: 15px; }
.intro .fine { font-family: var(--mono); font-size: 11px; color: var(--truss-2); margin-top: 22px; }
.skip { position: fixed; right: 24px; bottom: 24px; z-index: 101; opacity: 0; pointer-events: none; transition: opacity .4s; }
.skip.on { opacity: 1; pointer-events: auto; }

/* ---------- responsive ---------- */
@media (max-width: 1560px) {
  .tools button.icon-ok span { display: none; }
  .tools button.icon-ok { padding: 0 9px; }
}
@media (max-width: 1280px) {
  .tools button span { display: none; }
  .tools button { padding: 0 9px; }
}
@media (max-width: 1080px) {
  .rail { width: 224px; }
  .time { left: calc(16px + 224px + 12px); }
  .caption { left: calc(16px + 224px + 32px); }
  .card { width: 350px; }
}
@media (max-width: 760px) {
  :root { --top-h: 104px; --time-h: 92px; }
  .top { flex-wrap: wrap; height: auto; padding: 10px 12px 0; gap: 8px; }
  .brand { min-width: 0; gap: 8px; }
  .brand strong { font-size: 0; }
  .brand strong::after { content: 'ISS'; font-size: 18px; }
  .brand #brandState { display: none; }
  .modes { margin: 0 0 0 auto; }
  .modes button { padding: 7px 11px; font-size: 13.5px; }
  .tools { order: 3; width: 100%; overflow-x: auto; justify-content: space-between; scrollbar-width: none; }
  .tools::-webkit-scrollbar { display: none; }
  .tools .sep { display: none; }
  .rail { left: 12px; top: calc(var(--top-h) + 6px); bottom: auto; max-height: 46vh; }
  .rail:not(.min) { width: 212px; }
  .rail .mapbox { display: none; }
  .card { left: 12px; right: 12px; width: auto; top: auto; bottom: calc(var(--time-h) + 16px); height: 56vh; }
  .card[hidden] { transform: translateY(calc(100% + 40px)); }
  .time { left: 12px; right: 12px; bottom: 12px; grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .time .ctl { flex-direction: row; align-items: center; justify-content: space-between; border-right: 0; border-bottom: 1px solid var(--hair); padding: 6px 8px; }
  .time .offset { display: none; }
  .history { left: 12px; right: 12px; }
  .history .yr { font-size: 26px; }
  .pop { left: 12px; right: 12px; width: auto; }
  .caption { left: 16px; right: 16px; }
  .caption h5 { font-size: 28px; }
  .ihud { top: calc(var(--top-h) + 6px); left: auto; right: 12px; transform: none; }
  #frame { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- missions (docking, spacewalk, robot arm) ---------- */
body.mission .ui > *:not(.mhud):not(.m-over):not(.toast) { display: none !important; }
body.mission #labels, body.mission #frame, body.mission #reticle { display: none !important; }
.mhud { position: fixed; inset: 0; pointer-events: none; z-index: 12; }
.mhud > * { pointer-events: auto; }
.mhud svg.m-ret, .mhud .m-visor, .mhud .m-flash, .mhud .m-cupola, .mhud .m-call, .mhud .m-dcm, .mhud .m-hint { pointer-events: none; }
.m-ret { position: fixed; inset: 0; width: 100vw; height: 100vh; overflow: visible; }
.m-ret * { fill: none; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.m-ret .bore { stroke: rgba(237, 234, 226, .78); }
.m-ret .tgt { stroke: var(--rec); transition: stroke .2s; }
.m-ret .tgt.ok { stroke: var(--live); }
.m-ret .tgt.warn { stroke: var(--amber); }
.m-ret .tgt .rolltick { stroke-width: 2.4; }

.m-top { position: fixed; top: 14px; left: 16px; right: 16px; display: flex; align-items: center; gap: 12px; pointer-events: none; }
.m-top > * { pointer-events: auto; }
.m-title { padding: 2px 4px; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.m-title b { display: block; font-family: var(--cond); font-weight: 600; font-size: 20px; line-height: 1.1; }
.m-title span { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--beta-2); margin-top: 2px; }
.m-chips { margin-left: auto; display: flex; gap: 6px; }
.m-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 11px; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--hair); border-radius: var(--r); font-size: 13px; color: var(--beta-2); transition: color .2s, border-color .2s; }
.m-chip:hover { color: var(--beta); border-color: var(--hair-2); }
.m-chip[aria-pressed="true"] { color: var(--beta); border-color: rgba(91, 228, 155, .55); box-shadow: inset 3px 0 0 var(--live); }
.m-chip kbd, .m-panel kbd, .m-cuff kbd, .m-capture kbd { font-family: var(--mono); font-size: 11px; color: var(--beta-2); border: 1px solid var(--hair-2); border-bottom-width: 2px; border-radius: 3px; padding: 0 5px; line-height: 1.5; white-space: nowrap; }
.m-leave svg { width: 15px; height: 15px; }

.m-call { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); max-width: min(720px, 86vw); text-align: center; font-family: var(--cond); font-size: 19px; font-weight: 500; color: var(--beta); text-shadow: 0 1px 10px rgba(0, 0, 0, .75); opacity: 0; }
.m-call.on { animation: mcall 6s var(--ease) forwards; }
@keyframes mcall { 0% { opacity: 0; transform: translate(-50%, -6px); } 6% { opacity: 1; transform: translate(-50%, 0); } 80% { opacity: 1; } 100% { opacity: 0; } }

.m-side { position: fixed; top: 50%; transform: translateY(-50%); width: 252px; padding: 12px 14px 8px; }
.m-side.left { left: 16px; }
.m-side.right { right: 16px; }
.m-side h5, .m-cuff h5, .m-safer h5 { font-family: var(--cond); font-weight: 600; font-size: 15px; margin: 0 0 6px; color: var(--beta); }
.m-row { display: grid; grid-template-columns: 1fr auto 18px auto 30px; align-items: baseline; gap: 2px 6px; padding: 6px 0; border-top: 1px solid var(--hair); }
.m-row span { font-size: 12.5px; color: var(--beta-2); white-space: nowrap; }
.m-row b { font-family: var(--mono); font-size: 16px; font-weight: 500; text-align: right; color: var(--beta); font-variant-numeric: tabular-nums; }
.m-row em { font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--beta-2); text-align: right; font-variant-numeric: tabular-nums; }
.m-row small { font-family: var(--mono); font-size: 10.5px; color: var(--truss); }
.m-row.ok b { color: var(--live); }
.m-row.warn b { color: var(--amber); }
.m-row.bad b { color: var(--rec); }
.m-row.joint { grid-template-columns: 28px 1fr 14px; }
.m-jbar { grid-column: 1 / -1; position: relative; height: 3px; margin-top: 4px; background: linear-gradient(90deg, rgba(255, 90, 78, .45) 0 9%, rgba(237, 234, 226, .12) 9% 91%, rgba(255, 90, 78, .45) 91%); }
.m-jbar i { position: absolute; top: -3px; width: 2px; height: 9px; margin-left: -1px; background: var(--beta); }
.m-env { margin: 10px 0 6px; padding: 8px 10px; font-family: var(--mono); font-size: 12px; border: 1px solid var(--hair-2); border-radius: 2px; color: var(--beta-2); }
.m-env.ok { color: #0b1a10; background: var(--live); border-color: var(--live); }
.m-env.warn { color: var(--amber); border-color: rgba(242, 169, 59, .5); }

.m-bottom { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; padding: 12px 4px 12px; }
.m-big { padding: 0 22px; min-width: 150px; }
.m-big + .m-big { border-left: 1px solid var(--hair); }
.m-big > span { display: block; font-size: 12px; color: var(--beta-2); margin-bottom: 2px; }
.m-big b { font-family: var(--mono); font-size: 30px; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.m-big b.ok { color: var(--live); } .m-big b.warn { color: var(--amber); } .m-big b.bad { color: var(--rec); }
.m-big small { font-family: var(--mono); font-size: 12px; color: var(--truss); margin-left: 4px; }
.m-big > span:last-child:not(:first-child) { font-family: var(--mono); font-size: 11px; color: var(--truss); margin-top: 3px; }
.m-big.prop b { font-size: 24px; }
.m-bar { height: 4px; background: rgba(237, 234, 226, .12); margin-top: 8px; }
.m-bar i { display: block; height: 100%; background: var(--live); transition: width .3s; }
.m-bar i.warn { background: var(--amber); } .m-bar i.bad { background: var(--rec); }

.m-pads { position: fixed; bottom: 16px; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: flex-end; pointer-events: none; }
.m-pads > * { pointer-events: auto; }
.m-pads > div > span { display: block; font-family: var(--mono); font-size: 11px; color: var(--beta-2); margin: 0 0 6px 2px; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }
.m-pad { display: grid; grid-template-columns: repeat(3, 46px); grid-auto-rows: 40px; gap: 4px; }
.m-pad button { background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--hair); border-radius: var(--r); font-size: 13px; color: var(--beta-2); touch-action: none; user-select: none; -webkit-user-select: none; }
.m-pad button:hover { color: var(--beta); border-color: var(--hair-2); }
.m-pad button.on { background: var(--beta); color: #0d131a; }
.m-capture { height: 48px; padding: 0 20px; font-size: 15px; gap: 10px; }
.m-capture:disabled { opacity: .35; cursor: default; }
.m-capture.ready { animation: mready 1.1s ease-in-out infinite; }
.m-capture kbd { color: #1b1307; border-color: rgba(27, 19, 7, .35); }
@keyframes mready { 50% { box-shadow: 0 0 0 6px rgba(242, 169, 59, .25); } }

.mhud.view-dock::before { content: ''; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse 70% 70% at 50% 50%, transparent 60%, rgba(0, 0, 0, .55) 100%); }
.m-cupola { position: fixed; inset: 0; display: none; background: radial-gradient(ellipse 78% 72% at 50% 50%, transparent 60%, rgba(18, 20, 24, .75) 80%, rgba(8, 9, 11, .97) 100%); }
.mhud.view-cupola .m-cupola { display: block; }
.mhud.m-arm:not(.view-lee) .m-ret .bore { display: none; }
.m-ret .pin .pl { stroke: rgba(237, 234, 226, .55); stroke-dasharray: 3 3; }
.m-ret .pin .pb, .m-ret .pin .pt { stroke: var(--rec); stroke-width: 2; }
.m-ret .pin.warn .pb, .m-ret .pin.warn .pt { stroke: var(--amber); }
.m-ret .pin.ok .pb, .m-ret .pin.ok .pt { stroke: var(--live); }

/* spacewalk: helmet, visor display, cuff checklist */
.m-visor { position: fixed; inset: 0; background:
  linear-gradient(112deg, transparent 22%, rgba(255, 255, 255, .035) 30%, transparent 37%),
  radial-gradient(ellipse 82% 78% at 50% 47%, transparent 58%, rgba(6, 8, 12, .5) 76%, rgba(2, 3, 5, .96) 100%); }
body.visor-gold .m-visor::after { content: ''; position: fixed; inset: 0; background: rgba(206, 150, 40, .38); mix-blend-mode: multiply; }
.m-flash { position: fixed; inset: 0; background: #fff; opacity: 0; }
.m-flash.on { animation: mflash .45s ease-out; }
@keyframes mflash { 0% { opacity: .55; } 100% { opacity: 0; } }
.m-dcm { position: fixed; top: 66px; left: 50%; transform: translateX(-50%); display: flex; gap: 16px; white-space: nowrap; font-family: var(--mono); font-size: 12px; color: rgba(150, 245, 190, .78); text-shadow: 0 0 8px rgba(91, 228, 155, .35); }
.m-dcm b { color: #d6ffe6; font-weight: 500; }
.m-dcm .sun { color: rgba(255, 214, 140, .85); }
.m-ret.eva .bore { stroke: rgba(160, 250, 200, .75); }
.m-ret.eva .brk { stroke: rgba(237, 234, 226, .65); transition: stroke .2s; }
.m-ret.eva .brk.ok { stroke: var(--live); stroke-width: 2; }
.m-cuff { position: fixed; left: 16px; top: 50%; transform: translateY(-50%); width: 276px; padding: 12px 10px 6px; }
.m-cuff h5 { padding-left: 4px; }
.m-cuff-list { list-style: none; margin: 0; padding: 0; }
.m-cuff-list li { display: grid; grid-template-columns: 16px 1fr auto; gap: 10px; align-items: center; padding: 9px 6px; border-top: 1px solid var(--hair); border-radius: 2px; cursor: pointer; }
.m-cuff-list li:hover { background: rgba(237, 234, 226, .06); }
.m-cuff-list li b { display: block; font-size: 13.5px; font-weight: 500; line-height: 1.3; }
.m-cuff-list li small { display: block; font-size: 11.5px; color: var(--truss); margin-top: 1px; }
.m-cuff-list li.opt b { color: var(--beta-2); }
.m-cuff-list .box { width: 14px; height: 14px; border: 1.5px solid var(--beta-2); border-radius: 2px; position: relative; }
.m-cuff-list li.done .box { background: var(--live); border-color: var(--live); }
.m-cuff-list li.done .box::after { content: ''; position: absolute; left: 3.5px; top: 0.5px; width: 4px; height: 8px; border: solid #0b1a10; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.m-cuff-list li.done b { color: var(--beta-2); text-decoration: line-through; text-decoration-color: rgba(237, 234, 226, .35); }
.m-hint { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); max-width: min(660px, 88vw); padding: 10px 16px; font-size: 14.5px; line-height: 1.45; text-align: center; background: var(--glass-2); border: 1px solid var(--hair); border-radius: var(--r); opacity: 0; }
.m-hint.on { animation: mhint 8s var(--ease) forwards; }
@keyframes mhint { 0% { opacity: 0; transform: translate(-50%, 6px); } 5% { opacity: 1; transform: translate(-50%, 0); } 85% { opacity: 1; } 100% { opacity: 0; } }
.m-safer { position: fixed; right: 16px; top: 50%; transform: translateY(-50%); width: 220px; padding: 12px 14px 8px; display: none; }
.mhud.safer-on .m-safer { display: block; }
.m-safer .m-row { grid-template-columns: 1fr auto 30px; }

/* briefing / pause / result overlays */
.m-over { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .32); }
.m-panel { width: min(580px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 26px 28px 24px; background: var(--glass-2); scrollbar-width: thin; }
.m-kicker { font-family: var(--mono); font-size: 11.5px; color: var(--amber); }
.m-over.result.ok .m-kicker { color: var(--live); }
.m-over.result.fail .m-kicker { color: var(--rec); }
.m-panel h2 { font-family: var(--cond); font-weight: 600; font-size: 34px; line-height: 1.04; letter-spacing: -.005em; margin: 8px 0 12px; }
.m-panel p { font-size: 15px; line-height: 1.6; color: var(--beta-2); margin: 0 0 10px; }
.m-opts label { display: flex; align-items: center; gap: 14px; margin: 16px 0 4px; }
.m-opts label > span { font-size: 13px; color: var(--beta-2); }
.m-opts .seg { display: flex; border: 1px solid var(--hair-2); border-radius: 2px; overflow: hidden; }
.m-opts .seg button { padding: 8px 14px; font-size: 13.5px; color: var(--beta-2); }
.m-opts .seg button[aria-pressed="true"] { background: var(--beta); color: #0d131a; }
.m-keys { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; margin: 18px 0 4px; padding-top: 14px; border-top: 1px solid var(--hair); font-size: 13.5px; color: var(--beta-2); }
.m-keys dt { display: flex; gap: 4px; align-items: center; }
.m-keys dd { margin: 0; }
.m-stats { display: grid; grid-template-columns: 1fr auto; margin: 14px 0 0; }
.m-stats dt, .m-stats dd { margin: 0; padding: 8px 0; border-top: 1px solid var(--hair); }
.m-stats dt { font-size: 13.5px; color: var(--beta-2); }
.m-stats dd { font-family: var(--mono); font-size: 15px; text-align: right; }
.m-stats dd.ok { color: var(--live); } .m-stats dd.warn { color: var(--amber); } .m-stats dd.bad { color: var(--rec); }
.m-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.m-acts .btn { height: 42px; padding: 0 18px; font-size: 15px; }

@media (max-width: 1180px) {
  .m-chip span { display: none; }
  .m-side { width: 220px; }
}
@media (max-width: 900px) {
  .m-side, .m-safer { top: 118px; transform: none; }
  .m-side.left { display: none; }
  .m-bottom { left: 50%; bottom: auto; top: 116px; }
  .m-big { min-width: 0; padding: 0 12px; }
  .m-big b { font-size: 22px; }
  .m-side.right { top: 196px; width: 200px; }
  .m-cuff { top: auto; bottom: 16px; transform: none; width: min(300px, calc(100vw - 32px)); max-height: 40vh; overflow: auto; }
  .m-dcm { font-size: 10.5px; gap: 10px; top: 60px; }
  .m-dcm span:nth-child(n+4):not(.sun) { display: none; }
  .m-hint { bottom: auto; top: 96px; }
}
@media (max-width: 560px) {
  .m-side.right { display: none; }
  .m-panel { padding: 20px 18px; }
  .m-panel h2 { font-size: 28px; }
  .m-pad { grid-template-columns: repeat(3, 42px); grid-auto-rows: 38px; }
  .m-title span { display: none; }
  .m-title b { font-size: 17px; }
  .m-chips { gap: 4px; }
  .m-chip { height: 30px; padding: 0 8px; }
  .m-leave span { display: none; }
  .m-bottom { top: 58px; width: calc(100vw - 24px); justify-content: space-between; padding: 8px 2px; }
  .m-big { padding: 0 10px; }
  .m-big b { font-size: 20px; }
  .m-big.prop b { font-size: 18px; }
  .m-big > span:last-child:not(:first-child) { display: none; }
  .m-call { top: 136px; font-size: 15px; }
  .m-capture { height: 42px; padding: 0 12px; font-size: 14px; }
  .m-capture kbd { display: none; }
}
.m-cuff h5 { cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
.m-cuff h5::after { content: ''; width: 7px; height: 7px; border: solid var(--beta-2); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); margin: -3px 6px 0 0; transition: transform .2s; }
.m-cuff.min h5::after { transform: rotate(-135deg); margin-top: 3px; }
.m-cuff.min .m-cuff-list li:not(.next) { display: none; }
.m-cuff-list li.next { box-shadow: inset 2px 0 0 var(--amber); }
.m-evabtns { position: fixed; right: 16px; bottom: 16px; display: flex; align-items: flex-end; gap: 12px; }
.m-evabtns > div > span { display: block; font-family: var(--mono); font-size: 11px; color: var(--beta-2); margin: 0 0 6px 2px; }
.m-safer-pad { display: none; }
.mhud.safer-on .m-safer-pad { display: block; }
.m-photo { height: 46px; padding: 0 16px; font-size: 15px; gap: 9px; }
.m-photo svg { width: 18px; height: 18px; }
.m-photo kbd { color: #1b1307; border-color: rgba(27, 19, 7, .35); }
@media (max-width: 560px) { .m-photo kbd, .m-photo span { display: none; } .m-evabtns { bottom: 16px; } .mhud.safer-on .m-cuff { display: none; } }
@media (max-width: 900px) { .mhud.m-eva .m-cuff { right: 96px; width: auto; } }

/* ---------- a day as an astronaut ---------- */
.day-card { position: fixed; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: #000; opacity: 0; pointer-events: none; transition: opacity .45s ease; }
.day-card.on { opacity: 1; }
.day-card b { font-family: var(--cond); font-weight: 600; font-size: clamp(72px, 13vw, 168px); line-height: .9; letter-spacing: -.02em; color: var(--beta); font-variant-numeric: tabular-nums; }
.day-card span { font-family: var(--cond); font-size: clamp(20px, 2.4vw, 30px); color: var(--beta-2); }
.day-card.on b { animation: daycard 1.2s var(--ease) both; }
@keyframes daycard { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.day-clock { position: fixed; top: 60px; right: 18px; text-align: right; text-shadow: 0 1px 10px rgba(0, 0, 0, .7); pointer-events: none; }
.day-clock b { font-family: var(--mono); font-weight: 500; font-size: 34px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.day-clock small { font-family: var(--mono); font-size: 12px; color: var(--beta-2); margin-left: 6px; }
.day-clock span { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--beta-2); margin-top: 2px; }
.day-clock span.day { color: var(--amber-2); }
.day-clock span.nt { color: var(--limb); }
.day-cap { position: fixed; left: 22px; bottom: 44px; max-width: min(560px, calc(100vw - 44px)); padding: 16px 20px 18px; background: linear-gradient(180deg, rgba(10, 14, 20, .72), rgba(10, 14, 20, .86)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--hair); border-radius: var(--r); opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease); pointer-events: none; }
.day-cap.on { opacity: 1; transform: none; }
.day-cap .k { font-family: var(--mono); font-size: 11.5px; color: var(--amber); }
.day-cap h3 { font-family: var(--cond); font-weight: 600; font-size: 30px; line-height: 1.05; margin: 6px 0 8px; }
.day-cap p { font-size: 15.5px; line-height: 1.55; color: var(--beta-2); margin: 0; }
.day-prompt { position: fixed; left: 50%; bottom: 52px; transform: translate(-50%, 6px); display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 18px 0 12px; background: var(--amber); color: #1b1307; border-radius: 23px; font-size: 15px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .35s, transform .35s var(--ease); }
.day-prompt.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; animation: mready 1.4s ease-in-out infinite; }
.day-prompt kbd { font-family: var(--mono); font-size: 11px; border: 1px solid rgba(27, 19, 7, .4); border-bottom-width: 2px; border-radius: 3px; padding: 1px 6px; }
.day-choices { position: fixed; right: 22px; bottom: 44px; display: flex; flex-direction: column; gap: 6px; opacity: 0; pointer-events: none; transition: opacity .35s; }
.day-choices.on { opacity: 1; pointer-events: auto; }
.day-choices button { display: flex; align-items: center; gap: 10px; min-width: 270px; height: 44px; padding: 0 14px; background: var(--glass-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--hair-2); border-radius: var(--r); font-size: 14.5px; color: var(--beta); text-align: left; transition: border-color .2s, background .2s; }
.day-choices button:hover { border-color: var(--amber); background: rgba(242, 169, 59, .1); }
.day-choices kbd { font-family: var(--mono); font-size: 11px; color: var(--beta-2); border: 1px solid var(--hair-2); border-bottom-width: 2px; border-radius: 3px; padding: 0 6px; }
.day-centres { position: fixed; right: 18px; top: 128px; width: 270px; padding: 12px 14px 8px; opacity: 0; transform: translateX(10px); transition: opacity .4s, transform .4s var(--ease); pointer-events: none; }
.day-centres.on { opacity: 1; transform: none; }
.day-centres h5 { font-family: var(--cond); font-weight: 600; font-size: 15px; margin: 0 0 6px; }
.day-centres ul { list-style: none; margin: 0; padding: 0; }
.day-centres li { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 6px 0; border-top: 1px solid var(--hair); }
.day-centres li b { font-size: 13.5px; font-weight: 500; }
.day-centres li span { grid-column: 1; font-size: 11.5px; color: var(--truss); }
.day-centres li em { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-style: normal; font-family: var(--mono); font-size: 17px; color: var(--amber-2); }
.day-centres li.night em { color: var(--limb); }
.day-you { position: fixed; left: 0; top: 0; margin: -24px 0 0 -18px; padding: 2px 8px; font-family: var(--mono); font-size: 11px; color: #1b1307; background: var(--amber); border-radius: 2px; pointer-events: none; white-space: nowrap; }
.day-you::after { content: ''; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: var(--amber); }
.day-line { position: fixed; left: 22px; right: 22px; bottom: 16px; height: 14px; pointer-events: none; }
.day-line::before { content: ''; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: rgba(237, 234, 226, .14); }
.day-line .fill { position: absolute; left: 0; top: 6px; height: 2px; width: 0; background: var(--amber); transition: width .25s linear; }
.day-line b { position: absolute; top: 3px; width: 2px; height: 8px; margin-left: -1px; background: rgba(237, 234, 226, .35); }
.day-line b.done { background: var(--amber); }
.day-line b.cur { background: var(--beta); height: 12px; top: 1px; }
.day-line span { position: absolute; top: -14px; font-family: var(--mono); font-size: 10px; color: var(--truss); }
.day-line span.a { left: 0; } .day-line span.z { right: 0; }
.m-panel .m-note { font-size: 13px; color: var(--truss); margin-top: 12px; }
@media (max-width: 760px) {
  .day-cap { left: 12px; right: 12px; bottom: 40px; padding: 12px 14px 14px; }
  .day-cap h3 { font-size: 23px; }
  .day-cap p { font-size: 14px; }
  .day-clock { top: 54px; }
  .day-clock b { font-size: 24px; }
  .day-centres { top: auto; bottom: 230px; right: 12px; left: 12px; width: auto; }
  .day-choices { left: 12px; right: 12px; bottom: auto; top: 120px; }
  .day-choices button { min-width: 0; }
  .day-prompt { bottom: auto; top: 112px; }
  .day-line { left: 12px; right: 12px; }
}

/* ---------- Over your home ---------- */
.m-place { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; margin: 16px 0 6px; }
.m-place label { display: flex; flex-direction: column; gap: 6px; flex: 1 1 200px; }
.m-place label > span { font-size: 13px; color: var(--beta-2); }
.m-place select { height: 42px; padding: 0 12px; background: rgba(255, 255, 255, .05); color: var(--beta); border: 1px solid var(--hair-2); border-radius: 2px; font: inherit; font-size: 15px; }
.m-place .btn { height: 42px; }
.le-panel .m-note, .le-result .m-note { font-size: 12.5px; color: var(--truss); }
.oh-tag { position: fixed; left: 0; top: 0; pointer-events: none; white-space: nowrap; display: flex; flex-direction: column; gap: 1px; padding: 0 0 0 16px; margin: -10px 0 0 6px; text-shadow: 0 1px 8px rgba(0, 0, 0, .8); }
.oh-tag b { font-family: var(--mono); font-weight: 500; font-size: 12px; }
.oh-tag small { font-family: var(--mono); font-size: 11px; color: var(--beta-2); }
.oh-tag::before { content: ''; position: absolute; left: 0; top: 7px; width: 10px; height: 1px; background: currentColor; opacity: .7; }
.oh-tag.home { color: var(--amber); }
.oh-tag.iss { color: var(--beta); margin-left: 12px; }
.oh-compass i { position: fixed; left: 0; top: 0; margin: 10px 0 0 -12px; width: 24px; text-align: center; font-style: normal; font-family: var(--mono); font-size: 12px; color: rgba(237, 234, 226, .55); pointer-events: none; }
.m-over.oh-side { place-items: center end; background: linear-gradient(90deg, transparent 40%, rgba(0, 0, 0, .45)); }
.m-over.oh-side .m-panel { width: min(440px, 100%); }
.oh-count { display: flex; align-items: baseline; gap: 4px; margin: 2px 0 14px; font-family: var(--mono); }
.oh-count b { font-weight: 500; font-size: 40px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--amber); }
.oh-count small { font-size: 13px; color: var(--beta-2); margin-right: 10px; }
.oh-list { list-style: none; margin: 14px 0 0; padding: 0; }
.oh-list li { display: flex; flex-direction: column; gap: 2px; padding: 9px 0; border-top: 1px solid var(--hair); }
.oh-list li b { font-family: var(--mono); font-weight: 500; font-size: 13.5px; }
.oh-list li span { font-size: 13px; color: var(--beta-2); }
.oh-list li.cur b { color: var(--amber); }

/* ---------- The last day ---------- */
.do-inst b { color: var(--beta); }
.do-inst span { max-width: 320px; margin-left: auto; }

/* ---------- Long exposure ---------- */
.le-panel, .le-result { position: fixed; right: 16px; top: 64px; width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 84px); overflow: auto; padding: 20px 22px; background: var(--glass-2); display: none; }
.le-panel.on, .le-result.on { display: block; }
.le-panel h3, .le-result h3 { font-family: var(--cond); font-weight: 600; font-size: 28px; line-height: 1.05; margin: 6px 0 10px; }
.le-panel p, .le-result p { font-size: 14px; line-height: 1.55; color: var(--beta-2); margin: 0 0 8px; }
.le-panel .m-opts label { margin: 12px 0 2px; justify-content: space-between; }
.le-panel .m-opts .seg button { padding: 7px 10px; font-size: 13px; }
.le-panel .m-opts .seg button:disabled { opacity: .35; }
.le-where { font-family: var(--mono); font-size: 12.5px !important; color: var(--amber) !important; }
.le-prog { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); width: min(520px, calc(100vw - 32px)); padding: 14px 18px; display: none; flex-direction: column; gap: 8px; }
.le-prog.on { display: flex; }
.le-prog .bar { height: 3px; background: rgba(237, 234, 226, .14); }
.le-prog .bar i { display: block; height: 100%; width: 0; background: var(--amber); }
.le-prog span { font-family: var(--mono); font-size: 12.5px; }
.le-prog small { font-size: 12px; color: var(--beta-2); }
@media (max-width: 700px) { .le-panel, .le-result { top: auto; bottom: 12px; max-height: 55vh; } }

/* tours: the interface steps back while a tour plays; moving the mouse brings it back */
.ui > .top, .ui > .rail, .ui > .time { transition: opacity .7s var(--ease); }
body.touring:not(.reveal) .ui > .top, body.touring:not(.reveal) .ui > .rail, body.touring:not(.reveal) .ui > .time { opacity: 0; pointer-events: none; }
body.touring:not(.reveal) #frame { opacity: 0; }

/* Spot it, in the telemetry panel */
.rail .spot { display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; margin-top: 10px; padding: 0 10px; flex: none; border: 1px solid var(--hair-2); border-radius: 2px; font-family: var(--sans, inherit); font-size: 13px; color: var(--beta-2); transition: background .2s, color .2s; }
.rail .spot:hover { background: rgba(237, 234, 226, .07); color: var(--beta); }
.rail .spot.on { background: rgba(242, 169, 59, .14); color: var(--amber-2); border-color: rgba(242, 169, 59, .4); }
.rail.min .spot { display: none; }
.pop.left { left: calc(16px + 256px + 12px); right: auto; }

/* design credit: a small glass tab sitting on the same baseline as the time bar */
.credit { position: fixed; right: 38px; bottom: 16px; z-index: 3; height: 28px; display: flex; align-items: center; padding: 0 12px; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: rgba(237, 234, 226, .6); text-decoration: none; background: var(--glass-2); border: 1px solid var(--hair); border-radius: var(--r); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); transition: color .2s, border-color .2s; }
.credit:hover { color: var(--amber-2); border-color: rgba(242, 169, 59, .35); }
@media (max-width: 1600px) { .time { right: calc(38px + 158px + 12px); } } /* leave room for the credit (and the corner mark) */
@media (max-width: 760px) { .credit { bottom: calc(var(--time-h) + 20px); right: 12px; height: 24px; padding: 0 9px; } .time { right: 12px; } }

/* logo: status dot + wordmark. The dot sends out a slow ring while live, a quick one when time runs fast */
.brand .sig { position: relative; display: block; flex: none; align-self: flex-start; width: 7px; height: 7px; margin: 6px 0 0; border-radius: 50%; background: var(--live); color: var(--live); }
.brand .sig::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid currentColor; opacity: 0; animation: sigRing 3s cubic-bezier(.2, .6, .3, 1) infinite; }
.brand .sig.warp { background: var(--amber); color: var(--amber); }
.brand .sig.warp::after { animation-duration: 1.2s; }
.brand .sig.paused { background: var(--truss); color: var(--truss); }
.brand .sig.paused::after { animation: none; }
@keyframes sigRing { 0% { transform: scale(.35); opacity: .75; } 65%, 100% { transform: scale(1.15); opacity: 0; } }
.brand #brandState { font-size: 10.5px; letter-spacing: .03em; margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .brand .sig::after { animation: none; } }
