@charset "UTF-8";

:root {
  color-scheme: dark;
  --ink: #0c1213;
  --surface: #121b1d;
  --surface-high: #182225;
  --jade: #8dbaa8;
  --brass: #ba9b65;
  --paper: #dbd0b9;
  --muted: #87918c;
  --red: #743e34;
  --line: #2c3837;
  --display: "STSong", "Songti SC", "SimSun", serif;
  --body: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  --utility: "Cascadia Code", "Consolas", monospace;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ink); }
body { margin: 0; color: var(--paper); font: 13px/1.7 var(--body); background: radial-gradient(ellipse at 40% 5%, #1b2828 0%, transparent 45%), var(--ink); }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button, input, a { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--jade); outline-offset: 5px; }
button svg { flex: 0 0 auto; }
svg { width: 20px; height: 20px; display: inline-block; vertical-align: middle; }
a { color: var(--jade); text-underline-offset: 4px; }
[hidden] { display: none !important; }

.app, .app-shell { max-width: 1600px; margin: 0 auto; padding: 0 44px; }
.topbar { min-height: 91px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 15px; color: var(--paper); text-decoration: none; }
.brand-seal { display: grid; place-items: center; width: 39px; height: 43px; border: 1px solid #9c654d; outline: 1px solid #9c654d; outline-offset: -5px; color: #c39474; background: #382522; font: 23px/1 var(--display); transform: rotate(-3deg); }
.brand-name { display: flex; flex-direction: column; font: 23px/1.3 var(--display); letter-spacing: .2em; }
.brand-name small, .brand-subtitle { margin-top: 4px; color: var(--muted); font: 8px/1.5 var(--utility); letter-spacing: .24em; text-transform: uppercase; }
.top-actions { display: flex; align-items: center; gap: 23px; }
.audio-button, .icon-button { padding: 6px 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: none; color: #a0ada6; font-size: 11px; }
.audio-button:hover, .icon-button:hover { color: var(--paper); }
.audio-button svg, .icon-button svg { width: 17px; height: 17px; }
.timer { display: inline-flex; align-items: center; gap: 10px; color: #a0ada6; font: 14px/1 var(--utility); letter-spacing: .1em; border-left: 1px solid var(--line); padding-left: 22px; }
.timer svg { width: 15px; height: 15px; }
.text-button { display: inline-flex; justify-content: center; align-items: center; min-height: 34px; padding: 4px 0; background: transparent; border: none; color: #9ba99e; font-size: 11px; letter-spacing: .06em; }
.text-button:hover { color: var(--paper); }
.top-divider { height: 16px; width: 1px; background: var(--line); }
.small-diamond { display: inline-block; width: 5px; height: 5px; flex: 0 0 auto; margin-right: 8px; border: 1px solid #9f926e; transform: rotate(45deg); vertical-align: 2px; }
.live-dot { display: inline-block; flex: 0 0 auto; width: 4px; height: 4px; border-radius: 50%; background: #8caa83; box-shadow: 0 0 5px #8caa8333; }

.intro { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 31px 0 28px; }
.intro-text { min-width: 0; }
.eyebrow { margin: 0 0 9px; color: var(--brass); font-size: 9px; letter-spacing: .25em; }
.intro h1 { margin: 0 0 8px; font: 34px/1.4 var(--display); letter-spacing: .12em; font-weight: 400; }
.intro p { margin: 0; color: var(--muted); font-size: 12px; }
.intro p.eyebrow { margin-bottom: 9px; color: var(--brass); font-size: 9px; letter-spacing: .2em; }
.title-seal { display: inline-block; margin-left: 17px; padding: 3px 3px 3px 5px; border: 1px solid #785043; color: #b78065; font: 9px/1.3 var(--display); letter-spacing: .1em; vertical-align: 8px; width: 26px; }
.chapter-progress { display: flex; align-items: center; gap: 17px; }
.progress-step { display: flex; align-items: center; gap: 9px; color: #697670; white-space: nowrap; font-size: 11px; }
.progress-step + .progress-step::before { content: ""; width: 25px; height: 1px; background: var(--line); margin-right: 4px; }
.progress-step > span:first-child, .progress-step .step-number { display: grid; place-items: center; height: 25px; width: 25px; border: 1px solid #3c4a44; border-radius: 50%; font: 10px/1 var(--utility); }
.progress-step.active { color: var(--jade); }
.progress-step.active > span:first-child, .progress-step.active .step-number { border-color: #8dbaa878; background: #8dbaa810; }
.progress-step.done { color: var(--brass); }
.progress-step.done > span:first-child, .progress-step.done .step-number { border-color: #ba9b6578; background: #ba9b6510; }

.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 288px; gap: 22px; align-items: start; }
.scene-panel { min-width: 0; border: 1px solid #3a4540; background: #11191a; position: relative; }
.scene-panel::before, .scene-panel::after { content: ""; position: absolute; z-index: 3; width: 11px; height: 11px; pointer-events: none; }
.scene-panel::before { left: -1px; top: -1px; border-left: 2px solid var(--brass); border-top: 2px solid var(--brass); }
.scene-panel::after { right: -1px; bottom: -1px; border-right: 2px solid var(--brass); border-bottom: 2px solid var(--brass); }
.scene-toolbar { height: 44px; display: flex; justify-content: space-between; align-items: center; padding: 0 19px; color: #9ca99f; font-size: 10px; letter-spacing: .08em; }
.scene-toolbar > span, .scene-toolbar > div { display: inline-flex; gap: 8px; align-items: center; }
.scene-toolbar svg { width: 13px; height: 13px; }
.scene-toolbar .scene-tag { color: #748179; font-size: 9px; }
.scene { position: relative; isolation: isolate; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #1a2726; }
.scene-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.scene-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.scene::after { content: ""; pointer-events: none; position: absolute; inset: 0; z-index: 1; box-shadow: inset 0 0 90px 15px #02090966; }
.scene-fog, .scene-atmosphere { position: absolute; inset: 0; pointer-events: none; z-index: 1; background: linear-gradient(0deg, #07110f50, transparent 40%); }
.scene-shade { position: absolute; pointer-events: none; z-index: 1; inset: 0; background: linear-gradient(0deg, #06110fe0, #06110f00 27%, #06110f00 80%, #06110f30); }
.scene-grain { position: absolute; pointer-events: none; z-index: 1; inset: 0; opacity: .18; background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, #c2c2a10d 3px, transparent 4px); }
.scene-vertical { position: absolute; pointer-events: none; z-index: 2; top: 27px; left: 24px; color: #e1d9bf83; font: 10px/1.6 var(--display); letter-spacing: .4em; writing-mode: vertical-rl; text-shadow: 0 1px 6px #0008; }
.scene-mark { position: absolute; pointer-events: none; z-index: 2; top: 24px; right: 25px; padding: 7px 4px 7px 6px; border: 1px solid #be9b6d6b; color: #e4c59c8c; font: 15px/1.4 var(--display); text-align: center; letter-spacing: .16em; text-shadow: 0 1px 6px #0008; }
.scene-instruction { position: absolute; z-index: 2; pointer-events: none; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; white-space: nowrap; color: #d5d3bda8; font-size: 10px; letter-spacing: .06em; }
.instruction-dot { width: 5px; height: 5px; border: 1px solid #d0bf8e; border-radius: 50%; }
.hotspot { position: absolute; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 0; transform: translate(-50%, -50%); border: none; background: transparent; min-width: 36px; min-height: 36px; }
.hotspot .hotspot-dot, .hotspot .hotspot-icon, .hotspot > svg, .hotspot > span:first-child { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid #d2c5a78c; border-radius: 50%; background: #0c1715b8; color: #e5dcc5; box-shadow: 0 0 0 5px #c1ba9814, 0 2px 10px #0005; backdrop-filter: blur(5px); transition: background .2s, border-color .2s, box-shadow .2s; }
.hotspot > svg { padding: 8px; }
.hotspot .hotspot-dot svg, .hotspot .hotspot-icon svg, .hotspot > span:first-child svg { width: 13px; height: 13px; }
.hotspot::before { content: ""; position: absolute; width: 31px; height: 31px; border-radius: 50%; border: 1px solid #ddc89566; animation: beacon 3.6s ease-out infinite; pointer-events: none; }
.hotspot .hotspot-label, .hotspot > span:last-child:not(:first-child) { padding: 4px 9px; font-size: 10px; white-space: nowrap; background: #091311dc; color: #e2dcc9; border: 1px solid #b2b49c4d; border-radius: 2px; box-shadow: 0 2px 8px #0003; transition: opacity .2s; }
.hotspot:hover .hotspot-dot, .hotspot:focus-visible .hotspot-dot, .hotspot:hover .hotspot-icon, .hotspot:hover > span:first-child { background: #52685bdf; border-color: var(--jade); box-shadow: 0 0 0 7px #8dbaa822; }
.hotspot.inspected .hotspot-dot, .hotspot.inspected .hotspot-icon { border-color: #93b19c80; color: #bdd4c4; }
.hotspot.solved .hotspot-dot, .hotspot.solved .hotspot-icon { color: var(--brass); border-color: var(--brass); }
.hide-hotspots .hotspot, .markers-hidden .hotspot { opacity: 0; }
.hide-hotspots .hotspot:hover, .hide-hotspots .hotspot:focus-visible, .markers-hidden .hotspot:hover, .markers-hidden .hotspot:focus-visible { opacity: 1; }
.scene-bottom { display: flex; justify-content: space-between; align-items: center; gap: 18px; min-height: 91px; padding: 17px 22px; border-top: 1px solid #34413c; }
.scene-caption h2 { font: 22px/1.3 var(--display); font-weight: 400; letter-spacing: .13em; margin: 0 0 6px; }
.scene-caption { min-width: 0; }
.scene-caption p { margin: 0; font-size: 11px; color: var(--muted); }
.scene-caption .scene-chapter { color: var(--brass); margin-right: 11px; font-size: 10px; }
.scene-caption p.eyebrow { margin-bottom: 5px; color: var(--brass); font-size: 8px; letter-spacing: .2em; }
.scene-controls { display: flex; gap: 8px; flex: 0 0 auto; }
#prev-room svg { transform: rotate(180deg); }
#room-number { display: inline-flex; align-items: center; gap: 5px; padding: 0 5px; font: 11px/1 var(--utility); color: #c4cab1; white-space: nowrap; }
#room-number > span { color: #6e7e6e; font-size: 9px; }
.room-arrow { width: 33px; height: 34px; display: grid; place-items: center; background: #192322; border: 1px solid #3a4740; color: #d0cbb5; transition: border-color .2s, background .2s; }
.room-arrow:hover:not(:disabled) { border-color: var(--jade); background: #263730; }
.room-arrow:disabled { opacity: .3; }
.room-arrow svg { width: 14px; height: 14px; }

.sidebar { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.objective-card, .inventory-card { border: 1px solid var(--line); background: #121c1c; padding: 20px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.card-heading h2, .card-heading h3, .objective-card > h2, .inventory-card > h2 { margin: 0; font-size: 12px; font-weight: 400; letter-spacing: .14em; color: #d0c8b4; }
.card-heading > span { color: #75877b; font: 10px/1.5 var(--utility); }
.card-heading svg { width: 15px; height: 15px; color: var(--brass); margin-right: 7px; }
.objective-title { margin: 0 0 8px; font: 20px/1.5 var(--display); color: #ddd5bf; letter-spacing: .1em; }
#objective-title { margin: 0 0 8px; font: 20px/1.5 var(--display); color: #ddd5bf; letter-spacing: .07em; }
.objective-footnote { display: flex; align-items: center; gap: 7px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); color: #879b82; font-size: 9px; }
.objective-card .card-heading .eyebrow { color: var(--brass); font-family: var(--body); font-size: 9px; margin: 0; }
.objective-card .card-heading > span:last-child { color: var(--brass); }
.objective-description, .objective-card > p { color: #91a092; font-size: 11px; margin: 9px 0 17px; line-height: 1.9; }
.chapter-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); padding-top: 9px; }
.chapter { min-height: 37px; display: flex; align-items: center; gap: 10px; color: #65766c; font-size: 11px; background: none; border: 0; padding: 6px 0; width: 100%; text-align: left; }
.chapter .chapter-dot, .chapter > span:first-child { display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid #39493e; border-radius: 50%; font: 8px/1 var(--utility); flex: 0 0 auto; }
.chapter > svg { width: 13px; height: 13px; }
.chapter .chapter-status, .chapter > span:last-child:not(:first-child) { margin-left: auto; font-size: 9px; }
.chapter.active { color: var(--jade); }
.chapter.active .chapter-dot, .chapter.active > span:first-child { border-color: #8dbaa87a; background: #8dbaa814; }
.chapter.done { color: #b4a77e; }
.chapter.done .chapter-dot, .chapter.done > span:first-child { border-color: #9a895d; }
.chapter:hover:not(:disabled) { color: var(--paper); }
.inventory-card { padding-bottom: 16px; }
.inventory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.item-slot { min-width: 0; min-height: 67px; padding: 7px 3px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; border: 1px dashed #334237; color: #3e5146; background: #0f1816; }
.item-slot svg { width: 24px; height: 24px; }
.item-slot .item-label, .item-slot > span { font-size: 9px; }
.item-slot.filled { border: 1px solid #737654; color: #c0b98e; background: #aaa5650a; }
.item-slot.filled:hover { border-color: var(--brass); background: #aaa56515; }
.inventory-note, .inventory-card > p:last-child { margin: 12px 0 0; color: #667a6c; font-size: 9px; text-align: center; }
.journal-shortcut { min-height: 59px; width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 18px; border: 1px solid #3e4a3e; background: #1c2721; color: #c7c9ab; text-align: left; }
.journal-shortcut > svg { color: #a7b296; width: 21px; height: 21px; }
.journal-shortcut > span { flex: 1; font-size: 12px; }
.journal-shortcut small { display: block; color: #899b82; font-size: 9px; margin-top: 2px; }
.journal-shortcut .journal-count { flex: 0 0 auto; width: 24px; height: 24px; border: 1px solid #52644a; border-radius: 50%; display: grid; place-items: center; color: #c2c9aa; font: 10px/1 var(--utility); }
.journal-shortcut .journal-icon { flex: 0 0 auto; width: 22px; color: #a7b296; }
.journal-shortcut .journal-icon svg { width: 21px; height: 21px; }
.journal-shortcut > span:nth-child(2) { flex: 1; }
.journal-shortcut strong { display: block; font-size: 12px; font-weight: 400; letter-spacing: .08em; }
.journal-shortcut > span:nth-child(2) > span { display: block; color: #899b82; font-size: 9px; margin-top: 2px; }
.journal-shortcut > span:last-child { flex: 0 0 auto; font-size: 17px; color: #7d9474; }
.journal-shortcut:hover { background: #26332a; border-color: #6e8262; }

.bottom-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 0 21px; }
.bottom-bar > p, .explore-hint { color: #768b7d; margin: 0; font-size: 10px; }
.bottom-bar > p { display: flex; align-items: center; gap: 1px; }
.bottom-bar > div { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.bottom-bar > p svg, .explore-hint svg { width: 13px; height: 13px; margin-right: 7px; color: #acb39a; }
.bottom-actions { display: flex; align-items: center; gap: 12px; }
.hotspot-toggle { display: inline-flex; align-items: center; gap: 7px; border: none; background: none; color: #93a18f; padding: 7px; font-size: 10px; }
.hotspot-toggle svg { width: 14px; height: 14px; }
.hotspot-toggle:hover { color: var(--jade); }
.hint-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 34px; padding: 7px 12px; border: 1px solid #6c7652; color: #c8c6a1; background: #2a3522; font-size: 10px; letter-spacing: .05em; }
.hint-button:hover { background: #3a482e; border-color: #9aa374; }
.hint-button svg { width: 14px; height: 14px; }
.hint-label { margin-left: 5px; color: #92a17c; font-size: 8px; border-left: 1px solid #68764f; padding-left: 10px; letter-spacing: 0; }
.site-footer { display: flex; justify-content: space-between; gap: 15px; padding: 18px 0 24px; border-top: 1px solid #25312b; color: #576a5d; font-size: 9px; letter-spacing: .06em; }
.site-footer p { margin: 0; }
.site-footer .footer-mark { letter-spacing: .17em; }
.site-footer #save-status { display: inline-flex; align-items: center; gap: 7px; }

.primary-button, .secondary-button { min-height: 39px; padding: 9px 19px; border: 1px solid #9fb6a0; display: inline-flex; justify-content: center; align-items: center; gap: 9px; font-size: 11px; letter-spacing: .08em; transition: background .2s, border-color .2s, transform .2s; }
.primary-button { color: #14251b; background: #b1c1a7; border-color: #b1c1a7; }
.primary-button:hover { background: #c8d2b9; border-color: #c8d2b9; }
.primary-button:active, .secondary-button:active { transform: translateY(1px); }
.secondary-button { color: #b6bea7; background: #18231c; border-color: #455641; }
.secondary-button:hover { background: #26332a; border-color: #7b8e6d; }
.primary-button svg, .secondary-button svg { width: 14px; height: 14px; }
.bottom-bar .secondary-button { min-height: 34px; padding: 7px 12px; font-size: 10px; }

.modal { width: min(520px, calc(100% - 32px)); max-height: min(86vh, 850px); padding: 0; color: var(--paper); background: #14201d; border: 1px solid #707958; box-shadow: 0 25px 110px #0009; overflow: auto; }
.modal::backdrop { background: #020a08c4; backdrop-filter: blur(7px); }
.modal-shell { padding: 34px 36px 30px; position: relative; }
.modal-shell::before { content: ""; position: absolute; left: 8px; right: 8px; top: 8px; bottom: 8px; border: 1px solid #46523b; pointer-events: none; }
.modal-close { position: absolute; z-index: 2; top: 17px; right: 17px; width: 28px; height: 28px; padding: 0; background: none; border: none; color: #a3b294; font-size: 23px; line-height: 1; }
.modal-close:hover { color: var(--paper); }
.modal-close svg { width: 16px; height: 16px; }
.modal-eyebrow { margin: 0 0 12px; color: var(--brass); font-size: 9px; letter-spacing: .22em; }
.modal-title { margin: 0 0 16px; font: 29px/1.45 var(--display); font-weight: 400; letter-spacing: .12em; }
.modal-description { color: #a2af9a; font-size: 12px; line-height: 2; margin: 0 0 20px; white-space: pre-line; }
.modal-body { position: relative; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.modal-actions > .primary-button:only-child { min-width: 140px; }
.story-quote { border-left: 2px solid #9c8854; margin: 22px 0; padding: 12px 17px; color: #c4c5a7; background: #9c88540a; font: 18px/1.9 var(--display); letter-spacing: .05em; white-space: pre-line; }
.intro-modal .modal-title { font-size: 37px; letter-spacing: .16em; }
.intro-modal .story-meta { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #93a48c; padding: 12px 0; margin-top: 19px; font-size: 10px; }
.code-inputs { display: flex; justify-content: center; gap: 13px; margin: 22px 0 18px; }
.code-inputs input { width: 55px; height: 65px; background: #0b1712; border: 1px solid #687452; color: #d2c79b; text-align: center; font: 31px/1 var(--utility); border-radius: 0; caret-color: var(--brass); }
.code-inputs input:focus { background: #1b2d1f; border-color: #c2b275; }
.puzzle-feedback { color: #c9aa88; font-size: 11px; min-height: 20px; text-align: center; margin: 12px 0 0; }
.puzzle-feedback.success { color: var(--jade); }
.puzzle-feedback.error { color: #d7a58e; }
.puzzle-instruction { text-align: center; color: #8e9f84; font-size: 10px; margin: 12px 0; }
.note-buttons, .direction-buttons { display: flex; justify-content: center; gap: 9px; margin: 20px 0; flex-wrap: wrap; }
.note-buttons button, .direction-buttons button { width: 57px; height: 58px; border: 1px solid #6b7550; background: #223021; color: #d0c59e; font: 22px/1 var(--display); }
.note-buttons button:hover, .direction-buttons button:hover { background: #384b2d; border-color: #b8ac71; }
.note-buttons button:active, .direction-buttons button:active { transform: translateY(2px); }
.direction-cell { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.direction-cell .utility { color: #9fae8f; font-size: 9px; letter-spacing: .06em; }
.direction-tip { color: #7d9274; font-size: 8px; }
.sequence-display { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 12px; border: 1px solid #354a37; background: #0d1b14; margin: 16px 0; }
.sequence-display span { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #546445; color: #c4c29c; font: 16px/1 var(--display); }
.sequence-display .empty { opacity: .35; }
.sequence-clear { display: block; margin: 0 auto; background: none; border: 0; color: #8fa080; font-size: 10px; padding: 6px 12px; text-decoration: underline; text-underline-offset: 3px; }
.clear-sequence { display: block; margin: 0 auto; padding: 6px 12px; color: #9eae8d; font-size: 10px; text-decoration: underline; text-underline-offset: 4px; }
.clue-card { padding: 20px; border: 1px solid #77714c; background: #c1b78b0d; color: #d1c8a1; font: 19px/1.9 var(--display); white-space: pre-line; text-align: center; }
.clue-card small { display: block; color: #9eaa8e; margin-top: 13px; font: 10px/1.8 var(--body); }
.journal-list { display: flex; flex-direction: column; gap: 13px; max-height: 45vh; overflow-y: auto; padding-right: 5px; scrollbar-width: thin; scrollbar-color: #536243 transparent; }
.journal-entry { padding: 17px 19px; border: 1px solid #3d5139; background: #0c1a12; }
.journal-entry h3 { font: 18px/1.5 var(--display); color: #c5c6a0; margin: 0 0 8px; letter-spacing: .08em; }
.journal-entry p { font-size: 11px; line-height: 1.9; white-space: pre-line; color: #9eaf92; margin: 0; }
.journal-empty { padding: 25px 10px; color: #91a183; text-align: center; font-size: 12px; }
.instructions-list { display: flex; flex-direction: column; gap: 10px; }
.item-detail-icon, .victory-icon { display: grid; place-items: center; margin: 3px auto 21px; width: 73px; height: 73px; border: 1px solid #777d52; color: #c3bd86; border-radius: 50%; background: #bfbc6a09; }
.item-detail-icon svg, .victory-icon svg { width: 32px; height: 32px; }
.victory-title, .victory-description { text-align: center; }
.victory-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid #3f5138; border-bottom: 1px solid #3f5138; margin-top: 23px; padding: 18px 0; text-align: center; }
.victory-stats strong { display: block; font: 23px/1.4 var(--utility); color: #c7c497; }
.victory-stats span { display: block; color: #8d9e7e; font-size: 10px; margin-top: 4px; }
.toast { position: fixed; z-index: 100; bottom: 26px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); padding: 13px 22px; border: 1px solid #87916b; background: #253320f5; box-shadow: 0 8px 35px #0006; color: #d7d6b7; font-size: 12px; text-align: center; pointer-events: none; }

@keyframes beacon { 0% { transform: scale(1); opacity: .6; } 65%, 100% { transform: scale(1.75); opacity: 0; } }
@keyframes scene-in { from { opacity: .4; } to { opacity: 1; } }
.scene.changing .scene-image, .scene.scene-enter .scene-image { animation: scene-in .5s ease-out; }

@media (min-width: 1500px) {
  .app, .app-shell { padding-right: 64px; padding-left: 64px; }
  .intro { padding-top: 37px; padding-bottom: 32px; }
  .game-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; }
  .objective-card { padding: 24px; }
  .inventory-card { padding: 22px; }
  .item-slot { min-height: 75px; }
  .chapter { min-height: 42px; }
}
@media (max-width: 1150px) {
  .app, .app-shell { padding: 0 25px; }
  .game-layout { grid-template-columns: minmax(0, 1fr) 252px; gap: 16px; }
  .objective-card, .inventory-card { padding: 17px; }
  .chapter-progress { gap: 9px; }
  .progress-step { gap: 6px; font-size: 10px; }
  .progress-step + .progress-step::before { width: 15px; margin: 0; }
  .scene-caption p { font-size: 10px; }
}
@media (max-width: 900px) {
  .app, .app-shell { padding: 0 24px; }
  .topbar { min-height: 79px; }
  .intro { align-items: flex-start; padding: 26px 0 24px; }
  .intro h1 { font-size: 30px; }
  .chapter-progress { padding-top: 18px; }
  .progress-step { gap: 0; }
  .progress-step .step-label, .progress-step > span:nth-child(2) { display: none; }
  .game-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 15px; }
  .objective-card { grid-row: span 2; min-height: 100%; }
  .journal-shortcut { min-height: 54px; }
  .inventory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .item-slot { min-height: 59px; }
  .scene-bottom { min-height: 83px; }
  .bottom-bar { padding-top: 17px; }
  .bottom-bar > p { max-width: 50%; }
}
@media (max-width: 600px) {
  body { font-size: 12px; }
  .app, .app-shell { padding: 0 15px; }
  .topbar { min-height: 71px; gap: 12px; }
  .brand { gap: 10px; }
  .brand-seal { width: 29px; height: 34px; font-size: 18px; }
  .brand-name { font-size: 18px; letter-spacing: .16em; }
  .brand-name small, .brand-subtitle { font-size: 6px; letter-spacing: .16em; }
  .top-actions { gap: 13px; }
  .audio-button span, .audio-button .audio-label { display: none; }
  .topbar .audio-button { display: inline-flex; }
  .top-actions .top-divider { display: none; }
  .top-actions .text-button { font-size: 9px; min-height: 32px; }
  .top-actions .icon-button { min-width: 32px; min-height: 32px; }
  .timer { font-size: 11px; gap: 6px; padding-left: 12px; }
  .timer svg { width: 12px; height: 12px; }
  .top-actions > .icon-button:not(.audio-button) { display: none; }
  .intro { padding: 23px 0 21px; gap: 12px; }
  .eyebrow { font-size: 8px; letter-spacing: .15em; margin-bottom: 8px; }
  .intro h1 { font-size: 26px; letter-spacing: .07em; }
  .intro p { font-size: 10px; max-width: 240px; line-height: 1.9; }
  .intro p.eyebrow { font-size: 8px; margin-bottom: 8px; letter-spacing: .12em; }
  .title-seal { margin-left: 10px; font-size: 7px; width: 21px; vertical-align: 6px; padding: 2px 2px 2px 3px; }
  .chapter-progress { gap: 5px; padding-top: 19px; }
  .progress-step + .progress-step::before { width: 8px; margin-right: 3px; }
  .progress-step > span:first-child, .progress-step .step-number { width: 19px; height: 19px; font-size: 8px; }
  .scene-toolbar { height: 37px; padding: 0 12px; font-size: 9px; }
  .scene-toolbar .scene-tag { font-size: 7px; }
  .scene { aspect-ratio: 16 / 9; }
  .scene-vertical { top: 14px; left: 12px; font-size: 7px; }
  .scene-mark { top: 13px; right: 12px; padding: 4px 3px; font-size: 11px; }
  .scene-instruction { bottom: 10px; font-size: 7px; gap: 5px; }
  .scene::after { box-shadow: inset 0 0 45px 5px #02090944; }
  .hotspot { gap: 5px; min-width: 32px; min-height: 32px; }
  .hotspot .hotspot-dot, .hotspot .hotspot-icon, .hotspot > svg, .hotspot > span:first-child { width: 25px; height: 25px; }
  .hotspot::before { width: 25px; height: 25px; }
  .hotspot .hotspot-label, .hotspot > span:last-child:not(:first-child) { padding: 2px 5px; font-size: 8px; }
  .hotspot > svg { padding: 6px; }
  .scene-bottom { min-height: 78px; padding: 13px 13px; gap: 12px; }
  .scene-caption h2 { font-size: 19px; margin-bottom: 5px; }
  .scene-caption p { font-size: 9px; max-width: 250px; }
  .room-arrow { width: 32px; height: 32px; }
  #room-number { font-size: 9px; padding: 0 2px; gap: 3px; }
  #room-number > span { font-size: 7px; }
  .scene-controls { gap: 5px; }
  .game-layout { gap: 12px; }
  .sidebar { gap: 11px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .objective-card, .inventory-card { padding: 13px; }
  .card-heading { margin-bottom: 11px; }
  .card-heading h2, .card-heading h3 { font-size: 10px; letter-spacing: .08em; }
  .card-heading > span { font-size: 8px; }
  .card-heading svg { width: 12px; height: 12px; margin-right: 4px; }
  .objective-title { font-size: 17px; }
  #objective-title { font-size: 17px; }
  .objective-footnote { font-size: 7px; padding-top: 10px; margin-top: 8px; line-height: 1.7; }
  .objective-description, .objective-card > p { font-size: 9px; margin: 9px 0 11px; }
  .chapter { gap: 6px; min-height: 32px; font-size: 9px; }
  .chapter .chapter-status, .chapter > span:last-child:not(:first-child) { font-size: 7px; }
  .chapter .chapter-dot, .chapter > span:first-child { width: 14px; height: 14px; font-size: 7px; }
  .inventory-grid { gap: 5px; }
  .item-slot { min-height: 48px; }
  .item-slot svg { width: 19px; height: 19px; }
  .item-slot .item-label, .item-slot > span { font-size: 7px; }
  .inventory-note, .inventory-card > p:last-child { font-size: 7px; margin-top: 9px; }
  .journal-shortcut { padding: 11px 12px; gap: 7px; min-height: 52px; }
  .journal-shortcut > svg { width: 17px; height: 17px; }
  .journal-shortcut > span { font-size: 10px; }
  .journal-shortcut small { font-size: 7px; }
  .journal-shortcut .journal-count { width: 20px; height: 20px; font-size: 8px; }
  .journal-shortcut .journal-icon { width: 17px; }
  .journal-shortcut .journal-icon svg { width: 17px; height: 17px; }
  .journal-shortcut strong { font-size: 10px; }
  .journal-shortcut > span:nth-child(2) > span { font-size: 7px; }
  .bottom-bar { align-items: flex-start; padding: 16px 0; gap: 10px; }
  .bottom-bar > p, .explore-hint { max-width: 47%; font-size: 8px; line-height: 1.9; }
  .bottom-bar > p svg, .explore-hint svg { width: 11px; height: 11px; margin-right: 4px; }
  .bottom-actions { gap: 4px; }
  .bottom-bar > div { gap: 7px; }
  .hotspot-toggle { font-size: 8px; padding: 7px 3px; gap: 4px; min-height: 32px; }
  .hotspot-toggle svg { width: 12px; height: 12px; }
  .bottom-bar .secondary-button { min-height: 32px; padding: 6px 8px; font-size: 8px; gap: 4px; }
  .hint-button { min-height: 32px; padding: 6px 8px; gap: 5px; font-size: 8px; }
  .hint-label { display: none; }
  .site-footer { font-size: 7px; padding: 14px 0 18px; gap: 10px; flex-wrap: wrap; }
  .modal-shell { padding: 30px 24px 26px; }
  .modal-title { font-size: 25px; }
  .modal-description { font-size: 11px; }
  .intro-modal .modal-title { font-size: 31px; }
  .code-inputs { gap: 10px; }
  .code-inputs input { width: 49px; height: 59px; }
  .note-buttons, .direction-buttons { gap: 7px; }
  .note-buttons button, .direction-buttons button { width: 43px; height: 48px; font-size: 20px; }
  .direction-cell { gap: 7px; }
  .direction-cell .utility { font-size: 8px; }
  .direction-tip { font-size: 7px; }
  .modal-close { min-width: 32px; min-height: 32px; }
  .clue-card { padding: 15px 12px; font-size: 17px; }
  .toast { font-size: 10px; padding: 11px 16px; bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Keep the marker on the object, and turn labels inward near the scene edge. */
.hotspot { transform: translate(-15.5px, -50%); }
.hotspot::before { left: 0; }
.hotspot.align-left { flex-direction: row-reverse; transform: translate(calc(-100% + 15.5px), -50%); }
.hotspot.align-left::before { left: auto; right: 0; }
.scene-mark { white-space: pre-line; }
.edition-badge { border: 1px solid #687a5f; color: #b4c4a5; padding: 3px 8px; margin-left: 13px; font-size: 9px; letter-spacing: .1em; }
.puzzle-checklist { padding: 3px 0 12px; }
.puzzle-task { display: flex; align-items: center; gap: 9px; font-size: 11px; color: #aab6a2; padding: 6px 0; }
.puzzle-task > .utility { margin-left: auto; font-size: 9px; color: #7c8d72; }
.task-mark { color: #a79563; }
.puzzle-task.done, .puzzle-task.done .task-mark { color: var(--jade); }
.equipment-bar { display: flex; align-items: center; gap: 15px; padding: 10px 21px; border-top: 1px solid #7b8154; background: #293320; color: #d4d1a7; font-size: 11px; }
.equipment-bar > span:nth-child(2) { color: #a0b091; font-size: 10px; }
.equipment-bar button { margin-left: auto; color: #e0d1a2; }
.item-slot.selected { border-color: #d0c489; box-shadow: 0 0 0 2px #c6ba7055; background: #52624066; }
.item-inspect { display: block; margin: 7px auto 0; font-size: 10px; }
.inventory-help { margin: 12px 0 0; font-size: 9px; text-align: center; line-height: 1.8; color: #91a186; }
.hotspot.use-target .hotspot-badge { color: #e6d79f; border-color: #c0af73; }
.modal.wide { width: min(860px, calc(100% - 32px)); }
.journal-workspace .journal-list { max-height: 31vh; }
.journal-help { color: #a0b292; font-size: 11px; margin-top: 0; }
.clue-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-bottom: 18px; }
.comparison-card { min-width: 0; padding: 18px; border: 1px solid #66724d; background: #b6ac7610; }
.comparison-card h3 { color: #d0ccab; font: 20px/1.5 var(--display); margin: 0 0 9px; }
.comparison-card > p:last-child { color: #bec4a7; white-space: pre-line; font-size: 12px; line-height: 1.9; margin: 0; }
.clue-pick { display: flex; align-items: center; gap: 10px; cursor: pointer; margin-bottom: 10px; }
.clue-pick input { width: 18px; height: 18px; accent-color: #a9bb8c; flex-shrink: 0; }
.clue-pick h3 { margin: 0; }
.clue-pick .utility { margin-left: auto; font-size: 9px; color: #829573; }
.hint-puzzle-tabs { display: flex; gap: 16px; margin-bottom: 16px; }
.hint-puzzle-tabs .active { color: var(--brass); border-bottom: 1px solid var(--brass); }
.reward-list { display: flex; justify-content: center; gap: 18px; padding: 10px; }
.reward-tile { display: flex; flex-direction: column; gap: 8px; align-items: center; padding: 14px; color: #d3c590; }
.reward-tile svg { width: 34px; height: 34px; }
.victory-stats { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 600px) {
  #objective-title { text-wrap: balance; }
  .edition-badge { font-size: 7px; padding: 2px 5px; margin-left: 7px; }
  .equipment-bar { padding: 8px 12px; font-size: 10px; gap: 9px; }
  .equipment-bar > span:nth-child(2) { display: none; }
  .puzzle-task { font-size: 9px; gap: 6px; padding: 4px 0; }
  .puzzle-task > .utility { font-size: 8px; }
  .inventory-help { font-size: 8px; margin-top: 9px; }
  .clue-comparison { gap: 8px; }
  .comparison-card { padding: 11px; }
  .comparison-card h3 { font-size: 15px; }
  .comparison-card > p:last-child { font-size: 10px; }
  .modal.wide .modal-shell { padding-left: 19px; padding-right: 19px; }
  .clue-pick h3 { font-size: 16px; }
  .clue-pick .utility { font-size: 8px; }
  .victory-stats strong { font-size: 18px; }
  .victory-stats span { font-size: 8px; }
  .hotspot { transform: translate(-12.5px, -50%); }
  .hotspot.align-left { transform: translate(calc(-100% + 12.5px), -50%); }
  .hotspot .hotspot-label { display: none; }
  .hotspot:hover .hotspot-label, .hotspot:focus-visible .hotspot-label { display: block; position: absolute; bottom: calc(100% + 5px); left: 0; }
  .hotspot.align-left:hover .hotspot-label, .hotspot.align-left:focus-visible .hotspot-label { left: auto; right: 0; }
}
