@font-face {
  font-family:'AION Pixel';
  src:url('/assets/pixel-display.ttf') format('truetype');
  font-weight:400;
  font-style:normal;
  font-display:swap
}
/* The main workspace keeps the same geometry across all journey phases. */
#location-name{display:inline-block;max-width:22ch;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}
.world-log{margin:16px 0;padding:16px;min-width:0}
.world-log>summary{min-height:44px;line-height:1.5;padding:8px 0}
.world-log h2{margin-top:16px}
.world-place{border:2px solid #437eac;padding:12px;background:#071b30;min-height:86px}
.location-thumbnail{display:block;width:100%;aspect-ratio:3/1;object-fit:cover;image-rendering:pixelated;margin-bottom:12px}
.scene-cast{position:absolute;inset:0;display:flex;align-items:flex-end;justify-content:center;gap:1%;padding:0 4% 4%;pointer-events:none;z-index:2}
.scene-person{margin:0;height:63%;max-width:19%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:0}
.person-sprite{display:block;height:calc(100% - 20px);width:100%;object-fit:contain;image-rendering:pixelated}
.scene-person figcaption{background:#04172bee;border:1px solid #74ffd1;color:#fff;padding:3px 6px;font:11px/1.1 monospace;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.scene-frame[data-crowded=true] .scene-person{flex:0 1 18%;max-width:18%}
.scene-frame[data-crowded=true] .person-sprite{height:calc(100% - 32px)}
.scene-frame[data-crowded=true] .scene-person figcaption{white-space:normal;text-align:center;overflow-wrap:anywhere;min-height:30px;flex-shrink:0;display:flex;align-items:center;justify-content:center}
.resident-placeholder{background:#10283dee;border:2px dashed #9aacb8;color:#fff;padding:14px;font:12px monospace}
.scene-machine{position:absolute;left:1%;bottom:5%;width:35%;height:70%;object-fit:contain;object-position:bottom;image-rendering:pixelated;z-index:1;pointer-events:none}
/* Both occupied sprites share a canvas/anchor; effects stay on the same element. */
.scene-frame:is([data-machine-pose=boarding],[data-machine-pose=sealed]) .scene-machine{left:25%;width:50%;height:80%;z-index:3}
.scene-frame:is([data-machine-pose=boarding],[data-machine-pose=sealed]) .scene-cast{justify-content:flex-end}
.canonical-scene .retro-world[hidden],.scene-machine[hidden]{display:none!important}
body[data-skin=neutral] .scene-machine,body[data-skin=neutral] .person-sprite{display:none}
body[data-skin=neutral] .canonical-scene .neutral-world{display:none}
body[data-skin=neutral] .scene-presence{position:relative;width:auto;height:auto;margin:24px;clip:auto;white-space:normal;color:#fff}
body:is([data-scene-cue=armed],[data-scene-cue=charging],[data-scene-cue=dispatch],[data-scene-cue=transit]) .scene-machine{animation:machine-energy 1.3s ease-in-out infinite alternate}
@keyframes machine-energy{from{filter:brightness(1.1) drop-shadow(0 0 3px #00c8ff)}to{filter:brightness(1.7) drop-shadow(0 0 18px #7df8ff)}}
@media(prefers-reduced-motion:reduce){.scene-machine{animation:none!important}}
@media(max-width:600px){.scene-person{height:61%;max-width:31%}.scene-cast{padding-bottom:11%;gap:0}.scene-machine{width:48%;left:-6%;bottom:12%;height:55%}.scene-person figcaption{font-size:9px}.location-thumbnail{aspect-ratio:16/9}}
@media(max-width:600px){.scene-frame:is([data-machine-pose=boarding],[data-machine-pose=sealed]) .scene-machine{left:9%;width:82%;height:74%;bottom:12%}}
/* Larger mobile characters; overflow belongs to the cast, never the whole page. */
@media(max-width:600px){
  .scene-cast{padding-bottom:10%}
  .scene-person{height:78%;max-width:42%}
  .scene-frame[data-crowded=true] .scene-cast{justify-content:flex-start;gap:12px;overflow-x:auto;overflow-y:hidden;pointer-events:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scrollbar-width:thin;scrollbar-color:#74ffd1 #10283d;touch-action:pan-x pan-y}
  .scene-frame[data-crowded=true] .scene-person{flex:0 0 128px;max-width:128px;scroll-snap-align:start;pointer-events:none}
  .scene-frame[data-crowded=true]::after{content:'Swipe characters →';position:absolute;top:8px;left:8px;z-index:3;background:#04172be8;color:#dbeafa;padding:5px;font:10px monospace;pointer-events:none}
  .scene-person figcaption{font-size:11px}
}
.world-place strong,.world-place span{display:block;overflow-wrap:anywhere}
.world-place span{font-size:12px;color:#aec2ce;margin-top:8px}
.world-place.agent-here{border-color:#74ffd1;box-shadow:inset 0 0 0 2px #74ffd133}
.world-place.agent-here span{color:#74ffd1}
.world-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.world-event{padding:14px 0;border-bottom:1px solid #437eac;overflow-wrap:anywhere}
.world-event h3{font-size:15px}.world-event pre{white-space:pre-wrap;overflow-wrap:anywhere}
#world-activity{padding-left:20px;overflow-wrap:anywhere}
@media(max-width:600px){.world-columns{grid-template-columns:1fr}.world-place{padding:8px;font-size:12px}#location-name{max-width:17ch}.world-log{padding:12px}}
:root {
  color-scheme:dark;
  --ink:#dbeafa;
  --muted:#a4bed5;
  --navy:#04172b;
  --panel:#082440;
  --line:#437eac;
  --cyan:#57dcff;
  --pixel:'AION Pixel',monospace;
  --body:ui-monospace,SFMono-Regular,Consolas,monospace
}
* {
  box-sizing:border-box
}
body {
  margin:0;
  background:#020e1b;
  color:var(--ink);
  font:15px/1.5 var(--body)
}
button,input,textarea,select {
  font:inherit
}
button,a,input,textarea,select,summary {
  -webkit-tap-highlight-color:transparent
}
button,a,summary {
  touch-action:manipulation
}
button,select,summary {
  cursor:pointer
}
button:disabled {
  cursor:not-allowed;
  opacity:.48
}
button,a {
  color:inherit
}
a {
  color:var(--cyan)
}
button {
  border:2px solid #5996bd;
  border-bottom-color:#183e60;
  border-right-color:#183e60;
  background:#123957;
  padding:10px 15px;
  min-height:44px;
  border-radius:0;
  box-shadow:inset 1px 1px #ffffff24;
  font-weight:700
}
button:hover:not(:disabled) {
  background:#205071
}
button:active:not(:disabled) {
  transform:translateY(1px)
}
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible {
  outline:3px solid #8bf3ff;
  outline-offset:3px
}
input,textarea,select {
  color:var(--ink);
  background:#031525;
  border:2px solid #3b6b91;
  border-radius:0;
  max-width:100%;
  min-width:0;
  padding:10px
}
input,textarea {
  font-size:16px
}
textarea {
  resize:vertical;
  line-height:1.5;
  min-height:50px;
  max-height:180px
}
h1,h2,h3,p {
  margin:0 0 12px
}
h1,h2,h3 {
  line-height:1.6
}
h2 {
  font-size:17px
}
h3 {
  font-size:16px
}
strong {
  font-weight:700
}
form {
  margin:0
}
[hidden] {
  display:none!important
}
.sr-only,.skip:not(:focus) {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0
}
.skip:focus {
  position:fixed;
  z-index:10;
  background:#fff;
  color:#000;
  padding:16px
}
main {
  max-width:1800px;
  margin:0 auto
}
.eyebrow {
  font:8px/1.9 var(--pixel);
  letter-spacing:.025em;
  color:#b9d2ea
}
.fine-print,.empty {
  font-size:13px;
  color:var(--muted)
}
.primary {
  background:#d84f18;
  border-color:#ffb955 #ff6e1d #853009 #ffb955;
  color:#fff8d7;
  text-shadow:2px 2px #7e2c0b;
  font:10px/1.9 var(--pixel);
  padding:13px 18px;
  box-shadow:inset 0 0 0 2px #f68022,0 3px 0 #020c18
}
.primary:hover:not(:disabled) {
  background:#f36a23
}
.secondary {
  display:inline-block;
  text-decoration:none;
  border:2px solid #5688ad;
  background:#14334c;
  padding:9px 13px;
  min-height:44px
}
.quiet {
  background:transparent;
  border:0;
  box-shadow:none;
  font-size:12px;
  color:#c5e0f2;
  padding:8px
}
.danger {
  color:#ffb6a0
}
.error {
  color:#ffb3a0
}
.notice {
  padding:9px 20px;
  background:#283244;
  border-bottom:1px solid #688aae;
  font-size:13px
}
.fixture {
  background:#40350d;
  color:#ffe49c;
  font-size:11px;
  padding:5px 16px
}
.topbar {
  min-height:64px;
  display:flex;
  align-items:center;
  gap:20px;
  padding:8px 20px;
  background:linear-gradient(#184b76,#082641 50%,#04172a);
  border:3px solid #467fac;
  border-bottom-color:#020912;
  box-shadow:inset 0 0 0 2px #092038
}
.brand {
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  flex-shrink:0
}
.symbol {
  width:49px;
  height:auto
}
.wordmark {
  width:151px;
  height:auto
}
.app-name {
  font:20px/1.5 var(--pixel);
  color:#def1ff;
  text-shadow:3px 3px #030c19
}
.location-name {
  font:12px/1.6 var(--pixel);
  color:#e5f2ff;
  text-align:center;
  margin:auto
}
.location-name>span:first-child,.location-name>span:last-child {
  color:#5687ab
}
.header-actions {
  display:flex;
  align-items:center;
  gap:10px
}
.scene-frame {
  position:relative;
  overflow:hidden;
  border:4px solid #315f83;
  border-top-color:#769aba;
  border-bottom-color:#071323;
  background:#143954;
  isolation:isolate
}
.retro-world {
  width:100%;
  height:auto;
  display:block;
  image-rendering:pixelated
}
.neutral-world {
  display:none;
  width:100%;
  height:100%;
  object-fit:contain;
  image-rendering:pixelated
}
.scene-heading {
  position:absolute;
  left:0;
  right:0;
  top:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:6px 15px;
  background:#05172dce;
  border-bottom:1px solid #6b9bb055
}
.scene-heading .eyebrow {
  color:#ebf7ff;
  margin:0;
  font-size:8px
}
.scene-heading .quiet {
  min-height:32px;
  padding:4px 8px
}
.scene-stamp {
  position:absolute;
  bottom:0;
  left:0;
  right:0;
  display:flex;
  justify-content:space-between;
  gap:8px;
  padding:4px 12px;
  background:#041528cf;
  color:#cee1ee;
  font-size:9px;
  letter-spacing:.05em
}
.connection {
  display:block;
  font-size:11px;
  color:#aee9c7;
  text-align:center;
  margin-top:9px
}
.metal-frame {
  position:relative;
  background:linear-gradient(#7a8993,#3e505e 7%,#637582 45%,#334453 95%);
  border:4px solid #a0aab0;
  border-right-color:#1f3141;
  border-bottom-color:#101e2d;
  box-shadow:inset 0 0 0 2px #1c2f3e;
  padding:16px 20px;
  color:#fff
}
.metal-frame:before,.metal-frame:after {
  content:'+';
  position:absolute;
  top:2px;
  color:#152634;
  background:#a3b0b8;
  line-height:9px;
  font:bold 11px/9px monospace;
  width:9px;
  text-align:center;
  border-radius:50%;
  box-shadow:1px 1px #102536
}
.metal-frame:before {
  left:3px
}
.metal-frame:after {
  right:3px
}
.control-station {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:25px
}
.control-station .eyebrow {
  color:#d8e7f0;
  margin:0 0 8px;
  line-height:1.6
}
.control-station>div {
  padding:10px 14px;
  background:#061526;
  border:2px solid #182c3d;
  border-bottom-color:#899aa7;
  border-right-color:#899aa7
}
.control-station strong {
  font:700 15px/1.5 var(--body);
  margin:0;
  display:block;
  color:#9df2b2
}
.clock-text {
  white-space:nowrap
}
.status-tag {
  display:block;
  color:#91acbc;
  font-size:10px;
  margin:5px 0 0;
  line-height:1.5
}
.readings {
  margin:0;
  display:flex;
  gap:20px;
  flex-wrap:wrap
}
.readings dt {
  color:#a9c1d5;
  font-size:12px
}
.readings dd {
  margin:2px 0 0;
  color:#eaf2ff
}
.panel,.game-frame {
  background:#071f37;
  border:3px solid #4a85b2;
  border-bottom-color:#183651;
  border-right-color:#183651;
  box-shadow:inset 0 0 0 2px #0d3554
}
.panel {
  padding:20px
}
.panel h2 {
  color:#e8f1fa
}
.panel p {
  color:#b5ccdf
}
.memory-review {
  margin:0 16px 16px
}
.memory-review summary,.evidence summary,details summary {
  cursor:pointer;
  padding:4px 0;
  min-height:36px
}
.memory-review>p {
  margin-top:15px
}
.memory-candidate {
  margin-top:12px
}
.memory-candidate button {
  margin:8px 8px 0 0
}
.report-tile {
  width:100%;
  text-align:left;
  margin-bottom:8px
}
.report-tile span {
  display:block;
  font-size:11px;
  font-weight:400;
  color:#a6c8dc;
  margin-top:5px
}
.time-circuits {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  align-items:center;
  gap:18px;
  padding:14px 20px 10px
}
.circuit {
  min-width:0
}
.circuit h2 {
  display:table;
  margin:0 auto 8px;
  background:#191e24;
  color:#f4f0df;
  font:8px/1.7 var(--pixel);
  letter-spacing:.035em;
  padding:4px 12px;
  box-shadow:1px 1px 0 #91a0a9
}
.circuit>strong {
  display:flex;
  justify-content:center;
  align-items:center;
  gap:5px;
  font-family:var(--body);
  height:72px;
  min-height:72px;
  width:100%;
  box-sizing:border-box;
  color:var(--led);
  font-size:15px;
  background:#101716;
  padding:5px 7px;
  border:3px solid #172732;
  border-right-color:#8295a0;
  border-bottom-color:#8295a0;
  box-shadow:inset 0 0 6px #000;
  text-shadow:0 0 6px color-mix(in srgb,var(--led) 40%,transparent)
}
.destination {
  --led:#ff6549
}
.present {
  --led:#72ef7c
}
.departure {
  --led:#ffca5d
}
.digit-group {
  display:flex;
  flex:1;
  flex-direction:column;
  align-items:center;
  min-width:0
}
.digit-label {
  font:7px/1.5 var(--body);
  color:#a2b3b5;
  text-shadow:none
}
.digit-value {
  display:flex;
  justify-content:center;
  gap:2px;
  width:100%;
  font-size:clamp(16px,1.9vw,33px);
  font-weight:800;
  line-height:1.15;
  font-variant-numeric:tabular-nums;
  letter-spacing:-.06em
}
.digit-group:first-child {
  flex:1
}
.digit-group:nth-child(3) {
  flex:1.8
}
.circuit-caption {
  font:8px/1.5 var(--body);
  letter-spacing:.03em;
  text-align:center;
  color:#f1f4f7;
  margin:5px 0 0
}
#transfer-overlay{width:min(420px,calc(100vw - 64px));max-height:calc(100dvh - 96px);box-sizing:border-box;overflow:auto;margin:auto;padding:24px;border:4px ridge #598ca6;background:#071b2bf2;color:#d3f7ed;text-align:center;box-shadow:0 14px 55px #0006}
#transfer-overlay::backdrop{background:#020b1838;backdrop-filter:blur(2px)}
#transfer-overlay h2{font:12px/1.7 var(--pixel);color:#ffd879;margin:0 0 12px}
#transfer-overlay .transfer-flux{display:block;width:min(190px,55vw);margin:0 auto;filter:drop-shadow(0 0 12px #ffb544)}
#transfer-overlay[open] .transfer-current{stroke-dasharray:8 12;animation:flux-current .8s linear infinite}
#transfer-overlay[open] .transfer-tube{animation:energy-breathe 1.3s ease-in-out infinite}
#transfer-percent{display:block;font:24px/1.5 var(--pixel);color:#ffda76}
#transfer-progress{display:block;width:100%;height:14px;margin:12px 0;accent-color:#ffb64a}
#transfer-overlay .fine-print{font-size:11px;margin-bottom:0}
@media(prefers-reduced-motion:reduce){#transfer-overlay .transfer-current,#transfer-overlay .transfer-tube{animation:none!important}}
.chat-column {
  display:grid;
  grid-template-columns:150px minmax(0,1fr) auto;
  grid-template-rows:auto minmax(100px,auto) auto auto;
  column-gap:18px;
  padding:14px 18px 10px;
  border-top-color:#86afd0;
  background:linear-gradient(100deg,#0b2e4f,#04182f 60%)
}
.portrait-panel {
  grid-column:1;
  grid-row:1/5;
  align-self:start;
  text-align:center;
  background:#031225;
  border:3px solid #a0bdd0;
  border-right-color:#366186;
  border-bottom-color:#366186;
  box-shadow:inset 0 0 0 3px #0b3654;
  padding:5px;
  margin-top:3px
}
.doc-portrait {
  width:100%;
  height:auto;
  display:block;
  image-rendering:pixelated
}
.portrait-caption {
  display:block;
  font:7px/1.7 var(--pixel);
  color:#adcde2;
  padding:8px 2px 3px
}
.neutral-avatar {
  display:none
}
.chat-header {
  grid-column:2/4;
  display:flex;
  justify-content:space-between;
  align-items:start;
  gap:12px;
  border-bottom:1px solid #244f6d;
  margin-bottom:6px;
  padding-bottom:5px
}
.chat-header h2 {
  font:12px/1.7 var(--pixel);
  color:#72d9ff;
  margin:0 0 3px
}
.chat-header p {
  font-size:10px;
  color:#9fb9d2;
  letter-spacing:.08em;
  margin:0
}
.dialogue-actions {
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap
}
.dialogue-actions .quiet {
  min-height:32px
}
.status-dot {
  width:7px;
  height:7px;
  background:#91ec8a;
  display:inline-block;
  box-shadow:0 0 6px #72df8555
}
.messages {
  grid-column:2/4;
  min-height:100px;
  max-height:150px;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-color:#456e91 #041426;
  padding:5px 12px 9px 0;
  overflow-wrap:anywhere
}
.message {
  margin:0 0 14px;
  max-width:100%
}
.message-label {
  font:7px/1.8 var(--pixel);
  color:#79d5fb;
  margin-bottom:6px
}
.message.operator .message-label {
  color:#f0bd71
}
.message.operator {
  border-left:2px solid #b28847;
  padding-left:12px
}
.message-body {
  white-space:pre-wrap;
  font-size:16px;
  line-height:1.65
}
.chat-empty h3 {
  color:#f3e8c5;
  font-weight:400;
  margin:0 0 6px
}
.chat-empty p {
  max-width:820px;
  font-size:14px;
  color:#b6cfe2;
  margin:0
}
.composer {
  grid-column:2;
  display:flex;
  gap:7px;
  align-items:stretch;
  margin-top:9px
}
.composer textarea {
  flex:1;
  background:#142b43;
  border:2px solid #2d5476;
  border-bottom-color:#648aaa;
  box-shadow:inset 2px 2px #031325
}
.send {
  font-size:19px;
  min-width:50px;
  padding:6px;
  color:#a9eaff
}
.chat-help {
  grid-column:2/4;
  font-size:10px;
  color:#8eb1cf;
  margin-top:6px
}
.machine-panel {
  grid-column:2/4;
  display:grid;
  grid-template-columns:1fr 1.1fr;
  gap:12px 24px;
  padding:8px 0
}
.machine-panel h3 {
  font:13px/1.6 var(--pixel);
  color:#ffcc6d
}
.machine-panel p {
  font-size:12px;
  color:#c4d8e8;
  margin:0
}
.machine-panel .eyebrow {
  margin-bottom:8px
}
.destination-entry {
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  min-width:0
}
.destination-entry label {
  width:100%;
  font-size:12px
}
.destination-entry input {
  width:100%;
  max-width:300px
}
.destination-entry button {
  font-size:12px
}
.destination-confirmation {
  grid-column:1/-1
}
.destination-confirmation p {
  white-space:pre-line;
  margin:0 0 8px
}
.evidence {
  margin:14px 20px;
  color:#94b5cf;
  font-size:12px
}
.evidence p {
  max-width:950px;
  margin-top:10px
}
pre {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font:12px/1.7 var(--body);
  color:#bad0df;
  max-height:500px;
  overflow:auto;
  background:#03101c;
  padding:16px
}
.report-view {
  margin:20px;
  padding:28px;
  max-width:1100px
}
.report-view>.eyebrow {
  margin-top:24px
}
.report-view h1 {
  font:18px/1.8 var(--pixel);
  color:#ffdf8b;
  overflow-wrap:anywhere
}
.report-view .readings {
  margin:25px 0;
  padding:18px;
  border:1px solid #3d6887
}
.report-subheading {
  margin-top:24px
}
.report-view #report-observation {
  white-space:pre-wrap;
  line-height:1.8
}
.report-view details {
  margin-top:24px
}
.site-footer {
  display:flex;
  justify-content:space-between;
  gap:12px;
  max-width:1800px;
  margin:0 auto;
  padding:16px 20px;
  font-size:10px;
  color:#7595b1
}
.site-footer a {
  color:#a1c5dc
}
.login-page {
  min-height:100svh;
  display:grid;
  place-items:center;
  background:#031324
}
.login-layout {
  width:100%;
  max-width:1600px;
  padding:25px
}
.login-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:14px 20px
}
.login-header .eyebrow {
  margin:0
}
.login-stage {
  position:relative;
  min-height:580px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  background:#12627e url('/assets/hill-valley-1985.png') 36% center/cover no-repeat;
  image-rendering:pixelated;
  border:4px solid #6c9bbc;
  box-shadow:inset 0 0 0 3px #0a2d49
}
.login-card {
  width:390px;
  margin:35px;
  padding:28px;
  background:#041a30f5;
  image-rendering:auto
}
.login-card h1 {
  font:34px/1.5 var(--pixel);
  color:#ffdf7a;
  text-shadow:3px 3px #984214;
  margin:8px 0
}
.login-card h1 span {
  display:block;
  font-size:14px
}
.login-card>p {
  font-size:12px;
  color:#adc9df
}
.login-card label {
  display:block;
  font-size:12px;
  margin:14px 0 5px
}
.login-card input {
  width:100%;
  background:#03101d;
  min-height:46px
}
.login-card .primary {
  margin:22px 0 16px;
  width:100%;
  font-size:9px
}
.login-card .fine-print {
  font-size:10px;
  margin:0
}
.login-layout>.fine-print {
  text-align:center;
  margin:18px 0 0
}
body[data-skin=neutral] {
  --pixel:var(--body);
  --cyan:#b7d9eb
}
body[data-skin=neutral] .neutral-world {
  display:block;
  aspect-ratio:3/1
}
body[data-skin=neutral] .retro-world,body[data-skin=neutral] .doc-portrait,body[data-skin=neutral] .scene-stamp {display:none}
body[data-skin=neutral] .neutral-avatar {
  display:grid;
  place-items:center;
  height:125px;
  font-size:44px;
  color:#9dd7e4
}
body[data-skin=neutral] .metal-frame {
  background:#263b4b
}
body[data-skin=neutral] .primary {
  background:#204d66;
  border-color:#77a6bc;
  text-shadow:none;
  box-shadow:none
}
body[data-skin=neutral] .circuit>strong {
  text-shadow:none
}
@media(min-width:1800px) {
  .topbar,.notice {
    max-width:1800px;
    margin:auto
  }
}
@media(max-width:1100px) {
  .topbar {
    gap:14px;
    padding:8px 12px
  }
  .wordmark {
    width:120px
  }
  .symbol {
    width:37px
  }
  .location-name {
    font-size:10px
  }
  .app-name {
    font-size:16px
  }
  .control-station {
    gap:10px;
    padding:13px
  }
  .control-station>div {
    padding:10px
  }
  .control-station strong {
    font-size:12px
  }
  .readings {
    gap:10px
  }
  .time-circuits {
    gap:10px;
    padding:12px;
    grid-template-columns:repeat(3,minmax(0,1fr))
  }
  .circuit h2 {
    font-size:6px;
    padding:4px 8px
  }
  .circuit>strong {
    gap:3px;
    padding:5px;
    height:64px;
    min-height:64px;
    font-size:12px
  }
  .circuit-caption {
    font-size:6px
  }
  .chat-column {
    grid-template-columns:115px minmax(0,1fr) auto;
    column-gap:14px
  }
  .portrait-caption {
    font-size:6px
  }
  .chat-header h2 {
    font-size:10px
  }
  .digit-value {
    font-size:clamp(15px,2vw,26px)
  }
}
@media(max-width:760px) {
  .topbar {
    flex-wrap:wrap;
    gap:8px 12px;
    padding:8px 10px;
    min-height:84px
  }
  .brand {
    gap:7px
  }
  .symbol {
    width:34px
  }
  .wordmark {
    width:105px
  }
  .app-name {
    font-size:14px;
    margin-left:auto
  }
  .location-name {
    order:4;
    text-align:left;
    margin:0;
    font-size:8px;
    flex:1
  }
  .location-name>span:first-child,.location-name>span:last-child {
    display:none
  }
  .header-actions {
    order:5;
    gap:8px
  }
  .header-actions select {
    min-height:36px;
    font-size:10px;
    padding:4px
  }
  .notice {
    padding:9px 12px;
    font-size:12px
  }
  .fixture {
    font-size:9px;
    line-height:1.5;
    padding:5px 10px
  }
  .scene-frame {
    border-width:3px
  }
  .habitat-scene .retro-world {
    height:245px;
    object-fit:cover;
    object-position:35% center
  }
  .expanded .habitat-scene .retro-world {
    height:auto;
    aspect-ratio:3/1;
    object-fit:contain
  }
  .scene-heading {
    padding:3px 7px
  }
  .scene-heading .eyebrow {
    font-size:5px;
    line-height:1.7;
    max-width:70%
  }
  .scene-heading .quiet {
    font-size:10px;
    min-height:36px
  }
  .scene-stamp {
    font-size:6px;
    padding:4px 6px;
    gap:4px
  }
  .control-scene .retro-world {
    height:255px;
    object-fit:cover;
    object-position:34% center
  }
  .control-scene {
    padding-bottom:0
  }
  .connection {
    font-size:10px
  }
  .control-scene .scene-stamp {
    top:0;
    bottom:auto
  }
  .control-station {
    grid-template-columns:1fr 1fr;
    gap:8px;
    padding:12px
  }
  .control-station>div:last-child {
    grid-column:1/-1
  }
  .control-station .eyebrow {
    font-size:5px;
    margin-bottom:6px
  }
  .control-station strong {
    font-size:11px
  }
  .clock-text {
    white-space:normal
  }
  .control-station .readings {
    justify-content:space-between
  }
  .panel {
    padding:15px
  }
  .panel h2 {
    font-size:15px
  }
  .panel p {
    font-size:12px
  }
  .memory-review {
    margin:0 12px 12px;
    font-size:13px
  }
  .time-circuits {
    grid-template-columns:minmax(0,1fr);
    gap:8px 12px;
    padding:12px 14px
  }
  .circuit {
    display:grid;
    grid-template-columns:1fr;
    gap:0
  }
  .circuit h2 {
    font-size:6px;
    margin:0 0 4px;
    justify-self:start;
    padding:2px 6px
  }
  .circuit>strong {
    height:64px;
    min-height:64px;
    padding:3px 7px;
    gap:5px;
    font-size:12px
  }
  .digit-value {
    font-size:23px
  }
  .digit-label {
    font-size:6px
  }
  .circuit-caption {
    font-size:6px;
    margin-top:3px;
    text-align:left
  }
  .destination {
    grid-column:1;
    grid-row:1
  }
  .present {
    grid-column:1;
    grid-row:2
  }
  .departure {
    grid-column:1;
    grid-row:3
  }
      .chat-column {
    grid-template-columns:66px minmax(0,1fr);
    grid-template-rows:auto auto auto auto auto;
    padding:12px;
    gap:10px 12px
  }
  .portrait-panel {
    grid-column:1;
    grid-row:1;
    margin:0;
    padding:2px;
    border-width:2px
  }
  .portrait-caption {
    display:none
  }
  .chat-header {
    grid-column:2;
    grid-row:1;
    flex-direction:column;
    justify-content:center;
    gap:1px;
    border:0;
    margin:0;
    padding:0
  }
  .chat-header h2 {
    font-size:8px;
    line-height:1.9;
    margin:0
  }
  .chat-header p {
    font-size:8px;
    letter-spacing:0
  }
  .dialogue-actions {
    gap:6px
  }
  .dialogue-actions .quiet {
    font-size:10px;
    padding:2px 3px;
    min-height:30px
  }
  .messages {
    grid-column:1/-1;
    grid-row:2;
    min-height:125px;
    max-height:250px;
    padding:10px 6px 5px 0;
    border-top:1px solid #2c5474
  }
  .message-body {
    font-size:15px;
    line-height:1.65
  }
  .chat-empty h3 {
    font-size:15px
  }
  .chat-empty p {
    font-size:12px;
    line-height:1.7
  }
  .composer {
    grid-column:1/-1;
    grid-row:3;
    margin:0
  }
  .composer textarea {
    font-size:16px;
    min-height:52px
  }
  .chat-help {
    grid-column:1/-1;
    grid-row:5;
    margin:0;
    font-size:9px
  }
  .machine-panel {
    grid-column:1/-1;
    grid-row:2;
    grid-template-columns:1fr;
    padding:12px 0;
    border-top:1px solid #315470;
    gap:15px
  }
  .machine-panel h3 {
    font-size:12px
  }
  .destination-entry input,.destination-entry button {
    width:100%;
    max-width:none;
    min-height:46px
  }
  .destination-confirmation .primary {
    width:100%;
    font-size:9px
  }
  .evidence {
    margin:10px 14px;
    font-size:11px
  }
  .site-footer {
    padding:12px 14px;
    font-size:8px;
    flex-wrap:wrap
  }
  .report-view {
    margin:12px;
    padding:18px
  }
  .report-view h1 {
    font-size:13px
  }
  .report-view .readings {
    flex-direction:column;
    gap:16px
  }
  .report-view .secondary {
    font-size:12px
  }
  .login-layout {
    padding:0
  }
  .login-header {
    padding:15px
  }
  .login-header .eyebrow {
    font-size:5px;
    max-width:125px;
    text-align:right
  }
  .login-stage {
    min-height:0;
    padding-top:220px;
    display:block;
    background-size:auto 240px;
    background-position:34% top;
    background-repeat:no-repeat;
    border-width:3px
  }
  .login-card {
    width:auto;
    margin:0;
    padding:25px;
    border-width:3px 0 0
  }
  .login-card h1 {
    font-size:30px
  }
  .login-card h1 span {
    font-size:13px
  }
  .login-layout>.fine-print {
    font-size:10px;
    padding:0 15px 16px
  }
  .login-page {
    display:block
  }
  body[data-skin=neutral] .neutral-world {
    height:245px;
    aspect-ratio:auto
  }
  body[data-skin=neutral] .control-scene .neutral-world {
    height:230px
  }
  body[data-skin=neutral] .neutral-avatar {
    height:58px;
    font-size:25px
  }
}
.login-card>.eyebrow {
  font-size:8px
}
@media(min-width:761px) {
  #toggle-scene {
    display:none
  }
}
@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
    animation:none!important;
    transition:none!important;
    scroll-behavior:auto!important
  }
}

/* Stable journey shell: changing phase replaces content, not panel geometry. */
body:not(.login-page) {
  --instrument-height:160px;
  --interaction-height:340px;
  overflow-anchor:none;
}
.environment-banner {
  height:104px;
  display:flex;
  align-items:center;
  gap:24px;
  padding:14px 22px;
  background:#0b2945;
  border:3px solid #4a85b2;
  border-left:7px solid #ffcf69;
}
.environment-banner h1 {
  font:14px/1.7 var(--pixel);
  color:#fff1bb;
  margin:0 0 7px;
}
.environment-banner p {
  font-size:13px;
  color:#c9dfef;
  margin:0;
}
body[data-screen=general] .environment-banner {border-left-color:#66d9ff}
body[data-screen=post] .environment-banner {border-left-color:#8cee9e}
.control-scene,.habitat-scene {
  aspect-ratio:3/1;
  height:auto;
}
.control-scene .retro-world,.habitat-scene .retro-world {
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:35% center;
}
body[data-skin=neutral] .control-scene .neutral-world,
body[data-skin=neutral] .habitat-scene .neutral-world {
  width:100%;
  height:100%;
  aspect-ratio:auto;
}
.control-station,.time-circuits {
  height:var(--instrument-height);
  align-content:center;
}
.chat-column {
  height:var(--interaction-height);
  min-height:0;
}
.chat-column {
  grid-template-rows:54px minmax(0,1fr) 96px 18px;
  overflow:hidden;
}
.chat-header {grid-row:1}
.messages,.machine-panel {
  grid-row:2;
  min-height:0;
  max-height:none;
  overflow:auto;
}
.composer {grid-row:3}
.chat-help {grid-row:4}
#notice {
  position:fixed;
  z-index:8;
  bottom:14px;
  left:50%;
  transform:translateX(-50%);
  width:min(680px,calc(100% - 24px));
  max-height:110px;
  overflow:auto;
  border:2px solid #88b0cd;
  box-shadow:0 4px 20px #0009;
}
@media(max-width:1100px) and (min-width:761px) {
  .environment-banner h1 {font-size:11px}
}
@media(max-width:760px) {
  body:not(.login-page) {
    --instrument-height:300px;
    --interaction-height:500px;
  }
  .environment-banner {
    height:126px;
    padding:12px;
    display:block;
    border-left-width:5px;
  }
  .environment-banner h1 {font-size:9px;line-height:1.7;margin-bottom:6px}
  .environment-banner p {font-size:11px;line-height:1.5}
  .control-scene,.habitat-scene {height:251px;aspect-ratio:auto;padding:0}
  .control-scene .retro-world,.habitat-scene .retro-world {height:245px}
  .control-scene .connection {font-size:9px}
  .control-scene .scene-stamp {top:auto;bottom:0}
  .control-station {grid-template-columns:1fr;grid-template-rows:repeat(3,1fr);align-content:stretch}
  .control-station>div:last-child {grid-column:auto}
  .chat-column {grid-template-rows:66px minmax(0,1fr) 56px 100px 18px}
  .messages,.machine-panel {grid-row:2}
  .composer {grid-row:3}
  .chat-help {grid-row:5}
  body[data-phase=ready] .chat-column {grid-template-rows:66px minmax(0,1fr) 0 100px 0}
  body[data-phase=ready] .machine-panel {display:block}
  body[data-phase=ready] .machine-panel>div {margin-bottom:16px}
}

/* One edge-to-edge lower enclosure, including Control. */
.memory-review {margin:0;border-top:0}
.report-view {margin:0;max-width:none}
.scene-fx {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
  z-index:1;
  opacity:0;
  transition:opacity 700ms ease;
}
.retro-world {transition:filter 900ms ease}
.scene-stamp {z-index:3}

.car-energy {filter:drop-shadow(0 0 8px #29baff);opacity:.55}
.car-headlights {filter:drop-shadow(0 0 12px #ffecb0);opacity:.65}
.arrival-rings {opacity:0;transform-origin:515px 589px}
body[data-scene-cue=mission] .retro-world {filter:brightness(.86) saturate(1.05)}
body[data-scene-cue=mission] .scene-fx {opacity:.4}
body:is([data-scene-cue=armed],[data-scene-cue=charging]) .retro-world {filter:brightness(.66) saturate(1.1)}
body:is([data-scene-cue=armed],[data-scene-cue=charging]) .scene-fx {opacity:.8}
body:is([data-scene-cue=armed],[data-scene-cue=charging],[data-scene-cue=dispatch],[data-scene-cue=transit]) .car-energy {
  animation:energy-breathe 3s ease-in-out infinite;
}
body:is([data-scene-cue=dispatch],[data-scene-cue=transit]) .retro-world {filter:brightness(.43) saturate(.9)}
body:is([data-scene-cue=dispatch],[data-scene-cue=transit]) .scene-fx {opacity:1}
body:is([data-scene-cue=dispatch],[data-scene-cue=transit]) .car-headlights {animation:lamp-breathe 2.8s ease-in-out infinite}
body[data-scene-cue=arrived] .scene-fx {opacity:.25}
body[data-scene-event=arrival][data-scene-cue=arrived] .arrival-rings {animation:arrival-settle 4.5s ease-out both}
body[data-scene-event=arrival][data-scene-cue=arrived] .scene-fx {opacity:.9}
body:is([data-scene-cue=attention],[data-scene-cue=offline]) .retro-world {filter:brightness(.75) saturate(.5)}
body[data-skin=neutral] .scene-fx {display:none}
body[data-skin=neutral] .retro-world {filter:none}
body[data-screen=report] .scene-fx,
body[data-screen=control] .arrival-rings {animation:none}
@keyframes energy-breathe {0%,100%{opacity:.4}50%{opacity:1}}
@keyframes lamp-breathe {0%,100%{opacity:.45}50%{opacity:.95}}
@keyframes arrival-settle {
  0%{opacity:0;transform:scale(.7)}
  25%{opacity:.65}
  100%{opacity:0;transform:scale(1.18)}
}
@media(max-width:760px) {
  .scene-fx {
    width:735px;
    height:245px;
    left:calc((100% - 735px) * .35);
    right:auto;
  }
}
@media(prefers-reduced-motion:reduce) {
  .scene-fx,.retro-world {transition:none!important}
  .car-energy,.car-headlights,.arrival-rings {animation:none!important}
  .arrival-rings {opacity:0}
}

/* Pixel-registered glow: reuse the artwork, never trace a replacement contour. */
.scene-fx image {image-rendering:pixelated}
.car-energy {filter:drop-shadow(0 0 9px #38ccff) drop-shadow(0 0 19px #008dff);opacity:.85}
.car-headlights {filter:brightness(3) drop-shadow(0 0 9px #fff2b0);opacity:.9}
body[data-scene-cue=mission] .scene-fx {opacity:.75}
body:is([data-scene-cue=armed],[data-scene-cue=charging]) .retro-world {filter:brightness(.5) saturate(.9)}
body:is([data-scene-cue=armed],[data-scene-cue=charging]) .scene-fx {opacity:1}
body:is([data-scene-cue=dispatch],[data-scene-cue=transit]) .retro-world {filter:brightness(.32) saturate(.85)}
@keyframes energy-breathe {0%,100%{opacity:.45}50%{opacity:1}}
@keyframes lamp-breathe {0%,100%{opacity:.5}50%{opacity:1}}
body:is([data-scene-cue=armed],[data-scene-cue=charging],[data-scene-cue=dispatch],[data-scene-cue=transit]) .car-energy {animation-duration:2s}
.circuit>strong {position:relative;overflow:hidden}
.circuit>strong:after {
  content:'';
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:0;
  background:linear-gradient(110deg,transparent 20%,#ffffff42 48%,transparent 75%);
  transform:translateX(-120%);
}
body:is([data-scene-cue=mission],[data-scene-cue=armed],[data-scene-cue=charging],[data-scene-cue=dispatch],[data-scene-cue=transit]) .circuit>strong:after {
  animation:circuit-scan 2.8s ease-in-out infinite;
}
body:is([data-scene-cue=armed],[data-scene-cue=charging],[data-scene-cue=dispatch],[data-scene-cue=transit]) .digit-value {
  animation:digit-energy 2s ease-in-out infinite;
}
body[data-scene-event=arrival][data-scene-cue=arrived] .present>strong {
  animation:arrival-confirm 4.5s ease-out both;
}
body[data-scene-event=arrival][data-scene-cue=arrived] .arrival-rings {
  filter:drop-shadow(0 0 10px #66dfff);
}
@keyframes flux-current {to{stroke-dashoffset:-48}}
@keyframes circuit-scan {0%,15%{opacity:0;transform:translateX(-120%)}35%,65%{opacity:.9}85%,100%{opacity:0;transform:translateX(120%)}}
@keyframes digit-energy {0%,100%{text-shadow:0 0 5px currentColor}50%{text-shadow:0 0 15px currentColor,0 0 5px #fff;filter:brightness(1.3)}}
@keyframes arrival-confirm {0%,45%{box-shadow:inset 0 0 24px #6eff9a88,0 0 16px #6eff9a66}100%{box-shadow:inset 0 0 6px #000}}
@media(max-width:760px) {
  .header-actions {width:100%;justify-content:flex-end}
  .location-name {order:3;margin-left:auto;flex:0 1 auto}
}
body[data-skin=neutral] .circuit>strong:after,
body[data-skin=neutral] .digit-value {animation:none}
@media(prefers-reduced-motion:reduce) {
  .digit-value,.circuit>strong,.circuit>strong:after {animation:none!important}
  .circuit>strong:after {opacity:0}
}
/* A modal terminal surface leaves the underlying workspace geometry untouched. */
#aion-console{box-sizing:border-box;width:min(1120px,88vw);max-width:none;height:80dvh;max-height:880px;margin:auto;padding:0;border:2px solid #62d9f1;border-radius:10px;background:#07131d;color:#d3ffe8;box-shadow:0 24px 100px #000b;font:15px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;overflow:hidden}
#aion-console[open]{display:flex;flex-direction:column}
#aion-console::backdrop{background:#010913cc;backdrop-filter:blur(4px)}
.console-header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:18px 24px;background:#132735;border-bottom:1px solid #43616e}
.console-header h2{margin:0;font:inherit;font-size:18px;color:#73e5ff;letter-spacing:2px}
.console-header p,.console-hint{margin:0;font-size:12px;color:#aec2ce}
#aion-console button{min-height:44px;font:inherit;font-size:13px}
.console-hint{padding:8px 24px}
@media(max-width:600px){#aion-console{width:94vw;height:88dvh;max-height:88dvh;font-size:14px}.console-header{padding:12px}.console-header p{max-width:210px}.console-header h2{font-size:15px}.console-hint{padding:8px 12px}}
/* Original terminal: preserve the approved modal, with horizontal scroll on narrow phones. */
#terminal-viewport{flex:1;min-height:0;overflow:auto;padding:12px;overscroll-behavior:contain}
#terminal-surface{height:100%;min-width:400px}
.terminal-keys{display:flex;flex-wrap:wrap;gap:8px;padding:8px 12px;border-top:1px solid #43616e}
#aion-console .xterm textarea{min-height:0;min-width:0;box-shadow:none}
#aion-console .xterm{padding:0}
/* Explicit operator request: blink the real caret, including while unfocused.
   Override scene reduced-motion rules only for this terminal indicator. */
#aion-console .xterm .xterm-cursor{animation:none!important;opacity:1!important}
#aion-console .xterm.aion-caret-off .xterm-cursor{opacity:0!important}
.report-view #report-population{min-width:0;overflow-wrap:anywhere;margin-top:24px}
.report-view #report-population h3{margin-top:20px}
.world-map .location-thumbnail{border:2px solid #7190aa;aspect-ratio:16/7}
.map-layer{margin-top:12px;border-top:2px solid;padding:10px 0 0}
.map-layer h4,.map-layer summary{font:700 11px/1.5 monospace;letter-spacing:.4px;margin:0 0 8px}
.map-layer summary{cursor:pointer;min-height:44px;display:list-item;padding:8px 0}
.map-now{border-color:#74ffd1}.map-now h4{color:#74ffd1}
.map-sighting{border-color:#ffc857}.map-sighting summary{color:#ffc857}
.map-dialogue{border-color:#f2a0ff}.map-dialogue summary{color:#f2a0ff}
.map-person{background:#102b40;border:1px solid #528d95;padding:8px;margin:6px 0;min-height:50px;display:grid;grid-template-columns:auto 1fr;column-gap:8px;align-items:center;font:13px/1.5 monospace;color:#efffff}
.map-person small{font:11px/1.4 monospace;color:#b4d7df;grid-column:2}
.map-avatar{grid-row:1/3;width:30px;height:48px;object-fit:contain;image-rendering:pixelated}
.map-time{font:12px/1.6 monospace;color:#ffdb8c;margin-top:12px}
.world-map .location-thumbnail{aspect-ratio:16/6;margin-bottom:8px}
.map-layer{margin-top:8px;padding-top:6px}
.map-layer h4,.map-layer summary{margin-bottom:4px}
.map-person{min-height:40px;padding:5px 7px;margin:4px 0;column-gap:6px}
.world-map .map-person span{margin-top:0;font-size:13px}
.map-avatar{height:38px;width:25px}
.map-layer p{margin-bottom:8px}
.map-transcripts>summary{min-height:44px;padding:10px 0;cursor:pointer;font-size:13px}
@media(max-width:600px){
  .world-log h2{margin-top:8px}.world-log>h3{font-size:13px;margin:8px 0}
  .map-person{font-size:13px}.map-person small{font-size:11px}
}
.causal-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:10px;align-items:end}
.causal-form label{display:grid;gap:5px;min-width:0}
.causal-form input,.causal-form select{width:100%;min-width:0;box-sizing:border-box}
#causal-result{min-width:0}
#causal-result pre{max-height:320px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}
.guide-page a,#causal-lab>a{color:#8bdfed}
.guide-layout{max-width:960px;margin:0 auto;padding:12px;min-width:0}
.guide-layout .panel{padding:18px;margin-bottom:10px;min-width:0}
.guide-index{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:12px}
.guide-layout .guide-body{white-space:pre-line;overflow-wrap:anywhere;font-size:15px;line-height:1.7}
.guide-index a{font-size:13px;line-height:1.5}
.guide-topic{scroll-margin-top:12px}
.guide-topic h2{font-size:18px;overflow-wrap:anywhere}
@media(max-width:600px){.guide-layout{padding:8px}.guide-layout .panel{padding:14px}.guide-topic h2{font-size:16px}}
.causal-form [hidden] { display: none; }
.causal-form textarea { width: 100%; box-sizing: border-box; min-height: 5em; resize: vertical; font: inherit; }
.causal-matrix { max-width: 100%; overflow-x: auto; margin-block: 8px; }
.causal-matrix table { border-collapse: collapse; font-size: 13px; }
.causal-matrix th, .causal-matrix td { padding: 8px; border: 1px solid #617c8b; min-width: 130px; text-align: left; }
.causal-matrix caption { text-align: left; padding-block: 8px; }
#command-reviews label{display:grid;gap:6px;overflow-wrap:anywhere}
#command-reviews textarea{width:100%;box-sizing:border-box;resize:vertical;font:inherit}
#command-reviews form{display:grid;gap:8px;margin-block:12px}

/* Local seven-segment time-circuit numerals. */
.digit-value svg{height:1em;max-width:24%;overflow:visible;fill:currentColor;stroke:none;filter:drop-shadow(0 0 1px currentColor)}
