@font-face{font-family:Froople;src:url('art/Froople.ttf')}*{box-sizing:border-box}body{margin:0;background:#f4f2e7;color:#274f48;font-family:'Trebuchet MS',sans-serif}button,a,input{touch-action:manipulation}button{cursor:pointer;border:0;font:800 19px/1.2 'Trebuchet MS',sans-serif;border-radius:18px;min-height:48px;padding:12px 22px;color:#274f48;background:#fffaf0;box-shadow:0 4px 0 #c7c8b8}button:disabled{cursor:default;opacity:.5}button:focus-visible,a:focus-visible{outline:4px solid #df7f32;outline-offset:4px}button:not(:disabled):active{transform:translateY(3px);box-shadow:none}[hidden]{display:none!important}.gold{background:#ffdf83;box-shadow:0 4px 0 #dcad50}.subtle-btn{background:transparent;box-shadow:none;font-size:16px}.eyebrow{font-weight:800;font-size:15px;letter-spacing:.08em;text-transform:uppercase}h1,h2,h3,p,figure{margin:0}h1,h2,h3{font-family:Froople,'Trebuchet MS',sans-serif}body.room-adventure{--adv-rail:#a9cabe;--adv-edge:#759d8c;--adv-score:#deebe0;--adv-ink:#274f48;--adv-highlight:#fff1b9;--adv-media-board:#e9eee3}body.room-adventure .adv-watch-copy h1{color:#355b4d}body.room-adventure .welcome-photo{max-width:270px;width:65%;border:7px solid #fffaf0;box-shadow:0 8px 22px #45563d18;transform:rotate(-5deg);border-radius:20px}#localFilm{width:100%;height:100%;object-fit:contain}.reading-picture{margin:0;min-height:0;display:grid;place-items:center;background:#e4e9d9;border-radius:26px;overflow:hidden}.reading-picture img{width:100%;height:100%;object-fit:contain}.reading-copy{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:18px;padding:26px}.reading-copy h2{font-size:clamp(26px,3vw,42px);line-height:1.25}.reading-word-card{border-radius:22px;background:#fffaf0;padding:18px;width:100%;border:2px solid #e7dbc1}.reading-word-card button{font:34px Froople,sans-serif;background:#dcebdc;box-shadow:none}.reading-word-card p{font-size:20px;line-height:1.3;margin-top:12px}#readingStatus{font-size:16px;min-height:1.2em}.room-play,.room-memory{display:grid!important;grid-template-rows:auto minmax(0,1fr) 28px;gap:10px}.mini-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 12px}.mini-heading h2{font-size:26px}.mini-heading .gold{padding:8px 16px;min-height:44px}.play-world{display:grid;grid-template-columns:1fr 1fr;gap:16px;min-height:0}.story-window{border-radius:28px;overflow:hidden;position:relative;background:#e2e8d6;min-height:0}.story-window>img{width:100%;height:100%;object-fit:contain}.story-window #sceneEffect{position:absolute;inset:0;display:grid;place-items:center;font-size:80px;pointer-events:none}.story-window.celebrate img{animation:warm-glow .8s ease}#gameBoard{border-radius:28px;background:#fffaf0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;padding:22px;min-height:0;overflow:auto;border:2px solid #e8ddc4}#gameBoard h2{font-size:clamp(26px,3vw,40px);text-align:center}.word-picture{font-size:80px;line-height:1.2}.word-slots,.letter-tray,.choices,.bowl-tray,.bed-board{display:flex;justify-content:center;gap:16px;flex-wrap:wrap}.word-slots span{display:grid;place-items:center;width:64px;height:70px;border:3px dashed #b1c4ab;border-radius:16px;font:40px Froople,sans-serif;background:#e9eee3}.word-slots span.filled{background:#ffdf83;border-style:solid;border-color:#eac369;animation:pop .35s}.letter-tray button{font:40px Froople,sans-serif;min-width:70px;min-height:74px;background:#e3eee2}.round-dots{letter-spacing:6px;color:#c88836}.choices button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-width:100px}.choices button span{font-size:54px}.bowl{min-width:130px;min-height:130px!important;background:#e4eee3;display:flex;flex-direction:column;gap:12px;align-items:center;justify-content:center}.bowl span{font-size:32px}.scoop-bank{font-size:45px;min-height:56px}.bed-board{background:#e4d5bf;border:10px solid #bc977d;border-radius:26px;padding:20px;min-width:85%;align-items:center}.bed-person,.bed-space{font-size:60px;min-width:90px;min-height:115px;display:grid;place-items:center}.bed-space{border:3px dashed #8fae95;background:#f8f3df}.move-piece{font-size:55px;background:#e4eee3;touch-action:none}.selected{outline:4px solid #dfa33c!important}.incorrect{animation:wiggle .35s}.memory-frame{position:relative;align-self:center;justify-self:center;min-height:0;display:grid;place-items:center;width:min(100%,410px);height:100%;max-height:350px;padding:28px;border:18px solid #c79768;border-radius:26px;background:#fbf0d9;box-shadow:inset 0 0 0 3px #ead5a6,0 9px 0 #ac7b51}.memory-frame::before{content:'☾';position:absolute;top:-27px;right:10px;font-size:50px;color:#e7b94a;text-shadow:0 2px #9e7044}.memory-slot{width:100%;height:100%;min-height:130px;background:#e5eadc;box-shadow:none;border:3px dashed #a9bfa8;display:grid;place-items:center;padding:8px;font-size:24px}.memory-slot img{width:100%;height:100%;object-fit:contain;min-height:0}.memory-slot .clue{font:clamp(21px,2.4vw,30px)/1.3 Froople,sans-serif;max-width:300px}.memory-layout{display:grid;grid-template-columns:1fr 1.1fr;gap:30px;min-height:0;padding:20px}.memory-tray{display:flex;flex-wrap:wrap;align-content:center;justify-content:center;gap:16px;min-height:0}.memory-photo{padding:7px 7px 12px;background:white;border-radius:10px;box-shadow:0 5px 0 #ccc4ac;width:clamp(100px,15vw,200px);transform:rotate(-4deg);touch-action:none}.memory-photo:nth-child(2){transform:rotate(4deg)}.memory-photo img{display:block;width:100%;aspect-ratio:1;object-fit:contain;background:#f4eee1}.memory-photo span{display:block;padding-top:8px;font:23px Froople,sans-serif}#feedback,#memoryFeedback{text-align:center;font-weight:800;font-size:18px}#certificateScreen{overflow:auto!important}#again{display:block;margin:12px auto}.adv-watch-copy .eyebrow{color:#9a683a}#result{min-height:100%}@keyframes pop{from{transform:scale(.6)}to{transform:scale(1)}}@keyframes wiggle{25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}@keyframes warm-glow{50%{filter:brightness(1.15)}}
@media(max-width:700px) and (orientation:portrait){.play-world{grid-template-columns:1fr;grid-template-rows:minmax(0,.7fr) minmax(0,1fr)}#gameBoard{gap:12px;padding:12px}.word-picture{font-size:50px}.word-slots span{width:52px;height:52px;font-size:32px}.letter-tray button{min-width:58px;min-height:52px;font-size:32px}.memory-layout{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto;padding:8px;gap:14px}.memory-frame{max-height:300px;width:min(90%,330px);padding:12px}.memory-tray{flex-wrap:nowrap;gap:8px}.memory-photo{width:30%;max-width:140px}.memory-photo span{font-size:18px}.mini-heading .eyebrow{font-size:12px}.mini-heading h2{font-size:21px}.bowl{min-height:90px!important}.reading-copy{gap:12px}.reading-word-card p{font-size:18px}.welcome-photo{display:none}}
@media(max-height:500px) and (orientation:landscape){#gameBoard{gap:8px;padding:10px}.word-picture{font-size:44px}.word-slots span{width:42px;height:44px;font-size:30px}.letter-tray button{min-height:44px;font-size:30px;padding:5px 15px}.mini-heading{min-height:36px}.room-play,.room-memory{gap:3px;grid-template-rows:36px minmax(0,1fr) 20px}.mini-heading button{min-height:34px!important}.memory-layout{padding:8px;gap:15px}.memory-frame{padding:8px;border-width:12px}.memory-photo{width:110px}.memory-photo img{max-height:105px}.bowl{min-height:80px!important}.word-slots,.letter-tray{gap:10px}.bed-board{padding:8px}.bed-person,.bed-space{min-height:80px}.reading-word-card{padding:10px}.reading-copy h2{font-size:24px!important}.welcome-photo{display:none}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

body.room-adventure [hidden]{display:none!important}.memory-flying-photo{position:fixed;z-index:120;pointer-events:none;object-fit:contain;background:#fffaf0;padding:6px}

.room-adventure .character-face{background-image:url('art/story-six.webp');background-size:300% auto;width:100px;height:115px;border:5px solid #fff2cf;border-radius:25px;box-shadow:0 4px 0 #b6a88d}.character-face.rayray{background-position:57% 23%}.character-face.dodu{background-position:2% 38%}#readingSentence span{border-radius:6px;transition:background .15s}#readingSentence .active{background:#ffe082;color:#274f48}

#memoryBoard{min-height:0;display:grid}.memory-layout{height:100%}

body.room-adventure .welcome-photo{width:auto!important;height:clamp(90px,25dvh,250px)!important;max-width:75%;object-fit:contain;flex-shrink:1;min-height:0}

/* Room review v3: the task occupies two panes, with its controls inside the game. */
body.room-adventure #playScreen:not([hidden]){display:block!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important;height:100%!important;min-height:0!important;padding:0!important}
body.room-adventure #playScreen .play-world{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important;width:100%!important;height:100%!important;min-height:0;gap:16px}
body.room-adventure #gameBoard{position:relative;display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto minmax(0,1fr) auto!important;align-items:stretch;justify-content:stretch;padding:20px;gap:12px;overflow:hidden}
body.room-adventure #roundBoard{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(12px,2vh,24px);min-height:0;overflow:auto}
body.room-adventure #gameBoard .mini-heading{width:100%;padding:0;gap:8px;flex-wrap:wrap;align-content:start}
body.room-adventure #gameBoard .mini-heading .eyebrow{font-size:12px;letter-spacing:.04em;flex:1;min-width:100px}
body.room-adventure #roundCount{font-size:15px;white-space:nowrap}
body.room-adventure .word-subject{display:flex;align-items:center;justify-content:center;gap:20px}
body.room-adventure .letter-tile{touch-action:none;user-select:none;cursor:grab}
body.room-adventure .letter-tile:active{cursor:grabbing}
body.room-adventure .sound-slot{flex:none;min-width:52px;min-height:52px}
body.room-adventure .star-stop:not(.earned) svg path:nth-child(1){fill:#cde2c2;stroke:#91af86}
body.room-adventure .star-stop:not(.earned) svg path:nth-child(2){fill:#e2efd9}
body.room-adventure .star-stop:not(.earned) svg path:nth-child(3){stroke:#f7fff0}
@media(max-width:600px) and (orientation:portrait){body.room-adventure #playScreen .play-world{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,.7fr) minmax(0,1fr)!important;gap:8px}body.room-adventure #gameBoard{padding:10px;gap:6px}body.room-adventure #roundBoard{gap:10px}body.room-adventure .word-subject{gap:12px}}
@media(max-height:500px) and (orientation:landscape){body.room-adventure #gameBoard{padding:8px;gap:4px}body.room-adventure #roundBoard{gap:6px}body.room-adventure #gameBoard .mini-heading{flex-wrap:nowrap}body.room-adventure #gameBoard h2{font-size:24px}}

body.room-adventure #gameBoard>.mini-heading{grid-area:1 / 1 / 2 / 2!important;align-self:start;min-height:44px}
body.room-adventure #gameBoard>#roundBoard{grid-area:2 / 1 / 3 / 2!important}
body.room-adventure #gameBoard>#feedback{grid-area:3 / 1 / 4 / 2!important;margin:0!important;min-height:24px}

/* A warm morning detective world. Shared layout and HUD remain common. */
body.bag-adventure{--sage:#337b96;--dark:#214d68;--cream:#fff6d8;background:#f4e6ba;color:#214d68}
.bag-adventure .reading-word-card{background:#fff1ba;border-color:#e6bc50}
.bag-adventure .memory-frame{border-color:#d6a342;background:#fff6d9;box-shadow:0 10px 0 #af7a3c,0 18px 35px #62472026}
.bag-adventure .position-world{position:relative;min-height:160px;width:min(100%,310px);display:grid;place-items:center;background:#dbeaf0;border-radius:28px;border-bottom:8px solid #a4c3ce}
.bag-adventure .furniture{font-size:100px;line-height:1.2;transform:translateX(-25px)}
.bag-adventure .position-target{position:absolute;right:22%;top:14%;width:65px;height:65px;border:3px dashed #59899a;background:#fff7dfd9;font-size:38px!important;min-height:0!important;padding:3px!important}
.bag-adventure .position-world.under .position-target{top:auto;bottom:7px;right:28%}
.bag-adventure .position-world.door .position-target{top:auto;bottom:10px;right:10%}
.bag-adventure .move-piece{font-size:52px;min-width:90px;border:3px solid #d3ad59;background:#fff5d5;touch-action:none}
.bag-adventure .selected{outline:5px solid #e7b32f;outline-offset:3px}
.bag-adventure .filled{background:#fff0a9!important;animation:bag-pop .4s ease-out}
.bag-adventure .bag-choice>span{font-size:clamp(45px,7vw,80px)}
.bag-adventure .bag-choice>b{font-size:clamp(20px,2.4vw,30px)}
.bag-adventure .choices{gap:16px;justify-content:center}
.bag-adventure .sound-slot{background:#fff3c6;border:3px dashed #b49c55;color:#214d68;font-size:36px}
.bag-adventure .story-window img{object-fit:contain}
.bag-adventure .star-stop:not(.earned) svg path:first-child{fill:#bcd7e2!important;stroke:#84acbd!important}
.bag-adventure .star-stop:not(.earned) svg path:nth-child(2){fill:#e0edf1!important}
@keyframes bag-pop{50%{transform:scale(1.12)}}
@media(max-height:500px){.bag-adventure .position-world{min-height:100px}.bag-adventure .furniture{font-size:70px}.bag-adventure .position-target{width:48px;height:48px;font-size:28px!important}.bag-adventure .move-piece{font-size:34px;min-height:44px}}
@media(prefers-reduced-motion:reduce){.bag-adventure .filled{animation:none}}
body.bag-adventure.rrdd-story-world[data-story-phase=reading] .reading-picture img{opacity:1!important}
body.bag-adventure.rrdd-story-world .reading-picture{background:transparent!important;overflow:hidden}
body.bag-adventure.rrdd-story-world #playScreen .story-window{visibility:visible!important}
body.bag-adventure.rrdd-story-world #gameBoard{background:#fff8e8bd!important;border-radius:28px!important}
body.bag-adventure .table-shape{width:150px;height:95px;border-top:18px solid #ba8752;border-left:12px solid #a67546;border-right:12px solid #a67546;margin-top:25px;transform:none;box-sizing:border-box}
body.bag-adventure .reading-word-card p{font-size:clamp(18px,1.6vw,24px)!important;line-height:1.3}

body.bag-adventure.rrdd-story-world .story-world-backdrop::after{background-image:linear-gradient(90deg,#fff8e822,#f4f2deaa)!important}
body.bag-adventure .memory-frame::before{content:'★'}
.bag-adventure .dodu-piece{background-image:url('art/story-six.webp')!important;background-size:350% auto!important;background-position:43% 65%!important;width:96px;height:112px;border-radius:20px;border:4px solid #fff3c6}
body.bag-adventure.rrdd-story-world #certificateScreen{padding-top:32px!important}
body.bag-adventure.rrdd-story-world .rrdd-bag-collectible.adv-completion-panel{top:96px!important;height:calc(100dvh - 96px)!important;max-height:calc(100dvh - 96px)!important}
@media(max-width:600px){body.bag-adventure.rrdd-story-world .rrdd-bag-collectible.adv-completion-panel{top:84px!important;height:calc(100dvh - 84px)!important;max-height:calc(100dvh - 84px)!important}}
