/* One header and one centred scoreboard on every device. */
body.halloween-game header.rrdd-game-header .rrdd-game-brand{left:10px!important;top:5px!important;transform:none!important;width:82px!important;height:36px!important;object-fit:contain}
body.halloween-game.rrdd-adventure.rrdd-game-shell header.rrdd-game-header .rrdd-game-exit{position:static!important;display:inline-flex!important;order:10;flex:none;transform:none!important;margin:0!important;min-width:62px!important;width:auto!important;font-size:14px!important;min-height:44px!important;height:44px;top:auto!important;left:auto!important;right:auto!important;padding:6px 10px!important}
body.halloween-game header .rrdd-game-tools{height:48px!important;min-height:48px!important;gap:4px!important;padding:2px 8px!important}
body.halloween-game header .rrdd-game-tools button{width:44px;height:44px;min-height:44px;padding:0}
body.halloween-game header .rrdd-challenge-timer{position:static!important;display:flex!important;align-items:center;justify-content:flex-end;width:78px!important;height:44px!important;min-height:44px!important;padding:0!important;margin:0 6px 0 0!important;background:none!important;border:0!important}
body.halloween-game header .rrdd-challenge-timer b{font:26px Froople,sans-serif!important;color:#ffcf4f!important;text-shadow:0 2px #986b2f}
body.halloween-game header .rrdd-challenge-timer span,body.halloween-game header .rrdd-challenge-timer small{display:none!important}
body.halloween-game .journey-score,body.halloween-game .journey-score:has(.score-preview-notice){height:74px;min-height:74px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr)) 115px repeat(5,minmax(0,1fr));grid-template-rows:74px;max-width:1050px;width:100%;margin:0 auto;padding:0 8px;isolation:isolate}
body.halloween-game .journey-score:before{content:'';position:absolute;left:0;right:0;top:20px;height:38px;z-index:-1;background:#392153;border:2px solid #af82d1;border-radius:30px;box-shadow:inset 0 0 6px #e1a9ff66}
body.halloween-game .score-centre{grid-column:6;grid-row:1;position:static;align-self:center;text-align:center;background:#503065;padding:0 3px;border-radius:24px;z-index:1}
body.halloween-game .score-centre>span,body.halloween-game #scoreGain{display:none}
body.halloween-game #journeyScore{font-size:62px;line-height:1.05}
body.halloween-game #journeyScore[data-digits='4']{font-size:48px}
body.halloween-game #starRoute{display:contents}
body.halloween-game #starRoute button{grid-row:1;align-self:center;width:100%;height:38px;min-height:0;padding:2px}
body.halloween-game #starRoute svg{width:100%;height:100%;max-height:38px}
body.halloween-game #starRoute button:nth-child(1){grid-column:1}body.halloween-game #starRoute button:nth-child(2){grid-column:2}body.halloween-game #starRoute button:nth-child(3){grid-column:3}body.halloween-game #starRoute button:nth-child(4){grid-column:4}body.halloween-game #starRoute button:nth-child(5){grid-column:5}body.halloween-game #starRoute button:nth-child(6){grid-column:7}body.halloween-game #starRoute button:nth-child(7){grid-column:8}body.halloween-game #starRoute button:nth-child(8){grid-column:9}body.halloween-game #starRoute button:nth-child(9){grid-column:10}body.halloween-game #starRoute button:nth-child(10){grid-column:11}
body.halloween-game .score-preview-notice{position:absolute;bottom:0;left:0;right:0;font-size:7px;text-align:center;pointer-events:none}
.mobile-pause-exit{display:flex}
body.halloween-game .story-picture img{object-fit:cover;object-position:center}
body.halloween-game #miniFeedback,body.halloween-game #dragNote,body.halloween-game #memoryFeedback{display:none!important}
.game-toast{position:absolute;left:50%;top:18%;transform:translateX(-50%);max-width:85%;padding:10px 20px;background:#fff4cf;color:#55316f;border:3px solid #ffcf59;border-radius:24px;font:clamp(20px,3vw,34px) Froople,sans-serif;z-index:25;pointer-events:none;text-align:center;animation:gameToast 1.8s ease both}
@keyframes gameToast{0%{opacity:0;translate:0 12px;scale:.9}15%,75%{opacity:1;translate:0 0;scale:1}100%{opacity:0;translate:0 -10px}}
.round-intro>div{text-align:center}.round-intro small{display:block;color:#fff0ca;font:clamp(22px,4vw,50px) Froople,sans-serif}
/* The image stays one continuous sheet. Pull controls stretch the entire sheet. */
.wrapper-candy>.paper-left,.wrapper-candy>.paper-right{display:none!important}
.wrapper-candy>.paper-body{clip-path:none;transform-origin:center;transition:transform .22s ease}
.wrapper-candy.pulling-left>.paper-body{transform:translateX(calc(var(--paper-pull,0)*-8px)) scaleX(calc(1 + var(--paper-pull,0)*.1))}
.wrapper-candy.pulling-right>.paper-body{transform:translateX(calc(var(--paper-pull,0)*8px)) scaleX(calc(1 + var(--paper-pull,0)*.1))}
.wrapper-candy .pasted-sticker{width:35%;max-width:none;z-index:3}
.wrapper-pattern{opacity:1;mix-blend-mode:normal;left:29%;width:42%;top:18%;height:62%}
.wrapper-candy[data-pattern=dots] .wrapper-pattern,.pattern-choice[data-pattern=dots] .pattern-sample{background:radial-gradient(circle,#fff7b6 26%,#673381 28%,transparent 33%) 0 0/24px 24px}
.wrapper-candy[data-pattern=stripes] .wrapper-pattern,.pattern-choice[data-pattern=stripes] .pattern-sample{background:repeating-linear-gradient(45deg,#fff3a9 0 9px,#5d287a 9px 14px,transparent 14px 28px)}
.pattern-sample{background-color:#8453b5!important;box-shadow:inset 0 0 0 1px #54316e}
.tidy-field .tidy-cargo{position:absolute;top:10px;left:50%;transform:translateX(-50%);z-index:9;background:#fff1cf;color:#543170;border:2px solid #ffd05e;border-radius:18px;padding:7px 12px;font:clamp(13px,1.8vw,23px) Froople,sans-serif;white-space:nowrap;pointer-events:none}
.tidy-field .tidy-status{display:none}
/* A centred book with stable proportions; absolute page coordinates share its origin. */
body.halloween-game .memory-view .book,body.halloween-game .memory-view.complete .book{flex:none!important;aspect-ratio:3/2!important;height:auto!important;max-height:100%!important;padding:0!important;margin:auto!important;max-width:100%;background-size:100% 100%}
body.halloween-game .memory-view:not(.complete) #book>.album-overview{box-sizing:border-box;transform:none;grid-column:auto;grid-row:auto;margin:0}
body.halloween-game .memory-view:not(.complete) .album-overview .memories{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:minmax(0,1fr);height:75%;gap:3px;align-items:center}
body.halloween-game .memory-view:not(.complete) .album-overview .memories .photo{height:auto;aspect-ratio:4/5;min-height:0;width:100%;max-height:100%;padding:3px}
body.halloween-game .memory-view:not(.complete) .album-overview .memories .photo img{flex:1;height:calc(100% - 16px);object-fit:contain;min-height:0}
body.halloween-game .memory-view:not(.complete) .album-overview .memories .photo span{display:none}
@media(max-width:700px),(max-height:500px){body.halloween-game .journey-score,body.halloween-game .journey-score:has(.score-preview-notice){height:52px;min-height:52px;grid-template-columns:repeat(5,minmax(0,1fr)) 76px repeat(5,minmax(0,1fr));grid-template-rows:52px}body.halloween-game .journey-score:before{top:12px;height:30px}body.halloween-game #journeyScore{font-size:40px}body.halloween-game #journeyScore[data-digits='4']{font-size:29px}body.halloween-game #starRoute button{height:27px;padding:1px}body.halloween-game #starRoute svg{max-height:27px}body.halloween-game header .rrdd-challenge-timer b{font-size:22px!important}}
@media(prefers-reduced-motion:reduce){.game-toast{animation-duration:.1s}.wrapper-candy>.paper-body{transition:none}}

.wrapper-candy[data-stickers="2"] .pasted-sticker{width:26%}
.costume-photo-dialog{max-width:min(94vw,620px);max-height:94dvh;padding:16px;border:3px solid #e0abff;border-radius:24px;background:#f8edff;text-align:center;overflow:auto;color:#502369}
.costume-photo-dialog canvas{display:block;width:min(100%,65dvh);height:auto;margin:auto}.costume-photo-dialog button{margin:5px;min-height:44px}.costume-photo-dialog::backdrop{background:#211133cc}

body.halloween-game header .rrdd-game-tools{box-sizing:border-box!important;max-height:48px!important;min-height:48px!important;height:48px!important}

@media(min-width:701px) and (max-height:500px){body.halloween-game .memory-view:not(.complete):not([hidden]){display:grid!important;grid-template-columns:minmax(0,2fr) minmax(0,1fr);grid-template-rows:28px 38px minmax(0,1fr);gap:4px!important}body.halloween-game .memory-view>.mini-header{grid-column:1/-1;grid-row:1;min-height:0;height:28px}body.halloween-game .memory-view>#memoryClue{grid-column:1/-1;grid-row:2;height:36px;min-height:0;padding:3px 12px}body.halloween-game .memory-view:not(.complete)>.book{grid-column:1;grid-row:3}body.halloween-game .memory-view:not(.complete)>.photo-tray{grid-column:2;grid-row:3;display:flex;flex-direction:column;gap:2px;height:100%;min-height:0}body.halloween-game .memory-view:not(.complete)>.photo-tray .photo{height:30%;width:100%;display:flex;flex-direction:row;transform:none;min-height:0;padding:2px}body.halloween-game .memory-view:not(.complete)>.photo-tray .photo img{width:45%;height:100%;object-fit:contain}body.halloween-game .memory-view:not(.complete)>.photo-tray .photo span{font-size:12px;align-self:center}}

body.halloween-game main>section.view[hidden]{display:none!important}

/* Keep all four tools reachable beside the logo on small phones. */
@media(max-width:360px){body.halloween-game header.rrdd-game-header .rrdd-game-brand{left:8px!important;width:64px!important}body.halloween-game header .rrdd-game-tools{gap:2px!important;padding:2px 4px!important}body.halloween-game header .rrdd-challenge-timer{width:58px!important;margin-right:2px!important}body.halloween-game header .rrdd-challenge-timer b{font-size:22px!important}body.halloween-game.rrdd-adventure.rrdd-game-shell header.rrdd-game-header .rrdd-game-exit{min-width:56px!important;padding:6px!important}}

body.halloween-game.rrdd-adventure.rrdd-game-shell header.rrdd-game-header .rrdd-game-exit::after{display:none!important;content:none!important}

/* Round titles float over the original scene without a dimming layer. */
body.halloween-game.rrdd-adventure .round-intro{background:transparent;backdrop-filter:none}
