/* Immersive stage for the play route (plan-improve §6): full-bleed 16:9 scene, HUD, dialogue
   and inventory tray. Loaded after style.css, so only the play route's layout is overridden here. */

:root{
 --stage-gold:#c3ac80;
 --stage-gold-hi:#e2cc9b;
 --stage-line:rgba(195,172,128,.26);
 --stage-text:#eee5d6;
 --stage-muted:#c9bfb1;
 --stage-panel:rgba(20,17,20,.94);
 --stage-radius:4px;
 --stage-radius-sm:3px;
 --stage-frost:#9fb6c8;
 --serif:'Noto Serif TC','Songti TC',Georgia,serif;
}

/* The play route has no site frame: the LUCAS LAB bar and site navigation stay on the title screen. */
body[data-view="game"] .lab-bar,
body[data-view="game"] .site-header{display:none}
body[data-view="game"] #main{padding:0;margin:0;max-width:none}
/* Only the play route is a fixed stage; the clear screen is a long page that must scroll under touch and wheel. */
body[data-view="game"]{overflow:hidden}

.game{position:relative;height:100vh;height:100dvh;margin:0;padding:0;max-width:none;overflow:hidden;background:#050405;aspect-ratio:auto}
.stage{position:absolute;inset:0;overflow:hidden}

/* Scene: a 16:9 frame that always covers the viewport. Hotspot percentages are relative to the image, so they stay put when the phone pans. */
.scene{position:absolute;inset:0;overflow:hidden;background:#050405;aspect-ratio:auto;border:0;touch-action:pan-y;user-select:none;-webkit-user-select:none}
.scene.dragging{cursor:grabbing}
.scene-frame{position:absolute;left:50%;top:50%;width:max(100%,calc(100vh * 16 / 9));width:max(100%,calc(100dvh * 16 / 9));aspect-ratio:16/9;transform:translate(calc(-50% + var(--pan-x,0px)),-50%)}
.scene-frame img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;pointer-events:none;-webkit-user-drag:none}
.scene-shade{position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 50% 42%,transparent 50%,rgba(0,0,0,.6) 100%),linear-gradient(0deg,rgba(8,6,8,.82) 0%,transparent 28%,transparent 78%,rgba(8,6,8,.38) 100%)}
#hotspots{position:absolute;inset:0}

/* Hotspots: a 6px glimmer by default; the name shows on hover or focus, and in story mode or while the candle is lit. */
#hotspots .hotspot{position:absolute;transform:translate(-50%,-50%);width:44px;height:44px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--stage-gold-hi);display:grid;place-items:center;cursor:pointer;min-height:44px}
.hotspot::before{content:'';grid-area:1/1;width:6px;height:6px;border-radius:50%;background:var(--stage-gold-hi);box-shadow:0 0 8px 2px rgba(226,204,155,.5);animation:stage-glimmer 5s ease-in-out infinite;transition:opacity .4s,transform .4s}
.hotspot svg{grid-area:1/1;width:26px;height:26px;opacity:0;transition:opacity .35s;filter:drop-shadow(0 0 6px rgba(0,0,0,.8))}
.hotspot span{position:absolute;top:calc(100% + 4px);left:50%;transform:translateX(-50%);white-space:nowrap;font-size:13px;line-height:1.5;padding:2px 9px;background:rgba(16,15,16,.88);border:1px solid var(--stage-line);border-radius:2px;opacity:0;pointer-events:none;transition:opacity .25s}
.hotspot:hover svg,.hotspot:focus-visible svg,.hotspot:hover span,.hotspot:focus-visible span{opacity:1}
.hotspot:focus-visible{outline:2px solid var(--stage-gold-hi);outline-offset:4px}
.hotspot.seen::before{opacity:.32}
.hotspot.seal::before{width:9px;height:9px;background:#d9a46a}
.hotspot.solved::before{background:var(--stage-frost);box-shadow:0 0 10px 3px rgba(159,182,200,.5)}
.hotspot.memory::before{background:#d8c9f0;box-shadow:0 0 10px 3px rgba(216,201,240,.45)}
.hotspot.damaged::before{background:#b8535f;box-shadow:0 0 10px 3px rgba(184,83,95,.45)}
body.mode-story .hotspot svg,body.mode-story .hotspot span{opacity:.92}
body.mode-story .hotspot span{opacity:1}
.stage.glow-on .hotspot svg,.stage.glow-on .hotspot span{opacity:1}
.stage.glow-on .hotspot::before{opacity:1;transform:scale(1.7);animation:none}
@keyframes stage-glimmer{0%,84%,100%{opacity:.4;transform:scale(.85)}91%{opacity:1;transform:scale(1.25)}}
body.reduce-motion .hotspot::before{animation:none}

/* Layout: two stacked overlay zones. .stage-top (HUD, act tabs, clue list) hangs from the top and .stage-bottom
   (next-step guide, dialogue, inventory) rises from the bottom. Children flow inside them, so nothing is
   positioned with magic offsets and nothing can overlap when text wraps or a bar grows. */
.stage{--edge-l:max(12px,env(safe-area-inset-left,0px));--edge-r:max(12px,env(safe-area-inset-right,0px))}
.stage-top,.stage-bottom{position:absolute;left:0;right:0;z-index:4;display:flex;flex-direction:column;gap:8px;padding-left:var(--edge-l);padding-right:var(--edge-r);pointer-events:none}
.stage-top{top:0;z-index:5;padding-top:calc(env(safe-area-inset-top,0px) + 10px);padding-bottom:26px;background:linear-gradient(rgba(8,6,8,.86),rgba(8,6,8,.5) 62%,rgba(8,6,8,0))}
.stage-bottom{bottom:0;padding-bottom:calc(env(safe-area-inset-bottom,0px) + 10px)}
.stage-bottom-row{display:flex;flex-direction:column;gap:8px;min-width:0}
.stage-top button,.stage-top select,.stage-top summary,.stage-top .clue-panel,.stage-top .hud-objective,.stage-bottom>.journey-guide{pointer-events:auto}
.stage-bottom-row>*{pointer-events:auto}

/* HUD: chapter on the left, tools on the right, the objective on its own row beneath. */
.hud{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"chapter tools" "center center";gap:8px 10px;align-items:start}
.hud-chapter{grid-area:chapter;min-width:0}
.hud-center{grid-area:center;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.hud-tools{grid-area:tools;display:flex;gap:6px;justify-content:flex-end}
/* The chapter kicker stays on one line; on phones it used to wrap into the title beneath it. */
.hud-kicker{display:block;font:11px/1 Georgia,serif;letter-spacing:3px;color:var(--stage-gold);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hud-chapter h1{margin:5px 0 0;font:600 18px/1.25 var(--serif);letter-spacing:2px;color:var(--stage-text);overflow-wrap:anywhere}
.hud-subtitle{display:none;margin:2px 0 0;font-size:12px;color:var(--stage-muted);letter-spacing:1px}
.hud-objective{margin:0;display:inline-flex;flex-wrap:wrap;gap:2px 8px;align-items:baseline;max-width:100%;padding:6px 12px;border:1px solid var(--stage-line);border-radius:4px;background:rgba(16,15,16,.78);font-size:13px;line-height:1.5;color:var(--stage-text)}
.hud-label{color:var(--stage-gold);letter-spacing:2px;font-size:11px}
.hud-meta{margin:0;display:flex;align-items:center;gap:10px;font-size:12px;color:var(--stage-muted);padding-left:4px}
.hud-meta progress{display:none;width:88px;height:6px;accent-color:var(--stage-gold)}
.hud-meta time{display:none}
#timer{font-variant-numeric:tabular-nums}
.hud .tool-button{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:44px;min-height:44px;padding:0;border-radius:999px;border:1px solid var(--stage-line);background:rgba(16,15,16,.8);color:var(--stage-gold-hi);font:inherit;font-size:16px;cursor:pointer}
.hud .tool-button[aria-pressed="true"],.hud .tool-button:disabled{border-color:var(--stage-gold-hi)}
.hud .tool-button:disabled{opacity:.5}
.hud .tool-button b{position:absolute;top:-5px;right:-4px;min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:#8d2d3b;color:#fff;font-size:11px;line-height:18px;text-align:center;font-weight:400}
.hud .tool-label{display:none;font-size:13px;letter-spacing:1px}

/* Sub-bar: act tabs scroll sideways; the clue list is a pill that opens a drop-down panel, so it never pushes the layout. */
.stage-subbar{display:flex;align-items:flex-start;gap:8px;min-width:0}
.room-tabs{flex:1 1 auto;min-width:0;display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;border:0;padding:1px 0 2px;-webkit-overflow-scrolling:touch}
.room-tabs::-webkit-scrollbar{display:none}
.room-tabs button{flex:0 0 auto;white-space:nowrap;min-height:36px;padding:4px 10px;letter-spacing:0;border:1px solid var(--stage-line);border-radius:4px;background:rgba(16,15,16,.78);font-size:12px;color:var(--stage-muted);cursor:pointer}
.room-tabs button.active{color:var(--stage-gold-hi);border-color:var(--stage-gold-hi)}
.room-tabs button:disabled{opacity:.62;cursor:default}
/* Act picker below 1024px: seven act tabs need about 830px, so a narrower strip would clip the last acts with no scrollbar.
   The select lists all seven acts in one 44px control. 16px text stops iOS zooming in. */
.room-select{display:none;flex:1 1 auto;min-width:0;min-height:44px;padding:0 34px 0 14px;border:1px solid var(--stage-gold-hi);border-radius:4px;background:rgba(16,15,16,.82) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23e2cc9b' stroke-width='1.6'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E") no-repeat right 12px center/12px 12px;color:var(--stage-gold-hi);font:inherit;font-size:16px;letter-spacing:0;appearance:none;-webkit-appearance:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;cursor:pointer}
.room-select option{background:#15121a;color:var(--stage-text)}
.room-select option:disabled{color:#7a7065}
@media (max-width:1023px){
 .room-tabs{display:none}
 .room-select{display:block}
}
/* Act numbers were 9px (the site-wide button span rule); they sit above each title, so 11px keeps two short lines. */
.room-tabs button span{font-size:11px;letter-spacing:1.5px;margin-bottom:2px}
/* Touch screens get 44px act tabs, the same size as the other tool buttons. */
@media (pointer:coarse){
 .room-tabs button{min-height:44px}
}
.scene-clues{position:relative;flex:0 0 auto;margin:0;padding:0;border:0;background:none;font-size:13px}
.scene-clues summary{display:flex;align-items:center;gap:6px;min-height:44px;padding:0 12px;list-style:none;cursor:pointer;color:var(--stage-gold-hi);white-space:nowrap;border:1px solid var(--stage-line);border-radius:4px;background:rgba(16,15,16,.82);font-size:12px;letter-spacing:1px}
.scene-clues summary::-webkit-details-marker{display:none}
.scene-clues summary .summary-chevron{display:grid;place-items:center;transition:transform .2s}
.scene-clues summary .summary-chevron svg{width:14px;height:14px}
.scene-clues[open] summary{border-color:var(--stage-gold-hi)}
.scene-clues[open] summary .summary-chevron{transform:rotate(180deg)}
.scene-clues .clue-panel{position:absolute;right:0;top:calc(100% + 8px);z-index:6;width:min(360px,calc(100vw - 24px));max-height:min(calc(100dvh - 300px),460px);min-height:min(220px,60dvh);overflow:auto;overscroll-behavior:contain;padding:12px;background:var(--stage-panel);border:1px solid var(--stage-line);border-radius:var(--stage-radius);box-shadow:0 14px 40px rgba(0,0,0,.6)}
.clue-hint{margin:0 2px 10px;font-size:12px;line-height:1.5;color:var(--stage-muted)}
.scene-clues .clue-list{display:flex;flex-direction:column;gap:14px;margin:0}
.clue-group{display:flex;flex-direction:column;gap:4px}
.clue-group-title{display:flex;align-items:baseline;justify-content:space-between;margin:0 2px 2px;font-size:12px;letter-spacing:2px;color:var(--stage-gold-hi)}
.clue-group-title span{font-size:11px;letter-spacing:0;color:var(--stage-muted);font-variant-numeric:tabular-nums}
.scene-clues .clue-row{display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;min-height:44px;padding:6px 10px;text-align:left;color:var(--stage-text);border:1px solid transparent;border-radius:var(--stage-radius-sm);background:rgba(255,255,255,.035)}
.scene-clues .clue-row:hover,.scene-clues .clue-row:focus-visible{background:rgba(226,204,155,.1);border-color:var(--stage-line)}
.clue-row .clue-icon{display:grid;place-items:center;color:var(--stage-gold)}
.clue-row .clue-icon svg{width:20px;height:20px}
.clue-row .clue-name{font-size:14px;line-height:1.45;overflow-wrap:anywhere}
.clue-row .clue-state{display:inline-flex;align-items:center;gap:6px;font-size:12px;line-height:1;letter-spacing:.5px;white-space:nowrap;color:var(--stage-muted)}
.clue-row .clue-state::before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.55}
.clue-row.new .clue-state{color:var(--stage-gold-hi)}
.clue-row.new .clue-state::before{opacity:1;box-shadow:0 0 6px rgba(226,204,155,.7)}
.clue-row.todo .clue-state{color:#e0a8ae}
.clue-row.todo .clue-state::before{opacity:1}
.clue-row.done .clue-icon{opacity:.6}
.scene-clues .clue-count{font-weight:400;font-size:12px;letter-spacing:0;color:var(--stage-muted);font-variant-numeric:tabular-nums}
.pause-hint{align-self:flex-end;margin:0;font-size:12px;color:var(--stage-muted)}
.pause-hint.hidden{display:none}

/* Next-step guide (story mode only): one compact card above the dialogue. */
.journey-guide{display:none;margin:0;padding:10px 12px;align-items:center;gap:6px 12px;grid-template-columns:minmax(0,1fr) auto;background:var(--stage-panel);border:1px solid var(--stage-line);border-left:2px solid var(--stage-gold);border-radius:var(--stage-radius)}
body.mode-story .journey-guide{display:grid}
.journey-guide>div{min-width:0}
.journey-guide h2{position:absolute;width:1px;height:1px;margin:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.journey-guide p{margin:0;font-size:13px;line-height:1.55;color:var(--stage-text);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.journey-guide button{flex:none;align-self:center;min-height:44px;padding:6px 14px;font-size:13px;white-space:nowrap}

/* Dialogue: header row (speaker, collapse toggle, actions) stays put; only the narrative text scrolls. */
.dialogue{display:flex;flex-direction:column;gap:6px;min-width:0;padding:10px 14px;background:var(--stage-panel);border:1px solid var(--stage-line);border-radius:var(--stage-radius);overflow:hidden}
.dialogue-head{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px}
.dialogue-portrait{display:none;width:40px;height:40px;flex:0 0 auto;place-items:center;border:1px solid var(--stage-gold);color:var(--stage-gold-hi);font-size:16px;background:radial-gradient(circle at 50% 35%,rgba(226,204,155,.2),transparent 65%),#15121a}
.speaker{margin:0;flex:1 1 auto;min-width:0;font-size:12px;letter-spacing:3px;color:var(--stage-gold-hi)}
.dialogue-toggle{min-height:44px;padding:0 6px;font-size:12px;color:var(--stage-gold);letter-spacing:1px;white-space:nowrap}
.dialogue-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:flex-end;margin:0 0 0 auto}
.dialogue-actions .primary-button,.dialogue-actions .secondary-button{min-height:44px;padding:8px 14px;font-size:13px;white-space:nowrap}
.scene-progress{display:none;font-size:12px;color:var(--stage-muted)}
.narrative{margin:0;font:15px/1.8 var(--serif);color:var(--stage-text);white-space:pre-line;max-height:min(30dvh,260px);overflow:auto;overscroll-behavior:contain;padding-right:2px}
.dialogue.collapsed .narrative,.dialogue.collapsed .dialogue-foot{display:none}
/* Scene lines: a click on the text (or 繼續) finishes the line being typed, then moves on. */
.narrative{cursor:pointer}
.narrative.typing .letter{opacity:0;animation:type-in .01s linear forwards;animation-delay:calc(var(--i) * 32ms)}
@keyframes type-in{to{opacity:1}}
.sr-speaker{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.dialogue-toggle.unread{color:var(--stage-gold-hi)}
.dialogue-toggle.unread::before{content:'';display:inline-block;width:6px;height:6px;margin-right:6px;border-radius:50%;background:var(--stage-gold-hi);vertical-align:middle}
.dialogue-foot{display:flex;align-items:center;gap:8px;justify-content:flex-end}
.dialogue-foot>[hidden]{display:none}
.dialogue-count{margin-right:auto;font-size:12px;letter-spacing:1px;color:var(--stage-muted);font-variant-numeric:tabular-nums}
.dialogue-foot .text-button{min-height:44px;padding:0 6px;font-size:12px;letter-spacing:1px;color:var(--stage-gold)}
.dialogue-foot .secondary-button{min-height:44px;padding:8px 14px;font-size:13px;white-space:nowrap}
.dialogue-portrait.has-portrait{overflow:hidden}
.dialogue-portrait img{width:100%;height:100%;object-fit:cover;object-position:50% 16%}

/* Inventory tray: label on the left, items scroll sideways. */
.tray{display:flex;align-items:center;flex-wrap:wrap;gap:4px 12px;min-width:0;padding:8px 12px;background:var(--stage-panel);border:1px solid var(--stage-line);border-radius:var(--stage-radius)}
.tray .inventory-heading{display:flex;flex-direction:column;align-items:flex-start;gap:2px;margin:0;flex:0 0 auto}
.tray .inventory-heading h2{margin:0;font-size:11px;letter-spacing:2px;color:var(--stage-muted);white-space:nowrap}
.tray #inventory-count{font-size:11px;color:var(--stage-muted)}
.tray .inventory{display:flex;flex:1 1 0;min-width:0;gap:8px;overflow-x:auto;padding:2px;scroll-snap-type:x proximity;scrollbar-width:thin}
.tray .inventory button{flex:0 0 68px;width:68px;min-height:60px;padding:4px;scroll-snap-align:start;border:1px solid var(--stage-line);border-radius:var(--stage-radius-sm);background:rgba(0,0,0,.4);display:grid;place-items:center;gap:2px;color:var(--stage-gold-hi)}
.tray .inventory button span{font-size:11px;line-height:1.3;text-align:center;max-width:100%;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}
.tray .inventory-empty{margin:0;padding:0;border:0;font-size:12px;line-height:44px;color:var(--stage-muted);text-align:left;white-space:nowrap}
.tray .save-indicator{display:none;flex:0 0 100%;margin:2px 0 0;font-size:11px;color:var(--stage-muted)}

/* Tablet portrait and large phones: the same stack, with more room for the text. */
@media (min-width:600px){
 .hud-chapter h1{font-size:20px;letter-spacing:3px}
 .hud-subtitle{display:block}
 .narrative{font-size:16px}
 .scene-progress{display:inline}
 .dialogue-portrait{display:grid}
}

/* Desktop and landscape tablets: three-column HUD, dialogue and tray side by side. */
@media (min-width:900px) and (min-height:521px){
 .stage-top{padding-top:calc(env(safe-area-inset-top,0px) + 14px);gap:10px;--edge-l:max(24px,env(safe-area-inset-left,0px));--edge-r:max(24px,env(safe-area-inset-right,0px))}
 .stage-bottom{gap:10px;padding-bottom:calc(env(safe-area-inset-bottom,0px) + 24px);--edge-l:max(24px,env(safe-area-inset-left,0px));--edge-r:max(24px,env(safe-area-inset-right,0px))}
 .hud{grid-template-columns:minmax(0,1fr) minmax(0,auto) minmax(0,1fr);grid-template-areas:"chapter center tools";gap:16px}
 .hud-tools{flex-wrap:nowrap}
 .hud-center{align-items:center;max-width:min(56ch,40vw)}
 .hud-objective{border-radius:4px;padding:6px 16px}
 .hud-meta{justify-content:center;padding-left:0}
 .hud-meta progress,.hud-meta time{display:inline-block}
 .hud-tools{gap:8px}
 .hud .tool-button{padding:0 14px;font-size:15px}
 .hud .tool-button{white-space:nowrap}
 .stage-bottom-row{flex-direction:row;align-items:flex-end;gap:16px}
 .dialogue{flex:1 1 0;max-width:680px;padding:14px 18px}
 .narrative{max-height:min(34dvh,300px)}
 .tray{flex:0 0 clamp(300px,28vw,390px);margin-left:auto;align-items:stretch;flex-direction:column;flex-wrap:nowrap;gap:6px;padding:12px 14px}
 .tray .inventory-heading{flex-direction:row;justify-content:space-between;align-items:center;width:100%}
 .tray .inventory{flex:0 0 auto;flex-wrap:wrap;overflow:visible}
 .tray .inventory button{flex:0 0 64px;width:64px;min-height:60px}
 .tray .inventory button span{-webkit-line-clamp:1;overflow-wrap:normal;text-overflow:ellipsis;white-space:nowrap;display:block}
 .tray .inventory-empty{line-height:1.7}
 .tray .save-indicator{display:block}
 .journey-guide{align-self:flex-start;width:min(680px,100%)}
 .scene-clues .clue-panel{width:min(380px,calc(100vw - 48px));max-height:min(calc(100dvh - 440px),480px)}
 .view-arrow{top:46%}
}

@media (min-width:1200px) and (min-height:521px){
 .hud .tool-button{padding:0 14px}
 .hud .tool-label{display:inline}
}

/* Short landscape (phones on their side): everything shrinks to a single thin HUD row and a two-column footer. */
@media (max-height:520px) and (min-width:600px){
 .stage-top{gap:6px;padding-top:calc(env(safe-area-inset-top,0px) + 6px);padding-bottom:16px}
 .stage-bottom{gap:6px;padding-bottom:calc(env(safe-area-inset-bottom,0px) + 6px)}
 .hud{grid-template-columns:minmax(120px,auto) minmax(0,1fr) auto;grid-template-areas:"chapter center tools";gap:12px;align-items:center}
 .hud-kicker,.hud-subtitle{display:none}
 .hud-chapter h1{margin:0;font-size:16px;letter-spacing:2px}
 .hud-center{align-items:center;flex-direction:row;justify-content:center;gap:10px}
 .hud-objective{display:block;border-radius:4px;padding:4px 12px;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .hud-meta{flex:0 0 auto}
 .hud .tool-button{min-width:40px;min-height:40px}
 .room-tabs button{min-height:32px}
 .scene-clues summary{min-height:32px}
 .stage-bottom-row{flex-direction:row;align-items:flex-end;gap:10px}
 .dialogue{flex:1 1 0;padding:8px 12px}
 .narrative{max-height:34dvh;font-size:14px;line-height:1.7}
 .tray{flex:0 0 min(300px,34vw);margin-left:auto;padding:6px 10px}
 .journey-guide{padding:6px 10px}
 .journey-guide p{-webkit-line-clamp:2;font-size:12px}
 .journey-guide button{min-height:40px}
 .view-arrow{top:40%}
 .scene-clues .clue-panel{max-height:60dvh;width:min(380px,calc(100vw - 24px))}
}

/* Very short screens: the scene matters more than the story-mode guide; the hint tool still gives the next step. */
@media (max-height:420px){
 body.mode-story .journey-guide{display:none}
}
@media (max-height:600px) and (max-width:480px){
 .journey-guide p{-webkit-line-clamp:2}
}

/* Very narrow phones: five 44px tools no longer fit beside the title, so the gallery lives in the pause menu there. */
@media (max-width:359px){
 .gallery-toolbar-button{display:none}
 .hud-chapter h1{font-size:16px;letter-spacing:1px}
}
@media (max-width:420px){
 .dialogue-actions .primary-button{padding:8px 12px;font-size:12px}
 /* Six tools (hint, candle, journal, gallery, sound, menu) share the row with the chapter title. */
 .hud-tools{gap:4px}
 .hud .tool-button{min-width:40px;min-height:40px}
 .hud-chapter h1{font-size:17px;letter-spacing:1px}
}
@media (max-width:380px){
 .hud-tools{gap:3px}
 .hud-chapter h1{font-size:16px;letter-spacing:.5px}
}

/* Hotspot rings from the site stylesheet are replaced by the glimmer dot. */
#hotspots .hotspot{box-shadow:none}

/* Chapter opening card: a full-screen title that shows once when a new act begins. */
.chapter-opening{position:fixed;inset:0;z-index:60;display:grid;place-content:center;justify-items:center;gap:12px;padding:28px;text-align:center;background:radial-gradient(ellipse at 50% 40%,rgba(52,12,20,.92),#050405 74%);color:var(--stage-text);cursor:pointer;animation:stage-card-in .9s ease both}
.chapter-opening-number{margin:0;font:12px Georgia,serif;letter-spacing:4px;color:var(--stage-gold)}
.chapter-opening h2{margin:0;font:600 clamp(28px,6vw,46px)/1.25 var(--serif);letter-spacing:6px}
.chapter-opening-subtitle{margin:0;color:var(--stage-gold-hi);font-size:16px;letter-spacing:2px}
.chapter-opening-quote{max-width:34em;margin:6px 0 0;color:var(--stage-muted);font:15px/1.9 var(--serif)}
.chapter-opening button{margin-top:14px;min-height:44px}
@keyframes stage-card-in{from{opacity:0}to{opacity:1}}
body.reduce-motion .chapter-opening{animation:none}


@media (prefers-reduced-motion:reduce){
 .game *{transition-duration:.01ms!important;animation-duration:.01ms!important}
}

/* Idle whisper: after a long pause the mirror's hint button glows gently (plan §5.5). */
.hud .tool-button.whisper{border-color:var(--stage-gold-hi);animation:stage-whisper 2.6s ease-in-out infinite}
@keyframes stage-whisper{0%,100%{box-shadow:0 0 0 0 rgba(226,204,155,0)}50%{box-shadow:0 0 18px 4px rgba(226,204,155,.42)}}
body.reduce-motion .hud .tool-button.whisper{animation:none;box-shadow:0 0 0 2px rgba(226,204,155,.35)}

/* First-visit pan hint on phones; it fades once the player starts panning. */
.pause-menu{display:grid;gap:10px}
@media (max-width:720px){
 .scene::after{content:'⟷ 左右滑動環顧房間';position:absolute;left:50%;top:44%;transform:translateX(-50%);z-index:3;padding:4px 12px;border:1px solid var(--stage-line);border-radius:4px;background:rgba(16,15,16,.72);color:var(--stage-gold-hi);font-size:12px;pointer-events:none;white-space:nowrap;animation:stage-pan-hint 1s 7s forwards}
 .scene.panned::after{display:none}
}
@keyframes stage-pan-hint{to{opacity:0}}

/* Views: arrows on both sides of the scene (the arrow keys switch views too) */
.view-arrow{position:absolute;top:46%;z-index:4;width:44px;height:44px;border-radius:50%;border:1px solid var(--stage-line);background:rgba(16,15,16,.55);color:var(--stage-gold-hi);display:grid;place-items:center;padding:0;line-height:0}
.view-arrow>span{display:grid;place-items:center;width:100%;height:100%}
.view-arrow svg{width:24px;height:24px;display:block;transition:transform .25s}
.view-arrow{box-shadow:inset 0 0 0 3px rgba(16,15,16,.55),inset 0 0 0 4px rgba(226,204,155,.26),0 2px 14px rgba(0,0,0,.45)}
#view-prev:hover svg,#view-prev:focus-visible svg{transform:translateX(-2px)}#view-next:hover svg,#view-next:focus-visible svg{transform:translateX(2px)}
@media (prefers-reduced-motion:reduce){.view-arrow svg{transition:none}#view-prev:hover svg,#view-next:hover svg{transform:none}}
.view-arrow[hidden]{display:none}
#view-prev{left:8px}#view-next{right:8px}
.view-arrow:hover,.view-arrow:focus-visible{background:rgba(16,15,16,.85);border-color:var(--stage-gold-hi);box-shadow:inset 0 0 0 3px rgba(16,15,16,.85),inset 0 0 0 4px rgba(226,204,155,.5),0 0 18px rgba(226,204,155,.22)}
.clue-view{font-style:normal;color:var(--stage-muted);font-size:11px}

/* One icon family (icons.js): sizes are set here so every glyph in the play route shares a grid and line weight. */
.stage .ui-icon{display:block;flex:none}
.hud .tool-icon{display:grid;place-items:center}
.hud .tool-icon svg{width:22px;height:22px}
.dialogue-portrait svg{width:22px;height:22px;display:block}
.dialogue-portrait{border-radius:50%}
.tray .inventory button{gap:3px;color:var(--stage-gold-hi)}
.tray .inventory button svg{width:24px;height:24px}
.tray .inventory button:hover:not(:disabled){border-color:var(--stage-gold-hi);background:rgba(226,204,155,.08)}
.hotspot svg{width:26px;height:26px}
.game-meta i{display:inline-grid;vertical-align:-3px;margin-right:6px;color:var(--gold)}
.game-meta i svg{width:15px;height:15px}
.game-meta span{display:inline-flex;align-items:center}
.ending-symbol{display:inline-grid;place-items:center}
.ending-symbol svg,.success-gem svg{width:48px;height:48px}
.success-gem{display:grid;place-items:center}

/* Title screen: the secondary action matches the primary one in height and shape. */
.hero-buttons .text-button{min-height:54px;padding:0 24px;border:1px solid var(--line);border-radius:4px;background:transparent}
.hero-buttons .text-button:hover:not(:disabled){border-color:var(--gold);background:rgba(195,172,128,.08)}
.hero-buttons button{transition:none}

/* Arrows inside buttons are icons too (see enableButtonArrows): the quill from icons.js, drawn in the button's own gold. */
.btn-arrow{display:inline-grid;place-items:center;width:18px;height:18px;flex:none;line-height:0;font-size:inherit;vertical-align:middle;color:var(--stage-gold-hi)}
.btn-arrow svg{width:100%;height:100%}
/* Burgundy actions keep one antique-gold hairline, so the arrow in them reads as part of the same metal. */
.primary-button{border-color:var(--btn-gold-line);background:linear-gradient(180deg,var(--btn-red-top),var(--btn-red-bottom));color:#f6eee2;box-shadow:inset 0 1px 0 rgba(255,230,222,.14),0 6px 18px rgba(0,0,0,.35)}
.primary-button:hover:not(:disabled){background:linear-gradient(180deg,var(--btn-red-hover-top),var(--btn-red-hover-bottom));border-color:var(--stage-gold-hi);box-shadow:inset 0 1px 0 rgba(255,230,222,.18),0 8px 22px rgba(0,0,0,.4)}
.primary-button .btn-arrow{transition:transform .2s ease-out}
.primary-button:hover:not(:disabled) .btn-arrow{transform:translateX(3px)}
@media (prefers-reduced-motion:reduce){.primary-button .btn-arrow{transition:none}.primary-button:hover:not(:disabled) .btn-arrow{transform:none}}
.modal-shell .primary-button,.dialogue-actions .primary-button,.journey-guide button{gap:10px}
@media (max-width:600px){
 .hero-buttons{flex-direction:column;align-items:stretch;gap:10px}
 .hero-buttons button{justify-content:center;width:100%}
}

/* Settings: the volume group follows the same row rhythm as the toggles above it. */
.settings-volume{margin:0;padding:16px 0 8px;border:0;border-bottom:1px solid var(--line);min-width:0}
.settings-volume legend{padding:0;margin-bottom:6px;font-size:13px;color:var(--text)}
.settings-slider{display:grid;grid-template-columns:5.5em minmax(0,1fr);align-items:center;gap:14px;min-height:44px;font-size:13px;color:var(--muted)}
.settings-slider input{width:100%;margin:0;accent-color:var(--gold)}

/* Gallery: every card shows its picture in the same 4:3 frame; the preview dialog still shows the whole image. */
.artwork-card img{object-fit:cover;object-position:50% 22%}
.gallery-filters button{border-radius:4px}
.gallery-listening{padding:4px 18px;border-radius:var(--stage-radius)}
.gallery-listening[open]{padding-bottom:18px}
.gallery-listening summary{display:flex;align-items:center}
.artwork-card{border-radius:var(--stage-radius)}
.artwork-locked>div svg{width:56px;height:56px}

/* Choice rows (epilogue, seals, last choice): label on the left, arrow pinned right, same height and corners as other buttons. */
.choice-option{min-height:52px;font-size:14px;border-radius:var(--stage-radius-sm)}
.choice-option .btn-arrow{float:right;margin:.3em 0 0 12px}
.choice-option::after{content:'';display:block;clear:both}

/* Ending: breathing room between the recap card and the buttons, and one rhythm for the button stack. */
.ending-recap{margin:20px 0 24px;border-radius:var(--stage-radius)}
.ending-buttons{gap:12px}
.ending-buttons .primary-button,.ending-buttons .text-button{min-height:52px}
.ending-buttons .text-button{color:var(--gold)}
/* Replay (重玩小遊戲): one thumbnailed card per finished mini-game, shared by the clear screen and the picker. */
.ending-replay{margin:0 auto 28px;max-width:640px;text-align:center}
.ending-replay h2{margin:0 0 6px}
.replay-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:10px;text-align:left}
#modal .replay-grid{grid-template-columns:1fr}
.replay-card{display:flex;align-items:center;gap:12px;width:100%;min-height:64px;padding:8px 12px;font:inherit;font-size:14px;line-height:1.4;color:var(--text);text-align:left;border:1px solid var(--line);border-radius:var(--stage-radius-sm);background:rgba(255,255,255,.03);cursor:pointer}
.replay-card:hover,.replay-card:focus-visible{border-color:var(--gold);background:rgba(195,172,128,.08)}
.replay-thumb{flex:0 0 96px;width:96px;height:55px;object-fit:cover;border:1px solid var(--stage-line);border-radius:4px}
.replay-name{flex:1 1 auto;min-width:0}
.replay-arrow{flex:none;color:var(--gold)}
@media (max-width:560px){.replay-grid{grid-template-columns:1fr}}
.maze-key{display:grid;place-items:center;padding:0}
.pipe-actions button{display:inline-flex;align-items:center;justify-content:center;gap:6px}

/* Read log (回顧紀錄): speaker or spot name above each passage, newest at the end. */
.read-log{list-style:none;margin:0 0 18px;padding:0;display:grid;gap:12px}
.read-log-entry{padding:0 0 12px;border-bottom:1px solid var(--line)}
.read-log-speaker{margin:0 0 4px;font-size:12px;letter-spacing:2px;color:var(--gold)}
.read-log-entry.spot .read-log-speaker{color:var(--muted)}
.read-log-text{margin:0;white-space:pre-line;font:15px/1.9 var(--serif);color:#d2c6b6}
/* Game feel layer (juice.js): particles, soft flashes and the item that flies to the tray. It sits in the
   top layer above an open dialog and is never hit-tested, so it can't swallow a click. */
.fx-layer{position:fixed;inset:0;width:auto;height:auto;margin:0;padding:0;border:0;background:none;color:inherit;overflow:hidden;pointer-events:none;z-index:40}
.fx-particle{position:absolute;left:0;top:0;width:var(--s,6px);height:var(--s,6px);margin:calc(var(--s,6px) / -2) 0 0 calc(var(--s,6px) / -2);will-change:translate,opacity}
.fx-mote{border-radius:50%;background:radial-gradient(circle,#fff6dc 0,var(--stage-gold-hi) 45%,rgba(195,172,128,.35) 70%,rgba(195,172,128,0) 100%);box-shadow:0 0 8px 1px rgba(226,204,155,.55)}
.fx-shard{background:linear-gradient(135deg,#f4fbff,var(--stage-frost) 60%,rgba(159,182,200,.25));clip-path:polygon(50% 0,100% 100%,0 70%)}
.fx-flash{position:absolute;inset:0;opacity:0}
.fx-flash-gold{background:radial-gradient(ellipse at 50% 45%,rgba(226,204,155,.3),rgba(226,204,155,.07) 45%,transparent 70%)}
.fx-flash-pale{background:radial-gradient(ellipse at 50% 45%,rgba(220,236,248,.26),transparent 65%)}
.fx-flash-blood{background:radial-gradient(ellipse at 50% 50%,transparent 42%,rgba(141,45,59,.42) 100%)}
.fx-fly{position:absolute;left:0;top:0;display:grid;place-items:center;width:40px;height:40px;margin:-20px 0 0 -20px;border:1px solid var(--stage-gold);border-radius:50%;background:radial-gradient(circle at 50% 35%,rgba(226,204,155,.22),transparent 70%),#15121a;color:var(--stage-gold-hi);box-shadow:0 0 18px 2px rgba(226,204,155,.5),0 6px 16px rgba(0,0,0,.6)}
.fx-fly svg{width:22px;height:22px}
/* The toast becomes a manual popover so it can show above an open dialog; undo the popover UA box. */
.toast[popover]{top:auto;right:auto;margin:0;color:var(--text)}

/* Header: the brand mark is the crowned mirror; the actions share one chip shape and one 18px icon. The sound icon
   is a block, so it centers on its label instead of sitting on the text baseline. */
nav button{font-size:13px}
.brand{gap:14px}
.brand-mark{width:44px;height:44px;filter:drop-shadow(0 0 12px rgba(195,172,128,.16))}
.brand small{font-size:10px;letter-spacing:3px;color:#a8946f;margin-top:2px}
.header-actions{gap:10px}
.sound-button,.header-actions .icon-button{height:40px;min-height:40px;border:1px solid var(--line);border-radius:4px;color:var(--gold);transition:border-color .2s,background .2s,color .2s}
.sound-button{display:inline-flex;align-items:center;gap:8px;padding:0 16px 0 13px;font-size:12px;line-height:1;letter-spacing:1.5px;color:var(--muted)}
.header-actions .icon-button{width:40px;padding:0}
#sound-icon{display:grid;place-items:center;flex:none;width:18px;height:18px;color:var(--gold)}
#sound-icon svg,.header-actions .icon-button svg{display:block;width:18px;height:18px}
.sound-button[aria-pressed="true"]{color:var(--text);border-color:rgba(195,172,128,.45);background:rgba(195,172,128,.08)}
.sound-button:hover:not(:disabled),.header-actions .icon-button:hover:not(:disabled){color:var(--text);border-color:var(--gold);background:rgba(195,172,128,.08)}
@media(max-width:850px){
 .header-actions{gap:8px}
 .sound-button,.header-actions .icon-button{height:44px;min-height:44px}
 .header-actions .icon-button{width:44px}
}
@media(max-width:560px){
 .sound-button{width:44px;padding:0;justify-content:center}
 .brand-mark{width:36px;height:36px}
 .brand small{font-size:10px;letter-spacing:2px}
}

/* Title screen: the hero grows with its content and the bottom strip sits in the flow, so the meta row and the
   age badge never slide under its rule or get clipped by the hero edge. */
.hero{display:flex;flex-direction:column;height:auto;max-height:none;min-height:max(720px,calc(100svh - 140px))}
.hero-content{flex:1 0 auto;padding-bottom:48px}
.hero-bottom{position:relative;inset:auto;flex:none;margin:0 5.4%;font-size:12px;color:#9a8e80}
.hero-bottom button{font-size:12px}
.hero-description{font-size:14px}
.game-meta{flex-wrap:wrap;gap:10px 28px;font-size:13px;color:#bcae9b}
.game-meta i{margin-right:8px}
.game-meta i svg{width:16px;height:16px}
.content-note{flex-wrap:wrap;gap:8px 12px;margin-top:16px;font-size:12px;line-height:1.6;color:#968b80}
.content-note span{display:inline-flex;align-items:center;justify-content:center;flex:none;height:22px;padding:0 8px;border:1px solid rgba(195,172,128,.45);border-radius:4px;font:600 11px/1 Georgia,serif;letter-spacing:.5px;color:var(--gold)}
@media(max-width:1150px){.hero-description{font-size:13px}}
@media(max-width:560px){
 .game-meta{gap:10px 20px;font-size:12px}
 .hero-bottom{margin:0 24px;height:auto;min-height:63px;padding:12px 0;gap:12px}
 .hero-bottom>span{font-size:11px;letter-spacing:1px}
 .hero-bottom button{font-size:11px;letter-spacing:1px}
}
.hero-bottom>span{word-break:keep-all}

/* Home: a sealed chapter reads as unavailable (no forward arrow, quieter text); tapping it still explains why.
   Small print on the home page stays at 11px or larger so it survives a phone held at arm's length. */
.chapter-card.locked{background:#141115}
.chapter-card.locked h3{color:#a99c8b}
.chapter-card.locked .card-number{color:#c1a67955}
.chapter-card:not(.locked):hover{border-color:rgba(195,172,128,.45)}
.chapter-card .card-status{font-size:11px}
.chapter-card p{font-size:12px}
.section-heading .eyebrow{font-size:10px}
.section-heading>p{font-size:13px}
.story-strip button,footer,footer button{font-size:12px}
@media(max-width:560px){.section-heading .eyebrow{font-size:10px}footer{font-size:11px}}

/* Artifact frame (concept boards): every dialog reads as a gilded panel, not a plain card.
   Double gold rule, corner brackets and a warm glow from the top edge; all gradients, no extra files. */
dialog#modal{
 background:radial-gradient(130% 60% at 50% 0,#2b1621 0,#1a1419 48%,#121015 100%);
 border-color:#bc9f6755;
 box-shadow:0 30px 100px #000c,0 0 60px #6d1c2a33,inset 0 0 0 6px #0e0b10,inset 0 0 0 7px #bc9f6738;
}
dialog#modal::backdrop{background:radial-gradient(circle at 50% 40%,#2a0c1599,#050407e6 70%);backdrop-filter:blur(8px)}
#modal .modal-heading{background:none;border-bottom:0}
#modal .modal-heading::after{content:'';position:absolute;left:32px;right:32px;bottom:4px;height:1px;
 background:linear-gradient(90deg,transparent,#bc9f6788 18%,#bc9f6788 82%,transparent)}
#modal .modal-heading::before{content:'';position:absolute;left:50%;bottom:1px;width:7px;height:7px;margin-left:-3px;transform:rotate(45deg);background:#d9bf8a;z-index:1}
#modal .modal-close{right:20px;top:20px}
#modal .modal-close .ui-icon{width:22px;height:22px;margin:auto}
#modal .modal-shell::after{content:'';position:absolute;inset:11px;pointer-events:none;z-index:2;
 --g:#d9bf8aaa;
 background:
  linear-gradient(var(--g),var(--g)) 0 0/20px 1px,linear-gradient(var(--g),var(--g)) 0 0/1px 20px,
  linear-gradient(var(--g),var(--g)) 100% 0/20px 1px,linear-gradient(var(--g),var(--g)) 100% 0/1px 20px,
  linear-gradient(var(--g),var(--g)) 0 100%/20px 1px,linear-gradient(var(--g),var(--g)) 0 100%/1px 20px,
  linear-gradient(var(--g),var(--g)) 100% 100%/20px 1px,linear-gradient(var(--g),var(--g)) 100% 100%/1px 20px;
 background-repeat:no-repeat}
#modal .modal-image-icon{width:84px;height:84px;margin:0 auto 20px;border-radius:50%;
 background:radial-gradient(circle,#c3ac8029,transparent 68%);border:1px solid #bc9f6744}
#modal .modal-image-icon svg{width:40px;height:40px}
#modal .modal-text{text-shadow:0 1px 0 #0006}
@media (max-width:560px){#modal .modal-heading::after{left:22px;right:22px}#modal .modal-close{right:14px;top:14px}#modal .modal-shell::after{inset:8px}}

/* 較大閱讀文字 (settings): the scene narrative already grows; the labels around it used to stay at 11–13px. */
.large-text .speaker{font-size:15px}
.large-text .dialogue-toggle,.large-text .dialogue-count,.large-text .clue-group-title span,.large-text .clue-view{font-size:14px}
.large-text .dialogue-foot .text-button,.large-text .dialogue-foot .secondary-button,.large-text .dialogue-actions .primary-button,.large-text .dialogue-actions .secondary-button{font-size:15px}
/* Block flow, not the phone's flex row: the label runs on into the sentence instead of taking a line of its own. */
.large-text .hud-objective{display:block;font-size:14px;line-height:1.5;white-space:normal;border-radius:4px}
.large-text .hud-objective .hud-label{display:inline;margin-right:.5em}
.large-text .hud-meta,.large-text .hud-kicker,.large-text .hud-label,.large-text .scene-clues summary{font-size:14px}
.large-text .room-tabs button span,.large-text .tray .inventory button span{font-size:13px}
.large-text .hotspot span{font-size:15px}
.large-text .clue-row .clue-name{font-size:16px}
.large-text .clue-row .clue-state{font-size:14px}

/* Gamepad navigation moves focus by script, so the ring is drawn on every focused control, not only on :focus-visible. */
body.gamepad-nav :is(button,select,input,summary,a):focus{outline:3px solid var(--stage-gold-hi,#e2cc9b);outline-offset:3px}
body.gamepad-nav .hotspot:focus svg,body.gamepad-nav .hotspot:focus span{opacity:1}

/* Phone frames are wider than the screen: unseen hotspots past an edge are counted in a chip row at the end of the
   top progress line (main.js). The row sits above the scene, so no chip ever covers a hotspot. */
.offscreen-chips{display:flex;gap:6px;margin-left:auto;flex:0 0 auto}
.offscreen-hint{min-height:44px;padding:0 12px;border:1px solid var(--stage-line);border-radius:4px;background:rgba(16,15,16,.78);color:var(--stage-gold-hi);font-size:12px;letter-spacing:.5px;white-space:nowrap}
.offscreen-hint[hidden]{display:none}
.offscreen-hint:hover,.offscreen-hint:focus-visible{background:rgba(16,15,16,.92);border-color:var(--stage-gold-hi)}

/* One frame for every panel: the modal's gold corner brackets (see #modal .modal-shell::after) drawn as background layers,
   so no extra elements or positioning are needed. Radii are two tiers: 4px for every rectangle, round only for icon buttons. */
.dialogue,.tray,.journey-guide,.scene-clues .clue-panel,.hud-objective{
 --br:rgba(217,191,138,.62);
 background-image:
  linear-gradient(var(--br),var(--br)),linear-gradient(var(--br),var(--br)),
  linear-gradient(var(--br),var(--br)),linear-gradient(var(--br),var(--br)),
  linear-gradient(var(--br),var(--br)),linear-gradient(var(--br),var(--br)),
  linear-gradient(var(--br),var(--br)),linear-gradient(var(--br),var(--br));
 background-size:12px 1px,1px 12px,12px 1px,1px 12px,12px 1px,1px 12px,12px 1px,1px 12px;
 background-position:left 4px top 4px,left 4px top 4px,right 4px top 4px,right 4px top 4px,left 4px bottom 4px,left 4px bottom 4px,right 4px bottom 4px,right 4px bottom 4px;
 background-repeat:no-repeat}
.hud-objective{background-image:none}

/* Divider: line, diamond, line (same as the modal heading). */
.divider{display:flex;align-items:center;gap:10px;margin:12px 0;color:var(--stage-gold)}
.divider::before,.divider::after{content:'';flex:1;height:1px;background:linear-gradient(90deg,transparent,var(--stage-line))}
.divider::after{background:linear-gradient(270deg,transparent,var(--stage-line))}
.divider i{width:6px;height:6px;transform:rotate(45deg);background:currentColor}

/* Chapter cards and abyss level rows wear the same brackets; the card's picture sits under them. */
.chapter-card::before{content:'';position:absolute;inset:6px;z-index:1;pointer-events:none;--br:rgba(217,191,138,.55);
 background:
  linear-gradient(var(--br),var(--br)) 0 0/12px 1px,linear-gradient(var(--br),var(--br)) 0 0/1px 12px,
  linear-gradient(var(--br),var(--br)) 100% 0/12px 1px,linear-gradient(var(--br),var(--br)) 100% 0/1px 12px,
  linear-gradient(var(--br),var(--br)) 0 100%/12px 1px,linear-gradient(var(--br),var(--br)) 0 100%/1px 12px,
  linear-gradient(var(--br),var(--br)) 100% 100%/12px 1px,linear-gradient(var(--br),var(--br)) 100% 100%/1px 12px;
 background-repeat:no-repeat;transition:opacity .3s}
.chapter-card.locked::before{opacity:.3}
.chapter-card{border-radius:4px}
.abyss-level{border-radius:4px}


/* Velvet grain under every framed panel; the tint keeps it barely visible. */
.dialogue,.tray,.journey-guide,.scene-clues .clue-panel{
 background-image:
  linear-gradient(var(--br),var(--br)),linear-gradient(var(--br),var(--br)),
  linear-gradient(var(--br),var(--br)),linear-gradient(var(--br),var(--br)),
  linear-gradient(var(--br),var(--br)),linear-gradient(var(--br),var(--br)),
  linear-gradient(var(--br),var(--br)),linear-gradient(var(--br),var(--br)),
  url(data:image/webp;base64,UklGRsIKAABXRUJQVlA4ILYKAAAwbQCdASqAAYABPsFgqlAnqiiqIzVZGUAYCWluk0K9GIsxjf+vUkdyriveCR6q/2IWPcUK///qG95NGvp+ZP1/kdBbxkQlJ0BA1kwbahjyEckTYQr1qGo6h4jPeO31Prz5e3g4pKoFUGiHurFkx1Juks3D3KdFSQnTKB3FFREWGk0vlqld1ZQaeuiosA0NUexkHdp9r0S1+rZFoM5/PLAECcF87SOgHiAHqMEQR0NVv1OSgkcphfrssalM8ri3pfxfnzJzwx27xvc+F85ZHLQnzwqYCseKfNRS9ZkwDthIwFPirEZ5JP1ifDuoTbskTebRPYHxFJrEXJLf30nqILqCMhzOuoaF9mN0Haqpjk4JfgwkzGfXW9zVnCGl78JhUO0+kNdyLWQyCpEx0eXtBiDely0q/bLlb56I4MkuOJcqvG+f8YgtgbuVDVE7o9pP7vi50w+Ne9L3HrL1SUs4BJabW3WYHFLKdMXxpDAW3mflA181ih0WGT1ZHnG4Ez0BF5zXwwt7maCe27ChAAhQ7eAOfLSZz/KtmtqKLfN+P5LSwbKnvTiPS8vnBo39ZJoQww/Zctok0OLdjSHn+F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Z33pEsSh8ZWxIDTK3lwn/wFpJOx7iYaluEax4ADLQYOMoBzDQK3VBas2w+k1iGqdi2pzmJhjFocht4wywsZWkf4v5GbH+6cbrQcbOsmSyUpiGnOBn8YZ35hegmekvih7IySXvieKfdoBVWr8E4Ynaq8PlCFSZxuERk3pH6Pv/LMf0RBdaUS4UTH9n8xxYsDN1AAvN7oZe+q36djU7eyFJbw3ve5dZMSi0kPqOd0XPQ2iq+2pjJljt8afZD/iTA5qWgQLPQNk4n2h0Q17XGBN+Kd/l9tS25E62Jz90dvA83Eplx8CmEmkiiiWq9f1GhTKt6RViPb0URu8mVJ/HOg6Jy8TgLhMdmOdPF2O8XnyAZ26qPMCzEi+JU70PUoj0ly4bNojUQ0WitkkmuzSebNGtnTMjmqeQQfuYHP77jgfy0MZ3mxHvpqJunUXsmoaM+8gyOtvHW9qbCdNRniSHnmQCfCsaRSRF9FylfF6DLuslQD154lbHfW3QS82V0RKNNxjU6Ot3ivsusHV9zFuDBKfyvC90xtCF6VHWNz7pj/JAMMNqxiBkabLQS45ixv/IK+9sRQmBLAhdtj1AaAt9eOhcD0gzseIKmqm+gyqZUBkm4EeIJ7RRr4TxidFYJg2q1LjDZk4wxgg6PlUBmhS+VeRXKRzI9AfJ+eKTwZLc8yOcKkAqcI18AAEtHCcMbx63jPrQzdJtLSLJ8ovjWcJcjsAv4h9J38VZ0J/+vKOQIlZvPctNkwrKHcSZFD/FAAkb+HUb2y5aacI/9/7yZicZWMxua0F2CqeOqG4PrDdArbcikYNZqw/TayI5CVMgWo+y5yxc5Ukx6MEgABRWoGnuURIeT8HIk5q5YgKSTyBS3jXTNYjcQpiWtr9icBceiTVdkB0sLmC+XStc5lq2ZUAAAA=);
 background-size:12px 1px,1px 12px,12px 1px,1px 12px,12px 1px,1px 12px,12px 1px,1px 12px,192px 192px;
 background-position:left 4px top 4px,left 4px top 4px,right 4px top 4px,right 4px top 4px,left 4px bottom 4px,left 4px bottom 4px,right 4px bottom 4px,right 4px bottom 4px,0 0;
 background-repeat:no-repeat,no-repeat,no-repeat,no-repeat,no-repeat,no-repeat,no-repeat,no-repeat,repeat;
 background-blend-mode:normal,normal,normal,normal,normal,normal,normal,normal,soft-light}

/* Sealed chapters carry a wax seal instead of just a lock icon. */
.chapter-card.locked{background-image:url(data:image/webp;base64,UklGRpgQAABXRUJQVlA4WAoAAAAQAAAArwAArwAAQUxQSKEGAAARBkrT/ieSm3+rtaZZM9tH2g0zo5nhxsz4AZjhEyRmnxhm9xz7ROGsmZnteyauzM5I/6pWz3hLLSm31P8fEQ4kSY2bXckLGGE7h+8X0P+iMqpg+CAoZskxVVkPsxZMFKavkpmrfR6yTVtuI6naUpjD8iULmf4YOtUPmrt+Z/7Uz01XrjE1/Xwqv3P93EH1nVIfpJAUirrSzMt9PO/Hsw+L2CIW+dyuuR+3N+soY/J/vMl7d1n+URkNFXOJy0yGleuAhvy4YcW7RqTwOl8A8adbLhSRSJeZlW7ZRCtm1khUvLD9CwkkfE2PmID6rbqokHTpNbktTi1pJH15zYDUKvtp1YxseGUiyTxL1MoEXjWOqvHQSOrkZp9HjVXq2gswarwwrxaEjDyzFt9JbXQmZKXx7tJcsjhv9kUMPPUm6rLCzKhY461pEmLhRzSCr3+ttLI1fvsmWYYX0V77FKatrA1U+3snQfejk1+gSlkOGIQvpjgejCT0OJyMInSEmgmP9gQZuZw27DGmLXcMfDLC3SwWsCapSY6RSa2NHM1i6tTYov+3E8ts7AwuNkl1l7Ck0UFqxst1IJ1DDXz9EkvkKJlefgs1ztkTCkkNZ8lUmJgs0S17WrNW6DCVbp7ulMk0S2lCp6mJZoN0qE/TKmU7bZKe7kxjmpia63zTpWSAI/27Aibdg4aF75xoMb3x3HQ/2vN6Bw5YEXS5gGXyhEwXukCUPRqwRN6QKZ85JK013ae2NuOcmEYqTT5BE43MNEdA74fVKvhS4EEvEFniYFLBMzIdzBAxTU/bvpnTgTOr3vcJah/BfSDKKrYnHfMvtCejUEyDNJGP0EScUYjPGvVTzohsdKbpvr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q3wrIhqQwPcBflwsf/14L2w7OzRHZnDfJZAQ/MggsoV4P4w2D4mux5QdZnzEPxbE3JyvvHnSx4AlzuEKiza0aFjmZVy49JiOmhfDi84FQMTZs30xOSvNektcja5e+4rLnVlW4TLCK4e18/b/QvVGCHGFhoZs2Y63avadLluYbZk6nrGjeG1ghcy/YF3MN4G0ffLs/YgjFFw1MrYrxSU5JoMqcF5BtAKO4l0YV9SrGzwneQN+GM8Dk11BP787WucKxy1KeJuVDq1bDp9PDk9L0v2ldCnHKAzASiNjrxLhNwSAZ1F0yDwA/EzwM48gtl+9x+xDTU2sn83ZnJ7JxoN8u5XjaN89TKxrlrTOvbN0NwuaHQWyvW+KhyXUVlI97+wGaK8BqJ/n18MT2ILwUcnLiF2bCDluzRH1a9KCoslTOVUAmnF3NEECldzOA0dOtg0rVme3VyAAAAAAAAAAAA=);background-repeat:no-repeat;background-position:50% 38%;background-size:88px 88px}

.scene-frame picture{display:contents}
