:root {
  --ink: #30325f;
  --muted: #6d7095;
  --cream: #fffaf0;
  --yellow: #ffc94a;
  --yellow-dark: #e99b16;
  --coral: #ff806e;
  --mint: #72d6b3;
  --blue: #69b8ec;
  --purple: #9b8aed;
  --card: #fff;
  --shadow: 0 10px 28px rgba(72, 65, 113, .13);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; }
body {
  color: var(--ink);
  background: linear-gradient(180deg, #dff5ff 0%, #fff4ce 72%, #ffe8c8 100%);
  font-family: "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; }
.hidden { display: none !important; }
.app-shell { position: relative; z-index: 1; width: min(100%, 600px); min-height: 100dvh; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom)); }
.screen { animation: arrive .35s ease both; }
.screen-center { min-height: calc(100dvh - 50px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.sky-decor { position: fixed; inset: 0; pointer-events: none; overflow: hidden; opacity: .6; }
.cloud { position: absolute; color: white; font-size: 88px; filter: drop-shadow(0 6px 8px rgba(74, 139, 171, .08)); }
.cloud-one { left: -20px; top: 4%; }.cloud-two { right: -28px; top: 25%; transform: scale(.7); }
.loading-star { font-size: 72px; animation: float 1.2s ease-in-out infinite; }
.mascot { font-size: 72px; }

.hero { padding: 26px 8px 18px; text-align: center; }
.hero-badge { display: grid; place-items: center; width: 104px; height: 104px; margin: 0 auto 8px; border: 7px solid rgba(255,255,255,.85); border-radius: 50%; background: var(--yellow); box-shadow: var(--shadow); font-size: 61px; }
.eyebrow { margin: 10px 0 2px; color: #e36b55; font-weight: 900; letter-spacing: .12em; }
h1 { margin: 4px 0; font-size: clamp(30px, 8vw, 45px); line-height: 1.15; letter-spacing: .02em; }
.subtitle { margin: 12px 0; color: var(--muted); font-weight: 700; }

.feature-card { display: flex; align-items: center; gap: 13px; margin: 8px 0 14px; padding: 15px; border: 3px solid rgba(255,255,255,.85); border-radius: 25px; background: rgba(255,255,255,.88); box-shadow: var(--shadow); }
.feature-card-button { width: 100%; color: var(--ink); cursor: pointer; text-align: left; transition: transform .15s, box-shadow .15s; }
.feature-card-button:active { transform: translateY(2px) scale(.99); }
.feature-icon { font-size: 37px; }.feature-card div { flex: 1; }.feature-card strong, .feature-card small { display: block; }.feature-card strong { font-size: 19px; }.feature-card small { margin-top: 4px; color: var(--muted); }.ready-pill { padding: 5px 9px; border-radius: 99px; background: #dff8ed; color: #21805e; font-size: 12px; font-weight: 900; }
.button { width: 100%; min-height: 54px; border: 0; border-radius: 18px; cursor: pointer; font-weight: 900; transition: transform .15s, box-shadow .15s; }
.button:active { transform: translateY(2px) scale(.985); }.button:focus-visible, .answer-card:focus-visible, .audio-button:focus-visible, .icon-button:focus-visible { outline: 4px solid rgba(105,184,236,.55); outline-offset: 3px; }
.button-primary { color: #653d00; background: linear-gradient(180deg, #ffd967, var(--yellow)); box-shadow: 0 7px 0 var(--yellow-dark), 0 13px 24px rgba(197,136,22,.2); }
.button-large { min-height: 64px; font-size: 22px; }.button-secondary { margin-top: 16px; color: var(--ink); background: rgba(255,255,255,.85); box-shadow: var(--shadow); }
.coming-soon { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.mini-card { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 13px 10px; border-radius: 18px; background: rgba(255,255,255,.55); color: var(--muted); }
.mini-card > span { font-size: 24px; filter: grayscale(.35); }.mini-card small { flex: 1; font-weight: 800; text-align: left; }.mini-card b { font-size: 11px; }
.mini-card-button { border: 2px solid rgba(255,255,255,.9); background: rgba(255,255,255,.9); color: var(--ink); box-shadow: 0 5px 14px rgba(72,65,113,.09); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.mini-card-button > span { filter: none; }.mini-card-button b { padding: 3px 6px; border-radius: 99px; background: #dff8ed; color: #21805e; white-space: nowrap; }.mini-card-button:active { transform: translateY(2px) scale(.98); }
.home-progress { min-height: 22px; margin: 18px 0 0; text-align: center; color: var(--muted); font-size: 13px; font-weight: 700; }

.section-topbar { display: flex; padding-top: 4px; }
.math-hero { padding: 4px 8px 20px; text-align: center; }
.math-hero-icon { display: grid; place-items: center; width: 90px; height: 90px; margin: 0 auto 5px; border: 7px solid rgba(255,255,255,.85); border-radius: 50%; background: linear-gradient(145deg,#ffe277,#ffbf48); box-shadow: var(--shadow); font-size: 49px; }
.math-mode-list { display: grid; gap: 20px; }.math-mode-group { display: grid; gap: 12px; }.math-mode-group h2 { margin: 0 5px -2px; color: #646786; font-size: 17px; font-weight: 950; }
.math-mode-card { display: grid; grid-template-columns: 68px 1fr auto; align-items: center; gap: 13px; width: 100%; min-height: 120px; padding: 16px; border: 4px solid rgba(255,255,255,.9); border-radius: 26px; background: rgba(255,255,255,.9); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; text-align: left; transition: transform .16s, box-shadow .16s; }
.math-mode-card:active { transform: translateY(3px) scale(.985); }.math-mode-card:focus-visible, .math-keypad button:focus-visible, .math-audio-button:focus-visible, .mini-card-button:focus-visible, .feature-card-button:focus-visible { outline: 4px solid rgba(105,184,236,.55); outline-offset: 3px; }
.math-mode-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: #fff3c8; font-size: 37px; }.math-mode-group:first-child .math-mode-card:nth-of-type(2) .math-mode-icon { background: #e9e4ff; }.math-mode-group:last-child .math-mode-card:first-of-type .math-mode-icon { background: #e3f8d9; }.math-mode-group:last-child .math-mode-card:nth-of-type(2) .math-mode-icon { background: #dceeff; }
.math-mode-card > span:nth-child(2) { min-width: 0; }.math-mode-card strong, .math-mode-card small, .math-mode-card em { display: block; }.math-mode-card strong { font-size: 22px; }.math-mode-card small { margin-top: 2px; color: var(--muted); font-weight: 800; }.math-mode-card em { margin-top: 7px; color: #a15d23; font-size: 12px; font-style: normal; font-weight: 800; }.math-mode-card > b { font-size: 25px; }

.game-topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.icon-button { flex: 0 0 46px; width: 46px; height: 46px; border: 0; border-radius: 15px; background: rgba(255,255,255,.85); color: var(--ink); box-shadow: 0 5px 15px rgba(72,65,113,.1); cursor: pointer; font-size: 28px; font-weight: 900; }
.progress-wrap { flex: 1; text-align: center; font-weight: 900; }.progress-track { height: 10px; margin-top: 6px; overflow: hidden; border: 2px solid rgba(255,255,255,.75); border-radius: 99px; background: rgba(255,255,255,.55); }.progress-bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mint), #52bce7); transition: width .35s ease; }.live-stars { flex: 0 0 56px; padding: 7px 6px; border: 2px solid rgba(255,255,255,.8); border-radius: 14px; background: rgba(255,255,255,.64); text-align: center; font-size: 17px; font-weight: 900; white-space: nowrap; }.live-stars.pop { animation: counter-pop .48s ease; }
.prompt { margin: 8px 0 10px; text-align: center; font-size: clamp(20px, 5.5vw, 26px); font-weight: 900; }
.audio-button { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 102px; height: 102px; margin: 0 auto 8px; border: 6px solid rgba(255,255,255,.9); border-radius: 50%; background: linear-gradient(145deg, #7fd6ff, #58aee6); color: #fff; box-shadow: 0 8px 0 #398ec5, 0 14px 28px rgba(51,135,189,.25); cursor: pointer; }
.audio-button:active { transform: translateY(4px) scale(.96); box-shadow: 0 4px 0 #398ec5, 0 8px 14px rgba(51,135,189,.18); }.audio-button.playing .speaker { animation: pulse .65s ease infinite; }.speaker { font-size: 42px; line-height: 1; }.audio-button small { margin-top: 4px; font-size: 11px; font-weight: 900; }
.feedback { display: flex; align-items: center; justify-content: center; min-height: 92px; text-align: center; font-weight: 900; }
.feedback.good { color: #168260; }.feedback.try { color: #bd6920; }.feedback.reward, .math-feedback.reward { position: relative; }.feedback.reward::after, .math-feedback.reward::after { content: "✦  ·  ★  ·  ✦"; position: absolute; left: 50%; top: 50%; z-index: -1; width: 210px; color: #f1b827; font-size: 20px; letter-spacing: 13px; pointer-events: none; animation: reward-sparkles .9s ease both; }.feedback .word { display: inline-flex; align-items: baseline; gap: 9px; padding: 6px 15px; border-radius: 99px; background: rgba(255,255,255,.78); }.feedback .word strong { font-size: 25px; }.feedback .word small { color: var(--muted); }
.correct-feedback { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 175px; padding: 5px 22px 7px; border-radius: 22px; background: rgba(255,255,255,.82); box-shadow: 0 5px 16px rgba(72,65,113,.08); animation: feedback-in .5s ease both; }.correct-feedback .correct-title { color: #168260; font-size: 17px; }.correct-feedback strong { margin: 0; color: var(--ink); font-size: clamp(34px, 10vw, 48px); line-height: 1.05; }.correct-feedback small { margin-top: 3px; color: #8588a8; font-size: 14px; font-weight: 700; letter-spacing: .04em; }
.answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.answer-card { position: relative; display: grid; place-items: center; aspect-ratio: 1.17; min-width: 0; overflow: hidden; border: 4px solid rgba(255,255,255,.92); border-radius: 24px; background: var(--card); box-shadow: var(--shadow); cursor: pointer; transition: transform .18s, border-color .18s, opacity .18s; }
.answer-card:not(:disabled):hover { transform: translateY(-3px); }.answer-card:disabled { cursor: default; }.answer-card .emoji { font-size: clamp(76px, 24vw, 112px); line-height: 1; filter: drop-shadow(0 7px 5px rgba(48,50,95,.1)); transform: translateZ(0); }.answer-card img { width: 74%; height: 74%; object-fit: contain; }.answer-card.wrong { animation: shake .35s ease; opacity: .58; }.answer-card.hint { border-color: var(--yellow); animation: glow 1s ease infinite; }.answer-card.correct { z-index: 2; border-color: var(--mint); animation: correct-pop .7s ease both; }.answer-card.correct::after { content: "⭐"; position: absolute; right: 8px; top: 5px; font-size: 27px; animation: star-in .4s ease .12s both; }

.math-game-screen { min-height: calc(100dvh - 42px); display: flex; flex-direction: column; }
.math-topbar { margin-bottom: 7px; }.math-mode-title { margin: 0 0 5px; color: var(--muted); text-align: center; font-size: 16px; font-weight: 900; }
.math-equation { display: flex; align-items: center; justify-content: center; gap: clamp(9px,3.6vw,18px); min-height: 108px; padding: 8px; color: var(--ink); font-size: clamp(42px,13vw,68px); font-weight: 950; line-height: 1; white-space: nowrap; }
.math-equation strong { display: inline-grid; place-items: center; min-width: 1.55em; padding: 5px 9px 9px; border-bottom: 6px solid var(--coral); color: #a85b1c; letter-spacing: .03em; }.math-equation strong.has-input { color: #168260; }.math-equation strong.reward-pop { animation: answer-reward .75s ease both; }.math-equation strong.wrong-shake { color: #bd6920; border-bottom-color: #efae68; animation: answer-wrong .38s ease; }.math-equation strong.revealed-answer { color: #a15d23; border-bottom-color: #efae68; }
.math-audio-button { align-self: center; display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 150px; min-height: 54px; padding: 8px 18px; border: 4px solid rgba(255,255,255,.9); border-radius: 99px; background: linear-gradient(145deg,#7fd6ff,#58aee6); color: #fff; box-shadow: 0 5px 0 #398ec5, 0 9px 18px rgba(51,135,189,.2); cursor: pointer; font-weight: 900; }.math-audio-button span { font-size: 27px; }.math-audio-button small { font-size: 13px; }.math-audio-button:active { transform: translateY(3px); box-shadow: 0 2px 0 #398ec5; }
.math-feedback { display: grid; place-items: center; min-height: 61px; margin: 4px 0; text-align: center; font-size: clamp(18px,5vw,23px); font-weight: 950; }.math-feedback.try { color: #bd6920; }.math-feedback.good { color: #168260; }
.math-keypad { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; width: min(100%,390px); margin: auto auto 0; }
.math-keypad button { min-height: 58px; border: 3px solid rgba(255,255,255,.95); border-radius: 18px; background: rgba(255,255,255,.94); color: var(--ink); box-shadow: 0 5px 0 #d5cfb9, 0 8px 15px rgba(72,65,113,.11); cursor: pointer; font-size: 28px; font-weight: 950; transition: transform .1s, box-shadow .1s; }.math-keypad button:active { transform: translateY(4px) scale(.98); box-shadow: 0 1px 0 #d5cfb9; }.math-keypad .key-action { background: #e9e4ff; }.math-keypad .key-submit { background: #92e1c5; color: #116b51; box-shadow: 0 5px 0 #4fb28f,0 8px 15px rgba(42,140,105,.16); }
.result-mode { margin: 5px 0 -5px; color: var(--muted); font-size: 19px; font-weight: 900; }.compact-secondary { margin-top: 10px; min-height: 48px; }

.module-hero { padding: 4px 8px 18px; text-align: center; }.module-hero-icon { display: grid; place-items: center; width: 88px; height: 88px; margin: 0 auto 5px; border: 7px solid rgba(255,255,255,.85); border-radius: 50%; background: linear-gradient(145deg,#ffe277,#ffbf48); box-shadow: var(--shadow); font-size: 47px; }.module-mode-list { display: grid; gap: 13px; }.compact-hero { padding: 0 8px 14px; text-align: center; }.compact-hero h1 { font-size: 34px; }
.literacy-game-screen, .choice-game-screen, .story-player-screen { min-height: calc(100dvh - 42px); display: flex; flex-direction: column; }.literacy-image-wrap { display: grid; place-items: center; width: min(100%,260px); height: min(35vh,230px); margin: 0 auto 6px; border: 4px solid rgba(255,255,255,.9); border-radius: 26px; background: rgba(255,255,255,.86); box-shadow: var(--shadow); overflow: hidden; }.literacy-image-wrap img { width: 86%; height: 86%; object-fit: contain; }.literacy-image-wrap span { font-size: 110px; }.literacy-feedback, .prd-feedback { min-height: 74px; }.word-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; width: 100%; margin-top: auto; }.word-choice { min-height: 76px; padding: 12px; border: 4px solid rgba(255,255,255,.92); border-radius: 21px; background: rgba(255,255,255,.94); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; font-size: clamp(24px,7vw,34px); font-weight: 950; transition: transform .16s,border-color .16s,opacity .16s; }.word-choice:not(:disabled):active { transform: translateY(3px) scale(.98); }.word-choice.wrong { opacity: .55; animation: shake .35s ease; }.word-choice.hint { border-color: var(--yellow); animation: glow 1s ease infinite; }.word-choice.correct { border-color: var(--mint); animation: correct-pop .7s ease both; }
.city-list { display: grid; gap: 12px; padding-bottom: 18px; }.city-card { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 12px; padding: 15px; border: 3px solid rgba(255,255,255,.9); border-radius: 23px; background: rgba(255,255,255,.88); box-shadow: var(--shadow); }.city-card > span { font-size: 43px; text-align: center; }.city-card h2 { margin: 0; font-size: 21px; }.city-card p { margin: 4px 0 0; color: var(--muted); font-size: 14px; font-weight: 700; line-height: 1.45; }.city-audio-button { min-height: 42px; padding: 7px 10px; border: 0; border-radius: 14px; background: #dceeff; color: var(--ink); cursor: pointer; font-size: 12px; font-weight: 900; }.city-quiz-icon { margin: 12px auto 3px; font-size: 68px; }.choice-question { min-height: 66px; margin: 6px 8px 12px; text-align: center; font-size: clamp(24px,7vw,35px); line-height: 1.3; }.city-choice { font-size: clamp(23px,6vw,31px); }
.story-cover { padding: 22px; border: 4px solid rgba(255,255,255,.9); border-radius: 28px; background: rgba(255,255,255,.88); box-shadow: var(--shadow); text-align: center; }.story-cover > div { font-size: 82px; }.story-cover h2 { margin: 5px 0 10px; font-size: 29px; }.story-cover p { color: var(--muted); font-weight: 700; line-height: 1.55; }.story-cover small { display: block; min-height: 24px; margin: 12px 0; color: #a15d23; font-weight: 800; }.story-illustration { display: grid; place-items: center; min-height: min(31vh,235px); margin: 4px 0 14px; border: 4px solid rgba(255,255,255,.9); border-radius: 28px; background: linear-gradient(145deg,#fff8d9,#e4f5ff); box-shadow: var(--shadow); font-size: clamp(80px,25vw,145px); }.story-dialogue-card { padding: 17px; border: 3px solid rgba(255,255,255,.9); border-radius: 24px; background: rgba(255,255,255,.9); box-shadow: var(--shadow); text-align: center; }.story-character { display: inline-block; margin: 0 0 7px; padding: 4px 12px; border-radius: 99px; background: #fff0bd; color: #9b5920; font-weight: 900; }.story-dialogue { min-height: 58px; margin: 0 0 12px; font-size: clamp(21px,5.8vw,28px); font-weight: 900; line-height: 1.5; }.story-choices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 12px 0 5px; }.story-choice { min-height: 56px; border: 3px solid white; border-radius: 17px; background: #fff; color: var(--ink); box-shadow: 0 4px 12px rgba(72,65,113,.1); cursor: pointer; font-size: 18px; font-weight: 900; }.story-choice.selected { border-color: var(--mint); background: #e0f8ef; }.story-choice-response { min-height: 42px; margin: 5px 4px 8px; color: #168260; text-align: center; font-weight: 900; line-height: 1.4; }.story-player-screen > .button { margin-top: auto; }#story-next-button:disabled { opacity: .48; cursor: default; box-shadow: none; }

.result-mascot { font-size: 78px; animation: float 1.4s ease-in-out infinite; }.result-mascot.celebration-trophy { animation: trophy-celebrate 1.55s ease both; }.result-stars { min-height: 75px; margin: 14px 0; font-size: clamp(48px, 15vw, 72px); letter-spacing: 3px; filter: drop-shadow(0 6px 5px rgba(200,135,15,.2)); }.result-star { display: inline-block; opacity: 0; animation: result-star-pop .78s cubic-bezier(.2,1.5,.45,1) var(--star-delay) both; }.score-card { width: min(100%, 330px); margin: 10px auto 30px; padding: 15px 22px; border: 3px solid white; border-radius: 22px; background: rgba(255,255,255,.82); box-shadow: var(--shadow); }.score-card span, .score-card strong { display: block; }.score-card span { color: var(--muted); font-weight: 800; }.score-card strong { margin-top: 4px; font-size: 32px; }.result-message { min-height: 48px; margin: -17px 8px 22px; color: #9b5920; font-size: 18px; font-weight: 900; line-height: 1.35; }
.celebration-layer { position: fixed; inset: 0; z-index: 9999; overflow: hidden; pointer-events: none; contain: layout paint; isolation: isolate; }.celebration-particle { position: absolute; display: block; color: var(--particle-color); font-size: var(--particle-size); line-height: 1; filter: drop-shadow(0 2px 2px rgba(72,65,113,.12)); will-change: transform, opacity; }.celebration-particle-confetti { width: .72em; height: 1.22em; border-radius: 3px; background: currentColor; }.celebration-particle-petal { width: .88em; height: 1.24em; border-radius: 85% 24% 78% 28%; background: currentColor; }.small-celebration { overflow: visible; contain: none; }.small-celebration .celebration-particle { left: var(--origin-x); top: var(--origin-y); animation: small-celebration-burst var(--particle-duration) cubic-bezier(.15,.72,.28,1) var(--particle-delay) both; }.celebration-ring { position: absolute; left: var(--origin-x); top: var(--origin-y); width: 76px; height: 76px; border: 5px solid rgba(255,201,74,.7); border-radius: 50%; transform: translate(-50%,-50%); animation: celebration-ring 1s ease-out both; }.result-burst-particle { left: var(--result-origin-x); top: var(--result-origin-y); animation: result-confetti-burst var(--particle-duration) cubic-bezier(.16,.72,.25,1) var(--particle-delay) both; }.result-shower-particle { left: var(--particle-left); top: -32px; animation: result-confetti-fall var(--particle-duration) cubic-bezier(.2,.62,.45,1) var(--particle-delay) both; }.result-celebration-1 { opacity: .78; }
.debug-panel { position: relative; z-index: 2; width: min(calc(100% - 24px), 600px); margin: -10px auto 12px; padding: 10px; border-radius: 10px; background: #292b3d; color: #d8f5e9; font: 11px/1.45 ui-monospace, monospace; overflow-wrap: anywhere; }
.debug-section + .debug-section { margin-top: 12px; padding-top: 10px; border-top: 1px solid #4b4e66; }.debug-section h2 { margin: 0 0 5px; color: #ffe38a; font-size: 12px; }.debug-voice { margin-top: 4px; padding: 4px 6px; border-radius: 5px; background: #35384e; }.debug-voice.candidate { border-left: 4px solid #72d6b3; background: #30483f; }

@keyframes arrive { from { opacity: 0; transform: translateY(9px); } }
@keyframes float { 50% { transform: translateY(-8px) rotate(2deg); } }
@keyframes pulse { 50% { transform: scale(1.15); } }
@keyframes counter-pop { 45% { transform: scale(1.28) rotate(-5deg); } }
@keyframes feedback-in { from { opacity: 0; transform: scale(.9) translateY(4px); } 60% { transform: scale(1.035) translateY(-2px); } }
@keyframes shake { 25% { transform: translateX(-7px); } 50% { transform: translateX(7px); } 75% { transform: translateX(-4px); } }
@keyframes glow { 50% { box-shadow: 0 0 0 7px rgba(255,201,74,.3), var(--shadow); } }
@keyframes correct-pop { 45% { transform: scale(1.09) rotate(-2deg); } 75% { transform: scale(.98) rotate(1deg); } }
@keyframes star-in { from { opacity: 0; transform: scale(0) rotate(-90deg); } }
@keyframes reward-sparkles { from { opacity: 0; transform: translate(-50%,-35%) scale(.55); } 45% { opacity: 1; } to { opacity: 0; transform: translate(-50%,-95%) scale(1.08); } }
@keyframes answer-reward { 45% { transform: scale(1.12); color: #168260; text-shadow: 0 0 18px rgba(114,214,179,.55); } }
@keyframes answer-wrong { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
@keyframes small-celebration-burst { from { opacity: 0; transform: translate(-50%,-50%) scale(.35); } 18% { opacity: 1; } 72% { opacity: 1; } to { opacity: 0; transform: translate(calc(-50% + var(--particle-x)),calc(-50% + var(--particle-y))) rotate(var(--particle-rotation)) scale(.9); } }
@keyframes celebration-ring { from { opacity: .95; transform: translate(-50%,-50%) scale(.35); } to { opacity: 0; transform: translate(-50%,-50%) scale(2.5); } }
@keyframes result-confetti-burst { from { opacity: 0; transform: translate(-50%,-50%) scale(.35) rotate(0); } 15% { opacity: 1; } 72% { opacity: 1; } to { opacity: 0; transform: translate(calc(-50% + var(--particle-x)),calc(-50% + var(--particle-y))) rotate(var(--particle-rotation)) scale(.95); } }
@keyframes result-confetti-fall { 0% { opacity: 0; transform: translate3d(0,-20px,0) rotate(0); } 10% { opacity: 1; } 82% { opacity: 1; } 100% { opacity: 0; transform: translate3d(var(--particle-drift),108vh,0) rotate(var(--particle-rotation)); } }
@keyframes result-star-pop { from { opacity: 0; transform: scale(.2) translateY(18px) rotate(-18deg); filter: brightness(.9); } 48% { opacity: 1; transform: scale(1.28) translateY(-7px) rotate(7deg); filter: brightness(1.18) drop-shadow(0 0 10px #ffe16b); } 72% { transform: scale(.94) translateY(1px) rotate(-3deg); } to { opacity: 1; transform: scale(1) translateY(0) rotate(0); filter: brightness(1.05) drop-shadow(0 3px 5px rgba(200,135,15,.22)); } }
@keyframes trophy-celebrate { 0%,100% { transform: translateY(0) scale(1) rotate(0); } 22% { transform: translateY(-15px) scale(1.14) rotate(-7deg); } 42% { transform: translateY(0) scale(.98) rotate(7deg); } 62% { transform: translateY(-8px) scale(1.08) rotate(-5deg); } 80% { transform: translateY(-2px) scale(1.02) rotate(3deg); } }
@keyframes reduced-celebration { 0% { opacity: 0; transform: translate(calc(-50% + var(--particle-x)),calc(-50% + var(--particle-y))) scale(.85); } 25%,75% { opacity: 1; transform: translate(calc(-50% + var(--particle-x)),calc(-50% + var(--particle-y))) scale(1); } 100% { opacity: 0; transform: translate(calc(-50% + var(--particle-x)),calc(-50% + var(--particle-y))) scale(.9); } }
@keyframes reduced-confetti { 0% { opacity: 0; transform: translateY(0) scale(.8); } 20%,75% { opacity: 1; transform: translateY(24px) scale(1); } 100% { opacity: 0; transform: translateY(36px) scale(.9); } }
@keyframes reduced-burst { 0% { opacity: 0; transform: translate(calc(-50% + var(--particle-x)),calc(-50% + var(--particle-y))) scale(.8); } 20%,75% { opacity: 1; transform: translate(calc(-50% + var(--particle-x)),calc(-50% + var(--particle-y))) scale(1); } 100% { opacity: 0; transform: translate(calc(-50% + var(--particle-x)),calc(-50% + var(--particle-y))) scale(.9); } }
@media (max-width: 390px) { .app-shell { padding-left: 13px; padding-right: 13px; }.answers { gap: 10px; }.answer-card { border-radius: 20px; }.coming-soon { gap: 8px; }.mini-card { padding-inline: 8px; }.mini-card small { font-size: 11px; }.math-mode-card { grid-template-columns: 58px 1fr auto; padding: 13px; }.math-mode-icon { width: 55px; height: 55px; font-size: 32px; }.math-equation { gap: 9px; }.city-card { grid-template-columns: 48px 1fr; }.city-card > span { font-size: 37px; }.city-audio-button { grid-column: 1 / -1; }.story-choices { grid-template-columns: 1fr; }.story-choice { min-height: 48px; }.word-choice { min-height: 68px; } }
@media (max-height: 700px) { .app-shell { padding-top: 10px; }.game-topbar { margin-bottom: 7px; }.prompt { margin: 4px 0 7px; }.audio-button { width: 78px; height: 78px; margin-bottom: 4px; }.speaker { font-size: 32px; }.feedback { min-height: 78px; }.correct-feedback { padding-top: 3px; padding-bottom: 4px; }.correct-feedback strong { font-size: 34px; }.answers { gap: 9px; }.answer-card { aspect-ratio: 1.24; }.answer-card .emoji { font-size: clamp(72px, 22vw, 88px); }.math-game-screen { min-height: calc(100dvh - 20px); }.math-mode-title { margin-bottom: 0; font-size: 13px; }.math-equation { min-height: 72px; font-size: clamp(39px,11vw,52px); }.math-audio-button { min-height: 44px; padding-block: 4px; }.math-audio-button span { font-size: 22px; }.math-feedback { min-height: 42px; margin: 1px 0; font-size: 18px; }.math-keypad { gap: 6px; }.math-keypad button { min-height: 48px; border-radius: 15px; font-size: 24px; }.literacy-image-wrap { height: 155px; }.literacy-feedback,.prd-feedback { min-height: 56px; }.word-choice { min-height: 56px; }.story-illustration { min-height: 145px; margin-bottom: 8px; }.story-dialogue-card { padding: 11px; }.story-dialogue { min-height: 44px; margin-bottom: 7px; font-size: 20px; }.story-choice-response { min-height: 32px; margin-block: 3px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }.small-celebration .celebration-particle { animation-name: reduced-celebration !important; animation-duration: 1.15s !important; }.celebration-ring { animation-duration: .65s !important; }.result-burst-particle { animation-name: reduced-burst !important; animation-duration: 1.3s !important; }.result-shower-particle { animation-name: reduced-confetti !important; animation-duration: 1.7s !important; }.result-star { animation-duration: .48s !important; }.result-mascot.celebration-trophy { animation-duration: .65s !important; } }
