@font-face {
  font-family: "Jiaozi WenKai";
  src: url("fonts/jiaozi-wenkai.woff2?v=20261010b") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  --ink: #28231d;
  --paper: #f4e8c9;
  --paper-light: #fff5dc;
  --red: #a13b28;
  --red-dark: #772918;
  --blue: #41504a;
  --gold: #c9a35f;
  --muted: #6c5940;
  --line: #937955;
  --serif: "Jiaozi WenKai", "STKaiti", "KaiTi", "Kaiti SC", "Noto Serif CJK SC", "Songti SC", serif;
  --body: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; min-height: 100%; }
body { color: var(--ink); background: #3c3024; font: 18px/1.55 var(--body); }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
a { color: var(--red-dark); text-underline-offset: 5px; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--red); outline-offset: 5px; }
button svg { pointer-events: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; }
[hidden], .hidden { display: none !important; }
main { min-height: 100svh; outline: none; }
.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; }
.skip-link { position: fixed; top: -100px; left: 20px; padding: 10px 16px; background: var(--paper-light); z-index: 100; }
.skip-link:focus { top: 12px; }
.loading-message, .noscript { padding: 15vh 8vw; color: var(--paper); font: 28px/1.7 var(--serif); }
.site-header, .site-footer { display: none; }

/* The world fills the window; all the interface belongs to the same stage. */
.game-screen, .title-screen, .prologue-screen, .ending-screen {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100svh;
  min-height: 590px;
  overflow: hidden;
  background: #afa083;
}
.world-bg { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center 51%; }
.world-shade { position: absolute; inset: 0; z-index: -2; pointer-events: none; background: linear-gradient(180deg, #29211532 0%, transparent 26%, transparent 65%, #2f281e5c 100%); box-shadow: inset 0 0 100px #3c281b22; }
.game-hud { position: absolute; z-index: 12; top: max(27px, env(safe-area-inset-top)); left: 40px; right: 34px; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; pointer-events: none; }
.chapter-heading { padding: 13px 25px 15px 20px; min-width: 260px; color: var(--ink); border-left: 4px solid var(--red); background: linear-gradient(90deg, #fff1d5f5 0%, #fff1d5e3 77%, #fff1d500 100%); }
.chapter-heading .era { font: 17px/1.4 var(--body); color: #705a3f; margin-bottom: 5px; }
.chapter-heading h1 { font-size: 32px; line-height: 1.2; letter-spacing: 2px; text-wrap: balance; }
.game-tools, .title-tools { display: flex; align-items: center; gap: 10px; pointer-events: auto; }
.icon-button { min-width: 48px; min-height: 48px; padding: 8px 13px; border: 1px solid #6f5635aa; color: #473522; background: #f9edcfe8; box-shadow: 2px 3px 0 #49371d25, inset 0 0 0 3px #fff4d955; font: 18px/1.2 var(--serif); transition: background .15s, transform .15s; }
.icon-button:hover { background: #fff5dd; transform: translateY(-2px); }
.sound-button[aria-pressed="true"] { color: #fff1d1; border-color: #76301d; background: var(--red); }
.chapter-track { display: flex; align-items: center; gap: 7px; margin-top: 11px; font: 16px/1 var(--serif); color: #6e5538; }
.chapter-track i { width: 19px; height: 3px; display: block; background: #b39973; }
.chapter-track i.active { width: 35px; background: var(--red); }
.chapter-track span.active { color: var(--red-dark); }

/* Full-size sprites face one another; the JS sets --flip per original sprite. */
.actors { position: absolute; inset: 0; pointer-events: none; }
.actor { position: absolute; bottom: 18%; width: 26%; height: 67%; max-width: 410px; margin: 0; transition: filter .25s, opacity .25s; }
.actor-left { left: 10%; }
.actor-right { right: 10%; }
.actor::after { content: ""; position: absolute; z-index: -1; left: 15%; right: 15%; bottom: .5%; height: 3%; border-radius: 50%; background: #342b2580; filter: blur(8px); transform: scaleX(1.1); }
.actor .character { width: 100%; height: 100%; max-width: none; object-fit: contain; object-position: center bottom; transform: scaleX(var(--flip, 1)); transform-origin: center bottom; filter: drop-shadow(3px 5px 2px #372c2630); transition: filter .25s; }
.actor.is-speaking .character { filter: drop-shadow(0 0 2px #fff0b99c) drop-shadow(3px 6px 3px #372c263d); }
.actor.is-listening .character { filter: brightness(.94) saturate(.92) drop-shadow(3px 5px 2px #372c2630); }
.actor figcaption { display: none; }

/* The choices are things on the ground, not menu cards. */
.scene-objects { position: absolute; inset: 0; pointer-events: none; z-index: 7; }
.scene-object { position: absolute; bottom: 24%; width: clamp(130px, 12vw, 190px); min-height: 145px; padding: 0 5px 0; border: 0; background: transparent; transform: translateX(-50%); pointer-events: auto; text-align: center; filter: drop-shadow(2px 6px 3px #3227193b); transition: transform .18s, filter .18s; }
.object-0 { left: 44%; }
.object-1 { left: 59%; }
.scene-object::before { content: ""; position: absolute; z-index: -1; left: 5%; right: 5%; bottom: 40px; height: 17%; background: radial-gradient(ellipse, #fff7c6ab, #fff7c600 70%); transform: scaleX(1.45); opacity: 0; transition: opacity .2s; }
.scene-object .object-art { width: 100%; height: clamp(100px, 13vh, 160px); object-fit: contain; object-position: center bottom; transition: transform .2s; }
.object-label { display: inline-block; max-width: 100%; position: relative; padding: 7px 12px 8px; margin-top: 8px; background: #fff0d6f2; color: #49331f; border: 1px solid #86613c9c; box-shadow: 2px 2px 0 #3e2c2021; font: 20px/1.25 var(--serif); white-space: nowrap; }
.hotspot-dot { position: absolute; top: -12px; left: calc(50% - 6px); display: block; width: 12px; height: 12px; background: var(--paper-light); border: 2px solid var(--red); border-radius: 50%; box-shadow: 0 0 0 5px #fff1c764, 0 0 20px #fff1c7a8; }
.scene-object:hover:not(:disabled), .scene-object:focus-visible { transform: translateX(-50%) translateY(-7px); filter: drop-shadow(2px 9px 4px #32271945); }
.scene-object:hover::before, .scene-object:focus-visible::before, .scene-object.is-selected::before { opacity: 1; }
.scene-object.is-selected .object-label, .scene-object[aria-pressed="true"] .object-label { color: var(--paper-light); border-color: #7c2c1b; background: var(--red); }
.scene-object:disabled { opacity: 1; pointer-events: none; }
.scene-object:disabled .hotspot-dot { display: none; }
.game-screen[data-phase="talk"] .scene-object .object-label, .game-screen[data-phase="result"] .scene-object .object-label { visibility: hidden; }
.game-screen[data-phase="talk"] .scene-object .hotspot-dot, .game-screen[data-phase="result"] .scene-object .hotspot-dot { display: none; }
.game-screen[data-phase="explore"] .scene-object { animation: invite-object .65s ease-out both; }
.game-screen[data-phase="explore"] .scene-object.object-1 { animation-delay: .14s; }
.pocket-note { position: absolute; bottom: 22%; z-index: 8; width: clamp(70px, 6.5vw, 104px); padding: 0; border: 0; background: none; text-align: center; transform: rotate(-8deg); filter: drop-shadow(3px 6px 3px #3b2c2360); transition: transform .2s; }
.pocket-note.note-left { left: 19%; }
.pocket-note.note-right { right: 19%; transform: rotate(7deg); }
.pocket-note:hover { transform: rotate(0) translateY(-5px); }
.ticket-thumb { width: 100%; height: auto; }
.pocket-note span { position: absolute; top: 47%; left: 12%; right: 12%; padding: 2px; color: #6e271b; background: #f8ecd1ed; font: 18px/1.2 var(--serif); white-space: nowrap; }
.settle-caption { position: absolute; bottom: 22%; left: 50%; z-index: 9; transform: translateX(-50%); padding: 8px 16px; font: 21px/1.4 var(--serif); color: var(--paper-light); background: #33271edb; box-shadow: 0 4px 12px #241d1b33; }

/* Dialogue is the reading surface: generous type, one voice at a time. */
.speech-wrap { position: absolute; z-index: 15; width: min(1000px, calc(100% - 100px)); bottom: max(24px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); }
.paper-panel { position: relative; color: var(--ink); background: linear-gradient(105deg, #fff3dceF, #f3e5c5f5 72%, #eaddbafa); border: 1px solid #b99b63; box-shadow: 0 8px 24px #2d231c33, inset 0 0 0 4px #fcf0d15e, inset 0 0 0 5px #91744037; }
.dialogue-bar { padding: 24px 34px 19px; min-height: 169px; }
.speaker-tag { position: absolute; top: -21px; left: 28px; display: inline-block; padding: 7px 21px 8px; min-width: 100px; text-align: center; color: #fff1d1; background: var(--blue); border: 1px solid #263a2b; box-shadow: 2px 3px 0 #2b281e32; font: 22px/1.15 var(--serif); }
.speech-text { max-width: 37em; font: 27px/1.65 var(--serif); letter-spacing: .015em; text-wrap: pretty; }
.dialogue-actions { display: flex; align-items: center; justify-content: flex-end; gap: 25px; margin-top: 11px; }
.advance-button { position: relative; min-height: 46px; padding: 8px 30px 8px 18px; color: #75321c; background: transparent; border: 0; font: 22px/1.3 var(--serif); }
.advance-button::after { content: ""; position: absolute; right: 4px; top: calc(50% - 6px); border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 8px solid var(--red); }
.advance-button:hover { color: var(--red); background: #d9bf8745; }
.text-button { min-height: 44px; padding: 7px 3px; color: #655038; background: transparent; border: 0; font: 18px/1.4 var(--serif); text-decoration: underline; text-decoration-color: #806c4960; text-underline-offset: 5px; }
.text-button:hover { color: var(--red-dark); text-decoration-color: var(--red); }
.choice-question h2 { font: 27px/1.4 var(--serif); margin-bottom: 8px; }
.choice-question p { color: #705735; font-size: 18px; line-height: 1.6; }
.choice-tradeoff { margin-top: 6px; color: #73522f; font: 18px/1.5 var(--body); }
.seal-button { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 13px 27px; border: 1px solid #762614; background: var(--red); color: #fff0d1; box-shadow: inset 0 0 0 3px var(--red), inset 0 0 0 4px #edcc987d, 3px 4px 0 #432b162e; font: 24px/1.25 var(--serif); letter-spacing: 2px; transition: background .15s, transform .15s, box-shadow .15s; }
.seal-button:hover { background: #8a301e; transform: translateY(-2px); }
.seal-button:active { transform: translate(1px, 2px); box-shadow: inset 0 0 0 3px var(--red), inset 0 0 0 4px #edcc987d, 1px 1px 0 #432b162e; }
.seal-button:disabled { background: #8f7b61; border-color: #7f6a51; color: #f2e6cd; box-shadow: inset 0 0 0 3px #8f7b61, inset 0 0 0 4px #e4d4b34d; }
.outcome-lines { display: flex; gap: 24px; margin-top: 8px; }
.outcome-lines p { font: 18px/1.5 var(--body); color: #645035; }
.outcome-lines strong { color: #344a3d; font-weight: 600; }
.flight-note { position: fixed; z-index: 40; pointer-events: none; transform-origin: center; filter: drop-shadow(5px 10px 5px #31231955); }
.flight-note img { width: 100%; height: 100%; object-fit: contain; }
.flight-tag { position: absolute; left: 15%; right: 15%; top: 50%; text-align: center; font: 18px/1.5 var(--serif); color: var(--red-dark); background: var(--paper-light); }
.time-pass { position: absolute; z-index: 35; inset: 0; display: grid; align-content: center; justify-items: center; gap: 16px; padding: 30px; background: #31271cea; color: var(--paper-light); text-align: center; font: 34px/1.6 var(--serif); animation: dusk-in .3s ease both; }
.time-pass p { max-width: 22em; }
.time-pass small { font: 20px/1.5 var(--serif); color: #d2bc8c; }

/* Title and the first-person arrival. */
.title-screen .world-bg { object-position: 61% center; }
.title-shade { position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg, #e8ddbefa 0%, #eadfc1ed 23%, #eadfc1ae 43%, #eadfc11a 65%, #241d1722 100%); }
.title-copy { position: absolute; top: 50%; left: 8%; width: min(620px, 50%); transform: translateY(-50%); }
.era { font: 18px/1.5 var(--body); }
.title-copy > .era { color: #6b5031; margin-bottom: 24px; font-family: var(--serif); font-size: 23px; letter-spacing: 5px; }
.title-copy h1 { font-size: clamp(64px, 6.8vw, 108px); font-weight: 500; line-height: 1.23; letter-spacing: 4px; color: #392b1e; text-shadow: 1px 2px 0 #faeed4c7; }
.title-line { margin-top: 26px; font: 28px/1.7 var(--serif); color: #4c3926; max-width: 20em; }
.start-button { margin-top: 36px; min-height: 67px; padding: 16px 33px; font-size: 28px; transform: rotate(-1deg); }
.start-button:hover { transform: rotate(0) translateY(-2px); }
.title-copy small { display: block; margin-top: 20px; font: 17px/1.5 var(--body); color: #79613e; }
.title-tools { position: absolute; z-index: 10; top: max(28px, env(safe-area-inset-top)); right: 35px; gap: 12px; }
.prologue-screen .world-bg { object-position: center; filter: brightness(.62) saturate(.72) blur(2px); }
.prologue-vignette { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at 50% 40%, #d2b66e17, #211b15ab 80%); }
.birth-note { position: absolute; left: 50%; top: 11%; width: clamp(150px, 15vw, 255px); height: 53%; transform: translateX(-50%) rotate(-7deg); filter: drop-shadow(15px 23px 13px #1b130d73); animation: paper-arrive 1.1s ease-out both; }
.birth-note img { height: 100%; width: 100%; object-fit: contain; }
.note-name { position: absolute; left: 18%; right: 18%; top: 45%; text-align: center; font: 32px/1.8 var(--serif); color: #5e3123; background: #faedd0e8; }
.prologue-screen .speech-wrap { width: min(940px, calc(100% - 100px)); }
.prologue-screen .dialogue-bar { min-height: 180px; }
.prologue-screen.beat-1 .birth-note { transform: translateX(-50%) rotate(-4deg); }
.prologue-screen.beat-2 .birth-note { transform: translateX(-50%) rotate(2deg); }

/* The closing record is a single scroll, read from top to bottom. */
.ending-screen { display: grid; align-items: center; justify-items: center; padding: 30px; }
.ending-screen .world-bg { filter: brightness(.42) saturate(.7) blur(3px); }
.ending-scroll { width: min(1040px, 84vw); max-height: calc(100svh - 60px); overflow-y: auto; padding: 34px 48px 33px; color: var(--ink); background: linear-gradient(95deg, #ecddbafc, #fcf0d4fa 22%, #f7ebcbfa 80%, #e7d7b1fc); border: 1px solid #a48959; border-top: 8px solid #584328; border-bottom: 8px solid #584328; box-shadow: 0 18px 50px #1d160d66; scrollbar-width: thin; scrollbar-color: #a88955 #e8d6ac; }
.ending-scroll h1 { font: 44px/1.3 var(--serif); text-align: center; text-wrap: balance; }
.ending-lead { font: 23px/1.6 var(--serif); color: #63482c; text-align: center; max-width: 31em; margin: 14px auto 26px; }
.memory-list { border-top: 1px solid #a98b5659; }
.memory-row { display: grid; grid-template-columns: 90px 1fr; gap: 18px; padding: 20px 0; border-bottom: 1px solid #a98b5659; align-items: center; }
.record-object { width: 90px; height: 99px; object-fit: contain; }
.memory-row h2 { font: 27px/1.3 var(--serif); margin-bottom: 7px; }
.memory-row p { font: 18px/1.6 var(--body); color: #60492f; }
.memory-row .record-fate { margin-top: 5px; color: #7a5635; }
.record-number { font: 27px/1 var(--serif); color: var(--red); }
.ending-scroll > .seal-button { margin-top: 26px; }
.ending-scroll > .text-button { margin-left: 21px; }
.ending-actions { display: flex; gap: 22px; align-items: center; justify-content: center; margin-top: 27px; }

/* Optional history stays within a readable paper folio. */
.reading-dialog { width: min(740px, calc(100% - 32px)); max-height: calc(100svh - 48px); border: 1px solid #a1885e; padding: 28px 36px 35px; color: var(--ink); background: #fbefd2; box-shadow: 0 20px 70px #120e0980, inset 0 0 0 5px #bfa46a2b; }
.reading-dialog::backdrop { background: #1e180fbf; backdrop-filter: blur(4px); }
.dialog-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 17px; }
.small-seal { padding: 3px 7px; color: var(--red); border: 1px solid var(--red); font: 24px/1.2 var(--serif); }
.close-button { float: right; position: relative; z-index: 2; width: 44px; height: 44px; padding: 0; border: 0; background: #d8c49b52; color: #654a2f; font: 32px/1 var(--body); }
.close-button:hover { background: #d8c49b; }
.reading-dialog h2 { clear: both; font-size: 34px; line-height: 1.35; margin-bottom: 22px; }
.reading-dialog h3 { font-size: 26px; line-height: 1.4; margin: 26px 0 12px; }
.reading-dialog p, .reading-dialog li { font-size: 18px; line-height: 1.9; margin-bottom: 14px; }
.reading-dialog a, .reading-dialog .source-note { font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.reading-dialog .source-note { color: #796243; border-top: 1px solid #a98b5659; margin-top: 23px; padding-top: 18px; }
.dialog-actions { display: flex; gap: 22px; align-items: center; justify-content: flex-end; margin-top: 25px; }

/* Scene review: align objects with the counter, keep paper labels beside them. */
.game-tools { margin-left: auto; }
.chapter-track { position: absolute; left: 20px; top: 105px; gap: 8px; }
.chapter-track span { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: #f8edcff2; border: 1px solid #ad936b; }
.chapter-track span.active { color: #fff0d1; background: var(--red); border-color: var(--red-dark); }
.pocket-note.in-transfer { visibility: hidden; }
.pocket-note span { left: 24%; right: 24%; }
.dialog-ticket { width: 150px; max-height: 230px; object-fit: contain; margin: 18px auto; }
.outcome-lines strong { margin-right: 10px; }
.advance-button:disabled { opacity: .55; }

@keyframes paper-arrive { from { opacity: 0; transform: translateX(-50%) translateY(-40px) rotate(-15deg); } to { opacity: 1; transform: translateX(-50%) rotate(-7deg); } }
@keyframes invite-object { from { opacity: .75; } to { opacity: 1; } }
@keyframes dusk-in { from { opacity: 0; } to { opacity: 1; } }

@media (min-width: 1700px) {
  .actor-left { left: 15%; }
  .actor-right { right: 15%; }
  .actor { max-width: 470px; }
  .speech-wrap { width: min(1150px, calc(100% - 150px)); }
  .dialogue-bar { padding: 29px 40px 22px; }
  .speech-text { font-size: 29px; }
  .pocket-note.note-left { left: 23%; }
  .pocket-note.note-right { right: 23%; }
}
@media (max-width: 1000px) {
  .game-hud { top: 22px; left: 23px; right: 23px; }
  .chapter-heading { min-width: 220px; padding: 11px 20px 13px 16px; }
  .chapter-heading h1 { font-size: 29px; }
  .game-tools { gap: 7px; }
  .icon-button { padding: 8px 11px; }
  .actor { width: 32%; height: 64%; }
  .actor-left { left: 4%; }
  .actor-right { right: 4%; }
  .speech-wrap { width: calc(100% - 48px); }
  .dialogue-bar { padding: 23px 27px 17px; }
  .speech-text { font-size: 25px; }
  .scene-object { width: 140px; bottom: 25%; }
  .object-0 { left: 43%; }
  .object-1 { left: 60%; }
  .pocket-note.note-left { left: 16%; }
  .pocket-note.note-right { right: 16%; }
  .title-copy { left: 7%; width: 60%; }
  .title-copy h1 { font-size: clamp(64px, 8vw, 90px); }
  .title-line { font-size: 25px; }
  .ending-scroll { width: 93%; padding: 30px; }
}
@media (max-width: 650px) {
  .game-screen, .title-screen, .prologue-screen, .ending-screen { min-height: 680px; }
  .game-screen .world-bg { object-position: 52% center; }
  .world-shade { background: linear-gradient(180deg, #30241924, transparent 24%, transparent 58%, #2f281e4a); }
  .game-hud { top: max(16px, env(safe-area-inset-top)); left: 15px; right: 13px; gap: 8px; }
  .chapter-heading { padding: 9px 14px 11px 11px; min-width: 0; max-width: calc(100% - 90px); border-left-width: 3px; }
  .chapter-heading .era { font-size: 16px; margin-bottom: 5px; }
  .chapter-heading h1 { font-size: 25px; line-height: 1.25; letter-spacing: 1px; }
  .chapter-track { font-size: 16px; gap: 5px; margin-top: 9px; }
  .chapter-track i { width: 11px; }
  .chapter-track i.active { width: 22px; }
  .game-tools { flex-wrap: wrap; width: 92px; justify-content: flex-end; gap: 5px; }
  .icon-button { font-size: 16px; min-width: 44px; min-height: 44px; padding: 6px; }
  .game-tools .icon-button:last-child:nth-child(3) { min-width: 44px; }
  .actor { height: 50%; width: 51%; bottom: 31%; max-width: none; }
  .actor-left { left: -2%; }
  .actor-right { right: -2%; }
  .actor .character { filter: drop-shadow(2px 4px 2px #372c2640); }
  .scene-object { bottom: 31%; width: 108px; min-height: 119px; padding: 0 3px; }
  .scene-object .object-art { height: 83px; }
  .object-0 { left: 37%; }
  .object-1 { left: 66%; }
  .object-label { font-size: 18px; padding: 6px 9px; margin-top: 6px; }
  .hotspot-dot { top: -9px; left: calc(50% - 5px); width: 10px; height: 10px; }
  .pocket-note { width: 64px; bottom: 35%; }
  .pocket-note.note-left { left: 8%; }
  .pocket-note.note-right { right: 8%; }
  .pocket-note span { font-size: 16px; top: 43%; left: 5%; right: 5%; }
  .speech-wrap, .prologue-screen .speech-wrap { width: calc(100% - 24px); bottom: max(12px, env(safe-area-inset-bottom)); }
  .dialogue-bar { padding: 24px 20px 15px; min-height: 202px; }
  .speaker-tag { left: 17px; top: -18px; font-size: 20px; padding: 6px 15px 7px; min-width: 86px; }
  .speech-text { font-size: 22px; line-height: 1.6; letter-spacing: 0; }
  .dialogue-actions { gap: 20px; margin-top: 13px; }
  .advance-button { font-size: 20px; min-height: 46px; padding-left: 10px; padding-right: 24px; }
  .text-button { font-size: 17px; }
  .choice-question h2 { font-size: 24px; line-height: 1.45; margin-bottom: 7px; }
  .choice-question p { font-size: 17px; }
  .choice-tradeoff { font-size: 17px; line-height: 1.5; margin-top: 8px; }
  .seal-button { min-height: 49px; padding: 12px 22px; font-size: 21px; }
  .outcome-lines { display: block; margin-top: 8px; }
  .outcome-lines p { font-size: 17px; line-height: 1.6; margin-top: 4px; }
  .settle-caption { bottom: 33%; font-size: 18px; padding: 7px 12px; white-space: nowrap; }
  .title-screen .world-bg { object-position: 62% center; }
  .title-shade { background: linear-gradient(90deg, #e8ddbeeb, #e8ddbe99 56%, #e8ddbe22), linear-gradient(0deg, #30271c72, transparent 35%); }
  .title-copy { left: 8%; top: 47%; width: 88%; }
  .title-copy > .era { font-size: 19px; letter-spacing: 3px; margin-bottom: 23px; }
  .title-copy h1 { font-size: clamp(55px, 13vw, 79px); letter-spacing: 2px; line-height: 1.24; }
  .title-line { font-size: 24px; line-height: 1.65; max-width: 11em; margin-top: 24px; }
  .start-button { margin-top: 29px; min-height: 58px; padding: 15px 29px; font-size: 25px; }
  .title-copy small { margin-top: 17px; font-size: 16px; color: #584027; }
  .title-tools { top: max(17px, env(safe-area-inset-top)); right: 17px; }
  .title-tools .text-button { color: #4f3922; background: #f2e5c8dc; padding: 8px 12px; }
  .birth-note { top: 13%; height: 43%; width: 43%; }
  .note-name { font-size: 28px; }
  .prologue-screen .dialogue-bar { min-height: 206px; }
  .time-pass { font-size: 29px; }
  .time-pass small { font-size: 19px; }
  .ending-screen { padding: 15px; }
  .ending-scroll { width: 100%; max-height: calc(100svh - 30px); padding: 25px 20px; border-top-width: 6px; border-bottom-width: 6px; }
  .ending-scroll h1 { font-size: 34px; }
  .ending-lead { font-size: 21px; line-height: 1.55; margin: 13px auto 21px; }
  .memory-row { grid-template-columns: 58px 1fr; gap: 14px; padding: 21px 0; align-items: start; position: relative; }
  .record-number { position: absolute; left: 19px; top: 16px; font-size: 22px; }
  .record-object { width: 58px; height: 80px; margin-top: 30px; }
  .memory-row h2 { font-size: 24px; margin-bottom: 7px; }
  .memory-row p { font-size: 17px; line-height: 1.65; }
  .ending-actions { gap: 15px; flex-wrap: wrap; margin-top: 24px; }
  .ending-scroll > .text-button { margin-left: 13px; }
  .reading-dialog { padding: 20px 22px 27px; max-height: calc(100svh - 30px); }
  .reading-dialog h2 { font-size: 29px; margin-bottom: 18px; }
  .reading-dialog h3 { font-size: 24px; margin-top: 23px; }
  .reading-dialog p, .reading-dialog li { font-size: 17px; line-height: 1.85; }
  .dialog-actions { gap: 17px; flex-wrap: wrap; }
}
/* Short windows retain legible type and allow the viewport to scroll as a scene. */
@media (max-height: 720px) and (min-width: 651px) {
  .game-screen, .prologue-screen { min-height: 640px; }
  .game-hud { top: 16px; left: 23px; right: 23px; }
  .chapter-heading { padding-top: 8px; padding-bottom: 9px; }
  .chapter-heading h1 { font-size: 28px; }
  .chapter-heading .era { font-size: 16px; }
  .chapter-track { margin-top: 7px; }
  .actor { height: 63%; bottom: 22%; }
  .scene-object { bottom: 31%; width: 115px; min-height: 100px; }
  .scene-object .object-art { height: 78px; }
  .object-label { font-size: 18px; padding: 6px 8px; }
  .pocket-note { bottom: 30%; width: 67px; }
  .pocket-note span { font-size: 16px; }
  .speech-wrap { bottom: 15px; }
  .dialogue-bar { padding: 22px 28px 13px; min-height: 153px; }
  .speech-text { font-size: 26px; }
  .dialogue-actions { margin-top: 5px; }
  .choice-question h2 { font-size: 25px; }
  .choice-tradeoff, .outcome-lines p { font-size: 17px; }
  .birth-note { top: 7%; height: 48%; }
  .title-copy > .era { margin-bottom: 15px; }
  .title-copy h1 { font-size: 67px; }
  .title-line { margin-top: 18px; font-size: 24px; }
  .start-button { margin-top: 24px; min-height: 57px; font-size: 25px; }
  .title-copy small { margin-top: 15px; }
}
/* Each prop has a place in the painted world: counter, river landing, office desk. */
.scene-object { width: clamp(140px, 13vw, 185px); }
.scene-object .object-art { height: clamp(105px, 15vh, 145px); }
.game-screen[data-chapter="0"] .scene-object { bottom: 46%; }
.game-screen[data-chapter="1"] .object-0 { left: 58%; bottom: 23%; }
.game-screen[data-chapter="1"] .object-1 { left: 42%; bottom: 46%; }
.game-screen[data-chapter="2"] .object-0 { left: 43%; bottom: 23%; }
.game-screen[data-chapter="2"] .object-1 { left: 61%; bottom: 43%; }
.game-screen[data-chapter="1"] .object-0,
.game-screen[data-chapter="2"] .object-0 { bottom: 24%; min-height: 0; }
.game-screen[data-chapter="1"] .object-0 .object-label,
.game-screen[data-chapter="2"] .object-0 .object-label { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); }
.game-screen[data-chapter="1"] .object-0 .hotspot-dot,
.game-screen[data-chapter="2"] .object-0 .hotspot-dot { top: 6px; left: auto; right: 0; }
@media (max-width: 650px) {
  .game-tools { flex-shrink: 0; }
  .actor { width: 65%; height: 58%; bottom: 31%; }
  .actor-left { left: -8%; }
  .actor-right { right: -8%; }
  .chapter-track { top: 87px; left: 12px; }
  .chapter-track span { width: 25px; height: 25px; }
  .scene-object { width: 104px; }
  .scene-object .object-art { height: 83px; }
  .game-screen[data-chapter="0"] .scene-object { bottom: 46%; }
  .game-screen[data-chapter="1"] .object-0 { left: 62%; bottom: 32%; }
  .game-screen[data-chapter="1"] .object-1 { left: 35%; bottom: 49%; }
  .game-screen[data-chapter="2"] .object-0 { left: 36%; bottom: 32%; }
  .game-screen[data-chapter="2"] .object-1 { left: 64%; bottom: 47%; }
  .game-screen[data-phase="selected"] .dialogue-actions { gap: 12px; }
  .game-screen[data-phase="selected"] .seal-button { font-size: 20px; padding: 12px 15px; letter-spacing: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
