:root {
  color-scheme: dark;
  --bg: #161d23;
  --ink: #f1ead8;
  --muted: #b2bab5;
  --gold: #e4b875;
  --line: #3f4b50;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    14px/1.6 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
header,
main {
  max-width: 1500px;
  margin: auto;
  padding: 0 4%;
}
header {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
a {
  color: var(--gold);
  text-underline-offset: 4px;
}
header a {
  text-decoration: none;
  font-size: 12px;
}
.brand {
  font-weight: 700;
  letter-spacing: 2px;
  margin-right: auto;
  color: var(--ink);
}
.badge {
  font: 10px monospace;
  border: 1px solid var(--line);
  padding: 6px 9px;
  color: var(--muted);
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 34px 0 28px;
  gap: 20px;
}
.intro p {
  color: var(--muted);
  margin: 0;
}
.eyebrow {
  font:
    10px/1.6 ui-monospace,
    monospace;
  letter-spacing: 1.6px;
  color: var(--gold) !important;
}
h1 {
  font:
    52px/1.1 Georgia,
    serif;
  letter-spacing: -1.5px;
  margin: 12px 0 0;
}
h2 {
  margin: 0;
  font-weight: 500;
}
h3 {
  font-size: 14px;
  font-weight: 500;
}
.experience {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.room-side {
  background: radial-gradient(ellipse at 40% 15%, #344349, #182229 75%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.room-top,
.room-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 20px;
  font: 10px/1.5 monospace;
  color: var(--muted);
}
.room {
  width: 100%;
  height: auto;
  display: block;
}
.actor {
  transition: none;
}
.cabinet-outline {
  opacity: 0.5;
}
#cab-moss {
  cursor: pointer;
}
button,
input {
  font: inherit;
}
button {
  min-height: 44px;
  border: 1px solid #657368;
  color: var(--ink);
  background: #293b36;
  border-radius: 4px;
  padding: 10px 15px;
  cursor: pointer;
}
button:hover {
  background: #3b4942;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}
aside {
  border-left: 1px solid var(--line);
  padding: 24px;
  background: #222c33;
}
.resident-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.resident-head h2 {
  font:
    24px Georgia,
    serif;
}
.resident-head p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.avatar {
  display: grid;
  place-items: center;
  background: #354d42;
  color: #cbd9b3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font:
    20px Georgia,
    serif;
}
#activity {
  margin-left: auto;
  font: 10px monospace;
  color: var(--gold);
}
.screen-frame {
  background: #0c171b;
  border: 1px solid #4b5b57;
  border-radius: 4px;
  padding: 16px;
  display: grid;
  place-items: center;
}
#large-screen {
  width: 240px;
  height: 216px;
  max-width: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
#screen-moss {
  image-rendering: pixelated;
}
.game-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 11px;
}
.game-caption strong {
  font-weight: 500;
}
#sequence {
  font: 10px monospace;
  white-space: nowrap;
  color: var(--gold);
}
.muted {
  font-size: 12px;
  color: var(--muted);
}
#play-note {
  min-height: 38px;
}
.conversation {
  border-top: 1px solid var(--line);
  margin-top: 20px;
}
#messages {
  list-style: none;
  padding: 0;
  max-height: 220px;
  overflow: auto;
  overflow-wrap: anywhere;
  font-size: 13px;
}
#messages li {
  border-left: 2px solid #668575;
  padding: 0 0 0 12px;
  margin: 16px 0;
}
#messages strong {
  display: block;
  color: var(--gold);
  font-size: 11px;
  font-weight: 500;
}
label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin: 12px 0 6px;
}
.composer {
  display: flex;
  gap: 6px;
}
input {
  width: 100%;
  min-width: 0;
  background: #192329;
  border: 1px solid #59675f;
  color: var(--ink);
  border-radius: 4px;
  padding: 10px;
}
.composer button {
  white-space: nowrap;
}
.fine {
  font-size: 10px;
  color: var(--muted);
}
#receipt {
  font-size: 12px;
  color: var(--gold);
  min-height: 19px;
}
.engineering {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 64px 0;
}
.engineering h2 {
  font:
    36px/1.15 Georgia,
    serif;
  margin: 16px 0;
}
.engineering p {
  max-width: 60ch;
  color: var(--muted);
}
.facts {
  padding-top: 20px;
}
.facts div {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  display: grid;
  gap: 8px;
}
.facts span {
  font: 10px monospace;
  letter-spacing: 1px;
  color: var(--muted);
}
.facts strong {
  font-size: 13px;
  font-weight: 500;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid var(--line);
  padding: 24px 0;
  color: var(--muted);
  font-size: 10px;
}
footer p {
  margin: 0;
  max-width: 65ch;
}
.skip {
  position: absolute;
  top: -100px;
}
.skip:focus {
  top: 10px;
  background: var(--bg);
  padding: 10px;
  z-index: 5;
}
@media (max-width: 1000px) {
  .experience {
    grid-template-columns: minmax(0, 1fr) 310px;
  }
  aside {
    padding: 18px;
  }
}
@media (max-width: 760px) {
  header {
    gap: 12px;
  }
  .badge {
    display: none;
  }
  .intro {
    display: block;
    padding: 28px 0;
  }
  .intro > p {
    margin-top: 20px;
    font-size: 13px;
  }
  h1 {
    font-size: 44px;
  }
  .experience {
    grid-template-columns: 1fr;
  }
  .room-top,
  .room-bottom {
    padding: 14px;
  }
  .room {
    min-height: 240px;
  }
  aside {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 22px;
  }
  #large-screen {
    width: 240px;
    height: 216px;
  }
  .engineering {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 40px 0;
  }
  footer {
    display: block;
  }
  footer p {
    margin-top: 12px;
  }
  .game-caption {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .actor {
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

.room-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.action-feedback {
  font:
    11px/1.6 ui-monospace,
    monospace;
  color: #e4b875;
  border-left: 2px solid #6b8d79;
  padding-left: 10px;
  min-height: 36px;
}

.delivery {
  display: block;
  color: var(--muted);
  font:
    10px/1.6 ui-monospace,
    monospace;
  margin-top: 5px;
}

/* Neon room direction approved from Paul's reference. */
:root {
  --bg: #090b1b;
  --ink: #eaf0ff;
  --muted: #b2b9d4;
  --gold: #72e6f8;
  --line: #343454;
}
.experience {
  background: #101329;
  border-color: #363251;
  grid-template-columns: minmax(0, 1fr) 330px;
}
.room-side {
  background: #0b0b22;
}
.room {
  image-rendering: pixelated;
  aspect-ratio: 3/2;
  touch-action: manipulation;
}
.room:focus-visible {
  outline: 2px solid #60edff;
  outline-offset: -3px;
}
.room-top {
  color: #acaed6;
}
.room-bottom {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
}
.room-bottom > span {
  margin-left: auto;
}
#walk-status {
  flex-basis: 100%;
  font-size: 11px;
  margin: 0;
  color: #bec8e8;
}
.walk-pad {
  display: flex;
  gap: 5px;
}
.walk-pad button {
  min-width: 44px;
  padding: 7px;
  touch-action: none;
}
aside {
  background: #11142b;
}
.avatar {
  background: #35265b;
  color: #e4c8ff;
}
.screen-frame {
  background: #080b19;
  border-color: #4e3b77;
  box-shadow: 0 0 25px #bd35f20c;
}
.controls button,
button {
  background: #1b2040;
  border-color: #555482;
}
button:hover {
  background: #30294f;
}
input {
  background: #0c1025;
  border-color: #505176;
}
h1 {
  font-family: ui-monospace, monospace;
  font-size: 44px;
  letter-spacing: -2px;
}
.action-feedback {
  color: #80e6f7;
  border-color: #a95bff;
}
.resident-head {
  gap: 10px;
}
.fine {
  color: #afb5d0;
}
#moss-actor {
  filter: drop-shadow(0 0 5px #ce68ff55);
}
#visitor {
  filter: drop-shadow(0 0 5px #5bd5ff44);
}
@media (max-width: 900px) {
  .experience {
    grid-template-columns: 1fr;
  }
  .room {
    min-height: 0;
  }
  aside {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
.resident-picker {
  display: flex;
  gap: 8px;
  padding: 16px 20px 0;
}
.resident-picker button {
  flex: 1;
  min-height: 44px;
}
.resident-picker [aria-pressed="true"] {
  border-color: #6cdbf1;
  color: #a7f4ff;
  background: #163047;
}
[id^="cab-"] {
  cursor: pointer;
}
[id^="cab-"]:focus {
  outline: 2px solid #8ae9ff;
}
.speech-bubble {
  background: #f4edff;
  color: #201935;
  border: 2px solid #b3a0d4;
  border-radius: 12px;
  padding: 12px 14px;
  font:
    18px/1.3 ui-monospace,
    monospace;
  box-shadow: 0 5px 20px #05031399;
  overflow: hidden;
  max-height: 100px;
  overflow-wrap: anywhere;
}
.actor foreignObject,
#visitor foreignObject {
  pointer-events: none;
}
.room-side { justify-content:flex-start; }

/* Game discovery uses the same catalog as cabinet placement. */
#cabinets [role=button] { cursor:pointer; }
#cabinets [role=button]:hover,#cabinets [role=button]:focus-visible { filter:drop-shadow(0 0 7px #59efff); outline:none; }
.game-library { margin: 24px 0; border:1px solid #39324f; padding:20px; border-radius:8px; }
.game-library summary { cursor:pointer; font-size:18px; font-weight:600; min-height:44px; }
.game-library summary span { display:block; font-size:13px; color:#b4afc8; margin:8px 0; font-weight:400; }
#catalog-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:10px; margin-top:16px; }
#catalog-grid button { display:flex; flex-direction:column; text-align:left; padding:16px; gap:8px; border:1px solid #49405d; background:#151124; color:#f1ecff; border-radius:5px; cursor:pointer; }
#catalog-grid small { color:#b4afc8; } #catalog-grid span { color:#7ce9d7; font-size:12px; }
#cabinet-dialog { width:min(540px,calc(100% - 32px)); max-height:85dvh; overflow:auto; background:#171225; border:1px solid #8a64ae; border-radius:12px; padding:28px; color:#f1ecff; }
#cabinet-dialog::backdrop { background:#05020bc9; }
#cabinet-dialog p { line-height:1.6; } #cabinet-dialog a { color:#80eee1; }
#cabinet-preview { display:block; width:240px; max-width:100%; height:auto; margin:20px auto; image-rendering:pixelated; }
#close-cabinet { float:right; min-width:44px; min-height:44px; }
#invite-game { display:block; margin:24px 0 12px; min-height:44px; padding:10px 18px; color:#110c20; background:#83ecdf; border:0; border-radius:4px; cursor:pointer; }
