/* A story world, with a small HUD and tactile controls laid over the scene. */
body.rrdd-story-world:not([data-story-phase=reading]){background:#e9eadc!important;isolation:isolate;--story-paper:#fff8e8;--story-ink:#194c46}
.story-world-backdrop{position:fixed;inset:0;z-index:-2;pointer-events:none;overflow:hidden;background:#e7ecdf}
.story-world-backdrop::before,.story-world-backdrop::after{content:'';position:absolute;inset:-12px;background-image:var(--story-scene);background-size:cover;background-position:30% center}
.story-world-backdrop::before{filter:blur(16px);transform:scale(1.06);opacity:.8}
.story-world-backdrop::after{inset:0;background-image:linear-gradient(90deg,transparent 34%,#fff8e815 53%,#fff8e840 100%),var(--story-scene);background-position:center,left center}
body.rrdd-story-world:not([data-story-phase=reading])[data-story-phase=watch] .story-world-backdrop::after,body.rrdd-story-world:not([data-story-phase=reading])[data-story-phase=award] .story-world-backdrop::after{background-image:linear-gradient(#fff8e8aa,#fff8e8cc),var(--story-scene)}
body.rrdd-story-world header.rrdd-game-header{background:transparent!important;border:0!important;box-shadow:none!important;pointer-events:none}
body.rrdd-story-world header .rrdd-game-brand,body.rrdd-story-world header .rrdd-challenge-timer{display:none!important}
body.rrdd-story-world header .rrdd-game-tools{pointer-events:none;background:transparent!important}
body.rrdd-story-world header .rrdd-game-tools>*{pointer-events:auto}
body.rrdd-story-world header .rrdd-game-exit{position:fixed!important;left:16px!important;top:14px!important;width:56px!important;height:56px!important;min-height:56px!important;border-radius:50%!important;background:#fff8e8!important;box-shadow:0 5px 0 #b7b69b77!important;font-size:0!important;padding:0!important}
body.rrdd-story-world header .rrdd-game-exit::after{content:'←'!important;display:block!important;font:800 36px/1 'Trebuchet MS',sans-serif!important;color:#285d53}
body.rrdd-story-world header :is(#soundButton,#worldSoundButton){position:fixed!important;right:70px!important;top:14px!important;width:56px!important;height:56px!important;min-height:56px!important;padding:0!important;font-size:24px!important;border:0!important;border-radius:50%!important;background:#fff8e8!important;box-shadow:0 5px 0 #b7b69b77!important}
body.rrdd-story-world header .story-tools-more{position:fixed!important;right:14px!important;top:22px!important;width:44px!important;height:44px!important;padding:0!important;border-radius:50%!important;background:#fff8e8!important;color:#285d53!important;font:800 28px/1 sans-serif!important;box-shadow:none!important}
body.rrdd-story-world header :is(.rrdd-fullscreen-tool,.rrdd-learning-pause){display:none!important}
body.rrdd-story-world.story-tools-open header :is(.rrdd-fullscreen-tool,.rrdd-learning-pause){display:block!important;position:fixed!important;right:18px!important;top:86px!important;min-height:48px!important;min-width:48px!important;background:#fff8e8!important;box-shadow:0 3px 10px #193e3d33!important;z-index:190!important}
body.rrdd-story-world.story-tools-open header .rrdd-learning-pause{top:142px!important}
body.rrdd-story-world .journey-score{position:fixed!important;left:50%!important;top:12px!important;transform:translateX(-50%);width:calc(100% - 292px)!important;max-width:1060px!important;margin:0!important;z-index:105;pointer-events:none}
body.rrdd-story-world .journey-score::before{opacity:.85;backdrop-filter:blur(7px);border-color:#f7ffe5!important;box-shadow:0 2px 6px #234b4544!important}
body.rrdd-story-world .journey-score .star-stop{pointer-events:none}
body.rrdd-story-world:not([data-story-phase=reading]) :is(.adv-reading-copy,.reading-card,.mission-card,.watch-guide,.watch-copy){background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important}
body.rrdd-story-world:not([data-story-phase=reading]) :is(.reading-word-card,.word-card){background:#fff8e8df!important;border:0!important;box-shadow:none!important;border-radius:38px 28px 38px 24px!important}
body.rrdd-story-world:not([data-story-phase=reading]) :is(.adv-reading-copy>h2,#miniQuestion,#missionTitle,#roundBoard>h2){align-self:center;position:relative;background:var(--story-paper)!important;border:0!important;border-radius:48% 43% 46% 39% / 37% 47% 40% 46%!important;padding:22px 30px!important;color:var(--story-ink)!important;filter:drop-shadow(0 5px 0 #3d63451c);text-align:center;font-family:Froople,'Trebuchet MS',sans-serif!important}
body.rrdd-story-world:not([data-story-phase=reading]) :is(.adv-reading-copy>h2,#miniQuestion,#roundBoard>h2)::after{content:'';position:absolute;bottom:-10px;left:15%;width:28px;height:22px;background:var(--story-paper);clip-path:polygon(0 0,100% 0,0 100%)}
body.rrdd-story-world :is(.mini-header,.play-top){background:none!important;border:0!important;box-shadow:none!important}
body.rrdd-story-world :is(.mini-header,.play-top) :is(.eyebrow,.mission-step){background:#fff8e8dd;border-radius:20px;padding:6px 12px}
body.rrdd-story-world:not([data-story-phase=reading]) :is(.story-picture,.reading-picture,.scene-frame,.scene-layout>figure,.story-window){background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important}
/* The original story image still provides alt text; its world plate fills the screen. */
body.rrdd-story-world:not([data-story-phase=reading])[data-story-phase=reading] :is(.story-picture img,.reading-picture img,.scene-layout>figure>img){opacity:0}
body.rrdd-story-world:not([data-story-phase=reading]) :is(.choices,.mission-action){background:transparent!important;border:0!important;box-shadow:none!important}
body.rrdd-story-world:not([data-story-phase=reading]) .choices>button{border-radius:48% 48% 44% 44%!important;border:3px solid #fffc!important;background:#fff0b8!important;box-shadow:0 7px 0 #c69953aa,0 8px 18px #4c55312b!important;color:#194c46!important;padding:18px 14px!important}
body.rrdd-story-world:not([data-story-phase=reading]) .choices>button:nth-child(3n+2){background:#d5e9c9!important;box-shadow:0 7px 0 #9cb795aa,0 8px 18px #4c55312b!important}
body.rrdd-story-world:not([data-story-phase=reading]) .choices>button:nth-child(3n){background:#e7d5f6!important;box-shadow:0 7px 0 #af96c9aa,0 8px 18px #4c55312b!important}
body.rrdd-story-world:not([data-story-phase=reading]) .choices>button:is(.idea-selected,.selected,.chosen){outline:5px solid #fff3a7!important;outline-offset:4px;transform:translateY(-4px)}
body.rrdd-story-world:not([data-story-phase=reading]) .gold{border-radius:999px!important;border:3px solid #fffc!important;box-shadow:0 5px 0 #c69b4e99,0 5px 14px #3e623522!important}
/* Room adapters: keep spatial left/right relationships without enclosing panels. */
body.room-adventure.rrdd-story-world:not([data-story-phase=reading]) #playScreen .story-window{visibility:hidden;pointer-events:none}
body.room-adventure.rrdd-story-world:not([data-story-phase=reading]) #gameBoard{background:transparent!important;border:0!important;box-shadow:none!important;overflow:visible;padding:16px 20px}
body.room-adventure.rrdd-story-world:not([data-story-phase=reading]) #gameBoard .mini-heading .eyebrow{display:none}
body.room-adventure.rrdd-story-world:not([data-story-phase=reading]) #gameBoard .mini-heading{justify-content:flex-end}
body.room-adventure.rrdd-story-world:not([data-story-phase=reading]) #roundCount{font-size:15px;color:#194c46;background:#fff8e8e8;padding:8px 14px;border-radius:24px}
body.room-adventure.rrdd-story-world:not([data-story-phase=reading]) #roundBoard{overflow:auto;padding:16px 12px;gap:24px}
body.room-adventure.rrdd-story-world:not([data-story-phase=reading]) #roundBoard>h2{font-size:clamp(30px,4vw,58px)!important;line-height:1.1}
body.room-adventure.rrdd-story-world:not([data-story-phase=reading]) .kind-choices{gap:22px;flex-wrap:nowrap;align-items:flex-end;width:100%}
body.room-adventure.rrdd-story-world:not([data-story-phase=reading]) .kind-idea{flex:1;min-width:0;max-width:200px;min-height:142px;font:clamp(18px,2vw,28px)/1.08 Froople,'Trebuchet MS',sans-serif}
body.room-adventure.rrdd-story-world:not([data-story-phase=reading]) .kind-idea .idea-icon{font-size:clamp(50px,6vw,84px);line-height:1.1;margin-top:-28px;filter:drop-shadow(0 3px 0 white)}
body.room-adventure.rrdd-story-world:not([data-story-phase=reading]) .kind-idea b{font:inherit}
body.room-adventure.rrdd-story-world:not([data-story-phase=reading]) .kind-confirm{min-width:190px;min-height:56px;font:28px Froople,'Trebuchet MS',sans-serif}
body.room-adventure.rrdd-story-world:not([data-story-phase=reading]) .kind-confirm:disabled{opacity:.45}
body.room-adventure.rrdd-story-world:not([data-story-phase=reading]) .kind-explanation{background:#fff8e8e8;border-radius:26px;padding:12px 20px;font-size:20px;line-height:1.4;text-align:center}
body.room-adventure.rrdd-story-world:not([data-story-phase=reading]) .word-subject .word-picture{padding:12px;background:#fff8e8b8;border-radius:50%;filter:drop-shadow(0 4px 8px #3d58352b)}
body.room-adventure.rrdd-story-world:not([data-story-phase=reading]) #feedback:not(:empty){background:#fff8e8e8;border-radius:24px;padding:5px 15px!important;justify-self:center}
body.room-adventure.rrdd-story-world:not([data-story-phase=reading]) .word-slots .sound-slot{background:#fff8e8ee;border-color:#9bb489;box-shadow:0 4px 0 #597c5755}
body.room-adventure.rrdd-story-world:not([data-story-phase=reading]) .word-slots .filled{background:#ffdf83}
body.room-adventure.rrdd-story-world:not([data-story-phase=reading]) .memory-frame{background:#fff6dfeb;box-shadow:0 8px 20px #36543a44}
body.rrdd-story-world[data-story-phase=memory] :is(.memory-heading,.album-heading,#memory>.mini-header){color:#194c46;text-shadow:0 1px 4px #fff9e8;background:#fff8e8b8!important;border-radius:40px;padding:8px 18px!important}
@media(max-aspect-ratio:1/1){.story-world-backdrop::after{background-size:cover,auto 80vh;background-repeat:no-repeat;background-position:center,left bottom}body.rrdd-story-world #roundBoard{gap:18px}body.room-adventure.rrdd-story-world .kind-choices{gap:12px}body.room-adventure.rrdd-story-world .kind-idea{font-size:21px;min-height:124px}body.rrdd-story-world .journey-score{width:calc(100% - 240px)!important}}
@media(max-width:700px){body.rrdd-story-world .journey-score{width:calc(100% - 166px)!important;left:46%!important;top:8px!important;--adv-hud-centre:68px}body.rrdd-story-world .journey-score .score-centre{min-width:60px!important}body.rrdd-story-world .journey-score #journeyScore{font-size:38px!important}body.rrdd-story-world header .rrdd-game-exit{left:8px!important;top:14px!important;width:44px!important;height:44px!important;min-height:44px!important}body.rrdd-story-world header :is(#soundButton,#worldSoundButton){right:46px!important;top:14px!important;width:44px!important;height:44px!important;min-height:44px!important}body.rrdd-story-world header .story-tools-more{right:4px!important;top:15px!important;width:38px!important;height:38px!important}body.rrdd-story-world :is(.adv-reading-copy>h2,#miniQuestion,#roundBoard>h2){padding:16px 20px!important}body.room-adventure.rrdd-story-world .kind-choices{gap:10px}body.room-adventure.rrdd-story-world .kind-idea{min-height:102px;font-size:18px;padding:12px 8px!important}body.room-adventure.rrdd-story-world .kind-idea .idea-icon{font-size:46px}body.room-adventure.rrdd-story-world #roundBoard{gap:18px;padding:12px 4px}body.room-adventure.rrdd-story-world .kind-confirm{min-height:48px;font-size:24px}.story-world-backdrop::after{background-size:cover,auto 72vh}}
@media(max-height:500px) and (orientation:landscape){body.rrdd-story-world .journey-score{top:0!important;transform:translateX(-50%) scale(.9)}body.room-adventure.rrdd-story-world #roundBoard{gap:8px;padding:3px}body.room-adventure.rrdd-story-world #roundBoard>h2{font-size:26px!important;padding:10px 22px!important}body.room-adventure.rrdd-story-world .kind-idea{min-height:90px;font-size:19px;padding:12px 8px!important}body.room-adventure.rrdd-story-world .kind-idea .idea-icon{font-size:46px;margin-top:-14px}body.room-adventure.rrdd-story-world .kind-confirm{min-height:42px;font-size:22px}}
@media(prefers-reduced-motion:reduce){body.rrdd-story-world:not([data-story-phase=reading]) .choices>button{transition:none}}
/* Shared chrome rules have intentionally high specificity; the story skin wins here. */
body.rrdd-adventure.rrdd-game-shell.rrdd-story-world header.rrdd-game-header{background:transparent!important;border:0!important;box-shadow:none!important}
body.rrdd-adventure.rrdd-game-shell.rrdd-story-world header.rrdd-game-header :is(.rrdd-game-brand,.rrdd-challenge-timer){display:none!important}
body.rrdd-adventure.rrdd-game-shell.rrdd-story-world header.rrdd-game-header .rrdd-game-exit{position:fixed!important;left:16px!important;right:auto!important;top:14px!important;width:56px!important;min-width:56px!important;height:56px!important;min-height:56px!important;padding:0!important;font-size:0!important;background:#fff8e8!important;border-radius:50%!important}
body.rrdd-adventure.rrdd-game-shell.rrdd-story-world header.rrdd-game-header .rrdd-game-exit::after{display:block!important;content:'←'!important;font:800 36px/1 'Trebuchet MS',sans-serif!important;color:#285d53}
body.rrdd-adventure.rrdd-game-shell.rrdd-story-world header.rrdd-game-header :is(.rrdd-fullscreen-tool,.rrdd-learning-pause){display:none!important}
body.rrdd-adventure.rrdd-game-shell.rrdd-story-world.story-tools-open header.rrdd-game-header :is(.rrdd-fullscreen-tool,.rrdd-learning-pause){display:block!important;position:fixed!important;top:86px!important;right:18px!important;min-height:48px!important;min-width:48px!important;background:#fff8e8!important;box-shadow:0 3px 10px #193e3d33!important;z-index:190!important}
body.rrdd-adventure.rrdd-game-shell.rrdd-story-world.story-tools-open header.rrdd-game-header .rrdd-learning-pause{top:142px!important}
body.room-adventure.rrdd-story-world:not([data-story-phase=reading]) #roundBoard>h2{min-width:min(85%,620px)}
@media(max-width:700px){body.rrdd-adventure.rrdd-game-shell.rrdd-story-world header.rrdd-game-header .rrdd-game-exit{left:8px!important;top:14px!important;width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important}}
/* Keep the actual toy boards and drop targets; remove their dashboard surround. */
body.rrdd-story-world:not([data-story-phase=reading]).halloween-game #play,body.rrdd-story-world:not([data-story-phase=reading]).halloween-game #board,body.rrdd-story-world:not([data-story-phase=reading]).halloween-game .cape-studio{background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important}
body.rrdd-story-world:not([data-story-phase=reading]).halloween-game .cape-choice{background:#fff8e8e8!important;border:3px solid white!important;border-radius:48%!important;box-shadow:0 6px 0 #c2a7bf77!important}
body.rrdd-story-world:not([data-story-phase=reading]).halloween-game .cape-clue{background:#fff8e8f0!important;color:#194c46!important;text-shadow:none!important;padding:12px 24px;border-radius:48% 43% 46% 39%;font-family:Froople,'Trebuchet MS',sans-serif}
body.rrdd-story-world:not([data-story-phase=reading]).halloween-game[data-story-phase=play] .story-world-backdrop::after{filter:blur(9px);opacity:.75}
body.rrdd-story-world:not([data-story-phase=reading]).chimelong-game[data-story-phase=play] .scene-layout>figure>img{opacity:0}
body.rrdd-story-world:not([data-story-phase=reading]).thread-adventure .mission-card{color:#194c46;background:#fff8e8b0!important;border-radius:36px!important}
/* Existing story illustrations blend into the world, keeping both characters left. */
body.rrdd-story-world:not([data-story-phase=reading])[data-story-plate=original]:is([data-story-phase=reading],[data-story-phase=play]) .story-world-backdrop::after{background-image:var(--story-scene);background-repeat:no-repeat;background-size:66% auto;background-position:left center;mask-image:linear-gradient(90deg,#000 0%,#000 50%,transparent 72%),linear-gradient(0deg,transparent 0%,#000 12%,#000 88%,transparent 100%);mask-composite:intersect}
@media(max-aspect-ratio:1/1){body.rrdd-story-world:not([data-story-phase=reading])[data-story-plate=original]:is([data-story-phase=reading],[data-story-phase=play]) .story-world-backdrop::after{background-size:auto 72vh;background-position:left bottom;mask-image:linear-gradient(90deg,#000,#000 55%,transparent 88%),linear-gradient(0deg,#000 0%,#000 65%,transparent 100%);mask-composite:intersect}}
body.rrdd-story-world:not([data-story-phase=reading])[data-story-plate=original] .story-world-backdrop::before{background-image:radial-gradient(ellipse at 25% 40%,#ebf3dd,#d8eadc 60%,#e8f0de);filter:none}
body.rrdd-story-world:not([data-story-phase=reading]).halloween-game[data-story-plate=original] .story-world-backdrop::before{background-image:radial-gradient(ellipse at 20% 50%,#b3a1c4,#735f8d 70%,#53406f)}
body.rrdd-story-world:not([data-story-phase=reading]).chimelong-game[data-story-plate=original] .story-world-backdrop::before{background-image:radial-gradient(ellipse at 20% 50%,#d4f5ee,#a3dce4 70%,#86c4d5)}
body.rrdd-story-world:not([data-story-phase=reading]).thread-adventure[data-story-plate=original] .story-world-backdrop::before{background-image:radial-gradient(ellipse at 20% 50%,#fff1da,#ebd0d5 70%,#dcbfce)}
body.rrdd-story-world:not([data-story-phase=reading]).halloween-game[data-story-phase=play][data-story-plate=wide] .story-world-backdrop::after{filter:none;opacity:1}
body.rrdd-adventure.rrdd-game-shell.rrdd-story-world .journey-score{position:fixed!important;left:50%!important;top:12px!important;transform:translateX(-50%)!important;right:auto!important;width:calc(100% - 292px)!important;max-width:1060px!important;margin:0!important}
body.rrdd-adventure.rrdd-game-shell.rrdd-story-world:not([data-story-phase=reading]) :is(#read,#play,#readingScreen,#playScreen,#pictureScreen){background:transparent!important;border:0!important;box-shadow:none!important}
body.rrdd-adventure.rrdd-game-shell.rrdd-story-world:not([data-story-phase=reading]) :is(#read,#readingScreen,#pictureScreen) :is(figure,.reading-picture,.story-picture){background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important}
body.rrdd-story-world:not([data-story-phase=reading])[data-story-plate=original]:is([data-story-phase=reading],[data-story-phase=play]) .story-world-backdrop::after{background-size:auto 90%;background-position:left center}
@media(max-aspect-ratio:1/1){body.rrdd-story-world:not([data-story-phase=reading])[data-story-plate=original]:is([data-story-phase=reading],[data-story-phase=play]) .story-world-backdrop::after{background-size:auto 72vh;background-position:left bottom}}
@media(max-width:700px){body.rrdd-adventure.rrdd-game-shell.rrdd-story-world .journey-score{width:calc(100% - 166px)!important;left:46%!important;top:8px!important}}
/* Outrank the earlier shared reading-layout frame, including its :not() clauses. */
body.rrdd-adventure.rrdd-game-shell.rrdd-story-world:not([data-story-phase=reading]) :is(#read#read,#readingScreen#readingScreen,#pictureScreen#pictureScreen) :is(figure,.reading-picture,.story-picture){background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important}
body.rrdd-story-world .journey-score .star-stop:not(:disabled){pointer-events:auto}
body.rrdd-story-world:not([data-story-phase=reading])[data-story-plate=original]:is([data-story-phase=reading],[data-story-phase=play]) .story-world-backdrop::after{width:48%;background-size:cover;background-position:center;mask-image:linear-gradient(90deg,#000 68%,transparent 100%)}
body.rrdd-adventure.rrdd-game-shell.rrdd-story-world:not([data-story-phase=reading]) :is(#read#read,#readingScreen#readingScreen,#pictureScreen#pictureScreen) .adv-reading-copy :is(.word-card,.reading-word-card){background:#fff8e8b8!important;border-radius:40px!important;width:fit-content!important;max-width:100%;padding:14px 22px!important}
body.rrdd-story-world:not([data-story-phase=reading]) :is(.word-card,.reading-word-card) .eyebrow{display:none!important}
body.rrdd-story-world:not([data-story-phase=reading]) :is(#meaning,.reading-word-card p){font-size:clamp(18px,1.4vw,23px)!important;line-height:1.4!important}
@media(max-aspect-ratio:1/1){body.rrdd-story-world:not([data-story-phase=reading])[data-story-plate=original]:is([data-story-phase=reading],[data-story-phase=play]) .story-world-backdrop::after{width:100%;background-size:auto 72vh;background-position:left bottom;background-repeat:no-repeat;mask-image:linear-gradient(90deg,#000,#000 55%,transparent 95%),linear-gradient(0deg,#000 0%,#000 55%,transparent 85%);mask-composite:intersect}}
body.rrdd-story-world #starRoute .star-stop:not(.earned) svg path:nth-of-type(1){fill:#cde2c2!important;stroke:#91af86!important}
body.rrdd-story-world #starRoute .star-stop:not(.earned) svg path:nth-of-type(2){fill:#e2efd9!important}
body.rrdd-story-world #starRoute .star-stop:not(.earned) svg path:nth-of-type(3){stroke:#f7fff0!important}

/* Reading keeps the established shared picture-and-text layout. */
body.rrdd-story-world[data-story-phase=reading] .story-world-backdrop{display:none!important}
