:root {
  --bg: #070605;
  --chrome: #0c0a09;
  --dock: #100d0b;
  --ink: #f4efe6;
  --muted: rgba(244, 239, 230, 0.62);
  --dim: rgba(244, 239, 230, 0.4);
  --line: rgba(255, 255, 255, 0.08);
  --orange: #ff730d;
  --orange-deep: #c94e00;
  --cyan: #4dd9bf;
  --danger: #ff5aa0;
  --serif: "Source Serif 4", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "IBM Plex Sans", "Avenir Next", "Segoe UI", Trebuchet MS, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --display: "Bebas Neue", "Oswald", "Impact", sans-serif;
  --room-accent: var(--orange);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--sans);
  overflow: hidden;
}
button { font-family: inherit; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

#app { height: 100%; }

/* ========== TITLE ========== */
.title-screen {
  height: 100%;
  background: #000;
  display: grid;
  place-items: center;
  position: relative;
}
.title-splash {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.title-cta {
  position: absolute;
  left: 0; right: 0; bottom: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.title-cta > * { pointer-events: auto; }
.cta-btn {
  border: 0;
  background: var(--orange);
  color: #111;
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: 0.14em;
  padding: 14px 40px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.55);
}
.cta-btn:hover { filter: brightness(1.08); }
.cta-btn.cyan { background: var(--cyan); }
.title-disclaimer {
  margin: 0;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
}

/* ========== SHELL ========== */
.game-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #000;
}
.game-shell[hidden], [hidden] { display: none !important; }

.top-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px 6px;
  background: #000;
  flex: 0 0 auto;
}
.chip {
  background: rgba(0,0,0,0.72);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 14px;
}
.chip h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.chip p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.chip.right { text-align: right; max-width: min(46vw, 460px); }
.chip-row { display: flex; gap: 12px; justify-content: flex-end; align-items: center; }
.sierra-tag {
  font-family: var(--display);
  letter-spacing: 0.22em;
  font-size: 16px;
  color: rgba(255,255,255,0.85);
}
.gallery-btn {
  background: none;
  border: 0;
  color: var(--orange);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}
.gallery-btn:hover { color: #ffd24a; }
.batch { font-family: var(--mono); font-size: 12px !important; color: var(--muted) !important; }
.objective { color: rgba(255,255,255,0.62) !important; line-height: 1.35; }

.play-row {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  padding: 0 8px 0 8px;
  gap: 6px;
}

.verb-rail {
  flex: 0 0 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 8px;
  background: rgba(0,0,0,0.55);
  border-radius: 16px;
  align-self: stretch;
}
.verb-ornament { color: rgba(255,255,255,0.25); font-size: 10px; margin-bottom: 2px; }
.verb-btn {
  width: 92px;
  padding: 12px 0;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: rgba(20,20,22,0.92);
  color: rgba(255,255,255,0.9);
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: 0.08em;
}
.verb-btn.on {
  background: var(--orange);
  color: #111;
  border-color: transparent;
}
.self-btn {
  margin-top: 4px;
  width: 92px;
  padding: 8px 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.stage-wrap {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: stretch;
}
.stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.06), 0 0 0 1px #000;
  background: #111;
  cursor: crosshair;
}
.backdrop, .hotspots { position: absolute; inset: 0; }
.backdrop { z-index: 1; }
.hotspots { z-index: 20; }

.scene-fill { position: absolute; inset: 0; background: linear-gradient(var(--top), var(--mid), var(--bot)); }
.scene-sky { position: absolute; inset: 0; }
.scene-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-grain {
  position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='120' height='120' filter='url(%23n)' opacity='.55'/></svg>");
  opacity: 0.14;
  mix-blend-mode: overlay;
}
.scene-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 50%, rgba(0,0,0,0.45) 100%);
}
.orientation-plate { background: #111; }
.plate-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.ov-poster-gone {
  position: absolute;
  left: 51%; top: 24%;
  width: 16%; height: 28%;
  background: rgba(90, 92, 82, 0.92);
  display: grid; place-items: center;
  color: rgba(255,255,255,0.35);
  font-size: 10px; font-weight: 700;
  pointer-events: none;
}
.ov-cam-cover {
  position: absolute;
  left: 61.5%; top: 13%;
  width: 32px; height: 20px;
  background: var(--orange);
  color: #111;
  font-size: 8px; font-weight: 900;
  display: grid; place-items: center;
  pointer-events: none;
}
.ov-door-led {
  position: absolute;
  left: 79.2%; top: 47%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #3dff7a;
  box-shadow: 0 0 10px #3dff7a;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  background: transparent;
  border: 0;
  padding: 0;
}
.hotspot:hover,
.hotspot:focus-visible {
  background: rgba(255,255,255,0.07);
  outline: 2px solid var(--room-accent);
  outline-offset: -1px;
}
.hotspot.danger:hover { outline-color: var(--danger); }
.hotspot.ready:hover { outline-color: #3dff7a; }
.hotspot.fork:hover { outline-color: #ffd24a; }
.hot-label {
  position: absolute;
  left: 50%; top: -10px;
  transform: translate(-50%, -100%);
  background: rgba(0,0,0,0.88);
  color: var(--room-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}
.hotspot:hover .hot-label,
.hotspot:focus-visible .hot-label { opacity: 1; }

.roger {
  position: absolute;
  z-index: 12;
  height: 46%;
  width: auto;
  pointer-events: none;
  transform: translate(-50%, -100%);
  transform-origin: 50% 100%;
}
.roger-inner {
  position: relative;
  height: 100%;
  transform-origin: 50% 100%;
}
.roger-inner img {
  height: 100%;
  width: auto;
  display: block;
  filter: none;
}
.roger-shadow {
  position: absolute;
  left: 18%;
  right: 22%;
  bottom: -2%;
  height: 7%;
  background: rgba(0, 0, 0, 0.42);
  border-radius: 50%;
  filter: blur(5px);
  z-index: -1;
  pointer-events: none;
}
.roger.walking .roger-shadow {
  left: 12%;
  right: 16%;
  opacity: 0.85;
}

.walk-badge {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 60;
  background: rgba(0,0,0,0.7);
  color: var(--orange);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
}

.dock {
  flex: 0 0 auto;
  background: var(--dock);
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.narrator {
  min-height: 86px;
  max-height: 110px;
  padding: 8px 14px;
  background: rgba(0,0,0,0.45);
  border-left: 3px solid var(--orange);
}
.nar-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}
.nar-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--orange);
  font-weight: 700;
}
.nar-verb { font-size: 12px; color: var(--dim); }
.nar-lines p {
  margin: 0 0 2px;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.35;
  color: rgba(255,255,255,0.94);
}

.inventory {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.78);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.inv-tag {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  color: var(--dim);
}
.inv-row { display: flex; gap: 8px; overflow-x: auto; flex: 1; }
.inv-slot {
  min-width: 86px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.inv-slot.on {
  background: rgba(255, 115, 13, 0.32);
  border-color: var(--orange);
}
.inv-icon { font-size: 20px; }
.inv-name { font-size: 11px; font-weight: 600; text-align: center; line-height: 1.2; }
.inv-warn { color: rgba(255,140,26,0.5); font-size: 18px; }

/* ========== OVERLAYS ========== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0,0,0,0.78);
  display: grid;
  place-items: center;
  padding: 24px;
}
.modal {
  width: min(560px, 92vw);
  background: #1e140f;
  border: 2px solid rgba(255,115,13,0.5);
  border-radius: 16px;
  padding: 28px 32px;
}
.modal h2 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 42px;
  letter-spacing: 0.06em;
  color: var(--orange);
}
.modal h3 { margin: 0 0 12px; font-weight: 600; color: var(--muted); }
.death-lines p {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 18px;
}
.death-meta { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.death-reprint { font-size: 12px; color: rgba(255,255,255,0.35); margin-top: 10px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.text-btn { background: none; border: 0; color: var(--muted); font-size: 14px; }
.gal-sub { color: var(--dim); font-size: 13px; }
.gal-empty { color: var(--muted); padding: 20px 0; }
.gal-list { max-height: 360px; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.gal-row {
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 10px 12px;
}
.gal-row header { display: flex; gap: 10px; align-items: baseline; }
.gal-id { font-family: var(--mono); font-size: 12px; color: var(--orange); }
.gal-title { font-weight: 700; }
.gal-row p { margin: 4px 0 0; font-family: var(--serif); color: var(--muted); }

.form-modal {
  background: #0d1f24;
  border-color: rgba(77, 217, 191, 0.5);
}
.form-modal h2 { color: var(--cyan); }
.form-sub { color: var(--dim); font-size: 13px; margin: 0 0 14px; }
.form-modal label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(77, 217, 191, 0.85);
  margin-bottom: 10px;
}
.form-modal input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px;
  border: 0;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 15px;
  font-family: var(--sans);
}
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}


@media (max-height: 720px) {
  .chip h1 { font-size: 16px; }
  .narrator { min-height: 72px; max-height: 88px; }
  .nar-lines p { font-size: 15px; }
  .verb-btn { padding: 10px 0; font-size: 18px; }
}

/* === cycle 1 polish: plates, hover ticks, reserved scene, overlays === */
.painted-plate { background: #111; }
.prop-lift {
  position: absolute;
  inset: 0;
  z-index: 16;
  pointer-events: none;
}
.prop-lift .plate-img { z-index: 16; }
.scene-grain, .scene-vignette { z-index: 18; }
.roger { z-index: 12; }

.hotspot {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07);
}
.hotspot:hover,
.hotspot:focus-visible {
  background: transparent;
  outline: none;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--room-accent) 75%, transparent);
}
.hotspot.danger:hover,
.hotspot.danger:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--danger);
}
.hotspot.ready:hover,
.hotspot.ready:focus-visible { box-shadow: inset 0 0 0 1px #3dff7a; }
.hotspot.fork:hover,
.hotspot.fork:focus-visible { box-shadow: inset 0 0 0 1px #ffd24a; }

.hot-tick {
  position: absolute;
  width: 11px;
  height: 11px;
  opacity: 0.22;
  pointer-events: none;
  border-color: var(--room-accent);
  border-style: solid;
  border-width: 0;
}
.hot-tick.tl { left: 2px; top: 2px; border-top-width: 2px; border-left-width: 2px; }
.hot-tick.tr { right: 2px; top: 2px; border-top-width: 2px; border-right-width: 2px; }
.hot-tick.bl { left: 2px; bottom: 2px; border-bottom-width: 2px; border-left-width: 2px; }
.hot-tick.br { right: 2px; bottom: 2px; border-bottom-width: 2px; border-right-width: 2px; }
.hotspot:hover .hot-tick,
.hotspot:focus-visible .hot-tick { opacity: 1; }
.hotspot.danger .hot-tick { border-color: var(--danger); }
.hotspot.ready .hot-tick { border-color: #3dff7a; }
.hotspot.fork .hot-tick { border-color: #ffd24a; }
.hot-label {
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0,0,0,0.45);
}

.ov-scanner-led {
  position: absolute;
  left: 77.4%;
  top: 63.6%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 8;
}
.ov-scanner-led.hot { background: #ff3344; box-shadow: 0 0 12px #ff3344; }
.ov-scanner-led.ok { background: #3dff7a; box-shadow: 0 0 12px #3dff7a; }
.ov-bar-gone {
  position: absolute;
  left: 64.8%;
  top: 33.5%;
  width: 8.5%;
  height: 5.2%;
  background: #16120a;
  pointer-events: none;
  z-index: 8;
}
.ov-flake-gone {
  position: absolute;
  left: 3.5%;
  top: 70%;
  width: 20%;
  height: 18%;
  background: radial-gradient(ellipse, #161006 40%, transparent 72%);
  pointer-events: none;
  z-index: 8;
}
.ov-kiosk-cleared {
  position: absolute;
  left: 6.5%;
  top: 28.5%;
  width: 12%;
  height: 7%;
  display: grid;
  place-items: center;
  color: #3dff7a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  pointer-events: none;
  z-index: 8;
}

.play-row { min-height: 0; }
.stage-wrap { min-height: 0; }
.dock { flex: 0 0 auto; }
.narrator {
  min-height: 0;
  max-height: 52px;
  overflow: hidden;
  padding: 6px 14px;
}
.nar-lines p { font-size: 15px; margin: 0; }
.nar-lines p + p { display: none; }
.inventory { padding: 6px 10px; }

.plate-img { object-fit: cover; object-position: 50% 68%; }
.narrator { max-height: 40px; }


/* === cycle 4 polish: Sierra HUD, room owns the glass === */
.top-bar { display: none; }

.play-row {
  padding: 0;
  gap: 0;
}
.verb-rail {
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  gap: 0;
  padding: 0 6px;
  background: transparent;
  border-radius: 0;
  align-self: center;
}
.verb-ornament { display: none; }
.verb-btn {
  width: auto;
  padding: 7px 11px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(244, 239, 230, 0.62);
  font-size: 18px;
  letter-spacing: 0.14em;
}
.verb-btn:hover { color: #fff; }
.verb-btn.on {
  background: transparent;
  color: var(--orange);
  border-color: transparent;
  box-shadow: inset 0 -2px 0 var(--orange);
}
.self-btn {
  margin: 0 0 0 4px;
  width: auto;
  padding: 6px 10px;
  border-radius: 0;
  background: transparent;
  color: rgba(244, 239, 230, 0.32);
  font-size: 11px;
  letter-spacing: 0.16em;
}
.self-btn:hover { color: rgba(244, 239, 230, 0.7); }
.verb-using {
  margin-left: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--orange);
  white-space: nowrap;
}

.stage {
  border-radius: 0;
  box-shadow: none;
}
.stage-caption {
  position: absolute;
  left: 0; right: 0; top: 0;
  z-index: 70;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 12px 28px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.58) 0%, rgba(0,0,0,0.18) 55%, transparent 100%);
  pointer-events: none;
}
.stage-caption .cap-left h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 6px #000;
}
.stage-caption .cap-left p {
  margin: 1px 0 0;
  font-size: 11px;
  color: rgba(244, 239, 230, 0.55);
  text-shadow: 0 1px 4px #000;
}
.stage-caption .cap-right {
  text-align: right;
  pointer-events: auto;
}
.stage-caption .gallery-btn {
  display: block;
  margin-left: auto;
  padding: 0;
  text-shadow: 0 1px 4px #000;
}
.stage-caption .batch {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(244, 239, 230, 0.42);
  text-shadow: 0 1px 4px #000;
}

.walk-badge { display: none !important; }

.dock {
  padding: 0;
  background: #050403;
  gap: 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sierra-bar {
  display: flex;
  align-items: stretch;
  min-height: 36px;
  background: #0a0807;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.inventory {
  flex: 1 1 auto;
  min-width: 0;
  padding: 3px 8px;
  background: transparent;
  border: 0;
  border-radius: 0;
  border-left: 1px solid rgba(255,255,255,0.06);
  gap: 8px;
}
.inv-tag {
  font-size: 10px;
  letter-spacing: 0.16em;
}
.inv-row { gap: 4px; }
.inv-slot {
  min-width: 0;
  padding: 3px 8px;
  border-radius: 0;
  flex-direction: row;
  gap: 5px;
  background: transparent;
  border: 1px solid transparent;
}
.inv-slot:hover { background: rgba(255,255,255,0.05); }
.inv-slot.on {
  background: rgba(255, 115, 13, 0.16);
  border-color: var(--orange);
}
.inv-icon { font-size: 14px; }
.inv-name { font-size: 11px; white-space: nowrap; }
.inv-warn { font-size: 13px; opacity: 0.45; }

.narrator {
  min-height: 48px;
  max-height: 58px;
  overflow: hidden;
  padding: 7px 14px 8px;
  background: #000;
  border-left: 3px solid var(--room-accent);
}
.nar-head { display: none; }
.nar-lines p {
  font-size: 16px;
  line-height: 1.35;
  margin: 0;
}
.nar-lines p + p {
  display: block;
  font-size: 14px;
  color: rgba(244, 239, 230, 0.7);
  margin-top: 2px;
}

.plate-img { object-fit: cover; }
.game-shell[data-room="orientation"] .plate-img { object-position: 50% 58%; }
.game-shell[data-room="sector_entry"] .plate-img { object-position: 50% 34%; }
.game-shell[data-room="gold_vein"] .plate-img { object-position: 50% 62%; }
.game-shell[data-room="eastern"] .plate-img { object-position: 50% 50%; }

@media (max-height: 720px) {
  .verb-btn { padding: 6px 10px; font-size: 16px; }
  .narrator { min-height: 42px; max-height: 50px; }
  .nar-lines p { font-size: 15px; }
}

/* === cycle 5 polish: Form 47-B as diegetic CRT wall terminal === */
#form-overlay.overlay {
  background:
    radial-gradient(ellipse at 28% 48%, rgba(20, 60, 58, 0.35) 0%, transparent 42%),
    rgba(0, 0, 0, 0.52);
  align-items: center;
  justify-items: center;
  padding: 18px;
}

.crt-terminal {
  width: min(520px, 94vw);
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.65));
}

.crt-bezel {
  position: relative;
  background:
    linear-gradient(145deg, #2a3438 0%, #151a1c 40%, #0c1012 100%);
  border: 3px solid #3a4549;
  border-radius: 18px;
  padding: 14px 14px 18px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    inset 0 -2px 6px rgba(0,0,0,0.55),
    0 0 0 1px #0a0c0d;
}

.crt-screw {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #7a858a, #2a3033 60%, #111);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.5);
}
.crt-screw.tl { left: 8px; top: 8px; }
.crt-screw.tr { right: 8px; top: 8px; }
.crt-screw.bl { left: 8px; bottom: 8px; }
.crt-screw.br { right: 8px; bottom: 8px; }

.crt-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 8px 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(200, 220, 210, 0.55);
}
.crt-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3dff7a;
  box-shadow: 0 0 8px #3dff7a;
  flex: 0 0 auto;
}
.crt-model { flex: 1 1 auto; }
.crt-power { color: #3dff7a; }

.crt-screen {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  padding: 18px 20px 14px;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(40, 90, 80, 0.35), transparent 55%),
    linear-gradient(180deg, #061612 0%, #04100e 55%, #030c0a 100%);
  border: 2px solid #0a1f1a;
  box-shadow:
    inset 0 0 40px rgba(0, 255, 170, 0.08),
    inset 0 0 0 1px rgba(61, 255, 122, 0.12);
  color: #9dffc9;
  font-family: var(--mono);
}

.crt-scan {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.18) 0px,
      rgba(0, 0, 0, 0.18) 1px,
      transparent 1px,
      transparent 3px
    );
  mix-blend-mode: multiply;
  opacity: 0.55;
  z-index: 3;
}
.crt-glow {
  pointer-events: none;
  position: absolute;
  inset: -10%;
  background: radial-gradient(ellipse at 50% 40%, rgba(61, 255, 122, 0.09), transparent 60%);
  z-index: 1;
  animation: crt-pulse 4.5s ease-in-out infinite;
}
@keyframes crt-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.crt-banner,
.crt-sub,
.crt-status,
.crt-field,
.crt-actions,
.crt-foot {
  position: relative;
  z-index: 2;
}

.crt-banner {
  margin: 0;
  font-family: var(--display);
  font-size: 42px;
  letter-spacing: 0.12em;
  color: #b8ffe0;
  text-shadow: 0 0 12px rgba(61, 255, 122, 0.45);
  line-height: 1;
}
.crt-sub {
  margin: 4px 0 10px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(157, 255, 201, 0.55);
}
.crt-status {
  margin: 0 0 14px;
  padding: 6px 8px;
  border: 1px solid rgba(61, 255, 122, 0.22);
  background: rgba(61, 255, 122, 0.06);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #7dffb5;
}

.crt-field {
  display: block;
  margin: 0 0 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: rgba(157, 255, 201, 0.7);
}
.crt-field input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 9px 10px;
  border: 1px solid rgba(61, 255, 122, 0.28);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #d4ffe8;
  font-size: 15px;
  font-family: var(--mono);
  letter-spacing: 0.02em;
  caret-color: #3dff7a;
  outline: none;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.35);
}
.crt-field input::placeholder {
  color: rgba(157, 255, 201, 0.28);
}
.crt-field input:focus {
  border-color: #3dff7a;
  box-shadow:
    inset 0 0 12px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(61, 255, 122, 0.35),
    0 0 18px rgba(61, 255, 122, 0.15);
}

.crt-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}
.crt-abort {
  background: none;
  border: 0;
  color: rgba(157, 255, 201, 0.45);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  padding: 8px 4px;
  cursor: pointer;
}
.crt-abort:hover { color: #ff8a7a; }
.crt-submit {
  border: 1px solid rgba(61, 255, 122, 0.55);
  background: rgba(61, 255, 122, 0.14);
  color: #d4ffe8;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 10px 16px;
  cursor: pointer;
  border-radius: 0;
  box-shadow: 0 0 16px rgba(61, 255, 122, 0.12);
}
.crt-submit:hover {
  background: rgba(61, 255, 122, 0.28);
  color: #fff;
}
.crt-foot {
  margin: 12px 0 0;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: rgba(157, 255, 201, 0.35);
  text-align: center;
}

/* Keep death/gallery on the old modal look; form no longer uses .form-modal */

/* === cycle 6 polish: room tone pairing — Roger planted, grain on plate only === */
.scene-grain { z-index: 10; }
.roger { z-index: 12; }
.prop-lift { z-index: 16; }
.prop-lift .plate-img { z-index: 16; }
.scene-vignette { z-index: 18; }
.hotspots { z-index: 20; }

/* cycle 11: drop-shadow floated him; contact ellipse lives on .roger-shadow */

/* Quiet idle ticks — labels appear on hover; brackets only whisper */
.hot-tick { opacity: 0.14; }
.hotspot:hover .hot-tick,
.hotspot:focus-visible .hot-tick { opacity: 0.95; }
.hotspot {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}


/* === cycle 8 polish: Form 47-B lives on the painted left-wall kiosk === */
#form-overlay.kiosk-layer {
  position: absolute;
  inset: 0;
  z-index: 72;
  display: block;
  padding: 0;
  background: none;
  pointer-events: auto;
}
#form-overlay.kiosk-layer[hidden] { display: none !important; }

.kiosk-dim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 18% 28% at var(--crt-x, 18%) var(--crt-y, 40%), rgba(20, 70, 58, 0.05) 0%, rgba(0, 0, 0, 0.38) 38%, rgba(0, 0, 0, 0.62) 80%);
}

.kiosk-crt-glow {
  position: absolute;
  left: var(--crt-x, 10%);
  top: var(--crt-y, 28%);
  width: var(--crt-w, 8%);
  height: var(--crt-h, 12%);
  pointer-events: none;
  border-radius: 3px;
  box-shadow:
    0 0 18px 6px rgba(61, 255, 122, 0.22),
    inset 0 0 12px rgba(61, 255, 122, 0.18);
  background: rgba(20, 70, 58, 0.25);
}

.kiosk-layer .crt-terminal {
  position: absolute;
  left: var(--kiosk-x, 6%);
  top: var(--kiosk-y, 16%);
  width: var(--kiosk-w, 26%);
  height: var(--kiosk-h, 56%);
  max-width: none;
  filter: none;
}

.kiosk-layer .crt-bezel {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  padding: 5px 5px 6px;
  background:
    linear-gradient(160deg, #243034 0%, #121618 50%, #0a0d0e 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -2px 8px rgba(0,0,0,0.65),
    0 0 0 1px #070809,
    0 0 24px rgba(61, 255, 122, 0.12);
}

.kiosk-layer .crt-chrome {
  margin: 0 4px 6px;
  font-size: 8px;
  letter-spacing: 0.1em;
  flex: 0 0 auto;
}

.kiosk-layer .crt-screen {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 9px 7px;
  border-radius: 6px;
}

.kiosk-layer .crt-banner {
  font-size: 18px;
  letter-spacing: 0.08em;
}

.kiosk-layer .crt-sub {
  margin: 2px 0 6px;
  font-size: 9px;
}

.kiosk-layer .crt-status {
  margin: 0 0 8px;
  padding: 3px 5px;
  font-size: 8px;
  letter-spacing: 0.08em;
}

.kiosk-layer .crt-field {
  margin: 0 0 6px;
  font-size: 8px;
  letter-spacing: 0.12em;
}

.kiosk-layer .crt-field input {
  margin-top: 2px;
  padding: 4px 6px;
  font-size: 12px;
}

.kiosk-layer .crt-actions {
  margin-top: auto;
  gap: 6px;
  flex-wrap: wrap;
}

.kiosk-layer .crt-abort {
  font-size: 11px;
  padding: 6px 2px;
}

.kiosk-layer .crt-submit {
  font-size: 9px;
  letter-spacing: 0.05em;
  padding: 6px 7px;
  line-height: 1.2;
  text-align: center;
  max-width: none;
  flex: 1 1 auto;
}

.kiosk-layer .crt-foot {
  margin: 6px 0 0;
  font-size: 8px;
}

.game-shell.form-open .roger { opacity: 0.28; filter: saturate(0.6); }
.game-shell.form-open .hotspots { opacity: 0; pointer-events: none; }


/* === cycle 9 polish: punch into the painted FORM 47-B glass === */
#backdrop {
  transform-origin: 0 0;
  transition: transform 0.45s cubic-bezier(.22,.7,.2,1);
}
.stage.kiosk-punch .roger,
.stage.kiosk-punch .hotspots {
  opacity: 0 !important;
  pointer-events: none;
}
.stage.kiosk-punch .scene-vignette {
  opacity: 0.35;
}

.kiosk-layer.punch .kiosk-dim {
  background:
    radial-gradient(ellipse 42% 48% at 36% 46%, rgba(12, 40, 34, 0.04) 0%, rgba(0, 0, 0, 0.42) 46%, rgba(0, 0, 0, 0.72) 82%);
}

.kiosk-layer.punch .kiosk-crt-glow {
  border-radius: 5px;
  box-shadow:
    0 0 28px 10px rgba(61, 255, 122, 0.28),
    inset 0 0 16px rgba(61, 255, 122, 0.16);
}

.kiosk-layer.punch .crt-terminal {
  filter: none;
}

.kiosk-layer.punch .crt-bezel {
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  box-shadow:
    0 0 0 1px rgba(61, 255, 122, 0.18),
    0 0 22px rgba(61, 255, 122, 0.16);
}

.kiosk-layer.punch .crt-chrome,
.kiosk-layer.punch .crt-screw,
.kiosk-layer.punch .crt-foot {
  display: none;
}

.kiosk-layer.punch .crt-screen {
  padding: 10px 12px 8px;
  border-radius: 5px;
  border: 1px solid rgba(61, 255, 122, 0.22);
}

.kiosk-layer.punch .crt-banner {
  font-size: 22px;
  letter-spacing: 0.1em;
}

.kiosk-layer.punch .crt-sub {
  margin: 2px 0 8px;
  font-size: 9px;
}

.kiosk-layer.punch .crt-field {
  margin: 0 0 7px;
  font-size: 8px;
}

.kiosk-layer.punch .crt-field input {
  padding: 5px 7px;
  font-size: 13px;
}

.kiosk-layer.punch .crt-actions {
  margin-top: auto;
}

.kiosk-layer.punch .crt-abort {
  font-size: 11px;
}

.kiosk-layer.punch .crt-submit {
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 7px 10px;
}

/* === cycle 10: diegetic plate-registered state (no HUD blots) === */
.state-plate {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 8;
}
.game-shell[data-room="orientation"] .state-plate { object-position: 50% 58%; }
.game-shell[data-room="sector_entry"] .state-plate { object-position: 50% 34%; }
.game-shell[data-room="gold_vein"] .state-plate { object-position: 50% 62%; }
.game-shell[data-room="eastern"] .state-plate { object-position: 50% 50%; }
.prop-lift .state-plate { z-index: 17; }
.ov-poster-gone, .ov-cam-cover, .ov-door-led,
.ov-scanner-led, .ov-bar-gone, .ov-flake-gone, .ov-kiosk-cleared { display: none; }

/* === cycle 13 polish: painted Roger, light room tint only === */
.game-shell[data-room="orientation"] .roger { height: 45%; }
.game-shell[data-room="orientation"] .roger-inner img {
  filter: brightness(0.96) saturate(0.94);
}
.game-shell[data-room="sector_entry"] .roger { height: 42%; }
.game-shell[data-room="sector_entry"] .roger-inner img {
  filter: sepia(0.08) brightness(0.94) saturate(0.92) hue-rotate(6deg);
}
.game-shell[data-room="gold_vein"] .roger { height: 44%; }
.game-shell[data-room="gold_vein"] .roger-inner img {
  filter: sepia(0.10) brightness(0.93) saturate(0.90) hue-rotate(8deg);
}
.game-shell[data-room="eastern"] .roger { height: 42%; }
.game-shell[data-room="eastern"] .roger-inner img {
  filter: brightness(0.98) saturate(0.88) hue-rotate(-8deg);
}
