:root{color-scheme:dark;--deep:#0b100e;--paper:#eee5d0;--muted:#b6b7a7;--gold:#c6a568;--line:#c6a56845;--serif:Georgia,'Times New Roman',serif;--sans:'Segoe UI',Arial,sans-serif;font-family:var(--sans);color:var(--paper);background:var(--deep)}
*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{color:inherit;cursor:pointer;background:none;border:1px solid transparent;padding:10px 15px;transition:background .18s,border-color .18s,color .18s}@media(hover:hover){button:hover:not(:disabled){color:#fff0cf;border-color:var(--line);background:#c6a56816}}button:disabled{opacity:.38;cursor:default}button:focus-visible,input:focus-visible{outline:2px solid #f8d58a;outline-offset:3px}svg{width:22px;height:22px;vertical-align:middle;flex-shrink:0}img{display:block;max-width:100%}.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}h1,h2,h3,p{margin-top:0}h1,h2,h3{font-family:var(--serif);font-weight:400}p{line-height:1.65}.eyebrow,.tiny-label{line-height:1.6;color:var(--gold);}.primary{display:inline-flex;justify-content:center;align-items:center;gap:26px;background:var(--gold);color:#17201a;padding:13px 25px;border:1px solid #dcc08c;font-weight:600;}.primary:hover:not(:disabled){background:#ddc18c;color:#132016;border-color:#f2dbab}.text-button{text-decoration:underline;text-underline-offset:5px;font-size:12px}.menu-note .text-button{padding-inline:0}
/* Touch screens (the game is played mostly on a phone): Safari must not enlarge the text when the phone turns, a quick second tap
   must not zoom the page, and a long press must not open the copy menu over the game. The search stage allows its own pinch zoom. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;touch-action:manipulation}
#app{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}
#app input{-webkit-user-select:text;user-select:text}

.game-shell{min-height:100dvh;background:radial-gradient(ellipse at top,#293029,var(--deep) 85%)}.muted{opacity:.45}.game-main{margin:0 auto}.scene{position:relative;aspect-ratio:16/9;width:100%;isolation:isolate;box-shadow:0 10px 70px #0008;outline:1px solid #c6a56860;overflow:hidden}.scene-art{width:100%;height:100%;object-fit:cover}.hotspot{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);width:48px;height:48px;padding:0;border:none;display:grid;place-items:center;z-index:2}.hotspot:hover:not(:disabled){border:none;background:none}.spot-ring{display:grid;place-items:center;width:25px;height:25px;border:1px solid #e8d3a090;border-radius:50%;color:#f4dbad;background:#14201bc0;box-shadow:0 0 12px #edc98333;opacity:.6;transition:transform .2s,opacity .2s}.spot-ring svg{width:13px;height:13px}.hotspot:hover .spot-ring,.hotspot:focus-visible .spot-ring,.revealed .spot-ring{opacity:1;transform:scale(1.4);border-color:#f6d38d}.observed .spot-ring{opacity:.32}.spot-label{position:absolute;bottom:110%;left:50%;transform:translateX(-50%);background:#111c18ed;border:1px solid var(--line);padding:6px 11px;white-space:nowrap;font:11px var(--sans);opacity:0;pointer-events:none}.hotspot:hover .spot-label,.hotspot:focus-visible .spot-label,.revealed .spot-label{opacity:1}.person-spot{height:65px;width:54px}.person-medallion{height:62px;width:48px;border:1px solid var(--gold);border-radius:48% 48% 4px 4px;overflow:hidden;box-shadow:0 4px 18px #000a}.person-medallion img{width:100%;height:100%;object-fit:cover;object-position:center 18%;transform:scale(1.15)}.person-spot .spot-label{opacity:1;bottom:-24px;font-size:10px}.scene-caption{background:#101a17e8;border-left:2px solid var(--gold);font:15px/1.5 var(--serif);pointer-events:none}.scene-caption button{position:absolute;right:3px;top:3px;padding:2px 5px;pointer-events:auto}.using-item{position:fixed;left:50%;transform:translateX(-50%);padding:4px 12px;background:#bfa064;color:#0d1b16;z-index:7;}.using-item button{text-decoration:underline}
.modal-backdrop{position:fixed;inset:0;background:#07100dd9;backdrop-filter:blur(5px);z-index:10;display:flex;align-items:center;justify-content:center;}.modal{position:relative;width:min(950px,100%);overflow:auto;padding:38px;background:#18231e;border:1px solid #ac8d5555;}.modal h2{font-size:31px;margin-bottom:20px}.modal>p{max-width:760px;color:#d1d4c4}.close-modal{position:absolute;padding:5px;z-index:3;background:#142018b0}.interaction-modal{padding:0;width:min(990px,96vw)}.interaction-modal>.eyebrow,.interaction-modal>h2,.interaction-modal>p{margin-left:38px;margin-right:38px}.interaction-modal>.eyebrow{margin-top:30px}.dialogue-layout{display:grid;grid-template-columns:34% 66%;min-height:420px}.dialogue-copy{display:flex;flex-direction:column}.dialogue-copy h2{margin-bottom:24px}.dialogue-text{font:19px/1.7 var(--serif);color:#e5e4d4;flex:1}.dialogue-footer{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:22px}.dialogue-footer>span{color:var(--muted)}.detail-image{display:flex;background:#0d1712;align-items:center}.toast{position:fixed;z-index:20;left:50%;transform:translateX(-50%);background:#ede3ca;color:#16221b;border-left:4px solid #ac8139;padding:16px 45px 16px 22px;box-shadow:0 10px 35px #0008;font:14px/1.5 var(--serif);width:max-content;max-width:min(680px,92vw)}.toast button{position:absolute;right:6px;top:5px;padding:3px 6px;color:#16221b}.journal-objective{border-left:2px solid var(--gold);padding-left:15px}.topic-list{display:grid;gap:12px}.topic-list button{display:flex;justify-content:space-between;border:1px solid var(--line);text-align:left}.settings{display:grid;gap:16px;margin:25px 0}.settings label{display:flex;gap:12px;}input[type=checkbox]{accent-color:var(--gold);width:17px;height:17px;flex-shrink:0}.menu-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}.menu-actions>button:not(.primary){border:1px solid var(--line);}.reflection-puzzle{position:relative}.reflection-puzzle img{background:#0a120e}.reflection-choice{position:absolute;display:flex;align-items:flex-end;justify-content:center;padding:0;border:1px dashed transparent;background:transparent}.reflection-choice:hover,.reflection-choice:focus-visible{border-color:#f6d38d99}.reflection-choice span{border:1px solid var(--gold);background:#112019e8;padding:6px 12px;transform:translateY(50%)}.reflection-choice.garden{left:20%;top:40%;width:20%;height:52%}.reflection-choice.face{left:50%;top:16%;width:18%;height:38%}
.board-finished{text-align:center}.board-finished h2{font-size:32px}.board-finished{padding-top:80px}.board-finished>svg{height:65px;width:65px;color:var(--gold);margin:20px}.image-unavailable{opacity:0}
@media(min-width:1600px){.game-main{max-width:1440px}.dialogue-layout{min-height:470px}}
@media(max-height:760px) and (min-width:900px){.game-main{width:min(100% - 60px,calc((100dvh - 224px)*1.77778))}.dialogue-layout{min-height:360px}.dialogue-copy{padding:32px}.dialogue-text{font-size:17px}.modal{max-height:94dvh}}
@media(max-width:900px){.game-main{min-width:0;width:calc(100% - 26px)}.dialogue-copy{padding:35px 25px 25px}.dialogue-text{font-size:17px}}
@media(max-width:560px){.scene-caption{font-size:12px;bottom:10px;left:10px;padding:10px 26px 10px 10px}.hotspot{width:38px;height:38px}.spot-ring{width:22px;height:22px}.person-spot{width:38px;height:47px}.person-medallion{height:43px;width:34px}.person-spot .spot-label{font-size:8px;padding:3px 5px;bottom:-17px}.spot-label{font-size:9px}.modal h2{font-size:26px}.interaction-modal{overflow:auto}.dialogue-layout{grid-template-columns:1fr;min-height:0}.dialogue-copy h2{font-size:25px;margin-bottom:16px}.dialogue-copy .eyebrow{font-size:9px}.dialogue-footer{margin-top:10px}.primary{font-size:12px;gap:12px;padding:11px 18px}.detail-image{max-height:190px;overflow:hidden}.using-item{bottom:135px;max-width:95vw;font-size:10px}.toast{bottom:15px;font-size:13px}.modal>.eyebrow{font-size:9px}}
.scene-actor{position:absolute;transform:translateX(-50%);width:auto;pointer-events:none;z-index:1;}
.scene-actor img{height:100%;width:auto;max-width:none}
.scene-caption{z-index:3}
.actor-spot{width:var(--actor-width);height:var(--actor-height);border:none;background:none}
.actor-label{position:absolute;bottom:0;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;white-space:nowrap;background:#112019e8;border:1px solid var(--line);}
.actor-label svg{color:var(--gold)}
.actor-spot:hover .actor-label,.actor-spot:focus-visible .actor-label,.actor-spot.revealed .actor-label{background:#d0b47e;color:#142018;border-color:#f5dcaa}
@media(max-width:560px){.actor-label{font-size:8px;padding:4px 6px;gap:4px}.actor-label svg{display:none}.actor-spot{width:max(var(--actor-width),38px)}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
.hunt-item{position:absolute;left:var(--x);top:var(--y);width:var(--w);height:var(--h);transform:translate(-50%,-50%);padding:0;border:0}
.hunt-item:hover:not(:disabled){background:none;border:0}
.hunt-item.revealed{border-radius:50%}
.hunt-item img,.scene-prop{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}
/* The shade (edge, shadow, glow) lies under the object in its own box; when the object is found it fades where it is. */
.hunt-item img{position:relative}.hunt-item .hunt-shade{position:absolute;max-width:none;object-fit:fill}
.hunt-stage>.scene-layer>.hunt-shade-out{position:absolute;left:var(--x);top:var(--y);width:var(--w);height:var(--h);transform:translate(-50%,-50%);pointer-events:none;z-index:2;animation:hunt-shade-out .8s ease-out forwards}
@keyframes hunt-shade-out{to{opacity:0}}
@media(prefers-reduced-motion:reduce){.hunt-shade-out{display:none}}
.scene-layer>.scene-prop{position:absolute;left:var(--x);top:var(--y);width:var(--w);height:var(--h);transform:translate(-50%,-50%)}
.hunt-collect{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;animation:hunt-collect 1s ease-in forwards}
@keyframes hunt-collect{0%{transform:scale(1);opacity:1;filter:brightness(1.25) drop-shadow(0 0 14px #f3dca4)}70%{transform:scale(1.12) translateY(-6px);opacity:1}100%{transform:scale(.15) translateY(-40px);opacity:0}}
@media(prefers-reduced-motion:reduce){.hunt-collect{animation:none;opacity:0}}/* The halo lives on a pseudo-element so the button keeps its hit area while the ring fades out and back. */
.hunt-item.revealed::after{content:"";position:absolute;left:50%;top:50%;width:max(calc(100% + 18px),58px);aspect-ratio:1;translate:-50% -50%;border-radius:50%;border:3px solid #ffe4a3;box-shadow:0 0 0 2px #0009,inset 0 0 0 2px #0007,0 0 28px 10px #f8d58acc;pointer-events:none;animation:hunt-hint 1.5s ease-in-out var(--hint-delay,0ms) infinite}
@keyframes hunt-hint{0%,100%{opacity:1;scale:1}50%{opacity:.55;scale:1.18}}
@media(prefers-reduced-motion:reduce){.hunt-item.revealed::after{animation:none}}
/* A miss: a red cross that opens and fades at the clicked point. Stays put for reduced motion. */
.hunt-miss{position:absolute;left:var(--x);top:var(--y);width:46px;height:46px;margin:-23px 0 0 -23px;border-radius:50%;border:2px solid #d0604a;background:#d0604a22;pointer-events:none;animation:hunt-miss .7s ease-out forwards}
.hunt-miss::before,.hunt-miss::after{content:"";position:absolute;left:50%;top:50%;width:22px;height:2px;background:#e8806c;transform:translate(-50%,-50%) rotate(45deg)}
.hunt-miss::after{transform:translate(-50%,-50%) rotate(-45deg)}
@keyframes hunt-miss{0%{opacity:0;transform:scale(1.6)}20%{opacity:1;transform:scale(1)}70%{opacity:1}100%{opacity:0;transform:scale(.9)}}
@media(prefers-reduced-motion:reduce){.hunt-miss{animation:none;opacity:1}}
.hunt-found{position:absolute;left:var(--x);top:var(--y);width:var(--w);height:var(--h);min-width:34px;min-height:34px;border:2px solid #f3dca4;border-radius:50%;box-shadow:0 0 28px 10px #e3c17aa6,inset 0 0 18px #ecd39880;pointer-events:none;opacity:0;animation:hunt-found .9s ease-out}
@keyframes hunt-found{from{opacity:0;transform:translate(-50%,-50%) scale(.7)}30%{opacity:1}to{opacity:0;transform:translate(-50%,-50%) scale(1.35)}}
@media(prefers-reduced-motion:reduce){.hunt-found{display:none}}
.dialogue-copy:has(.dialogue-choices,.dialogue-reply) .dialogue-text{flex:0 0 auto}
.dialogue-choices{display:grid;gap:8px;margin:4px 0 6px}
.dialogue-choices button{text-align:left;border:1px solid var(--line);font:15px/1.45 var(--serif);color:#efe4c8}
.dialogue-choices button[aria-pressed=true]{opacity:.45;text-decoration:line-through;text-decoration-color:#c9ad73}
.dialogue-reply{border-left:2px solid var(--gold);padding:2px 0 2px 14px;font:16px/1.6 var(--serif);color:#e5e4d4}
.dialogue-copy:has(.dialogue-reply) .dialogue-footer{margin-top:auto;padding-top:18px}
.dialogue-reply b{display:block;font:9px/1.8 var(--sans);letter-spacing:.2em;text-transform:uppercase;color:var(--gold)}
@media(max-width:560px){.dialogue-choices button{padding:8px 10px}}

/* Watson's notebook and an independent panoramic viewport. */
:root{--ui-size:15px;--reading-size:18px}
.large-text{--ui-size:18px;--reading-size:21px}
.game-main{width:min(1280px,calc(100% - 48px));min-width:0;max-width:1280px}
#app .scene{aspect-ratio:16/9;min-height:0;overflow:hidden}
.scene-layer{position:absolute;inset:0}
.scene-layer>img{width:100%;height:100%;object-fit:contain}
.scene-caption{position:relative;left:auto;bottom:auto;max-width:100%;font-size:var(--reading-size);padding:14px 44px 14px 18px;margin:12px 0;box-shadow:none}
.scene-caption button{min-width:44px;min-height:44px}
.examined-list button{display:flex;align-items:center;gap:12px;padding:12px 16px;border:1px solid var(--line);font-size:var(--ui-size);min-height:52px;text-align:left}
.topic-list small{display:block;font-size:max(12px,calc(var(--ui-size) - 2px));font-weight:400;color:var(--muted);margin-top:5px}
summary{cursor:pointer;padding:12px 4px;min-height:44px;font-size:var(--ui-size)}
summary:focus-visible{outline:2px solid #f8d58a;outline-offset:3px}
button[aria-disabled=true]{border-style:dashed;color:var(--muted)}

.tiny-label,.eyebrow{text-transform:none;letter-spacing:.05em;font-size:12px}
.has-new{border:1px solid var(--gold);background:#354536}
.hotspot{min-width:44px;min-height:44px}
.hotspot.revealed .spot-label{opacity:0}
.hotspot:focus-visible .spot-label,.hotspot:hover .spot-label{opacity:1}
.actor-label{border-radius:50%;padding:8px;font-size:var(--ui-size);min-width:32px;min-height:32px}
.actor-label svg{display:block;width:16px;height:16px}
.scene-actor{filter:brightness(.9) saturate(.86) drop-shadow(3px 8px 5px #0008)}
/* Figures painted into their scene already carry its light and contact shadow. */
.scene-actor.painted{filter:none}
.modal{max-height:94dvh;scrollbar-gutter:stable;font-size:var(--ui-size)}
.modal-backdrop{padding:18px}
.close-modal{min-width:44px;min-height:44px;right:4px;top:4px}
.interaction-modal{overflow:auto}
.dialogue-copy{padding:40px 36px 30px}
.dialogue-text,.large-text .dialogue-text{font-size:var(--reading-size);line-height:1.7}
.dialogue-choices button,.dialogue-reply{font-size:var(--reading-size);line-height:1.6}
.dialogue-choices button{min-height:48px;padding:12px 16px}
.reading-complete{font-size:var(--ui-size);color:#d1bb86;margin:18px 0 0}
.dialogue-footer>span{font-size:var(--ui-size)}
.dialogue-footer .primary,.primary{font-size:var(--ui-size);min-height:48px;letter-spacing:0}
.topic-list button{font-size:var(--ui-size);line-height:1.5;min-height:56px;gap:14px;align-items:center}
.detail-image{overflow:visible;max-height:none}
.detail-image img{width:100%;height:auto;object-fit:contain;max-height:520px}
.hunt-item{z-index:3}
/* A small object keeps its painted size: only its hit area grows, so the cut-out never shifts against the picture. */
.hunt-item::before{content:"";position:absolute;left:50%;top:50%;width:max(100%,24px);height:max(100%,24px);transform:translate(-50%,-50%)}
.hunt-item:focus-visible{outline:3px solid #ffe3a2;outline-offset:2px;background:#fff0b81a}
.journal-objective{font-size:var(--reading-size)!important}

.blocked-action{font-size:var(--reading-size);line-height:1.65;padding:18px;border-left:3px solid var(--gold);background:#14291f;margin:20px 0}

.board-finished{padding:32px;background:#23362d;}
.board-finished>p{font-size:var(--reading-size)}
.settings label,.menu-actions>button:not(.primary),.modal>p{font-size:var(--ui-size)}
.toast{bottom:14px;font-size:var(--ui-size);max-height:40dvh;overflow:auto}
.using-item{white-space:normal;font-size:var(--ui-size);bottom:18px}

.reflection-puzzle{aspect-ratio:16/9;overflow:hidden;background:#0a120e}
.reflection-puzzle img{width:100%;height:100%;max-height:none;object-fit:contain}
/* The image is 4:3 centred in the 16:9 frame: the choices cover the garden pane and the reflected face, with their name below. */
.reflection-choice span{font-size:var(--ui-size);min-height:44px;display:inline-flex;align-items:center}

@media(max-width:560px){
 .game-main{width:calc(100% - 24px)}
 .examined-list button{padding:10px;font-size:var(--ui-size)}
 .modal-backdrop{padding:8px}.modal{max-height:96dvh;padding:28px 18px}.interaction-modal{padding:0}
 .dialogue-copy{padding:18px 20px 24px}.dialogue-text,.large-text .dialogue-text,.dialogue-reply,.dialogue-choices button{font-size:var(--reading-size)}
 .dialogue-footer{flex-wrap:wrap;gap:12px}.detail-image img{height:auto;max-height:240px;object-fit:contain}

 
 
 
 
 
 .board-finished{padding:24px 16px}
}

/* ==== Immersive exploration: the artwork is the screen, every control floats over it. ==== */
#app.immersive .game-shell{position:relative;height:100dvh;min-height:0;overflow:hidden;background:#050806}
#app.immersive .stage-backdrop{position:absolute;inset:-40px;background-size:cover;background-position:center;filter:blur(28px) brightness(.32) saturate(.85)}
#app.immersive .game-main{position:relative;width:100%;max-width:none;min-width:0;height:100%;margin:0;display:grid;place-items:center}
#app.immersive .stage{position:relative;width:min(100vw,calc(100dvh*16/9));aspect-ratio:16/9;box-shadow:0 0 90px #000b}
#app.immersive .stage>.scene{position:absolute;inset:0;width:100%;margin:0;box-shadow:none;outline:0}
#app.immersive .hud{position:absolute;inset:0;z-index:4;display:flex;flex-direction:column;justify-content:space-between;pointer-events:none}
#app.immersive .hud-top,#app.immersive .hud-bottom{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:18px 22px}
#app.immersive .hud-top{background:linear-gradient(#050806e8,#050806a0 55%,transparent);padding-bottom:42px}
#app.immersive .hud-bottom{align-items:flex-end;background:linear-gradient(0deg,#050806ee,#050806a0 55%,transparent);padding-top:42px}
#app.immersive .hud-tools,#app.immersive .hud-controls,#app.immersive .blocked-action,#app.immersive .scene-caption button{pointer-events:auto}
#app.immersive .hud-location{text-shadow:0 1px 6px #000}
#app.immersive .hud-location .eyebrow{margin:0 0 2px;font-size:12px}
#app.immersive .hud-location h1{margin:0;font-size:clamp(20px,2.6vw,32px);line-height:1.15}
#app.immersive .hud-sub{margin:2px 0 0;font-size:var(--ui-size);color:var(--muted);line-height:1.3}
#app.immersive .hud-count{margin:3px 0 0;font-size:var(--ui-size);line-height:1.3;color:var(--gold)}
#app.immersive .hud-tools,#app.immersive .hud-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#app.immersive .hud-tools{justify-content:flex-end}
#app.immersive .hud-controls{justify-content:flex-end}
#app.immersive .badge{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:var(--gold);color:#17201a;font:600 12px var(--sans)}
#app.immersive .badge.dot{min-width:10px;width:10px;height:10px;padding:0;position:absolute;top:5px;right:5px}
#app.immersive .examined-list button{width:100%}
#app.immersive .examined-toggle{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:44px;color:var(--muted);border:0!important;border-top:1px solid var(--line)!important;margin-top:4px;padding:10px 12px}
#app.immersive .examined-toggle svg{width:14px;height:14px}
#app.immersive .examined-toggle[aria-expanded=true] svg{transform:rotate(180deg)}
#app.immersive .examined-list{display:flex;flex-direction:column;gap:6px}
#app.immersive .hud-question{max-width:min(46%,560px);display:flex;flex-direction:column;gap:3px;text-shadow:0 1px 6px #000;font:var(--ui-size)/1.45 var(--serif)}
#app.immersive .hud-question .tiny-label{font-family:var(--sans)}
#app.immersive .hud .scene-caption{align-self:flex-start;margin:0 22px 8px;max-width:min(560px,60%);background:#0b120ff0;border-left:2px solid var(--gold)}
#app.immersive .hud .blocked-action{align-self:center;margin:8px 22px 0;max-width:min(640px,80%);font-size:var(--ui-size);padding:12px 16px;background:#14291ff2;box-shadow:0 8px 30px #000a}
#app.immersive .using-item{position:absolute;top:84px;bottom:auto;z-index:6}
#app.immersive .toast{top:84px;bottom:auto}
#app.immersive .hotspot{z-index:2}

/* Object search chrome lives in search.css. */

/* Exploration on a landscape phone: same overlay, tighter chrome so the 16:9 image never scrolls. */
@media(max-height:500px) and (min-aspect-ratio:1/1){
 #app.immersive .hud-top,#app.immersive .hud-bottom{padding:8px 12px}
 #app.immersive .hud-top{padding-bottom:26px}#app.immersive .hud-bottom{padding-top:26px}
 
 #app.immersive .hud-sub,#app.immersive .hud-location .eyebrow{display:none}
 #app.immersive .hud-location h1{font-size:18px}
 #app.immersive .hud-question{font-size:13px;max-width:40%}
 #app.immersive .hud .scene-caption{font-size:13px;padding:8px 36px 8px 12px;margin:0 12px 6px;max-width:48%}
 #app.immersive .hud .blocked-action{font-size:13px;padding:8px 12px}
 #app.immersive .using-item,#app.immersive .toast{top:58px}
 .chapter-card h2{font-size:30px}.chapter-card .eyebrow{font-size:10px}
}
/* Touch screens: a larger hit area for the smallest search targets (visuals unchanged). */
@media(pointer:coarse){.hunt-item::before{width:max(100%,40px);height:max(100%,40px)}}

/* Quick fixes: readable person markers, door/stair markers in the picture, bigger clue close-ups, contact shadow under figures. */
.actor-spot:hover .actor-label svg,.actor-spot:focus-visible .actor-label svg,.actor-spot.revealed .actor-label svg{color:#142018}
.actor-name{display:none;font-size:var(--ui-size)}
.actor-spot:hover .actor-name,.actor-spot:focus-visible .actor-name,.actor-spot.revealed .actor-name{display:inline}
.actor-spot:hover .actor-label,.actor-spot:focus-visible .actor-label,.actor-spot.revealed .actor-label{border-radius:18px;gap:8px;white-space:nowrap}
.exit-spot .spot-ring{border-radius:6px;width:30px;height:30px}
.exit-spot .spot-ring svg{width:16px;height:16px}
.exit-spot.locked .spot-ring{border-style:dashed;opacity:.45}
.dialogue-layout:has(.detail-image){grid-template-columns:56% 44%}
@media(max-width:560px){.dialogue-layout:has(.detail-image){grid-template-columns:1fr}}
.scene-actor::after{content:'';position:absolute;left:6%;right:6%;bottom:-1.5%;height:5%;background:radial-gradient(ellipse at center,#000c 0,#0000 70%);z-index:-1}
/* The first-visit caption sits on the bottom gradient (not over the picture) and fades by itself. */
@media(min-aspect-ratio:1/1){
 #app.immersive .hud .scene-caption{margin-top:auto;margin-bottom:0;max-width:min(520px,46%);animation:caption-out .8s ease 9s forwards}
}
@keyframes caption-out{to{opacity:0;visibility:hidden}}

/* ==== Evidence board: the panel lives inside the 16:9 stage, over the dimmed picture. ==== */
#app.immersive .board-stage>.scene .scene-art{filter:brightness(.5) saturate(.85)}
#app.immersive .board-stage .hud-top{padding-bottom:12px}
#app.immersive .board-stage .hud-bottom{padding-top:12px}
#app.immersive .hud-body{flex:1;min-height:0;display:flex;padding:0 22px 6px;pointer-events:none;overflow:hidden}
#app.immersive .hud-body>*{pointer-events:auto}

#app.immersive .board-panel{flex:0 1 880px;margin:0 auto;align-self:center;max-height:100%;overflow:auto;background:#13201af5;border:1px solid #8d806480;border-radius:8px}
#app.immersive .board-panel h2{font-size:28px;margin:6px 0 10px}
@media(max-height:560px) and (min-aspect-ratio:1/1){
 #app.immersive .hud-body{padding:0 12px 4px}
 
 
 
 

 
 
}

#app.immersive .board-panel{padding:14px 28px}
#app.immersive .board-panel>p{margin:4px 0}

/* The title illustration is one canvas: do not crop it or its painted controls. */
.title-screen{min-height:100svh;display:grid;place-items:center;padding:0;gap:0;background:#080e10;overflow:hidden}
.title-stage{position:relative;width:min(100vw,calc(100svh * 16 / 9));aspect-ratio:16/9;isolation:isolate}
.title-illustration{position:absolute;inset:0;overflow:hidden}
.title-art{position:static;display:block;width:100%;height:100%;max-width:none;object-fit:contain}
.title-menu{position:absolute;inset:0}
/* Each button holds its own cut-out of the painted button (assets/title-btn-*, cut from title-screen.png). --l/--t/--w/--h are the
   clickable box in % of the stage; the cut-out is 6 px larger on every side (--px/--py, in % of the box) and never takes clicks.
   The cut-out is both picture and mask, so the glow and the light sweep follow the painted frame:
   the button itself grows under the pointer and sinks when pressed. */
.title-choice{--l:11.1842;--w:26.7943;--h:8.0765;--px:1.3393;--py:7.8947;position:absolute;left:calc(var(--l) * 1%);top:calc(var(--t) * 1%);width:calc(var(--w) * 1%);height:calc(var(--h) * 1%);padding:0;border:0;background:transparent;transition:transform .28s cubic-bezier(.34,1.56,.64,1),filter .28s}
.title-choice>span:last-child{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.title-new{--l:5.2033;--t:50.5845;--w:38.8756;--h:14.0276;--px:.9231;--py:4.5455;--art:url(../assets/title-btn-new.webp)}
.title-continue{--t:65.2497;--art:url(../assets/title-btn-continue.webp)}.title-credits{--t:74.1764;--art:url(../assets/title-btn-credits.webp)}.title-settings{--t:83.1031;--art:url(../assets/title-btn-settings.webp)}
.title-face{position:absolute;inset:calc(var(--py) * -1%) calc(var(--px) * -1%);pointer-events:none;overflow:hidden;background:var(--art) 0 0/100% 100% no-repeat;-webkit-mask:var(--art) 0 0/100% 100% no-repeat;mask:var(--art) 0 0/100% 100% no-repeat;opacity:0;transition:opacity .2s,filter .2s}
.title-choice:hover:not(:disabled),.title-choice:focus-visible{z-index:1;background:transparent;transform:scale(1.07);filter:drop-shadow(0 0 7px #f3c56a66) drop-shadow(0 5px 7px #0009)}
.title-new:hover:not(:disabled),.title-new:focus-visible{filter:drop-shadow(0 0 7px #f3c56a55) drop-shadow(0 3px 4px #0006)}
.title-choice:hover:not(:disabled) .title-face,.title-choice:focus-visible .title-face,.title-choice.pressed .title-face{opacity:1;filter:brightness(1.12) saturate(1.08)}
.title-choice:focus-visible{outline:0}
.title-choice:active:not(:disabled){transform:scale(1.01) translateY(2px);filter:drop-shadow(0 0 6px #f3c56a50) drop-shadow(0 2px 4px #000b);transition-duration:.06s}
.title-choice:active:not(:disabled) .title-face{filter:brightness(.82) saturate(1.05);transition-duration:.06s}
/* A light sweep crosses the button under the pointer and the chosen one flashes once. */
.title-face::after{content:'';position:absolute;inset:0;background:linear-gradient(100deg,transparent 30%,#fff1c830 46%,#fff8e050 50%,#fff1c830 54%,transparent 70%);transform:translateX(-110%)}
.title-choice:hover:not(:disabled) .title-face::after{transform:translateX(110%);transition:transform .8s ease-out}
.title-choice.pressed{animation:title-press .6s ease-out}
@keyframes title-press{0%{transform:scale(1.01) translateY(2px)}35%{transform:scale(1.08);filter:drop-shadow(0 0 12px #f3c56a90) brightness(1.25)}}
/* Leaving for the game: a push toward the lit door, then the first scene fades in. */
.title-screen.leaving .title-stage{animation:title-leave .65s cubic-bezier(.5,0,.85,.4) forwards;transform-origin:69% 46%}
@keyframes title-leave{to{transform:scale(1.14);opacity:0;filter:brightness(1.3)}}
.arriving{animation:game-arrive .55s ease-out}
@keyframes game-arrive{from{opacity:0}}
/* Live rain and lantern light over the painting; they never take clicks. */
.title-fx{position:absolute;inset:0;pointer-events:none}
.title-rain{position:absolute;left:46%;top:0;width:54%;height:100%;-webkit-mask-image:linear-gradient(90deg,transparent,#000 18%);mask-image:linear-gradient(90deg,transparent,#000 18%)}
.title-glow{position:absolute;left:var(--x);top:var(--y);width:var(--s);aspect-ratio:1;translate:-50% -50%;border-radius:50%;background:radial-gradient(closest-side,#ffc46a,#ff9d3a66 35%,transparent);mix-blend-mode:screen;opacity:.35;animation:title-flicker 3.2s infinite}
.glow-lamp-left{--x:15.55%;--y:14%;--s:9%}
.glow-lamp-right{--x:98.8%;--y:51%;--s:11%;animation-duration:2.7s;animation-delay:-1.1s}
.glow-door{--x:69.1%;--y:45.7%;--s:8%;animation:title-breathe 5s infinite}
@keyframes title-flicker{0%,100%{opacity:.3}8%{opacity:.42}14%{opacity:.26}22%{opacity:.38}37%{opacity:.33}45%{opacity:.46}52%{opacity:.29}68%{opacity:.4}80%{opacity:.31}90%{opacity:.44}}
@keyframes title-breathe{0%,100%{opacity:.14}50%{opacity:.26}}
/* Weather over a painting (weather-fx.js): the lightning is the painting itself, brightened around a point and kept inside
   the sky mask, so the clouds light up with their own texture; the bolt is clipped by the same mask, the rain falls over everything. Under the hotspots and the objects to find; it never takes clicks. */
/* No z-index on the layer itself: each child must blend with the painting, not inside a stacking context of its own.
   In a search the rain falls over the objects too, so no streak stops at their outline. */
.weather{position:absolute;inset:0;pointer-events:none}
.weather>*{position:absolute;inset:0;width:100%;height:100%;z-index:1}
.hunt-stage .weather>*{z-index:4}
.title-fx .weather>*{z-index:auto}
.weather-flash,.weather-bolt,.weather-rain{-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}
.weather-flash{--fx:40%;--fy:15%;background-size:100% 100%;background-blend-mode:multiply;mix-blend-mode:screen;filter:brightness(2.4) saturate(.45);opacity:0}
.weather-ambient{background:#a9b9e8;mix-blend-mode:soft-light;opacity:0}
.title-choice:disabled{opacity:1;cursor:not-allowed}.title-choice:disabled .title-face{opacity:1;filter:grayscale(1) brightness(.5)}

@media(prefers-reduced-motion:reduce){.title-choice,.title-face{transition:none}.title-face::after,.title-rain,.weather{display:none}.title-glow,.title-choice.pressed,.title-screen.leaving .title-stage,.arriving{animation:none}}

/* Portrait on a phone or small tablet is a rotation prompt, never an alternate game layout.
   A tall but wide desktop window keeps the game: the stage just letterboxes. Keep in step with `portraitScreen` in controller.js. */
.orientation-notice{display:none}
.orientation-notice small{display:block;margin-top:14px;font-size:14px;color:var(--gold)}
@media(orientation:portrait) and (max-width:900px){
 #app{visibility:hidden}
 .orientation-notice{position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px;background:#080e10;color:var(--paper);text-align:center}
 .orientation-notice svg{width:80px;height:64px;color:var(--gold);margin-bottom:24px}
 .orientation-notice h2{font-size:30px;margin-bottom:16px}
 .orientation-notice p{max-width:28ch;margin:0;color:var(--muted);font-size:16px}
}

/* A staged conversation: the scene stays behind, whoever has spoken stands in it, the words run along the bottom like subtitles. */
.modal-backdrop:has(.vn){padding:0;background:linear-gradient(180deg,#0305044d,#03050499 45%,#030504cc);backdrop-filter:none}
.modal-backdrop:has(.vn-narration){background:linear-gradient(180deg,#0305041a 40%,#03050480)}
.interaction-modal:has(.vn){width:100vw;height:100dvh;max-width:none;max-height:none;padding:0;border:0;border-radius:0;box-shadow:none;background:transparent;overflow:hidden;scrollbar-gutter:auto;outline:0}
.interaction-modal:has(.vn) .close-modal{top:12px;right:12px;z-index:5;border:1px solid #c6a56855;border-radius:50%}
.vn{position:absolute;inset:0;margin:auto;width:min(100vw,calc(100dvh*16/9));height:min(100dvh,calc(100vw*9/16));overflow:hidden;cursor:pointer;user-select:none}
.vn-cast{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.vn-actor{position:absolute;bottom:0;margin:0;height:96%;aspect-ratio:2/3;z-index:1;transform-origin:50% 100%;transform:translateY(3%) scale(.95);filter:brightness(.66) saturate(.8);transition:transform .45s cubic-bezier(.3,.7,.2,1),filter .45s,height .45s,left .45s,right .45s}
.vn-actor img{display:block;width:100%;height:100%;max-height:none;object-fit:contain;object-position:50% 100%}
.vn-actor.at-left.slot-0{left:2%}.vn-actor.at-left.slot-1{left:19%}
.vn-actor.at-right.slot-0{right:2%}.vn-actor.at-right.slot-1{right:19%}
/* A third figure on one side: everyone stands a little smaller and closer, so nobody has to leave the stage. */
.vn-actor.crowd{height:84%}
.vn-actor.crowd.at-left.slot-0{left:0}.vn-actor.crowd.at-left.slot-1{left:14%}
.vn-actor.crowd.at-right.slot-0{right:0}.vn-actor.crowd.at-right.slot-1{right:14%}.vn-actor.crowd.at-right.slot-2{right:28%}
.vn-actor.at-right img{transform:scaleX(-1)}
.vn-actor.speaking{z-index:2;transform:none;filter:none}
.vn-actor.entering.at-left{animation:vn-enter-left .65s cubic-bezier(.2,.7,.2,1) both}
.vn-actor.entering.at-right{animation:vn-enter-right .65s cubic-bezier(.2,.7,.2,1) both}
@keyframes vn-enter-left{from{opacity:0;translate:-14% 0}}
@keyframes vn-enter-right{from{opacity:0;translate:14% 0}}
.vn-band{position:absolute;left:0;right:0;bottom:0;z-index:3;display:flex;flex-direction:column;gap:6px;padding:clamp(48px,11dvh,110px) max(28px,calc(50% - 500px)) clamp(16px,3.5dvh,34px);background:linear-gradient(180deg,#0000,#030605c4 32%,#030605f0)}
.vn-meta{display:flex;justify-content:space-between;gap:16px;font:11px/1.2 var(--sans);letter-spacing:.18em;text-transform:uppercase;color:#d8c08a8c}
.vn-name{margin:2px 0 0;font:600 clamp(19px,2vw,27px)/1.15 var(--serif);color:var(--gold);text-shadow:0 2px 12px #000}
.vn-name::after{content:'';display:block;width:min(180px,40%);height:1px;margin-top:6px;background:linear-gradient(90deg,#c6a568,#c6a56800)}
.voice-right .vn-name{text-align:right}.voice-right .vn-name::after{margin-left:auto;background:linear-gradient(270deg,#c6a568,#c6a56800)}
.vn-text{margin:0;min-height:3.2em;font:clamp(17px,1.5vw,22px)/1.6 var(--serif);color:#f4ecd9;text-shadow:0 1px 10px #000}
.large-text .vn-text{font-size:clamp(19px,1.75vw,25px)}
.vn-narration .vn-text{font-style:italic}
.vn-unsaid{visibility:hidden}
.vn-question{margin:0;font:italic 15px/1.5 var(--serif);color:#d9d0b9a6}
.vn-question b{font-style:normal;margin-right:8px;color:#d8c08ab3}
.vn-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:8px;margin-top:6px;opacity:0;translate:0 10px;pointer-events:none;transition:opacity .35s,translate .35s}
.vn.typed .vn-choices{opacity:1;translate:none;pointer-events:auto}
.vn-choices button{text-align:left;min-height:46px;padding:10px 16px;font:var(--reading-size)/1.45 var(--serif);color:#efe4c8;background:#101a15d9;border:1px solid #c6a56852;border-radius:3px;transition:background .18s,border-color .18s}
.vn-choices button:hover,.vn-choices button:focus-visible{background:#1c2e24f0;border-color:#e0bd74}
.vn-choices button[aria-pressed=true]{opacity:.45;text-decoration:line-through;text-decoration-color:#c9ad73}
.vn .reading-complete{margin:2px 0 0;transition:opacity .3s}
.vn-footer{display:flex;justify-content:space-between;align-items:center;gap:16px;min-height:48px}
/* During a conversation the scene's own controls are not usable: hide them instead of leaving dead buttons, and keep Close beside Continue. */
#app:has(.vn) .hud,#app:has(.vn) .scene .hotspot{opacity:0;visibility:hidden}
.interaction-modal:has(.vn) .close-modal{display:none}
.vn-close{min-height:44px;padding:8px 14px;font-size:var(--ui-size);color:var(--muted);border:1px solid var(--line);border-radius:3px;background:#0f1713b0}
.vn-close:hover:not(:disabled){color:#fff0cf;border-color:var(--gold)}
.vn:not(.typed) .vn-next{opacity:.6}
/* «Lettura completa» waits for the last words of the line: shown earlier it reads as if the line were cut short. */
.vn:not(.typed) .reading-complete{opacity:0}
@media(max-height:520px){
 .vn-band{gap:3px;padding:30px 18px 8px}.vn-meta{display:none}.vn-name{font-size:16px}.vn-name::after{margin-top:3px}
 .vn-text,.large-text .vn-text{font-size:15px;line-height:1.45;min-height:0}.vn-question{font-size:12px}
 .vn-choices{grid-template-columns:1fr 1fr;gap:5px}.vn-choices button{min-height:36px;padding:5px 10px;font-size:13px}
 .vn-footer{min-height:40px}.vn-footer .primary{min-height:40px;padding:6px 14px}.vn-close{min-height:40px;padding:6px 12px}
}
@media(prefers-reduced-motion:reduce){.vn-actor.entering.at-left,.vn-actor.entering.at-right{animation:none}.vn-choices{translate:none}}
.scene-actor.on-stage{visibility:hidden}

.modal>h3{font-size:19px;color:var(--gold);margin:26px 0 10px}

/* Chapter card: a passing mark over the picture; clicks go through it and the animation ends before the card is removed. */
.chapter-card{position:fixed;inset:0;z-index:8;display:grid;place-content:center;text-align:center;background:#07100dd0;pointer-events:none;animation:chapter-card 3.2s ease both}
.chapter-card .eyebrow{font-size:12px;letter-spacing:.2em;text-transform:uppercase;margin-bottom:10px}
.chapter-card h2{font-size:clamp(28px,5vw,52px);color:#fff0cf;text-shadow:0 2px 14px #000;margin:0}
@keyframes chapter-card{0%{opacity:0}14%,78%{opacity:1}100%{opacity:0}}
@media(prefers-reduced-motion:reduce){.chapter-card{animation:none}}

/* Volume slider in the settings: the label and its percentage sit above the track. */
.settings label.volume{flex-wrap:wrap;align-items:center}.settings label.volume span{flex:1}.settings label.volume output{color:var(--gold);margin-left:6px}
.settings label.volume input[type=range]{flex-basis:100%;accent-color:var(--gold);min-height:32px}

/* A new place fades in over its own blurred backdrop. A repaint during the fade starts it again at the elapsed time (a negative delay), so it does not jump. */
#app.immersive .stage.scene-enter>.scene{animation:scene-enter .5s ease-out var(--enter-delay,0ms)}
@keyframes scene-enter{from{opacity:0}}
@media(prefers-reduced-motion:reduce){#app.immersive .stage.scene-enter>.scene{animation:none}}

/* Panels wear the brass double frame of the search plates; every scrollbar keeps the palette. */
.modal{border-color:#c5974e;box-shadow:0 0 0 3px #101713,0 0 0 4px #8f683499,0 25px 100px #000b}
.modal,.board-panel{scrollbar-width:thin;scrollbar-color:#8f6834 #0e1612}

