/* Winter journey: one proportional scene and a readable, optional story pane. */
body.map-journey #gameView .story-experience.world-room{display:block!important;inset:0!important;width:100%!important;height:calc(var(--play-height,100dvh) - var(--play-test-dock,0px))!important;max-height:none!important;overflow:hidden!important;padding:0!important;background:#132d3c}
body.map-journey #gameView .world-room:not(.task-open)>.scene-stage{position:absolute!important;inset:64px 0 0!important;width:100%!important;height:auto!important;max-width:none!important;max-height:none!important;margin:0!important;border-radius:0!important;background:transparent}
body.map-journey #gameView .world-room .scene-art{width:100%!important;height:100%!important;object-fit:contain!important;transform:none!important;object-position:center!important}
body.map-journey #gameView .world-room .scene-shade{background:linear-gradient(transparent 65%,#102d3730)!important}
body.map-journey #gameView .world-room>.scene-header{position:absolute!important;inset:0 0 auto!important;width:100%;max-width:none;margin:0;height:64px;z-index:41!important;padding:8px 12px;box-sizing:border-box;background:#153c42b8;backdrop-filter:blur(8px)}
body.map-journey #gameView .world-room>.scene-narration{position:absolute!important;inset:auto 12px 14px!important;width:min(680px,calc(100% - 24px))!important;height:auto!important;max-height:min(33%,280px)!important;max-width:680px!important;margin:auto!important;padding:14px 18px!important;overflow:auto!important;border:1px solid #ffffff4d!important;border-radius:24px!important;background:#193f46e8!important;backdrop-filter:blur(12px);box-shadow:0 8px 35px #10243044;font-size:14px}
body.map-journey #gameView .world-room .scene-narration h1{font:clamp(22px,3vw,34px)/1.15 Georgia,Palatino,serif!important;letter-spacing:0;margin:0 0 8px}
body.map-journey #gameView .world-room .scene-narration>#sceneProse{display:block!important;max-height:none!important;overflow:visible!important;line-clamp:unset!important;-webkit-line-clamp:unset!important;font-size:14px;line-height:1.65;margin-bottom:10px}
body.map-journey #gameView .world-room .scene-eyebrow{margin-bottom:6px;font-size:9px}
body.map-journey #gameView .world-room .scene-actions,#gameView .world-room #sceneReadStory{display:none!important}
body.map-journey #gameView .world-room .scene-narration.story-folded{max-height:92px!important;overflow:hidden!important}
body.map-journey #gameView .world-room .scene-narration.story-folded>:not(.room-story-tools){display:none!important}
.room-story-toggle{min-height:44px;border:1px solid #ffffff4d;border-radius:22px;background:#ffffff0d;color:inherit;padding:8px 16px;margin:0 0 6px}
body.map-journey #gameView .world-room .scene-secret{transform:translate(-50%,-50%)!important;z-index:8;min-width:48px;min-height:48px;max-width:150px;border:0;background:none;padding:0}
body.map-journey #gameView .world-room .scene-secret>span{animation:room-beacon 4s ease-in-out infinite alternate;background:#173d4380;border:1px solid #ffffff4d;box-shadow:0 0 14px #ffdb9e66;font-size:25px}
body.map-journey #gameView .world-room .scene-secret>img{width:100%;height:auto;max-height:110px;object-fit:contain;filter:drop-shadow(0 0 10px #ffe4b9aa)}
body.map-journey #gameView .world-room .scene-secret small{background:#173d43df;color:#fff7e7;border:1px solid #ffffff4d;font-size:12px}
body.map-journey #gameView .world-room>.scene-ambience,body.map-journey #gameView .world-room>.scene-recap-wrap,body.map-journey #gameView .world-room>.senior-audio,body.map-journey #gameView .world-room>.fairytale-menu{display:none!important}
body.map-journey #gameView .world-room .scene-companion{min-width:48px;max-height:140px;animation:room-breathe 6s ease-in-out infinite}
body.map-journey #gameView .world-room .scene-companion small{font-size:11px;bottom:-17px}
body.map-journey #gameView .world-room.task-open>.scene-stage{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;opacity:.35}
body.map-journey #gameView .world-room.task-open.winter-collecting>.scene-stage{display:block!important;inset:64px 0 0!important;height:auto!important;opacity:1!important}
body.map-journey #gameView .world-room.winter-collecting .scene-companion{top:var(--room-figure-top)!important}
body.map-journey #gameView .world-room.task-open>.scene-narration{display:none!important}
body.map-journey #gameView .world-room.task-open>.scene-task-drawer{position:absolute!important;inset:68px 10px 12px!important;width:min(900px,calc(100% - 20px))!important;max-height:none!important;height:auto!important;border:1px solid #ffffff4d;border-radius:24px!important;overflow:hidden}
body.map-journey #gameView .world-room .scene-task-slot{min-height:0;flex:1;overflow:auto!important;max-height:none!important}
body.map-journey #gameView .world-room .scene-task-drawer>header{min-height:48px}
body.map-journey #gameView .world-room .scene-task-drawer>header button{min-height:48px}
body.map-journey #gameView .world-room #sceneJournal{inset:72px 10px 12px auto;width:min(560px,calc(100% - 20px));max-height:none;background:#f4efdfef;color:#234640;border:1px solid #ffffff4d;box-shadow:0 15px 45px #102c3b99;transform-origin:0 50%}
body.map-journey #gameView .world-room #sceneJournal button{color:#24483e;min-height:48px}body.map-journey #gameView .world-room #sceneJournal article{background:#fffaf1;border-radius:16px;padding:15px;margin:12px 0}body.map-journey #gameView .world-room #sceneJournal article img{width:100%;max-height:240px;object-fit:contain}
.world-room #sceneJournal:not([hidden]){animation:room-page .6s ease-out}
@keyframes room-page{from{opacity:0;transform:perspective(1000px) rotateY(-18deg)}to{opacity:1;transform:perspective(1000px) rotateY(0)}}
@keyframes room-breathe{0%,100%{scale:1;translate:0 0}43%{scale:1.012;translate:0 -2px}72%{scale:1.006;translate:0 -1px}}
@keyframes room-beacon{from{opacity:.72}to{opacity:1}}
@media(max-height:500px) and (min-width:600px){body.map-journey #gameView .world-room>.scene-narration{left:auto!important;right:12px!important;width:38%!important;max-height:70%!important}body.map-journey #gameView .world-room:not(.task-open)>.scene-stage{right:40%!important}}
@media(prefers-reduced-motion:reduce){.world-room *{animation:none!important;transition:none!important}}
body.map-journey #gameView .story-experience.world-room[hidden]{display:none!important}
body.map-journey #gameView .world-room .scene-task-drawer[hidden]{display:none!important}
body.map-journey #gameView .world-room>.scene-narration,body.map-journey #gameView .world-room .scene-narration :is(p,h1){color:#faf3e2!important}
body.map-journey #gameView .world-room .scene-narration .scene-eyebrow{color:#e8cf9a!important}
body.senior-edition.map-journey #gameView .world-room .scene-narration>#sceneProse{font-size:18px;line-height:1.6}
body.map-journey #gameView .world-room>.scene-preview-slot{position:absolute!important;top:70px;left:10px;z-index:18;max-width:calc(100% - 80px);padding:0}
body.map-journey #gameView .world-room .scene-preview-slot #testLabControls{font-size:11px!important;width:auto!important;margin:0!important;border-radius:20px!important;padding:6px 10px!important}
body.map-journey #gameView .world-room .scene-secret{width:48px;height:48px;max-width:48px;min-width:48px;min-height:48px}
body.map-journey #gameView .world-room .scene-secret>img{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:64px;height:64px;max-width:none;max-height:none}
body.map-journey #gameView .world-room .scene-secret small{position:absolute;left:50%;top:calc(100% + 3px);transform:translateX(-50%);width:max-content;max-width:180px;white-space:normal}
body.map-journey #gameView .story-experience.world-room:not(.task-open)>.scene-narration{top:var(--room-story-top,auto)!important;bottom:var(--room-story-bottom,14px)!important;max-height:var(--room-story-max,33%)!important}
body.map-journey #gameView .story-experience.world-room:not(.task-open)>.scene-narration.story-folded{max-height:92px!important}
@media(max-height:500px) and (min-width:600px){body.map-journey #gameView .story-experience.world-room:not(.task-open)>.scene-stage{right:40%!important}body.map-journey #gameView .story-experience.world-room>.scene-narration{left:auto!important;right:12px!important;width:38%!important}}
body.map-journey #gameView .world-room .fairy-foreground{display:none!important}
body.map-journey #gameView .world-room .scene-narration :is(.scene-ambience,.scene-reader,.scene-recap-wrap){display:none!important}
body.map-journey #gameView .world-room #sceneJournal :is(h2,p,strong,small,summary){color:#244a43}
/* One story toolbar replaces the second floating story entry. */
.room-story-tools{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;margin:0 0 6px}
.room-story-tools :is(.room-story-toggle,#journeyVoicePlay){min-width:0;min-height:48px;margin:0;padding:8px 12px;font:13px/1.3 system-ui;border:1px solid #ffffff4d;border-radius:18px;background:#ffffff0b;color:inherit}
.journey-listener{position:static;width:100%;max-width:680px;margin:auto;color:inherit;background:none;border:0;padding:0;box-sizing:border-box}
.journey-listener[hidden]{display:none!important}.journey-listener summary{font:20px Georgia,serif;list-style:none;min-height:48px;display:flex;align-items:center}.journey-listener p{font:17px/1.7 Georgia,serif;overflow-wrap:anywhere}.journey-listener button{min-height:48px;padding:8px 18px;border-radius:18px;font:15px system-ui}
.journey-audio-panel{max-width:500px;margin:auto}.journey-audio-panel .journey-audio-switch{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:8px 0 0;font-weight:650}.journey-audio-switch input{accent-color:#396752;width:26px;height:26px;min-height:26px}.journey-audio-panel input[type=range]{padding:4px 0;border:0;accent-color:#396752}.journey-audio-panel>label:not(.journey-audio-switch){font-size:13px;margin:0 0 18px}.journey-audio-panel details{border-top:1px solid #24483e25;padding-top:10px}.journey-audio-panel summary{min-height:44px;cursor:pointer}.journey-audio-panel p{font-size:13px;line-height:1.6}
body.map-journey:has(.world-room.task-open) .journey-audio-open{display:none!important}
.play-world-audio{display:none}.world-room .play-world-audio{display:block}

/* The room comes first. Reading is an explicit, three-position sheet. */
body.map-journey #gameView .story-experience.world-room[data-room-story]>.scene-narration{display:flex!important;flex-direction:column;gap:0;inset:auto 12px 8px!important;box-sizing:border-box;width:min(680px,calc(100% - 24px))!important;height:auto!important;max-height:calc(100% - 80px)!important;margin:0 auto!important;padding:4px 8px!important;border:1px solid #ffffff55!important;border-radius:20px!important;background:#143b43f2!important;box-shadow:0 4px 22px #092a3c35;overflow:visible!important;color:#fff7e9!important}
body.map-journey #gameView .story-experience.world-room[data-room-story] .room-story-tools{display:grid;flex:none;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;min-height:48px;margin:0}
body.map-journey #gameView .story-experience.world-room[data-room-story] .room-story-tools :is(.room-story-toggle,#journeyVoicePlay){box-sizing:border-box;min-width:48px;min-height:48px;margin:0;padding:8px 10px;border-radius:15px;font:600 13px/1.35 system-ui,sans-serif;white-space:normal;color:#fff7e9!important;background:#ffffff0b;border:1px solid #ffffff4d}
body.map-journey #gameView .story-experience.world-room[data-room-story] .room-story-grip{position:relative;padding-top:12px;touch-action:none;cursor:ns-resize}
.world-room[data-room-story] .room-story-grip::before{content:'';position:absolute;left:calc(50% - 13px);top:4px;width:26px;height:2px;border-radius:2px;background:#fff2d88c;pointer-events:none}
body.map-journey #gameView .story-experience.world-room[data-room-story] .room-story-content{box-sizing:border-box;min-height:0;padding:8px 6px 6px;color:#fff7e9;font:16px/1.7 Georgia,Palatino,serif;overflow-wrap:anywhere;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#d0dcd0 #173d45}
body.map-journey #gameView .story-experience.world-room[data-room-story] .room-story-content[hidden]{display:none!important}
body.map-journey #gameView .story-experience.world-room[data-room-story] .room-story-content #sceneProse{display:block!important;max-height:none!important;overflow:visible!important;-webkit-line-clamp:unset!important;line-clamp:unset!important;white-space:pre-line;font:inherit!important;line-height:1.7!important;margin:0 0 14px;color:#fff7e9!important}
body.map-journey #gameView .story-experience.world-room[data-room-story] .room-story-content h1{font:clamp(22px,3vw,32px)/1.2 Georgia,Palatino,serif!important;color:#fff7e9!important;margin:0 0 14px}
body.map-journey #gameView .story-experience.world-room[data-room-story=closed]>.scene-narration{max-height:64px!important;overflow:visible!important}
body.map-journey #gameView .story-experience.world-room[data-room-story=closed]>.scene-narration>:not(.room-story-tools){display:none!important}
body.map-journey #gameView .story-experience.world-room[data-room-story=peek] .room-story-content{flex:none;overflow:hidden;padding-top:5px;padding-bottom:3px}
body.map-journey #gameView .story-experience.world-room[data-room-story=peek] .room-story-content>:not(#sceneProse){display:none!important}
body.map-journey #gameView .story-experience.world-room[data-room-story=peek] .room-story-content #sceneProse{display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:3!important;line-clamp:3!important;max-height:5.1em!important;overflow:hidden!important;font:14px/1.7 Georgia,Palatino,serif!important;white-space:normal;margin:0}
body.map-journey #gameView .story-experience.world-room[data-room-story=full]>.scene-narration{height:min(68%,680px)!important;min-height:120px;overflow:hidden!important}
body.map-journey #gameView .story-experience.world-room[data-room-story=full] .room-story-content{display:block!important;flex:1 1 auto;overflow:auto!important;touch-action:pan-y;-webkit-overflow-scrolling:touch}
body.map-journey #gameView .story-experience.world-room[data-room-story]:not(.task-open)>.scene-stage{inset:var(--room-stage-top,64px) var(--room-reader-side,0px) var(--room-story-space,72px) 0!important;width:auto!important;height:auto!important}
body.map-journey #gameView .story-experience.world-room[data-room-story-layout=side][data-room-story=full]>.scene-narration{inset:76px 12px 12px auto!important;width:calc(var(--room-reader-side) - 24px)!important;max-width:360px!important;max-height:calc(100% - 88px)!important;height:calc(100% - 88px)!important;align-self:auto!important}
body.map-journey #gameView .story-experience.world-room.task-open[data-room-story]>.scene-narration{display:none!important}
body.map-journey #gameView .story-experience.world-room[data-room-story][aria-busy=true] .scene-stage :is(.scene-secret,.scene-companions){visibility:hidden;pointer-events:none}
.world-room[data-room-story] .room-story-content:focus-visible{outline:2px solid #ffebaf;outline-offset:-2px;border-radius:12px}
.world-room[data-room-story] .room-story-moments{margin:20px 0 4px;border-top:1px solid #ffffff40;padding-top:8px}
.world-room[data-room-story] .room-story-moments[hidden]{display:none!important}
.world-room[data-room-story] .room-story-moments>summary{min-height:48px;display:flex;align-items:center;font:600 14px/1.4 system-ui,sans-serif;cursor:pointer;color:#fff0cb}
.world-room[data-room-story] .room-story-moments section{margin:10px 0 18px}.world-room[data-room-story] .room-story-moments section>strong{font:600 14px/1.4 system-ui,sans-serif}.world-room[data-room-story] .room-story-moments section>p{font:15px/1.7 Georgia,Palatino,serif;white-space:pre-line}
@media(max-height:420px) and (min-width:600px){body.map-journey #gameView .world-room[data-room-story]>.scene-header{box-sizing:border-box!important;height:48px!important;min-height:48px!important;max-height:48px!important;padding:0 8px!important}body.map-journey #gameView .story-experience.world-room[data-room-story=closed]>.scene-narration{bottom:4px!important;padding:1px 6px!important;height:52px!important;min-height:52px!important;max-height:52px!important}body.map-journey #gameView .story-experience.world-room[data-room-story=peek] .room-story-content #sceneProse{-webkit-line-clamp:2!important;line-clamp:2!important;max-height:3.4em!important}body.map-journey #gameView .story-experience.world-room[data-room-story=full]>.scene-narration{height:calc(100% - 80px)!important}}
/* Replay uses its existing measured transport reserve, including while paused. */
body.map-journey.winter-replay #gameView .story-experience.world-room[data-room-story]>.scene-narration{bottom:var(--winter-replay-bottom,110px)!important;max-height:calc(100% - var(--winter-replay-bottom,110px) - var(--room-stage-top,64px) - 8px)!important;overflow:hidden!important}
body.map-journey.winter-replay #gameView .story-experience.world-room[data-room-story=peek] .room-story-content{flex:1 1 auto;min-height:0}
body.map-journey.winter-replay #gameView .story-experience.world-room[data-room-story=full]>.scene-narration{height:min(68%,calc(100% - var(--winter-replay-bottom,110px) - var(--room-stage-top,64px) - 8px))!important;min-height:0!important}
body.map-journey.winter-replay #gameView .story-experience.world-room[data-room-story-layout=side][data-room-story=full]>.scene-narration{height:calc(100% - 76px - var(--winter-replay-bottom,110px))!important;max-height:calc(100% - 76px - var(--winter-replay-bottom,110px))!important}
body.map-journey.winter-replay #gameView .story-experience.world-room[data-room-story]:not(.task-open)>.scene-stage{bottom:calc(var(--room-story-space,72px) + var(--winter-replay-bottom,110px))!important}
@media(prefers-reduced-motion:reduce){.world-room[data-room-story] .scene-narration,.world-room[data-room-story] .room-story-content{transition:none!important;animation:none!important}}
.world-room #bookDecisions button[aria-pressed=true]{background:#eed08c!important;color:#233f3b!important;border-color:#ae8d43!important}
.world-room #bookDecisions button[aria-pressed=true]::before{content:'✓ ';color:inherit}
.journey-narrator-portrait{position:absolute;right:12px;top:12px;width:52px;height:52px;min-width:48px;min-height:48px;padding:2px;border:1px solid #ffffff77;border-radius:50%;background:#173c43e8;box-shadow:0 2px 12px #09232b55;z-index:19;cursor:pointer;color:#fff4d0}
.journey-narrator-portrait img{display:block;width:100%;height:100%;object-fit:contain;border-radius:50%;pointer-events:none}
.journey-narrator-portrait[hidden],.journey-story-skip[hidden]{display:none!important}
.journey-narrator-portrait .narrator-state{position:absolute;right:-2px;bottom:-2px;display:grid;place-items:center;width:20px;height:20px;border:1px solid #d5c591;border-radius:50%;font:700 13px system-ui;background:#173c43;color:#fff4d0}
.journey-narrator-portrait[aria-pressed=false] img{opacity:.65}
.journey-narrator-portrait[data-speaking=true]{box-shadow:0 0 16px #edca7c88}
.story-experience>.journey-narrator-portrait{top:calc(var(--room-stage-top,64px) + 10px)}
.story-experience[data-room-story-layout=side]>.journey-narrator-portrait{left:12px;right:auto}
.story-experience[data-room-story-layout=side]>.journey-story-skip{left:12px;right:auto}
.story-experience.task-open>.journey-narrator-portrait,.story-experience.task-open>.journey-story-skip{display:none!important}
.journey-story-skip{position:absolute;right:12px;top:calc(var(--room-stage-top,64px) + 70px);max-width:180px;min-height:48px;padding:8px 12px;z-index:19;border:1px solid #ffffff66;border-radius:18px;background:#173c43ed;color:#fff4df;font:600 13px/1.3 system-ui;cursor:pointer}
.world-room .scene-secret[data-story-waiting=true]{opacity:.58}
.world-room .scene-secret[data-story-waiting=true] .winter-object-outline{animation-play-state:paused}
@media(max-width:600px) and (min-height:500px){body.map-journey #gameView .story-experience.world-room[data-room-story=full]>.scene-narration{height:min(56%,580px)!important}}
.journey-narrator-portrait:focus-visible,.journey-story-skip:focus-visible{outline:3px solid #fff1b0;outline-offset:3px}
