/* Left-margin field guide. Scene controls are intentionally not exposed. */
#room-canvas{left:205px}
header{pointer-events:none;z-index:3}.brand{font-size:25px}
#instructions{position:absolute;z-index:4;left:30px;top:44%;width:168px;transform:translateY(-20%);color:#344b40}
#instructions[hidden]{display:none}
.guide-kicker{font:8px/1.6 Arial,sans-serif;letter-spacing:1.9px;color:#839083}
#instructions h2{font:22px/1.4 Georgia,'Microsoft JhengHei',serif;letter-spacing:1px;margin:9px 0 25px;font-weight:400}
#touch-pad,.key-cluster{position:static;display:grid;grid-template-columns:repeat(3,42px);grid-template-rows:repeat(2,40px);gap:7px;width:max-content;margin:0;z-index:auto}
.key-cluster button:first-child{grid-column:2}.key-cluster button:nth-child(2){grid-column:1;grid-row:2}.key-cluster button:nth-child(3){grid-column:2;grid-row:2}.key-cluster button:nth-child(4){grid-column:3;grid-row:2}
#touch-pad button,.tutorial-keys button{position:relative;border:1px solid #b9c1ae;border-top-color:#fffdf4;border-bottom-width:2px;border-radius:9px;background:linear-gradient(145deg,#fffdf5,#e7e8da);color:#405c4a;font:22px/1 Georgia,serif;box-shadow:0 4px 0 #b8c0af,0 6px 8px #43533c13,inset 0 1px 0 #fff;transition:transform .15s,box-shadow .15s;touch-action:none}
#touch-pad button:hover,.tutorial-keys button:hover{background:linear-gradient(145deg,#fffefa,#dbe4d6);transform:translateY(-2px)}
#touch-pad button:active,.tutorial-keys button:active{transform:translateY(3px);box-shadow:0 1px 0 #a7b39f,0 2px 3px #43533c13}
.movement-label{font-size:10px;color:#7b887a;letter-spacing:.4px;margin:17px 0 21px}
.guide-rule{width:30px;height:1px;background:#84997a66;margin-bottom:18px}
.guide-line{font-size:10px;line-height:2;white-space:nowrap;margin:0 0 9px}.guide-line kbd{color:#3e5646;background:#f5f5e980;border:1px solid #a3b3976b;font-size:10px;border-radius:4px;padding:4px 6px;margin-right:5px;box-shadow:0 2px 0 #a5b19733}
.guide-note{font-size:10px;line-height:1.9;margin:0;color:#81907f}
#instructions #interact{position:static;transform:none;display:flex;white-space:normal;text-align:left;gap:8px;width:100%;margin-top:21px;padding:10px;border-radius:8px;font-size:10px;line-height:1.5;background:#365345;box-shadow:0 5px 15px #364b3020}
#instructions #interact[hidden]{display:none}#interact kbd{font-size:10px;padding:4px}
#status{position:absolute;z-index:3;left:30px;bottom:28px;max-width:185px;margin:0;padding:0;border:0;border-radius:0;background:none;text-align:left;font-size:9px;line-height:1.8;letter-spacing:.35px;color:#778674;pointer-events:none}
#room-app[data-state=tutorial] #status{visibility:hidden}
/* Floating paper card, with real HTML buttons instead of decorative key art. */
#onboarding{inset:auto;left:30px;top:50%;transform:translateY(-50%);margin:0;width:330px;max-width:calc(100vw - 36px);max-height:calc(100dvh - 48px);padding:27px 27px 20px;overflow:auto;border:1px solid #fffcf2;border-radius:18px;background:linear-gradient(145deg,#fdfbf3fa,#f2f2e7f7);box-shadow:0 24px 65px #334b3024,0 2px 4px #39482712,inset 0 0 0 1px #bdc4ad3b;color:#344e40}
#onboarding[open]{animation:guide-arrive .45s cubic-bezier(.2,.8,.2,1) both}
#onboarding::backdrop{background:#56624709;backdrop-filter:none}
.welcome-top{display:flex;align-items:center;justify-content:space-between}.welcome-mark{font-size:25px;color:#8ca995}
#onboarding h2{font-size:26px;letter-spacing:.4px;font-weight:400;line-height:1.5;margin:14px 0 9px}
#welcome-description{font-size:11px;color:#7f8b7c;margin:0;line-height:1.8}
.key-stage{display:grid;place-content:center;perspective:600px;height:157px;margin:5px -10px 10px}
.tutorial-keys{grid-template-columns:repeat(3,53px);grid-template-rows:repeat(2,51px);gap:10px;transform:rotateX(20deg) rotateZ(-5deg);transform-style:preserve-3d}
.tutorial-keys button{font-size:26px;border-radius:11px;box-shadow:0 7px 0 #aebba5,0 12px 14px #435b3025,inset 0 1px 0 white;text-align:center;padding:0 0 7px}
.tutorial-keys small{display:block;position:absolute;bottom:6px;right:8px;font:8px Arial;color:#89977f}
.welcome-interact{display:flex;align-items:center;gap:13px;border-top:1px solid #9ba78a30;padding-top:17px;margin:0;font-size:11px;line-height:1.8}
.welcome-interact kbd{background:#e7eddf;border:1px solid #aeba9e70;color:#4a6450;font:11px Arial;box-shadow:0 3px 0 #b3c0a680;padding:8px 9px;border-radius:6px}
.welcome-interact small{color:#879180;font-size:10px}
.welcome-start{display:flex;align-items:center;justify-content:space-between;margin:21px 0 0;color:#8c977e;font-size:9px;letter-spacing:.2px}.welcome-start span{font-size:17px}
body.watching #instructions{display:none}
@keyframes guide-arrive{from{opacity:0;transform:translateY(calc(-50% + 12px)) scale(.97)}to{opacity:1;transform:translateY(-50%) scale(1)}}
@media(max-width:900px){
 #room-canvas{left:0}header{left:22px;top:24px}.brand{font-size:24px}
 #instructions{left:22px;top:auto;bottom:46px;transform:none;width:190px;padding:0}
 #instructions h2{font-size:17px;margin:5px 0 13px}.guide-kicker{font-size:7px;letter-spacing:1.4px}
 #touch-pad{grid-template-columns:repeat(3,36px);grid-template-rows:repeat(2,34px);gap:6px}
 #touch-pad button{font-size:20px;border-radius:7px}.movement-label{font-size:9px;margin:12px 0 11px}.guide-rule{display:none}.guide-line{font-size:9px;margin-bottom:5px}.guide-note{font-size:9px;line-height:1.65}
 #instructions #interact{margin-top:10px;width:185px;padding:8px}
 #status{left:22px;bottom:15px;max-width:260px;font-size:8px}
 #onboarding{left:20px;top:50%;bottom:auto;transform:translateY(-50%);width:310px;padding:23px 24px 19px}
 #onboarding[open]{animation:none}
 #onboarding h2{font-size:24px}.key-stage{height:145px}.welcome-start{margin-top:17px}
}
@media(max-height:650px){
 #instructions{top:auto;bottom:40px}#instructions h2{margin:4px 0 12px}#instructions .guide-note{display:none}.movement-label{margin:13px 0}.guide-rule{margin-bottom:10px}
 #onboarding{top:50%;bottom:auto;transform:translateY(-50%);max-height:calc(100dvh - 30px);padding:18px 23px}.key-stage{height:120px}#onboarding h2{margin-top:6px}.welcome-start{margin-top:13px}
}
@media(prefers-reduced-motion:reduce){#onboarding[open]{animation:none}.tutorial-keys button,#touch-pad button{transition:none}}
/* Game HUD: teach at centre, then dock the same visual language to the margin. */
#onboarding{left:50%;top:50%;transform:translate(-50%,-50%);width:365px}
@keyframes guide-arrive{from{opacity:0;transform:translate(-50%,calc(-50% + 15px)) scale(.96)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}
#onboarding::backdrop{background:#24352b24;backdrop-filter:blur(2px)}
.guide-ghost{position:fixed;z-index:100;pointer-events:none;transform-origin:top left;padding:27px 27px 20px;border:1px solid #fffcf2;border-radius:18px;background:#f8f8ef;box-shadow:0 24px 65px #334b3024;overflow:hidden;color:#344e40}
.guide-ghost h2{font:26px/1.5 Georgia,'Microsoft JhengHei',serif;margin:14px 0 9px}.guide-ghost p{font-size:11px;line-height:1.8}
.run-hint{display:inline-block;margin-top:12px}.run-hint kbd,.welcome-run kbd{display:inline-block;padding:4px 7px;color:#48624e;background:#eef0e6;border:1px solid #b4c0a7;box-shadow:0 2px 0 #bcc7b0;font-size:10px}
.welcome-run{display:flex;justify-content:center;align-items:center;gap:10px;font-size:11px;color:#6e806b;margin:0 0 22px}
#room-utility{position:absolute;z-index:5;right:30px;top:26px;width:246px;display:grid;gap:14px}#room-utility[hidden]{display:none}
#theme-toggle{display:flex;align-items:center;gap:13px;width:100%;text-align:left;padding:13px 16px;border:1px solid #ffffffb0;border-radius:15px;background:#f9faf0e8;box-shadow:0 5px 20px #283e2b0c;backdrop-filter:blur(12px);transition:background .4s,box-shadow .2s}
#theme-toggle:hover:not(:disabled){box-shadow:0 6px 24px #283e2b22}#theme-toggle:disabled{opacity:.65}
.theme-symbol{font:30px/1 Georgia;color:#729678}.theme-copy{display:grid;gap:5px;flex:1}.theme-copy small{font:7px Arial;letter-spacing:1.3px;color:#899887}.theme-copy strong{font-size:11px;font-weight:500;letter-spacing:.7px}.theme-track{width:31px;height:18px;border-radius:14px;background:#c5cfbb;padding:3px}.theme-track i{display:block;width:12px;height:12px;border-radius:50%;background:#fffefa;box-shadow:0 1px 3px #16281930;transition:transform .4s}
#room-utility #interact{position:static;transform:none;width:100%;padding:17px 15px;white-space:normal;text-align:left;display:flex;justify-content:space-between;gap:10px;border:1px solid #adccb2;border-radius:15px;background:linear-gradient(130deg,#294e41,#3d6352);box-shadow:0 9px 25px #253c3425;animation:interaction-arrive .25s ease-out}
#room-utility #interact[hidden]{display:none}.interaction-copy{display:grid;gap:8px}.interaction-copy small{font-size:9px;color:#bbd6b9;letter-spacing:1px}.interaction-copy strong{font-size:14px;font-weight:500;color:#fffdf0;line-height:1.5}.interaction-copy em{font-style:normal;font-size:9px;color:#c3d4c7}
#room-utility #interact kbd{flex-shrink:0;border:1px solid #f3ffe077;border-bottom-width:3px;background:#eef2df;color:#325342;padding:9px 7px;font-size:10px;box-shadow:0 3px 0 #14291e50}
@keyframes interaction-arrive{from{opacity:0;translate:0 -7px}to{opacity:1;translate:0 0}}
body{transition:background .7s,color .7s}body[data-theme=night]{--ink:#dde7dd;--muted:#adbdba;--paper:#171f30;--line:#adbfc42b}
body[data-theme=night] #instructions,body[data-theme=night] #instructions h2{color:#d5e0d7}body[data-theme=night] .guide-kicker,body[data-theme=night] .guide-note,body[data-theme=night] .movement-label,body[data-theme=night] #status{color:#a8b9b1;text-shadow:none}
body[data-theme=night] #theme-toggle{background:#263346e8;border-color:#9eafb339;color:#eef0dc}body[data-theme=night] .theme-symbol{color:#e4dba9}body[data-theme=night] .theme-copy small{color:#a9b8bd}body[data-theme=night] .theme-track{background:#708f89}body[data-theme=night] .theme-track i{transform:translateX(13px)}
body[data-theme=night] #details{background:#263346;border-color:#687c8366}body[data-theme=night] #detail-body{color:#c0cecc}body[data-theme=night] .guide-line kbd{background:#354b4b;color:#eef3e2}
@media(max-width:900px){#room-utility{right:20px;top:85px;width:198px}#theme-toggle{padding:10px 12px;gap:9px}.theme-symbol{font-size:25px}.theme-copy small{font-size:6px}.theme-copy strong{font-size:10px}#room-utility #interact{padding:13px 12px}.interaction-copy strong{font-size:12px}.interaction-copy em{font-size:8px}#onboarding{left:50%;top:50%;transform:translate(-50%,-50%);width:340px}}
@media(max-height:650px){#room-utility{top:20px;right:20px}.welcome-run{margin-bottom:12px}#onboarding{transform:translate(-50%,-50%)}}
/* Character dialogue is anchored to the projected head, not a screen corner. */
#interact.character-speech{position:fixed;z-index:6;inset:auto;transform:none;display:flex;flex-direction:column;align-items:stretch;gap:0;width:294px;max-width:calc(100vw - 24px);padding:18px 20px 14px;border:1px solid #d6dccb;border-radius:20px 20px 20px 7px;background:#fffdf3f5;color:#344e42;white-space:normal;text-align:left;box-shadow:0 12px 32px #23362c24,0 2px 5px #23362c0b;backdrop-filter:blur(12px);overflow:visible;animation:speech-pop .22s ease-out}
#interact.character-speech[hidden]{display:none}
#interact.character-speech::after{content:'';position:absolute;left:var(--tail-x,50%);bottom:-8px;width:15px;height:15px;transform:translateX(-50%) rotate(45deg);background:#fffdf3;border-right:1px solid #d6dccb;border-bottom:1px solid #d6dccb;border-radius:0 0 4px 0}
.speech-speaker{display:flex;align-items:center;gap:7px;font:8px Arial;letter-spacing:1.5px;color:#6c8c75;margin-bottom:11px}.speech-speaker i{width:6px;height:6px;border-radius:50%;background:#84ac88;box-shadow:0 0 0 3px #84ac8819}.speech-speaker small{margin-left:auto;font-size:8px;letter-spacing:.5px;color:#a0aa95}
.speech-title{font:17px/1.5 'Microsoft JhengHei',sans-serif;font-weight:600;letter-spacing:.25px}.speech-description{font-size:11px;line-height:1.85;color:#7b8776;margin-top:7px}.speech-footer{display:flex;align-items:center;gap:9px;border-top:1px solid #879c7626;margin-top:13px;padding-top:11px;font-size:10px;color:#6d866a}.speech-footer>span:last-child{margin-left:auto;font-size:16px;color:#94a987}
#interact.character-speech kbd{padding:5px 7px;border:1px solid #b6c5a7;border-bottom-width:2px;border-radius:5px;background:#edf2e3;color:#4b6a50;font-size:10px;box-shadow:0 2px 0 #b6c5a744}
#interact.character-speech:hover{border-color:#9bb18a;background:#fffef7}#interact.character-speech:focus-visible{outline:2px solid #709575;outline-offset:5px}
#interact[data-kind=welcome]{width:330px}.speech-action{line-height:1.6}
body[data-theme=night] #interact.character-speech{background:#293b48f5;border-color:#5c7580;color:#f1f1df;box-shadow:0 12px 32px #0004}body[data-theme=night] #interact.character-speech::after{background:#293b48;border-color:#5c7580}body[data-theme=night] .speech-description{color:#bccac3}body[data-theme=night] .speech-speaker,body[data-theme=night] .speech-footer{color:#a7c6ad}body[data-theme=night] .brand span{color:#a8b9b1}
@keyframes speech-pop{from{opacity:0;scale:.97;translate:0 6px}to{opacity:1;scale:1;translate:0 0}}
@media(max-width:700px){#interact.character-speech{width:258px;padding:14px 16px 12px}.speech-title{font-size:15px}.speech-description{font-size:10px}.speech-footer{margin-top:10px;padding-top:9px}.speech-speaker{margin-bottom:8px}#interact[data-kind=welcome]{width:292px}}
/* Opaque paper prevents GPU backdrop tiles bleeding beyond the speech tail. */
#interact.character-speech{backdrop-filter:none;background:#fffdf3}
body[data-theme=night] #interact.character-speech{background:#293b48}
/* One atmosphere card: the mode and sound controls share visibility and theme. */
#room-utility.atmosphere-controls,#park-atmosphere.atmosphere-controls{--audio-ink:#4e6250;--audio-accent:#718966;--audio-track:#dfe3d3;--audio-paper:#fffdf5;display:grid;gap:0;border:1px solid #ffffffe0;border-radius:18px;background:#f8f7eeeF;color:var(--audio-ink);box-shadow:0 8px 30px #30402d0c,inset 0 0 0 1px #bdc5ab24;backdrop-filter:blur(14px);transition:background .65s,color .65s,border-color .65s;animation:atmosphere-arrive .65s cubic-bezier(.16,1,.3,1) both}
#room-utility.atmosphere-controls[hidden],#park-atmosphere.atmosphere-controls[hidden]{display:none}
.atmosphere-controls #theme-toggle,.atmosphere-controls #park-theme{width:100%;background:transparent!important;border:0!important;border-radius:17px 17px 0 0;box-shadow:none!important;backdrop-filter:none}
.world-audio-panel{margin:0 15px;padding:12px 0 11px;border-top:1px solid #71896624;min-width:0}
.audio-heading{display:flex;align-items:center;justify-content:space-between;padding:0 3px;margin-bottom:3px;font:10px/1.4 'Microsoft JhengHei',sans-serif;letter-spacing:.12em}
.audio-heading output{min-width:35px;text-align:right;font:11px/1.4 Georgia,serif;letter-spacing:.05em;font-variant-numeric:tabular-nums;color:var(--audio-accent)}
.audio-slider-row{display:flex;align-items:center;gap:9px;height:30px}
.world-audio-toggle{position:relative;flex:0 0 28px;width:28px;height:28px;display:grid;place-items:center;padding:0;border:1px solid transparent;border-radius:50%;background:transparent;color:inherit;box-shadow:none;cursor:pointer;transition:background .2s,border-color .2s}
.world-audio-toggle svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.world-audio-toggle:hover{background:#71896612;border-color:#71896628}
.world-audio-toggle:focus-visible,#world-audio-volume:focus-visible{outline:2px solid var(--audio-accent);outline-offset:3px}
.world-audio-toggle[aria-pressed=true]::after{content:'';position:absolute;width:20px;height:1.5px;transform:rotate(-45deg);background:currentColor;box-shadow:0 -2px 0 var(--audio-paper)}
#world-audio-volume{--fill:var(--audio-fill,70%);display:block;appearance:none;-webkit-appearance:none;flex:1;width:0;min-width:0;height:28px;margin:0;padding:0;border:0;border-radius:9px;background:transparent;cursor:pointer;touch-action:pan-y;accent-color:var(--audio-accent)}
#world-audio-volume::-webkit-slider-runnable-track{height:4px;border-radius:5px;background:linear-gradient(to right,var(--audio-accent) 0 var(--fill),var(--audio-track) var(--fill) 100%)}
#world-audio-volume::-moz-range-track{height:4px;border-radius:5px;background:var(--audio-track)}
#world-audio-volume::-moz-range-progress{height:4px;border-radius:5px;background:var(--audio-accent)}
#world-audio-volume::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;margin-top:-5px;border:3px solid var(--audio-paper);border-radius:50%;background:var(--audio-accent);box-shadow:0 0 0 1px #71896655,0 2px 4px #2c392d20;transition:box-shadow .2s}
#world-audio-volume::-moz-range-thumb{width:8px;height:8px;border:3px solid var(--audio-paper);border-radius:50%;background:var(--audio-accent);box-shadow:0 0 0 1px #71896655}
#world-audio-volume:hover::-webkit-slider-thumb{box-shadow:0 0 0 4px #71896618,0 2px 4px #2c392d20}
.audio-max{font:15px/1 Georgia;color:var(--audio-accent);opacity:.65}
.world-audio-panel[data-muted=true] #world-audio-volume{opacity:.5}
body[data-theme=night] #room-utility.atmosphere-controls,body[data-theme=night] #park-atmosphere.atmosphere-controls{--audio-ink:#dce5d6;--audio-accent:#becaa4;--audio-track:#4c605e;--audio-paper:#293d44;background:#263940f2;border-color:#b3c5bb35;box-shadow:0 8px 30px #07141b25}
body[data-theme=night] .world-audio-panel{border-color:#b7c5ad29}
@keyframes atmosphere-arrive{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:700px){.world-audio-panel{margin:0 11px;padding:9px 0 8px}.audio-slider-row{gap:6px}.audio-heading{font-size:9px}.audio-heading output{font-size:10px}}
@media(prefers-reduced-motion:reduce){#room-utility.atmosphere-controls,#park-atmosphere.atmosphere-controls{animation:none;transition:none}.world-audio-toggle,#world-audio-volume::-webkit-slider-thumb{transition:none}}
