/* Shared effects: no player data or reward rules are involved. */
.pop-balloon.popping{animation-delay:0s!important;animation-play-state:running!important}
@keyframes balloon-pop{0%{transform:scale(1)}35%{transform:scale(1.18,.9)}65%{transform:scale(1.28)}100%{transform:scale(.45);opacity:0}}
.balloon-burst{position:absolute;z-index:6;pointer-events:none;color:var(--burst-color)}
.balloon-burst.gold{color:#ffd044}.balloon-burst.sparkle{color:#fff;text-shadow:0 0 3px #8866d4,0 0 9px #76d9ff}
.burst-ring{position:absolute;width:75px;height:75px;border:4px solid currentColor;border-radius:50%;animation:pop-ring .45s ease-out both}
.burst-particle{position:absolute;font-size:18px;animation:pop-particle .65s ease-out both}
.gold .burst-particle,.sparkle .burst-particle{font-size:24px}
.sparkle .burst-particle:nth-child(3n){color:#a1efff}.sparkle .burst-particle:nth-child(3n + 1){color:#ffd1f8}
.balloon-surprise{position:absolute;font-size:clamp(48px,8vw,68px);line-height:1.2;filter:drop-shadow(0 3px 2px #fff);animation:surprise-reveal 2.1s ease-out both}
@keyframes pop-ring{from{transform:translate(-50%,-50%) scale(.4);opacity:.9}to{transform:translate(-50%,-50%) scale(1.8);opacity:0}}
@keyframes pop-particle{from{transform:translate(-50%,-50%) scale(.4);opacity:1}to{transform:translate(var(--dx),var(--dy)) rotate(var(--spin)) scale(.4);opacity:0}}
@keyframes surprise-reveal{0%{transform:translate(-50%,-40%) scale(.2);opacity:0}15%{transform:translate(-50%,-70%) scale(1.2);opacity:1}30%{transform:translate(-50%,-60%) scale(1)}75%{transform:translate(-50%,-85%) rotate(8deg);opacity:1}100%{transform:translate(-50%,-110%) scale(.85);opacity:0}}
.balloon-confetti{position:absolute;inset:0;overflow:hidden;pointer-events:none}.balloon-confetti i{animation-iteration-count:1;animation-fill-mode:both;color:#fff;font-style:normal;font-size:23px}
.balloon-win-card{animation:win-arrive .45s ease-out both}.balloon-win-card h2{animation:win-cheer .65s ease-out 2}.win-balloons{animation:win-cheer 1s ease-in-out 3}#balloon-reward-art{animation:win-arrive .6s ease-out .15s both}
.win-balloons{height:135px}
.target-card{white-space:nowrap}
.target-card{flex-direction:column;gap:3px;padding:7px 15px;border-radius:25px;min-width:145px;bottom:12px}
.target-card>span{font-size:12px}.target-card strong{flex-direction:column;gap:3px;min-width:0;background:none;padding:0;font-size:14px;line-height:1.1}
.target-card i{width:70px;height:70px;flex-shrink:0;border:3px solid #fff;box-shadow:inset -8px -8px #0002,inset 7px 7px #fff6,0 2px 0 #8ea8c4}
.pop-balloon{animation-name:balloon-flight}.pop-balloon.target-rescue{animation-name:target-flight}
@keyframes balloon-flight{from{transform:translateY(0) rotate(-3deg)}to{transform:translateY(calc(-1 * var(--travel))) rotate(4deg)}}
@keyframes target-flight{from{transform:translateY(0) rotate(3deg)}to{transform:translateY(calc(-1 * var(--travel))) rotate(-3deg)}}
.pop-balloon.bonus-bubble{width:82px;height:82px;border-radius:50%;z-index:4;background:radial-gradient(circle at 30% 25%,#fff9,transparent 28%),linear-gradient(135deg,#d5f6ff40,#ffffff15);border:3px solid #f4fdffcc;box-shadow:inset 0 0 13px #bdf4ff88,0 0 5px #fff8}
.pop-balloon.bonus-bubble:before{inset:7px;box-shadow:none;border-radius:50%;background:none;border-top:5px solid #ffffffb0;transform:rotate(-35deg)}
.pop-balloon.bonus-bubble:after{display:none}.pop-balloon.bonus-bubble.gold{border-color:#ffe68c;background:linear-gradient(135deg,#fff0ac55,#ffe19a15);box-shadow:inset 0 0 12px #ffcf6177,0 0 8px #ffe49788}
.pop-balloon.bonus-bubble.sparkle{border-color:#e8d8ff;background:conic-gradient(from 30deg,#ffd1ec55,#aaf4ff55,#fff2b955,#dfbaff55,#ffd1ec55);box-shadow:inset 0 0 12px #fff9,0 0 12px #c4b2ff99}
.bubble-inside{position:absolute;inset:0;display:grid;place-items:center;font-size:38px;pointer-events:none}.bonus-bubble.sparkle:before{border-color:#fff;animation:diamond-twinkle 1.8s ease-in-out infinite}
.book-spread{touch-action:pan-y}.book-binding>#book-prev,.book-binding>#book-next{position:absolute;top:45%;z-index:5;width:48px;height:66px;border:3px solid white;border-radius:22px;background:#ffe07d;color:#7251a1;font-size:32px;box-shadow:0 4px 0 #d7a64f;touch-action:manipulation}
.book-binding>#book-prev{left:-17px}.book-binding>#book-next{right:-17px}.book-navigation{justify-content:center;margin:16px 0 10px}.book-binding{margin:0 12px}.sticker-book #book-sections button{border-radius:18px;font-size:14px;padding:9px 13px}.sticker-book #book-sections{margin-bottom:10px}
.shelf-browser{display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:7px;align-items:stretch}.shelf-rail{position:relative;min-height:225px;border-radius:25px;background:#ded9f6;border:3px solid #fff;touch-action:none}.shelf-rail #shelf-thumb{position:absolute;left:0;width:100%;height:64px;border-radius:22px;background:#9671d8;color:white;font-size:34px;border:3px solid #c9b3ed;box-shadow:0 3px 0 #6850a4;touch-action:none;cursor:grab;padding:0}.shelf-rail #shelf-thumb:disabled{opacity:.45}
#playground .playground-layout{grid-template-columns:280px minmax(0,1fr)}
@media(min-width:601px) and (max-width:1024px){#playground .playground-layout{grid-template-columns:250px minmax(0,1fr)}}
#earned-stickers{min-width:0}.scene-sticker,#sticker-scene{touch-action:none}
.celebration .party-card .eyebrow{font-size:12px}.celebration .confetti i{animation-iteration-count:2;animation-fill-mode:both}.celebration .animal:after{content:'🎈';position:absolute;right:4%;top:0;font-size:48px;animation:win-cheer 1.5s ease-in-out infinite}
.party-floaters{position:absolute;inset:0;pointer-events:none;overflow:hidden}.party-floaters span{position:absolute;bottom:-80px;left:var(--x);font-size:38px;animation:party-rise 5s ease-in both;animation-delay:var(--delay)}
.party-card [hidden]{display:none!important}
[data-party=parade] .dancers{width:100%;justify-content:center;animation:parade 5s ease-in-out infinite}
@keyframes parade{0%,100%{transform:translateX(-8%)}50%{transform:translateX(8%)}}
@media(prefers-reduced-motion:reduce){.pop-balloon.target-rescue{top:18%;left:var(--x);bottom:auto}}
@keyframes party-rise{to{transform:translateY(-110vh) rotate(15deg);opacity:0}}
@media(max-width:760px){.balloon-field .target-card{bottom:72px}}
@media(min-width:761px) and (max-height:850px){.balloon-field .target-card{bottom:72px}}
@media(max-width:600px){#playground .playground-layout{grid-template-columns:1fr}.scene-workspace{position:static;order:0}#playground .sticker-shelf{order:1}.shelf-browser{grid-template-columns:minmax(0,1fr) 52px}#earned-stickers{grid-template-columns:repeat(3,minmax(0,1fr))}.shelf-rail{min-height:185px}.target-card{min-width:135px}.book-binding>#book-prev,.book-binding>#book-next{width:44px;height:60px}.book-binding{margin:0 9px}}

/* Photo controls and a native, touch-scrollable sticker tray. */
.board-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.puzzle-options-button{min-height:44px;padding:7px 12px;border-radius:14px;background:#ffedaf;color:#71552a;border:2px solid white;font-weight:900;touch-action:manipulation}
.board-heading .progress{margin-left:auto}
#parent-gate{z-index:100}#settings{z-index:101}#parent-birth-year{display:block;width:100%;padding:12px;border:2px solid #c8b8e9;border-radius:12px;font-size:22px}
#parent-gate .primary{min-height:52px;margin-top:10px}
.photo-switch{display:flex;align-items:center;gap:12px;padding:13px;border-radius:15px;background:#efe8ff;margin:14px 0!important}
.photo-switch input{width:24px;height:24px;flex:none}
#settings .saved-photo button:disabled{opacity:.45}
#playground .sticker-shelf{overflow:hidden;max-height:none}
#earned-stickers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;overflow-y:auto;overscroll-behavior:contain;max-height:min(65svh,560px);padding:4px;touch-action:pan-y;scrollbar-width:thin;scrollbar-color:#9c78d5 #eee7fa;align-content:start}
.shelf-sticker{touch-action:pan-y;min-height:75px}
.shelf-sticker>span{font-size:12px;min-height:2.3em}
#playground-add-photo{min-height:44px;border-radius:14px;background:#f1e2ff;color:#72519f;font-weight:800;padding:8px 12px}
@media(max-width:760px){#playground .playground-layout{grid-template-columns:220px minmax(0,1fr)}#earned-stickers{grid-template-columns:repeat(3,minmax(0,1fr));max-height:min(60svh,520px)}}
@media(max-width:600px){#playground .playground-layout{grid-template-columns:1fr}#playground .sticker-shelf{order:1}#earned-stickers{grid-template-columns:repeat(4,minmax(0,1fr));max-height:250px}.shelf-sticker{min-height:70px}.scene-workspace{position:static;order:0}}
@keyframes win-arrive{from{transform:translateY(20px) scale(.9);opacity:0}to{transform:none;opacity:1}}
@keyframes win-cheer{50%{transform:translateY(-8px) rotate(-2deg)}}
/* One Legendary treatment used by the book, playground, and both reward screens. */
.sticker.legendary .sticker-art{filter:drop-shadow(0 0 2px white) drop-shadow(-2px 1px 3px #6ddfff) drop-shadow(2px -1px 3px #da8fff)}
.sticker.legendary:before{background-image:radial-gradient(circle,#fff 0 1.5px,transparent 2px),radial-gradient(circle,#b5f6ff 0 1px,transparent 2px);background-size:23px 27px,31px 21px;opacity:.6;animation:legendary-glints 2.3s ease-in-out infinite}
.sticker.legendary:after{background-image:linear-gradient(115deg,transparent 20%,#7beaff55 35%,#ffffffc9 46%,#ef9aff66 56%,#ffeaa955 64%,transparent 76%);animation-duration:2.8s}
.sticker.legendary .sticker-glitter{inset:0;position:absolute;font-size:clamp(13px,2vw,22px);letter-spacing:0;color:#fff;text-shadow:0 0 2px #8d57cc,0 0 5px #b779ef;z-index:3;display:block;animation:none;pointer-events:none}
.sticker.legendary .sticker-glitter:before{content:'✦';position:absolute;left:4%;top:15%;animation:diamond-twinkle 1.8s ease-in-out infinite}
.sticker.legendary .sticker-glitter:after{content:'✧';position:absolute;right:4%;bottom:12%;font-size:1.4em;animation:diamond-twinkle 2.3s ease-in-out .4s infinite}
@keyframes diamond-twinkle{0%,100%{transform:scale(.65) rotate(-10deg);opacity:.55}50%{transform:scale(1.15) rotate(12deg);opacity:1}}
.balloon-sticker.rare:after,.balloon-sticker.legendary:after,.balloon-sticker.legendary:before{mask-image:none;inset:8% 23% 27%;border-radius:50%}
.album-sticker.locked .sticker.legendary:before{animation:none;background:none;mask:none;opacity:1}.album-sticker.locked .sticker.legendary .sticker-glitter{display:none}
.album-sticker.locked .sticker.legendary .sticker-art{filter:brightness(0);opacity:.18}
/* Emoji cut-outs scale with their sticker box, including tiny placed Playground copies. */
.sticker.emoji-sticker{container-type:inline-size}
.sticker.emoji-sticker .sticker-art{background-image:none;display:grid;place-items:center;font-size:68cqw;line-height:1;filter:drop-shadow(0 0 3px white) drop-shadow(0 3px 2px #39574940)}
.sticker.emoji-sticker.rare .sticker-art{filter:sepia(.65) saturate(1.3) brightness(1.02) drop-shadow(0 2px 2px #d49d35)}
.sticker.emoji-sticker.legendary .sticker-art{filter:saturate(1.08) drop-shadow(0 0 2px white) drop-shadow(-3px 1px 5px #59dcff) drop-shadow(3px -1px 6px #bd70fa)}
/* Foil and prismatic glints repeat the sticker silhouette, not a circular bubble. */
.sticker.emoji-sticker.rare:after,.sticker.emoji-sticker.legendary:after{content:attr(data-emoji);inset:0;display:grid;place-items:center;border-radius:0;background:none;mask:none;font:normal 68cqw/1 system-ui;pointer-events:none}
.sticker.emoji-sticker.rare:after{filter:sepia(.8) saturate(1.4) brightness(1.05);mix-blend-mode:screen;opacity:.23;animation:emoji-foil 3s ease-in-out infinite}
.sticker.emoji-sticker.legendary:after{filter:hue-rotate(260deg) saturate(1.2) brightness(1.05);mix-blend-mode:screen;opacity:.32;animation:emoji-galaxy 2.8s ease-in-out infinite}
.sticker.emoji-sticker.legendary:before{mask:none;inset:10%;border-radius:0;background-image:radial-gradient(circle,#fff 0 1px,transparent 2px),radial-gradient(circle,#bceeff 0 1px,transparent 2px),radial-gradient(circle,#ffd3fb 0 1px,transparent 2px);background-size:17px 22px,27px 19px,31px 28px;opacity:.48}
.sticker.emoji-sticker .sticker-glitter{font-size:20cqw}.sticker.emoji-sticker .sticker-glitter:after{font-size:1.2em}
@keyframes emoji-foil{0%,100%{opacity:.04}50%{opacity:.14}}
@keyframes emoji-galaxy{0%,100%{opacity:.04}50%{opacity:.16}}
.album-sticker.locked .sticker.emoji-sticker .sticker-art{filter:brightness(0);opacity:.18}
.album-sticker.locked .sticker.emoji-sticker:after,.album-sticker.locked .sticker.emoji-sticker:before{display:none}
@media(prefers-reduced-motion:reduce){.sticker.emoji-sticker:after{animation:none!important}}
.album-sticker.locked .rarity-tag{background:#e4e5e0;color:#65777b}
@media(prefers-reduced-motion:reduce){.pop-balloon{bottom:auto;top:12%;left:5%}.pop-balloon:nth-child(3n + 2){left:36%}.pop-balloon:nth-child(3n){left:67%}.pop-balloon:nth-child(n + 4){top:40%}.pop-balloon:nth-child(n + 7){top:65%}.pop-balloon.popping{opacity:0}.burst-ring,.burst-particle{display:none}.balloon-surprise{transform:translate(-50%,-50%)}.balloon-confetti{display:none}}

/* Keep nested artwork painted while browsing; do not skip rendering tray tiles. */
.shelf-sticker .sticker{position:relative;overflow:visible}.shelf-sticker .sticker-art{position:absolute;inset:0}
.shelf-sticker.sticker-lifted{border-color:#9570ce;background:#eee1ff}

/* Spacious tablet Playground, with a compact four-across sticker drawer. */
#playground{max-width:1600px;padding:6px 10px 16px}
#playground .playground-heading{margin:0 0 8px;gap:8px}
#playground .playground-heading h1{font-size:26px;margin:0}
#playground .playground-heading .eyebrow{display:none}
#playground .playground-layout{grid-template-columns:240px minmax(0,1fr);gap:10px}
#playground .sticker-shelf{padding:10px 6px;border-radius:18px}
#playground .sticker-shelf h2{font-size:19px;margin:0 4px 5px}
#playground #shelf-help{font-size:12px;line-height:1.3;margin:5px 4px 8px}
#playground #earned-stickers{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;max-height:calc(100dvh - 270px)}
#playground .shelf-sticker{padding:2px;min-height:58px;border-radius:12px}
#playground .shelf-sticker>span{font-size:10px;line-height:1.15;padding:2px 0}
#playground #sticker-scene{aspect-ratio:auto;height:clamp(340px,calc(100dvh - 230px),850px);border-width:4px;border-radius:20px}
#playground .scene-switcher{margin:8px 0;gap:7px}
#playground .scene-switcher select{padding:8px 12px;min-height:44px}
#playground .scene-tools{gap:5px}
#playground .scene-tools button{padding:8px 10px}
#playground-status{margin:7px 0;font-size:12px}
.scene-sticker.active:before{content:'';position:absolute;inset:-14px;border-radius:20px}
.scene-sticker{will-change:width;transition:none}
@media(min-width:601px) and (max-width:1100px){#playground .playground-layout{grid-template-columns:224px minmax(0,1fr)}#playground .playground-heading h1{font-size:23px}}
@media(max-width:600px){#playground .playground-layout{grid-template-columns:1fr}#playground .sticker-shelf{order:1}#playground .scene-workspace{order:0;position:static}#playground #sticker-scene{height:clamp(300px,55dvh,560px)}#playground #earned-stickers{grid-template-columns:repeat(4,minmax(0,1fr));max-height:270px}#playground .shelf-sticker>span{font-size:12px}}

#playground #back-puzzles{display:none}
