/* Celestial Orrery · Atelier edition.
   Page and controls follow the Scenario explorations layout (Instrument Sans / Serif, square
   thin-ruled controls); colours are the atelier's own plum-black, cream and brass. The
   engraved faces (Cinzel, Cormorant, Caveat) stay on the in-scene plates, ink and certificate. */
@font-face { font-family: 'Instrument Sans'; src: url(../assets/fonts/instrument-sans-regular.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url(../assets/fonts/instrument-serif-regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --bg: #07050a;
  --panel: rgba(16, 12, 22, 0.78);
  --panel-solid: #110d17;
  --ink: #f2e6cc;
  --ink-dim: rgba(242, 230, 204, 0.62);
  --muted: #a99f8d;
  --brass: #d9b46a;
  --brass-hi: #f3d99a;
  --brass-lo: #7a5a2a;
  --gold: #d9b46a;
  --rule: #3a3027;
  --line: rgba(217, 180, 106, 0.3);
  --cyan: #9fd4ff;
  --font-ui: 'Instrument Sans', system-ui, sans-serif;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-cap: 'Cinzel', 'Times New Roman', serif;
  --font-body: 'Cormorant Garamond', Georgia, serif;
  --font-ink: 'Caveat', 'Segoe Script', cursive;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --exploration-footer-bg: #07050a;
  --exploration-footer-ink: #a99f8d;
  --exploration-footer-border: #3a3027;
  color-scheme: dark;
}
body.blue { --panel: rgba(6, 18, 40, 0.78); --line: rgba(255, 207, 115, 0.42); }
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: var(--font-ui); font-synthesis: none; overflow-x: hidden; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { opacity: .4; cursor: default; }
a { color: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; touch-action: manipulation; outline-offset: 4px; transition: color .2s, background .2s, border-color .2s; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [role=switch]:focus-visible { outline: 2px solid var(--gold); }
[hidden] { display: none !important; }
.icon, .select-chevron { width: 20px; height: 20px; flex: 0 0 20px; vertical-align: middle; }
.title-dot { color: var(--gold); }
kbd { font: inherit; font-size: 11px; min-width: 22px; text-align: center; padding: 3px 5px; border: 1px solid rgba(242, 230, 204, .35); border-radius: 3px; margin: 0 6px 0 0; }
.skip { position: fixed; top: 10px; left: 10px; z-index: 50; background: var(--gold); color: var(--bg); padding: 12px; clip-path: inset(50%); }
.skip:focus { clip-path: none; }

/* ---------------------------------------------------------------- masthead + opening */
.masthead { max-width: 1600px; margin: auto; padding: 22px 4.2%; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--rule); font-size: 14px; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; }
.brand img { display: block; width: auto; height: 22px; }
.brand span { font-size: 14px; color: var(--muted); }
.brand:hover span { color: var(--ink); }
.create { text-decoration: none; display: flex; gap: 28px; align-items: center; min-height: 44px; }
.create span { font-size: 20px; color: var(--gold); }
.create:hover { color: var(--gold); }
.page { max-width: 1600px; margin: auto; padding: 0 4.2%; }
.opening { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px 0 25px; }
.eyebrow { font-size: 12px; letter-spacing: .13em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; }
.edition { display: inline-block; margin-left: 28px; }
h1 { font: 400 clamp(48px, 5.2vw, 82px)/.93 var(--font-display); letter-spacing: -.025em; margin: 0; }
.intro p { margin: 0; }
.intro .tagline { font-size: clamp(24px, 2.4vw, 36px); line-height: 1.12; letter-spacing: -.035em; margin-bottom: 10px; }
.intro .tagline em { font-style: normal; color: var(--gold); }
.intro > p:last-child { font-size: 13px; line-height: 1.6; color: var(--muted); }

/* ---------------------------------------------------------------- making-of entry */
.making-entry { display: grid; grid-template-columns: 1.4fr 1fr 1.05fr; gap: 8px; margin: 0 0 18px; }
.making-button, .entry-action, .pdf-button { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 64px; padding: 12px 18px; text-align: left; text-decoration: none; font-size: 13px; }
.making-button { justify-content: flex-start; background: var(--gold); color: #1a1208; border: 1px solid var(--gold); }
.making-button:hover { background: var(--brass-hi); border-color: var(--brass-hi); }
.making-button strong { display: block; font-size: 14px; font-weight: 500; }
.making-button small { display: block; font-size: 11px; margin-top: 4px; color: #3b2c14; }
.entry-action, .pdf-button { border: 1px solid var(--rule); background: var(--panel-solid); }
.entry-action .icon, .pdf-button .icon { color: var(--gold); }
.entry-action:hover, .pdf-button:hover { border-color: var(--gold); }
.pdf-button small { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ---------------------------------------------------------------- cinema: screen + rail */
.cinema { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 0 28px; align-items: start; }
.screen-column { min-width: 0; }
.screen-column:fullscreen { background: var(--bg); display: flex; flex-direction: column; padding: 0; }
.screen-column:fullscreen .screen { flex: 1; aspect-ratio: auto; max-height: none; }
.screen-column:fullscreen > :not(.screen) { display: none; }
/* The screen is the containing block for every overlay panel, including position: fixed ones. */
#stage {
  position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 360px; max-height: min(800px, calc(100dvh - 96px));
  overflow: hidden; background: #050308; isolation: isolate; container-type: size; contain: layout paint;
}
#app { position: absolute; inset: 0; }
#app canvas { display: block; width: 100%; height: 100%; touch-action: none; }
#labels { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.hud { transition: opacity .6s var(--ease), transform .6s var(--ease); }
#stage .hud { position: absolute; z-index: 5; }
body:not(.entered) #stage .hud { opacity: 0; pointer-events: none; }
body:not(.entered) .screen-column > .hud, body:not(.entered) #panel { opacity: .35; pointer-events: none; }
body.cine #stage .hud:not(#toast) { opacity: 0 !important; pointer-events: none; }
body.halted #stage .hud { visibility: hidden; }
.glass { background: var(--panel); backdrop-filter: blur(12px) saturate(1.15); -webkit-backdrop-filter: blur(12px) saturate(1.15); border: 1px solid rgba(242, 230, 204, .16); border-radius: 2px; transition: background .8s var(--ease), border-color .8s; }

/* intro + halt */
#intro, #halt {
  position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; text-align: center; padding: 24px;
  background: radial-gradient(ellipse at 50% 42%, rgba(40, 26, 12, .45), rgba(5, 3, 8, .94) 72%);
  transition: opacity 1.2s var(--ease), visibility 1.2s;
}
body.entered #intro { opacity: 0; visibility: hidden; }
#halt { z-index: 35; }
.intro-kicker { font-size: 12px; letter-spacing: .13em; text-transform: uppercase; color: var(--gold); margin: 0 0 10px; }
.intro-title { font: 400 clamp(38px, 5cqw, 64px)/1 var(--font-display); letter-spacing: -.02em; margin: 0 0 22px; }
#halt p:not(.intro-title) { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.intro-load { width: 240px; height: 2px; background: var(--rule); margin: 0 auto; overflow: hidden; }
#loadbar { height: 100%; width: 0; background: var(--gold); transition: width .4s; }
#loadtxt { font-size: 12px; color: var(--muted); margin: 10px 0 24px; min-height: 18px; }
.intro-btns, .modal-btns, .bc-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.btn-brass, .btn-ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 12px 20px; border-radius: 2px; font-size: 13px; font-weight: 500; text-decoration: none; }
.btn-brass { background: var(--gold); color: #1a1208; border: 1px solid var(--gold); }
.btn-brass:hover:not(:disabled) { background: var(--brass-hi); border-color: var(--brass-hi); }
.btn-ghost { border: 1px solid rgba(242, 230, 204, .3); color: var(--ink); background: rgba(7, 5, 10, .4); }
.btn-ghost:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }

/* viewer controls */
.screen-top { top: 12px; left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; pointer-events: none; z-index: 6 !important; }
.screen-top > * { pointer-events: auto; }
.screen-badges { display: flex; gap: 7px; min-height: 44px; }
.screen-select { position: relative; display: inline-flex; }
.screen-badge { appearance: none; -webkit-appearance: none; min-height: 44px; padding: 10px 40px 10px 14px; font-size: 13px; background: rgba(7, 5, 10, .74); backdrop-filter: blur(10px); border: 1px solid rgba(242, 230, 204, .2); border-radius: 3px; cursor: pointer; }
.screen-badge:hover { border-color: var(--gold); }
.screen-badge option { background: var(--panel-solid); color: var(--ink); }
.screen-select .select-chevron { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; pointer-events: none; color: var(--ink-dim); }
.shortcut-row { display: flex; align-items: center; gap: 4px; padding: 4px; background: rgba(7, 5, 10, .74); backdrop-filter: blur(10px); border: 1px solid rgba(242, 230, 204, .2); border-radius: 3px; }
.shortcut-row button { display: inline-flex; align-items: center; min-height: 34px; padding: 4px 10px 4px 6px; font-size: 13px; border-radius: 2px; }
.shortcut-row button:hover, .mode-switch[aria-checked=true] { color: var(--gold); }
.mode-switch[aria-checked=true] { background: rgba(217, 180, 106, .14); }
.mode-switch[aria-checked=true] kbd { border-color: var(--gold); }
.screen-tools { display: flex; gap: 6px; flex-shrink: 0; }
.screen-tool { display: grid; place-items: center; width: 44px; height: 44px; background: rgba(7, 5, 10, .74); backdrop-filter: blur(10px); border: 1px solid rgba(242, 230, 204, .3); border-radius: 4px; }
.screen-tool:hover { border-color: var(--gold); }
.screen-tool svg { width: 21px; height: 21px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.screen-caption { left: 18px; right: 18px; bottom: 16px; display: flex; gap: 10px; font-size: 12px; color: var(--ink-dim); text-shadow: 0 1px 8px #000; pointer-events: none; }
.screen-caption span { color: var(--gold); }

/* transport + view row */
.transport { display: flex; align-items: center; gap: 22px; min-height: 64px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.transport-play { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--rule); border-radius: 2px; flex: none; }
.transport-play:hover { border-color: var(--gold); }
.transport-play svg { width: 16px; height: 16px; fill: var(--gold); }
.date-block { min-width: 230px; }
.date-main { font: 400 24px/1.05 var(--font-display); white-space: nowrap; }
.date-sub { font-size: 11px; color: var(--muted); white-space: nowrap; margin-top: 4px; }
.speed, .tl-scrub { flex: 1; min-width: 150px; display: block; }
.speed-label { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); }
.speed-label output { color: var(--gold); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; margin: 0; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(90deg, var(--gold) var(--p, 50%), var(--rule) var(--p, 50%)); }
input[type=range]::-moz-range-track { height: 3px; background: var(--rule); }
input[type=range]::-moz-range-progress { height: 3px; background: var(--gold); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; margin-top: -5px; border-radius: 50%; background: var(--gold); border: 0; }
input[type=range]::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: var(--gold); border: 0; }
#s-scrub::-webkit-slider-runnable-track { background: var(--rule); }
.view-row { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; padding-top: 12px; }
.view-switch { display: flex; gap: 8px; flex-wrap: wrap; }
.view-switch button { display: flex; align-items: center; gap: 11px; min-height: 58px; padding: 10px 14px; border: 1px solid var(--rule); background: rgba(17, 13, 23, .55); text-align: left; border-radius: 0; }
.view-switch button:hover { border-color: var(--gold); }
.view-switch strong { display: block; font-size: 13px; font-weight: 500; }
.view-switch small { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; }
.view-switch .gold { border-color: rgba(217, 180, 106, .6); }
.view-switch .gold strong { color: var(--gold); }
#btn-eclipse[aria-expanded=true], .toy[aria-pressed=true] { background: var(--gold); border-color: var(--gold); color: #1a1208; }
#btn-eclipse[aria-expanded=true] small, .toy[aria-pressed=true] small { color: #3b2c14; }
.toy-ic { font-family: 'Noto Sans Symbols 2', serif; font-size: 20px; color: var(--gold); width: 22px; text-align: center; }
.toy[aria-pressed=true] .toy-ic { color: #1a1208; }
#toys { margin-left: auto; }
.key-hint { flex-basis: 100%; margin: 6px 0 0; font-size: 11px; color: var(--muted); }
.key-hint kbd { margin: 0 2px; padding: 2px 4px; font-size: 10px; border-color: var(--rule); }
body.comet-mode #app canvas { cursor: crosshair; }

/* rail */
.director-rail { display: flex; flex-direction: column; min-width: 0; padding-bottom: 12px; }
.rail-label { font-size: 12px; letter-spacing: .02em; color: var(--muted); margin: 0 0 10px; }
.rail-label:not(:first-child) { margin-top: 22px; }
.rail-list .ctl { display: grid; grid-template-columns: 26px 1fr auto; align-items: baseline; gap: 2px 8px; padding: 11px 0 6px; border-top: 1px solid var(--rule); }
.rail-list .ctl:last-child { border-bottom: 1px solid var(--rule); }
.ctl-number { font-size: 11px; color: var(--muted); }
.ctl-name { font-size: 14px; }
.ctl output { font: 400 18px/1 var(--font-display); color: var(--gold); }
.ctl input { grid-column: 2 / -1; }
.quiet-button { align-self: flex-start; display: inline-flex; gap: 8px; align-items: center; min-height: 40px; font-size: 12px; color: var(--muted); }
.quiet-button:hover { color: var(--gold); }
.toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.toggles button { position: relative; min-height: 38px; padding: 8px 10px 8px 26px; border: 1px solid var(--rule); text-align: left; font-size: 12px; color: var(--ink-dim); }
.toggles button::before { content: ''; position: absolute; left: 10px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; border: 1px solid var(--gold); }
.toggles button:hover { border-color: var(--gold); }
.toggles button.on { color: var(--ink); border-color: rgba(217, 180, 106, .6); background: rgba(217, 180, 106, .08); }
.toggles button.on::before { background: var(--gold); }
.camera-note { position: relative; margin-top: 22px; padding: 16px; border: 1px solid var(--rule); background: linear-gradient(180deg, rgba(217, 180, 106, .06), transparent 60%), var(--panel-solid); }
.info-close { position: absolute; right: 8px; top: 6px; width: 32px; height: 32px; font-size: 20px; color: var(--muted); display: none; }
#info.show .info-close { display: block; }
.info-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.info-sym { width: 40px; height: 40px; flex: none; border: 1px solid var(--gold); border-radius: 50%; display: grid; place-items: center; font-family: 'Noto Sans Symbols 2', serif; font-size: 20px; color: var(--gold); }
.info-name { font: 400 30px/1 var(--font-display); letter-spacing: -.01em; }
.info-tag { font-size: 12px; color: var(--muted); margin-top: 4px; }
.info-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stat { padding: 8px 6px 7px; border: 1px solid var(--rule); text-align: center; }
.stat b { display: block; white-space: nowrap; font: 400 18px/1 var(--font-display); color: var(--gold); font-variant-numeric: tabular-nums; }
.stat small { display: block; margin-top: 4px; font-size: 10px; line-height: 1.2; color: var(--muted); }
.stat.you { border-color: rgba(230, 120, 90, .45); }
.stat.you b { color: #ffb99a; }
.info-fact { margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--ink-dim); }
.info-more { margin-top: 10px; display: flex; align-items: center; gap: 6px; min-height: 36px; font-size: 12px; color: var(--gold); }
.info-more .tri { display: inline-block; transition: transform .3s var(--ease); }
.info-more[aria-expanded=true] .tri { transform: rotate(90deg); }
.info-grid { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 12px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--rule); }
.info-grid span:nth-child(odd) { color: var(--muted); }
.info-grid span:nth-child(even) { text-align: right; }

/* ---------------------------------------------------------------- in-scene labels (engraved brass plates, ink) */
.lbl { pointer-events: none; white-space: nowrap; transition: opacity .3s; }
.lbl.ink { font-family: var(--font-ink); font-size: 19px; line-height: 1.05; color: #ffd98a; text-shadow: 0 0 10px rgba(0, 0, 0, .9), 0 0 2px rgba(0, 0, 0, .9); text-align: center; }
.lbl.ink b { font-weight: 700; color: #fff0c8; }
.lbl.ink.small { font-size: 16px; }
body:not(.blue) .lbl.ink { color: #e8c886; }
.lbl.plate {
  font-family: var(--font-cap); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; padding: 4px 9px 3px; border-radius: 3px; color: #2b1a07;
  background: linear-gradient(180deg, #f4dc9e, #c9994a 60%, #a67a34); border: 1px solid #f7e2ac;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -1px 0 rgba(90, 55, 15, .5);
  text-shadow: 0 1px 0 rgba(255, 240, 200, .6); margin-bottom: 6px; text-align: center;
}
.lbl.plate i { display: block; font-family: var(--font-body); font-style: italic; letter-spacing: .02em; text-transform: none; font-size: 12px; color: #4a3010; }
body.blue .lbl.plate { background: rgba(4, 16, 38, .75); color: #ffd98a; border-color: rgba(255, 207, 115, .65); text-shadow: none; box-shadow: 0 0 14px rgba(255, 190, 90, .15); }
body.blue .lbl.plate i { color: #9fd4ff; }
.lbl.plate.sel { outline: 1px solid #fff2c4; outline-offset: 2px; }

/* blueprint plates */
#plates { left: 14px; top: 68px; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
body:not(.blue) #plates { opacity: 0; transform: translateX(-16px); }
.plate-card { width: 260px; padding: 12px 14px; border: 1px solid rgba(255, 207, 115, .5); background: rgba(3, 14, 34, .72); backdrop-filter: blur(8px); }
.pc-title { font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: #ffd98a; border-bottom: 1px dashed rgba(255, 207, 115, .4); padding-bottom: 6px; margin-bottom: 6px; }
.pc-formula { font-family: var(--font-ink); font-size: 28px; color: #fff0c8; text-align: center; }
.pc-body { font-family: var(--font-ink); font-size: 18px; color: #cfe6ff; line-height: 1.25; }
.pc-body b { color: #ffd98a; font-weight: 700; }
#kepler-table { width: 100%; border-collapse: collapse; font-family: var(--font-ink); font-size: 17px; color: #cfe6ff; }
#kepler-table th { font-family: var(--font-ui); font-size: 9.5px; letter-spacing: .08em; color: #ffd98a; font-weight: 400; text-align: right; padding: 2px 4px; }
#kepler-table td { text-align: right; padding: 1px 4px; }
#kepler-table td:first-child, #kepler-table th:first-child { text-align: left; }
#kepler-table td.k { color: #ffe9b0; }

/* toast, banner, eclipse hunter, birthday */
#toast { left: 50%; top: 68px; transform: translate(-50%, -10px); padding: 10px 18px; background: rgba(7, 5, 10, .84); border: 1px solid var(--line); font-size: 13px; color: var(--brass-hi); opacity: 0; pointer-events: none; max-width: calc(100cqw - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#ecl-banner { left: 50%; top: 68px; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 16px; max-width: calc(100cqw - 32px); }
#ecl-text { font-size: 13px; color: var(--brass-hi); }
#ecl-text b { font-weight: 500; color: var(--ink); margin-right: 6px; }
.chip { font-size: 12px; }
#ecl-banner .chip, .ep-go { min-height: 36px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 2px; color: var(--brass-hi); white-space: nowrap; }
#ecl-banner .chip:hover, .ep-go:hover { background: rgba(217, 180, 106, .16); }
#eclipse-pop { right: 14px; bottom: 14px; width: min(400px, calc(100cqw - 28px)); max-height: calc(100cqh - 84px); overflow: auto; padding: 16px; opacity: 0; transform: translateY(10px); pointer-events: none; }
#eclipse-pop.show { opacity: 1; transform: none; pointer-events: auto; }
.ep-head { display: flex; justify-content: space-between; gap: 12px; }
.ep-head .info-close { position: static; display: block; flex: none; }
.ep-title { font: 400 24px/1 var(--font-display); }
.ep-sub { color: var(--muted); font-size: 12px; margin-top: 6px; }
.ep-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; }
.ep-item { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--rule); }
.ep-item svg { width: 40px; height: 40px; }
.ep-kind { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.ep-date { font-size: 14px; margin-top: 2px; }
.ep-where { font-size: 11px; color: var(--muted); line-height: 1.3; margin-top: 2px; }
.modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgba(4, 3, 6, .6); opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; }
.modal.show { opacity: 1; visibility: visible; }
.modal-card { width: min(420px, calc(100cqw - 32px)); max-height: calc(100cqh - 32px); overflow: auto; padding: 24px; text-align: left; background: var(--panel-solid); }
.modal-title { font: 400 30px/1.05 var(--font-display); }
.modal-card p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.modal-card input[type=text], .modal-card input[type=date] { width: 100%; min-height: 46px; padding: 10px 12px; margin: 4px 0; font-size: 15px; border: 1px solid var(--rule); border-radius: 2px; background: rgba(0, 0, 0, .35); color: var(--ink); color-scheme: dark; }
.modal-card input:focus { border-color: var(--gold); }
.modal-btns { justify-content: flex-end; margin-top: 16px; }
.seg { display: flex; border: 1px solid var(--rule); }
.seg button { flex: 1; min-height: 40px; padding: 8px 6px; font-size: 12px; border-right: 1px solid var(--rule); color: var(--ink-dim); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--gold); color: #1a1208; }
#bday-card { right: 14px; top: 68px; width: 300px; padding: 16px; opacity: 0; transform: translateY(-8px); pointer-events: none; }
#bday-card.show { opacity: 1; transform: none; pointer-events: auto; }
#bday-card .bc-title { font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--gold); }
#bday-card .bc-date { font: 400 26px/1.1 var(--font-display); margin: 6px 0 10px; }
#bday-card ul { list-style: none; padding: 0; margin: 0 0 14px; font-size: 13px; line-height: 1.6; color: var(--ink-dim); }
#bday-card li b { color: var(--brass-hi); font-weight: 500; }
#bday-card .bc-btns { justify-content: flex-start; }

/* eclipse theatre: your sky */
#ecl-sky { right: 14px; top: 68px; width: 260px; padding: 12px; text-align: center; }
#ecl-sky canvas { width: 100%; height: auto; display: block; border-radius: 50%; }
.es-cap { font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--gold); margin: 4px 0 10px; }
.es-meter { margin-top: 10px; font-size: 13px; color: var(--ink); }
.noscript { position: absolute; inset: auto 0 40% 0; text-align: center; font-size: 14px; color: var(--muted); padding: 0 24px; }

/* prompts dialog */
.prompts-dialog { background: var(--bg); color: var(--ink); border: 1px solid var(--rule); width: min(860px, calc(100% - 30px)); max-height: calc(100dvh - 40px); padding: 30px; overflow-y: auto; }
.prompts-dialog::backdrop { background: rgba(4, 3, 6, .8); backdrop-filter: blur(8px); }
.dialog-top { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.dialog-top .eyebrow { margin: 0; }
.prompts-dialog h2 { font: 400 42px/1.05 var(--font-display); margin: 20px 0 12px; }
.editor-intro { max-width: 610px; font-size: 13px; line-height: 1.65; color: var(--muted); margin: 0 0 20px; }
.prompt-list { list-style: none; margin: 0; padding: 0; }
.prompt-list li { padding: 18px 0; border-top: 1px solid var(--rule); }
.prompt-meta { display: flex; gap: 14px; font-size: 12px; color: var(--gold); margin: 0 0 10px; }
.prompt-meta span { color: var(--muted); }
.prompt-list blockquote { margin: 0; padding: 14px 16px; background: var(--panel-solid); border-left: 2px solid var(--gold); font-size: 13px; line-height: 1.7; color: var(--ink-dim); user-select: all; }

/* shared footer, themed */
.exploration-bar { max-width: 1600px; margin: 28px auto 0; padding: 6px 4.2% max(6px, env(safe-area-inset-bottom)); font-family: var(--font-ui); font-size: 11px; }
.exploration-bar [data-exploration-tools] { font-family: var(--font-ui); }
.exploration-credit { display: flex; align-items: baseline; gap: 12px; }
.exploration-credit strong { font: 400 18px/1 var(--font-display); color: var(--ink); }
.exploration-credit span { font-size: 11px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .cinema { grid-template-columns: minmax(0, 1fr) 240px; gap: 0 20px; }
  .transport { gap: 14px; }
  .date-block { min-width: 190px; }
  .view-switch small { display: none; }
  .view-switch button { min-height: 48px; }
}
@media (max-width: 900px) {
  .opening { flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px 0 20px; }
  .desktop-break { display: none; }
  .making-entry { grid-template-columns: 1fr 1fr; }
  .making-entry .making-button { grid-column: 1 / -1; }
  .cinema { grid-template-columns: minmax(0, 1fr); }
  .director-rail { margin-top: 22px; }
  #toys { margin-left: 0; }
}
@media (max-width: 700px) {
  .masthead { padding: 16px 5%; }
  .page { padding: 0 5%; }
  .brand img { height: 19px; }
  .edition { margin-left: 14px; }
  .making-entry { grid-template-columns: 1fr; }
  .making-entry .making-button { grid-column: auto; }
  .making-button, .entry-action, .pdf-button { justify-content: flex-start; min-height: 56px; }
  #stage { aspect-ratio: 4 / 5; min-height: 380px; max-height: calc(100dvh - 72px); }
  /* phones: menus along the top edge, Blueprint and the tools along the bottom edge */
  .screen-top { inset: 10px; flex-wrap: wrap; align-content: space-between; }
  .screen-badges { flex-basis: 100%; }
  .screen-badge { font-size: 12px; padding: 10px 32px 10px 10px; }
  .screen-select .select-chevron { right: 8px; }
  #btn-cine { display: none; }
  .screen-caption { display: none; }
  .screen-tools { margin-left: auto; }
  .screen-tool { width: 40px; height: 40px; }
  #plates { display: none; }
  .transport { flex-wrap: wrap; gap: 8px 12px; }
  .date-block { flex: 1; min-width: 0; }
  .speed, .tl-scrub { flex-basis: 100%; }
  .view-switch { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .view-switch button { flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px 10px; }
  .toy-ic { text-align: left; }
  .key-hint { display: none; }
  /* between the menus along the top edge and the tools along the bottom edge */
  #eclipse-pop { left: 10px; right: 10px; width: auto; top: 62px; bottom: 62px; max-height: none; }
  #bday-card { left: 10px; right: 10px; width: auto; top: 110px; }
  #ecl-sky { right: 10px; width: 150px; padding: 8px; top: 110px; }
  #toast, #ecl-banner { top: 110px; }
  .lbl.ink { font-size: 15px; } .lbl.ink.small { font-size: 13px; } .lbl.plate { font-size: 8.5px; padding: 3px 6px 2px; }
  .prompts-dialog { padding: 20px; }
  .prompts-dialog h2 { font-size: 32px; }
  .exploration-credit span { display: none; }
}
@media (max-width: 420px) {
  .brand span { display: none; }
  .view-switch strong { font-size: 12px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  #stage { aspect-ratio: auto; height: calc(100dvh - 24px); min-height: 300px; max-height: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
