:root {
  --sky: #68d2ef;
  --ink: #18334b;
  --wood: #f5a13a;
  --wood-light: #ffd37a;
  --wood-dark: #cf681d;
  --red: #ff3b2f;
  --blue: #1779d4;
  --green: #43bd32;
  --yellow: #ffbd19;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { font-family: ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif; background: var(--sky); color: var(--ink); user-select: none; }
button { font: inherit; -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 6px solid #fff; outline-offset: 5px; }
[hidden] { display: none !important; }

.game { position: relative; width: 100%; height: 100%; min-width: 1000px; min-height: 650px; overflow: hidden; background: linear-gradient(#61cef0 0 70%, #ffda25 70%); isolation: isolate; }
.sky { position: absolute; inset: 0; overflow: hidden; z-index: -1; }
.cloud { position: absolute; width: 118px; height: 52px; border-radius: 50px; background: #fff; top: 8%; opacity: .96; }
.cloud::before, .cloud::after, .picture-cloud::before, .picture-cloud::after { content: ""; position: absolute; border-radius: 50%; background: inherit; }
.cloud::before { width: 60px; height: 60px; left: 18px; bottom: 10px; }
.cloud::after { width: 72px; height: 72px; right: 10px; bottom: 4px; }
.cloud-one { left: 5%; } .cloud-two { right: 6%; transform: scale(1.15); }
.hill { position: absolute; bottom: 18%; width: 62%; height: 30%; border-radius: 55% 55% 0 0; }
.hill-back { right: -12%; background: #3cab45; } .hill-front { left: -14%; bottom: 15%; background: #5cc637; }
.flower { position: absolute; bottom: 18%; font-size: 64px; color: #ffe42a; text-shadow: 0 5px #e89b13; }
.flower-one { left: 5%; } .flower-two { right: 5%; color: #ff5592; }

.mute { position: absolute; top: 24px; right: 28px; z-index: 30; width: 60px; height: 60px; border: 4px solid rgba(255,255,255,.72); border-radius: 50%; background: rgba(24,51,75,.82); color: #fff; box-shadow: 0 6px 0 rgba(17,44,67,.22); cursor: pointer; }
.mute svg { position: absolute; inset: 13px; width: 30px; fill: currentColor; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.mute .sound-off { display: none; }
.mute[aria-pressed="true"] .sound-on { display: none; } .mute[aria-pressed="true"] .sound-off { display: block; }
.mute:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(17,44,67,.22); }

.level-cue { position: absolute; top: 24px; left: 50%; z-index: 12; display: flex; align-items: center; gap: 24px; transform: translateX(-50%); }
.cue-icon { display: block; width: 74px; height: 74px; background: #fff; border: 5px solid #fff; border-radius: 22px; box-shadow: 0 7px 0 rgba(19,72,102,.2); }
.cue-icon > .target-shape { margin: 10px; width: 44px; height: 44px; }
.cue-dots { display: flex; gap: 11px; padding: 12px 16px; border-radius: 28px; background: rgba(255,255,255,.88); box-shadow: 0 6px 0 rgba(19,72,102,.14); }
.cue-dots i { width: 17px; height: 17px; border-radius: 50%; background: #b9d8e5; }
.cue-dots i.done { background: #47bf38; } .cue-dots i.current { background: #ffb616; transform: scale(1.3); }

.play-stage { position: absolute; inset: 0; }
.shape-tray { position: absolute; top: 120px; left: 50%; display: flex; justify-content: center; align-items: center; gap: clamp(50px, 7vw, 120px); width: 900px; transform: translateX(-50%); z-index: 10; }
.shape-piece, .find-choice { position: relative; width: 152px; height: 152px; flex: 0 0 152px; border: 8px solid #fff; filter: drop-shadow(0 14px 0 rgba(16,80,109,.22)); cursor: grab; touch-action: none; transition: transform 160ms ease-out, opacity 180ms ease-out, filter 160ms ease-out; }
.shape-piece::before, .find-choice::before { content: ""; position: absolute; inset: 11% 12% auto; height: 18%; border-radius: 50%; background: rgba(255,255,255,.18); transform: rotate(-8deg); }
.shape-piece:active { cursor: grabbing; }
.shape-piece.is-dragging { z-index: 50; transform: scale(1.1); filter: drop-shadow(0 20px 0 rgba(16,80,109,.18)); transition: none; }
.shape-piece.is-placed { pointer-events: none; opacity: 0; transform: scale(.3); }
.shape-piece.bounce-back, .find-choice.bounce-back, .picture-object.bounce-back { animation: bounceBack 420ms ease-out; }
.shape-circle { border-radius: 50%; background: var(--red); }
.shape-square { border-radius: 24px; background: var(--blue); }
.shape-triangle { width: 170px; height: 150px; border: 0; background: #fff; clip-path: polygon(50% 0, 100% 100%, 0 100%); filter: drop-shadow(0 14px 0 rgba(16,80,109,.2)); }
.shape-triangle::after { content: ""; position: absolute; inset: 10px; background: var(--green); clip-path: inherit; }
.shape-triangle::before { inset: 23% 34% auto; width: 32%; z-index: 2; }
.shape-rectangle { width: 205px; height: 128px; flex-basis: 205px; border-radius: 25px; background: var(--yellow); }
.rotated { transform: rotate(28deg); }

.sorter { position: absolute; left: 50%; bottom: 45px; width: min(920px, 72vw); height: 455px; transform: translateX(-50%); }
.sorter-face { position: absolute; left: 12%; right: 12%; top: 0; height: 76px; z-index: 5; border: 7px solid var(--wood-dark); border-bottom: 0; border-radius: 46px 46px 0 0; background: var(--wood-light); }
.sorter-face i { position: absolute; top: 27px; width: 13px; height: 20px; border-radius: 50%; background: #78421f; }
.sorter-face i:first-child { left: 45%; } .sorter-face i:last-child { right: 45%; }
.sorter-face b { position: absolute; left: 50%; top: 33px; width: 52px; height: 23px; border: 6px solid #78421f; border-top: 0; border-radius: 0 0 30px 30px; transform: translateX(-50%); }
.holes { position: absolute; inset: 54px 4% 72px; z-index: 4; display: flex; align-items: center; justify-content: center; gap: clamp(32px, 4vw, 68px); padding: 60px 40px 46px; border: 8px solid var(--wood-dark); border-radius: 38px 38px 24px 24px; background: linear-gradient(165deg, #ffd886, #f2a03f); box-shadow: inset 0 -15px rgba(210,101,25,.18); }
.hole { position: relative; width: 158px; height: 158px; flex: 0 0 158px; border: 13px solid; background: #713d1e; box-shadow: inset 0 10px 0 rgba(52,20,9,.25), 0 5px 0 rgba(255,255,255,.25); transition: transform 140ms ease-out, filter 140ms ease-out; }
.hole::after { content: ""; position: absolute; inset: 13%; opacity: 0; background: var(--fill); transition: opacity 180ms ease-out; }
.hole-circle { border-radius: 50%; border-color: var(--yellow); --fill: var(--red); }
.hole-circle::after { border-radius: 50%; }
.hole-square { border-radius: 25px; border-color: var(--blue); --fill: var(--blue); }
.hole-square::after { border-radius: 13px; }
.hole-triangle { border: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); background: #713d1e; outline: 12px solid var(--red); outline-offset: 0; --fill: var(--green); }
.hole-triangle::after { inset: 20%; clip-path: inherit; }
.hole-rectangle { width: 205px; height: 125px; flex-basis: 205px; border-radius: 24px; border-color: #f0a400; --fill: var(--yellow); }
.hole-rectangle::after { border-radius: 12px; }
.hole.is-filled::after { opacity: 1; } .hole.is-filled { animation: holePop 380ms ease-out; }
.hole.is-glowing { animation: glow 850ms ease-in-out infinite alternate; }
.sorter-base { position: absolute; left: 0; right: 0; bottom: 0; height: 110px; z-index: 2; border: 8px solid var(--wood-dark); border-radius: 15px 15px 30px 30px; background: linear-gradient(#ee8529, #f29a38); box-shadow: 0 15px 0 rgba(168,78,23,.32); }
.sorter-base::before, .sorter-base::after { content: ""; position: absolute; bottom: -34px; width: 120px; height: 42px; z-index: -1; border-radius: 0 0 28px 28px; background: #d95c24; }
.sorter-base::before { left: 60px; } .sorter-base::after { right: 60px; }

.demo-hand { position: absolute; top: 235px; left: calc(50% - 315px); z-index: 60; font-size: 92px; color: #ffc98a; filter: drop-shadow(0 6px 0 rgba(126,69,28,.2)); pointer-events: none; opacity: 0; }
.demo-hand.show { animation: handGuide 2.5s ease-in-out 1; }

.find-stage, .picture-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 90px; }
.target-bubble { position: absolute; top: 110px; left: 50%; display: grid; place-items: center; width: 165px; height: 165px; z-index: 5; border: 8px solid #fff; border-radius: 50%; background: rgba(255,255,255,.95); box-shadow: 0 11px 0 rgba(19,72,102,.18); transform: translateX(-50%); }
.target-bubble::after { content: ""; position: absolute; bottom: -28px; width: 0; height: 0; border: 17px solid transparent; border-top-color: #fff; }
.target-shape { display: block; width: 86px; height: 86px; background: var(--green); }
.target-shape.circle { border-radius: 50%; } .target-shape.square { border-radius: 15px; } .target-shape.triangle { clip-path: polygon(50% 0, 100% 100%, 0 100%); } .target-shape.rectangle { width: 108px; height: 68px; border-radius: 14px; }
.speaker-rays { position: absolute; right: -44px; top: 55px; color: #fff; font-size: 25px; letter-spacing: -5px; transform: rotate(-8deg); }
.find-choices { display: flex; align-items: center; justify-content: center; gap: 86px; margin-top: 215px; min-height: 230px; }
.find-choice { border: 0; padding: 0; filter: drop-shadow(0 12px 0 rgba(16,80,109,.2)); }
.find-choice.shape-circle, .find-choice.shape-square, .find-choice.shape-rectangle { border: 8px solid #fff; }
.find-choice.shape-triangle { filter: drop-shadow(0 14px 0 rgba(16,80,109,.2)); }
.find-choice.color-green { background: var(--green); }
.find-choice.correct-pop { animation: correctPop 600ms ease-out; }
.listen-button { position: absolute; right: 12%; bottom: 80px; width: 76px; height: 76px; border: 6px solid #fff; border-radius: 50%; background: #ffb91d; color: #70410e; box-shadow: 0 8px 0 #d47c16; cursor: pointer; }
.listen-button svg { width: 42px; fill: currentColor; stroke: currentColor; stroke-width: 2.3; }

.picture-target { top: 100px; width: 130px; height: 130px; }
.picture-card { position: relative; width: min(820px, 68vw); height: 500px; margin-top: 120px; overflow: hidden; border: 12px solid #fff; border-radius: 45px; background: linear-gradient(#70d7f3 0 62%, #68cb42 62%); box-shadow: 0 15px 0 rgba(19,72,102,.19); }
.picture-card::after { content: ""; position: absolute; left: -5%; right: -5%; bottom: -12%; height: 35%; border-radius: 50%; background: #8cdc44; }
.picture-object { position: absolute; z-index: 6; border: 0; padding: 0; background: transparent; cursor: pointer; }
.sun-object { left: 72px; top: 58px; width: 150px; height: 150px; border-radius: 50%; }
.sun-object::before { content: ""; position: absolute; inset: -24px; background: repeating-conic-gradient(#ffd324 0 10deg, transparent 10deg 28deg); border-radius: 50%; }
.sun-object span { position: absolute; inset: 10px; border: 7px solid #f4aa13; border-radius: 50%; background: #ffe239; }
.house { position: absolute; left: 310px; bottom: 55px; width: 295px; height: 235px; z-index: 3; border: 8px solid #d26a25; border-radius: 12px; background: #ffb44e; }
.house-roof { position: absolute; left: 270px; bottom: 270px; z-index: 4; width: 375px; height: 190px; clip-path: polygon(50% 0,100% 100%,0 100%); background: #f04b35; }
.door { position: absolute; left: 38px; bottom: 0; width: 72px; height: 132px; border-radius: 30px 30px 0 0; background: #8d4c2d; }
.window-object { left: 470px; bottom: 135px; width: 112px; height: 112px; border: 9px solid #186ebc; border-radius: 12px; background: #b9eff8; box-shadow: inset 0 0 0 7px #fff; }
.window-object::before, .window-object::after { content: ""; position: absolute; background: #186ebc; }
.window-object::before { left: 45px; top: 0; bottom: 0; width: 8px; } .window-object::after { top: 45px; left: 0; right: 0; height: 8px; }
.tree { position: absolute; right: 50px; bottom: 55px; z-index: 3; width: 90px; height: 245px; border-radius: 50% 50% 20px 20px; background: #7b4b29; }
.tree i { position: absolute; left: -74px; top: -95px; width: 235px; height: 190px; border-radius: 50%; background: #35ad3a; box-shadow: -45px 30px #35ad3a, 45px 35px #35ad3a; }
.picture-cloud { position: absolute; right: 92px; top: 62px; width: 125px; height: 48px; border-radius: 50px; background: #fff; }
.picture-cloud::before { width: 55px; height: 55px; left: 18px; bottom: 6px; } .picture-cloud::after { width: 64px; height: 64px; right: 15px; bottom: 3px; }
.picture-object.found { animation: pictureFound 650ms ease-out; filter: drop-shadow(0 0 18px #fff); }

.celebration { position: absolute; inset: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(50,190,226,.88); backdrop-filter: blur(5px); }
.celebration-rays { position: absolute; width: 600px; height: 600px; border-radius: 50%; background: repeating-conic-gradient(rgba(255,255,255,.22) 0 12deg, transparent 12deg 28deg); animation: spin 18s linear infinite; }
.happy-star { position: relative; width: 220px; height: 220px; z-index: 3; clip-path: polygon(50% 0,61% 34%,98% 35%,68% 56%,79% 92%,50% 70%,21% 92%,32% 56%,2% 35%,39% 34%); background: #ffdd25; filter: drop-shadow(0 14px 0 #e9a21a); animation: starArrive 650ms cubic-bezier(.2,1.6,.4,1); }
.happy-star i, .happy-star b { position: absolute; z-index: 2; background: #754113; }
.happy-star i { top: 90px; width: 16px; height: 24px; border-radius: 50%; } .happy-star i:first-child { left: 76px; } .happy-star i:last-child { right: 76px; }
.happy-star b { left: 50%; top: 120px; width: 58px; height: 30px; border-radius: 0 0 40px 40px; transform: translateX(-50%); }
.next-button { position: relative; z-index: 5; width: 112px; height: 96px; margin-top: 48px; border: 7px solid #fff; border-radius: 34px; background: #47be37; color: #fff; box-shadow: 0 11px 0 #25842a; cursor: pointer; }
.next-button svg { width: 55px; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.next-button:active { transform: translateY(7px); box-shadow: 0 4px 0 #25842a; }
.celebration-shapes i { position: absolute; width: 36px; height: 36px; background: var(--red); animation: confetti 1.5s ease-out forwards; }
.sparkles { position: absolute; inset: 0; z-index: 70; pointer-events: none; }
.sparkles i { position: absolute; width: 18px; height: 18px; background: #fff36a; clip-path: polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%); animation: sparkle 650ms ease-out forwards; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@keyframes bounceBack { 0%,100% { transform: translateX(0) scale(1); } 25% { transform: translateX(-14px) scale(.96); } 55% { transform: translateX(12px) scale(1.04); } 78% { transform: translateX(-5px); } }
@keyframes holePop { 50% { transform: scale(1.13); filter: brightness(1.25); } }
@keyframes correctPop { 45% { transform: scale(1.24) rotate(-5deg); } }
@keyframes glow { to { transform: scale(1.08); filter: drop-shadow(0 0 18px #fff); } }
@keyframes handGuide { 0%,8% { opacity: 0; transform: translate(0,0) rotate(-20deg); } 18%,35% { opacity: 1; transform: translate(0,0) rotate(-20deg); } 72% { opacity: 1; transform: translate(0,340px) rotate(-8deg); } 86%,100% { opacity: 0; transform: translate(0,340px) rotate(-8deg); } }
@keyframes pictureFound { 45% { transform: scale(1.18); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes starArrive { from { transform: scale(.1) rotate(-35deg); opacity: 0; } }
@keyframes confetti { 0% { transform: translate(0,0) rotate(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate(var(--x), var(--y)) rotate(460deg); opacity: 0; } }
@keyframes sparkle { from { transform: scale(.2) rotate(0); opacity: 1; } to { transform: scale(1.7) rotate(130deg); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
