/* TappyTap paper-storybook tokens. Keep ring geometry and self-hosted Baloo 2. */
:root{--paper:#fff8eb;--paper-ink:#234e52;--paper-coral:#f27c67;--paper-gold:#f6c85f;--paper-aqua:#69beb4;}
/* Scenery belongs to the viewport, not the width-constrained content panel. */
body.hub-bg,body.land-bg,body.time-bg{background:var(--paper) url('../Images/Storybook/home.webp') center bottom/cover no-repeat fixed!important;}
#landScreen,#hubScreen,#timeScreen{background:transparent!important;color:var(--paper-ink);}
body.hub-bg>.cloud,body.land-bg>.cloud,body.time-bg>.cloud{display:none;}
@media(min-aspect-ratio:1/1){
  body.hub-bg,body.land-bg,body.time-bg{background-image:url('../Images/Storybook/home-wide.webp')!important;}
}
#landScreen .cloud,#hubScreen .cloud,#timeScreen .cloud{display:none;}
img[src*='TappyTapAppLogo']{filter:drop-shadow(0 3px 6px rgba(35,78,82,.18))!important;object-fit:contain;}
#hubScreen img[src*='TappyTapAppLogo']{width:clamp(130px,32vw,170px)!important;}
.land-logo img{max-width:90vw;}
.land-logo{animation:none;}
.land-sub{color:var(--paper-ink);}
.land-start{background:var(--paper-ink);color:var(--paper);box-shadow:0 4px 0 #163b3e;border:0;}
#hubScreen.grouped-home .group-grid .cat-btn{background:rgba(255,248,235,.96)!important;box-shadow:0 4px 0 rgba(35,78,82,.12);}
#hubScreen.grouped-home .group-grid .activity-name{color:var(--paper-ink)!important;}
#hubScreen .cat-icon-img{filter:none!important;}
#hubScreen.grouped-home .group-grid::before{border-color:rgba(105,190,180,.3);}
#hubScreen .ring-back-btn{width:60px;height:60px;color:var(--paper-ink);background:var(--paper);}
#fishScreen{background:#e4f4ef url('../Images/Storybook/ocean.webp') center bottom/cover no-repeat!important;}
#fishScreen .ft-fish{filter:none!important;touch-action:manipulation;}
/* Golden fish (js/fishtap.js _fishRollGolden): gold tint on the sprite itself
   — the wrap's own filter is pinned off above — plus a soft pulsing halo. */
#fishScreen .ft-golden>div{filter:sepia(1) saturate(3.4) hue-rotate(-10deg) brightness(1.14);}
#fishScreen .ft-golden::before{content:'';position:absolute;inset:-14%;border-radius:50%;background:radial-gradient(circle,rgba(255,214,90,.55) 0%,rgba(255,214,90,.22) 45%,rgba(255,214,90,0) 70%);animation:ftGoldPulse 1.3s ease-in-out infinite;pointer-events:none;}
#fishScreen .ft-golden>div{position:relative;}
@keyframes ftGoldPulse{0%,100%{transform:scale(.92);opacity:.75}50%{transform:scale(1.12);opacity:1}}
#fishScreen .ft-fish:focus-visible{outline:3px solid var(--paper-ink);outline-offset:2px;border-radius:30%;}
#fishScreen .ft-still>div{animation:none!important;}
#fishScreen.fish-magic::before,#fishScreen.fish-magic::after{display:none;}
#fishScreen.fish-magic .ft-fish{filter:none!important;}
#fishScreen.fish-magic #fishContainer{filter:none;}
#fishScreen.fish-magic #fishContainer>.ft-fish{animation:none;}
@keyframes ftPaperTap{0%,100%{transform:scale(1);}45%{transform:scale(1.12,.94);}75%{transform:scale(.98,1.04);}}
body.calm #fishScreen .fish-magic-sparkle,body.calm #fishScreen .ft-bubble{display:none;}
@media(prefers-reduced-motion:reduce){
  #hubScreen *,#landScreen *,#timeScreen *,#fishScreen *{animation:none!important;transition:none!important;}
  #fishScreen .fish-magic-sparkle,#fishScreen .ft-bubble{display:none;}
}

/* Shared paper surfaces: preserve game geometry and semantic learning colors. */
:root{--text:var(--paper-ink);--panel-bg:var(--paper);--panel-text:var(--paper-ink);--focus-ring:#234e52;}
body{background:#fff8eb;}
body.match-bg{background:var(--paper) url('../Images/Storybook/studio.webp') center/cover no-repeat fixed!important;}
body:has(#letterMatchScreen[style*='flex']){background:var(--paper) url('../Images/Storybook/studio.webp') center/cover no-repeat fixed!important;}
#letterMatchScreen{background:transparent!important;}
#animalsZoneScreen,#tracingScreen,#paintScreen{background:var(--paper) url('../Images/Storybook/studio.webp') center/cover no-repeat!important;}
#balloonScreen{background:#e4f4ef url('../Images/Storybook/garden.webp') center bottom/cover no-repeat!important;}
#sheepScreen,#sleepyScreen{background:#234e52 url('../Images/Storybook/night.webp') center bottom/cover no-repeat!important;}
#slpHouse{background:transparent;}
#sheepMeadow{background:transparent;}
#washUpScreen{background:var(--paper) url('../Images/Storybook/studio.webp') center/cover no-repeat!important;}
#tapScreen,#fireworksScreen{background:#234e52 url('../Images/Storybook/space.webp') center/cover no-repeat!important;}
.hbtn,.hbtn-dark{background:var(--paper)!important;color:var(--paper-ink)!important;border:2px solid #69beb4!important;box-shadow:0 3px 0 rgba(35,78,82,.12);text-shadow:none;}
.hbtn .hf,.hbtn-dark .hf{background:#69beb4;opacity:.35;}
.ui-icon-img,body.dark-mode .ui-icon-img{filter:none;}
#settingsCog,#infoBtn,#gameCog,#pianoCog,#rbCog{background:var(--paper);border-radius:50%;box-shadow:0 3px 0 rgba(35,78,82,.12);padding:5px;}
.settings-card,.pin-card,#gameCogPanel,#pianoSettingsPanel{background:var(--paper)!important;color:var(--paper-ink);border:2px solid #d9e6d7;box-shadow:0 8px 28px rgba(35,78,82,.16);}
.time-lang-btn,.time-age-btn,.time-btn,.time-stim-chip,.pset-btn,.pset-song,.pset-oct{background:#fffdf6;color:var(--paper-ink);border-color:#d9e6d7;box-shadow:none;}
.time-lang-btn.active,.time-age-btn.active,.time-btn-selected,.time-stim-chip.active,.pset-btn.active,.pset-song.active,.pset-oct.active{background:#e4f4ef!important;border-color:#69beb4!important;color:var(--paper-ink)!important;}
.land-title,.gtitle,.match-prompt-text,.time-title{text-shadow:none;color:var(--paper-ink);}
.land-badge{background:var(--paper);border-color:#d9e6d7;color:var(--paper-ink);box-shadow:none;}
.sports-card,.pit-card,.cbtn,.lm-tile{background:var(--paper);border:2px solid #d9e6d7;box-shadow:0 4px 0 rgba(35,78,82,.12);backdrop-filter:none;}
.sports-card span{color:var(--paper-ink);}
.lm-tile.selected{background:#e4f4ef;border-color:#69beb4;box-shadow:0 4px 0 rgba(35,78,82,.12);}
.cbtn.correct{background:#e4f4ef;border-color:#69beb4;filter:none;}
.spad{background:var(--paper)!important;border:2px solid #d9e6d7;box-shadow:0 4px 0 rgba(35,78,82,.12);color:var(--paper-ink);}
.spad::before{display:none;}
.spad .spad-lbl{color:var(--paper-ink);text-shadow:none;font-size:clamp(.55rem,2vw,.75rem);}
.ph-card-img,.pdisp{filter:none;}
.ph-flip-front,.ph-flip-back{background:var(--paper)!important;border:2px solid #d9e6d7;box-shadow:0 4px 0 rgba(35,78,82,.12);backdrop-filter:none;}
.ph-flip-front::before{display:none;}
.ph-card-word,.ph-card-word-big{color:var(--paper-ink);text-shadow:none;}
#balPromptText,#traceWord{background:var(--paper);color:var(--paper-ink);text-shadow:none;border:2px solid #d9e6d7;}
#fishMagicBtn,#dinoMagicBtn,#pitShapeBtn,#traceNextBtn{background:var(--paper);border-color:#69beb4;box-shadow:0 3px 0 rgba(35,78,82,.14);}
.pw-white{background:var(--paper);box-shadow:0 5px 0 #d7cbb6;border-color:#d7cbb6;}
.pw-black{background:#234e52;box-shadow:0 5px 0 #163b3e;}
/* Jason, 2026-11-14: first "the white touch area in view all mode ... just
   too close to the background", then "what if we just drop em and have a
   little drop shadow on the png images, and in night mode the names glow".
   View All tiles have no card at all now: the icon carries a soft paper
   shadow, and the activity name sits underneath with a cream halo so it
   reads over both the paper sky and the dark hills. */
#hubScreen:not(.grouped-home) .cat-btn{background:transparent!important;border:none!important;box-shadow:none!important;padding:4px 2px;gap:0;}
#hubScreen:not(.grouped-home) .cat-icon-img{filter:drop-shadow(0 4px 4px rgba(35,78,82,.3))!important;}
#hubScreen:not(.grouped-home) .activity-name{display:block;font-size:clamp(.78rem,2.1vw,1rem);color:var(--paper-ink)!important;white-space:nowrap;text-shadow:0 0 3px #fff8eb,0 0 3px #fff8eb,0 0 6px #fff8eb,0 0 10px #fff8eb;}
/* Short screens (small phones, phones in landscape): the icons need the
   room more than the parent needs the labels. */
@media(max-height:620px){#hubScreen:not(.grouped-home) .activity-name{display:none;}}
body.dark-mode #hubScreen:not(.grouped-home) .cat-icon-img{filter:drop-shadow(0 0 7px rgba(255,236,190,.45))!important;}
body.dark-mode #hubScreen:not(.grouped-home) .activity-name{color:#fff8eb!important;text-shadow:0 0 6px rgba(255,214,90,.95),0 0 14px rgba(255,214,90,.6),0 1px 2px rgba(0,0,0,.6);}
#sportsScreen{background:var(--paper) url('../Images/Storybook/sports.webp') center bottom/cover no-repeat;}
#bktJumbotron,#scrJumbotron,#hkyJumbotron,#ftbJumbotron,#bsbJumbotron,#bsbOutcomeText{background:var(--paper);border:2px solid #69beb4;box-shadow:0 4px 0 rgba(35,78,82,.18);color:var(--paper-ink);text-shadow:none;}
#bktJumbotron::after,#scrJumbotron::after,#hkyJumbotron::after,#ftbJumbotron::after{display:none;}
.bkt-jmb-brand,.scr-jmb-brand,.hky-jmb-brand,.ftb-jmb-brand,.bsb-jmb-label{color:var(--paper-ink);text-shadow:none;opacity:1;}
.jmb-pip{border-color:#69beb4;background:#e4f4ef;box-shadow:none;}
.jmb-pip.filled{background:var(--paper-coral);border-color:var(--paper-coral);box-shadow:none;}
#spcSkyBg{background:#234e52 url('../Images/Storybook/space.webp') center/cover no-repeat;}
#tapScreen>canvas:first-child{opacity:.35;}
#rbSun{filter:none!important;}
#scrStadium{display:none;}
.bedtime-step img{width:100%;height:100%;object-fit:contain;}
@media(min-aspect-ratio:1/1){
  #fishScreen{background-image:url('../Images/Storybook/ocean-wide.webp')!important;}
}

/* Audit: a shuffled full-width room must not leave holes in the house. */
#slpRooms{grid-auto-flow:row dense;padding-top:max(160px,env(safe-area-inset-top) + 160px);}
.slp-room{min-height:0;min-width:0;}
/* Square sprite exports need square display boxes, including bell/xylo. */
#instrumentsZoneRow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;max-width:780px;padding:0 16px max(20px,env(safe-area-inset-bottom));}
.inst-btn{width:100%;min-width:60px;height:clamp(80px,15vh,140px);align-items:center;}
.inst-btn>img:not(.xylo-mallet){width:100%;height:100%;object-fit:contain;filter:none;}
.inst-btn:last-child{grid-column:2;}
#wheelLabel{color:var(--paper-ink);text-shadow:none;}
#fidgetScreen.calm-bg #wheelLabel{color:var(--paper);}
.fidget-hint{color:var(--paper-ink);}
#wheelSpinBtn{background:var(--paper-ink);box-shadow:0 4px 0 #163b3e;min-height:60px;}
@media(max-height:500px) and (min-aspect-ratio:1/1){
  #slpRooms{grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:1fr;padding-top:100px;}
  .slp-room-wide{grid-column:auto;}
  #instrumentsZoneRow{grid-template-columns:repeat(7,minmax(0,1fr));max-width:1100px;gap:6px;padding-inline:12px;}
  .inst-btn{height:clamp(80px,34vh,150px);}
  .inst-btn:last-child{grid-column:auto;}
  /* Keep result space and the repeat-spin target stable on short screens. */
  #fidgetScreen{display:none;box-sizing:border-box;padding:64px 8vw 16px;grid-template-columns:1fr 1fr;grid-template-rows:1fr 60px 28px;column-gap:24px;justify-items:center;align-items:center;}
  #fidgetScreen[style*='flex']{display:grid!important;}
  .wheel-wrap{grid-column:1;grid-row:1/4;margin:0;min-height:0;}
  #fidgetCanvas{width:min(38vw,calc(100dvh - 100px));height:min(38vw,calc(100dvh - 100px));}
  #wheelLabel{grid-column:2;grid-row:1;min-height:0;margin:0;font-size:1.5rem;}
  #wheelSpinBtn{grid-column:2;grid-row:2;margin:0;}
  #wheelHint{grid-column:2;grid-row:3;margin:0;}
}
/* The drum illustration has empty upper/lower margins. On short screens,
   crop those margins, keeping the kit and its registered hit regions large. */
/* ── Drum kit from separate pieces (js/sounds.js _buildDrumKit) ──
   Jason, 2026-11-14: "the drum one doesn't fill the screen. It looks like
   a picture had a clickable map put over it." Each drum is its own
   button + picture. Wide arrangement by default; a tall arrangement when
   the screen is upright, so the kit fills a phone too. Stage is placed
   with calc(), no transform. */
/* Jason, 2026-11-15: "shouldn't they all be on the ground" — the back row
   used to float halfway up the wall. The room picture is now positioned so
   its floor line sits at a known height (--fl), and the kit is built
   around that line: cymbal stands just onto the floor, toms a little
   nearer, snare / kick / floor tom at the front. The stage's own 50% line
   is the floor line. */
#drumsZoneScreen{--fl:max(62dvh,calc(100dvh - max(25vw,25dvh)));
  background:var(--paper) url('../Images/GameAssets/Sounds/Drums/drum_room_bg.webp') no-repeat!important;
  background-size:max(100vw,100dvh) max(100vw,100dvh)!important;
  background-position:center calc(var(--fl) - 0.75*max(100vw,100dvh))!important;}
#drumsZoneStage{--dh:min(calc(2*(var(--fl) - 90px)),calc(2*(100dvh - var(--fl)) - 12px));--dw:min(100vw,calc(var(--dh)*1.5));
  position:absolute;aspect-ratio:auto;width:var(--dw);height:var(--dh);left:calc(50% - var(--dw)/2);top:calc(var(--fl) - var(--dh)/2);transform:none;}
.dk-piece{position:absolute;aspect-ratio:var(--ar);height:auto;border-radius:22px;transition:transform .09s ease-out;transform-origin:50% 100%;touch-action:manipulation;}
.dk-piece img{position:static!important;display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;-webkit-user-drag:none;filter:drop-shadow(0 6px 5px rgba(35,78,82,.22));}
.dk-piece.hit{background:none;transform:scale(1.07);}
body.calm .dk-piece.hit{transform:none;}
.dk-hihat    {--ar:512/768;width:19%;left:2%;   top:11%;z-index:1;}
.dk-crash    {--ar:512/768;width:19%;left:79%;  top:11%;z-index:1;}
.dk-tom_left {--ar:1/1;    width:17%;left:24%;  top:41%;z-index:2;}
.dk-tom_right{--ar:1/1;    width:17%;left:59%;  top:41%;z-index:2;}
.dk-snare    {--ar:512/640;width:21%;left:6%;   top:58%;z-index:3;}
.dk-floor_tom{--ar:512/640;width:21%;left:73%;  top:58%;z-index:3;}
.dk-kick     {--ar:1/1;    width:27%;left:36.5%;top:57%;z-index:4;}
@media(max-aspect-ratio:4/5){
  #drumsZoneStage{--dw:min(100vw,var(--dh));--dh0:var(--dh);height:var(--dw);top:calc(var(--fl) - var(--dw)/2);}
  .dk-hihat    {width:30%;left:0;   top:9%;}
  .dk-crash    {width:30%;left:70%; top:9%;}
  .dk-tom_left {width:23%;left:23%; top:43%;}
  .dk-tom_right{width:23%;left:54%; top:43%;}
  .dk-snare    {width:30%;left:0;   top:60%;}
  .dk-floor_tom{width:30%;left:70%; top:60%;}
  .dk-kick     {width:40%;left:30%; top:57.5%;}
}

/* Sticker-book sprint: reachable scene controls and paper surfaces. */
#stickerScenes{top:max(72px,env(safe-area-inset-top) + 64px);gap:8px;padding:5px;border-radius:40px;background:rgba(255,248,235,.94);}
#stickerScenes button{width:60px;height:60px;padding:8px;border:2px solid #d9e6d7;background:var(--paper);}
#stickerScenes button[aria-pressed=true]{border-color:var(--paper-ink);background:#e4f4ef;box-shadow:0 2px 0 rgba(35,78,82,.15);}
#stickerGrid{background:var(--paper);border-top-color:#69beb4;grid-template-rows:repeat(4,minmax(60px,1fr));}
#stickerGrid .sticker-slot{min-height:60px;}
@media(min-width:600px){#stickerScenes{top:max(11px,env(safe-area-inset-top) + 3px);}} /* buttons land on y=16, level with Home */
@media(max-height:650px){
  #stickerGrid{grid-template-columns:repeat(16,minmax(76px,1fr));grid-template-rows:minmax(60px,1fr);overflow-x:auto;overflow-y:hidden;}
}
#stickersScreen .first-hint{top:max(152px,env(safe-area-inset-top) + 144px);}
@media(min-width:600px){#stickersScreen .first-hint{top:max(88px,env(safe-area-inset-top) + 80px);}}

/* Consistent non-reading exit cue and balanced instrument stage. */
.exit-home{width:24px;height:24px;vertical-align:middle;margin-right:6px;position:relative;pointer-events:none;}
.hbtn:has(.exit-home){min-height:60px;min-width:60px;}
#instrumentsZoneScreen{align-items:center;padding-top:80px;box-sizing:border-box;}
#instrumentsZoneRow{margin-block:auto;}

/* Same artwork on both depth layers keeps the rim and net registered. */
/* 2026-11-14 (Jason: "looks weird when the ball goes in. I split the back
   part of the rim in the old version so that the ball appears to go into
   the hoop"): the front layer used to include the WHOLE rim ring, so a
   scoring ball slid behind the far side of the rim too and seemed to pass
   behind the hoop, not into it. The clip now keeps only the near half of
   the ring (below its centre line, minus the opening) plus the net; the
   far half stays on the back layer, so the ball drops in front of it. */
#bktHoopNet{clip-path:polygon(16% 54.8%,23.5% 54.8%,24.4% 55.7%,27.1% 56.4%,31.3% 57.1%,36.8% 57.7%,43.1% 58.0%,50.0% 58.1%,56.9% 58.0%,63.2% 57.7%,68.7% 57.1%,72.9% 56.4%,75.6% 55.7%,76.5% 54.8%,84% 54.8%,84% 63%,71% 65%,66% 96%,34% 96%,29% 65%,16% 63%);}
@media(max-width:500px){
  :is(#basketScreen,#hockeyScreen,#soccerScreen,#footballScreen,#baseballScreen) .hbtn:has(.exit-home){width:60px;padding-inline:12px;}
  :is(#basketScreen,#hockeyScreen,#soccerScreen,#footballScreen,#baseballScreen) .exit-home{margin:0;}
  :is(#basketScreen,#hockeyScreen,#soccerScreen,#footballScreen,#baseballScreen) .hbtn [data-i18n="holdExit"]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
/* Jason, 2026-11-15: "make sure in stickers that the image selector is
   aligned in the top row". The three scene buttons grew to 60px in the
   sticker sprint and no longer fitted between "All Done" and the gear on
   a phone, so they had been dropped to a second row. On phones the Home
   button is now icon-only here (as in the sports), which frees the room
   to put the selector back in the top row, level with Home and the gear.
   Below 351px wide there is not room for three 60px buttons even then,
   so only those very narrow screens keep the second row. */
@media(min-width:351px) and (max-width:599px){
  #stickersScreen .hbtn:has(.exit-home){width:60px;padding-inline:12px;}
  #stickersScreen .exit-home{margin:0;}
  #stickersScreen .hbtn [data-i18n="holdExit"]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
  #stickerScenes{top:max(11px,env(safe-area-inset-top) + 3px);gap:6px;}
  #stickersScreen .first-hint{top:max(88px,env(safe-area-inset-top) + 80px);}
}
}

/* ── Fish party mode (star switch, js/fishtap.js _fishMagic) ── */
#fishMagicBtn .fish-magic-ring{display:none;}
#fishMagicBtn{transition:transform .2s,background .2s,box-shadow .2s;}
#fishMagicBtn.fish-magic-active{background:#f6c453!important;border-color:#fff!important;box-shadow:0 0 0 6px rgba(246,196,83,.35),0 0 22px 6px rgba(246,196,83,.7);animation:fishPartyBtn 1.2s ease-in-out infinite;}
#fishMagicBtn.fish-magic-active img{animation:fishPartyStar 2.4s linear infinite;}
@keyframes fishPartyBtn{0%,100%{transform:scale(1)}50%{transform:scale(1.12)}}
@keyframes fishPartyStar{to{transform:rotate(360deg)}}
.ft-party-dot{position:absolute;bottom:-40px;border-radius:50%;opacity:.85;pointer-events:none;z-index:3;box-shadow:inset -3px -3px 0 rgba(0,0,0,.08);animation:ftPartyRise var(--dur,3s) linear forwards!important;}
@keyframes ftPartyRise{0%{transform:translate(0,0) scale(.6)}15%{transform:translate(calc(var(--sway,0px)*.3),-18vh) scale(1)}100%{transform:translate(var(--sway,0px),-115vh) scale(1)}}
body.calm #fishMagicBtn.fish-magic-active,body.calm #fishMagicBtn.fish-magic-active img{animation:none;}
body.calm .ft-party-dot{display:none;}
@media(prefers-reduced-motion:reduce){#fishMagicBtn.fish-magic-active,#fishMagicBtn.fish-magic-active img{animation:none;}.ft-party-dot{display:none;}}
/* Held creature (addDrag in js/taptarget.js) */
.creature-held{z-index:30!important;cursor:grabbing!important;}
.creature-held>div{filter:drop-shadow(0 12px 6px rgba(35,78,82,.28));}
/* ── Performance (2026-11-14) ── The 65 drifting/twinkling stars are a
   leftover from the old night-sky home screen. Each one ran two infinite
   animations — 130 in total — on every screen of the app, including behind
   every game where they can't be seen. They now exist only where they are
   visible and make sense: night mode on the home, welcome and timer
   screens. */
#bgStarLayer{display:none;}
body.dark-mode.hub-bg #bgStarLayer,body.dark-mode.land-bg #bgStarLayer,body.dark-mode.time-bg #bgStarLayer{display:block;}
body.calm #bgStarLayer{display:none!important;}
/* Background blur is one of the most expensive effects on iOS, and it was
   on things that sit over moving games the whole time: the Home button,
   the star and shape buttons, sports scoreboards, Space's HUD, bedtime's
   step bar, match and letter tiles. Since the paper restyle most of those
   are opaque, so the blur changed nothing on screen but was still being
   computed every frame. It now stays only on the parent dialogs, which
   are open briefly and over a still screen. */
*{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
#pinOverlay,#settingsOverlay,#feedbackOverlay,#infoModal,#kofiModal{backdrop-filter:blur(8px)!important;-webkit-backdrop-filter:blur(8px)!important;}
/* Custom nav art (2026-11-14 art drop) */
#traceNextBtn img{width:70%;height:70%;object-fit:contain;pointer-events:none;display:block;margin:auto;}
#fishMagicBtn .fish-star-on{display:none;}
#fishMagicBtn.fish-magic-active .fish-star-on{display:block;}
#fishMagicBtn.fish-magic-active .fish-star-off{display:none;}
#fishMagicBtn{padding:6px!important;}

/* ── Readability pass (Jason, 2026-11-15) ─────────────────────────────────
   Night mode had two recurring faults: panels turned dark teal while their
   text stayed dark ("hard to read with that green"), and cream pills kept
   night mode's pale text. Rule from here on: in night mode a paper
   surface STAYS paper with ink text, exactly as in day mode; only text
   that sits directly on the night background turns light. */
body.dark-mode .settings-card,body.dark-mode .pin-card,body.dark-mode #gameCogPanel,body.dark-mode #pianoSettingsPanel,
body.dark-mode .cbtn,body.dark-mode .lm-tile,body.dark-mode .sports-card,
body.dark-mode #hubScreen.grouped-home .group-grid .cat-btn{background:var(--paper)!important;}
body.dark-mode :is(.settings-card,.pin-card,#gameCogPanel,#pianoSettingsPanel,.cbtn,.lm-tile){border-color:#d9e6d7!important;}
body.dark-mode .settings-card,body.dark-mode .settings-card :is(div,span,label,p,h1,h2,h3,button:not(.active):not(.land-start)),
body.dark-mode .pin-card,body.dark-mode .pin-card :is(div,span,label,p,h1,h2,h3),
body.dark-mode #gameCogPanel,body.dark-mode #gameCogPanel :is(div,span,label,button),
body.dark-mode .sports-card,body.dark-mode .sports-card span,
body.dark-mode .lm-tile,
body.dark-mode #hubScreen.grouped-home .group-grid .activity-name,
body.dark-mode .land-badge,body.dark-mode #landScreen .land-badge,body.dark-mode #hubScreen .hub-pill,body.dark-mode #hubScreen .hub-pill span{color:var(--paper-ink)!important;text-shadow:none!important;}
.gcog-label{color:var(--paper-ink);font-size:.95rem;}
.gcog-title{color:#5b7f82;}
/* Text sitting on the night background itself */
body.dark-mode .match-prompt-text,body.dark-mode .match-prompt-text *,body.dark-mode .land-sub,body.dark-mode .time-title,body.dark-mode .gtitle{color:#fff8eb!important;}
/* Match prompt: the lead-in ("Tap the") was half-transparent and small. */
.match-prompt-lead{opacity:.85;font-size:.78em;}
/* The teal half of the wordmark vanished on the night sky: a cream halo
   keeps the whole name readable without redrawing the logo. */
body.dark-mode img[src*="TappyTapAppLogo"]{filter:drop-shadow(0 0 8px rgba(255,248,235,.35))!important;}
/* "Let's Play" — a livelier green (was the dark ink teal). */
.land-start{background:#2fb866!important;box-shadow:0 6px 0 #1f8a4a,0 10px 22px rgba(31,138,74,.28)!important;color:#fff!important;text-shadow:0 1px 0 rgba(0,0,0,.18);}
.land-start:active{transform:translateY(3px);box-shadow:0 3px 0 #1f8a4a!important;}
/* Hub pills were oversized after the icon swap. */
.hub-pill{min-height:46px;min-width:0;padding:4px 14px 4px 8px;gap:6px;font-size:.95rem;}
.hub-pill-icon{width:30px;height:30px;}
/* Game names in View All: a crisp outline under the existing halo/glow. */
#hubScreen:not(.grouped-home) .activity-name{-webkit-text-stroke:3px #fff8eb;paint-order:stroke fill;}
body.dark-mode #hubScreen:not(.grouped-home) .activity-name{-webkit-text-stroke:3.5px #17233a;paint-order:stroke fill;}
/* Parent Settings in night mode: same paper buttons as day mode (night
   styling had left dark buttons with dark labels). */
body.dark-mode .settings-card button:not(.gcog-sw):not(.dialog-close):not(.settings-close){background:#fffdf6!important;color:var(--paper-ink)!important;border-color:#d9e6d7!important;box-shadow:none!important;}
body.dark-mode .settings-card button.active:not(.gcog-sw):not(.dialog-close):not(.settings-close){background:#dff3ee!important;border-color:#69beb4!important;}
body.dark-mode .settings-card button :is(span,div,small){color:var(--paper-ink)!important;}
body.dark-mode .settings-card .settings-close,body.dark-mode .settings-card .dialog-close{background:#efe7d8!important;color:var(--paper-ink)!important;}
body.dark-mode #sportsScreen .sports-card span,body.dark-mode #sportsScreen .sports-card *,body.dark-mode #sportsSwitchPanel .sports-card *{color:var(--paper-ink)!important;text-shadow:none!important;}
/* Spin (night mode): hint and result text sit on paper, so they stay ink;
   the Spin button uses the same lively green as "Let's Play". */
body.dark-mode #fidgetScreen .fidget-hint,body.dark-mode #fidgetScreen #wheelResult,body.dark-mode #fidgetScreen #wheelResult *{color:var(--paper-ink)!important;text-shadow:none!important;}
.fidget-hint{font-size:1rem;opacity:.9;}
#wheelSpinBtn{background:#2fb866!important;box-shadow:0 5px 0 #1f8a4a!important;color:#fff!important;}
/* Fireworks: Grand Finale as a round paper icon button, like the fish
   star and the shape button (was an emoji on a gradient pill). */
#fwFinaleBtn{left:auto!important;right:16px;bottom:max(20px,env(safe-area-inset-bottom));transform:none!important;width:64px;height:64px;padding:8px;border-radius:50%;background:var(--paper)!important;border:3px solid #69beb4;box-shadow:0 3px 0 rgba(35,78,82,.25);display:flex;align-items:center;justify-content:center;}
#fwFinaleBtn img{width:100%;height:100%;object-fit:contain;pointer-events:none;}
#fwFinaleBtn:active{transform:scale(.92)!important;}
/* The gear sat 11px higher than the Home button (centres 35 vs 46). */
#gameCog{top:max(25px,env(safe-area-inset-top) + 19px);}
/* Sticker drawer: every sticker visible at once, no scrolling (Jason,
   2026-11-15: "shouldn't need a scroll, just put it in a grid"). 16
   stickers = 4x4 when the screen is upright, 8x2 when it is wide. The
   drawer is as tall as it needs to be for 60px cells (never less than a
   third of the screen) and the scene takes the rest. */
#stickersScreen{--sd:max(33.333dvh,296px);}
#stickersScreen #stickerScene{inset:0 0 var(--sd)!important;}
#stickersScreen #stickerGrid{height:var(--sd)!important;overflow:hidden!important;touch-action:none;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:repeat(4,minmax(60px,1fr))!important;grid-auto-rows:auto!important;gap:8px;padding:12px;}
#stickersScreen #stickerGrid .sticker-slot{touch-action:none;min-height:60px;}
@media(orientation:landscape){
  #stickersScreen{--sd:max(33.333dvh,160px);}
  #stickersScreen #stickerGrid{grid-template-columns:repeat(8,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(60px,1fr))!important;}
}
/* Peekaboo shelf: two even rows (was 13 + 5). --half is set in JS. */
#peekShelf{display:grid!important;grid-template-columns:repeat(var(--half,9),24px);width:auto!important;max-width:none!important;}
@media(min-width:620px){#peekShelf{grid-template-columns:repeat(calc(var(--half,9)*2),24px);}}
