:root {
  color-scheme: dark;
  --night: #10162b;
  --blue: #1b2542;
  --panel: #111725;
  --panel-raised: #1b2234;
  --violet: #8d63d6;
  --jade: #65d8b0;
  --amber: #eca65c;
  --ivory: #f5ebdd;
  --muted: #b6b4c0;
  --muted-dim: #86889a;
  --line: rgba(221, 199, 164, .25);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--night); scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ivory);
  background:
    radial-gradient(ellipse at 50% -14%, rgba(97, 70, 130, .24), transparent 49rem),
    #10162b;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}
button, select { font: inherit; }
button { color: inherit; }
button:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid #91ead1;
  outline-offset: 4px;
  position: relative;
  z-index: 3;
}
button:disabled { cursor: not-allowed; }
::selection { color: #151725; background: #b6ecda; }

.app-shell { position: relative; isolation: isolate; min-height: 100vh; overflow: hidden; }
.starwash {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .26;
  background-image:
    radial-gradient(circle at 17% 28%, #ddc8a3 0 1px, transparent 1.5px),
    radial-gradient(circle at 77% 17%, #d6b5ea 0 1px, transparent 1.7px),
    radial-gradient(circle at 62% 83%, #9fe6d0 0 1px, transparent 1.7px);
  background-size: 176px 143px, 237px 187px, 291px 211px;
}
.site-header {
  position: relative;
  z-index: 6;
  max-width: 1480px;
  margin: 0 auto;
  padding: 18px clamp(18px, 4vw, 58px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: #e9d9be;
  font: 600 12px/1 var(--sans);
  letter-spacing: .2em;
  cursor: pointer;
}
.header-actions { display: flex; gap: 12px; align-items: center; }
.quiet-button, .text-button, .utility-button {
  border: 1px solid rgba(225, 203, 165, .25);
  background: rgba(17, 23, 37, .62);
  color: #e5d9c7;
  font-size: 11px;
  letter-spacing: .11em;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.quiet-button { min-height: 39px; padding: 0 13px; }
.quiet-button:hover, .text-button:hover, .utility-button:hover {
  border-color: rgba(217, 178, 119, .7);
  background: rgba(56, 46, 61, .85);
  color: #fff5e2;
}
.site-footer {
  max-width: 1480px;
  margin: 0 auto;
  padding: 17px clamp(18px, 4vw, 58px) 22px;
  display: flex;
  justify-content: space-between;
  color: #9694a4;
  font-size: 9px;
  letter-spacing: .17em;
}
.eyebrow {
  margin: 0 0 11px;
  color: #d1ae78;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
}
.copper-rule { display: inline-block; width: 35px; height: 1px; background: #d3a365; vertical-align: middle; }

.primary-button, .secondary-button {
  min-height: 49px;
  padding: 0 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border: 1px solid #d19a5d;
  background: linear-gradient(135deg, #bd7b45, #7d543b);
  color: #fff1dc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  cursor: pointer;
  box-shadow: 0 7px 22px rgba(8, 10, 18, .26), inset 0 1px 0 rgba(255, 238, 207, .22);
  transition: transform .18s ease, filter .18s ease, border-color .18s ease;
}
.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); filter: brightness(1.11); }
.primary-button span { font-size: 16px; }
.secondary-button {
  border-color: rgba(217, 204, 181, .48);
  background: rgba(20, 26, 42, .84);
  box-shadow: none;
}
.secondary-button.compact { min-width: 46px; padding: 0 13px; font-size: 19px; }
.text-button {
  min-height: 40px;
  padding: 0 7px;
  border: 0;
  background: transparent;
  color: #d2c6b3;
}
.icon-button {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(229, 215, 191, .27);
  background: rgba(255,255,255,.035);
  color: #f4e9d9;
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}
.icon-button:hover { background: rgba(255,255,255,.1); }
.visually-hidden, .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Arrival */
.view-title .site-header { position: absolute; inset: 0 0 auto; width: 100%; }
.view-title .site-footer { position: absolute; inset: auto 0 0; width: 100%; z-index: 3; }
.arrival-screen { position: relative; min-height: min(850px, 100svh); height: 850px; max-height: 100svh; overflow: hidden; }
.arrival-art { position: absolute; inset: 0; }
.scene-art { display: block; width: 100%; height: 100%; }
.arrival-art .scene-art { object-fit: cover; }
.arrival-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 17, 33, .96) 0%, rgba(13, 17, 33, .82) 29%, rgba(13, 17, 33, .22) 72%, rgba(13,17,33,.07) 100%),
    linear-gradient(0deg, #10162b 0%, transparent 22%, transparent 82%, rgba(16,22,43,.5) 100%);
}
.arrival-copy {
  position: relative;
  z-index: 1;
  width: min(600px, 54vw);
  padding: clamp(128px, 17vh, 192px) 0 90px clamp(24px, 8vw, 120px);
}
.arrival-copy h1 {
  margin: 0;
  color: #f4e6ce;
  font: 500 clamp(49px, 7vw, 88px)/.92 var(--serif);
  letter-spacing: -.045em;
  text-shadow: 0 4px 32px rgba(6, 9, 17, .53);
}
.arrival-copy h1 span { color: #d9b281; font-size: .82em; letter-spacing: .11em; }
.arrival-subtitle { margin: 20px 0 19px; color: #e8c798; font: italic 20px var(--serif); }
.arrival-intro { max-width: 460px; margin: 0; color: #e2ded9; font-size: 16px; line-height: 1.75; }
.arrival-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 32px; }
.arrival-caption { margin: 31px 0 0; color: rgba(225, 214, 195, .72); font-size: 9px; letter-spacing: .15em; }
.arrival-caption .copper-rule { margin-right: 10px; }
.arrival-coordinate {
  position: absolute;
  right: clamp(30px, 8vw, 116px);
  top: 31%;
  color: rgba(240, 224, 192, .68);
  font: 26px/.95 var(--serif);
  letter-spacing: .04em;
  text-align: center;
}
.arrival-coordinate small { font: 9px var(--sans); letter-spacing: .22em; }

/* Hall */
.hall-screen { max-width: 1450px; margin: 0 auto; padding: 30px clamp(18px, 4vw, 58px) 32px; }
.hall-heading { display: flex; justify-content: space-between; align-items: end; padding: 0 10px 20px; }
.hall-heading h1, .room-title h1 {
  margin: 0;
  color: #f1e4d0;
  font: 500 clamp(29px, 4vw, 45px)/1.1 var(--serif);
  letter-spacing: -.025em;
}
.section-lede { margin: 9px 0 0; color: #c1bec4; }
.hall-clock { width: 99px; height: 99px; position: relative; display: grid; place-items: center; grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(219, 192, 149, .55); border-radius: 50%; color: #eed7aa; font: 23px var(--serif); }
.hall-clock::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(219,192,149,.24); border-radius: 50%; }
.hall-clock i { position: absolute; width: 1px; height: 30px; top: 19px; left: 50%; background: #e1c58d; transform: rotate(25deg); transform-origin: bottom; }
.hall-clock small { position: absolute; inset: auto 0 -22px; color: #958fa0; font: 8px var(--sans); letter-spacing: .15em; white-space: nowrap; text-align: center; }
.hall-stage { height: clamp(480px, 49vw, 640px); min-height: 450px; position: relative; overflow: hidden;
  border: 1px solid rgba(212, 181, 139, .28); background: #1b2031; box-shadow: 0 23px 70px rgba(2, 5, 13, .36); }
.hall-art { position: absolute; inset: 0; }
.hall-art .scene-art { opacity: .97; }
.hall-floor-glow { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(180,135,85,.13), transparent 44%); pointer-events: none; }
.hub-key-canvas {
  position: absolute;
  z-index: 2;
  width: clamp(138px, 18vw, 246px);
  height: clamp(106px, 14vw, 190px);
  left: 50%;
  top: 43%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 20px rgba(221, 173, 98, .65));
}
.key-fallback { position: absolute; z-index: 2; left: 50%; top: 43%; width: 114px; transform: translate(-50%, -50%); opacity: .87; filter: drop-shadow(0 0 19px rgba(221,173,98,.58)); }
.key-fallback svg { display: block; width: 100%; }
.hub-object-caption { position: absolute; z-index: 2; left: 50%; top: 54%; margin: 0; transform: translateX(-50%);
  color: rgba(246, 223, 183, .72); font: italic 12px var(--serif); white-space: nowrap; text-shadow: 0 2px 8px #10162b; }
.door-gallery { position: absolute; z-index: 3; left: 2.5%; right: 2.5%; bottom: 9%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.door-choice {
  min-width: 0;
  min-height: 102px;
  padding: 12px 10px 10px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(208, 172, 121, .4);
  background: linear-gradient(180deg, rgba(17, 20, 34, .89), rgba(23, 25, 38, .79));
  color: #eee2cf;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(0,0,0,.32);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.door-choice:hover, .door-choice.is-selected {
  transform: translateY(-5px);
  border-color: #e5b972;
  background: linear-gradient(180deg, rgba(55, 43, 55, .94), rgba(27, 29, 43, .92));
}
.door-level { color: #e6ba75; font: 700 10px var(--sans); letter-spacing: .19em; }
.door-name { color: #f3e7d5; font: 500 clamp(10px, 1vw, 13px)/1.2 var(--serif); letter-spacing: .035em; }
.door-description { color: #c0bdc5; font: 10px/1.3 var(--sans); }
.door-index { position: absolute; right: 8px; top: 5px; color: rgba(242,223,189,.36); font: 10px var(--serif); }
.door-choice.is-selected::after { content: "✦"; position: absolute; top: -17px; color: #e8bf79; font-size: 13px; filter: drop-shadow(0 0 6px #e0b875); }
.hall-controls { display: flex; justify-content: center; align-items: center; gap: 30px; margin-top: 21px; }
.hall-secondary { position: absolute; right: clamp(18px, 4vw, 58px); display: flex; gap: 18px; }
.mobile-door-controls { display: none; }
.hall-footnote { display: flex; justify-content: center; gap: 30px; margin: 23px 0 0; color: #928fa0; font-size: 9px; letter-spacing: .15em; }

/* Room */
.room-screen { max-width: 1480px; margin: 0 auto; padding: 20px clamp(16px, 4vw, 56px) 34px; position: relative; }
.room-topline { display: grid; grid-template-columns: 1fr minmax(240px, 1.3fr) 1fr; align-items: center; gap: 20px; }
.back-hall-button { justify-self: start; }
.room-title { text-align: center; }
.room-title .eyebrow { margin-bottom: 4px; font-size: 9px; }
.room-title h1 { font-size: clamp(25px, 3vw, 38px); }
.room-utilities { display: flex; justify-content: end; gap: 7px; }
.utility-button { min-height: 41px; padding: 0 10px; }
.utility-button span { display: inline-grid; place-items: center; min-width: 21px; height: 21px; margin-left: 3px; border-radius: 50%;
  background: rgba(209,165,102,.18); color: #efc988; font-size: 10px; }
.progress-row { max-width: 1250px; margin: 20px auto 12px; display: flex; align-items: center; gap: 15px; }
.progress-stamps { display: flex; gap: 6px; }
.progress-stamp { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid rgba(226,207,175,.3); color: #a7a6b2;
  font: 11px var(--serif); }
.progress-stamp.is-current { border-color: #e4ad68; color: #f3cd88; box-shadow: 0 0 12px rgba(218,164,91,.17); }
.progress-stamp.is-solved { border-color: #70c7aa; color: #a2ecd3; background: rgba(64,143,113,.17); }
.puzzle-counter { color: #e6c28a; font-size: 10px; font-weight: 800; letter-spacing: .15em; white-space: nowrap; }
.room-subtitle { margin-left: auto; color: #aeabb7; font: italic 14px var(--serif); }
.scene-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 12 / 7;
  min-height: 405px;
  max-height: 72svh;
  overflow: hidden;
  border: 1px solid rgba(218, 187, 145, .32);
  background: #1b2033;
  box-shadow: 0 20px 63px rgba(0,0,0,.38), inset 0 0 0 5px rgba(233,211,174,.035);
}
.scene-stage > .scene-art { position: absolute; inset: 0; }
.scene-light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 54%, transparent 25%, rgba(8,12,22,.16) 76%, rgba(8,12,22,.38));
}
.scene-hotspots { position: absolute; inset: 0; z-index: 2; }
.hotspot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  min-width: 48px;
  min-height: 48px;
  max-width: min(180px, 26vw);
  padding: 6px 11px 6px 7px;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(248,225,186,.58);
  border-radius: 2px;
  background: rgba(17, 23, 37, .82);
  color: #f7e6c6;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 7px 19px rgba(0,0,0,.37);
  transition: box-shadow .2s ease, border-color .2s ease, opacity .2s ease, transform .2s ease;
}
.hotspot:hover, .hotspot:focus-visible { transform: translate(-50%, -54%); border-color: #f0c478; box-shadow: 0 0 0 3px rgba(235,177,95,.2), 0 0 19px rgba(239,188,102,.34); }
.hotspot-glyph { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(228,191,131,.44);
  background: rgba(102,77,81,.54); color: #f0c785; font: 17px var(--serif); }
.hotspot-label { font-size: 10px; line-height: 1.2; letter-spacing: .025em; }
.hotspot-current { border-color: #f0bd71; box-shadow: 0 0 0 2px rgba(235,177,95,.2), 0 0 21px rgba(239,188,102,.48); }
.hotspot-current .hotspot-glyph { color: #fff0c8; background: #806041; border-color: #eed294; }
.hotspot-solved { border-color: rgba(124,218,182,.73); color: #a6ead0; }
.hotspot-solved .hotspot-glyph { color: #a1edd2; border-color: #65b99a; background: rgba(36,91,78,.72); }
.hotspot-locked { opacity: .4; filter: saturate(.45); }
.hotspot-locked:hover { transform: translate(-50%, -50%); }
.scene-corner-note { position: absolute; z-index: 1; right: 15px; bottom: 13px; display: flex; gap: 7px; align-items: center;
  color: rgba(245,231,207,.67); font-size: 8px; letter-spacing: .13em; text-shadow: 0 1px 5px #10162b; }
.note-sigil { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid rgba(224,191,143,.55); border-radius: 50%; font: 11px var(--serif); }
.scene-reaction { position: absolute; left: 50%; bottom: 14px; z-index: 4; transform: translateX(-50%); max-width: calc(100% - 32px); display: flex; gap: 9px; align-items: center;
  padding: 9px 15px; border: 1px solid rgba(140,215,183,.38); background: rgba(14,29,34,.82); color: #c6ecdb; font: italic 13px var(--serif); text-align: center; }
.reaction-star { color: #8ee2c3; }
.room-lower { display: flex; align-items: center; gap: 14px; margin: 14px 0 0; }
.explore-list { position: relative; }
.explore-list summary { min-height: 42px; padding: 0 13px; display: flex; justify-content: space-between; align-items: center; gap: 18px;
  border: 1px solid rgba(228,207,175,.35); background: #171e31; color: #dfcfb2; font-size: 10px; letter-spacing: .12em; font-weight: 800; cursor: pointer; list-style: none; }
.explore-list summary::-webkit-details-marker { display: none; }
.explore-list[open] { flex: 1; }
.explore-list[open] summary { margin-bottom: 8px; }
.explore-list[open] .object-list { display: flex; flex-wrap: wrap; gap: 8px; }
.room-hintline { margin: 0; color: #a9a6b1; font: italic 13px var(--serif); }
.sound-room { margin-left: auto; }
.object-list .hotspot { position: relative; left: auto; top: auto; transform: none; max-width: none; min-height: 41px; }
.object-list .hotspot:hover { transform: translateY(-2px); }
.room-noise { position: absolute; right: 3%; top: 210px; z-index: -1; color: rgba(203,178,224,.08); font: 82px var(--serif); transform: rotate(-17deg); pointer-events: none; }
.scene-tower[data-solved="5"] .scene-art { filter: saturate(1.13) brightness(1.08); }
.scene-kitchen[data-solved="5"] .scene-art { filter: saturate(1.18); }
.scene-library[data-solved="5"] .scene-art { filter: sepia(.15) saturate(1.1); }
.scene-graveyard[data-solved="5"] .scene-art { filter: brightness(1.13) saturate(1.12); }
.scene-mirrors[data-solved="5"] .scene-art { filter: brightness(1.14) saturate(1.19); }
.graphics-low .scene-art { filter: none !important; }
.graphics-low .scene-reaction { box-shadow: none; }
.graphics-high .scene-stage { box-shadow: 0 24px 75px rgba(0,0,0,.46), 0 0 35px rgba(123,95,160,.11); }

/* Reading dialogs */
dialog { color: var(--ivory); }
.utility-dialog, .focus-dialog {
  width: min(650px, calc(100vw - 28px));
  max-width: none;
  max-height: min(86svh, 850px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(213,179,130,.53);
  background:
    linear-gradient(120deg, rgba(43,38,57,.97), rgba(17,23,37,.985) 49%, rgba(23,30,48,.98));
  color: var(--ivory);
  box-shadow: 0 25px 85px rgba(0,0,0,.7), inset 0 0 0 5px rgba(236,202,154,.04);
}
.focus-dialog { width: min(820px, calc(100vw - 28px)); }
.utility-dialog::backdrop, .focus-dialog::backdrop { background: rgba(5,8,17,.72); backdrop-filter: blur(2px); }
.dialog-body { max-height: inherit; padding: clamp(19px, 4vw, 33px); display: flex; flex-direction: column; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.dialog-heading .eyebrow { margin: 0 0 5px; }
.dialog-heading h2, .utility-dialog h2 {
  margin: 0;
  color: #f1dfc2;
  font: 500 clamp(24px, 4vw, 36px)/1.15 var(--serif);
}
.focus-dialog .dialog-heading { flex: 0 0 auto; }
.puzzle-scroll { overflow: auto; overscroll-behavior: contain; padding-right: 4px; }
.puzzle-prompt { margin: 8px 0 17px; color: #f1e9db; font-size: 17px; line-height: 1.5; }
.evidence-stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 9px; margin: 0 0 16px; }
.evidence-card { padding: 11px 13px; position: relative; border-left: 2px solid rgba(212,163,98,.75); background: rgba(231,215,187,.055); }
.evidence-card h3 { margin: 0 0 5px; color: #e5bd80; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.evidence-card p { margin: 0; color: #e5e0d9; font: 14px/1.55 var(--serif); }
.answer-area { margin: 16px 0 14px; }
.answer-heading { margin: 0 0 9px; color: #a7a4b2; font-size: 9px; letter-spacing: .18em; }
.choice-list { display: grid; gap: 7px; }
.evidence-choice {
  width: 100%;
  min-height: 53px;
  padding: 8px 13px;
  display: grid;
  grid-template-columns: 25px 25px 1fr 18px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(210,198,177,.22);
  background: rgba(12,18,31,.58);
  color: #e8e3dd;
  text-align: left;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}
.evidence-choice:hover, .evidence-choice.is-selected { border-color: rgba(224,179,112,.78); background: rgba(130,94,63,.23); }
.choice-index { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid rgba(213,189,150,.38); color: #dcb67c; font: 12px var(--serif); }
.choice-glyph { color: #c3a27a; text-align: center; font: 17px var(--serif); }
.choice-text { font-size: 14px; line-height: 1.45; }
.choice-text small { display: block; margin-top: 3px; color: #bbb3aa; font-size: 11px; }
.choice-check { opacity: 0; color: #91e1c3; font-size: 14px; }
.evidence-choice.is-selected .choice-check { opacity: 1; }
.scene-object-choice { min-height: 67px; }
.object-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.object-choice {
  min-height: 78px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(214,192,160,.32);
  background: linear-gradient(155deg, rgba(73,62,62,.47), rgba(17,24,39,.85));
  color: #e9dfce;
  cursor: pointer;
}
.object-choice:hover, .object-choice.is-selected { border-color: #e2b473; background: rgba(124,89,59,.43); }
.object-glyph { font: 24px var(--serif); color: #d1ae75; }
.object-choice span:last-child { font: 13px var(--serif); }
.object-red-apple .object-glyph { color: #d76c5a; }
.object-green-apple .object-glyph { color: #8fc07d; }
.object-blue-flower .object-glyph { color: #6fc2e2; }
.object-yellow-flower .object-glyph { color: #f0cc6f; }
.object-silver-spoon .object-glyph { color: #dfdfdc; }
.object-wooden-spoon .object-glyph { color: #bc8c5f; }
.selection-count { margin: 8px 0 0; color: #aaa6ae; font-size: 10px; letter-spacing: .1em; text-align: right; }

.bottle-board {
  min-height: 254px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(209,177,130,.32);
  background: linear-gradient(180deg, rgba(33,37,54,.9) 0 25%, rgba(93,65,48,.38) 25% 31%, rgba(35,31,39,.8) 31% 100%);
}
.bottle-board::after { content: ""; position: absolute; left: 0; right: 0; bottom: 38px; height: 27px; background: linear-gradient(#9a704d, #523d34); border-top: 3px solid #c29a67; }
.bottle-shelf, .table-caption { position: absolute; z-index: 1; left: 11px; top: 9px; color: #bca17b; font-size: 8px; letter-spacing: .15em; }
.bottle-candle { position: absolute; z-index: 2; left: 49%; top: 53%; width: 46px; height: 43px; display: grid; place-items: end center; padding-bottom: 5px; border-bottom: 6px solid #b79368;
  color: #f2d5a3; font-size: 8px; letter-spacing: .09em; }
.bottle-candle::before { content: ""; position: absolute; bottom: 8px; width: 14px; height: 36px; border-radius: 4px 4px 1px 1px; background: #eee1c7; box-shadow: 0 -17px 15px -9px #ffb459; }
.bottle-object {
  width: 89px;
  min-height: 91px;
  position: absolute;
  z-index: 3;
  padding: 6px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: center;
  gap: 2px;
  border: 1px solid transparent;
  background: transparent;
  color: #ded9d1;
  cursor: pointer;
}
.bottle-object:hover, .bottle-object.is-selected { border-color: rgba(245,211,160,.75); background: rgba(235,214,179,.09); }
.bottle-object > span { width: 30px; height: 44px; padding-top: 5px; border: 1px solid rgba(255,255,255,.36); border-radius: 8px 8px 5px 5px;
  background: linear-gradient(90deg, rgba(255,255,255,.22), transparent 33%), var(--bottle-color); color: rgba(255,255,255,.8); font-size: 25px; line-height: 32px; text-align: center; }
.bottle-object small { min-height: 24px; font-size: 9px; line-height: 1.2; }
.bottle-green { --bottle-color: rgba(70,175,105,.82); left: 64%; top: 41%; }
.bottle-blue { --bottle-color: rgba(61,126,183,.82); left: 32%; top: 37%; opacity: .84; }
.bottle-yellow { --bottle-color: rgba(205,172,66,.85); left: 53%; top: 71%; }
.bottle-purple { --bottle-color: rgba(129,91,157,.87); left: 80%; top: 1%; }
.table-caption { left: 11px; top: auto; bottom: 8px; z-index: 2; }
.table-edge { position: absolute; z-index: 2; left: 7%; right: 7%; bottom: 30px; height: 9px; background: #8a6447; }

.matching-board { display: grid; gap: 7px; }
.matching-header { padding: 0 8px; display: grid; grid-template-columns: 1fr 1fr; color: #aaa8b0; font-size: 9px; font-weight: 700; letter-spacing: .15em; }
.match-row { min-height: 51px; padding: 7px 9px; display: grid; grid-template-columns: 1fr minmax(150px, 1fr); align-items: center; gap: 10px;
  border: 1px solid rgba(222,203,174,.21); background: rgba(12,18,31,.56); }
.match-source { display: flex; gap: 10px; align-items: center; color: #e7dece; font: 14px/1.35 var(--serif); }
.match-source i { color: #d4ad73; font: 10px var(--sans); }
.match-row select { width: 100%; min-height: 38px; padding: 6px 28px 6px 9px; border: 1px solid rgba(205,180,143,.39); border-radius: 0;
  background: #22283b; color: #efe4d3; font-size: 12px; }
.order-list { margin: 0; padding: 0; display: grid; gap: 7px; list-style: none; }
.order-card { min-height: 56px; padding: 7px 9px; display: flex; align-items: center; gap: 11px; border: 1px solid rgba(222,203,174,.24); background: rgba(13,18,30,.57); }
.order-number { width: 27px; height: 27px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(214,177,118,.45); color: #ddb77a; font: 12px var(--serif); }
.order-text { flex: 1; color: #e9e1d5; font: 14px/1.4 var(--serif); }
.move-buttons { display: flex; gap: 5px; }
.move-buttons button { width: 38px; height: 38px; border: 1px solid rgba(215,198,170,.35); background: #20273a; color: #e8d7b8; font-size: 19px; cursor: pointer; }
.move-buttons button:hover:not(:disabled) { border-color: #e8bd79; color: #fff0cc; }
.move-buttons button:disabled { opacity: .35; }
.map-instruction { display: flex; justify-content: space-between; align-items: center; margin: 0 auto 8px; max-width: 520px; color: #c9c3bc; font-size: 12px; }
.north-arrow { color: #a5e3ce; font-weight: 800; letter-spacing: .08em; }
.map-grid { width: min(100%, 520px); margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.map-cell { min-height: 67px; padding: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px solid rgba(197,178,148,.25); }
.map-cell > span { color: #a99e90; font-size: 9px; letter-spacing: .1em; }
.map-cell strong { font: 13px/1.15 var(--serif); text-align: center; }
.map-path { background: rgba(48,66,60,.26); color: #c3c8bd; }
.map-location { background: rgba(62,63,76,.69); color: #efe2ca; cursor: pointer; }
.map-location:hover, .map-location.is-selected { border-color: #e3b573; background: rgba(127,94,62,.58); }
.map-location.route-step { box-shadow: inset 0 0 0 1px rgba(115,207,177,.25); }
.map-location strong { color: #f3dfba; }

.physical-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.physical-action { flex: 1 1 170px; min-height: 104px; padding: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid rgba(218,194,157,.35); background: linear-gradient(155deg, rgba(63,59,68,.66), rgba(17,24,39,.92)); color: #eadfcf; cursor: pointer; }
.physical-action:hover { border-color: #e7bd79; background: rgba(117,88,61,.42); }
.action-glyph { color: #e4bc7c; font: 27px var(--serif); }
.physical-action span:last-child { font: 13px/1.3 var(--serif); text-align: center; }
.action-progress { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; color: #c8b89d; font-size: 11px; }
.action-progress-track { display: flex; gap: 5px; }
.action-progress-track i { width: 30px; height: 4px; background: rgba(214,197,168,.24); }
.action-progress-track i.is-filled { background: #7fdfbd; }
.retry-sequence { margin-top: 9px; }
.hint-area { margin: 15px 0 0; padding-top: 11px; border-top: 1px solid rgba(223,206,178,.17); }
.hint-title { display: flex; gap: 10px; align-items: baseline; }
.hint-title span { color: #8ed4bc; font-size: 8px; letter-spacing: .17em; }
.hint-title strong { color: #d6c7b1; font-size: 10px; letter-spacing: .14em; }
.hint-steps { margin-top: 7px; }
.hint-step { min-height: 32px; margin: 3px 6px 3px 0; padding: 0 9px; border: 1px solid rgba(218,197,164,.26); background: transparent; color: #d8cbb8; font-size: 9px; font-weight: 700; letter-spacing: .09em; cursor: pointer; }
.hint-step:hover:not(:disabled) { border-color: #88d3b9; color: #c8efdf; }
.hint-step:disabled { border-color: rgba(115,197,166,.4); color: #9cd8c0; opacity: .85; }
.hint-copy { max-width: 650px; margin: 5px 0 6px; display: flex; gap: 9px; align-items: baseline; color: #e4d7c1; font: italic 14px/1.45 var(--serif); }
.hint-copy span { flex: 0 0 auto; color: #8bd4b7; font: 10px var(--sans); }
.answer-feedback { margin: 11px 0 0; padding: 9px 12px; display: flex; gap: 10px; align-items: center; border-left: 2px solid #d48d65; background: rgba(116,65,62,.18); color: #f1d9cb; }
.answer-feedback.is-success { border-color: #70d1ad; background: rgba(43,110,84,.17); color: #d4f3e5; }
.answer-feedback span { color: #e4b377; }
.answer-feedback.is-success span { color: #91e4c2; }
.answer-feedback p { margin: 0; font: 14px/1.4 var(--serif); }
.reward-note { margin: 9px 0 0; padding: 10px 12px; display: flex; gap: 9px; align-items: center; border: 1px solid rgba(117,201,168,.28); background: rgba(43,94,82,.19); color: #c3ead8; }
.reward-note p { margin: 0; font: 13px/1.45 var(--serif); }
.reward-sigil { color: #91e5c2; }
.readonly-note { padding: 15px; border: 1px solid rgba(120,207,175,.3); background: rgba(43,94,82,.16); color: #c8ebdc; font: 14px var(--serif); }
.readonly-note span { margin-right: 8px; color: #91e2be; }
.dialog-actions { display: flex; justify-content: end; flex-wrap: wrap; gap: 9px; padding-top: 13px; }
.check-button { min-width: 120px; }
.intro-focus { width: min(650px, calc(100vw - 28px)); }
.nox-intro { display: grid; grid-template-columns: 52px 1fr; gap: 16px; margin: 15px 0; }
.nox-avatar { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid #b89465; border-radius: 50%; color: #cfb07b; font: 24px var(--serif); background: radial-gradient(circle, #433450, #171a2c 73%); box-shadow: 0 0 18px rgba(133,102,166,.24); }
.nox-name { margin: 1px 0 4px; color: #cfb481; font-size: 9px; font-weight: 800; letter-spacing: .19em; }
.large-reading { margin: 0; color: #e8e0d5; font: 17px/1.65 var(--serif); }
.intro-reminder { margin: 11px 0 0 68px; color: #aaa7b0; font-size: 10px; letter-spacing: .06em; }
.utility-close-button { margin: 20px 0 0 auto; }
.utility-dialog h2 { margin-bottom: 15px; }
.utility-content { min-height: 0; overflow: auto; }
.howto-rule { display: grid; grid-template-columns: 37px 1fr; gap: 12px; align-items: start; padding: 11px 0; border-top: 1px solid rgba(221,204,174,.15); }
.howto-rule span { color: #d9ad6c; font: 15px var(--serif); }
.howto-rule p { margin: 0; color: #cbc4ba; font: 14px/1.5 var(--serif); }
.utility-intro { margin: 0 0 15px; color: #c4bcae; font: italic 14px var(--serif); }
.clue-entry { padding: 13px 0; border-top: 1px solid rgba(221,204,174,.17); }
.clue-id { color: #caa36b; font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.clue-entry h3 { margin: 4px 0; color: #e9dcc6; font: 18px var(--serif); }
.clue-entry p { margin: 0; color: #d2cbc0; font: 14px/1.5 var(--serif); }
.inventory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.inventory-item { min-height: 52px; padding: 9px; display: flex; gap: 10px; align-items: center; border-bottom: 1px solid rgba(214,193,158,.2); color: #e6dccd; font: 14px var(--serif); }
.inventory-mark { color: #d3a96c; font: 10px var(--sans); }
.setting-row { min-height: 63px; padding: 10px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid rgba(221,204,174,.16); }
.setting-row strong { display: block; color: #ead9bd; font-size: 10px; letter-spacing: .14em; }
.setting-row small { display: block; margin-top: 3px; color: #a9a5af; font-size: 11px; }
.toggle-setting { min-height: 37px; padding: 0 10px; border: 1px solid rgba(223,193,148,.39); background: #24283a; color: #e6d4b7; font-size: 9px; font-weight: 700; letter-spacing: .08em; cursor: pointer; }
.segmented-control { display: flex; gap: 4px; flex-wrap: wrap; justify-content: end; }
.segmented-control button { min-height: 34px; padding: 0 7px; border: 1px solid rgba(223,193,148,.26); background: #24283a; color: #d4c8b5; font-size: 8px; cursor: pointer; }
.segmented-control button[aria-pressed="true"] { border-color: #e2b574; color: #f2dbad; }
.small-note { margin: 9px 0 0; color: #a9a5af; font: 12px/1.5 var(--serif); }
.leave-actions { justify-content: end; }

/* Endings */
.ending-screen { position: relative; min-height: min(830px, 100svh); max-width: 1520px; margin: 0 auto; padding: 26px clamp(18px, 5vw, 72px) 38px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr); align-items: center; gap: clamp(18px, 5vw, 74px); }
.ending-art { position: relative; height: min(68svh, 600px); min-height: 380px; overflow: hidden; border: 1px solid rgba(213,177,127,.35); box-shadow: 0 22px 65px rgba(0,0,0,.38); }
.ending-art .scene-art { position: absolute; inset: 0; }
.ending-veil { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(139,99,214,.1), rgba(12,16,28,.45)); }
.ending-key { position: absolute; left: 50%; top: 47%; width: 98px; height: 98px; display: grid; place-items: center; transform: translate(-50%,-50%); border: 1px solid rgba(238,201,135,.75); border-radius: 50%;
  background: rgba(17,23,37,.76); color: #f0ca87; font: 40px var(--serif); box-shadow: 0 0 40px rgba(224,178,111,.44); }
.ending-copy { position: relative; padding: 26px 0; }
.ending-seal { width: 43px; height: 43px; display: grid; place-items: center; margin: 7px 0 12px; border: 1px solid rgba(228,184,116,.5); border-radius: 50%; color: #e7bd7f; font-size: 19px; }
.ending-copy h1 { margin: 0; color: #f2e3c9; font: 500 clamp(42px, 5vw, 63px)/1 var(--serif); letter-spacing: -.04em; }
.ending-line { margin: 16px 0 8px; color: #e7c691; font: 18px var(--serif); }
.nox-ending { max-width: 440px; margin: 14px 0 18px; color: #ded8d0; font: 16px/1.6 var(--serif); }
.ending-stamps { display: flex; gap: 9px; margin: 18px 0; color: #93d9bd; font-size: 16px; }
.ending-stamps span { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid rgba(131,207,178,.45); }
.ending-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 19px; }
.epilogue-link { margin: 4px 0; padding: 7px 0; border: 0; border-bottom: 1px solid rgba(210,178,125,.46); background: transparent; color: #dab77f; font-size: 10px; font-weight: 800; letter-spacing: .13em; cursor: pointer; }
.epilogue-link span { margin-left: 11px; font-size: 15px; }
.epilogue-screen { max-width: 1220px; min-height: calc(100svh - 135px); margin: 0 auto; padding: 20px clamp(18px, 5vw, 65px); display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 32px; }
.mirror-epilogue-art { height: min(63svh, 520px); overflow: hidden; border: 1px solid rgba(213,177,127,.34); }
.epilogue-panel { padding: 23px; border: 1px solid rgba(213,177,127,.29); background: rgba(18,24,39,.91); }
.epilogue-panel h1 { margin: 9px 0 12px; color: #f0e1ca; font: 500 34px var(--serif); }
.epilogue-dialogue { margin: 0; padding: 11px; border-left: 2px solid #bd9462; background: rgba(233,214,183,.06); color: #ddd5c9; font: 14px/1.55 var(--serif); }
.epilogue-prompt { color: #f0e4d1; font: 17px/1.5 var(--serif); }
.epilogue-choices { display: grid; gap: 6px; }
.epilogue-choice { min-height: 50px; padding: 9px; border: 1px solid rgba(221,198,160,.22); background: rgba(12,17,28,.65); color: #e3dbce; font: 13px/1.4 var(--serif); text-align: left; cursor: pointer; }
.epilogue-choice.is-selected { border-color: #d3aa70; background: rgba(119,87,58,.24); }
.epilogue-feedback { min-height: 25px; margin-top: 10px; font: 14px var(--serif); }
.epilogue-feedback.is-success { color: #a5e5c9; }
.epilogue-feedback.is-error { color: #efbfab; }
.epilogue-controls { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.epilogue-controls .secondary-button { min-height: 40px; }

.loading-room, .load-error { min-height: 68svh; display: grid; place-content: center; justify-items: center; color: #d6c6aa; text-align: center; }
.loading-room p { color: #b2a8a0; font-size: 10px; letter-spacing: .2em; }
.loading-seal { color: #ddba78; font-size: 28px; animation: slow-turn 6s linear infinite; }
.load-error { gap: 10px; }
.load-error h1 { margin: 0; font: 34px var(--serif); }
.load-error p { color: #cbc4bb; }
.graphics-low .loading-seal, .reduced-motion .loading-seal { animation: none; }
.svg-clock { fill: #f0d9a9; font: 26px Georgia,serif; text-anchor: middle; letter-spacing: 2px; }
.svg-small { fill: #ead5b2; font: 13px "Segoe UI",Arial,sans-serif; text-anchor: middle; letter-spacing: 2px; }
.svg-tiny { fill: #d7c6a9; font: 15px Georgia,serif; text-anchor: middle; }

@keyframes slow-turn { to { transform: rotate(360deg); } }
@keyframes mote-rise { 0% { transform: translateY(0); opacity: .12; } 50% { opacity: .45; } 100% { transform: translateY(-10px); opacity: .12; } }
@keyframes pulse-light { 0%,100% { opacity: .2; } 50% { opacity: .6; } }
.scene-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 56%, transparent 35%, rgba(9,14,25,.15)); }
.scene-kitchen .scene-light { background: radial-gradient(ellipse at 60% 55%, rgba(91,207,155,.07), transparent 31%); }
.scene-tower[data-solved="5"]::after, .scene-mirrors[data-solved="5"]::after { animation: pulse-light 2.8s ease-in-out infinite; }
.reduced-motion *, .reduced-motion *::before, .reduced-motion *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 1023px) {
  .hall-screen { padding-top: 22px; }
  .hall-stage { height: 575px; }
  .door-gallery { bottom: 7%; gap: 7px; }
  .door-choice { padding-inline: 7px; }
  .door-description { font-size: 9px; }
  .room-topline { grid-template-columns: 1fr 1.2fr; }
  .room-title { grid-column: 1 / -1; grid-row: 1; }
  .back-hall-button { grid-column: 1; grid-row: 2; }
  .room-utilities { grid-column: 2; grid-row: 2; }
  .scene-stage { min-height: 370px; }
  .ending-screen { grid-template-columns: 1fr 1fr; gap: 24px; }
  .ending-art { min-height: 340px; }
  .hall-secondary { position: static; }
}
@media (max-width: 700px) {
  body { font-size: 15px; }
  .site-header { padding: 12px 14px; }
  .wordmark { font-size: 9px; letter-spacing: .15em; }
  .header-actions { gap: 6px; }
  .quiet-button { min-height: 35px; padding: 0 8px; font-size: 8px; }
  .site-footer { padding: 13px 14px 16px; font-size: 7px; letter-spacing: .11em; }
  .site-footer span:last-child { text-align: right; }
  .arrival-screen { min-height: 740px; height: 100svh; max-height: 940px; }
  .arrival-art .scene-art { preserveAspectRatio: xMidYMid slice; }
  .arrival-vignette { background: linear-gradient(90deg, rgba(13,17,33,.83), rgba(13,17,33,.24)), linear-gradient(0deg, #10162b 0%, rgba(12,17,30,.37) 36%, rgba(13,17,33,.55)); }
  .arrival-copy { width: 100%; padding: 128px 24px 86px; }
  .arrival-copy h1 { font-size: clamp(48px, 15vw, 72px); }
  .arrival-subtitle { font-size: 18px; }
  .arrival-intro { max-width: 420px; font-size: 15px; }
  .arrival-actions { display: grid; width: min(100%, 330px); }
  .arrival-coordinate { right: 26px; top: 25%; font-size: 19px; opacity: .65; }
  .arrival-caption { max-width: 290px; line-height: 1.6; font-size: 8px; }
  .hall-screen { padding: 25px 13px 25px; }
  .hall-heading { align-items: center; padding: 0 5px 20px; }
  .hall-heading h1 { max-width: 260px; font-size: 31px; }
  .section-lede { max-width: 278px; font-size: 13px; }
  .hall-clock { width: 66px; height: 66px; flex: 0 0 auto; font-size: 16px; }
  .hall-clock::before { inset: 5px; }
  .hall-clock i { top: 14px; height: 19px; }
  .hall-clock small { font-size: 6px; bottom: -16px; }
  .hall-stage { height: 558px; min-height: 0; }
  .hub-key-canvas { width: 148px; height: 112px; top: 32%; left: 50%; }
  .hub-object-caption { top: 41%; width: 190px; white-space: normal; font-size: 10px; text-align: center; }
  .door-gallery {
    left: 11px;
    right: 11px;
    bottom: 17px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 86%;
    grid-template-columns: none;
    gap: 11px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    padding: 16px 5px 7px;
    scrollbar-color: #7e6a61 rgba(18,22,34,.6);
  }
  .door-choice { min-height: 91px; scroll-snap-align: center; }
  .door-name { font-size: 14px; }
  .door-description { font-size: 11px; }
  .hall-controls { display: grid; gap: 9px; margin-top: 14px; }
  .mobile-door-controls { display: flex; justify-content: center; align-items: center; gap: 15px; color: #c6b79f; font-size: 11px; }
  .hall-controls > .primary-button { width: min(100%, 310px); margin: 0 auto; }
  .hall-secondary { justify-content: center; }
  .hall-footnote { gap: 12px; font-size: 7px; letter-spacing: .08em; }
  .room-screen { padding: 13px 12px 24px; }
  .room-topline { grid-template-columns: 1fr auto; gap: 7px; }
  .room-title { grid-column: 1 / -1; grid-row: 1; }
  .room-title h1 { font-size: 27px; }
  .room-title .eyebrow { font-size: 8px; }
  .back-hall-button { grid-column: 1; grid-row: 2; justify-self: start; min-height: 36px; font-size: 8px; }
  .room-utilities { grid-column: 2; grid-row: 2; gap: 4px; }
  .utility-button { min-height: 35px; padding: 0 6px; font-size: 7px; letter-spacing: .06em; }
  .utility-button span { min-width: 16px; height: 16px; font-size: 8px; }
  .progress-row { margin: 12px 0 8px; flex-wrap: wrap; gap: 8px; }
  .progress-stamp { width: 22px; height: 22px; font-size: 9px; }
  .puzzle-counter { font-size: 8px; }
  .room-subtitle { width: 100%; order: 4; font-size: 11px; }
  .scene-stage { aspect-ratio: 4 / 3; min-height: 337px; max-height: none; }
  .scene-stage > .scene-art { object-fit: cover; }
  .hotspot { min-width: 46px; min-height: 46px; max-width: 54px; padding: 5px; justify-content: center; border-radius: 50%; background: rgba(17,23,37,.88); }
  .hotspot-glyph { width: 32px; height: 32px; font-size: 16px; border: 0; background: transparent; }
  .hotspot-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .scene-corner-note { right: 6px; bottom: 7px; max-width: 46%; font-size: 6px; letter-spacing: .07em; }
  .scene-reaction { bottom: 7px; left: 7px; transform: none; max-width: 68%; padding: 6px 8px; font-size: 10px; text-align: left; }
  .room-lower { flex-wrap: wrap; gap: 8px; margin-top: 10px; }
  .explore-list { width: 100%; }
  .explore-list summary { min-height: 39px; }
  .room-hintline { flex: 1; font-size: 11px; }
  .sound-room { min-height: 35px; }
  .object-list .hotspot { min-height: 42px; max-width: none; border-radius: 0; }
  .object-list .hotspot-label { position: static; width: auto; height: auto; clip: auto; overflow: visible; }
  .focus-dialog, .utility-dialog { width: calc(100vw - 20px); max-height: 90svh; }
  .dialog-body { padding: 17px; }
  .dialog-heading h2, .utility-dialog h2 { font-size: 26px; }
  .puzzle-prompt { font-size: 16px; }
  .evidence-stack { grid-template-columns: 1fr; gap: 7px; }
  .evidence-card { padding: 9px 11px; }
  .evidence-card p { font-size: 14px; }
  .choice-text { font-size: 13px; }
  .object-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .object-choice { min-height: 68px; }
  .match-row { grid-template-columns: 1fr; gap: 6px; }
  .match-row select { min-height: 42px; }
  .matching-header { display: none; }
  .order-card { padding: 7px; gap: 7px; }
  .order-text { font-size: 13px; }
  .move-buttons button { width: 38px; height: 38px; }
  .map-cell { min-height: 59px; padding: 4px; }
  .map-cell strong { font-size: 11px; }
  .physical-action { flex-basis: 125px; min-height: 90px; }
  .dialog-actions { position: sticky; bottom: 0; margin: 0 -17px -17px; padding: 12px 17px 17px; background: linear-gradient(0deg, rgba(17,23,37,1) 74%, rgba(17,23,37,.79)); }
  .dialog-actions > button { flex: 1; min-width: 115px; padding: 0 12px; gap: 8px; }
  .intro-reminder { margin-left: 0; }
  .ending-screen { min-height: auto; padding: 19px 17px 32px; grid-template-columns: 1fr; gap: 8px; }
  .ending-art { height: 250px; min-height: 0; }
  .ending-copy { padding: 12px 3px 2px; }
  .ending-copy h1 { font-size: 45px; }
  .ending-seal { width: 34px; height: 34px; margin: 2px 0 9px; }
  .ending-line { font-size: 16px; }
  .nox-ending { font-size: 15px; }
  .ending-actions { display: grid; grid-template-columns: 1fr; }
  .ending-actions button { width: 100%; }
  .epilogue-screen { min-height: auto; padding: 15px 12px 30px; grid-template-columns: 1fr; gap: 10px; }
  .mirror-epilogue-art { height: 200px; }
  .epilogue-panel { padding: 15px; }
  .epilogue-panel h1 { font-size: 28px; }
  .epilogue-prompt { font-size: 15px; }
  .epilogue-choice { font-size: 12px; }
}
@media (max-width: 390px) {
  .arrival-copy { padding-inline: 18px; }
  .hall-heading h1 { font-size: 27px; max-width: 230px; }
  .section-lede { max-width: 240px; font-size: 12px; }
  .room-title h1 { font-size: 24px; }
  .room-utilities { gap: 3px; }
  .utility-button { padding: 0 5px; font-size: 6px; }
  .puzzle-counter { font-size: 7px; }
  .scene-stage { min-height: 310px; }
  .bottle-board { min-height: 233px; }
  .bottle-object { width: 72px; }
  .bottle-green { left: 64%; }
  .bottle-blue { left: 28%; }
  .bottle-purple { left: 78%; }
  .hall-footnote { display: grid; grid-template-columns: 1fr 1fr; text-align: center; }
}
@media (orientation: landscape) and (max-height: 550px) {
  .room-screen { padding-top: 8px; }
  .scene-stage { aspect-ratio: 16 / 9; min-height: 260px; max-height: 54svh; }
  .arrival-screen { min-height: 500px; }
  .arrival-copy { padding-top: 100px; }
}
