:root {
  color-scheme: dark;
  --ink: #091321;
  --panel: #0d1a28;
  --line: #283847;
  --muted: #8293a3;
  --paper: #e8eff2;
  --gold: #e3ab61;
  --amber: #ffd18a;
  --cyan: #83d9e2;
  --green: #83d6b2;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: #07101b; }
body { min-height: 100vh; margin: 0; color: var(--paper); background: radial-gradient(ellipse at 48% 28%, #172838 0, #0b1724 47%, #07101b 100%); }
.shell { width: min(1580px, calc(100% - 52px)); margin: 0 auto; padding: 18px 0 14px; }
.topbar { height: 54px; border-bottom: 1px solid #bbd0da26; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--paper); text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border: 1px solid #69808b; display: grid; place-items: center; color: var(--amber); font: italic 20px Georgia, serif; }
.brand b, .brand small { display: block; letter-spacing: .18em; }
.brand b { font-size: 11px; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 7px; letter-spacing: .25em; }
.top-meta { display: flex; align-items: center; gap: 10px; color: #bac8ce; font-size: 9px; letter-spacing: .16em; }
.top-meta i { width: 1px; height: 15px; margin: 0 6px; background: #35434d; }
.live-dot, .gold-square { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px #e2a451; }
.heading-row { display: flex; justify-content: space-between; align-items: end; padding: 22px 0 16px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 8px; color: #a3b3bb; font-size: 9px; letter-spacing: .22em; }
.eyebrow > span { width: 18px; height: 1px; background: var(--gold); }
h1 { margin: 0; color: #eef3f4; font-size: 36px; font-weight: 500; line-height: 1; letter-spacing: -.045em; }
h1 em, h2 em { color: #b5c5ca; font-family: Georgia, serif; font-weight: 400; }
.heading-stats { display: flex; gap: 22px; padding-bottom: 3px; }
.heading-stats span { padding-left: 14px; border-left: 1px solid #293944; color: #728692; font-size: 8px; letter-spacing: .15em; }
.heading-stats b { margin-left: 7px; color: #dbe4e7; font-size: 9px; letter-spacing: .08em; }
.heading-stats #beacon-status { color: var(--gold); }
.play-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: stretch; }
.viewport-frame { display: flex; min-width: 0; flex-direction: column; border: 1px solid #344551; background: #0b1723; }
.viewport-top { display: flex; height: 34px; flex: 0 0 34px; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 1px solid #283744; color: #9baeb5; font-size: 8px; letter-spacing: .18em; }
.viewport-top .gold-square { margin-right: 7px; border-radius: 0; }
.viewport-top b:not(.gold-square) { color: var(--gold); }
.scene-wrap { position: relative; min-height: 400px; flex: 1; overflow: hidden; background: linear-gradient(180deg, #121f2b, #152638 60%, #0c1824); }
#scene { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; }
.scene-label { position: absolute; top: 13px; display: flex; flex-direction: column; gap: 3px; pointer-events: none; text-shadow: 0 1px 3px #07101b; }
.scene-label-left { left: 16px; }
.scene-label-right { right: 16px; text-align: right; }
.scene-label small { color: #9fb2ba; font-size: 7px; letter-spacing: .2em; }
.scene-label b { color: #e1e9eb; font-size: 8px; letter-spacing: .13em; }
.scene-toast { position: absolute; bottom: 14px; left: 50%; max-width: 85%; transform: translateX(-50%); padding: 9px 14px; border: 1px solid #caddd126; background: #07101bc7; color: #dce6e8; font-size: 10px; text-align: center; white-space: nowrap; pointer-events: none; }
.lens-meter { position: absolute; right: 15px; bottom: 14px; display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid #caddd128; background: #07101bc7; color: #879ba5; font-size: 7px; letter-spacing: .16em; pointer-events: none; }
.lens-dots { display: flex; gap: 4px; }
.lens-dots b { width: 8px; height: 8px; border: 1px solid #778c96; border-radius: 50%; }
.lens-dots b.lit { border-color: var(--amber); background: var(--amber); box-shadow: 0 0 8px var(--gold); }
.lens-meter strong { color: #dae3e6; font-size: 8px; }
.start-card { position: absolute; z-index: 2; top: 50%; left: 5.5%; width: min(390px, 60%); transform: translateY(-50%); padding: 24px 27px 20px; border: 1px solid #aac3cd40; background: #070f17ed; box-shadow: 0 18px 70px #04080d88; }
.start-card.hidden { display: none; }
.start-card h2, .end-card h2 { margin: 8px 0 14px; color: #edf2f2; font-size: 48px; font-weight: 600; line-height: .94; letter-spacing: -.06em; }
.story { max-width: 370px; margin: 0 0 16px; color: #a8b6bb; font-size: 12px; line-height: 1.6; }
.start-stats { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid #2c3942; color: #84959d; font-size: 7px; letter-spacing: .14em; }
.start-stats b { margin-right: 4px; color: var(--gold); font-size: 9px; }
.start-button { width: 100%; height: 44px; padding: 0 14px; border: 0; background: #c58a50; color: #10161a; text-align: left; font-size: 10px; font-weight: 800; letter-spacing: .16em; cursor: pointer; transition: background .15s, transform .15s; }
.start-button:hover { transform: translateY(-1px); background: #e3aa65; }
.start-button span { float: right; font-size: 17px; line-height: 1; }
.input-help { display: block; margin-top: 12px; color: #82949b; font-size: 7px; letter-spacing: .14em; text-align: center; }
.viewport-controls { display: flex; height: 32px; flex: 0 0 32px; align-items: center; justify-content: space-around; border-top: 1px solid #273641; color: #8fa1a8; font-size: 7px; letter-spacing: .15em; }
.viewport-controls kbd { display: inline-grid; min-width: 16px; height: 16px; place-items: center; margin-right: 3px; padding: 0 3px; border: 1px solid #42525b; background: #142432; color: #e2ebed; font: inherit; font-size: 8px; }
.side-panel { display: flex; min-height: 530px; flex-direction: column; border: 1px solid #2d3d48; background: #0c1824e6; }
.panel-section { padding: 15px 15px 13px; border-bottom: 1px solid #283843; }
.section-title { display: flex; align-items: center; justify-content: space-between; color: #adbbc0; font-size: 8px; letter-spacing: .17em; }
.section-title b { color: #83969e; font-size: 8px; }
.mission-state { display: flex; align-items: center; gap: 8px; margin: 17px 0 11px; }
.status-light { width: 7px; height: 7px; border-radius: 50%; background: #a7794d; box-shadow: 0 0 7px #a7794d; }
.status-light.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.mission-state strong { color: #d7e1e3; font-size: 10px; letter-spacing: .12em; }
.beam-progress { position: relative; height: 3px; overflow: hidden; background: #283945; }
.beam-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #a96b3a, #ffd18a); box-shadow: 0 0 8px var(--gold); transition: width .3s; }
.progress-caption { display: flex; justify-content: space-between; margin-top: 7px; color: #71858e; font-size: 6px; letter-spacing: .08em; }
.objectives ol { margin: 10px 0 0; padding: 0; list-style: none; }
.objectives li { display: flex; min-height: 40px; align-items: center; gap: 9px; border-top: 1px solid #1d2d38; color: #d8e2e5; }
.objective-number { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid #465762; color: #84979e; font-size: 8px; }
.objectives li.active .objective-number, .objectives li.done .objective-number { border-color: var(--gold); color: var(--amber); }
.objectives li.done .objective-number { background: #3e3325; }
.objectives li > span:nth-child(2) { flex: 1; }
.objectives li b, .objectives li small { display: block; }
.objectives li b { font-size: 9px; font-weight: 600; }
.objectives li small { margin-top: 3px; color: #758891; font-size: 6px; letter-spacing: .13em; }
.objectives li i { width: 5px; height: 5px; border-radius: 50%; background: #465761; }
.objectives li.done i { background: var(--green); box-shadow: 0 0 7px var(--green); }
.mirror-controls { padding-bottom: 10px; }
.mirror-row { display: flex; align-items: center; gap: 7px; padding: 8px 0; border-top: 1px solid #1d2d38; }
.mirror-row:first-of-type { margin-top: 10px; }
.mirror-row.selected { background: linear-gradient(90deg, #46352233, transparent); }
.mirror-index { display: grid; width: 25px; height: 23px; place-items: center; border: 1px solid #5b6260; color: var(--amber); font-size: 8px; }
.mirror-name { flex: 1; }
.mirror-name b, .mirror-name small { display: block; }
.mirror-name b { font-size: 8px; letter-spacing: .08em; }
.mirror-name small { margin-top: 3px; color: #98a8ae; font-size: 7px; }
.turn-button { width: 26px; height: 25px; border: 1px solid #394b55; background: #142431; color: #d9e2e5; font-size: 13px; cursor: pointer; }
.turn-button:hover { border-color: var(--gold); color: var(--amber); }
.calibration-hint { margin: 8px 0 0; color: #81939b; font-size: 8px; line-height: 1.5; }
.telemetry { margin-top: auto; }
.instrument { display: flex; align-items: center; justify-content: space-between; padding-top: 9px; }
.instrument span { color: #7e9199; font-size: 7px; letter-spacing: .12em; }
.instrument strong { color: #d8e2e5; font-size: 9px; letter-spacing: .08em; }
.instrument:first-of-type strong { color: var(--amber); font: 18px ui-monospace, monospace; }
.pace-note { display: flex; gap: 9px; margin: 12px; padding: 11px 10px; border-left: 2px solid #b9854d; background: #171f25; }
.note-icon { color: var(--gold); font-size: 12px; }
.pace-note b { color: #d5e0e2; font-size: 7px; letter-spacing: .13em; }
.pace-note p { margin: 5px 0 0; color: #95a5aa; font-size: 8px; line-height: 1.5; }
.footer { display: flex; justify-content: space-between; padding: 15px 2px 0; color: #758790; font-size: 7px; letter-spacing: .15em; }
.end-overlay { position: fixed; z-index: 9; inset: 0; display: grid; place-items: center; background: #040a10b8; backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .25s; }
.end-overlay.visible { opacity: 1; pointer-events: auto; }
.end-card { width: min(430px, calc(100vw - 32px)); padding: 30px; border: 1px solid #52616a; background: #0a1520; box-shadow: 0 25px 100px #0009; }
.end-card h2 { font-size: 46px; }
.end-card p:not(.eyebrow) { margin: 0 0 18px; color: #a9b7bb; font-size: 12px; line-height: 1.6; }
.end-card .start-button { margin-top: 2px; }
button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
@media (max-width: 1000px) { .shell { width: calc(100% - 28px); } .play-grid { grid-template-columns: minmax(0, 1fr) 265px; gap: 12px; } .heading-stats { gap: 10px; } .heading-stats span { padding-left: 8px; } .scene-wrap { min-height: 390px; } .start-card { width: min(350px, 65%); padding: 20px; } .start-card h2 { font-size: 42px; } }
@media (max-width: 760px) { .shell { width: calc(100% - 20px); padding-top: 10px; } .topbar { height: 48px; } .top-meta { font-size: 7px; letter-spacing: .1em; } .top-meta span:last-child { display: none; } .heading-row { align-items: center; padding: 17px 0 12px; } .heading-row h1 { font-size: 28px; } .heading-stats { display: none; } .play-grid { grid-template-columns: 1fr; } .viewport-frame { min-height: 0; } .scene-wrap { height: min(60vh, 520px); min-height: 380px; } .side-panel { display: grid; min-height: 0; grid-template-columns: 1fr 1fr; } .mission-section, .objectives, .mirror-controls, .telemetry { padding: 12px; } .objectives { grid-row: span 2; } .pace-note { grid-column: 1 / -1; margin: 0 12px 12px; } .start-card { left: 4%; width: 66%; padding: 17px; } .start-card h2 { font-size: 36px; } .story { font-size: 10px; } .start-stats { font-size: 6px; } .start-button { height: 40px; font-size: 8px; } .scene-label-right { display: none; } .lens-meter { right: 8px; bottom: 8px; } .scene-toast { bottom: 42px; font-size: 9px; } .viewport-controls { font-size: 6px; } .footer { gap: 8px; font-size: 6px; } .footer span:nth-child(2) { display: none; } }
@media (max-width: 420px) { .scene-wrap { height: 52vh; min-height: 350px; } .start-card { width: 72%; padding: 14px; } .start-card h2 { font-size: 31px; } .start-card .story { font-size: 9px; } .start-stats span:last-child { display: none; } .side-panel { grid-template-columns: 1fr; } .objectives { grid-row: auto; } .telemetry { display: none; } .viewport-controls span { letter-spacing: .06em; } }
