:root {
  color-scheme: dark;
  --ink: #05060a;
  --blue-black: #090b13;
  --room: rgba(14, 18, 29, 0.82);
  --line: rgba(141, 154, 192, 0.29);
  --line-bright: rgba(192, 205, 240, 0.62);
  --paper: #edf0fa;
  --muted: #8f96ad;
  --focus: #ffda72;
  --focus-hot: #fff4c5;
  --dawn: #d9a97f;
  --ease-fold: cubic-bezier(.22, .82, .16, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  min-height: 100svh;
  background:
    radial-gradient(circle at 72% 12%, rgba(54, 63, 94, 0.16), transparent 34%),
    linear-gradient(150deg, #080a11 0%, #040509 65%, #020306 100%);
  color: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: background 1.8s ease, color .5s ease;
}

[hidden] {
  display: none !important;
}

button {
  font: inherit;
}

.grain {
  position: fixed;
  inset: -70%;
  z-index: 20;
  pointer-events: none;
  opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
  animation: grain-shift .34s steps(2) infinite;
  mix-blend-mode: soft-light;
}

.sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .42;
  transition: opacity 1.4s ease;
}

.sky::before,
.sky::after,
.sky i {
  content: "";
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #8992b0;
  box-shadow:
    9vw 19vh #8992b0,
    18vw 8vh #4f5875,
    29vw 27vh #8992b0,
    42vw 12vh #6a7599,
    57vw 21vh #8992b0,
    66vw 7vh #505873,
    78vw 28vh #8992b0,
    91vw 13vh #6a7599;
}

.sky::before { left: 2vw; top: 3vh; }
.sky::after { left: 7vw; top: 39vh; transform: scale(.6); }
.sky i:nth-child(1) { left: 11vw; top: 61vh; transform: scale(.45); }
.sky i:nth-child(2) { left: 3vw; top: 79vh; transform: scale(.7); }
.sky i:nth-child(3) { left: 15vw; top: 88vh; transform: scale(.35); }

.masthead {
  position: fixed;
  top: max(20px, env(safe-area-inset-top));
  left: clamp(20px, 4vw, 64px);
  z-index: 9;
  width: min(390px, 58vw);
  pointer-events: none;
  transition: opacity .45s ease, transform .7s var(--ease-fold);
}

.eyebrow,
.date,
.location,
.route-label,
.intro-kicker,
.ending > p:first-child {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .22em;
  line-height: 1;
  text-transform: uppercase;
}

.masthead h1 {
  max-width: 360px;
  margin: 8px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(19px, 2.25vw, 32px);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.035em;
}

.date {
  position: absolute;
  top: 2px;
  left: calc(100% + 26px);
  width: 110px;
  color: #656c82;
}

.route {
  position: fixed;
  z-index: 9;
  top: max(22px, env(safe-area-inset-top));
  right: clamp(18px, 3vw, 52px);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: opacity .45s ease;
}

.route ol {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.route li {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid #3c4254;
  border-radius: 50%;
  color: transparent;
  font-size: 7px;
  transition: width .4s ease, border-color .4s ease, background .4s ease, color .4s ease;
}

.route li.is-found {
  border-color: rgba(255, 218, 114, .75);
  background: rgba(255, 218, 114, .13);
  color: var(--focus);
}

.route li.is-current {
  width: 32px;
  border-radius: 10px;
  background: var(--focus);
  color: #14130e;
}

.world {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 520px;
  isolation: isolate;
}

.horizon {
  position: absolute;
  right: 0;
  bottom: 11%;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(92, 103, 138, .34) 24%, rgba(92, 103, 138, .18) 82%, transparent);
  transition: bottom 1s var(--ease-fold), opacity 1s ease;
}

.building {
  position: absolute;
  top: clamp(82px, 13vh, 124px);
  right: clamp(18px, 4vw, 62px);
  bottom: clamp(88px, 12vh, 118px);
  left: clamp(18px, 4vw, 62px);
  min-height: 390px;
  perspective: 1100px;
  transform-style: preserve-3d;
  transition: transform 1.2s var(--ease-fold), opacity .7s ease;
}

.wiring {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.wiring path {
  fill: none;
  stroke: rgba(112, 125, 162, .4);
  stroke-width: 1.3;
  stroke-dasharray: 2 8;
  vector-effect: non-scaling-stroke;
  transition: opacity .7s ease, stroke 1s ease;
}

.wiring-after {
  opacity: 0;
  transition: opacity .7s .18s ease;
}

.wiring-after .echo-line {
  stroke: rgba(255, 218, 114, .2);
  stroke-dasharray: 1 14;
}

.room {
  --room-left: 0%;
  --room-top: 0%;
  --room-width: 200px;
  --room-height: 120px;
  position: absolute;
  z-index: 2;
  left: var(--room-left);
  top: var(--room-top);
  display: block;
  width: var(--room-width);
  height: var(--room-height);
  min-width: 52px;
  min-height: 52px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1px;
  outline: 0;
  background:
    linear-gradient(130deg, rgba(32, 38, 56, .46), transparent 62%),
    var(--room);
  box-shadow: 0 24px 50px rgba(0, 0, 0, .22);
  color: var(--paper);
  text-align: left;
  cursor: pointer;
  transform: translateZ(0);
  transform-origin: center;
  transition:
    left 1.05s var(--ease-fold),
    top 1.05s var(--ease-fold),
    width 1.05s var(--ease-fold),
    height 1.05s var(--ease-fold),
    opacity .65s ease,
    background .42s ease,
    border-color .42s ease,
    box-shadow .42s ease,
    transform .42s var(--ease-fold),
    clip-path .9s var(--ease-fold);
}

.room::before,
.room::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.room::before {
  inset: 0;
  z-index: 8;
  border: 2px solid transparent;
  transition: border-color .2s ease, box-shadow .3s ease;
}

.room::after {
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  border-right: 1px solid rgba(183, 193, 222, .2);
  border-bottom: 1px solid rgba(183, 193, 222, .2);
}

.room:hover {
  border-color: var(--line-bright);
}

.room:focus-visible,
.room.is-active {
  z-index: 7;
  overflow: visible;
  border-color: rgba(255, 218, 114, .62);
  background:
    linear-gradient(135deg, rgba(85, 77, 43, .24), transparent 66%),
    rgba(19, 22, 31, .96);
  box-shadow: 0 0 0 1px rgba(255, 218, 114, .14), 0 24px 70px rgba(0, 0, 0, .5);
  transform: translateZ(44px) scale(1.018);
}

.room:focus-visible::before,
.room.is-active::before {
  border-color: var(--focus);
  box-shadow: inset 0 0 24px rgba(255, 218, 114, .08), 0 0 34px rgba(255, 218, 114, .19);
}

.room-number {
  position: absolute;
  z-index: 5;
  top: 12px;
  left: 14px;
  color: #7c849d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  letter-spacing: .15em;
  transition: color .3s ease;
}

.room:focus-visible .room-number,
.room.is-active .room-number {
  color: var(--focus);
}

.room-copy {
  position: absolute;
  z-index: 5;
  right: 15px;
  bottom: 14px;
  left: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: opacity .35s ease, transform .5s ease;
}

.room-copy strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(14px, 1.3vw, 20px);
  font-weight: 400;
  letter-spacing: -.02em;
}

.room-copy small {
  max-width: 34ch;
  color: #8f96aa;
  font-size: clamp(8px, .72vw, 11px);
  line-height: 1.35;
}

.room-glow {
  position: absolute;
  z-index: 0;
  inset: 30% 14%;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 218, 114, .22), transparent 68%);
  filter: blur(14px);
  transition: opacity .4s ease;
}

.room:focus-visible .room-glow,
.room.is-active .room-glow {
  opacity: 1;
}

.room-foyer {
  --room-left: 8%;
  --room-top: 65%;
  --room-width: 30%;
  --room-height: 25%;
}

.room-foyer::after {
  right: 12%;
  bottom: 0;
  width: 22%;
  height: 60%;
  border: 1px solid rgba(145, 157, 190, .28);
  border-bottom: 0;
}

.room-stair {
  --room-left: 39%;
  --room-top: 40%;
  --room-width: 20%;
  --room-height: 41%;
}

.steps {
  position: absolute;
  top: 18%;
  right: 13%;
  bottom: 18%;
  left: 18%;
  opacity: .42;
}

.steps i {
  position: absolute;
  right: 0;
  bottom: calc(var(--n, 0) * 14%);
  width: calc(100% - var(--n, 0) * 13%);
  border-top: 1px solid #747e9e;
}

.steps i:nth-child(1) { --n: 0; }
.steps i:nth-child(2) { --n: 1; }
.steps i:nth-child(3) { --n: 2; }
.steps i:nth-child(4) { --n: 3; }
.steps i:nth-child(5) { --n: 4; }

.room-guest {
  --room-left: 60%;
  --room-top: 18%;
  --room-width: 30%;
  --room-height: 29%;
}

.window {
  position: absolute;
  top: 18%;
  right: 12%;
  width: 31%;
  height: 43%;
  border: 1px solid rgba(142, 155, 191, .32);
}

.window::before,
.window::after,
.window i::before,
.window i::after {
  content: "";
  position: absolute;
  background: rgba(142, 155, 191, .22);
}

.window::before { top: 50%; right: 0; left: 0; height: 1px; }
.window::after { top: 0; bottom: 0; left: 50%; width: 1px; }
.window i::before { inset: -10% 55% 54% -13%; border: 1px solid rgba(142,155,191,.15); background: transparent; }
.window i::after { inset: 55% -14% -12% 55%; border: 1px solid rgba(142,155,191,.15); background: transparent; }

.room-landing {
  --room-left: 42%;
  --room-top: 6%;
  --room-width: 17%;
  --room-height: 22%;
}

.landing-mark {
  position: absolute;
  top: 23%;
  left: 50%;
  width: 28px;
  height: 28px;
  border-top: 1px solid #8089a6;
  border-right: 1px solid #8089a6;
  transform: translateX(-50%) rotate(135deg);
}

.key-hint {
  position: absolute;
  top: 10px;
  right: 12px;
  display: grid;
  width: 25px;
  height: 22px;
  place-items: center;
  border: 1px solid #5e667e;
  border-radius: 3px;
  color: #aab2c7;
  font-size: 12px;
  animation: key-breathe 2s ease-in-out infinite;
}

.room-loop {
  --room-left: 70%;
  --room-top: 60%;
  --room-width: 21%;
  --room-height: 22%;
}

.new-wing {
  display: contents;
}

.room-corridor {
  --room-left: 43%;
  --room-top: 37%;
  --room-width: 31%;
  --room-height: 22%;
  opacity: 0;
  clip-path: inset(0 100% 0 0);
}

.runner {
  position: absolute;
  top: 50%;
  right: 8%;
  left: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #717b9b 12%, #717b9b 88%, transparent);
}

.runner::before,
.runner::after {
  content: "";
  position: absolute;
  top: -4px;
  width: 9px;
  height: 9px;
  border: 1px solid #717b9b;
  transform: rotate(45deg);
}

.runner::before { left: 12%; }
.runner::after { right: 12%; }

.room-nested {
  --room-left: 72%;
  --room-top: 10%;
  --room-width: 20%;
  --room-height: 31%;
  opacity: 0;
  clip-path: inset(100% 0 0 0);
}

.miniature {
  position: absolute;
  top: 19%;
  right: 9%;
  width: 42%;
  height: 48%;
}

.miniature i {
  position: absolute;
  border: 1px solid rgba(255, 218, 114, .76);
  box-shadow: 0 0 12px rgba(255, 218, 114, .12);
}

.miniature i:nth-child(1) { inset: 42% 52% 0 0; }
.miniature i:nth-child(2) { inset: 20% 28% 35% 39%; }
.miniature i:nth-child(3) { inset: 0 0 57% 57%; }
.miniature i:nth-child(4) { inset: 62% 2% 0 52%; }

.containment-label {
  position: absolute;
  top: 13px;
  right: 13px;
  color: rgba(255, 218, 114, .82);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 7px;
  letter-spacing: .13em;
}

.room-outside {
  --room-left: 78%;
  --room-top: 55%;
  --room-width: 18%;
  --room-height: 34%;
  opacity: 0;
  clip-path: inset(0 0 0 100%);
}

.door-light {
  position: absolute;
  top: 8%;
  right: 12%;
  width: 34%;
  height: 68%;
  overflow: hidden;
  border: 1px solid rgba(255, 218, 114, .43);
  background: linear-gradient(180deg, rgba(245, 192, 136, .2), rgba(255, 230, 174, .06));
}

.door-light::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .6;
  background: linear-gradient(150deg, transparent 46%, rgba(255, 237, 195, .52) 47%, transparent 50%);
  transform: translateX(-60%);
  transition: transform 1.1s var(--ease-fold);
}

.room-outside:focus-visible .door-light::before,
.room-outside.is-active .door-light::before {
  transform: translateX(65%);
}

.whisper {
  position: absolute;
  z-index: 8;
  left: clamp(18px, 4vw, 62px);
  bottom: clamp(65px, 7.8vh, 82px);
  max-width: 48ch;
  margin: 0;
  color: #a8afc1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(12px, 1.15vw, 16px);
  font-style: italic;
  line-height: 1.35;
  transition: opacity .18s ease, transform .5s var(--ease-fold), color .8s ease;
}

.whisper.is-changing {
  opacity: 0;
  transform: translateY(5px);
}

.location {
  position: absolute;
  z-index: 8;
  right: clamp(18px, 4vw, 62px);
  bottom: clamp(67px, 8vh, 84px);
  color: #697089;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  transition: color .4s ease;
}

.intro {
  position: fixed;
  z-index: 30;
  top: 50%;
  left: 50%;
  width: min(570px, calc(100vw - 36px));
  padding: clamp(30px, 5vw, 58px);
  border: 1px solid rgba(142, 153, 185, .38);
  background:
    linear-gradient(145deg, rgba(23, 27, 40, .98), rgba(8, 10, 16, .985)),
    #0a0c12;
  box-shadow: 0 35px 120px rgba(0, 0, 0, .72);
  transform: translate(-50%, -50%);
  transition: opacity .6s ease, transform .8s var(--ease-fold), visibility .6s;
}

.intro::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  bottom: 14px;
  left: 14px;
  border: 1px solid rgba(146, 156, 186, .11);
  pointer-events: none;
}

.intro-rule {
  width: 66px;
  height: 2px;
  margin-bottom: 24px;
  background: var(--focus);
  box-shadow: 0 0 22px rgba(255, 218, 114, .35);
}

.intro-kicker {
  color: var(--focus);
}

.intro h2 {
  max-width: 440px;
  margin: 12px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(31px, 5vw, 54px);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.045em;
}

.intro > p:not(.intro-kicker, .touch-note) {
  max-width: 49ch;
  margin: 0;
  color: #aab0c2;
  font-size: 14px;
  line-height: 1.65;
}

kbd {
  display: inline-block;
  min-width: 28px;
  padding: 1px 6px 2px;
  border: 1px solid #4f576d;
  border-bottom-color: #777f94;
  border-radius: 3px;
  background: #161a25;
  color: #e7eaf3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82em;
  text-align: center;
}

.enter {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
  padding: 0 20px;
  border: 1px solid #80764c;
  background: rgba(255, 218, 114, .08);
  color: var(--paper);
  cursor: pointer;
}

.enter small {
  color: var(--focus);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.enter:hover,
.enter:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
  background: rgba(255, 218, 114, .14);
}

.touch-note {
  position: relative;
  z-index: 2;
  margin: 13px 0 0;
  color: #656d83;
  font-size: 11px;
  text-align: center;
}

.has-entered .intro {
  visibility: hidden;
  opacity: 0;
  transform: translate(-50%, -47%) scale(.96);
  pointer-events: none;
}

.touch-controls {
  position: fixed;
  z-index: 14;
  right: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  display: flex;
  height: 52px;
  align-items: stretch;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(50%) translateY(15px);
  transition: opacity .5s ease, transform .6s var(--ease-fold);
}

.has-entered .touch-controls {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(50%) translateY(0);
}

.touch-controls button {
  display: flex;
  min-width: 88px;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 17px;
  border: 1px solid rgba(145, 155, 185, .38);
  border-radius: 0;
  background: rgba(8, 10, 16, .86);
  color: #d9ddea;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-tap-highlight-color: transparent;
}

.touch-controls button:hover,
.touch-controls button:active {
  border-color: var(--focus);
  background: rgba(255, 218, 114, .09);
}

.touch-controls small {
  color: #7e869d;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.touch-controls span {
  color: var(--focus);
  font-size: 17px;
}

.touch-controls .fold-control {
  min-width: 168px;
  border-color: rgba(255, 218, 114, .58);
  background: rgba(255, 218, 114, .1);
}

.touch-controls .fold-control span {
  color: #f1eddf;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
}

.keyboard-note {
  position: fixed;
  z-index: 8;
  bottom: 20px;
  left: clamp(18px, 4vw, 62px);
  margin: 0;
  color: #555d73;
  font-size: 9px;
  letter-spacing: .06em;
  opacity: 0;
  transition: opacity .5s .5s ease;
}

.has-entered .keyboard-note {
  opacity: 1;
}

.folded .wiring-before {
  opacity: .1;
}

.folded .wiring-after {
  opacity: 1;
}

.folded .wiring-after path {
  stroke: rgba(181, 162, 101, .52);
}

.folded .room-foyer {
  --room-left: 6%;
  --room-top: 11%;
  --room-width: 11%;
  --room-height: 14%;
}

.folded .room-stair {
  --room-left: 15%;
  --room-top: 20%;
  --room-width: 9%;
  --room-height: 35%;
}

.folded .room-guest {
  --room-left: 7%;
  --room-top: 44%;
  --room-width: 18%;
  --room-height: 17%;
}

.folded .room-landing {
  --room-left: 28%;
  --room-top: 30%;
  --room-width: 16%;
  --room-height: 26%;
}

.folded .room-loop {
  display: none;
}

.folded .room-corridor,
.folded .room-nested,
.folded .room-outside {
  opacity: 1;
  clip-path: inset(0);
}

.folded .room-nested {
  border-color: rgba(255, 218, 114, .48);
  background: linear-gradient(140deg, rgba(76, 65, 32, .2), transparent 62%), rgba(14, 18, 29, .94);
  box-shadow: 0 0 46px rgba(255, 218, 114, .08);
}

.folded .room-foyer,
.folded .room-stair,
.folded .room-guest {
  opacity: .22;
}

.folded .room-foyer:focus-visible,
.folded .room-stair:focus-visible,
.folded .room-guest:focus-visible,
.folded .room-foyer.is-active,
.folded .room-stair.is-active,
.folded .room-guest.is-active {
  opacity: 1;
}

.folded .room-foyer .room-copy,
.folded .room-stair .room-copy,
.folded .room-guest .room-copy {
  opacity: 0;
  transform: scale(.75);
}

.folded .room-foyer:focus-visible .room-copy,
.folded .room-stair:focus-visible .room-copy,
.folded .room-guest:focus-visible .room-copy,
.folded .room-foyer.is-active .room-copy,
.folded .room-stair.is-active .room-copy,
.folded .room-guest.is-active .room-copy {
  opacity: 1;
  transform: scale(1);
}

.folded .room-foyer::after,
.folded .room-stair .steps,
.folded .room-guest .window {
  opacity: .24;
}

.folded .room-landing .key-hint {
  opacity: 0;
  animation: none;
}

.folded .building {
  transform: rotateX(2deg) translateY(-1%);
}

.folded .horizon {
  bottom: 17%;
}

.folded .world::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 12%;
  left: 39%;
  width: 18%;
  aspect-ratio: 1;
  border: 1px solid var(--focus);
  pointer-events: none;
  animation: fold-wave 1.15s var(--ease-fold) forwards;
}

.ending {
  position: fixed;
  z-index: 13;
  left: clamp(18px, 4vw, 62px);
  bottom: clamp(104px, 13vh, 138px);
  width: min(370px, calc(100vw - 36px));
  padding: 25px 28px 27px;
  border-left: 2px solid var(--focus);
  background: linear-gradient(90deg, rgba(11, 12, 16, .93), rgba(11, 12, 16, .58));
  box-shadow: 16px 22px 50px rgba(0, 0, 0, .26);
  opacity: 0;
  transform: translateY(18px);
  animation: ending-in .8s .45s var(--ease-fold) forwards;
  backdrop-filter: blur(10px);
}

.ending h2 {
  margin: 8px 0 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 3.2vw, 41px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.04em;
}

.ending-copy {
  margin: 0;
  color: #aeb1ba;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-style: italic;
}

.ending button {
  min-width: 112px;
  min-height: 44px;
  margin-top: 17px;
  padding: 0 16px;
  border: 1px solid rgba(255, 218, 114, .5);
  background: transparent;
  color: var(--focus-hot);
  cursor: pointer;
}

.ending button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.escaped {
  background:
    radial-gradient(circle at 85% 40%, rgba(255, 224, 172, .18), transparent 21%),
    linear-gradient(145deg, #181721 0%, #0a0b11 62%, #07080b 100%);
}

.escaped .sky {
  opacity: .08;
}

.escaped .horizon {
  opacity: .8;
  background: linear-gradient(90deg, transparent, rgba(225, 172, 126, .35) 38%, rgba(255, 219, 167, .7) 86%, transparent);
}

.escaped .room:not(.room-outside) {
  opacity: .34;
}

.escaped .room-outside {
  border-color: rgba(255, 218, 114, .85);
  background: linear-gradient(135deg, rgba(231, 173, 121, .2), rgba(17, 18, 23, .96));
  box-shadow: 0 0 70px rgba(224, 169, 118, .16);
}

.escaped .whisper {
  color: #d7c6b6;
}

.escaped .masthead {
  opacity: .45;
  transform: translateY(-5px);
}

@keyframes key-breathe {
  0%, 100% { border-color: #5e667e; color: #aab2c7; }
  50% { border-color: var(--focus); color: var(--focus); box-shadow: 0 0 14px rgba(255,218,114,.2); }
}

@keyframes grain-shift {
  0% { transform: translate3d(-2%, 1%, 0); }
  25% { transform: translate3d(1%, -2%, 0); }
  50% { transform: translate3d(2%, 2%, 0); }
  75% { transform: translate3d(-1%, -1%, 0); }
  100% { transform: translate3d(-2%, 1%, 0); }
}

@keyframes ending-in {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fold-wave {
  0% { opacity: .95; transform: scale(.25); }
  55% { opacity: .42; }
  100% { opacity: 0; transform: scale(5.2); }
}

@media (max-width: 760px) {
  .masthead {
    top: max(14px, env(safe-area-inset-top));
    left: 16px;
    width: calc(100vw - 116px);
  }

  .eyebrow,
  .date {
    display: none;
  }

  .masthead h1 {
    max-width: 235px;
    margin-top: 0;
    font-size: 20px;
    line-height: 1.02;
  }

  .route {
    top: max(16px, env(safe-area-inset-top));
    right: 14px;
    gap: 0;
  }

  .route-label {
    display: none;
  }

  .route ol {
    gap: 3px;
  }

  .route li {
    width: 10px;
    height: 10px;
    font-size: 0;
  }

  .route li.is-current {
    width: 24px;
  }

  .world {
    min-height: 480px;
  }

  .building {
    top: 78px;
    right: 12px;
    bottom: 144px;
    left: 12px;
    min-height: 300px;
  }

  .room-copy {
    right: 9px;
    bottom: 9px;
    left: 9px;
    gap: 2px;
  }

  .room-copy strong {
    font-size: 12px;
  }

  .room-copy small {
    font-size: 8px;
  }

  .room-number {
    top: 8px;
    left: 9px;
    font-size: 7px;
  }

  .room-foyer {
    --room-left: 4%;
    --room-top: 65%;
    --room-width: 38%;
    --room-height: 25%;
  }

  .room-stair {
    --room-left: 40%;
    --room-top: 38%;
    --room-width: 22%;
    --room-height: 43%;
  }

  .room-guest {
    --room-left: 59%;
    --room-top: 17%;
    --room-width: 37%;
    --room-height: 27%;
  }

  .room-landing {
    --room-left: 38%;
    --room-top: 4%;
    --room-width: 22%;
    --room-height: 21%;
  }

  .room-loop {
    --room-left: 67%;
    --room-top: 60%;
    --room-width: 28%;
    --room-height: 24%;
  }

  .key-hint {
    top: 7px;
    right: 7px;
    width: 21px;
    height: 19px;
  }

  .folded .room-foyer {
    --room-left: 2%;
    --room-top: 13%;
    --room-width: 17%;
    --room-height: 14%;
  }

  .folded .room-stair {
    --room-left: 14%;
    --room-top: 23%;
    --room-width: 13%;
    --room-height: 30%;
  }

  .folded .room-guest {
    --room-left: 2%;
    --room-top: 46%;
    --room-width: 25%;
    --room-height: 17%;
  }

  .folded .room-landing {
    --room-left: 30%;
    --room-top: 31%;
    --room-width: 21%;
    --room-height: 23%;
  }

  .room-corridor {
    --room-left: 42%;
    --room-top: 55%;
    --room-width: 49%;
    --room-height: 18%;
  }

  .room-nested {
    --room-left: 56%;
    --room-top: 18%;
    --room-width: 38%;
    --room-height: 31%;
  }

  .room-outside {
    --room-left: 57%;
    --room-top: 75%;
    --room-width: 38%;
    --room-height: 21%;
  }

  .miniature {
    opacity: .6;
  }

  .whisper {
    right: 16px;
    bottom: 106px;
    left: 16px;
    font-size: 12px;
    text-align: center;
  }

  .location {
    right: 16px;
    bottom: 88px;
    left: 16px;
    font-size: 8px;
    text-align: center;
  }

  .touch-controls {
    bottom: max(17px, env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    height: 58px;
    gap: 6px;
  }

  .touch-controls button {
    min-width: 0;
    min-height: 58px;
    flex: 1 1 0;
    padding: 0 12px;
  }

  .touch-controls .fold-control {
    min-width: 0;
    flex: 1.65 1 0;
  }

  .keyboard-note {
    display: none;
  }

  .intro {
    top: auto;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    width: auto;
    padding: 32px 27px 26px;
    transform: none;
  }

  .intro h2 {
    margin-top: 10px;
    font-size: clamp(34px, 10vw, 48px);
  }

  .intro > p:not(.intro-kicker, .touch-note) {
    font-size: 13px;
    line-height: 1.55;
  }

  .intro-rule {
    margin-bottom: 18px;
  }

  .has-entered .intro {
    transform: translateY(24px) scale(.98);
  }

  .ending {
    right: 16px;
    bottom: 100px;
    left: 16px;
    width: auto;
    padding: 20px 22px 21px;
  }

  .ending button {
    min-height: 48px;
  }
}

@media (max-height: 620px) and (min-width: 761px) {
  .building {
    top: 72px;
    bottom: 74px;
  }

  .whisper,
  .location {
    bottom: 56px;
  }

  .touch-controls {
    bottom: 10px;
  }

  .keyboard-note {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
  }

  .grain {
    display: none;
  }
}
