/* Keep the active task inside the visual viewport. Allow overflow as a recovery
   at text zoom/very short heights; never hide a child's only next action. */
body.rrdd-game-shell{--rrdd-header-height:52px;--rrdd-footer-height:0px;padding-bottom:0!important}
body.rrdd-game-shell.rrdd-with-stages{--rrdd-header-height:88px}
body.rrdd-game-shell header.rrdd-game-header{height:var(--rrdd-header-height)!important;min-height:var(--rrdd-header-height)!important}
.rrdd-game-shell .rrdd-game-header .rrdd-game-brand{left:10px!important;top:4px!important;transform:none!important;width:84px!important;height:44px!important;object-fit:contain}
.rrdd-game-shell .rrdd-game-brand img{width:84px!important;height:44px!important}
.rrdd-game-shell .rrdd-game-header .rrdd-game-tools{height:52px!important;min-height:52px!important;padding:4px 8px 4px 100px!important;gap:2px!important;justify-content:flex-end!important;box-sizing:border-box}
.rrdd-game-shell .rrdd-game-header .rrdd-game-exit{position:static!important;min-width:44px!important;min-height:44px!important;width:44px!important;height:44px!important;padding:0!important;font-size:0!important;flex-shrink:0}
.rrdd-game-shell .rrdd-game-header .rrdd-game-exit::after{content:'↩';font:23px system-ui}
.rrdd-game-shell .rrdd-game-exit svg,.rrdd-game-shell .rrdd-game-exit span{display:none!important}
.rrdd-game-shell .rrdd-game-header .rrdd-challenge-timer{position:static!important;display:flex!important;min-width:0!important;width:auto!important;min-height:44px!important;padding:0 4px!important;margin:0!important;flex-shrink:0;align-items:center}
.rrdd-game-shell .rrdd-game-header .rrdd-challenge-timer b{font-size:20px!important;font-variant-numeric:tabular-nums}
.rrdd-game-shell .rrdd-game-header .rrdd-challenge-timer span,.rrdd-game-shell .rrdd-game-header .rrdd-challenge-timer small{display:none!important}
.rrdd-game-shell .rrdd-game-header .rrdd-game-stages{height:36px!important;min-height:36px!important;gap:0!important}
.rrdd-game-shell .rrdd-game-stages button,.rrdd-game-shell .rrdd-game-stages .journey-step{min-height:36px!important;padding:4px 12px!important}
.rrdd-game-shell .rrdd-game-footer{display:none!important}
.rrdd-game-shell .rrdd-settings-background{top:50px!important}
.rrdd-game-shell .rrdd-game-header.rrdd-settings-open .rrdd-secondary-tool{top:calc(58px + var(--rrdd-tool-row)*48px)!important}
.rrdd-game-shell .rrdd-header-space{display:block!important;height:var(--rrdd-header-height)!important;min-height:var(--rrdd-header-height)!important;flex:none}
.rrdd-game-shell [hidden]{display:none!important}
.rrdd-game-shell :is(button,a){touch-action:manipulation}
.rrdd-game-shell :is(.view,.rsg-phase,.experience-phase)>:is(p,h1,h2){margin-block:4px!important}
.rrdd-game-shell :is(.panel,.game-panel,.reading-card){box-sizing:border-box}
/* All reader families use the same viewport budget in portrait and landscape. */
.rrdd-game-shell .reader-shell{height:100dvh!important;min-height:0!important;display:grid!important;grid-template-rows:var(--rrdd-header-height) minmax(0,1fr)!important;gap:0!important;overflow:visible!important}
.rrdd-game-shell .experience-phase,.rrdd-game-shell .rsg-phase{height:100%!important;min-height:0!important;max-height:none!important;box-sizing:border-box;padding:8px 16px!important;align-self:stretch!important;overflow:auto}
.rrdd-game-shell .video-phase{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:12px}
.rrdd-game-shell .video-card,.rrdd-game-shell .film-card{height:100%!important;min-height:0!important;width:auto!important;max-width:100%;aspect-ratio:9/16;justify-self:center;overflow:hidden}
.rrdd-game-shell .phase-copy h1{font-size:clamp(23px,3vw,38px)!important;line-height:1.15!important;margin:4px 0!important}
.rrdd-game-shell .phase-copy p{font-size:14px;line-height:1.35;margin:4px 0!important}
.rrdd-game-shell .phase-kicker{font-size:10px}
.rrdd-game-shell .practice-phase{grid-template-rows:auto auto minmax(0,1fr) auto!important;gap:4px}
.rrdd-game-shell .practice-phase .reading-stage{min-height:0!important;height:100%!important;max-height:none!important}
.rrdd-game-shell .practice-intro p{margin:2px;line-height:1.3;font-size:12px}
.rrdd-game-shell .practice-phase .controls{position:static!important;min-height:48px!important;padding:2px 6px!important}
.rrdd-game-shell .listening-phase{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:8px;padding-bottom:8px!important}
.rrdd-game-shell .listening-card{padding:12px!important;min-height:0;max-height:100%;overflow:auto}
.rrdd-game-shell .quiz-panel{padding:12px!important;min-height:0;max-height:100%;overflow:auto}
.rrdd-game-shell .quiz-panel h2{font-size:clamp(20px,2.5vw,30px);margin:6px 0}
.rrdd-game-shell .sound-wave{height:36px}
/* Ready, Set, Go: keep the film, reading artwork and the action on screen. */
.ready-game #watch{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:minmax(0,1fr) 48px;gap:6px 16px;align-items:center}
.ready-game #watch .film-card{grid-column:1;grid-row:1/3}
.ready-game #watch .phase-copy{grid-column:2;grid-row:1}
.ready-game #toListen{grid-column:2;grid-row:2;justify-self:center;margin:0;min-height:44px}
.ready-game #listen{display:flex;flex-direction:column;gap:6px}
.ready-game #listen .story-panel{flex:1;min-height:0!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:10px!important;gap:12px;overflow:auto}
.ready-game #listen .story-panel>img{height:100%!important;max-height:100%!important;min-height:0;object-fit:contain}
.ready-game #listen:has(#storyQuiz:not([hidden])) .story-panel{display:none!important}
.ready-game #storyQuiz{flex:1;min-height:0;overflow:auto;padding:10px!important}
.ready-game #read{display:flex;flex-direction:column;gap:6px}
.ready-game .story-reading-panel{flex:1;height:auto!important;min-height:0;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:44px minmax(0,1fr) 44px auto 44px;gap:4px 12px!important;padding:10px!important;overflow:auto}
.ready-game .story-reading-panel .activity-top{grid-column:1/-1}
.ready-game .story-reading-panel .reading-scene{grid-column:1;grid-row:2/6;width:100%;height:100%;min-height:0;object-fit:contain}
.ready-game .story-reading-panel :is(.tracking-sentence,#storyReadHear,#storyReadFeedback,#storyReadNext){grid-column:2;margin:0!important}
.ready-game .tracking-sentence{font-size:clamp(20px,2.4vw,30px)!important;line-height:1.4!important}
.ready-game #route{height:100%;display:flex;flex-direction:column;gap:6px}
.ready-game .route-panel{flex:1;min-height:0;display:flex!important;flex-direction:column;gap:6px!important;padding:8px 12px!important}
.ready-game .stars-heading h2{font-size:22px;margin:0}
.ready-game .station-grid{flex:1;min-height:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:6px!important;margin:0!important}
.ready-game .station-card{display:grid;grid-template-rows:minmax(0,1fr) auto auto;min-height:0!important;padding:6px!important;gap:2px}
.ready-game .station-card img.station-icon{width:100%;height:100%;min-height:0;max-height:150px;object-fit:contain;margin:0}
.ready-game .station-card strong{font-size:14px}.ready-game .station-card small{font-size:11px;margin:0}
.ready-game #activity{max-height:100%;min-height:0;padding:10px!important;overflow:auto}
/* Room for Me */
body.rrdd-game-shell:has(#exitGame){height:100dvh;min-height:0;display:grid;grid-template-rows:var(--rrdd-header-height) minmax(0,1fr)!important}
.rrdd-game-shell:has(#exitGame) main{height:100%;min-height:0;width:100%;margin:0 auto!important;padding:8px 16px!important;box-sizing:border-box}
.rrdd-game-shell:has(#exitGame) .view{height:100%;min-height:0;display:flex;flex-direction:column;gap:4px;overflow:auto}
.rrdd-game-shell:has(#exitGame) .view>h1{font-size:clamp(23px,3vw,38px)!important;line-height:1.15}
.rrdd-game-shell:has(#exitGame) .view>p{font-size:12px;line-height:1.3}
.rrdd-game-shell:has(#exitGame) :is(.panel,.film){flex:1;min-height:0;margin-top:4px!important;padding:10px 14px!important;gap:8px;overflow:auto}
.rrdd-game-shell:has(#exitGame) #watch .film{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
.rrdd-game-shell:has(#exitGame) .film video{height:100%;max-height:100%;min-height:0;width:auto;max-width:100%;aspect-ratio:9/16;justify-self:center;object-fit:contain}
.rrdd-game-shell:has(#exitGame) .film h2{font-size:24px;margin:4px 0}.rrdd-game-shell:has(#exitGame) .film p{font-size:13px;line-height:1.35;margin:4px 0}.rrdd-game-shell:has(#exitGame) .film a{font-size:12px;margin:4px 0}
.rrdd-game-shell:has(#exitGame) #read .panel{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:44px minmax(0,1fr) 44px auto 44px;gap:4px 12px}
.rrdd-game-shell:has(#exitGame) #read .row{grid-column:1/-1}
.rrdd-game-shell:has(#exitGame) #readImage{grid-column:1;grid-row:2/6;width:100%;height:100%;min-height:0;margin:0;object-fit:contain}
.rrdd-game-shell:has(#exitGame) #read :is(#sentence,#hearRead,#readStatus,#readNext){grid-column:2;margin:0!important}
.rrdd-game-shell:has(#exitGame) #sentence{font-size:clamp(20px,2.5vw,32px)!important;line-height:1.4!important;align-self:center}
.rrdd-game-shell:has(#exitGame) #play .panel{display:flex;flex-direction:column;gap:4px}
.rrdd-game-shell:has(#exitGame) #stars{font-size:26px;margin:0!important}
.rrdd-game-shell:has(#exitGame) #stations{flex:1;min-height:0;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));margin:0;gap:6px}
.rrdd-game-shell:has(#exitGame) .station{min-height:0!important;display:grid;grid-template-rows:minmax(0,1fr) auto auto;padding:6px;gap:2px}
.rrdd-game-shell:has(#exitGame) .station img{height:100%;width:100%;max-height:150px;min-height:0;object-fit:contain;margin:0!important}
.rrdd-game-shell:has(#exitGame) .station small{font-size:11px;margin:0}.rrdd-game-shell:has(#exitGame) .station strong{font-size:14px}
.rrdd-game-shell:has(#exitGame) #trophy{margin:2px auto!important;min-height:44px!important;padding:6px 10px!important;font-size:14px!important}
.rrdd-game-shell:has(#exitGame) #activity .panel{display:flex;flex-direction:column;align-items:center;gap:4px}
.rrdd-game-shell:has(#exitGame) #clue{flex:1;min-height:60px;width:100%;height:100%;max-height:250px;object-fit:contain;margin:0}
.rrdd-game-shell:has(#exitGame) :is(#feedback,.choices,#sounds){margin:2px auto;min-height:0}
.rrdd-game-shell:has(#exitGame) .choices button{min-width:60px;padding:6px 12px;font-size:18px}
/* Thread adventure */
.rrdd-game-shell:has(#playScreen) .app-shell{height:100dvh!important;min-height:0!important;display:grid!important;grid-template-rows:var(--rrdd-header-height) minmax(0,1fr)!important;padding:0!important}
.rrdd-game-shell:has(#playScreen) main{height:100%;min-height:0;padding:8px 14px!important;overflow:auto}
.rrdd-game-shell :is(.intro-screen,.watch-screen,.play-screen,.ending-screen){height:100%;min-height:0;max-height:none!important;box-sizing:border-box}
.rrdd-game-shell .intro-art img{width:100%;height:100%;min-height:0;object-fit:contain}
.rrdd-game-shell .intro-copy h1{font-size:clamp(28px,4vw,54px);margin:4px 0}
.rrdd-game-shell .intro-copy p{font-size:14px;line-height:1.35;margin:6px 0}
.rrdd-game-shell .play-screen{display:flex;flex-direction:column;gap:4px}
.rrdd-game-shell .game-grid{flex:1;min-height:0;gap:10px}
.rrdd-game-shell .scene-frame{height:100%!important;min-height:0!important;max-height:none!important}
.rrdd-game-shell .scene-frame>img{object-fit:contain}
.rrdd-game-shell .mission-card{min-height:0;padding:12px;gap:6px;overflow:auto}
/* Phone portrait: artwork gets remaining space, controls retain real tap sizes. */
@media(max-width:700px) and (orientation:portrait){
 .rrdd-game-shell .video-phase{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);gap:6px;text-align:center}
 .rrdd-game-shell .phase-copy h1{font-size:23px!important}.rrdd-game-shell .phase-copy p{font-size:12px}
 .rrdd-game-shell .video-card{max-height:100%}
 .rrdd-game-shell .listening-phase{display:flex;flex-direction:column;justify-content:center}
 .rrdd-game-shell .listening-copy{flex:none}.rrdd-game-shell .listening-card{flex-shrink:1;width:100%!important}
 .rrdd-game-shell .listening-phase:has(.quiz-panel:not([hidden])) .listening-copy,.rrdd-game-shell .listening-phase:has(.quiz-panel:not([hidden])) .listening-card{display:none}
 .rrdd-game-shell .quiz-panel{width:100%;height:100%}
 .rrdd-game-shell .practice-phase .reading-stage{grid-template-columns:1fr;grid-template-rows:minmax(100px,1fr) auto;gap:6px}
 .rrdd-game-shell .picture-panel{min-height:0;height:100%;margin:0}.rrdd-game-shell .picture-panel img{height:100%;width:100%;object-fit:contain}
 .rrdd-game-shell .caption-panel{padding:8px 12px!important;gap:4px!important}
 .rrdd-game-shell .read-caption{font-size:22px!important;line-height:1.4!important;margin:4px 0!important}
 .rrdd-game-shell .caption-heading h1{font-size:18px;margin:0}.rrdd-game-shell .word-definition{font-size:12px;line-height:1.3;margin:4px 0}
 .rrdd-game-shell .practice-intro{display:none}.rrdd-game-shell .adventure-stars{padding:4px 8px!important}
 .rrdd-game-shell .star-progress{padding-bottom:8px!important}.rrdd-game-shell .star-progress button{min-height:32px!important}
 .ready-game #watch{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr) 44px}
 .ready-game #watch .phase-copy{grid-column:1;grid-row:1}.ready-game #watch .film-card{grid-column:1;grid-row:2}.ready-game #toListen{grid-column:1;grid-row:3}
 .ready-game #listen .story-panel{grid-template-columns:1fr;grid-template-rows:minmax(100px,1fr) auto;gap:6px}
 .ready-game .listen-story-intro{display:none}.ready-game .listen-story-controls{padding:4px!important;gap:4px!important}
 .ready-game .story-reading-panel{grid-template-columns:1fr;grid-template-rows:44px minmax(90px,1fr) auto 44px auto 44px}
 .ready-game .story-reading-panel .reading-scene{grid-column:1;grid-row:2}
 .ready-game .story-reading-panel :is(.tracking-sentence,#storyReadHear,#storyReadFeedback,#storyReadNext){grid-column:1}
 .ready-game #play>.phase-copy{display:none}.ready-game .station-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr))}
 .ready-game .station-card small{display:none}
 .rrdd-game-shell:has(#exitGame) #watch .intro,.rrdd-game-shell:has(#exitGame) #watch>.eyebrow{display:none}
 .rrdd-game-shell:has(#exitGame) #watch .film{grid-template-columns:1fr;grid-template-rows:minmax(120px,1fr) auto;text-align:center;padding:6px!important}
 .rrdd-game-shell:has(#exitGame) .film :is(h2,.pill){display:none}
 .rrdd-game-shell:has(#exitGame) #read .panel{grid-template-columns:1fr;grid-template-rows:44px minmax(90px,1fr) auto 44px auto 44px}
 .rrdd-game-shell:has(#exitGame) #readImage{grid-column:1;grid-row:2}
 .rrdd-game-shell:has(#exitGame) #read :is(#sentence,#hearRead,#readStatus,#readNext){grid-column:1}
 .rrdd-game-shell:has(#exitGame) #read>p:not(.eyebrow){display:none}
 .rrdd-game-shell:has(#exitGame) #stations{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr))}
 .rrdd-game-shell:has(#exitGame) .station small{display:none}
 .rrdd-game-shell .intro-screen{display:grid;grid-template-columns:1fr;grid-template-rows:minmax(120px,1fr) auto;gap:8px;padding:0}
 .rrdd-game-shell .intro-art{min-height:0}.rrdd-game-shell .intro-copy{padding:8px!important}.rrdd-game-shell .intro-copy h1{font-size:30px}.rrdd-game-shell .intro-copy .intro-pills,.rrdd-game-shell .intro-copy .quiet-note{display:none}
 .rrdd-game-shell .watch-screen{display:flex;flex-direction:column;gap:4px}
 .rrdd-game-shell .watch-screen .watch-layout{flex:1;min-height:0;grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto}
 .rrdd-game-shell .watch-screen .watch-guide{padding:6px}.rrdd-game-shell .watch-guide :is(img,h3,p){display:none}
 .rrdd-game-shell .game-grid{display:grid;grid-template-columns:1fr;grid-template-rows:minmax(130px,1fr) auto}
 .rrdd-game-shell .mission-card h3{font-size:20px;margin:2px}.rrdd-game-shell .mission-card p{font-size:12px;margin:2px}.rrdd-game-shell .mission-card .mission-step{display:none}
}
@media(max-height:480px){.rrdd-game-shell .experience-phase,.rrdd-game-shell .rsg-phase,.rrdd-game-shell .view{overflow:auto!important}}
.rrdd-audio-recovery{position:fixed;z-index:300;top:calc(var(--rrdd-header-height,52px) + 4px);left:8px;right:8px;max-width:600px;margin:auto;background:#fff8df;color:#173c61;border:2px solid #dfaa37;border-radius:16px;padding:8px;box-shadow:0 8px 28px #173c6140;display:flex;align-items:center;gap:8px;font:14px/1.3 system-ui}
.rrdd-audio-recovery button{min-height:44px;min-width:80px;padding:8px;border-radius:12px;background:#ffdb68;color:#173c61;border:0;font:700 14px system-ui}
/* Chimelong uses Halloween's one-row score + five stars on each side. */
body.chimelong-game:not(.halloween-game){background:#dff2f4!important;color:#173c61;--ch-stage-height:0px}
.chimelong-game:not(.halloween-game) main{height:var(--rrdd-content-height)!important;min-height:0!important;box-sizing:border-box;padding:4px 12px 8px!important;display:grid!important;grid-template-rows:64px minmax(0,1fr) auto!important;gap:6px!important}
.chimelong-game:not(.halloween-game) main>.view:not([hidden]){height:100%!important;min-height:0!important;overflow:auto;grid-row:2}
.chimelong-game:not(.halloween-game) .journey-score{position:relative!important;isolation:isolate;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr)) 100px repeat(5,minmax(0,1fr))!important;grid-template-rows:64px!important;width:100%!important;max-width:1050px!important;height:64px!important;min-height:0!important;margin:0 auto!important;padding:0 8px!important;color:#173c61}
.chimelong-game:not(.halloween-game) .journey-score::before{content:'';display:block!important;position:absolute;left:0;right:0;top:17px;height:34px;z-index:-1;border:2px solid #7fbbcf;border-radius:30px;background:#b9e4ec;box-shadow:inset 0 0 6px #fff9}
.chimelong-game:not(.halloween-game) .journey-score-heading{grid-column:6!important;grid-row:1!important;background:#dff2f4;border-radius:24px;padding:0 6px;align-self:center}
.chimelong-game:not(.halloween-game) .journey-score-heading strong{font-size:52px!important;line-height:1.1;text-shadow:0 3px #b47b20;color:#ffcf4f}
.chimelong-game:not(.halloween-game) .journey-score-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.chimelong-game:not(.halloween-game) .journey-score-latest{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.chimelong-game:not(.halloween-game) #starRoute{display:contents!important}
.chimelong-game:not(.halloween-game) #starRoute button{grid-row:1;align-self:center;width:100%;height:44px;min-height:44px;padding:0;opacity:1}
.chimelong-game:not(.halloween-game) .star-stop span{font-size:clamp(19px,3vw,34px);color:#8aaac0;text-shadow:0 1px 2px #42638266}
.chimelong-game:not(.halloween-game) .star-stop.earned span{color:#ffcc3e;text-shadow:0 2px #a47524,0 0 8px #fff4a6}
.chimelong-game:not(.halloween-game) .star-stop.current span{color:#fffdf4;text-shadow:0 0 4px #8c74bc,0 2px 2px #6d679a}
.chimelong-game:not(.halloween-game) #starRoute button:nth-child(1){grid-column:1}.chimelong-game:not(.halloween-game) #starRoute button:nth-child(2){grid-column:2}.chimelong-game:not(.halloween-game) #starRoute button:nth-child(3){grid-column:3}.chimelong-game:not(.halloween-game) #starRoute button:nth-child(4){grid-column:4}.chimelong-game:not(.halloween-game) #starRoute button:nth-child(5){grid-column:5}.chimelong-game:not(.halloween-game) #starRoute button:nth-child(6){grid-column:7}.chimelong-game:not(.halloween-game) #starRoute button:nth-child(7){grid-column:8}.chimelong-game:not(.halloween-game) #starRoute button:nth-child(8){grid-column:9}.chimelong-game:not(.halloween-game) #starRoute button:nth-child(9){grid-column:10}.chimelong-game:not(.halloween-game) #starRoute button:nth-child(10){grid-column:11}
.chimelong-game:not(.halloween-game) .journey-score #trophy{position:absolute;top:0!important;right:0!important;bottom:auto!important;grid-row:1!important;width:100px;min-height:44px!important;font-size:12px;background:#fff5c7!important;color:#173c61}
.chimelong-game:not(.halloween-game) .watch-card{height:100%!important;min-height:0!important;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:minmax(0,1fr);gap:12px;padding:0 16px;background:none!important;box-shadow:none!important;border-radius:0;container-type:size;overflow:visible}
.chimelong-game:not(.halloween-game) .film{height:100%!important;min-height:0;max-height:100%!important;width:auto!important;max-width:100%;aspect-ratio:9/16;justify-self:center}
.chimelong-game:not(.halloween-game) .watch-copy{padding:0 4%;color:#173c61!important}
.chimelong-game:not(.halloween-game) .watch-copy :is(.watch-reward,small){color:#3c687e!important}
.chimelong-game:not(.halloween-game) #audioStatus{grid-row:3;font-size:12px;line-height:1.2;margin:0;color:#173c61}
.chimelong-game:not(.halloween-game) .scene-layout{height:100%;min-height:0;display:grid;grid-template-columns:1fr 1fr;gap:12px}
.chimelong-game:not(.halloween-game) .scene-layout figure{height:100%;min-height:0;margin:0;padding:0;overflow:hidden}
/* Reading art fills its frame at every aspect ratio, as in Halloween. */
.chimelong-game:not(.halloween-game) .scene-layout figure img{display:block;height:100%;max-height:100%;width:100%;object-fit:cover;object-position:center}
@media(max-width:700px) and (orientation:portrait){
 /* Reserve more picture height so cover does not crop away the animal clue. */
 .chimelong-game:not(.halloween-game) #read:not(.game-open) #sceneImage{object-position:center 25%}
 .chimelong-game:not(.halloween-game) #read:not(.game-open) .reading-card{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:4px 8px;align-content:start}
 .chimelong-game:not(.halloween-game) #read:not(.game-open) #sentence{grid-column:1;grid-row:1;align-self:center;font-size:21px}
 .chimelong-game:not(.halloween-game) #read:not(.game-open) #listen{grid-column:2;grid-row:1;width:44px;height:44px;min-height:44px;padding:0;font-size:0;align-self:center}
 .chimelong-game:not(.halloween-game) #read:not(.game-open) #listen::after{content:'🔊';font-size:22px}
 .chimelong-game:not(.halloween-game) #read:not(.game-open) .word-card{grid-column:1/-1;grid-row:2}
 .chimelong-game:not(.halloween-game) #read:not(.game-open) #openMini{grid-column:1;grid-row:3;min-height:44px;padding:6px 10px;font-size:14px}
 .chimelong-game:not(.halloween-game) #read:not(.game-open) .card-nav{display:contents}
 .chimelong-game:not(.halloween-game) #read:not(.game-open) #backRead{grid-column:2;grid-row:3;width:44px;min-height:44px;padding:0;font-size:0}
 .chimelong-game:not(.halloween-game) #read:not(.game-open) #backRead::after{content:'←';font-size:22px}
 .chimelong-game:not(.halloween-game) #read:not(.game-open) #readFeedback{grid-column:1/-1;grid-row:4}
 .chimelong-game:not(.halloween-game) #read:not(.game-open) #nextRead{grid-column:1/-1;grid-row:5}
}
.chimelong-game:not(.halloween-game) .reading-card{height:100%;min-height:0!important;overflow:auto;gap:6px;padding:10px 14px!important}
.chimelong-game:not(.halloween-game) #read.game-open .scene-layout{grid-template-columns:1fr}
.chimelong-game:not(.halloween-game) #read.game-open .reading-card{height:100%!important}
.chimelong-game:not(.halloween-game) #read.game-open #mini{flex:1;min-height:0;container-type:size}
.chimelong-game:not(.halloween-game) .recall-card{height:100%;min-height:0!important;overflow:auto}
@media(max-width:700px) and (orientation:portrait){
 .chimelong-game:not(.halloween-game) main{grid-template-rows:48px minmax(0,1fr) auto!important;padding:2px 8px 8px!important;gap:4px!important}
 .chimelong-game:not(.halloween-game) .journey-score{grid-template-columns:repeat(5,minmax(0,1fr)) 72px repeat(5,minmax(0,1fr))!important;grid-template-rows:48px!important;height:48px!important}
 .chimelong-game:not(.halloween-game) .journey-score::before{top:10px;height:28px}
 .chimelong-game:not(.halloween-game) .journey-score-heading strong{font-size:38px!important}
 .chimelong-game:not(.halloween-game) .watch-card{grid-template-columns:1fr;grid-template-rows:minmax(120px,1fr) auto;gap:6px;padding:0!important;container-type:normal}
 .chimelong-game:not(.halloween-game) .watch-copy{text-align:center;padding:0!important}
 .chimelong-game:not(.halloween-game) .watch-copy h2{font-size:25px!important;line-height:1.05;margin:2px 0!important}
 .chimelong-game:not(.halloween-game) .watch-reward{margin:4px 0!important;font-size:12px}
 .chimelong-game:not(.halloween-game) .watch-copy small{display:none}
 .chimelong-game:not(.halloween-game) .watch-copy button{min-height:44px;margin:2px auto;padding:8px 16px}
 .chimelong-game:not(.halloween-game) .scene-layout{grid-template-columns:1fr;grid-template-rows:minmax(100px,1fr) auto;gap:6px}
 .chimelong-game:not(.halloween-game) .reading-card{height:auto;gap:4px}
 .chimelong-game:not(.halloween-game) .reading-card h2{font-size:23px;line-height:1.25;margin:0}
 .chimelong-game:not(.halloween-game) .word-card{padding:6px}.chimelong-game:not(.halloween-game) #meaning{font-size:12px;line-height:1.3;margin:2px}
 .chimelong-game:not(.halloween-game) #word{font-size:20px;padding:2px;min-height:44px}
 .chimelong-game:not(.halloween-game) #read.game-open .scene-layout{grid-template-rows:minmax(0,1fr)}
 .chimelong-game:not(.halloween-game) .reading-card .card-nav{margin:0;min-height:44px}
 .chimelong-game:not(.halloween-game) #mini h3{font-size:23px!important;margin:2px 0!important}
 .chimelong-game:not(.halloween-game) .snow-stations{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));height:100%!important;flex:1!important;min-height:0!important;gap:8px!important}
 .chimelong-game:not(.halloween-game) .sound-station{min-height:0!important;height:100%!important;aspect-ratio:auto}
 .chimelong-game:not(.halloween-game) .sound-station .station-picture{font-size:38px}.chimelong-game:not(.halloween-game) .sound-station .snow-word{font-size:15px;padding:2px 6px}
 .chimelong-game:not(.halloween-game) .sound-station .snow-drop{min-height:44px;width:50px;font-size:28px}
 .chimelong-game:not(.halloween-game) .snow-card-tray{gap:8px;min-height:58px!important}.chimelong-game:not(.halloween-game) .snow-letter{width:58px;min-height:48px;font-size:30px}
 .chimelong-game:not(.halloween-game) .snow-tap-help{font-size:10px;line-height:1.2;padding:2px}
 .chimelong-game:not(.halloween-game) #read.penguin-hunt #mini{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto!important}
 .chimelong-game:not(.halloween-game) #read.penguin-hunt #penguinBoard{grid-column:1;grid-row:2}
 .chimelong-game:not(.halloween-game) #read.penguin-hunt #miniChoices{grid-column:1;grid-row:3}
 .chimelong-game:not(.halloween-game) .choices button{min-height:48px;padding:6px 12px;font-size:18px}
 .chimelong-game:not(.halloween-game) .animal-photo-card{width:100%;max-width:none;padding:4px 8px}
 .chimelong-game:not(.halloween-game) .spelling-tray{gap:12px}.chimelong-game:not(.halloween-game) .spelling-letter{width:52px;min-height:48px;font-size:28px}
 .chimelong-game:not(.halloween-game) .orca-paint-tray{gap:2px;padding:4px}.chimelong-game:not(.halloween-game) .orca-paint-pot{min-width:0;min-height:52px;font-size:10px}.chimelong-game:not(.halloween-game) .paint-blob{width:28px;height:28px}
 .chimelong-game:not(.halloween-game) .circus-status{font-size:14px}.chimelong-game:not(.halloween-game) .circus-move-tray{gap:6px}.chimelong-game:not(.halloween-game) .circus-move{font-size:13px;min-height:56px}.chimelong-game:not(.halloween-game) .circus-step{min-width:48px;font-size:12px}
 .chimelong-game:not(.halloween-game) .firework-caption{font-size:16px;line-height:1.2;min-height:20px}.chimelong-game:not(.halloween-game) .firework-choice{font-size:13px;padding:2px}.chimelong-game:not(.halloween-game) .firework-choice svg{width:56px;height:38px}
 .chimelong-game:not(.halloween-game) #recall .album-heading h2{font-size:22px!important}.chimelong-game:not(.halloween-game) #recall #recallQuestion{font-size:14px!important}
 .chimelong-game:not(.halloween-game) .album-clue{gap:6px;padding:2px 6px;min-height:44px}.chimelong-game:not(.halloween-game) .album-loose-photo img{height:90px}.chimelong-game:not(.halloween-game) .album-photo-tray{gap:8px}
}
/* Keep the full illustration in Halloween reading scenes. */
body.halloween-game .story-picture img{object-fit:contain!important}
/* Academy's three journeys form a choice screen, not a long article. */
.rrdd-game-shell .app-shell:has(>.site-header){height:100dvh!important;min-height:0!important;display:grid!important;grid-template-rows:var(--rrdd-header-height) minmax(0,1fr)!important;padding:0!important;gap:0!important}
.rrdd-game-shell .app-shell:has(>.site-header)>main{min-height:0;height:100%;max-height:100%;overflow:auto;padding:8px 16px!important;box-sizing:border-box}
.rrdd-game-shell .campaign-world{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(100px,1fr) auto auto;gap:8px;padding:0!important}
.rrdd-game-shell .campaign-heading{margin:0!important;align-items:center;gap:8px}
.rrdd-game-shell .campaign-heading h1{font-size:clamp(22px,3vw,38px);line-height:1.2;margin:2px 0}
.rrdd-game-shell .campaign-heading p{margin:2px 0;font-size:13px;line-height:1.3}
.rrdd-game-shell .world-intro{min-height:0;height:100%;display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:10px;margin:0}
.rrdd-game-shell .world-picture{min-height:0;height:100%;aspect-ratio:auto!important}
.rrdd-game-shell .world-picture>img{height:100%;width:100%;object-fit:contain}
.rrdd-game-shell .world-invitation{padding:8px 12px;gap:4px;min-height:0;overflow:auto}
.rrdd-game-shell .world-invitation>img{display:none}.rrdd-game-shell .world-invitation h2{font-size:22px;margin:2px 0}.rrdd-game-shell .world-invitation p{font-size:13px;line-height:1.3;margin:2px 0}
.rrdd-game-shell .adventure-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0}
.rrdd-game-shell .adventure-card{min-height:90px;height:auto;padding:10px;gap:8px;overflow:hidden}
.rrdd-game-shell .adventure-card h2{font-size:18px;line-height:1.2;margin:3px 0}.rrdd-game-shell .adventure-card p{font-size:12px;line-height:1.3;margin:2px 0}
.rrdd-game-shell .campaign-footnote{margin:0!important;gap:6px;font-size:11px}
@media(max-width:700px) and (orientation:portrait){
 .rrdd-game-shell .campaign-world{grid-template-rows:auto minmax(100px,1fr) auto auto;gap:6px}
 .rrdd-game-shell .campaign-heading h1{font-size:22px}.rrdd-game-shell .campaign-heading p,.rrdd-game-shell .campaign-heading .eyebrow{display:none}
 .rrdd-game-shell .campaign-heading .secondary{min-height:44px;padding:6px;font-size:12px}
 .rrdd-game-shell .world-intro{display:flex;flex-direction:column;gap:4px}
 .rrdd-game-shell .world-picture{flex:1;min-height:80px}.rrdd-game-shell .world-deliveries{display:none}
 .rrdd-game-shell .world-invitation{flex:none;padding:4px 8px;display:block;text-align:center}
 .rrdd-game-shell .world-invitation :is(.eyebrow,h2,p){display:none}
 .rrdd-game-shell .story-actions{display:flex;gap:6px;margin:0}.rrdd-game-shell .story-actions button{flex:1;min-height:44px;margin:0;font-size:13px;padding:6px}
 .rrdd-game-shell .adventure-cards{grid-template-columns:1fr;gap:5px}
 .rrdd-game-shell .adventure-card{min-height:66px;padding:6px 10px;display:grid;grid-template-columns:28px minmax(0,1fr) 44px;gap:6px;text-align:left}
 .rrdd-game-shell .adventure-card h2{font-size:17px}.rrdd-game-shell .adventure-card p{display:none}.rrdd-game-shell .adventure-number{font-size:20px}.rrdd-game-shell .adventure-card-symbol{font-size:30px}
 .rrdd-game-shell .campaign-footnote>span{display:none}.rrdd-game-shell .campaign-footnote button{min-height:44px;padding:6px 12px;margin:auto}
}
/* The standalone banana reader needs a third row for its playback controls. */
.rrdd-game-shell .reader-shell:has(>footer.controls){grid-template-rows:var(--rrdd-header-height) minmax(0,1fr) auto!important}
.rrdd-game-shell .reader-shell>footer.controls{position:static!important;min-height:56px;box-sizing:border-box;padding:4px 12px!important;gap:6px!important}
.rrdd-game-shell .reader-shell>.reading-stage{min-height:0;height:100%;overflow:auto}
.rrdd-game-shell .reader-shell>.reading-stage .picture-panel{min-height:0;height:100%;margin:0}
.rrdd-game-shell .reader-shell>.reading-stage .picture-panel img{height:100%;min-height:0;object-fit:contain}
@media(max-width:700px) and (orientation:portrait){
 .rrdd-game-shell .reader-shell>.reading-stage{grid-template-rows:minmax(120px,1fr) auto;grid-template-columns:1fr;gap:6px;padding:6px 12px}
 .rrdd-game-shell .reader-shell>footer.controls{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;min-height:60px}
 .rrdd-game-shell .reader-shell>footer.controls .nav-button{min-width:44px!important;padding:6px!important}
 .rrdd-game-shell .reader-shell>footer.controls .nav-button span{display:none}
 .rrdd-game-shell .reader-shell>footer.controls .play-cluster{gap:4px}
 .rrdd-game-shell .reader-shell>footer.controls .play-button{min-width:0;padding:6px 10px;font-size:13px}
 .rrdd-game-shell .reader-shell>footer.controls .speed-control{display:none}
 .rrdd-game-shell .reader-shell>.reading-stage .tap-hint{font-size:11px;margin:2px}
}
/* Academy route, story and task views share the same remaining height. */
.rrdd-game-shell .campaign-route,.rrdd-game-shell .campaign-opening,.rrdd-game-shell .campaign-briefing{height:100%;min-height:0;display:flex;flex-direction:column;gap:6px}
.rrdd-game-shell .campaign-nav{display:flex;align-items:center;justify-content:space-between;gap:6px;margin:0;min-height:44px;flex:none}
.rrdd-game-shell .campaign-nav button{min-height:44px;padding:6px 10px}.rrdd-game-shell .campaign-nav span{font-size:11px}
.rrdd-game-shell .route-layout,.rrdd-game-shell .story-book{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
.rrdd-game-shell .journey-scene{min-height:0;height:100%;aspect-ratio:auto!important}
.rrdd-game-shell .journey-scene>img{width:100%;height:100%;object-fit:contain}
.rrdd-game-shell .route-plan,.rrdd-game-shell .story-dialogue{min-height:0;padding:10px!important;overflow:auto}
.rrdd-game-shell .route-plan h2{font-size:18px;margin:4px 0}.rrdd-game-shell .route-plan ol{margin:4px 0;padding:0;gap:4px}.rrdd-game-shell .route-plan li button{min-height:48px;padding:6px 10px}
.rrdd-game-shell .route-note{font-size:11px;line-height:1.2;margin:0}
.rrdd-game-shell .story-dialogue h1{font-size:24px;line-height:1.2;margin:4px 0}.rrdd-game-shell .story-dialogue p{font-size:15px;line-height:1.4;margin:4px 0}
@media(max-width:700px) and (orientation:portrait){
 .rrdd-game-shell .route-layout,.rrdd-game-shell .story-book{grid-template-columns:1fr;grid-template-rows:minmax(100px,1fr) auto;gap:6px}
 .rrdd-game-shell .campaign-route .campaign-heading>div>.eyebrow{display:none}
 .rrdd-game-shell .route-plan{padding:6px!important}.rrdd-game-shell .route-plan>h2{display:none}
 .rrdd-game-shell .route-plan ol{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin:0 0 4px}
 .rrdd-game-shell .route-plan li button{width:100%;min-height:54px;padding:6px;font-size:13px}.rrdd-game-shell .route-plan li button small{display:none}
 .rrdd-game-shell .route-plan>button{min-height:44px;padding:6px;font-size:13px}
 .rrdd-game-shell .story-dialogue{padding:8px!important}.rrdd-game-shell .story-dialogue .eyebrow{font-size:10px}
 .rrdd-game-shell .story-dialogue .story-actions{margin-top:6px}
}
/* Explicit rows prevent legacy per-game grid placement from overlapping copy
   with the picture or spending a row on an empty live status. */
.rrdd-game-shell .reader-shell>.rsg-phase,.rrdd-game-shell .reader-shell>.experience-phase{grid-row:2;grid-column:1;margin:0!important}
.rrdd-game-shell .reader-shell>:is(audio,#audioStatus:empty){display:none!important}
.rrdd-game-shell .rsg-phase>.phase-copy{margin:0!important;padding:0!important}
.rrdd-game-shell .rsg-phase>.game-panel{margin:0!important}
.rrdd-game-shell :is(.feedback,#storyReadFeedback,#readStatus):empty{display:none!important;min-height:0!important}
.ready-game #storyReadSentence{grid-row:2;padding:4px!important;min-height:0;align-self:center}
.ready-game #storyReadHear{grid-row:3}.ready-game #storyReadFeedback{grid-row:4;min-height:0!important;font-size:12px;line-height:1.3}.ready-game #storyReadNext{grid-row:5}
.rrdd-game-shell:has(#exitGame) #sentence{grid-row:2}.rrdd-game-shell:has(#exitGame) #hearRead{grid-row:3}.rrdd-game-shell:has(#exitGame) #readStatus{grid-row:4}.rrdd-game-shell:has(#exitGame) #readNext{grid-row:5}
@media(max-width:700px) and (orientation:portrait){
 .ready-game #read>.phase-copy{display:none}
 .ready-game #storyReadSentence{grid-row:3;font-size:22px!important;line-height:1.4!important}
 .ready-game #storyReadHear{grid-row:4}.ready-game #storyReadFeedback{grid-row:5}.ready-game #storyReadNext{grid-row:6}
 .rrdd-game-shell:has(#exitGame) #sentence{grid-row:3}.rrdd-game-shell:has(#exitGame) #hearRead{grid-row:4}.rrdd-game-shell:has(#exitGame) #readStatus{grid-row:5}.rrdd-game-shell:has(#exitGame) #readNext{grid-row:6}
}
.ready-game .route-panel{display:grid!important;grid-template-rows:36px 40px minmax(0,1fr) 44px 44px!important;gap:5px!important}
.ready-game .mission-stars{padding:0!important;min-height:0!important;grid-template-columns:repeat(6,minmax(0,1fr));align-items:center}
.ready-game .mission-star{display:flex;align-items:center;justify-content:center;gap:2px}.ready-game .mission-star b{font-size:24px!important;line-height:1}.ready-game .mission-star small{font-size:10px!important}
.ready-game .station-grid{height:100%;width:100%}.ready-game .station-card{height:100%!important;align-content:stretch!important}
.ready-game #trophyRoute{margin:0!important;min-height:44px!important;padding:6px 10px!important;font-size:14px!important;width:100%}
.ready-game .route-footer{min-height:0!important;display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:space-between;gap:4px}
.ready-game .route-footer button{min-height:44px!important;max-width:50%;padding:6px!important;font-size:12px!important}
@media(max-width:700px) and (orientation:portrait){.ready-game #route>.phase-copy{display:none}}
/* Audio tasks reserve the answer/confirm row before assigning picture space. */
.ready-game #activity{height:100%;display:flex;flex-direction:column;gap:4px;align-items:stretch}
.ready-game #activity .activity-top{flex:none;min-height:44px;margin:0}
.ready-game #activityTitle{flex:none;font-size:clamp(22px,2.5vw,32px);line-height:1.2;margin:2px 0!important}
.ready-game #activityHelper{flex:none;font-size:13px;line-height:1.3;margin:2px 0!important}
.ready-game #activity .play-tools{flex:none;min-height:44px;margin:0!important}
.ready-game #hearPrompt{min-height:44px!important;padding:6px 16px!important;font-size:18px!important}
.ready-game #wordStage{flex:1;min-height:60px;min-width:0;display:flex;align-items:center;justify-content:center;margin:0!important}
.ready-game #wordStage .vocab-card{height:100%;min-height:0;max-height:180px;display:grid;place-items:center;font-size:clamp(60px,14vh,120px);line-height:1;padding:0!important;margin:0}
.ready-game #wordStage img{height:100%;max-height:180px;min-height:0;width:auto;object-fit:contain}
.ready-game #choiceStep{flex:none;font-size:13px;margin:0!important}
.ready-game #choices{flex:none;margin:0!important;gap:8px}
.ready-game #choices button{min-height:60px!important;min-width:60px;padding:4px 12px!important;font-size:28px;line-height:1.15}
.ready-game #choices button :is(small,.sound-label){font-size:12px}
.ready-game #confirmAnswer,.ready-game #nextRound{flex:none;min-height:44px!important;margin:0 auto!important;padding:6px 18px!important;font-size:16px}
.ready-game #feedback{flex:none;min-height:0!important;margin:0!important;font-size:13px;line-height:1.3}
@media(max-width:700px) and (orientation:portrait){.ready-game #stationLabel{display:none}.ready-game #activity .sound-answer{font-size:30px!important}.ready-game #activity .answer-phoneme{font-size:30px!important}}
.rrdd-game-shell:has(#exitGame) #play .panel>.row{min-height:36px;flex:none}
.rrdd-game-shell:has(#exitGame) #play .panel>.row h2{font-size:22px;line-height:1.2;margin:0}
.rrdd-game-shell:has(#exitGame) #restart{min-height:44px;padding:6px 12px;font-size:13px}
.rrdd-game-shell:has(#exitGame) #restartStatus:empty{display:none}
.rrdd-game-shell:has(#exitGame) #activity .panel{align-items:stretch;gap:4px}
.rrdd-game-shell:has(#exitGame) #activity .panel>:not(#clue){flex:none}
.rrdd-game-shell:has(#exitGame) #activity .row{min-height:44px}
.rrdd-game-shell:has(#exitGame) #activity :is(.row button,#hearQuestion,#confirmAnswer,#next){min-height:44px;padding:6px 12px;margin:0!important}
.rrdd-game-shell:has(#exitGame) #question{font-size:clamp(22px,2.5vw,32px)!important;line-height:1.2;margin:0!important}
.rrdd-game-shell:has(#exitGame) #activityName{margin:0;font-size:10px}
.rrdd-game-shell:has(#exitGame) #activity .missing-word{margin:0!important;min-height:44px;padding:4px!important;font-size:24px!important}
.rrdd-game-shell:has(#exitGame) #activity #choices{min-height:44px;gap:6px;align-items:stretch}
.rrdd-game-shell:has(#exitGame) #activity #choices button{min-height:44px;min-width:44px;font-size:18px;padding:6px 10px}
.rrdd-game-shell:has(#exitGame) #sounds:empty,.rrdd-game-shell:has(#exitGame) #next:disabled{display:none}
.rrdd-game-shell:has(#exitGame) #activity #sounds{margin:0;min-height:44px;gap:8px}
.rrdd-game-shell:has(#exitGame) #activity #feedback{font-size:13px;line-height:1.3}
@media(max-width:700px) and (orientation:portrait){
 .rrdd-game-shell:has(#exitGame) #play>p,.rrdd-game-shell:has(#exitGame) #play>h1{display:none}
 .rrdd-game-shell:has(#exitGame) #activityName{display:none}
 .rrdd-game-shell:has(#exitGame) #activity #choices .picture-word{font-size:34px}
}
.rrdd-game-shell .practice-phase{grid-template-rows:64px minmax(0,1fr) 48px!important}
.rrdd-game-shell .practice-phase>.practice-intro{display:none}
.rrdd-game-shell .practice-phase>.adventure-stars{grid-row:1;grid-column:1;width:100%;height:64px;min-height:0;padding:4px 8px!important;box-sizing:border-box}
.rrdd-game-shell .practice-phase>.reading-stage{grid-row:2;grid-column:1}
.rrdd-game-shell .practice-phase>.controls{grid-row:3;grid-column:1;width:100%;box-sizing:border-box}
.rrdd-game-shell .adventure-stars>.stars-heading{display:none}
.rrdd-game-shell .stars-route{display:grid!important;grid-template-columns:minmax(0,1fr) 56px;gap:8px;height:100%;min-height:0}
.rrdd-game-shell .star-progress{display:flex!important;align-items:center;width:100%;height:100%;padding:0!important;gap:2px!important}
.rrdd-game-shell .progress-star{flex:1;min-width:0;gap:0!important;padding:0!important}
.rrdd-game-shell .star-bubble{width:32px!important;height:32px!important;max-width:100%;min-height:0;min-width:0}
.rrdd-game-shell .star-icon{font-size:26px!important}.rrdd-game-shell .star-current-label{display:none!important}
.rrdd-game-shell .star-reward{display:grid!important;grid-template-columns:1fr!important;min-width:0;gap:0;padding:0!important;border:0!important}
.rrdd-game-shell .star-reward>b{font-size:8px;padding:2px}.rrdd-game-shell .reward-gift{width:32px;height:32px;font-size:26px}
.rrdd-game-shell .focus-word{padding:8px!important;margin:4px 0!important}
.rrdd-game-shell .sentence-play{min-height:44px!important;padding:6px 12px!important;margin:2px 0!important}
.rrdd-game-shell .word-game-button{min-height:44px!important;padding:6px 12px!important}
.rrdd-game-shell .rrdd-game-stages .journey-step{white-space:nowrap}
body.rrdd-game-shell{padding:0!important;margin:0!important}
.rrdd-game-shell .caption-panel{min-height:0!important;height:auto!important;justify-content:flex-start!important}
.rrdd-game-shell .sentence-row{display:flex;flex-direction:row!important;align-items:center;gap:6px;flex-wrap:wrap}
.rrdd-game-shell .sentence-row .read-caption{flex:1 1 180px!important;padding:0!important;min-height:0}
.rrdd-game-shell .sentence-row .sentence-play{flex:none}
.rrdd-game-shell .picture-panel figcaption{font-size:11px!important;line-height:1.2;padding:4px 8px!important}
/* One explicit video row also covers the embedded-player error state. */
.rrdd-game-shell .video-phase{grid-template-rows:minmax(0,1fr)!important}
.rrdd-game-shell .video-phase>.phase-copy{grid-row:1;grid-column:1;align-self:center}
.rrdd-game-shell .video-phase>.video-card{grid-row:1;grid-column:2;height:min(100%,calc((100vw - 64px)*.888889))!important;align-self:center}
.rrdd-game-shell .video-phase>.video-card.video-unavailable{height:min(100%,500px)!important;width:min(100%,380px)!important;aspect-ratio:auto!important;min-height:200px!important;overflow:auto!important}
@media(max-width:700px) and (orientation:portrait){
 .rrdd-game-shell .video-phase{grid-template-rows:auto minmax(0,1fr)!important}
 .rrdd-game-shell .video-phase>.video-card{grid-row:2;grid-column:1;height:100%!important}
}
/* Prevent entry animations from briefly pushing a correctly fitted screen
   below the viewport, especially while iOS browser chrome is resizing. */
.rrdd-game-shell .experience-phase.active{animation:none!important}
.rrdd-game-shell .play-top{margin:0!important;min-height:44px;align-items:center;flex:none}
.rrdd-game-shell .play-top h2{font-size:clamp(23px,2.8vw,36px);line-height:1.15;margin:2px 0}
.rrdd-game-shell .stitch-track{margin:0 auto!important;min-height:28px;height:28px;flex:none}
.rrdd-game-shell .stitch{width:28px;height:28px;font-size:14px}
.rrdd-game-shell .mission-card .sentence-area{min-height:0!important;margin:2px 0!important}
.rrdd-game-shell .mission-card .mission-action{min-height:0!important;margin:2px 0!important}
.rrdd-game-shell .mission-card .mission-feedback:empty,.rrdd-game-shell .mission-card .mission-action:empty{display:none}
@media(max-width:700px) and (orientation:portrait){
 .rrdd-game-shell #chapterLabel{display:none}
 .rrdd-game-shell .mission-card{height:auto;min-height:0;padding:8px!important;gap:3px!important}
 .rrdd-game-shell .mission-card .sentence-area{font-size:14px;line-height:1.35}
 .rrdd-game-shell .mission-card .sentence-area .word-meaning{font-size:14px}
 .rrdd-game-shell .mission-card .mission-feedback{font-size:11px;line-height:1.25;min-height:0}
 .rrdd-game-shell .mission-card .mission-action p{margin:0;font-size:11px}
 .rrdd-game-shell .game-grid{grid-template-rows:minmax(180px,1fr) auto}
}
@media(max-width:360px){
 .rrdd-game-shell .rrdd-game-header .rrdd-game-brand,.rrdd-game-shell .rrdd-game-brand img{width:70px!important}
 .rrdd-game-shell .rrdd-game-header .rrdd-game-tools{padding-left:80px!important;padding-right:4px!important;gap:0!important}
 .rrdd-game-shell .rrdd-game-header .rrdd-challenge-timer b{font-size:16px!important}
}
/* Keep playback/navigation above the iPhone home indicator. */
.rrdd-game-shell .reader-shell{height:calc(100dvh - env(safe-area-inset-bottom,0px))!important}
.rrdd-game-shell .app-shell:has(>.site-header),.rrdd-game-shell:has(#playScreen) .app-shell{height:calc(100dvh - env(safe-area-inset-bottom,0px))!important}
body.rrdd-game-shell:has(#exitGame){height:calc(100dvh - env(safe-area-inset-bottom,0px))}
body.chimelong-game:not(.halloween-game){--rrdd-content-height:calc(100dvh - var(--rrdd-header-height) - env(safe-area-inset-bottom,0px))}
.rrdd-game-shell .reader-shell>.reading-stage .read-caption{min-height:0!important;flex:none!important;line-height:1.45!important}
.rrdd-game-shell .world-picture{position:relative}
.rrdd-game-shell .world-picture>.world-deliveries{position:absolute;bottom:8px;left:8px;right:8px;max-height:70px}
.rrdd-game-shell .voice-listening-lock{left:8px!important;right:8px!important;top:calc(var(--rrdd-header-height) + 4px)!important;max-width:600px!important;width:auto!important;margin:auto!important;transform:none!important;animation:none!important;box-sizing:border-box}
/* Academy tasks: the board gets the remaining height; navigation and answer
   trays stay inside it rather than beneath a long story note. */
.rrdd-game-shell .campaign-game{height:100%;min-height:0;margin:0;padding:0!important}
.rrdd-game-shell .game-screen{height:100%;min-height:0;display:flex;flex-direction:column;gap:6px;padding:0!important}
.rrdd-game-shell .game-nav{flex:none;min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:6px;margin:0}
.rrdd-game-shell .game-nav button{min-height:44px;padding:6px 10px}.rrdd-game-shell .game-nav>span,.rrdd-game-shell .game-nav>div{font-size:11px}
.rrdd-game-shell .game-title{flex:none;min-height:44px;gap:8px;margin:0!important}
.rrdd-game-shell .game-title h1{font-size:clamp(22px,2.5vw,34px);line-height:1.2;margin:2px 0}
.rrdd-game-shell .game-title .eyebrow{font-size:10px}.rrdd-game-shell .game-title .listen-button{min-width:44px;min-height:44px;width:44px;height:44px;padding:6px}
.rrdd-game-shell .game-title .listen-button span{display:none}
.rrdd-game-shell .game-controls{flex:1;min-height:0;display:flex;flex-direction:column;gap:6px;margin:0;padding:0;border:0;min-width:0}
.rrdd-game-shell .game-board{flex:1;min-height:0;margin:0;overflow:auto}
.rrdd-game-shell .game-bottom{flex:none;min-height:44px;display:flex;gap:6px;align-items:center;margin:0;padding:0}
.rrdd-game-shell .game-bottom button{min-height:44px;padding:6px 12px}.rrdd-game-shell .game-bottom .mission-reminder{font-size:11px;line-height:1.3}
.rrdd-game-shell .sprout-river{height:100%;min-height:0;display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:8px}
.rrdd-game-shell .sprout-playmat{grid-column:1;grid-row:1/3;height:100%;min-height:0;aspect-ratio:auto!important}
.rrdd-game-shell .sprout-notebook{grid-column:2;grid-row:1;min-height:0;overflow:auto;padding:10px!important}
.rrdd-game-shell .sprout-pocket{grid-column:2;grid-row:2;min-height:0;padding:6px!important}
.rrdd-game-shell .token-tray{min-height:44px;gap:8px;padding:2px!important;margin:0}
@media(max-width:700px) and (orientation:portrait){
 .rrdd-game-shell .game-title .eyebrow{display:none}
 .rrdd-game-shell .sprout-river{grid-template-columns:1fr;grid-template-rows:minmax(140px,1fr) auto auto;gap:6px}
 .rrdd-game-shell .sprout-playmat{grid-column:1;grid-row:1}
 .rrdd-game-shell .sprout-notebook{grid-column:1;grid-row:2;padding:4px 8px!important}
 .rrdd-game-shell .sprout-notebook :is(.notebook-tab,.sprout-notebook-title,.sprout-reassurance){display:none}
 .rrdd-game-shell .sprout-notebook p{font-size:12px;line-height:1.3;margin:2px 0}
 .rrdd-game-shell .sprout-pocket{grid-column:1;grid-row:3}.rrdd-game-shell .sprout-pocket>span{font-size:11px}
 .rrdd-game-shell .game-bottom .mission-reminder{display:none}
 .rrdd-game-shell .token-tray button{width:56px;height:56px;min-height:44px;font-size:26px}
}
.rrdd-game-shell .day-screen{height:100%;min-height:0;display:flex;flex-direction:column;gap:6px}
.rrdd-game-shell .day-screen>.back-link{flex:none;min-height:44px;margin:0;padding:6px 10px}
.rrdd-game-shell .day-heading{flex:none;margin:0!important;gap:8px}
.rrdd-game-shell .day-heading h1{font-size:26px;line-height:1.2;margin:2px 0}
.rrdd-game-shell .day-heading p{font-size:12px;line-height:1.3;margin:2px 0}
.rrdd-game-shell .day-layout{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:10px}
.rrdd-game-shell .activity-list{display:grid;grid-auto-rows:minmax(44px,1fr);gap:5px;min-height:0}
.rrdd-game-shell .activity-card{min-height:44px;height:100%;padding:6px 10px;gap:8px}
.rrdd-game-shell .activity-copy strong{font-size:16px}.rrdd-game-shell .activity-copy>span{font-size:11px}
.rrdd-game-shell .day-companion{min-height:0;padding:8px 12px;overflow:auto}
.rrdd-game-shell .day-companion>img{height:100px;width:auto;object-fit:contain}
.rrdd-game-shell .day-bottom{flex:none;min-height:44px;margin:0;padding:0;gap:8px;font-size:11px}
.rrdd-game-shell .day-bottom button{min-height:44px;padding:6px 12px}
@media(max-width:700px) and (orientation:portrait){
 .rrdd-game-shell .day-heading p,.rrdd-game-shell .day-heading .eyebrow{display:none}
 .rrdd-game-shell .day-layout{display:flex;flex-direction:column;gap:6px}
 .rrdd-game-shell .activity-list{flex:1;min-height:0}.rrdd-game-shell .activity-card{grid-template-columns:24px 36px minmax(0,1fr) 20px}
 .rrdd-game-shell .activity-meta{display:none}.rrdd-game-shell .activity-emoji{width:36px;height:36px}
 .rrdd-game-shell .day-companion{flex:none;padding:4px 8px!important}.rrdd-game-shell .day-companion :is(img,.eyebrow,h3,.time-note){display:none}
 .rrdd-game-shell .day-companion p{font-size:11px;line-height:1.3;margin:2px 0}.rrdd-game-shell .day-companion button{min-height:44px;padding:6px 10px;font-size:12px}
 .rrdd-game-shell .day-bottom>span{display:none}
}
/* Phone landscape: use two columns and retain the next action before copy. */
@media(orientation:landscape) and (max-height:480px){
 .chimelong-game:not(.halloween-game) main{grid-template-rows:48px minmax(0,1fr) auto!important;gap:4px!important}
 .chimelong-game:not(.halloween-game) .journey-score{height:48px!important;grid-template-rows:48px!important}
 .chimelong-game:not(.halloween-game) .journey-score-heading strong{font-size:38px!important}
 .chimelong-game:not(.halloween-game) .journey-score::before{top:10px;height:28px}
 .chimelong-game:not(.halloween-game) .watch-card{grid-template-rows:minmax(0,1fr)!important}
 .chimelong-game:not(.halloween-game) .watch-copy h2{font-size:27px!important;line-height:1.1;margin:4px 0!important}
 .chimelong-game:not(.halloween-game) .watch-copy small{display:none}
 .chimelong-game:not(.halloween-game) .watch-reward{font-size:12px;margin:4px 0!important}
 .chimelong-game:not(.halloween-game) #beginRead{font-size:16px;line-height:1.2;min-height:44px;padding:8px 16px;margin:4px 0}
 body.halloween-game .watch-copy h1{font-size:25px;line-height:1.1;margin:4px 0}
 body.halloween-game .watch-copy p{font-size:12px;line-height:1.3;margin:4px 0}
 body.halloween-game .watch-copy .small,body.halloween-game .watch-copy .eyebrow{display:none}
 body.halloween-game .watch-copy .gold{min-height:44px;margin:4px 0;padding:6px 12px}
 .rrdd-game-shell:has(#exitGame) #watch>p{display:none}
 .rrdd-game-shell:has(#exitGame) .film :is(.pill,h2,p){display:none}
 .rrdd-game-shell:has(#exitGame) .film button{min-height:44px;padding:6px 12px;font-size:14px}
 .rrdd-game-shell .intro-copy h1{font-size:32px;line-height:1.1}
 .rrdd-game-shell .intro-copy :is(.intro-pills,.quiet-note){display:none}
 .rrdd-game-shell .intro-copy p{font-size:13px;margin:4px 0}
 .rrdd-game-shell .intro-copy .primary-btn{min-height:44px;padding:8px 14px;font-size:16px}
 .rrdd-game-shell .reader-shell>.reading-stage{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:8px}
 .rrdd-game-shell .reader-shell>.reading-stage :is(.caption-heading,.tap-hint){display:none}
 .rrdd-game-shell .reader-shell>.reading-stage .read-caption{font-size:20px!important;line-height:1.4!important}
 .rrdd-game-shell .campaign-world{grid-template-columns:1fr 1fr;grid-template-rows:44px minmax(0,1fr) 44px;gap:6px}
 .rrdd-game-shell .campaign-world>.campaign-heading{grid-column:1/-1;grid-row:1}
 .rrdd-game-shell .campaign-heading h1{font-size:22px}.rrdd-game-shell .campaign-heading :is(p,.eyebrow){display:none}
 .rrdd-game-shell .campaign-world>.world-intro{grid-column:1;grid-row:2;display:flex;flex-direction:column;gap:4px}
 .rrdd-game-shell .world-intro .world-picture{flex:1;min-height:0}
 .rrdd-game-shell .world-intro .world-invitation{flex:none;padding:4px!important}
 .rrdd-game-shell .world-invitation :is(.eyebrow,h2,p),.rrdd-game-shell .world-deliveries{display:none}
 .rrdd-game-shell .world-invitation .story-actions{display:flex;gap:4px;margin:0}.rrdd-game-shell .story-actions button{min-height:44px;padding:6px;font-size:12px}
 .rrdd-game-shell .campaign-world>.adventure-cards{grid-column:2;grid-row:2;grid-template-columns:1fr;grid-template-rows:repeat(3,minmax(0,1fr));gap:4px}
 .rrdd-game-shell .adventure-card{min-height:44px;display:grid;grid-template-columns:24px minmax(0,1fr) 36px;padding:4px 8px;gap:4px}
 .rrdd-game-shell .adventure-card h2{font-size:16px;margin:0}.rrdd-game-shell .adventure-card p{display:none}
 .rrdd-game-shell .campaign-world>.campaign-footnote{grid-column:1/-1;grid-row:3}.rrdd-game-shell .campaign-footnote>span{display:none}
}
.chimelong-game:not(.halloween-game) main>.view:not([hidden]){width:100%!important;max-width:none!important}
.chimelong-game:not(.halloween-game) .watch-card{width:100%!important;min-width:0;container-type:normal}
