:root {
  --paper: #eeeae1;
  --ink: #242a29;
  --muted: #77796f;
  --accent: #87734e;
  --rule: #242a2926;
  --sans: Arial, Helvetica, sans-serif;
  --serif: Georgia, 'Times New Roman', serif;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--paper);
  scrollbar-width: thin;
  scrollbar-color: #a69c8a var(--paper);
}
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  overscroll-behavior-y: none;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid #9c6e26;
  outline-offset: 6px;
}
button:disabled {
  cursor: wait;
}
a {
  color: inherit;
}
#viewport {
  position: fixed;
  inset: 0;
  background: var(--paper);
}
#house {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y;
}
#house.exploring {
  touch-action: none;
  cursor: grab;
}
#house.exploring:active {
  cursor: grabbing;
}
.paper-grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.15;
  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='.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.2' filter='url(%23n)'/%3E%3C/svg%3E");
}
.masthead {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 4.2%;
  pointer-events: none;
  gap: 20px;
}
.masthead > * {
  pointer-events: auto;
}
.wordmark {
  text-decoration: none;
  font-size: 25px;
  letter-spacing: 0.13em;
  font-weight: 600;
  line-height: 1;
}
.wordmark span {
  display: block;
  font-size: 8px;
  letter-spacing: 0.31em;
  margin-top: 8px;
  font-weight: 400;
}
.project-meta {
  font-size: 9px;
  letter-spacing: 0.17em;
  text-align: center;
  line-height: 1.7;
}
.project-meta span {
  display: block;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.14em;
}
.quiet-button {
  border: 0;
  background: none;
  color: inherit;
  font-size: 11px;
  padding: 10px 0;
}
.quiet-button span {
  margin-left: 12px;
}
.hero {
  position: fixed;
  z-index: 3;
  top: 25%;
  left: 7%;
  pointer-events: none;
}
.hero button {
  pointer-events: auto;
}
.eyebrow {
  font-family: var(--sans);
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: 0.21em;
  font-weight: 400;
}
.short-line {
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 10px;
}
h1 {
  font: 400 clamp(55px, 6.6vw, 108px)/0.98 var(--serif);
  letter-spacing: -0.056em;
  margin: 26px 0 23px;
}
h1 em {
  font-weight: 400;
  color: var(--accent);
}
.hero p {
  font-size: 12px;
  line-height: 1.9;
  color: #72746d;
  margin: 0;
}
.enter-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 228px;
  font-size: 10px;
  letter-spacing: 0.03em;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: none;
  padding: 18px 0;
  margin-top: 20px;
  color: var(--ink);
  text-align: left;
}
.enter-button span {
  font-size: 20px;
}
.drawing-note {
  margin-top: 48px;
  font-size: 8px;
  letter-spacing: 0.15em;
  line-height: 1.9;
  color: var(--muted);
}
.drawing-note span {
  display: block;
  font-size: 7px;
  letter-spacing: 0.11em;
}
#scroll-track {
  height: 1050vh;
  pointer-events: none;
}
#labels {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.room-label {
  position: absolute;
  text-align: center;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  font-size: 8px;
  letter-spacing: 0.1em;
  line-height: 1.65;
  color: #333a36;
}
.room-label small {
  display: block;
  font-size: 7px;
  letter-spacing: 0.03em;
  color: #72786f;
}
.room-label.dim {
  font-size: 8px;
  color: #72786f;
  background: var(--paper);
  padding: 0 6px;
}
.room-label.subtle {
  font-size: 7px;
  color: #95958b;
}
.chapter {
  position: fixed;
  z-index: 4;
  left: 6%;
  bottom: 130px;
  display: flex;
  gap: 22px;
  opacity: 0;
  pointer-events: none;
  max-width: 430px;
  background: linear-gradient(90deg, #eeeae1f2, #eeeae1cc 85%, #eeeae100);
  padding: 18px 32px 18px 0;
}
.chapter > span {
  font: italic 36px var(--serif);
  color: var(--accent);
  border-top: 1px solid var(--accent);
  padding-top: 12px;
}
.chapter h2 {
  font: 400 31px/1.1 var(--serif);
  letter-spacing: -0.035em;
  margin: 9px 0 10px;
}
.chapter p {
  font-size: 11px;
  color: #696f68;
  line-height: 1.8;
  margin: 0;
}
.arrival {
  position: fixed;
  z-index: 5;
  top: 150px;
  left: 5%;
  width: 340px;
  padding: 26px;
  background: #f0ece3ec;
  box-shadow: 0 5px 35px #171b1920;
  opacity: 0;
  pointer-events: none;
}
.arrival h2 {
  font: 400 36px/1.06 var(--serif);
  letter-spacing: -0.04em;
  margin: 16px 0;
}
.arrival p {
  font-size: 11px;
  color: #6a6c64;
  line-height: 1.8;
}
.arrival-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.dark-button {
  border: 1px solid #29312d;
  background: #29312d;
  color: #f2eee5;
  padding: 13px 16px;
  font-size: 10px;
  letter-spacing: 0.02em;
}
.dark-button span {
  margin-left: 15px;
}
.scope {
  display: block;
  font-size: 8px;
  line-height: 1.6;
  letter-spacing: 0.035em;
  color: #88887b;
  margin-top: 22px;
}
.bottom-bar {
  position: fixed;
  z-index: 10;
  bottom: 0;
  left: 0;
  right: 0;
  height: 83px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4.2%;
  background: linear-gradient(0deg, #eeeae1fa, #eeeae1e6);
  border-top: 1px solid var(--rule);
}
.scroll-cue {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 8px;
  letter-spacing: 0.14em;
}
.scroll-cue > span:first-child {
  font-size: 19px;
  color: var(--accent);
}
.steps {
  display: flex;
  align-items: center;
  gap: 14px;
}
.steps button {
  border: 0;
  background: none;
  color: #929389;
  padding: 12px 0;
  font-size: 10px;
}
.steps button span {
  font-size: 7px;
  margin-right: 8px;
}
.steps button.active {
  color: var(--ink);
}
.steps i {
  display: block;
  width: 25px;
  height: 1px;
  background: #b5b6ab;
}
.sheet-number {
  font-size: 8px;
  letter-spacing: 0.12em;
  color: #a0a094;
}
.sheet-number span {
  color: var(--ink);
  font-size: 13px;
}
.progress {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
}
.progress span {
  display: block;
  height: 2px;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
.help-panel {
  position: fixed;
  right: 4%;
  top: 95px;
  z-index: 20;
  width: min(370px, 92vw);
  background: #f5f1e8;
  padding: 32px;
  box-shadow: 0 10px 65px #1c241d30;
  border: 1px solid #b1ab9c60;
}
.help-panel h2 {
  font: 32px var(--serif);
  letter-spacing: -0.03em;
}
.help-panel p {
  font-size: 12px;
  line-height: 1.8;
  color: #676d65;
}
.help-panel a {
  display: block;
  margin-top: 20px;
  font-size: 10px;
  text-underline-offset: 5px;
}
#close-help {
  position: absolute;
  right: 12px;
  top: 8px;
  background: none;
  border: 0;
  font-size: 25px;
  color: var(--muted);
}
.loading {
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
  font-size: 9px;
  letter-spacing: 0.2em;
  transition: opacity 0.6s;
}
.loading-mark {
  font: italic 90px var(--serif);
  letter-spacing: -0.1em;
}
.loading small {
  font-size: 9px;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.loading.done {
  opacity: 0;
  pointer-events: none;
}
.unsupported {
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 30px;
  text-align: center;
}
.explore-hud {
  position: fixed;
  z-index: 12;
  top: 110px;
  left: 5%;
  right: 5%;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  pointer-events: none;
}
.explore-hud:not([hidden]) {
  display: flex;
}
.explore-hud > * {
  pointer-events: auto;
}
.explore-hud > div {
  background: #eeeae1e6;
  padding: 16px;
}
.explore-hud strong {
  display: block;
  font: 24px var(--serif);
  font-weight: 400;
}
.explore-hud span {
  display: block;
  font-size: 10px;
  color: #76796f;
  margin-top: 8px;
}
#touch-controls {
  position: fixed;
  right: 6%;
  bottom: 110px;
  z-index: 15;
  text-align: center;
  user-select: none;
}
#touch-controls button {
  height: 44px;
  width: 44px;
  background: #eeeae1d9;
  border: 1px solid #a6aa9e80;
  color: var(--ink);
  font-size: 19px;
  touch-action: none;
  margin: 2px;
}
@media (min-width: 1500px) {
  .hero {
    left: 8%;
  }
  .room-label {
    font-size: 9px;
  }
  .room-label small {
    font-size: 8px;
  }
}
@media (max-height: 760px) and (min-width: 701px) {
  .hero {
    top: 21%;
  }
  h1 {
    font-size: 70px;
    margin: 18px 0;
  }
  .drawing-note {
    margin-top: 25px;
  }
  .arrival {
    top: 115px;
  }
  .masthead {
    padding-top: 23px;
  }
}
@media (max-width: 700px) {
  .masthead {
    padding: 23px 6%;
    align-items: flex-start;
  }
  .wordmark {
    font-size: 20px;
  }
  .wordmark span {
    font-size: 6px;
  }
  .project-meta {
    display: none;
  }
  .quiet-button {
    font-size: 10px;
  }
  .hero {
    top: 15%;
    left: 8%;
    right: 8%;
  }
  .hero .eyebrow {
    font-size: 8px;
  }
  h1 {
    font-size: clamp(46px, 13vw, 68px);
    margin: 17px 0 13px;
    line-height: 0.96;
  }
  h1 br:nth-of-type(2) {
    display: none;
  }
  .hero p {
    font-size: 10px;
    line-height: 1.6;
  }
  .enter-button {
    margin-top: 8px;
    width: 188px;
    font-size: 9px;
    padding: 10px 0;
  }
  .drawing-note {
    display: none;
  }
  .bottom-bar {
    height: 73px;
    padding: 0 6%;
  }
  .scroll-cue {
    display: none;
  }
  .steps {
    gap: 11px;
  }
  .steps button {
    font-size: 9px;
  }
  .steps i {
    width: 17px;
  }
  .sheet-number {
    font-size: 6px;
  }
  .sheet-number span {
    font-size: 11px;
  }
  .room-label {
    font-size: 6px;
    letter-spacing: 0.07em;
  }
  .room-label small {
    font-size: 5px;
  }
  .room-label.dim {
    font-size: 6px;
  }
  .room-label.subtle {
    font-size: 5px;
  }
  .chapter {
    left: 7%;
    bottom: 100px;
    max-width: 88%;
    gap: 14px;
    padding-right: 20px;
  }
  .chapter h2 {
    font-size: 28px;
  }
  .chapter p {
    font-size: 10px;
  }
  .chapter > span {
    font-size: 28px;
  }
  .arrival {
    top: 100px;
    left: 6%;
    width: 88%;
    padding: 20px;
  }
  .arrival h2 {
    font-size: 31px;
    margin: 10px 0;
  }
  .arrival p {
    font-size: 10px;
  }
  .scope {
    margin-top: 12px;
    font-size: 7px;
  }
  .arrival-actions {
    gap: 16px;
  }
  .dark-button {
    font-size: 9px;
    padding: 12px;
  }
  .help-panel {
    top: 80px;
    right: 4%;
    padding: 27px;
  }
  .explore-hud {
    top: 90px;
    left: 5%;
    right: 5%;
    align-items: flex-start;
  }
  .explore-hud strong {
    font-size: 20px;
  }
  .explore-hud span {
    font-size: 9px;
    max-width: 175px;
    line-height: 1.5;
  }
  .explore-hud > div {
    padding: 12px;
  }
  .explore-hud .dark-button {
    font-size: 8px;
    max-width: 100px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .loading {
    transition: none;
  }
}
[hidden] {
  display: none !important;
}

/* Full-stage walking workspace; the room remains the primary view. */
#direct-explore {
  margin-top: 24px;
  padding: 16px 22px;
  font-size: 12px;
}
body.walking {
  overflow: hidden;
}
.walking .bottom-bar,
.walking .chapter,
.walking .hero {
  display: none;
}
.walking .masthead {
  color: #fff;
  background: linear-gradient(#121817a8, transparent);
  padding-top: 24px;
  padding-bottom: 30px;
}
.walking .project-meta span {
  color: #ffffffb0;
}
.walking .quiet-button {
  color: inherit;
}
.explore-hud {
  top: 100px;
  left: 32px;
  right: 32px;
}
.explore-hud > div {
  background: #18201de8;
  color: #fff;
  border: 1px solid #ffffff26;
  border-radius: 3px;
  backdrop-filter: blur(12px);
  padding: 14px 18px;
}
.explore-hud strong {
  font-size: 25px;
  margin: 5px 0;
}
.explore-hud span {
  color: #d4d5cb;
  margin: 0;
  line-height: 1.6;
}
.explore-hud span.eyebrow {
  font-size: 8px;
  color: #cbb588;
}
.explore-hud .dark-button {
  background: #18201de8;
  border-color: #ffffff30;
}
#walk-toolbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 16;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #18201df2;
  color: #eeeae1;
  padding: 18px 24px 12px;
  border-top: 1px solid #ffffff20;
  backdrop-filter: blur(12px);
}
#walk-toolbar button {
  border: 1px solid #ffffff30;
  background: transparent;
  color: inherit;
  border-radius: 3px;
  padding: 12px 16px;
  font-size: 11px;
  min-height: 42px;
}
#walk-toolbar button:hover,
#walk-toolbar button[aria-expanded='true'] {
  background: #eeeae1;
  color: #242a29;
}
#walk-toolbar button span {
  margin-left: 20px;
  color: #bda77b;
}
#walk-toolbar p {
  width: 100%;
  margin: 0;
  text-align: center;
  font-size: 10px;
  color: #c8cabf;
  line-height: 1.5;
}
#map-panel {
  position: fixed;
  z-index: 18;
  right: 32px;
  top: 165px;
  bottom: 122px;
  width: 350px;
  overflow-y: auto;
  background: #f2eee5f7;
  padding: 20px;
  border: 1px solid #fff7;
  box-shadow: 0 12px 60px #0003;
  border-radius: 4px;
  backdrop-filter: blur(15px);
  overscroll-behavior: contain;
}
.map-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.map-title h2 {
  font: 28px var(--serif);
  letter-spacing: -0.04em;
  margin: 7px 0 12px;
}
.map-title button {
  background: none;
  border: 0;
  font-size: 26px;
  padding: 0 5px;
}
#floor-map {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  background: #e9e5db;
  border: 1px solid #c9c5ba;
  cursor: crosshair;
}
.map-caption {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  color: #77796f;
  margin: 9px 0 18px;
  line-height: 1.5;
}
.map-caption span {
  color: #4e6053;
}
#room-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
#room-list button {
  border: 1px solid #b7b5a85c;
  background: #f9f6ef;
  color: #343a33;
  font-size: 11px;
  text-align: left;
  padding: 11px 8px;
  border-radius: 2px;
  min-height: 42px;
}
#room-list button:hover,
#room-list button.active {
  background: #293b32;
  color: #fff;
}
#room-list small {
  display: inline-block;
  font-size: 8px;
  opacity: 0.6;
  width: 19px;
}
.map-note {
  font-size: 10px;
  line-height: 1.6;
  color: #75786b;
  margin-bottom: 0;
}
#touch-controls {
  bottom: 128px;
  right: 25px;
}
#touch-controls button {
  height: 48px;
  width: 48px;
  border-radius: 4px;
  background: #f0ece3e8;
}
@media (max-width: 700px) {
  #direct-explore {
    margin-top: 14px;
    padding: 13px 18px;
    font-size: 11px;
  }
  .hero {
    top: 13%;
  }
  .hero .enter-button {
    font-size: 9px;
  }
  .walking .masthead {
    padding: 20px 5% 28px;
  }
  .explore-hud {
    top: 82px;
    left: 16px;
    right: 16px;
    gap: 10px;
  }
  .explore-hud > div {
    padding: 10px 13px;
  }
  .explore-hud strong {
    font-size: 23px;
  }
  .explore-hud #walk-help {
    max-width: 190px;
    font-size: 9px;
  }
  .explore-hud .dark-button {
    max-width: 82px;
    font-size: 9px;
    padding: 11px 8px;
    line-height: 1.5;
  }
  #walk-toolbar {
    gap: 7px;
    padding: 12px 12px max(10px, env(safe-area-inset-bottom));
  }
  #walk-toolbar button {
    padding: 10px;
    font-size: 10px;
    min-height: 40px;
  }
  #walk-toolbar button span {
    margin-left: 7px;
  }
  #quality,
  #home-position {
    font-size: 9px !important;
    padding: 7px 10px !important;
    min-height: 30px !important;
  }
  #walk-toolbar p {
    font-size: 9px;
  }
  #map-panel {
    left: 16px;
    right: 16px;
    top: 166px;
    bottom: 158px;
    width: auto;
    padding: 16px;
  }
  .map-title h2 {
    font-size: 24px;
  }
  #room-list button {
    font-size: 10px;
    padding: 10px 7px;
  }
  #floor-map {
    max-height: 190px;
    object-fit: contain;
  }
  #touch-controls {
    bottom: 168px;
    right: 18px;
  }
  .help-panel {
    max-height: calc(100dvh - 110px);
    overflow-y: auto;
  }
  .help-panel p {
    font-size: 11px;
  }
}
@media (max-height: 600px) {
  .explore-hud {
    top: 76px;
  }
  .explore-hud #walk-help {
    display: none;
  }
  #map-panel {
    top: 80px;
    bottom: 115px;
  }
  #walk-toolbar {
    padding: 7px;
    gap: 6px;
  }
  .walking .masthead {
    padding-top: 12px;
  }
  .map-title h2 {
    font-size: 23px;
  }
}

/* Scroll-led presentation. Controls stay secondary to the house. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.hero #enter {
  display: block;
  margin-top: 24px;
  padding: 17px 23px;
  font-size: 12px;
}
.hero #direct-explore {
  display: flex;
  margin-top: 8px;
  padding: 12px 0;
  width: 230px;
  font-size: 10px;
  border-bottom-color: #242a2940;
}
button:disabled {
  cursor: default;
  opacity: 0.3;
}
.story-navigation {
  display: flex;
  align-items: center;
  gap: 8px;
}
.story-navigation button {
  border: 1px solid #242a2924;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.story-navigation select {
  appearance: none;
  border: 0;
  border-bottom: 1px solid #242a2933;
  background: transparent;
  color: var(--ink);
  font: 11px var(--sans);
  width: 190px;
  padding: 13px 20px 13px 8px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23242a29'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 5px center;
}
.story-navigation select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
#story-progress {
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  width: 100%;
  height: 22px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: ew-resize;
  accent-color: var(--accent);
}
#story-progress::-webkit-slider-runnable-track {
  height: 2px;
  background: transparent;
}
#story-progress::-webkit-slider-thumb {
  appearance: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: -3.5px;
  opacity: 0;
  transition: opacity 0.15s;
}
#story-progress:hover::-webkit-slider-thumb,
#story-progress:focus-visible::-webkit-slider-thumb {
  opacity: 1;
}
.story-inside .masthead {
  color: #fff;
  background: linear-gradient(#101715b0, transparent);
}
.story-inside .project-meta span {
  color: #ffffffb0;
}
.story-inside .chapter {
  background: #17201de0;
  border: 1px solid #ffffff20;
  color: #f3eee4;
  left: 4.2%;
  bottom: 110px;
  max-width: 365px;
  padding: 17px 21px;
  gap: 16px;
  border-radius: 3px;
  backdrop-filter: blur(10px);
}
.story-inside .chapter h2 {
  font-size: 27px;
}
.story-inside .chapter p {
  color: #d1d1c6;
  font-size: 11px;
  line-height: 1.65;
}
.story-inside .chapter .eyebrow,
.story-inside .chapter > span {
  color: #cfb88c;
}
.story-inside .chapter > span {
  font-size: 27px;
  border-top-color: #cfb88c;
}
.story-inside .bottom-bar {
  background: #eeeae1f5;
}
.arrival {
  transition: opacity 0.3s;
}
#chapter-transition {
  position: fixed;
  inset: 0;
  background: #e9e5dc;
  opacity: 0;
  pointer-events: none;
  z-index: 30;
  transition: opacity 0.18s;
}
#chapter-transition.active {
  opacity: 1;
}
@media (max-width: 1000px) {
  .bottom-bar {
    gap: 12px;
  }
  .scroll-cue {
    font-size: 7px;
    max-width: 125px;
    line-height: 1.6;
  }
  .story-navigation select {
    width: 170px;
  }
}
@media (max-width: 700px) {
  .hero #enter {
    margin-top: 18px;
    font-size: 11px;
    padding: 15px 18px;
  }
  .hero #direct-explore {
    width: 205px;
    font-size: 10px;
    padding: 10px 0;
  }
  .bottom-bar {
    height: 90px;
    padding: 0 16px;
    gap: 7px;
    flex-wrap: wrap;
    justify-content: space-between;
    align-content: center;
  }
  .story-navigation {
    gap: 6px;
  }
  .story-navigation select {
    width: 160px;
    font-size: 10px;
  }
  .story-navigation button {
    width: 33px;
    height: 33px;
    font-size: 16px;
  }
  #explore-here {
    font-size: 9px;
    max-width: 83px;
    text-align: right;
  }
  .sheet-number {
    display: none;
  }
  .story-inside .chapter {
    left: 16px;
    right: 16px;
    bottom: 110px;
    max-width: none;
    padding: 12px 15px;
    gap: 12px;
    backdrop-filter: blur(6px);
  }
  .story-inside .chapter h2 {
    font-size: 23px;
    margin: 5px 0 7px;
  }
  .story-inside .chapter p {
    font-size: 10px;
    line-height: 1.5;
  }
  .story-inside .chapter .eyebrow {
    font-size: 7px;
  }
  .story-inside .chapter > span {
    font-size: 23px;
  }
  .arrival {
    top: 100px;
  }
  .explore-hud #leave-explore {
    max-width: 112px;
  }
}
@media (max-height: 600px) {
  .story-inside .chapter {
    bottom: 100px;
    padding: 10px 15px;
    max-width: 310px;
  }
  .story-inside .chapter p {
    display: none;
  }
  .story-inside .chapter h2 {
    font-size: 23px;
  }
  .hero #enter {
    margin-top: 10px;
    padding: 12px 18px;
  }
  .hero #direct-explore {
    margin-top: 0;
  }
  .drawing-note {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  #chapter-transition,
  .arrival {
    transition: none;
  }
}

/* Refined visit: the image is the canvas, controls are quiet and spatially anchored. */
.clean-view .masthead,
.clean-view #chapter,
.clean-view #mini-map-button,
.clean-view #scene-scrim,
.clean-view .bottom-bar,
.clean-view #arrival,
.clean-view #map-panel,
.clean-view #look-hint {
  visibility: hidden !important;
}
.clean-view #view-tools button:not(#clean-view) {
  display: none;
}
@media (max-width: 700px) {
  #view-tools {
    flex-wrap: wrap;
  }
  #view-tools #clean-view {
    position: fixed;
    right: 16px;
    bottom: 96px;
    flex: none;
  }
  body.clean-view #view-tools #clean-view {
    bottom: 20px;
  }
}
button,
a,
select {
  touch-action: manipulation;
}
#scene-scrim {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(0deg, #121713c9, transparent 34%);
  transition: opacity 0.3s;
}
.story-inside #scene-scrim {
  opacity: 1;
}
.walking #scene-scrim {
  opacity: 0;
}
.story-inside .chapter {
  background: none;
  border: 0;
  backdrop-filter: none;
  border-radius: 0;
  padding: 0;
  bottom: 116px;
  max-width: 450px;
  gap: 20px;
  text-shadow: 0 1px 14px #0006;
}
.story-inside .chapter h2 {
  font-size: 48px;
  margin: 8px 0 10px;
  line-height: 1;
}
.story-inside .chapter p {
  max-width: 360px;
  font-size: 12px;
  color: #f0eee7;
  line-height: 1.65;
}
.story-inside .chapter > span {
  font-size: 28px;
  margin-top: 4px;
}
.story-inside .chapter .eyebrow {
  font-size: 8px;
  color: #eee2c8;
}
.story-inside .bottom-bar {
  background: #181c19e8;
  color: #eeeae1;
  border-color: #ffffff24;
  backdrop-filter: blur(16px);
  height: 76px;
}
.story-inside .story-navigation button,
.story-inside .story-navigation select {
  color: #eeeae1;
  border-color: #ffffff40;
}
.story-inside .story-navigation select {
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23eeeae1'/%3E%3C/svg%3E");
}
.story-navigation select option {
  background: #eeeae1;
  color: #242a29;
}
.story-inside .sheet-number span {
  color: #eeeae1;
}
.story-inside .progress span {
  background: #d0b184;
}
.story-inside .scroll-cue {
  font-size: 9px;
  letter-spacing: 0.08em;
}
#view-tools {
  position: fixed;
  z-index: 11;
  right: 4.2%;
  top: 105px;
  display: flex;
  gap: 6px;
}
#view-tools button {
  border: 1px solid #ffffff35;
  color: #f7f1e7;
  background: #1a201dd6;
  border-radius: 4px;
  padding: 10px 13px;
  font-size: 10px;
  min-height: 38px;
  backdrop-filter: blur(12px);
}
#view-tools button span {
  margin-left: 10px;
  color: #d0b184;
  font-size: 14px;
}
#view-tools button:hover,
#view-tools button[aria-pressed='true']:first-child {
  background: #eee9dd;
  color: #242a29;
}
#mini-map-button {
  position: fixed;
  z-index: 9;
  top: 157px;
  right: 4.2%;
  width: 210px;
  border: 1px solid #ffffff38;
  border-radius: 5px;
  background: #f2eee5eb;
  padding: 13px;
  text-align: left;
  color: #343a33;
  box-shadow: 0 5px 30px #0001;
  backdrop-filter: blur(12px);
}
.mini-heading {
  display: flex;
  justify-content: space-between;
  letter-spacing: 0.14em;
  font-size: 8px;
  align-items: center;
}
.mini-heading span {
  font-size: 15px;
}
#mini-map {
  display: block;
  width: 100%;
  height: auto;
  margin: 10px 0;
  opacity: 0.9;
}
#mini-room {
  font-size: 10px;
}
#mini-map-button:hover {
  background: #fffaf1;
}
#mini-map-button[aria-expanded='true'] {
  visibility: hidden;
}
#look-hint {
  position: fixed;
  left: 50%;
  bottom: 93px;
  transform: translateX(-50%);
  z-index: 12;
  background: #19211dec;
  color: #eee9df;
  padding: 10px 15px;
  border: 1px solid #fff3;
  border-radius: 30px;
  font-size: 11px;
  pointer-events: none;
}
#house.looking {
  touch-action: none;
  cursor: grab;
}
.story-inside #house {
  cursor: grab;
}
.story-inside #house:active {
  cursor: grabbing;
}
.walking #view-tools,
.walking #mini-map-button,
.walking #look-hint {
  display: none !important;
}
.story-inside:not(.walking) #map-panel {
  top: 157px;
  bottom: 96px;
  right: 4.2%;
  width: 360px;
}
.arrival {
  top: auto;
  bottom: 114px;
  left: 4.2%;
  width: 365px;
  background: #f2eee5f2;
  backdrop-filter: blur(14px);
}
.story-inside .masthead {
  background: linear-gradient(#10171580, transparent);
  padding-bottom: 22px;
}
@media (max-width: 1000px) and (min-width: 701px) {
  #mini-map-button {
    width: 170px;
  }
  .story-inside .chapter h2 {
    font-size: 40px;
  }
  .scroll-cue {
    max-width: 150px;
  }
}
@media (max-width: 700px) {
  #view-tools {
    left: 16px;
    right: 16px;
    top: 87px;
    gap: 5px;
  }
  #view-tools button {
    font-size: 9px;
    padding: 9px 10px;
    flex: 1;
  }
  #view-tools button span {
    margin-left: 4px;
  }
  #mini-map-button {
    top: 139px;
    right: 16px;
    width: 115px;
    padding: 10px;
  }
  .mini-heading {
    font-size: 7px;
  }
  #mini-map {
    margin: 6px 0;
  }
  #mini-room {
    font-size: 9px;
  }
  .story-inside .chapter {
    bottom: 111px;
    left: 22px;
    right: 22px;
    gap: 12px;
    padding: 0;
    max-width: none;
    backdrop-filter: none;
  }
  .story-inside .chapter h2 {
    font-size: 35px;
    margin: 6px 0 9px;
  }
  .story-inside .chapter p {
    font-size: 11px;
    max-width: 285px;
  }
  .story-inside .chapter > span {
    font-size: 24px;
  }
  .story-inside .chapter .eyebrow {
    font-size: 7px;
  }
  .story-inside .bottom-bar {
    height: 86px;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .story-inside .scroll-cue {
    display: none;
  }
  .story-inside:not(.walking) #map-panel {
    top: 139px;
    left: 16px;
    right: 16px;
    bottom: 106px;
    width: auto;
  }
  #look-hint {
    bottom: auto;
    top: 131px;
    left: 16px;
    right: 145px;
    transform: none;
    border-radius: 4px;
    font-size: 10px;
    line-height: 1.5;
    padding: 10px;
  }
  .arrival {
    bottom: 110px;
    left: 16px;
    right: 16px;
    width: auto;
    top: auto;
  }
  .arrival h2 {
    font-size: 31px;
  }
  #scene-scrim {
    background: linear-gradient(0deg, #121713da, transparent 42%);
  }
}
@media (max-height: 650px) {
  #view-tools {
    top: 78px;
  }
  #mini-map-button {
    top: 129px;
    width: 140px;
  }
  #mini-map {
    max-height: 75px;
    object-fit: contain;
  }
  .story-inside .chapter h2 {
    font-size: 32px;
  }
  .story-inside .chapter p {
    display: none;
  }
  .story-inside .chapter {
    bottom: 98px;
  }
  .arrival {
    bottom: 98px;
    padding: 16px;
  }
  .arrival h2 {
    font-size: 28px;
  }
  .arrival .scope {
    display: none;
  }
}
