/* One sky, one compact panel on the left (Task 013), a shared clock and a continuous report. */
:root { color-scheme:dark; --paper:#f0ebdb; --ink:#14130f; --muted:#c4c0b2; --orange:#ff713d; --line:rgba(234,223,190,.3); --mono:ui-monospace,"Cascadia Mono",Consolas,monospace; --sans:"Segoe UI",Arial,sans-serif; }
* {box-sizing:border-box}
html,body {margin:0;width:100%;background:#070808;color:var(--paper);font:14px/1.4 var(--sans)}
[hidden] {display:none!important}
a {color:inherit}
button,select,input {font:inherit}
button,select,summary,a {touch-action:manipulation}
button,select {cursor:pointer}
button:disabled {cursor:default}
:focus-visible {outline:2px solid var(--orange);outline-offset:3px}
#opening {isolation:isolate;position:relative;display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-height:clamp(540px,83svh,950px);overflow:clip;border-bottom:1px solid var(--line);background:#030404}
#earth,#stage {position:absolute;inset:0;width:100%;height:100%;z-index:-2}
#stage {z-index:auto}
#afterglow-earth {display:block;width:100%;height:100%;outline:none;touch-action:none}
#status {position:absolute;top:50%;left:50%;max-width:55ch;transform:translate(-50%,-50%);color:#fff;text-shadow:0 1px 5px black;text-align:center;pointer-events:none}
#status.done {display:none}
.sky-mast {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px clamp(14px,2.8vw,50px);background:linear-gradient(#040505c9,transparent);pointer-events:none}
.sky-mast>* {pointer-events:auto}
.wordmark {display:inline-flex;align-items:center;gap:9px;letter-spacing:.22em;text-transform:uppercase;font:650 13px/1 var(--mono);color:#f6f2e7}
.wordmark i {width:9px;height:9px;background:var(--orange);border-radius:50%}
.sky-actions {display:flex;gap:8px;align-items:center}
#source-line {font:11px var(--mono);color:var(--paper)}
.sky-button,.file-tools button,#place button {border:1px solid rgba(239,230,209,.38);border-radius:3px;background:rgba(14,15,15,.56);color:var(--paper);padding:5px 9px;font:600 12px/1.2 var(--sans)}
.sky-button:hover,.file-tools button:hover,#place button:hover {border-color:var(--paper)}
#pick {background:var(--paper);color:var(--ink);border-color:var(--paper)}
#clear:disabled {opacity:.42}
.stations {display:grid;grid-template-columns:minmax(290px,min(33vw,440px)) 1fr;gap:12px;align-items:start;min-height:0;padding:clamp(8px,1.6vw,28px) clamp(14px,2.8vw,50px) 8px;pointer-events:none}
#panel {grid-column:1;max-height:min(calc(100svh - 150px),780px)}
.file-tools {display:flex;gap:5px;flex-wrap:wrap}
#said,#scene-context {font-size:12px;margin:4px 0}
#scene-context:empty,#said:empty {display:none}
#place {margin-top:8px;padding-top:8px;border-top:1px solid var(--line)}
#place h2,#place p {font-size:13px;margin:4px 0}
.coordinates {display:flex;flex-wrap:wrap;gap:6px}
.coordinates label {font-size:11px}
.coordinates input {display:block;width:10ch;max-width:100%;background:#161714;border:1px solid var(--line);color:var(--paper)}
#progress {height:2px;margin:3px 0;background:var(--line)} #progress>div {height:100%;background:var(--orange)}
#transport {align-self:end;margin:0 clamp(14px,2.8vw,50px) 14px;z-index:1}
#veil {position:fixed;inset:0;z-index:8;display:grid;place-content:center;gap:3px;background:#0b0b0abf;outline:2px dashed var(--orange);outline-offset:-12px;text-align:center;pointer-events:none;font-size:21px}
#veil small {font-size:13px;color:var(--muted)}
#analysis {min-width:0;background:#090a09;scroll-margin-top:34px}
#chapter-nav {position:sticky;top:0;display:flex;gap:16px;align-items:center;flex-wrap:wrap;background:rgba(10,11,11,.88);backdrop-filter:blur(8px);z-index:3;border-bottom:1px solid var(--line);padding:7px clamp(14px,2.8vw,50px);font:11px var(--mono)}
#chapter-nav a {text-decoration:none;color:#d5d1c4} #chapter-nav a:hover {color:var(--orange)}
footer {display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 20px;padding:10px clamp(14px,2.8vw,50px);color:#bab6a8;border-top:1px solid #45443e;font:11px/1.45 var(--sans)}
footer>p {margin:0}
footer a {color:inherit;text-decoration:underline;text-decoration-color:#6f6c62;text-underline-offset:2px} footer a:hover,footer a:focus-visible {color:#f3e5c7;text-decoration-color:currentColor}
body.sky-only #opening,body.check-view #opening {height:100svh;min-height:0;border:0}
body.sky-only .stations,body.sky-only #transport,body.sky-only #analysis,body.sky-only footer,body.sky-only #chapter-nav,body.sky-only .wordmark,body.sky-only #source-line {display:none!important}
body.sky-only .sky-mast {justify-content:flex-end}
body.check-view .sky-mast,body.check-view .stations,body.check-view #transport,body.check-view #chapter-nav,body.check-view #analysis,body.check-view footer {display:none!important}
@media(max-width:640px) {
  #opening {display:flex;flex-direction:column;min-height:0}
  #earth {position:relative;order:0;height:clamp(320px,53svh,600px);flex:none;z-index:0}
  .sky-mast {position:absolute;inset:0 0 auto;z-index:1}
  .stations {order:1;grid-template-columns:1fr;gap:12px;padding:10px 12px}
  #panel {max-height:none}
  #transport {order:2;align-self:stretch;margin:0 12px 10px}
  body.sky-only #earth,body.check-view #earth {height:100%}
}
@media(max-width:580px){.stations{gap:6px}#source-line{font-size:10px}.sky-mast{padding:9px 12px}}

@media(min-width:641px) {body[data-reading="empty"]:not(.sky-only):not(.check-view) #opening {min-height:calc(100svh - 37px)}}
#fieldnotes,#night-ledger,#sky-track,#frame-quality,#fits-frames {scroll-margin-top:40px}

.body-actions { display:inline-flex;gap:1px; }
.body-actions [aria-pressed=true] { border-color:#9a927c; color:#f3e5c7; background:rgba(50,46,37,.68); }
.body-actions button:disabled { cursor:default; }
/* The report's head: the chosen night's own summary (Task 013 moved it here from the first page). */
#night {padding:18px clamp(14px,2.8vw,50px) 4px;border-bottom:1px solid var(--line)}
#night .subject {font:570 clamp(24px,2.6vw,38px)/1.08 var(--sans);margin:2px 0 6px;letter-spacing:-.03em}
#night .dateline {font:11px var(--mono);color:var(--muted)}
#night .lede {max-width:70ch;margin:4px 0 8px}
@media(max-width:580px) {.sky-actions {flex-wrap:wrap;justify-content:flex-end;gap:3px}.sky-actions #source-line {flex-basis:100%;text-align:right}.body-actions .sky-button {font-size:11px;padding:4px 6px}}
