@font-face {
  font-family: "Departure Mono";
  src: url("/fonts/DepartureMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
:root {
  --night: #0b1230;
  --wall: #0f1c3a;
  --phos: #7dffa0;
  --phos-dim: #3f9d5d;
  --phos-glow: rgba(125, 255, 160, 0.55);
  --amber: #ffc861;
  --ink: #0a0f1a;
  --paper-ink: #3a1830;
  --u: 1px; /* one pixel of the 1672 x 941 room plate, set by main.js */
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--night); color: var(--phos); }
body {
  font-family: "Departure Mono", ui-monospace, monospace;
  font-synthesis: none;
  overflow: hidden;
  -webkit-font-smoothing: none;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button, a { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

#view { position: fixed; inset: 0; overflow: hidden; background: var(--wall); }
.pad { position: absolute; left: 0; right: 0; image-rendering: pixelated; background-repeat: repeat; }
.pad::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, rgba(0,0,0,0.18) 0 1px, transparent 1px 3px); }
#padT { top: 0; background-image: url("/art/fill_top.png"); }
#padB { bottom: 0; background-image: url("/art/fill_bottom.png"); }
body.phone .pad { display: none; }
#stage { position: absolute; left: 0; top: 0; width: 1672px; height: 941px; }
#scene, #sharp { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#scene { image-rendering: pixelated; }
#sharp { cursor: default; }
#sharp.hot { cursor: pointer; }

/* ---- positions in room-plate pixels (x, y, w, h of the 1672 x 941 plate) ---- */
#term {
  position: absolute;
  left: calc(var(--u) * 604); top: calc(var(--u) * 418);
  width: calc(var(--u) * 470); height: calc(var(--u) * 311);
  padding: calc(var(--u) * 14) calc(var(--u) * 18) calc(var(--u) * 8);
  display: grid; grid-template-rows: auto auto 1fr auto; gap: calc(var(--u) * 6);
  font-size: calc(var(--u) * 15); line-height: 1.25;
  text-shadow: 0 0 calc(var(--u) * 5) var(--phos-glow);
  overflow: hidden;
  border-radius: calc(var(--u) * 10);
  animation: flicker 5.3s steps(1) infinite;
}
#term::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) calc(var(--u) * 2), rgba(0,0,0,0.28) calc(var(--u) * 2), rgba(0,0,0,0.28) calc(var(--u) * 3));
  mix-blend-mode: multiply;
}
#term::before {
  content: ""; position: absolute; left: 0; right: 0; height: 30%; top: -30%; pointer-events: none;
  background: linear-gradient(to bottom, rgba(125,255,160,0), rgba(125,255,160,0.06), rgba(125,255,160,0));
  animation: roll 7s linear infinite;
}
@keyframes roll { to { top: 100%; } }
@keyframes flicker { 0% { opacity: 1; } 61% { opacity: 0.94; } 62% { opacity: 1; } 88% { opacity: 0.97; } 89% { opacity: 1; } }
.t-head { display: flex; justify-content: space-between; align-items: baseline; }
.t-title { font-size: 1.55em; letter-spacing: 0.04em; }
.t-tick { color: var(--phos-dim); }
.t-status { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-body { overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--phos-dim) transparent; padding-right: 0.3em; }
.t-body:focus-visible { outline: 1px dashed var(--phos-dim); }
.t-body p { margin: 0 0 0.2em; }
.t-body .dim { color: var(--phos-dim); }
.t-body .hi { color: #d8ffe3; }
.t-body .warn { color: var(--amber); text-shadow: 0 0 calc(var(--u) * 5) rgba(255,200,97,0.5); }
.t-body a { color: inherit; text-decoration: underline; text-decoration-color: var(--phos-dim); }
.t-body a:hover { background: var(--phos); color: #041008; text-shadow: none; }
.t-body table { width: 100%; border-collapse: collapse; }
.t-body th { text-align: left; color: var(--phos-dim); font-weight: 400; border-bottom: 1px solid var(--phos-dim); }
.t-body td, .t-body th { padding: 0.08em 0.4em 0.08em 0; white-space: nowrap; }
.t-body td.num, .t-body th.num { text-align: right; }
.t-body tr.sel td { background: rgba(125,255,160,0.16); }
.t-body ol { margin: 0; padding-left: 1.6em; }
.t-body li { margin: 0 0 0.35em; }
.cur { display: inline-block; width: 0.6em; height: 1em; margin-left: 0.2em; vertical-align: -0.12em; background: var(--phos); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.t-tabs { display: flex; gap: 0.2em; justify-content: space-between; }
.t-tabs button {
  background: none; border: 0; padding: 0.1em 0.1em; cursor: pointer; color: var(--phos);
  text-shadow: inherit; white-space: nowrap;
}
.t-tabs button:hover { color: #d8ffe3; }
.t-tabs button[aria-pressed="true"] { background: var(--phos); color: #041008; text-shadow: none; }

/* the pink sticky note: the contract */
.note {
  position: absolute; left: calc(var(--u) * 1086); top: calc(var(--u) * 436);
  width: calc(var(--u) * 172); height: calc(var(--u) * 176);
  padding: calc(var(--u) * 34) calc(var(--u) * 16) calc(var(--u) * 12);
  border: 0; background: url("/art/note.png") center / 100% 100% no-repeat;
  color: var(--paper-ink); text-shadow: none; text-align: left; cursor: pointer;
  transform: rotate(-3deg); transform-origin: 50% 8%;
  display: flex; flex-direction: column; gap: calc(var(--u) * 5);
  transition: transform 0.18s steps(3);
  filter: drop-shadow(0 calc(var(--u) * 3) 0 rgba(4, 8, 20, 0.45));
}
.note:hover, .note:focus-visible { transform: rotate(-1deg) translateY(calc(var(--u) * -4)); }
.note[aria-disabled="true"] { cursor: default; }
.n-label { font-size: calc(var(--u) * 17); letter-spacing: 0.05em; }
.n-addr { font-size: calc(var(--u) * 13); line-height: 1.3; word-break: break-all; }
.n-hint { margin-top: auto; font-size: calc(var(--u) * 12); opacity: 0.8; }

/* stickers on the monitor bezel: the buy button and X */
.sticker {
  position: absolute; width: calc(var(--u) * 44); height: calc(var(--u) * 44);
  top: calc(var(--u) * 749); display: block; border-radius: 50%;
  transition: transform 0.15s steps(2);
}
.sticker.mint { left: calc(var(--u) * 560); }
.sticker.ink { left: calc(var(--u) * 1068); }
.sticker img { position: absolute; display: block; pointer-events: none; }
.s-bg { inset: 0; width: 100%; height: 100%; }
.s-mark { left: 50%; top: 50%; width: 46%; height: 46%; transform: translate(-50%, -50%); object-fit: contain; }
.sticker[aria-disabled="true"] { cursor: default; }
.sticker[aria-disabled="true"] .s-mark { opacity: 0.35; }
.sticker:not([aria-disabled="true"]):hover { transform: translateY(calc(var(--u) * -2)) rotate(-4deg); }
.sticker:not([aria-disabled="true"]):active { transform: translateY(calc(var(--u) * 1)); }
.engrave {
  position: absolute; top: calc(var(--u) * 762); font-size: calc(var(--u) * 14); line-height: 1;
  color: #5d5a55; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55); letter-spacing: 0.06em; pointer-events: none;
}
.e-buy { left: calc(var(--u) * 612); }
.e-x { right: calc(100% - var(--u) * 1060); }

/* LED plates in the room (the plate art is in the room picture) */
.plate {
  position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--phos); text-shadow: 0 0 calc(var(--u) * 5) var(--phos-glow); line-height: 1.05;
}
#scanplate { left: calc(var(--u) * 24); top: calc(var(--u) * 250); width: calc(var(--u) * 136); height: calc(var(--u) * 73); }
#scanplate .p-label { font-size: calc(var(--u) * 13); color: var(--phos-dim); }
#scanplate b { font-weight: 400; font-size: calc(var(--u) * 30); }
#burnplate {
  left: calc(var(--u) * 1488); top: calc(var(--u) * 741); width: calc(var(--u) * 108); height: calc(var(--u) * 55);
  color: #2b2f3a; text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}
#burnplate .p-label, #burnplate .p-unit { font-size: calc(var(--u) * 11); letter-spacing: 0.08em; }
#burnplate b { font-weight: 400; font-size: calc(var(--u) * 17); }

/* phone: the scene is cropped to the monitor, the plates and the note step into a dock */
#dock { display: none; }
body.phone { overflow-x: hidden; overflow-y: auto; }
body.phone #view { position: relative; inset: auto; }
body.phone #dock {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px 16px 22px;
  background: var(--wall);
}
body.phone #dock .note { position: relative; left: auto; top: auto; grid-row: span 2; width: 100%; height: auto; aspect-ratio: 1; --u: 1.1px; }
body.phone #dock .plate { position: relative; left: auto; top: auto; width: 100%; height: auto; aspect-ratio: 140 / 77; --u: 1px;
  background: url("/art/plate_led.png") center / 100% 100% no-repeat; image-rendering: pixelated; }
body.phone #dock #burnplate { background-image: url("/art/plate_metal.png"); aspect-ratio: 109 / 57; }
body.phone #dock .n-addr { font-size: 12px; }
body.phone #dock .n-label { font-size: 16px; }
body.phone #dock .n-hint { font-size: 11px; }
body.phone #dock #scanplate b { font-size: 26px; }
body.phone #dock #burnplate b { font-size: 20px; }

@media (prefers-reduced-motion: reduce) {
  #term, #term::before, .cur { animation: none; }
}
.noscript { position: fixed; inset: auto 16px 16px; color: #fff; }
