/* Halloween's visual language with a theme palette supplied by each game. */
body.rrdd-adventure[data-adventure-theme=sky]{--adv-rail:#b9e4ec;--adv-edge:#7fbbcf;--adv-score:#dff2f4;--adv-ink:#173c61;--adv-highlight:#fff1a8}
body.rrdd-adventure[data-adventure-theme=spooky]{--adv-rail:#392153;--adv-edge:#af82d1;--adv-score:#503065;--adv-ink:#55316f;--adv-highlight:#fff1a8}
body.rrdd-adventure{--rrdd-header-height:52px}
body.rrdd-adventure.rrdd-game-shell header.rrdd-game-header,body.rrdd-adventure .rrdd-header-space{height:52px!important;min-height:52px!important}
body.rrdd-adventure.rrdd-game-shell header.rrdd-game-header .rrdd-game-brand{left:10px!important;top:4px!important;width:84px!important;height:44px!important}
body.rrdd-adventure.rrdd-game-shell header.rrdd-game-header .rrdd-game-tools{height:52px!important;min-height:52px!important;padding:4px 8px 4px 100px!important;gap:4px!important}
body.rrdd-adventure header .rrdd-challenge-timer{order:0;width:auto!important;min-width:0!important;margin:0 4px!important}
body.rrdd-adventure header .rrdd-challenge-timer b{font:26px Froople,'Trebuchet MS',sans-serif!important;color:#ffcf4f!important;text-shadow:0 2px #986b2f}
body.rrdd-adventure header .rrdd-fullscreen-tool{order:1}body.rrdd-adventure header .rrdd-learning-pause{order:2}body.rrdd-adventure.rrdd-game-shell header.rrdd-game-header .rrdd-game-exit{order:3!important}
body.rrdd-adventure.rrdd-game-shell header.rrdd-game-header .rrdd-game-exit{display:inline-flex!important;width:72px!important;min-width:44px!important;font-size:14px!important;line-height:1.2!important}
body.rrdd-adventure.rrdd-game-shell header.rrdd-game-header .rrdd-game-exit::after{display:none}
body.rrdd-adventure .journey-score{position:relative!important;isolation:isolate;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr)) 115px repeat(5,minmax(0,1fr))!important;grid-template-rows:74px!important;width:100%!important;max-width:1050px!important;height:74px!important;min-height:74px!important;margin:0 auto!important;padding:0 8px!important;background:none!important;border:0!important;box-shadow:none!important}
body.rrdd-adventure .journey-score::before{display:block!important;content:'';position:absolute;left:0;right:0;top:20px;height:38px;z-index:-1;background:var(--adv-rail);border:2px solid var(--adv-edge);border-radius:30px;box-shadow:inset 0 0 6px #fff4}
body.rrdd-adventure :is(.score-centre,.journey-score-heading){grid-column:6!important;grid-row:1!important;position:static!important;align-self:center!important;margin:auto!important;text-align:center;background:var(--adv-score)!important;border-radius:24px;padding:0 6px!important;line-height:1!important}
body.rrdd-adventure #journeyScore{display:block;font:62px/1.05 Froople,'Trebuchet MS',sans-serif!important;color:#ffdb61;text-shadow:0 3px #98641b}
body.rrdd-adventure #journeyScore[data-digits='4']{font-size:48px!important}
body.rrdd-adventure .journey-score-label,body.rrdd-adventure .score-centre>span,body.rrdd-adventure #scoreGain{display:none!important}
body.rrdd-adventure #starRoute{display:contents!important}
body.rrdd-adventure #starRoute button{grid-row:1;align-self:center;width:100%;height:44px;min-height:44px!important;min-width:0;padding:2px!important;background:none!important;border:0!important;box-shadow:none!important;opacity:1!important}
body.rrdd-adventure #starRoute svg{display:block;width:100%;height:100%;max-height:38px;overflow:visible}
body.rrdd-adventure #starRoute .current svg{filter:drop-shadow(0 0 4px #fff8ff)}
body.rrdd-adventure #starRoute .earned svg{filter:drop-shadow(0 1px 2px #a4752455)}
body.rrdd-adventure #starRoute button:nth-child(1){grid-column:1}body.rrdd-adventure #starRoute button:nth-child(2){grid-column:2}body.rrdd-adventure #starRoute button:nth-child(3){grid-column:3}body.rrdd-adventure #starRoute button:nth-child(4){grid-column:4}body.rrdd-adventure #starRoute button:nth-child(5){grid-column:5}body.rrdd-adventure #starRoute button:nth-child(6){grid-column:7}body.rrdd-adventure #starRoute button:nth-child(7){grid-column:8}body.rrdd-adventure #starRoute button:nth-child(8){grid-column:9}body.rrdd-adventure #starRoute button:nth-child(9){grid-column:10}body.rrdd-adventure #starRoute button:nth-child(10){grid-column:11}
body.rrdd-adventure:not(.halloween-game) main{grid-template-rows:74px minmax(0,1fr) auto!important}
body.rrdd-adventure :is(button.gold,.reading-card>button){min-height:44px;border-radius:16px;font-family:'Trebuchet MS',Arial,sans-serif;font-weight:800;touch-action:manipulation}
body.rrdd-adventure button.gold{background:#ffdb68;box-shadow:0 4px 0 #bf8d29;color:#173c61}
body.rrdd-adventure button.gold:active:not(:disabled){translate:0 2px;box-shadow:0 2px 0 #bf8d29}
body.rrdd-adventure button:focus-visible,body.rrdd-adventure a:focus-visible{outline:3px solid #188bff;outline-offset:3px}
body.rrdd-adventure .reading-card .read-word.active{background:var(--adv-highlight);color:#173c61;border-radius:6px}
body.rrdd-adventure .story-picture img{object-fit:cover!important}
body.rrdd-adventure .round-intro{position:absolute;inset:0;z-index:60;display:grid;place-items:center;border-radius:inherit;background:transparent;backdrop-filter:none;color:#fff7dc;font:clamp(34px,7vw,76px) Froople,sans-serif;text-align:center;text-shadow:0 3px 0 #173c6180,0 2px 12px #173c61;pointer-events:auto}
body.rrdd-adventure .round-intro small{display:block;font-size:.55em}
body.rrdd-adventure :is(#mini,#recall,.play-view,.memory-view){position:relative}
body.rrdd-adventure .adv-toast{position:absolute;left:50%;top:16%;transform:translateX(-50%);z-index:65;max-width:85%;background:#fff4cf;color:var(--adv-ink);border:3px solid #ffcf59;border-radius:24px;padding:10px 20px;font:clamp(20px,3vw,32px) Froople,sans-serif;text-align:center;pointer-events:none;animation:adv-toast 1.8s ease both}
@keyframes adv-toast{0%,100%{opacity:0}15%,75%{opacity:1}}
body.rrdd-adventure .touch-drag-ghost{position:fixed;z-index:500;transform:translate(-50%,-50%) scale(1.05);pointer-events:none;width:100px;max-height:160px;box-shadow:0 8px 24px #173c6144;opacity:.95}
body.rrdd-adventure .touch-drag-ghost img{width:100%;height:100%;object-fit:contain}
body.rrdd-adventure .drag-source{opacity:.35!important}body.rrdd-adventure .drop-near{outline:4px solid #ffcf59!important;outline-offset:2px}
body.rrdd-adventure .adv-photo.selected{outline:4px solid #228fda;box-shadow:0 0 0 6px #fff8}
body.rrdd-adventure .adv-recovery{position:fixed;top:56px;left:8px;right:8px;max-width:700px;z-index:180;margin:auto;padding:10px;border:2px solid #dfaa37;border-radius:16px;background:#fff8df;color:#173c61;box-shadow:0 8px 28px #173c6140;font:14px/1.3 'Trebuchet MS',sans-serif}
body.rrdd-adventure .adv-recovery p{margin:0 0 8px}body.rrdd-adventure .adv-recovery button{min-height:44px;margin:2px;padding:8px 14px}
body.rrdd-adventure .adv-recovery[hidden]{display:none!important}
body.rrdd-adventure .mobile-pause-exit{display:flex;justify-content:center;min-height:44px;align-items:center;margin-top:12px;color:#173c61;font-weight:800}
body.rrdd-adventure .reward-flying-star{width:140px;height:140px}body.rrdd-adventure .reward-flying-star svg{width:100%;height:100%;display:block}
@media(max-width:700px){
 body.rrdd-adventure.rrdd-game-shell header.rrdd-game-header .rrdd-game-exit{width:44px!important;font-size:0!important;padding:0!important}body.rrdd-adventure.rrdd-game-shell header.rrdd-game-header .rrdd-game-exit::after{display:block!important;content:'↩'!important;font:23px system-ui!important}
 body.rrdd-adventure .journey-score{height:52px!important;min-height:52px!important;grid-template-rows:52px!important;grid-template-columns:repeat(5,minmax(0,1fr)) 72px repeat(5,minmax(0,1fr))!important}
 body.rrdd-adventure .journey-score::before{top:12px;height:28px}body.rrdd-adventure #journeyScore{font-size:38px!important}body.rrdd-adventure #journeyScore[data-digits='4']{font-size:30px!important}
 body.rrdd-adventure #starRoute svg{max-height:28px}body.rrdd-adventure:not(.halloween-game) main{grid-template-rows:52px minmax(0,1fr) auto!important}
 body.rrdd-adventure header .rrdd-challenge-timer b{font-size:23px!important}
}
@media(max-width:360px){body.rrdd-adventure header .rrdd-challenge-timer b{font-size:18px!important}body.rrdd-adventure.rrdd-game-shell header.rrdd-game-header .rrdd-game-tools{gap:0!important;padding-left:80px!important}}
@media(orientation:landscape) and (max-height:480px){body.rrdd-adventure .journey-score{height:48px!important;min-height:48px!important;grid-template-rows:48px!important}body.rrdd-adventure #journeyScore{font-size:38px!important}body.rrdd-adventure:not(.halloween-game) main{grid-template-rows:48px minmax(0,1fr) auto!important}body.rrdd-adventure .journey-score::before{top:10px;height:28px}}
@media(prefers-reduced-motion:reduce){body.rrdd-adventure .adv-toast{animation:none}}

/* Common star collection celebration. */
.star-celebration{position:fixed;inset:0;z-index:1000;pointer-events:none;overflow:hidden}
.reward-flying-star{position:absolute;font-size:140px;line-height:1;color:#ffd142;text-shadow:0 5px 0 #dc8f17,0 0 30px #fff9b3;filter:drop-shadow(0 6px 12px #cf8c3666);transform:translate(-50%,-50%)}
.reward-halo{position:absolute;width:220px;height:220px;border-radius:50%;background:radial-gradient(circle,#fff9cbe6,#ffdf7660 45%,transparent 70%);transform:translate(-50%,-50%);animation:rewardHalo 1.1s ease-out both}
.reward-message{position:absolute;left:50%;transform:translateX(-50%);padding:10px 24px;background:#fff9e9;color:#173c61;border:3px solid #ffd05d;border-radius:30px;font-family:Froople,'Trebuchet MS',sans-serif;font-size:28px;white-space:nowrap;animation:rewardMessage 1.2s both}
.reward-spark{position:absolute;color:#ffc638;font-size:30px;text-shadow:0 0 6px white;animation:rewardSpark .8s var(--spark-delay) ease-out both}
.star-just-earned :is(span,svg){animation:happyPop .6s ease-out 2}.star-count-pop{animation:happyPop .5s ease-out 2}
@keyframes rewardSpark{from{opacity:1;transform:translate(-50%,-50%) scale(.3)}to{opacity:0;transform:translate(var(--spark-x),var(--spark-y)) scale(1.2) rotate(70deg)}}
@keyframes rewardHalo{0%{opacity:0;scale:.3}30%{opacity:1}100%{opacity:0;scale:1.4}}
@keyframes rewardMessage{0%{opacity:0}20%,75%{opacity:1}100%{opacity:0}}
@media(prefers-reduced-motion:reduce){body.rrdd-adventure *,body.rrdd-adventure *::before,body.rrdd-adventure *::after{animation:none!important;transition:none!important}}

body.rrdd-adventure .reward-message{max-width:calc(100vw - 24px);white-space:normal;text-align:center;font-size:clamp(18px,4vw,28px)}

body.rrdd-adventure.rrdd-game-shell main{height:calc(100dvh - 52px)!important}
body.rrdd-adventure .journey-score #trophy{display:none!important}
/* A landscape phone keeps the picture and every reading action on screen. */
@media(orientation:landscape) and (max-height:500px){
 body.rrdd-adventure:not(.halloween-game) #read.game-open .reading-card{padding:4px 8px!important;overflow:visible;gap:2px}
 body.rrdd-adventure:not(.halloween-game) #mini h3{font-size:21px!important;line-height:1.1!important;margin:0!important}
 body.rrdd-adventure:not(.halloween-game) #polarBoard{gap:4px!important}
 body.rrdd-adventure:not(.halloween-game) .snow-stations{min-height:0!important;gap:12px!important}
 body.rrdd-adventure:not(.halloween-game) .sound-station{height:100%!important;min-height:0!important;gap:0}
 body.rrdd-adventure:not(.halloween-game) .station-picture{font-size:32px}.rrdd-adventure:not(.halloween-game) .snow-drop{min-height:40px;height:40px;width:48px;font-size:26px}
 body.rrdd-adventure:not(.halloween-game) .snow-card-tray{min-height:48px!important;padding:2px!important;gap:16px!important}
 body.rrdd-adventure:not(.halloween-game) .snow-letter{width:52px;min-height:44px;height:44px;font-size:30px}
 body.rrdd-adventure:not(.halloween-game) :is(.snow-tap-help,.spelling-note,.orca-paint-note,.album-drag-note){font-size:10px;line-height:1.15;margin:0;padding:0}
 body.rrdd-adventure:not(.halloween-game) #penguinBoard{gap:2px!important}.rrdd-adventure:not(.halloween-game) .hunt-penguin{height:70px!important;width:58px!important}
 body.rrdd-adventure:not(.halloween-game) #miniChoices button{min-height:44px!important;height:44px;font-size:12px;padding:2px}
 body.rrdd-adventure:not(.halloween-game) #miniChoices .count-number{font-size:21px}
 body.rrdd-adventure:not(.halloween-game) #spellingBoard{gap:3px!important}.rrdd-adventure:not(.halloween-game) .animal-photo-card{width:65%;padding:2px 6px;gap:2px!important}
 body.rrdd-adventure:not(.halloween-game) .spelling-word{font-size:23px}.rrdd-adventure:not(.halloween-game) :is(.spelling-slot,.spelling-letter){min-height:44px;height:44px}
 body.rrdd-adventure:not(.halloween-game) .spelling-letter{width:48px;font-size:26px}
 body.rrdd-adventure:not(.halloween-game) #orcaColourBoard{gap:2px!important}.rrdd-adventure:not(.halloween-game) .orca-paint-tray{padding:2px;gap:8px}
 body.rrdd-adventure:not(.halloween-game) .orca-paint-pot{min-height:44px;min-width:54px;height:44px;padding:0;font-size:10px}.rrdd-adventure:not(.halloween-game) .paint-blob{width:24px;height:24px}
 body.rrdd-adventure:not(.halloween-game) #circusBoard{grid-template-rows:34px minmax(0,1fr) 26px 44px!important;gap:2px!important}.rrdd-adventure:not(.halloween-game) .circus-move{font-size:12px}
 body.rrdd-adventure:not(.halloween-game) #fireworkBoard{grid-template-rows:34px minmax(0,1fr) auto 48px!important;gap:2px!important}.rrdd-adventure:not(.halloween-game) .firework-caption{font-size:14px;line-height:1.15;min-height:16px}.rrdd-adventure:not(.halloween-game) .firework-choice{font-size:12px}.rrdd-adventure:not(.halloween-game) .firework-choice svg{height:28px;width:44px}
 body.rrdd-adventure:not(.halloween-game) #recall.album-mode .recall-card{padding:4px 10px!important;gap:3px}
 body.rrdd-adventure:not(.halloween-game) #recall .album-heading{min-height:26px;padding:0 110px}.rrdd-adventure:not(.halloween-game) .album-heading h2{font-size:22px!important}.rrdd-adventure:not(.halloween-game) .album-progress{min-height:26px;font-size:9px;padding:2px 8px}
 body.rrdd-adventure:not(.halloween-game) .album-clue{min-height:44px;padding:0 6px}.rrdd-adventure:not(.halloween-game) #recall #recallQuestion{font-size:13px!important;line-height:1.15}
 body.rrdd-adventure:not(.halloween-game) #memoryAlbum{grid-template-columns:minmax(0,1fr) 210px;grid-template-rows:minmax(0,1fr) auto;gap:4px}
 body.rrdd-adventure:not(.halloween-game) .album-scene{grid-column:1;grid-row:1;min-height:0}.rrdd-adventure:not(.halloween-game) .album-photo-tray{grid-column:2;grid-row:1;flex-direction:column;gap:4px;margin:0!important;width:100%}
 body.rrdd-adventure:not(.halloween-game) .album-loose-photo{transform:none!important;flex:1;min-height:44px!important;max-width:none;padding:2px 4px;display:grid;grid-template-columns:64px minmax(0,1fr);font-size:12px;gap:4px}
 body.rrdd-adventure:not(.halloween-game) .album-loose-photo img{height:44px!important;width:64px}.rrdd-adventure:not(.halloween-game) .album-drag-note{grid-row:2;grid-column:1/-1}
 body.rrdd-adventure:not(.halloween-game) #recall.album-complete .recall-card{display:grid;grid-template-columns:minmax(0,1fr) 210px;grid-template-rows:30px minmax(0,1fr)}
 body.rrdd-adventure:not(.halloween-game) #recall.album-complete .album-heading{grid-column:1/-1;grid-row:1}
 body.rrdd-adventure:not(.halloween-game) #recall.album-complete .album-clue{display:none}
 body.rrdd-adventure:not(.halloween-game) #recall.album-complete #memoryAlbum{grid-row:2;grid-column:1;grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto!important}
 body.rrdd-adventure:not(.halloween-game) #recall.album-complete #nextRecall{grid-row:2;grid-column:2;width:100%;min-height:64px;font-size:20px;padding:8px}
 body.rrdd-adventure:not(.halloween-game) .album-final-photo h3{font-size:13px;margin:2px 0}
 body.rrdd-adventure #read:not(.game-open) .reading-card{display:grid!important;grid-template-columns:minmax(0,1fr) 44px!important;grid-template-rows:auto minmax(0,1fr) 44px!important;gap:4px!important;padding:8px!important;overflow:visible!important}
 body.rrdd-adventure #read:not(.game-open) #sentence{grid-column:1!important;grid-row:1!important;font-size:20px!important;line-height:1.2!important;margin:0!important;align-self:center}
 body.rrdd-adventure #read:not(.game-open) :is(#listen,#readAgain){grid-column:2!important;grid-row:1!important;width:44px!important;height:44px!important;min-height:44px!important;padding:0!important;margin:0!important;font-size:0!important;align-self:center}
 body.rrdd-adventure #read:not(.game-open) :is(#listen,#readAgain)::after{content:'🔊'!important;font-size:22px!important}
 body.rrdd-adventure #read:not(.game-open) .word-card{grid-column:1/-1!important;grid-row:2!important;display:grid!important;grid-template-columns:minmax(90px,.75fr) minmax(0,1fr)!important;gap:6px!important;padding:4px 8px!important;margin:0!important;align-items:center}
 body.rrdd-adventure #read:not(.game-open) .word-card .eyebrow{display:none!important}
 body.rrdd-adventure #read:not(.game-open) #word{font-size:19px!important;min-height:44px!important;padding:0!important;margin:0!important;text-align:left}
 body.rrdd-adventure #read:not(.game-open) #meaning{font-size:12px!important;line-height:1.25!important;margin:0!important}
 body.rrdd-adventure #read:not(.game-open) #openMini{grid-column:1!important;grid-row:3!important;min-height:44px!important;margin:0!important;padding:4px 8px!important;font-size:14px!important}
 body.rrdd-adventure #read:not(.game-open) .card-nav{grid-column:2!important;grid-row:3!important;min-height:44px!important;height:44px!important;margin:0!important}
 body.rrdd-adventure #read:not(.game-open) #backRead{width:44px!important;min-height:44px!important;font-size:0!important;padding:0!important}
 body.rrdd-adventure #read:not(.game-open) #backRead::after{content:'←';font-size:20px}
 body.rrdd-adventure #read:not(.game-open) :is(.card-top,#readFeedback){display:none!important}
}
/* Both adventures keep the same compact certificate actions, without a page scroll. */
body.rrdd-adventure .adv-completion-panel.rrdd-unified-result{inset:52px 0 0!important;padding:8px 12px!important;gap:6px!important;overflow:hidden!important}
body.rrdd-adventure .adv-completion-panel>h2{font-size:clamp(20px,3vw,30px)!important;margin:0!important;flex:none}
body.rrdd-adventure .adv-completion-panel>.rrdd-award-intro{display:none!important}
body.rrdd-adventure .adv-completion-panel .rrdd-completion-layout{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(300px,1fr)!important;grid-template-rows:minmax(0,1fr)!important;gap:14px!important;flex:1!important;min-height:0!important;max-height:100%!important;align-items:center!important}
body.rrdd-adventure .adv-completion-panel .rrdd-certificate-preview{height:100%!important;min-height:0!important;padding:0!important}
body.rrdd-adventure .adv-completion-panel .rrdd-certificate-preview canvas{height:100%!important;max-height:100%!important;max-width:100%!important;width:auto!important;object-fit:contain!important}
body.rrdd-adventure .adv-award-form{padding:10px!important;display:flex!important;flex-direction:column;gap:6px!important;max-width:500px;width:100%;box-sizing:border-box}
body.rrdd-adventure .adv-award-form>h3{font-size:20px!important;line-height:1.1!important;margin:0!important}
body.rrdd-adventure .adv-award-form>label{margin:0!important;font-size:12px!important;line-height:1.2!important}
body.rrdd-adventure .adv-award-form>label input{margin-top:2px!important;min-height:44px!important;height:44px!important}
body.rrdd-adventure .adv-award-options{display:flex;gap:6px}
body.rrdd-adventure .adv-award-options>button{flex:1;min-width:0;min-height:44px;padding:4px;font-size:12px}
body.rrdd-adventure .adv-award-form>.rrdd-save-certificate{display:block;width:100%;min-height:44px!important;height:44px;padding:6px!important;margin:0!important;font-size:15px!important}
body.rrdd-adventure .adv-award-form>.rrdd-certificate-status:empty{display:none}
body.rrdd-adventure .adv-award-form>.rrdd-certificate-status{font-size:11px!important;line-height:1.15;margin:0!important;min-height:0}
body.rrdd-adventure .adv-award-form>.rrdd-completion-links{display:flex!important;flex-wrap:nowrap!important;gap:6px!important;margin:0!important}
body.rrdd-adventure .adv-award-form>.rrdd-completion-links a{min-height:44px!important;display:flex;align-items:center;justify-content:center;font-size:12px!important;flex:1;text-align:center}
body.rrdd-adventure .adv-award-dialog{max-width:min(600px,calc(100vw - 24px));max-height:calc(100dvh - 24px);box-sizing:border-box;margin:auto;padding:14px;border:3px solid #e5c46d;border-radius:20px;background:#fffaf1;color:#173c61;overflow:auto}
body.rrdd-adventure .adv-award-dialog:not([open]){display:none!important}
body.rrdd-adventure .adv-award-dialog::backdrop{background:#173c6188}
body.rrdd-adventure .adv-award-dialog>h3{font-size:22px!important;margin:0 0 10px!important}
body.rrdd-adventure .adv-award-dialog>button:last-child{display:block;min-height:44px;padding:8px 20px;margin:10px 0 0 auto}
body.rrdd-adventure .adv-award-dialog .rrdd-avatar-picker{position:static!important;inset:auto!important;max-width:100%!important;margin:0!important;padding:6px!important}
body.rrdd-adventure .adv-award-dialog .rrdd-avatar-grid{display:grid!important;grid-template-columns:repeat(5,minmax(44px,1fr));gap:4px!important}
body.rrdd-adventure .adv-award-dialog .rrdd-avatar-option{min-height:44px!important;width:100%!important;height:auto!important;max-height:64px!important}
@media(max-width:700px) and (orientation:portrait){
 body.rrdd-adventure .adv-completion-panel .rrdd-completion-layout{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) auto!important;gap:6px!important}
 body.rrdd-adventure .adv-award-form{padding:6px!important;gap:4px!important;max-width:none}
 body.rrdd-adventure .adv-award-form>h3{font-size:18px!important}
}
@media(orientation:landscape) and (max-height:500px){
 body.rrdd-adventure .adv-completion-panel>h2{display:none!important}
 body.rrdd-adventure .adv-award-form{padding:4px 8px!important;gap:3px!important}
 body.rrdd-adventure .adv-award-form>h3{font-size:17px!important}
}
/* First-sound rounds: one large live igloo, two reusable answer choices. */
body.rrdd-adventure #read.polar-sort #mini{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto minmax(0,1fr)!important;gap:4px!important;align-items:stretch}
body.rrdd-adventure #read.polar-sort #miniRound{grid-row:1;grid-column:1;text-align:center;font-size:12px;line-height:1.2;margin:0;padding:0}
body.rrdd-adventure #read.polar-sort #miniQuestion{grid-row:2;grid-column:1;margin:0!important;padding:0!important}
body.rrdd-adventure #read.polar-sort #hearMini{display:none!important}
body.rrdd-adventure #read.polar-sort #polarBoard{grid-row:3;grid-column:1;display:grid!important;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto auto;height:100%;min-height:0;gap:8px!important;container-type:size}
body.rrdd-adventure #polarBoard.polar-rounds .snow-stations{display:flex!important;align-items:center;justify-content:center;height:100%!important;min-height:0!important;width:100%;gap:0!important}
body.rrdd-adventure #polarBoard.polar-rounds .sound-station{position:relative;display:block!important;width:min(520px,100%,140cqh);height:100%!important;max-height:620px;min-height:0!important;aspect-ratio:auto;margin:0;padding:0;border:0;background:none;box-shadow:none!important}
body.rrdd-adventure #polarBoard.polar-rounds .station-igloo{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}
body.rrdd-adventure #polarBoard.polar-rounds .station-picture{position:absolute;left:50%;top:29%;transform:translate(-50%,-50%);font-size:clamp(42px,16cqh,100px);line-height:1;filter:drop-shadow(0 4px 3px #6aa4b844)}
body.rrdd-adventure #polarBoard.polar-rounds .snow-drop{position:absolute;left:50%;top:61%;transform:translate(-50%,-50%);display:grid;place-items:center;width:clamp(64px,20cqh,110px);height:clamp(44px,13cqh,82px);min-height:44px;font-size:clamp(30px,10cqh,54px);margin:0}
body.rrdd-adventure #polarBoard.polar-rounds .snow-word{position:absolute;left:50%;bottom:3%;transform:translateX(-50%);font-size:clamp(18px,5cqh,30px);white-space:nowrap;padding:4px 12px;margin:0;line-height:1.2}
body.rrdd-adventure #polarBoard.polar-rounds .snow-card-tray{display:flex;justify-content:center;gap:20px!important;padding:2px 8px 8px!important;margin:0;min-height:0!important;flex:none}
body.rrdd-adventure #polarBoard.polar-rounds .snow-letter{width:90px!important;height:82px;min-height:44px!important;font-size:46px;flex:none;touch-action:none}
body.rrdd-adventure #polarBoard.polar-rounds .snow-tap-help{margin:0 auto;padding:3px 10px;max-width:100%;font-size:12px;line-height:1.25;text-align:center}
@media(max-width:700px) and (orientation:portrait){
 body.rrdd-adventure #polarBoard.polar-rounds .snow-letter{width:78px!important;height:70px;font-size:40px}
 body.rrdd-adventure #polarBoard.polar-rounds .snow-tap-help{font-size:11px;padding:2px 4px}
}
@media(orientation:landscape) and (max-height:500px){
 body.rrdd-adventure #read.polar-sort #polarBoard{grid-template-columns:minmax(0,1fr) 210px;grid-template-rows:minmax(0,1fr) auto;gap:3px!important}
 body.rrdd-adventure #polarBoard.polar-rounds .snow-stations{grid-column:1;grid-row:1}
 body.rrdd-adventure #polarBoard.polar-rounds .snow-card-tray{grid-column:2;grid-row:1;align-self:center;gap:12px!important}
 body.rrdd-adventure #polarBoard.polar-rounds .snow-letter{width:76px!important;height:70px;font-size:38px}
 body.rrdd-adventure #polarBoard.polar-rounds .snow-tap-help{grid-column:1/-1;grid-row:2;font-size:10px;padding:0}
 body.rrdd-adventure #polarBoard.polar-rounds .station-picture{top:24%;font-size:40px}
 body.rrdd-adventure #polarBoard.polar-rounds .snow-word{bottom:0;font-size:17px}
}

/* The collector stage follows the image ratio; controls live outside the canvas. */
body.rrdd-adventure .adv-completion-panel.rrdd-collectible .rrdd-certificate-preview{display:grid;place-items:center;position:relative;top:auto!important;align-self:stretch!important;container-type:size;background:none;border:0;box-shadow:none;overflow:visible}
body.rrdd-adventure .rrdd-card-preview-stage{position:relative;width:min(100cqw,calc(100cqh * .7142857),420px);aspect-ratio:5/7;max-width:100%}
body.rrdd-adventure .adv-completion-panel.rrdd-collectible .rrdd-card-preview-stage canvas{display:block;width:100%!important;height:auto!important;max-height:none!important;aspect-ratio:5/7!important}
.rrdd-card-avatar-arrow{position:absolute;top:38.5%;translate:0 -50%;display:grid;place-items:center;width:44px;height:44px;padding:0;border:2px solid #f5ca64;border-radius:50%;background:#633285;color:#fff1a8;font:900 34px/1 sans-serif;box-shadow:0 3px #37204d66;cursor:pointer}
.rrdd-card-avatar-arrow.avatar-previous{left:17%}.rrdd-card-avatar-arrow.avatar-next{right:17%}
.rrdd-card-avatar-arrow:focus-visible{outline:3px solid #168ae6;outline-offset:3px}
body.rrdd-adventure .adv-award-form>.rrdd-card-score-details{margin:0;font-size:12px}
body.rrdd-adventure .adv-award-form>.rrdd-share-choice{display:flex;align-items:center;gap:7px;font-size:12px!important;line-height:1.3!important}
body.rrdd-adventure .adv-award-form>.rrdd-share-choice input{width:22px;height:22px;min-height:22px!important;flex:none;accent-color:#714599;margin:0}
body.rrdd-adventure .adv-award-form>.rrdd-join-leaderboard{min-height:44px;width:100%;margin:0!important;padding:7px;font-weight:bold}
@media(max-width:700px) and (orientation:portrait){body.rrdd-adventure .adv-award-form>.rrdd-share-choice{font-size:11px!important}}

body.rrdd-adventure .adv-award-form>.rrdd-share-choice{align-items:center!important;margin:2px 0!important}
body.rrdd-adventure .adv-award-form>.rrdd-share-choice input{height:22px!important;margin:0!important}
/* Personal card photos remain local; the compact editor works with touch,
   mouse and a keyboard-operated zoom range. */
.rrdd-personal-photo{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:4px 0}
.rrdd-personal-photo>small{flex:1 1 100%;font-size:11px;line-height:1.35;color:#52647a}
.rrdd-personal-photo input[hidden]{display:none!important}
.rrdd-personal-photo .rrdd-photo-remove{padding:4px 10px;min-height:36px;font-size:12px}
.rrdd-photo-status{font-size:12px;margin:0}
.rrdd-photo-status:empty{display:none}
.rrdd-photo-dialog{width:min(94vw,430px);max-height:90dvh;overflow:auto;padding:18px;border:3px solid #cdb6e7;border-radius:22px;background:#fff9ef;color:#51316f;box-sizing:border-box;text-align:center}
.rrdd-photo-dialog::backdrop{background:#261237b3}
.rrdd-photo-dialog h3{margin:0 0 8px}.rrdd-photo-dialog p{font-size:14px;line-height:1.4}
.rrdd-photo-dialog canvas{display:block;width:min(100%,320px);height:auto;aspect-ratio:1;border-radius:50%;margin:10px auto;touch-action:none;cursor:grab;background:#d8c4eb}
.rrdd-photo-dialog label{display:flex;align-items:center;gap:12px;font-size:14px}
.rrdd-photo-dialog input[type=range]{width:100%;min-height:44px;padding:0}
.rrdd-photo-actions{display:flex;justify-content:center;gap:10px;margin-top:10px}
.rrdd-photo-actions button{min-height:44px;font:inherit;padding:9px 16px;border:0;border-radius:14px;background:#e5d8f3;color:#51316f}
.rrdd-photo-actions button.gold{background:#ffdb68}

.arcade-score-penalty{position:absolute;left:50%;top:80%;z-index:90;color:#ff8794;font-size:clamp(22px,3vw,38px);font-weight:900;text-shadow:0 2px 2px #442039;pointer-events:none;white-space:nowrap}
/* Keep the card's primary actions in view after a personal photo is added. */
.rrdd-personal-photo.rrdd-photo-input-host{display:contents}
.rrdd-photo-input-host>.rrdd-photo-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.adv-award-dialog>.rrdd-photo-remove{min-height:44px;padding:7px 12px;border:1px solid #bea3b5;border-radius:12px;background:#fff8ef;color:#73445f;font:inherit}
@media(orientation:portrait) and (max-height:700px){.rrdd-photo-dialog canvas{width:min(100%,35dvh,280px)}}
@media(orientation:landscape) and (max-height:500px){
 .rrdd-photo-dialog[open]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:6px 12px;align-items:center;width:min(94vw,700px);padding:12px}
 .rrdd-photo-dialog canvas{grid-column:1;grid-row:1/5;width:min(100%,55dvh);max-height:55dvh;margin:0 auto}
 .rrdd-photo-dialog :is(h3,p,label,.rrdd-photo-actions){grid-column:2;margin:0}
 .rrdd-photo-dialog h3{font-size:22px}.rrdd-photo-dialog p{font-size:13px;line-height:1.25}
}
