/* Baby & Miko Game Surface System v1
   Shared child-facing visual mechanics. This layer changes presentation only;
   src/app.js remains the authority for game rules, scoring-free feedback and input. */

.play-shell{
  --game-paper:#fffdf8;
  --game-ink:#173b5b;
  --game-muted:#56707b;
  --game-aqua:#ccefeb;
  --game-aqua-deep:#13889a;
  --game-coral:#f48679;
  --game-yellow:#f3c650;
  --game-edge:rgba(18,102,122,.18);
  --game-raised:0 18px 42px rgba(23,59,91,.10),0 3px 9px rgba(23,59,91,.07),inset 0 1px 0 rgba(255,255,255,.92);
  --game-tile:0 10px 24px rgba(23,59,91,.12),0 3px 0 rgba(18,102,122,.11),inset 0 1px 0 #fff;
  border:1px solid var(--game-edge)!important;
  border-radius:28px!important;
  box-shadow:var(--game-raised)!important;
  background:linear-gradient(160deg,#effcf9 0%,#e8f8f7 54%,#f8f3df 140%)!important;
}

.play-toolbar{
  min-height:64px!important;
  height:auto!important;
  background:rgba(250,255,253,.72);
  border-bottom:1px solid rgba(18,102,122,.10);
  backdrop-filter:blur(12px);
}
.play-toolbar>span{font-weight:850!important;letter-spacing:-.1px}
.play-toolbar button{
  min-width:48px;min-height:48px;border-radius:16px!important;
  border:1px solid rgba(18,102,122,.2)!important;
  background:rgba(255,255,255,.78)!important;
  box-shadow:0 5px 12px rgba(23,59,91,.08),inset 0 1px 0 #fff;
}
.play-toolbar button[aria-pressed="true"]{background:#12667a!important;color:#fff!important;box-shadow:inset 0 2px 5px rgba(4,43,58,.2),0 4px 10px rgba(23,59,91,.12)}
.play-toolbar button:active{transform:translateY(2px);box-shadow:inset 0 2px 5px rgba(4,43,58,.16)}

.stage{
  isolation:isolate;
  background:
    radial-gradient(circle at 13% 17%,rgba(243,198,80,.13) 0 8%,transparent 8.5%),
    radial-gradient(circle at 86% 22%,rgba(244,134,121,.11) 0 7%,transparent 7.5%),
    linear-gradient(145deg,rgba(239,252,249,.96),rgba(232,248,247,.92));
}
.stage::before,.stage::after{content:"";position:absolute;pointer-events:none;z-index:0;border-radius:50%}
.stage::before{width:180px;height:180px;left:-80px;bottom:-90px;border:26px solid rgba(19,136,154,.07)}
.stage::after{width:130px;height:130px;right:-45px;top:28%;border:20px solid rgba(243,198,80,.08)}
#game-content,.welcome{z-index:1}
.play-bottom{background:rgba(250,255,253,.72);border-top:1px solid rgba(18,102,122,.10)!important;min-height:48px;height:auto!important}
#finish{min-height:48px;padding:0 16px!important;border-radius:999px!important;text-decoration:none!important;font-weight:800;background:rgba(255,255,255,.74)!important;border:1px solid rgba(18,102,122,.16)!important}

/* Direct game URLs should lead with the game, not repeat the large Playroom hero. */
.direct-game-route .play-page-intro{display:none!important}
.direct-game-route .play-page-main{padding-top:28px!important}
.direct-game-route .home-playroom{padding-top:0!important}

/* Active mobile play is intentionally focused. Site navigation returns on Finish. */
@media(max-width:900px){
  body.game-session-active .site-header,
  body.game-session-active .mobile-bottom-nav,
  body.game-session-active .games-section,
  body.game-session-active .social-strip,
  body.game-session-active .site-footer-v2{display:none!important}
  body.game-session-active .play-page-main{padding:8px 8px 18px!important}
  body.game-session-active .home-playroom .section-top{display:none!important}
  body.game-session-active .under-play{margin:9px 4px 0!important}
  body.game-session-active .play-shell{border-radius:24px!important}
}

/* Installed per-game PWAs must remain truly edge-to-edge even though this layer
   loads after the base PWA shell rules. */
html.single-game-pwa,body.single-game-pwa{margin:0!important;padding:0!important}
body.single-game-pwa.game-session-active .play-page-main{padding:0!important;margin:0!important}
body.single-game-pwa.game-session-active .play-shell{
  width:100vw!important;max-width:none!important;height:100dvh!important;margin:0!important;
  border:0!important;border-radius:0!important;box-shadow:none!important;
}

/* Keyboard Playground — visual mechanics */
#game-content.keyboard-content{overflow:hidden!important}
.keyboard-ready-card{
  position:absolute;left:50%;top:48%;transform:translate(-50%,-50%);
  width:min(440px,72%);padding:30px 34px 27px;text-align:center;
  border:1px solid rgba(18,102,122,.16);border-radius:30px;
  background:linear-gradient(145deg,rgba(255,255,255,.92),rgba(250,253,242,.86));
  box-shadow:var(--game-raised);color:var(--game-ink);pointer-events:none;
}
.keyboard-ready-kicker{display:block;font-size:9px;letter-spacing:2px;font-weight:900;color:#52706b;margin-bottom:12px}
.keyboard-ready-key{
  width:78px;height:78px;margin:0 auto 16px;display:grid;place-items:center;
  border-radius:23px;background:#fff;color:#12667a;font:900 44px/1 ui-rounded,'Avenir Next',sans-serif;
  border:1px solid rgba(18,102,122,.16);box-shadow:0 8px 0 #b7ded9,0 15px 30px rgba(23,59,91,.11),inset 0 1px 0 #fff;
}
.keyboard-ready-card h2{margin:0 0 7px!important;font-size:30px!important;color:#173b5b!important}
.keyboard-ready-card p{margin:0 auto 8px!important;max-width:320px;font-size:13px!important;line-height:1.55;color:#48636d!important}
.keyboard-ready-card small{font-size:10px;color:#71847f;font-weight:700}

.keyboard-example{
  box-sizing:border-box;width:168px!important;max-width:none!important;min-height:154px;
  padding:0;text-align:center;color:var(--game-ink)!important;
  background:transparent!important;border:0!important;box-shadow:none!important;
  animation:game-learning-tile 3.6s cubic-bezier(.2,.8,.2,1) forwards!important;
  overflow:visible;z-index:1;pointer-events:none;
}
.keyboard-example.is-latest{z-index:2;filter:none}
.keyboard-example.is-previous{filter:saturate(.88);opacity:.84}
.keyboard-example-picture{
  width:124px!important;height:108px!important;margin:0 auto!important;display:grid!important;place-items:center;
  font-size:82px!important;line-height:108px!important;
  background:transparent!important;border:0!important;box-shadow:none!important;
  filter:drop-shadow(0 9px 10px rgba(23,59,91,.15))!important;
}
.keyboard-example-picture img{width:100%!important;height:100%!important;object-fit:contain!important}
.keyboard-example-label{display:flex!important;justify-content:center;align-items:center;margin-top:6px;text-shadow:none!important;line-height:1!important}
.keyboard-example-label>strong{
  max-width:100%;padding:8px 15px;border-radius:999px;
  background:rgba(255,253,248,.92);border:1px solid rgba(18,102,122,.14);
  box-shadow:0 5px 12px rgba(23,59,91,.09),inset 0 1px 0 rgba(255,255,255,.9);
  font-size:20px;line-height:1.05;color:#173b5b;overflow-wrap:anywhere;
}
.keyboard-example-picture.counting-picture{font-size:23px!important;line-height:1.25!important;padding:6px;overflow-wrap:anywhere}
@keyframes game-learning-tile{0%{opacity:0;transform:translateY(16px) scale(.88)}12%,78%{opacity:1;transform:translateY(0) scale(1)}100%{opacity:0;transform:translateY(-16px) scale(.97)}}

.baby-keyboard{gap:7px!important;bottom:14px!important}
.baby-keyboard-row{gap:6px!important}
.baby-key{
  min-height:48px!important;border:1px solid rgba(18,102,122,.12)!important;border-radius:14px!important;
  touch-action:none!important;user-select:none!important;-webkit-user-select:none!important;-webkit-touch-callout:none!important;
  background:linear-gradient(180deg,#fff,#fffdf5)!important;color:#173b5b!important;
  box-shadow:0 5px 0 var(--key-color,#95b99b),0 9px 16px rgba(23,59,91,.10),inset 0 1px 0 #fff!important;
  transition:transform .11s ease,box-shadow .11s ease,background .11s ease!important;
}
.baby-key:hover{transform:translateY(-2px)!important;box-shadow:0 7px 0 var(--key-color,#95b99b),0 11px 19px rgba(23,59,91,.12)!important}
.baby-key.hit,.baby-key:active{transform:translateY(4px)!important;background:#eefaf7!important;box-shadow:0 1px 0 var(--key-color,#95b99b),inset 0 2px 5px rgba(23,59,91,.10)!important}
.baby-keyboard.alphabet-board{bottom:14px!important;gap:7px!important}
.baby-keyboard.alphabet-board .baby-keyboard-row{max-width:370px!important;gap:7px!important}
.baby-keyboard.alphabet-board .baby-key{flex:0 0 52px!important;width:52px!important;max-width:52px!important;height:52px!important;font-size:18px!important}
.play-shell:has(.baby-keyboard.alphabet-board) .stage{height:clamp(610px,72vh,720px)!important}

@media(max-width:620px){
  .keyboard-ready-card{top:31%;width:min(310px,88%);padding:22px 20px 20px;border-radius:24px}
  .keyboard-ready-key{width:62px;height:62px;border-radius:19px;font-size:34px;margin-bottom:13px;box-shadow:0 6px 0 #b7ded9,0 11px 22px rgba(23,59,91,.1)}
  .keyboard-ready-card h2{font-size:24px!important}.keyboard-ready-card p{font-size:11px!important}.keyboard-ready-card small{font-size:9px}
  .baby-keyboard.alphabet-board{bottom:10px!important;gap:5px!important;padding:0 5px!important}
  .baby-keyboard.alphabet-board .baby-keyboard-row{max-width:330px!important;gap:5px!important}
  .baby-keyboard.alphabet-board .baby-key{flex:0 0 48px!important;width:48px!important;max-width:48px!important;height:48px!important;min-height:48px!important;border-radius:13px!important;font-size:17px!important}
  .keyboard-example{width:142px!important;min-height:154px}
  .keyboard-example-picture{width:108px!important;height:92px!important;font-size:68px!important;line-height:92px!important}
  .keyboard-example-label{margin-top:5px}.keyboard-example-label>strong{font-size:17px;padding:7px 13px}
  .play-shell:has(.baby-keyboard.alphabet-board) .stage{height:610px!important}
}

.reduce-motion .keyboard-example{animation:none!important}
.reduce-motion .baby-key{transition:none!important}
.reduce-motion .baby-key:hover,.reduce-motion .baby-key:active,.reduce-motion .baby-key.hit{transform:none!important}
@media(prefers-reduced-motion:reduce){
  .keyboard-example{animation:none!important}
  .baby-key{transition:none!important}
  .baby-key:hover,.baby-key:active,.baby-key.hit{transform:none!important}
}

/* Learning controls must stay visually unobstructed by decorative canvas effects. */
#game-content.keyboard-content{z-index:4!important}

/* Little Melodies — tactile toy xylophone */
#game-content.music-content{
  display:grid;
  place-items:center;
  padding:24px 28px!important;
  overflow:hidden!important;
  z-index:2!important;
}
/* Melodies is a physical toy scene: bubbles/sparkles float over the instrument, never under its base. */
.play-shell:has(.music-content) canvas{z-index:5!important;pointer-events:none!important}

/* Decorative bubbles and celebration particles should float over physical game boards,
   while the shared canvas remains pointer-transparent so controls stay interactive. */
.play-shell:has(.colors-content) canvas,
.play-shell:has(.counting-content) canvas,
.play-shell:has(.memory-content) canvas{z-index:5!important;pointer-events:none!important}
.music-board{
  width:min(920px,96%);
  padding:8px 10px 6px;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  color:var(--game-ink);
}
.music-board-heading{display:flex;align-items:end;justify-content:space-between;gap:24px;text-align:left;margin-bottom:22px}
.music-kicker{display:block;font-size:9px;letter-spacing:1.8px;font-weight:900;color:#52706b;margin-bottom:7px}
.music-board h2{margin:0!important;font-size:30px!important;line-height:1.05;color:#173b5b!important}
.music-board-heading p{margin:7px 0 0!important;font-size:12px!important;line-height:1.5;color:#58707a!important}
.music-now{flex:0 0 auto;min-width:138px;padding:10px 14px;border-radius:16px;text-align:left;background:#eef9f5;border:1px solid rgba(18,102,122,.13);box-shadow:inset 0 1px 0 #fff}
.music-now span{display:block;font-size:8px;letter-spacing:1.3px;font-weight:900;color:#49645d}
.music-now strong{display:block;margin-top:3px;font-size:13px;color:#173b5b}
.notes{
  display:grid!important;
  grid-template-columns:repeat(8,minmax(58px,1fr));
  align-items:end!important;
  gap:10px!important;
  max-width:none!important;
  margin:0 auto!important;
  padding:18px 18px 10px;
  border-radius:26px;
  background:linear-gradient(180deg,#d8ece7,#c7e2dc);
  border:1px solid rgba(18,102,122,.13);
  box-shadow:inset 0 3px 8px rgba(23,59,91,.08),inset 0 -1px 0 rgba(255,255,255,.9),0 10px 22px rgba(23,59,91,.08);
  touch-action:none;
}
.note{
  position:relative;
  width:100%!important;
  height:calc(196px - var(--i)*10px)!important;
  min-height:126px!important;
  min-width:58px!important;
  padding:0!important;
  border:0!important;
  border-radius:20px 20px 16px 16px!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#173b5b!important;
  touch-action:none;
  transform:none!important;
}
.note-face{
  position:absolute;inset:0;
  display:flex;flex-direction:column;align-items:center;justify-content:space-between;
  padding:19px 8px 14px;
  border-radius:inherit;
  background:linear-gradient(150deg,color-mix(in srgb,var(--color) 88%,white),var(--color));
  border:1px solid color-mix(in srgb,var(--color) 72%,#173b5b);
  box-shadow:0 8px 0 color-mix(in srgb,var(--color) 74%,#173b5b),0 13px 18px rgba(23,59,91,.12),inset 0 1px 0 rgba(255,255,255,.7);
  transition:transform .12s ease,box-shadow .12s ease,filter .12s ease;
  overflow:hidden;
}
.note-name{font-size:18px;font-weight:850;line-height:1;color:#173b5b}
.note-number{
  width:28px;height:28px;display:grid;place-items:center;
  border-radius:10px;background:rgba(255,255,255,.66);border:1px solid rgba(23,59,91,.10);
  font-size:11px;font-weight:900;color:#173b5b;
}
.note-shine{position:absolute;width:18px;height:46%;right:8px;top:10px;border-radius:99px;background:linear-gradient(180deg,rgba(255,255,255,.42),transparent);transform:rotate(5deg);pointer-events:none}
.note:hover .note-face{transform:translateY(-3px);filter:saturate(1.04);box-shadow:0 11px 0 color-mix(in srgb,var(--color) 74%,#173b5b),0 16px 22px rgba(23,59,91,.14),inset 0 1px 0 rgba(255,255,255,.75)}
.note.hit .note-face,.note:active .note-face{transform:translateY(7px);box-shadow:0 1px 0 color-mix(in srgb,var(--color) 74%,#173b5b),0 4px 8px rgba(23,59,91,.10),inset 0 2px 5px rgba(23,59,91,.11)}
.note.is-current .note-face{outline:4px solid rgba(255,255,255,.78);outline-offset:-6px;filter:saturate(1.08)}
.note:focus-visible{outline:3px solid var(--bm-color-focus)!important;outline-offset:5px!important}
.music-board-footer{display:flex;justify-content:space-between;gap:18px;margin-top:17px;padding:0 3px;color:#687d78;font-size:10px;font-weight:700}

@media(max-width:760px){
  #game-content.music-content{padding:14px 10px!important;overflow:hidden!important}
  .music-board{width:100%;padding:6px 5px 4px;border-radius:0}
  .music-board-heading{align-items:flex-start;margin-bottom:15px;gap:12px}
  .music-board h2{font-size:24px!important}.music-board-heading p{font-size:10px!important}
  .music-now{min-width:112px;padding:8px 10px;border-radius:13px}.music-now strong{font-size:11px}.music-now span{font-size:7px}
  .notes{grid-template-columns:repeat(4,minmax(58px,1fr));gap:11px!important;padding:14px 12px 12px;border-radius:22px}
  .note{height:112px!important;min-height:112px!important;min-width:58px!important}
  .note-face{padding:15px 7px 11px;border-radius:17px 17px 14px 14px;box-shadow:0 7px 0 color-mix(in srgb,var(--color) 74%,#173b5b),0 10px 14px rgba(23,59,91,.11),inset 0 1px 0 rgba(255,255,255,.7)}
  .note-name{font-size:16px}.note-number{width:27px;height:27px;font-size:10px}
  .music-board-footer{font-size:9px;margin-top:14px}
}
@media(max-width:430px){
  .music-board-heading{display:block}.music-now{margin-top:11px;display:inline-block}
  .notes{grid-template-columns:repeat(4,minmax(52px,1fr));gap:9px!important;padding:13px 9px 11px}
  .note{min-width:52px!important;height:108px!important;min-height:108px!important}
  .music-board-footer{gap:8px;font-size:8px}
}
.reduce-motion .note-face{transition:none!important}
.reduce-motion .note:hover .note-face,.reduce-motion .note.hit .note-face,.reduce-motion .note:active .note-face{transform:none!important}
@media(prefers-reduced-motion:reduce){
  .note-face{transition:none!important}
  .note:hover .note-face,.note.hit .note-face,.note:active .note-face{transform:none!important}
}
/* Music owns enough vertical room to keep the whole instrument visible without an internal scroller. */
.play-shell:has(.music-content) .stage{height:500px!important}
@media(max-width:760px){
  .play-shell:has(.music-content) .stage{height:520px!important}
}

/* Color Baskets — clear object-to-container sorting */
.play-shell:has(.colors-content) .stage{height:520px!important}
#game-content.colors-content{display:grid;place-items:center;padding:24px 28px!important;overflow:hidden!important;z-index:4!important}
.color-game-board{
  width:min(820px,94%);padding:26px 30px 24px;border-radius:32px;color:var(--game-ink);
  border:1px solid rgba(18,102,122,.16);
  background:
    radial-gradient(circle at 8% 12%,rgba(244,134,121,.12) 0 11%,transparent 11.5%),
    radial-gradient(circle at 92% 92%,rgba(243,198,80,.14) 0 12%,transparent 12.5%),
    linear-gradient(145deg,rgba(255,255,255,.96),rgba(251,253,242,.93));
  box-shadow:var(--game-raised);text-align:center;
}
.color-game-heading{max-width:500px;margin:0 auto 15px}.color-kicker{display:block;font-size:9px;letter-spacing:1.8px;font-weight:900;color:#526f69;margin-bottom:7px}
.color-game-heading h2{margin:0!important;font-size:29px!important;color:#173b5b!important}.color-game-heading p{margin:7px 0 0!important;font-size:12px!important;line-height:1.5;color:#536e77!important}
.color-target-zone{display:flex;flex-direction:column;align-items:center;gap:8px;margin:7px auto 20px;min-height:112px}
.color-target-label{font-size:8px;letter-spacing:1.5px;font-weight:900;color:#6a7d78}
.color-object{
  position:relative;width:86px!important;height:86px!important;margin:0!important;border-radius:50%!important;
  background:radial-gradient(circle at 31% 25%,rgba(255,255,255,.86) 0 13%,transparent 14%),linear-gradient(145deg,color-mix(in srgb,var(--color) 36%,#eef1e9),color-mix(in srgb,var(--color) 52%,#e7ece4))!important;
  border:7px solid rgba(255,255,255,.86)!important;
  box-shadow:0 9px 0 color-mix(in srgb,var(--color) 46%,#71858d),0 16px 25px rgba(23,59,91,.12),inset 0 2px 5px rgba(255,255,255,.56)!important;
  z-index:3;transition:transform .55s cubic-bezier(.2,.82,.25,1),opacity .45s ease;
}
.color-object i{position:absolute;inset:12px;border-radius:50%;border:1px solid rgba(255,255,255,.34);pointer-events:none}
.color-object.is-sorting{transform:translate(var(--sort-x),var(--sort-y)) scale(.52);opacity:.16}
.baskets{
  display:grid!important;grid-template-columns:repeat(4,minmax(112px,1fr));gap:16px!important;
  width:min(700px,100%);margin:0 auto!important;align-items:end;
}
.basket{
  position:relative;min-width:112px!important;min-height:116px!important;padding:22px 8px 8px!important;
  border:0!important;background:transparent!important;color:#173b5b!important;border-radius:24px!important;
  transform:none;transition:transform .13s ease,filter .13s ease;
}
.basket-rim{
  position:absolute;left:4px;right:4px;top:13px;height:29px;border-radius:50%;z-index:2;
  background:linear-gradient(180deg,color-mix(in srgb,var(--color) 34%,#f1f2eb),color-mix(in srgb,var(--color) 52%,#e5e9e1));
  border:2px solid color-mix(in srgb,var(--color) 44%,#6f838a);
  box-shadow:inset 0 5px 8px rgba(255,255,255,.45),0 4px 8px rgba(23,59,91,.09);
}
.basket-rim::after{content:"";position:absolute;left:11px;right:11px;top:7px;height:11px;border-radius:50%;background:color-mix(in srgb,var(--color) 42%,#667c83);opacity:.42}
.basket-body{
  position:absolute;left:10px;right:10px;top:28px;bottom:4px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:8px;padding:25px 8px 10px;
  border-radius:12px 12px 28px 28px;
  background:linear-gradient(150deg,color-mix(in srgb,var(--color) 38%,#f0f1ea),color-mix(in srgb,var(--color) 54%,#e4e9e0));
  border:2px solid color-mix(in srgb,var(--color) 44%,#6f838a);
  box-shadow:0 7px 0 color-mix(in srgb,var(--color) 46%,#6f838a),0 12px 18px rgba(23,59,91,.1),inset 0 1px 0 rgba(255,255,255,.76);
}
.basket-body strong{font-size:14px;line-height:1;color:#173b5b;background:rgba(255,255,255,.82);padding:5px 8px;border-radius:999px;box-shadow:inset 0 1px 0 rgba(255,255,255,.9)}.basket-body small{width:28px;height:28px;display:grid;place-items:center;border-radius:10px;background:rgba(255,255,255,.78);font-size:10px;font-weight:900;color:#173b5b}
.basket:hover{transform:translateY(-3px)}.basket:active{transform:translateY(4px)}
.basket.is-correct{filter:saturate(1.02)}.basket.is-correct .basket-body{box-shadow:0 5px 0 color-mix(in srgb,var(--color) 46%,#6f838a),0 0 0 5px rgba(111,183,177,.18),0 11px 17px rgba(23,59,91,.1),inset 0 1px 0 rgba(255,255,255,.76)}
.basket.is-try-again{animation:color-try-again .34s ease}
@keyframes color-try-again{0%,100%{transform:translateX(0)}35%{transform:translateX(-6px)}70%{transform:translateX(5px)}}
.color-feedback{min-height:24px!important;margin:18px 0 0!important;font-size:12px!important;color:#48645d!important}

@media(max-width:760px){
  #game-content.colors-content{padding:14px 10px!important;overflow:hidden!important}
  .play-shell:has(.colors-content) .stage{height:520px!important}
  .color-game-board{width:100%;padding:19px 14px 17px;border-radius:25px}
  .color-game-heading{margin-bottom:10px}.color-game-heading h2{font-size:24px!important}.color-game-heading p{font-size:10px!important}
  .color-target-zone{min-height:94px;margin-bottom:10px;gap:5px}.color-object{width:72px!important;height:72px!important;border-width:6px!important;box-shadow:0 7px 0 color-mix(in srgb,var(--color) 46%,#71858d),0 12px 20px rgba(23,59,91,.11)!important}
  .baskets{grid-template-columns:repeat(2,minmax(118px,1fr));gap:13px!important;width:min(330px,100%)}
  .basket{min-width:118px!important;min-height:104px!important}.basket-body{top:25px}.basket-rim{top:11px}
  .color-feedback{margin-top:13px!important;font-size:10px!important}
}
.reduce-motion .color-object{transition:none!important}.reduce-motion .basket{transition:none!important}.reduce-motion .basket.is-try-again{animation:none!important}
@media(prefers-reduced-motion:reduce){
  .color-object{transition:none!important}.basket{transition:none!important}.basket.is-try-again{animation:none!important}
  .color-object.is-sorting{transform:none!important;opacity:.3}
}

/* Mango Picnic — target-first tactile counting */
#game-content.counting-content{display:grid;place-items:start center;padding:22px 28px!important;overflow:hidden!important;z-index:4!important}
.counting-game-board{
  position:relative;width:min(850px,95%);padding:24px 28px 22px;border-radius:32px;color:var(--game-ink);text-align:center;
  border:1px solid rgba(180,124,41,.18);
  background:
    radial-gradient(circle at 9% 14%,rgba(243,198,80,.16) 0 11%,transparent 11.5%),
    radial-gradient(circle at 91% 88%,rgba(111,183,177,.12) 0 12%,transparent 12.5%),
    linear-gradient(145deg,rgba(255,255,255,.96),rgba(255,249,229,.94));
  box-shadow:var(--game-raised);transition:box-shadow .2s ease,transform .2s ease;
}
.counting-game-heading{max-width:520px;margin:0 auto 8px}.counting-kicker{display:block;font-size:9px;letter-spacing:1.8px;font-weight:900;color:#6c7158;margin-bottom:6px}
.counting-game-heading h2{margin:0!important;font-size:28px!important;color:#173b5b!important}.counting-game-heading p{margin:6px 0 0!important;font-size:11px!important;line-height:1.5;color:#596f70!important}
.counting-target-wrap{display:inline-flex;align-items:center;gap:11px;margin:6px auto 3px;padding:7px 9px 7px 14px;border-radius:999px;background:rgba(255,255,255,.76);border:1px solid rgba(180,124,41,.15);box-shadow:inset 0 1px 0 #fff}
.counting-target-wrap>span{font-size:8px;letter-spacing:1.35px;font-weight:900;color:#6d725f}
.count-target{
  width:48px;height:48px;display:grid;place-items:center;margin:0!important;border-radius:16px;
  background:linear-gradient(145deg,#f7ce62,#e6ad35);border:1px solid #d49a2c;
  color:#173b5b;font:900 27px/1 ui-rounded,'Avenir Next',sans-serif!important;
  box-shadow:0 5px 0 #bf8425,0 9px 14px rgba(92,63,17,.12),inset 0 1px 0 rgba(255,255,255,.68);
}
.counting-content .picnic-tray-scene{margin:2px auto 1px!important;padding:4px 0 10px!important}
.counting-content .picnic-plate{width:min(500px,92%)!important;min-height:170px!important}
.counting-content .mango{min-width:52px;min-height:52px;border-radius:16px!important;transition:transform .12s ease,background .12s ease}
.counting-content .mango:hover{transform:translateY(-3px) rotate(-4deg);background:rgba(255,255,255,.38)}
.counting-content .mango:active{transform:translateY(2px) scale(.96)}
.count-progress{min-height:18px;margin:1px 0 10px;font-size:10px;font-weight:800;color:#5e746d;letter-spacing:.1px}
.counting-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px!important;width:min(520px,100%);margin:0 auto}
.count-control{
  min-height:58px!important;padding:8px 12px!important;border-radius:18px!important;border:1px solid rgba(18,102,122,.16)!important;
  background:linear-gradient(180deg,#fff,#fffaf0)!important;color:#173b5b!important;
  box-shadow:0 5px 0 rgba(23,59,91,.12),0 9px 15px rgba(23,59,91,.08),inset 0 1px 0 #fff!important;
  display:flex;align-items:center;justify-content:center;gap:9px;transition:transform .12s ease,box-shadow .12s ease!important;
}
.count-control>span{font-size:22px;font-weight:900;line-height:1}.count-control small{font-size:8px;letter-spacing:.8px;font-weight:900}
.count-add{background:linear-gradient(180deg,#fff9df,#fff2c9)!important}.count-share{background:linear-gradient(180deg,#e7f6ef,#d8eee7)!important}.count-remove{background:linear-gradient(180deg,#fff,#f7f3ec)!important}
.count-control:hover:not(:disabled){transform:translateY(-2px)}.count-control:active:not(:disabled){transform:translateY(4px);box-shadow:0 1px 0 rgba(23,59,91,.12),inset 0 2px 5px rgba(23,59,91,.09)!important}
.count-control:disabled{opacity:.45!important;box-shadow:none!important}
.counting-feedback{min-height:22px!important;margin:11px 0 0!important;font-size:11px!important;color:#4d675f!important}
.counting-game-board.is-exact{box-shadow:0 18px 42px rgba(23,59,91,.1),0 0 0 5px rgba(111,183,177,.13),inset 0 1px 0 rgba(255,255,255,.92)}
.counting-game-board.is-success{animation:picnic-success .5s cubic-bezier(.2,.8,.2,1)}
@keyframes picnic-success{0%,100%{transform:scale(1)}45%{transform:scale(1.015)}}

@media(max-width:760px){
  #game-content.counting-content{padding:13px 9px!important;overflow:auto!important}
  .play-shell:has(.counting-content) .stage{height:540px!important}
  .counting-game-board{width:100%;padding:18px 12px 16px;border-radius:25px}
  .counting-game-heading h2{font-size:23px!important}.counting-game-heading p{font-size:10px!important}.counting-target-wrap{margin-top:5px}
  .counting-content .picnic-tray-scene{margin-top:0!important}.counting-content .picnic-plate{width:min(350px,94%)!important;min-height:150px!important;border-width:7px!important}
  .counting-actions{grid-template-columns:1fr 1fr;gap:9px!important;width:min(330px,100%)}
  .count-share{grid-column:1/-1}.count-control{min-height:54px!important}.count-control small{font-size:8px}
  .count-progress{margin:0 0 8px}.counting-feedback{margin-top:9px!important;font-size:10px!important}
}
.reduce-motion .count-control,.reduce-motion .counting-content .mango,.reduce-motion .counting-game-board{transition:none!important}.reduce-motion .counting-game-board.is-success{animation:none!important}
@media(prefers-reduced-motion:reduce){
  .count-control,.counting-content .mango,.counting-game-board{transition:none!important}.counting-game-board.is-success{animation:none!important}
}
/* Mango Picnic owns a slightly taller scene so the tray and all controls are visible without internal scrolling. */
.play-shell:has(.counting-content) .stage{height:580px!important}
@media(max-width:760px){.play-shell:has(.counting-content) .stage{height:660px!important}}

/* Find a Friend — branded tactile memory cards */
#game-content.memory-content{display:grid;place-items:center;padding:22px 28px!important;overflow:hidden!important;z-index:4!important}
.memory-game-board{
  width:min(760px,94%);padding:26px 30px 24px;border-radius:32px;color:var(--game-ink);text-align:center;
  border:1px solid rgba(120,105,151,.17);
  background:
    radial-gradient(circle at 8% 14%,rgba(165,152,186,.14) 0 11%,transparent 11.5%),
    radial-gradient(circle at 92% 88%,rgba(111,183,177,.13) 0 12%,transparent 12.5%),
    linear-gradient(145deg,rgba(255,255,255,.97),rgba(246,247,255,.94));
  box-shadow:var(--game-raised);
}
.memory-game-heading{max-width:520px;margin:0 auto 9px}.memory-kicker{display:block;font-size:9px;letter-spacing:1.8px;font-weight:900;color:#66617e;margin-bottom:6px}
.memory-game-heading h2{margin:0!important;font-size:28px!important;color:#173b5b!important}.memory-game-heading p{margin:6px 0 0!important;font-size:11px!important;line-height:1.5;color:#5d6d7b!important}
.memory-progress{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:6px 13px;margin:3px auto 13px;border-radius:999px;background:#eef7f4;border:1px solid rgba(18,102,122,.12);font-size:9px;font-weight:850;color:#49645d}
.memory-grid{display:grid!important;grid-template-columns:repeat(4,minmax(86px,1fr))!important;gap:14px!important;width:min(560px,100%);max-width:none!important;margin:0 auto!important;perspective:1000px}
.memory-card{
  position:relative;height:118px!important;min-width:86px!important;padding:0!important;border:0!important;border-radius:22px!important;background:transparent!important;color:#173b5b!important;font-size:inherit!important;
  perspective:850px;box-shadow:none!important;overflow:visible!important;
}
.memory-card-inner{position:absolute;inset:0;display:block;transform-style:preserve-3d;transition:transform .42s cubic-bezier(.2,.75,.2,1);border-radius:inherit}
.memory-card.revealed .memory-card-inner,.memory-card.matched .memory-card-inner{transform:rotateY(180deg)}
.memory-card-face{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:inherit;backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden}
.memory-card-back{
  background:
    radial-gradient(circle at 25% 20%,rgba(255,255,255,.68) 0 8%,transparent 8.5%),
    linear-gradient(145deg,#d9edf0,#b9dfe0 55%,#acd0dc);
  border:2px solid #8fc4ca;
  box-shadow:0 7px 0 #75aab2,0 12px 18px rgba(23,59,91,.12),inset 0 1px 0 rgba(255,255,255,.82);
}
.memory-card-back::before{content:"";position:absolute;inset:9px;border:1px dashed rgba(23,59,91,.18);border-radius:15px}
.memory-card-mark{position:relative;z-index:1;font-size:24px;font-weight:950;letter-spacing:-2px;color:#173b5b}.memory-card-mark span{color:#d86e61;margin:0 2px}.memory-card-back i{position:relative;z-index:1;margin-top:5px;font-style:normal;font-size:13px;color:#d6a83d}
.memory-card-front{
  transform:rotateY(180deg);
  background:linear-gradient(145deg,#fffdf5,#fff8e9);
  border:2px solid #ead8b9;
  box-shadow:0 7px 0 #d6c098,0 12px 18px rgba(23,59,91,.11),inset 0 1px 0 rgba(255,255,255,.9);
}
.memory-symbol{font-size:48px;line-height:1;filter:drop-shadow(0 4px 4px rgba(23,59,91,.12))}.memory-card-front small{margin-top:9px;font-size:7px;letter-spacing:1.25px;font-weight:900;color:#6b746d}
.memory-card:hover:not(:disabled) .memory-card-inner{transform:translateY(-3px)}
.memory-card.revealed:hover:not(:disabled) .memory-card-inner{transform:translateY(-3px) rotateY(180deg)}
.memory-card:active:not(:disabled) .memory-card-inner{transform:translateY(4px)}
.memory-card.revealed:active:not(:disabled) .memory-card-inner{transform:translateY(4px) rotateY(180deg)}
.memory-card.matched{opacity:1!important}.memory-card.matched .memory-card-front{border-color:#78b5a1;box-shadow:0 5px 0 #649984,0 0 0 5px rgba(111,183,177,.16),0 10px 16px rgba(23,59,91,.10)}
.memory-card:focus-visible{outline:3px solid var(--bm-color-focus)!important;outline-offset:5px!important}
.memory-feedback{min-height:23px!important;margin:14px 0 0!important;font-size:11px!important;color:#50675f!important}
.memory-actions{min-height:0;margin-top:8px}.memory-again{min-height:48px!important;padding:12px 20px!important;border-radius:999px!important;background:#e0f1eb!important;border:1px solid #a8d0c3!important;color:#173b5b!important;font-weight:850!important;box-shadow:0 4px 0 #8bb9aa,0 8px 13px rgba(23,59,91,.08)}

@media(max-width:760px){
  #game-content.memory-content{padding:13px 10px!important;overflow:auto!important}
  .play-shell:has(.memory-content) .stage{height:540px!important}
  .memory-game-board{width:100%;padding:19px 13px 17px;border-radius:25px}
  .memory-game-heading h2{font-size:23px!important}.memory-game-heading p{font-size:10px!important}.memory-progress{margin-bottom:11px}
  .memory-grid{grid-template-columns:repeat(4,minmax(68px,1fr))!important;gap:9px!important;width:min(330px,100%)}
  .memory-card{height:96px!important;min-width:68px!important;border-radius:17px!important}.memory-symbol{font-size:40px}.memory-card-mark{font-size:19px}.memory-card-back::before{inset:7px;border-radius:12px}
  .memory-feedback{margin-top:11px!important;font-size:10px!important}.memory-actions{margin-top:6px}
  /* Four-card starter rounds use a larger 2x2 table; 6/8-card levels retain the compact grid. */
  .memory-grid:has(> .memory-card:nth-child(4):last-child){grid-template-columns:repeat(2,minmax(112px,1fr))!important;width:min(270px,100%);gap:12px!important}
  .memory-grid:has(> .memory-card:nth-child(4):last-child) .memory-card{height:112px!important;min-width:112px!important}
}
.reduce-motion .memory-card-inner{transition:none!important}.reduce-motion .memory-card.revealed .memory-card-inner,.reduce-motion .memory-card.matched .memory-card-inner{transform:none!important}.reduce-motion .memory-card-back{display:none!important}.reduce-motion .memory-card:not(.revealed):not(.matched) .memory-card-back{display:flex!important}.reduce-motion .memory-card:not(.revealed):not(.matched) .memory-card-front{display:none!important}.reduce-motion .memory-card.revealed .memory-card-front,.reduce-motion .memory-card.matched .memory-card-front{transform:none!important}
@media(prefers-reduced-motion:reduce){
  .memory-card-inner{transition:none!important}.memory-card.revealed .memory-card-inner,.memory-card.matched .memory-card-inner{transform:none!important}.memory-card-back{display:none!important}.memory-card:not(.revealed):not(.matched) .memory-card-back{display:flex!important}.memory-card:not(.revealed):not(.matched) .memory-card-front{display:none!important}.memory-card.revealed .memory-card-front,.memory-card.matched .memory-card-front{transform:none!important}
}
.play-shell:has(.memory-content) .stage{height:560px!important}
@media(max-width:760px){.play-shell:has(.memory-content) .stage{height:540px!important}}

/* Discovery Scroll — immersive polish without changing feed behavior */
.play-shell:has(.discovery-content) .stage{height:620px!important}
.play-shell:has(.discovery-content) canvas{opacity:.34;transition:opacity .18s ease}
#game-content.discovery-content{padding:0!important;overflow:hidden!important;text-align:left!important}
.discovery-shell{
  background:linear-gradient(180deg,#f7fbf8,#e8f2ed)!important;
  border-radius:0 0 26px 26px;
  overflow:hidden;
}
.discovery-controls{
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;
  padding:9px 12px!important;
  background:rgba(252,253,248,.94)!important;
  border-bottom:1px solid rgba(23,59,91,.10)!important;
  box-shadow:0 6px 16px rgba(23,59,91,.06)!important;
  backdrop-filter:blur(10px);
}
.discovery-modes{display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:7px!important;min-width:0!important;overflow-x:auto!important;padding:2px 2px 5px!important;scroll-snap-type:x proximity}
.discovery-modes button{scroll-snap-align:start}
.discovery-actions{display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:8px!important;flex:0 0 auto}
.discovery-languages{display:flex!important;flex-wrap:nowrap!important;gap:6px!important}
.discovery-controls .bm-tactile-control{
  min-width:48px!important;min-height:48px!important;padding:9px 14px!important;
  border:1px solid rgba(18,102,122,.22)!important;
  background:linear-gradient(180deg,#fff,#f7fbf8)!important;
  color:#234d5e!important;
  box-shadow:0 4px 0 rgba(18,102,122,.12),0 7px 12px rgba(23,59,91,.06)!important;
}
.discovery-controls .bm-tactile-control:hover{transform:translateY(-1px)!important}
.discovery-controls .bm-tactile-control.active,.discovery-controls .bm-tactile-control.is-selected{
  background:linear-gradient(180deg,#176f83,#125b70)!important;color:#fff!important;border-color:#0f586d!important;
  box-shadow:0 4px 0 #0d485a,0 8px 15px rgba(23,59,91,.13)!important;
}
.discovery-controls [data-discovery-replay]{min-width:122px!important;justify-content:center!important}
.discovery-feed{
  background:#edf5f0!important;
  border-top:1px solid rgba(255,255,255,.8);
}
.discovery-slide{
  padding:50px 28px 44px!important;gap:9px!important;
  border-bottom:1px solid rgba(23,59,91,.05);
}
.discovery-slide:before{width:min(62%,620px)!important;background:rgba(255,255,255,.64)!important;box-shadow:0 24px 58px rgba(23,59,91,.07)!important}
.discovery-slide:after{opacity:.72}
.discovery-type{
  top:20px!important;left:20px!important;padding:7px 12px!important;
  border:1px solid rgba(23,59,91,.13)!important;background:rgba(255,255,255,.84)!important;
  color:#35574e!important;box-shadow:0 4px 12px rgba(23,59,91,.06);
}
.discovery-object-frame{width:clamp(230px,34vw,335px)!important;height:clamp(215px,31vw,305px)!important}
.discovery-object{filter:drop-shadow(0 20px 15px rgba(23,59,91,.15))!important}
.discovery-slide strong{font-size:clamp(31px,4.4vw,47px)!important;color:#244b40!important;max-width:90%!important}
.discovery-subtitle{font-size:clamp(13px,1.8vw,17px)!important;color:#526a61!important}
.discovery-cue{
  right:20px!important;bottom:20px!important;padding:10px 15px!important;
  background:rgba(36,75,64,.92)!important;color:#fffdf3!important;
  border:1px solid rgba(255,255,255,.18);box-shadow:0 7px 0 rgba(25,55,47,.18),0 12px 22px rgba(23,59,91,.12)!important;
}
.discovery-quiz{
  background:
    radial-gradient(circle at 12% 14%,rgba(243,198,80,.14) 0 10%,transparent 10.5%),
    radial-gradient(circle at 88% 86%,rgba(111,183,177,.16) 0 12%,transparent 12.5%),
    linear-gradient(145deg,rgba(255,253,246,.99),rgba(237,247,241,.99))!important;
}
.discovery-quiz:before{inset:6%!important;border:1px solid rgba(23,59,91,.10)!important;border-radius:32px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}
.discovery-quiz-choice{
  border:1px solid rgba(23,59,91,.13)!important;border-radius:24px!important;
  background:linear-gradient(145deg,#fff,#fffaf0)!important;
  box-shadow:0 7px 0 rgba(23,59,91,.09),0 13px 24px rgba(23,59,91,.09)!important;
}
.discovery-quiz-choice.correct{border-color:#75aa82!important;background:linear-gradient(145deg,#f4fbf2,#e4f4df)!important;box-shadow:0 5px 0 #8cb494,0 0 0 5px rgba(117,170,130,.12)!important}
.discovery-quiz-choice.try-again{border-color:#d9a297!important;background:#fff5ef!important;box-shadow:0 4px 0 rgba(183,126,112,.16)!important}

@media(max-width:760px){
  .play-shell:has(.discovery-content) .stage{height:690px!important}
  .discovery-controls{
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:53px 53px!important;
    align-items:center!important;gap:8px!important;padding:9px!important;
  }
  .discovery-modes{width:100%!important;height:53px!important;flex-wrap:nowrap!important;gap:7px!important;padding:2px 1px 5px!important}
  .discovery-actions{width:100%!important;height:53px!important;justify-content:center!important;flex-wrap:nowrap!important;gap:8px!important}
  .discovery-languages{flex:0 0 auto!important}
  .discovery-controls .bm-tactile-control{min-height:48px!important;padding:9px 12px!important;font-size:9.5px!important}
  .discovery-controls [data-discovery-replay]{min-width:118px!important}
  .discovery-slide{padding:45px 14px 42px!important;gap:7px!important}
  .discovery-type{top:14px!important;left:14px!important}
  .discovery-object-frame{width:min(68vw,270px)!important;height:min(58vw,245px)!important}
  .discovery-slide strong{font-size:34px!important;max-width:94%!important}.discovery-subtitle{font-size:13px!important}
  .discovery-cue{right:13px!important;bottom:14px!important;padding:9px 12px!important;font-size:9px!important}
  .discovery-quiz{padding:20px 12px!important}.discovery-quiz:before{inset:4%!important;border-radius:25px!important}
  .discovery-quiz-choices{gap:10px!important}.discovery-quiz-choice{min-height:112px!important;border-radius:19px!important}
}
.reduce-motion .play-shell:has(.discovery-content) canvas{opacity:.22}
@media(prefers-reduced-motion:reduce){.play-shell:has(.discovery-content) canvas{opacity:.22;transition:none!important}}
.play-shell:has(.discovery-quiz) canvas{opacity:.12!important}
.reduce-motion .play-shell:has(.discovery-quiz) canvas{opacity:.08!important}
@media(prefers-reduced-motion:reduce){.play-shell:has(.discovery-quiz) canvas{opacity:.08!important}}


/* Protected exit holds use one visible five-second progress treatment. */
.prompt-exit-hold,.lock-guard-exit-btn{position:relative;overflow:hidden}
.fullscreen-exit-gate{position:absolute!important;top:12px!important;right:14px!important;overflow:hidden}
.prompt-exit-hold .hold-label,.fullscreen-exit-gate .hold-label,.lock-guard-exit-btn .hold-label{position:relative;z-index:2;display:inline-flex;align-items:center;gap:6px}
.prompt-exit-hold .hold-progress,.fullscreen-exit-gate .hold-progress,.lock-guard-exit-btn .hold-progress{position:absolute;inset:0;width:0%;background:rgba(255,211,41,.32);pointer-events:none;z-index:1;transition:width 0s linear}
.prompt-exit-hold.holding .hold-progress,.fullscreen-exit-gate.holding .hold-progress,.lock-guard-exit-btn.holding .hold-progress{width:100%;transition:width var(--hold-duration,5000ms) linear}
