/* The play surface owns the available viewport; only the award form scrolls. */
body.halloween-game{height:100dvh;min-height:0!important;overflow:hidden;display:flex;flex-direction:column;padding:0!important}
body.halloween-game header.rrdd-game-header{height:48px!important;min-height:48px!important}
body.halloween-game .rrdd-header-spacer{height:48px!important;min-height:48px!important;flex:none}
body.halloween-game .rrdd-header-space{height:48px!important;min-height:48px!important;flex:none}
body.halloween-game .rrdd-game-footer,body.halloween-game .rrdd-display-bar{display:none!important}
body.halloween-game main{height:auto!important;min-height:0!important;flex:1;display:flex;flex-direction:column;gap:6px;padding:0 12px max(8px,env(safe-area-inset-bottom));overflow:hidden;width:100%;max-width:none}
body.halloween-game .journey-score{height:70px;min-height:70px;flex:none;margin:0}
body.halloween-game #journeyScore{font-size:58px}
body.halloween-game .view{height:auto!important;min-height:0!important;max-height:none!important;flex:1 1 0!important;margin:0;box-sizing:border-box;overflow:hidden}
body.halloween-game .view[hidden]{display:none!important}
body.halloween-game .play-view{padding:8px 12px;gap:4px}
body.halloween-game .mini-header{flex:none;min-height:44px;grid-template-columns:minmax(0,1fr) auto;gap:4px}
body.halloween-game .mini-header h2{font-size:clamp(20px,2.4vw,34px);line-height:1.1;margin:0}
body.halloween-game .board{min-height:0!important;flex:1;overflow:hidden}
body.halloween-game .play-actions{flex:none;min-height:44px;gap:4px;flex-wrap:nowrap}
body.halloween-game .feedback{min-height:0;font-size:12px;line-height:1.25;margin:0}
body.halloween-game .audio-recovery{position:fixed;top:54px;left:12px;right:12px;z-index:100;max-width:700px;margin:0 auto;padding:10px;box-shadow:0 8px 30px #1b0a4e99;box-sizing:border-box}
body.halloween-game .audio-recovery p{font-size:13px;line-height:1.3}
body.halloween-game .audio-recovery button{min-height:44px}
body.halloween-game .claw-slider{height:44px;min-height:44px}
body.halloween-game .watch-layout{height:100%;min-height:0;padding:4px 3%;gap:3%}
body.halloween-game .film{height:100%;min-height:0;max-height:100%;max-width:100%;width:auto;aspect-ratio:9/16}
body.halloween-game .reading-card{min-height:0;overflow:hidden;padding:clamp(10px,2vw,24px);gap:8px}
body.halloween-game .reading-card h2{font-size:clamp(20px,2.8vw,36px);line-height:1.2;margin:0}
body.halloween-game .reading-card button{min-height:44px}
body.halloween-game .word-card{padding:10px;box-sizing:border-box}
body.halloween-game #meaning{font-size:clamp(13px,1.3vw,17px);line-height:1.35;margin:0}

body.halloween-game .memory-view{padding:8px 12px;gap:6px}
body.halloween-game .memory-view .book,body.halloween-game .memory-view.complete .book{flex:1 1 0!important;min-height:0!important;max-height:none!important;height:auto!important;width:100%;padding:0;box-sizing:border-box}
body.halloween-game .memory-view .photo-tray{flex:none;height:100px;min-height:0;width:min(780px,96%)}
body.halloween-game .memory-view:not(.complete) .album-overview{overflow:visible}
body.halloween-game .memory-view:not(.complete) .album-overview .memories .photo{transform:none;min-height:0;max-height:100%}
body.halloween-game .memory-view.complete .memories{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:minmax(0,1fr);gap:6px;width:100%;height:100%;padding:10% 8%;box-sizing:border-box;align-items:center}
body.halloween-game .memory-view.complete .memories .photo{grid-column:auto;grid-row:1;width:100%;height:auto;aspect-ratio:4/5;min-height:0;max-height:100%;padding:4px;box-sizing:border-box}
body.halloween-game .memory-view.complete .memories .photo img{height:calc(100% - 22px);min-height:0;flex:1;aspect-ratio:auto;object-fit:contain}
body.halloween-game .memory-view.complete .memories .photo span{font-size:clamp(9px,1.5vw,18px)}
body.halloween-game .photo-tray .photo{height:100%;display:flex;flex-direction:column;min-height:44px}
body.halloween-game .photo-tray .photo img{height:calc(100% - 22px);min-height:0;object-fit:contain}
body.halloween-game .wrapper-workbench{min-height:0!important}
body.halloween-game .wrapper-factory{min-height:0;box-sizing:border-box}
body.halloween-game .cape-hint{display:none}
body.halloween-game .costume-wardrobe{overflow:hidden}
body.halloween-game #award{overflow:auto!important}
@media(max-width:700px){
 body.halloween-game main{padding:0 8px max(6px,env(safe-area-inset-bottom));gap:4px}
 body.halloween-game .journey-score,body.halloween-game .journey-score:has(.score-preview-notice){height:52px;min-height:52px;grid-template-rows:52px}
 body.halloween-game #journeyScore{font-size:38px}
 body.halloween-game #read{grid-template-rows:minmax(100px,1fr) auto;gap:6px}
 body.halloween-game .story-picture{height:100%;min-height:0;max-height:none}
 body.halloween-game .story-picture img{object-fit:contain}
 body.halloween-game .reading-card{padding:10px;gap:6px}
 body.halloween-game .word-card{padding:6px;gap:6px}
 body.halloween-game #word{font-size:19px;padding:0}
 body.halloween-game #sentence{font-size:20px}
 body.halloween-game #readAgain,body.halloween-game #openMini{font-size:14px;padding:7px 12px}
 body.halloween-game .watch-layout{grid-template-rows:minmax(0,1fr) auto;gap:4px;padding:0}
 body.halloween-game .watch-copy{padding:0}
 body.halloween-game #watchStatus{margin:0;font-size:12px}
 body.halloween-game .watch-copy .gold{margin:3px 0 0}
 body.halloween-game .play-view{padding:6px;gap:3px}
 body.halloween-game .play-actions{min-height:44px}
 body.halloween-game .play-actions button{font-size:12px;padding:6px}
 body.halloween-game .memory-view{padding:6px;gap:4px}
 body.halloween-game .memory-view h2{font-size:20px}
 body.halloween-game .memory-clue{font-size:14px;padding:6px;min-height:44px}
 body.halloween-game .memory-view .photo-tray{height:90px;gap:6px}
 body.halloween-game .claim-trophy{min-height:44px;padding:8px;font-size:16px}
 body.halloween-game .costume-wardrobe{grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}
 body.halloween-game .costume-choice{min-height:44px;padding:2px}
 body.halloween-game .costume-thumb{height:32px!important}
 body.halloween-game .costume-choice span{font-size:9px}
 body.halloween-game .costume-actions{display:flex;gap:3px}
 body.halloween-game .costume-time{display:none}
 body.halloween-game .costume-finish{min-height:44px;padding:6px;font-size:12px}
 body.halloween-game .board[data-kind=ghost]{grid-template-rows:minmax(90px,1fr) auto 44px}
}
@media(max-height:500px) and (min-width:701px){
 body.halloween-game .memory-view:not(.complete) .album-overview .memories{height:100%;display:flex;flex-wrap:nowrap;gap:3px}
 body.halloween-game .memory-view:not(.complete) .album-overview .memories .photo{height:100%;min-height:0;padding:2px}
 body.halloween-game .memory-view:not(.complete) .album-overview .memories .photo img{height:100%;width:100%;object-fit:contain}
 body.halloween-game .memory-view:not(.complete) .album-overview .memories .photo span{display:none}
 body.halloween-game #miniFeedback{display:none}
 body.halloween-game .board[data-kind=truck] .prop{min-height:44px;padding:2px}
 body.halloween-game .board[data-kind=truck] .paint-pots i{width:22px;height:22px;margin-bottom:2px}
 body.halloween-game .board[data-kind=truck] .paint-pots{gap:5px}
 body.halloween-game .board[data-kind=ghost] .costume-wardrobe{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(44px,1fr));gap:0}
 body.halloween-game .costume-wardrobe h3{display:none}
 body.halloween-game .costume-options{display:contents}
 body.halloween-game .costume-choice{min-height:44px;padding:1px;max-width:none}
 body.halloween-game .costume-thumb{height:24px!important}
 body.halloween-game .costume-choice span{font-size:9px}
 body.halloween-game .costume-time{display:none}
 body.halloween-game .journey-score{height:40px;min-height:40px}
 body.halloween-game #journeyScore{font-size:34px}
 body.halloween-game .score-centre>span,body.halloween-game #scoreGain{display:none}
 body.halloween-game .journey-score .rrdd-challenge-timer b{font-size:25px!important}
 body.halloween-game .play-view{padding:4px 8px;gap:2px}
 body.halloween-game #play{position:relative}
 body.halloween-game #play .mini-header{padding-left:48px}
 body.halloween-game .mini-header h2{font-size:20px}
 body.halloween-game .mini-header button{min-height:44px;padding:6px}
 body.halloween-game .play-actions{min-height:0;height:0;position:static}
 body.halloween-game .play-actions p{display:none}
 body.halloween-game #backStory{position:absolute;top:4px;left:8px;width:44px;height:44px;min-height:44px;padding:0;font-size:0}
 body.halloween-game #backStory:before{content:'←';font-size:22px}
 body.halloween-game .cape-clue{font-size:18px}
 body.halloween-game .cape-tray{max-width:260px;gap:5px}
 body.halloween-game .cape-choice{padding:2px;min-height:44px}
 body.halloween-game .cape-choice .cape-object{height:32px;max-width:55px}
 body.halloween-game .cape-choice>span:last-child{font-size:10px}
 body.halloween-game .cape-side{gap:4px}
 body.halloween-game .wrapper-factory{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);grid-template-rows:40px 44px 44px 44px;gap:3px;padding:4px}
 body.halloween-game .wrapper-order{grid-column:1/-1;min-height:0;height:40px;padding:2px 8px;font-size:15px}
 body.halloween-game .wrapper-workbench{grid-column:1;grid-row:2/5}
 body.halloween-game .wrapper-tabs{grid-column:2;grid-row:2;gap:3px}
 body.halloween-game .wrapper-tab{min-width:0;font-size:11px;padding:3px;min-height:44px;flex:1}
 body.halloween-game .wrapper-palette{grid-column:2;grid-row:3;min-height:0;gap:3px}
 body.halloween-game .wrapper-choice{min-width:0;min-height:44px;padding:2px;flex:1}
 body.halloween-game .wrapper-choice .wrapper-sticker{width:24px;height:24px}
 body.halloween-game .wrapper-choice .wrapper-swatch{width:25px;height:25px}
 body.halloween-game .wrapper-choice span:last-child{font-size:10px;margin:0}
 body.halloween-game .wrapper-actions{grid-column:2;grid-row:4;min-height:0;gap:3px}
 body.halloween-game .wrapper-actions button{min-height:44px;font-size:11px;padding:3px}
 body.halloween-game .wrapper-gallery,body.halloween-game .wrapper-friend{display:none}
 body.halloween-game .wrapper-wrap-note{font-size:15px}
 body.halloween-game .reading-card{padding:6px;gap:4px}
 body.halloween-game #read{grid-template-columns:.8fr 1.2fr;gap:8px}
 body.halloween-game #sentence{font-size:19px}
 body.halloween-game .word-card{display:grid;grid-template-columns:1fr 1.5fr;gap:8px;padding:4px}
 body.halloween-game .word-card>.eyebrow,body.halloween-game #sceneTitle{display:none}
 body.halloween-game #word{font-size:19px;padding:0}
 
 body.halloween-game .memory-view .photo-tray{height:70px}
 body.halloween-game .memory-view h2{font-size:20px}
 body.halloween-game .memory-clue{font-size:14px;padding:6px;min-height:40px}
}
