:root {
  --cream: #fffaf0;
  --paper: #fffef9;
  --ink: #2f3c36;
  --muted: #77827b;
  --coral: #f27d66;
  --coral-dark: #d85e4d;
  --mint: #91cbb0;
  --yellow: #f5c95c;
  --blue: #77b7d4;
  --lavender: #aca1db;
  --line: rgba(62, 77, 68, .12);
  --shadow: 0 15px 38px rgba(68, 84, 75, .11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  background: #e8eadf;
  font-family: "Noto Sans SC", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; touch-action: manipulation; }
button:focus-visible { outline: 4px solid rgba(73, 126, 173, .35); outline-offset: 3px; }

.app-shell {
  width: min(100%, 1440px);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--cream);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(61, 69, 61, .14);
}

.topbar {
  height: 84px;
  padding: 0 clamp(22px, 5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
  background: rgba(255, 250, 240, .92);
  border-bottom: 1px solid rgba(67, 76, 69, .06);
}
.brand { border: 0; background: transparent; display: flex; align-items: center; gap: 11px; cursor: pointer; padding: 4px; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px 14px 14px 4px; display: grid; place-items: center; background: var(--coral); color: white; font-size: 22px; font-weight: 800; transform: rotate(-3deg); }
.brand > span:last-child { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.brand b { font-size: 19px; letter-spacing: 2px; }
.brand small { color: #9a8d7e; font: 600 8px/1.5 "Fredoka"; letter-spacing: 2.2px; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.star-pill { height: 42px; padding: 0 17px; border-radius: 30px; background: white; border: 1px solid var(--line); display: flex; align-items: center; gap: 7px; box-shadow: 0 4px 14px rgba(76, 80, 72, .06); }
.star-pill span, .game-score { color: #e9ad25; }
.round-button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: white; cursor: pointer; font-size: 17px; }
.speech-controls { display: inline-flex; align-items: center; gap: 8px; }
.voice-toggle,
.voice-action { width: 36px; height: 36px; font-size: 15px; }
.voice-toggle { display: inline-grid; place-items: center; }
.voice-toggle[data-on='false'] { opacity: .55; filter: grayscale(1); }


.page { display: none; min-height: calc(100vh - 84px); padding-bottom: 110px; }
.page.active { display: block; animation: pageIn .35s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } }

.hero {
  min-height: 460px;
  padding: 64px clamp(24px, 7.5vw, 110px);
  position: relative;
  display: flex;
  align-items: center;
  background-image: linear-gradient(90deg, rgba(255,255,251,.98) 0%, rgba(255,255,251,.86) 40%, rgba(255,255,251,.08) 73%), url("assets/word-garden.png");
  background-position: center;
  background-size: cover;
}
.hero:after { content:""; position:absolute; inset:auto 0 0; height:48px; background:linear-gradient(transparent,var(--cream)); }
.hero-copy { position: relative; z-index: 2; max-width: 600px; }
.eyebrow { color: #b27c55; font-size: 14px; font-weight: 700; margin-bottom: 18px; letter-spacing: .5px; }
.eyebrow span { display:inline-grid; place-items:center; width:28px; height:28px; margin-right:7px; background:#ffedb3; border-radius:50%; color:#e2a52c; }
.hero h1 { font-size: clamp(38px, 4.2vw, 64px); line-height: 1.18; letter-spacing: -2px; margin: 0 0 18px; font-weight: 800; }
.hero h1 em { color: var(--coral); font-style: normal; position:relative; }
.hero h1 em:after { content:""; position:absolute; left:3px; right:2px; bottom:-7px; height:7px; background: radial-gradient(ellipse, #f6b199 0 48%, transparent 52%) 0 0/22px 7px repeat-x; opacity:.55; }
.hero p { font-size: 16px; color: var(--muted); margin: 0 0 28px; }
.primary-button, .dark-button { border:0; color:white; cursor:pointer; font-weight:800; box-shadow: 0 8px 0 rgba(159, 67, 55, .16), 0 14px 24px rgba(183, 83, 66, .17); transition:.18s ease; }
.primary-button { background: var(--coral); border-radius: 18px; padding: 16px 24px; }
.primary-button span { margin-right: 7px; }
.primary-button:hover { transform:translateY(-2px); background:var(--coral-dark); }
.primary-button:active, .dark-button:active { transform: translateY(4px); box-shadow:none; }
.hero-friend { position:absolute; z-index:2; right:12%; bottom:62px; width:260px; height:245px; }
.bunny { position:absolute; right:20px; bottom:0; width:166px; height:156px; border-radius:50% 50% 42% 42%; background:#fbf8e9; border:5px solid #fff; box-shadow: 0 18px 30px rgba(76,96,84,.18); display:grid; place-items:center; color:#5b645e; font-size:24px; }
.ear { position:absolute; width:43px; height:92px; border-radius:50% 50% 30% 30%; background:#fbf8e9; top:-61px; border:5px solid #fff; z-index:-1; }
.ear:after { content:""; position:absolute; inset:12px; border-radius:inherit; background:#f4c8bb; }
.ear.left { left:21px; transform:rotate(-12deg); }.ear.right { right:22px; transform:rotate(13deg); }
.face { margin-top:4px; }
.book { position:absolute; bottom:-12px; width:118px; height:58px; border-radius:8px 8px 15px 15px; display:grid; place-items:center; background:#e87e66; color:white; font:700 19px "Fredoka"; box-shadow: inset 0 -6px rgba(150,63,51,.1); }
.speech { position:absolute; top:0; left:0; padding:12px 17px; background:white; border-radius:18px 18px 3px 18px; font-size:13px; font-weight:700; box-shadow:var(--shadow); transform:rotate(-4deg); }
.spark { position:absolute; color:#f3bd46; }.s1{right:2px;top:30px}.s2{left:25px;top:72px;font-size:11px}

.section-heading { max-width:1210px; margin: 28px auto 20px; padding:0 28px; display:flex; align-items:end; justify-content:space-between; }
.mini-label { color:#bd8b67; font:700 10px/1.4 "Fredoka"; letter-spacing:2px; }
.section-heading h2, .page-title h1 { margin:5px 0 0; font-size:29px; }
.text-button { border:0; background:transparent; color:#8d7b6c; font-size:13px; font-weight:700; cursor:pointer; }
.text-button span{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#fff;border:1px solid var(--line);margin-left:5px;}

.world-grid { max-width:1210px; padding:0 28px; margin:0 auto 28px; display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.world-card { min-height:178px; position:relative; overflow:hidden; border:0; border-radius:26px; padding:25px 22px; display:flex; align-items:center; gap:18px; text-align:left; cursor:pointer; transition:.23s ease; box-shadow: inset 0 0 0 1px rgba(255,255,255,.38); }
.world-card:hover { transform:translateY(-5px) rotate(-.4deg); box-shadow:var(--shadow); }
.world-card.numbers { background:#fce4ca; }.world-card.letters{background:#d9eee4}.world-card.words{background:#e6e2f4}
.world-icon { flex:0 0 108px; height:108px; position:relative; display:block; }
.world-icon b,.world-icon i,.world-icon strong { position:absolute; display:grid; place-items:center; font-family:"Fredoka","Noto Sans SC"; font-style:normal; box-shadow:0 7px 12px rgba(91,78,62,.1); }
.world-icon b{width:65px;height:70px;left:4px;top:4px;background:#fffaf1;border-radius:17px;transform:rotate(-8deg);font-size:37px;color:#e57e5e}.world-icon i{width:51px;height:58px;right:2px;top:14px;background:#fff;border-radius:14px;transform:rotate(9deg);font-size:28px;color:#72ad92}.world-icon strong{width:61px;height:48px;left:32px;bottom:1px;background:#f3bb55;border-radius:13px;transform:rotate(4deg);font-size:22px;color:white}
.letters .world-icon b{color:#59a68a}.letters .world-icon i{color:#ed806c}.letters .world-icon strong{background:#77b6d2}.words .world-icon b{color:#7c6fb0}.words .world-icon i{font-size:29px;color:#eeb33e}.words .world-icon strong{font-size:15px;background:#9b8cca}
.world-copy { display:flex; flex-direction:column; gap:3px; }.world-copy small{font:700 9px "Fredoka";letter-spacing:1.5px;color:rgba(69,79,73,.48)}.world-copy b{font-size:22px}.world-copy em{font-size:12px;color:#7d827c;font-style:normal}.world-arrow{position:absolute;right:19px;bottom:17px;width:31px;height:31px;display:grid;place-items:center;border-radius:50%;background:rgba(255,255,255,.62);}

.daily-card { max-width:1154px; margin: 0 auto 20px; padding:22px 28px; border-radius:25px; background:#fff; border:1px solid var(--line); box-shadow:0 12px 28px rgba(78,87,78,.07); display:grid; grid-template-columns:82px 1fr 165px auto; gap:24px; align-items:center; }
.daily-visual {width:75px;height:75px;border-radius:50%;background:#fff2c8;display:grid;place-items:center;font-size:39px;position:relative}.daily-visual i{position:absolute;color:#e6b03f;font-size:11px}.daily-visual i:nth-child(2){top:8px;right:5px}.daily-visual i:nth-child(3){bottom:8px;left:5px}
.daily-copy small{color:#a69079;font-size:11px}.daily-copy h2{font-size:21px;margin:2px 0}.daily-copy p{color:var(--muted);font-size:13px;margin:0}.daily-progress>span{font-size:12px;color:#8a8d87}.daily-progress>span b{font-size:22px;color:var(--coral)}.daily-progress>div{height:7px;border-radius:8px;background:#f1ede5;margin-top:6px;overflow:hidden}.daily-progress i{display:block;width:0;height:100%;background:var(--coral);border-radius:inherit;transition:.4s}.dark-button{background:#40534a;border-radius:16px;padding:14px 22px;box-shadow:0 7px 0 rgba(49,65,57,.16)}
.grownup-note { max-width:1154px; margin:0 auto; padding:14px 22px; display:flex;align-items:center;gap:12px;color:#8e867a;background:rgba(255,255,255,.48);border-radius:16px;font-size:12px}.grownup-note span{width:29px;height:29px;display:grid;place-items:center;border-radius:50%;background:#f8d8d0;color:var(--coral)}.grownup-note p{margin:0}.grownup-note b{color:#6e716d;margin-right:6px}

.page-title { max-width:1154px;margin:0 auto;padding:48px 28px 26px;display:flex;justify-content:space-between;align-items:end}.page-title h1{font-size:38px}.page-title p{margin:8px 0 0;color:var(--muted)}.leaf-doodle{font-size:65px;filter:saturate(.7);transform:rotate(8deg)}
.category-tabs { max-width:1154px;margin:0 auto 22px;padding:7px;background:#f1ecdf;border-radius:20px;display:flex;gap:5px}.tab{flex:1;border:0;background:transparent;border-radius:15px;padding:12px;cursor:pointer;font-weight:800;color:#8b887f;transition:.2s}.tab span{font-family:"Fredoka";margin-right:6px}.tab.active{background:white;color:var(--ink);box-shadow:0 5px 15px rgba(74,78,69,.08)}
.learning-intro{max-width:1154px;margin:0 auto 17px;padding:0 7px;display:flex;align-items:center;justify-content:space-between;color:#85877e;font-size:13px}.learning-intro b{color:var(--coral)}
.card-grid { max-width:1154px;margin:0 auto;padding:0 8px;display:grid;grid-template-columns:repeat(5,1fr);gap:15px}.learn-card{min-height:185px;border:1px solid rgba(74,84,76,.1);background:var(--paper);border-radius:23px;padding:18px 12px;cursor:pointer;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:0 8px 20px rgba(79,87,77,.06);transition:.2s;overflow:hidden}.learn-card:before{content:"";position:absolute;width:70px;height:70px;border-radius:50%;right:-25px;top:-24px;background:var(--card-tint,#f5dccf);opacity:.55}.learn-card:hover{transform:translateY(-4px) rotate(1deg);border-color:var(--coral)}.learn-card .emoji{font-size:33px;margin-bottom:5px}.learn-card .main{font:700 49px/1.05 "Fredoka","Noto Sans SC"}.learn-card .sub{color:#898c86;font-size:13px;margin-top:8px}.learn-card .sound-dot{position:absolute;right:11px;bottom:11px;width:27px;height:27px;border-radius:50%;display:grid;place-items:center;background:#f4efe4;font-size:12px}.learn-card.word .main{font-family:"Noto Sans SC"}.learn-card.word .sub{font:600 14px "Fredoka"}

.game-wrap{min-height:calc(100vh - 84px);padding:28px;background:linear-gradient(150deg,#ddefe5,#fff1d2 54%,#eadff2)}.game-topline{max-width:880px;margin:0 auto 20px;display:flex;justify-content:space-between;align-items:center}.back-button{border:0;background:rgba(255,255,255,.72);padding:10px 15px;border-radius:14px;cursor:pointer;font-weight:700}.rounds{display:flex;gap:8px}.rounds i{width:10px;height:10px;border-radius:50%;background:rgba(57,75,66,.15)}.rounds i.done{background:#f1b946}.rounds i.current{width:25px;border-radius:10px;background:var(--coral)}.game-score{background:white;border-radius:20px;padding:8px 14px}.game-card{max-width:880px;margin:0 auto;background:rgba(255,254,249,.92);border:1px solid white;border-radius:35px;padding:35px 50px 40px;text-align:center;box-shadow:0 24px 50px rgba(68,77,69,.13);position:relative}.bee{font-size:51px;position:absolute;left:55px;top:28px;transform:rotate(-9deg)}.game-card h1{font-size:30px;margin:7px 0 20px}.listen-button{margin:0 auto 28px;border:0;border-radius:22px;background:#ffe8a9;min-width:245px;padding:13px 22px;display:grid;grid-template-columns:46px 1fr;grid-template-rows:auto auto;text-align:left;cursor:pointer;color:#654f2b;box-shadow:0 7px 0 #edcf7a}.listen-button:active{transform:translateY(4px);box-shadow:0 3px 0 #edcf7a}.listen-button span{grid-row:1/3;width:38px;height:38px;display:grid;place-items:center;border-radius:50%;background:white;font-size:19px}.listen-button b{font-size:15px}.listen-button i{font-style:normal;font-size:10px;opacity:.65}.answer-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:17px}.answer{min-height:175px;border:3px solid transparent;background:white;border-radius:24px;cursor:pointer;box-shadow:0 9px 22px rgba(72,83,75,.09);display:flex;flex-direction:column;align-items:center;justify-content:center;transition:.18s}.answer:hover{transform:translateY(-4px)}.answer .emoji{font-size:38px}.answer .main{font:700 44px "Fredoka","Noto Sans SC"}.answer .sub{color:#8b8f89;font-size:12px}.answer.correct{border-color:#71b99a;background:#effaf4;animation:pop .35s}.answer.wrong{border-color:#ee8c78;background:#fff2ee;animation:shake .3s}.answer:disabled{cursor:default}.feedback{min-height:24px;color:#81867f;font-weight:700;font-size:14px}.feedback.good{color:#4d9b78}.feedback.try{color:#d26654}.next-button{display:none;margin:0 auto}.next-button.show{display:inline-block}
@keyframes pop{50%{transform:scale(1.07)}}@keyframes shake{25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}

.bottom-nav { position:fixed; z-index:15; left:50%; bottom:18px; transform:translateX(-50%); display:flex; padding:7px; gap:4px; background:rgba(255,254,249,.94); border:1px solid rgba(68,77,71,.1); border-radius:22px; box-shadow:0 15px 35px rgba(57,67,60,.16); backdrop-filter:blur(12px); }
.bottom-nav button{width:88px;border:0;background:transparent;border-radius:16px;padding:8px 13px;display:flex;align-items:center;justify-content:center;gap:7px;cursor:pointer;color:#8b8d87}.bottom-nav span{font-size:17px}.bottom-nav b{font-size:12px}.bottom-nav button.active{background:#f4eade;color:var(--coral-dark)}

dialog{border:0;border-radius:32px;padding:36px;width:min(420px,calc(100% - 34px));text-align:center;color:var(--ink);box-shadow:0 30px 80px rgba(48,59,52,.25);background:#fffdf7}dialog::backdrop{background:rgba(51,62,56,.38);backdrop-filter:blur(5px)}.dialog-close{position:absolute;right:16px;top:15px;width:34px;height:34px;border-radius:50%;border:0;background:#f3eee4;font-size:21px;cursor:pointer}.dialog-art{width:125px;height:125px;border-radius:50%;margin:2px auto 18px;background:#f9e9cd;display:grid;place-items:center;font-size:65px}.dialog-art .symbol{font:700 72px "Fredoka","Noto Sans SC"}.dialog-art .counting{font-size:25px;letter-spacing:2px}.dialog-art+small{font:700 10px "Fredoka";letter-spacing:2px;color:#ae9075}dialog h2{font:800 55px/1.1 "Fredoka","Noto Sans SC";margin:5px}dialog p{color:#858a83;margin:0 0 21px}.listen-word{border:0;background:#40534a;color:white;padding:13px 25px;border-radius:16px;font-weight:700;cursor:pointer}
.celebration{position:fixed;inset:0;pointer-events:none;z-index:50;overflow:hidden}.confetti{position:absolute;top:-20px;width:11px;height:18px;border-radius:3px;animation:fall 1.25s ease-in forwards}@keyframes fall{to{transform:translateY(105vh) rotate(720deg)}}

@media(max-width:900px){.hero{min-height:500px;background-image:linear-gradient(90deg,rgba(255,255,251,.96),rgba(255,255,251,.58)),url("assets/word-garden.png")}.hero-friend{right:4%;transform:scale(.84);transform-origin:bottom right}.hero-copy{max-width:530px}.world-grid{grid-template-columns:1fr}.world-card{min-height:145px}.daily-card{grid-template-columns:75px 1fr auto}.daily-progress{display:none}.card-grid{grid-template-columns:repeat(4,1fr)}.game-card{padding:35px 30px}.bee{position:static;margin-bottom:5px}}
@media(max-width:620px){.topbar{height:68px;padding:0 16px}.brand-mark{width:37px;height:37px}.brand b{font-size:16px}.star-pill{padding:0 12px}.speech-controls{gap:6px}.speech-controls .voice-toggle,.speech-controls .voice-action{width:32px;height:32px;font-size:14px}.top-actions{gap:8px}.hero{min-height:600px;padding:42px 22px 190px;align-items:flex-start;background-position:60% center}.hero h1{font-size:39px}.hero p{font-size:14px;max-width:330px}.hero-friend{bottom:22px;right:7%;transform:scale(.72)}.section-heading{margin-top:20px}.section-heading,.world-grid{padding-left:17px;padding-right:17px}.world-card{padding:18px}.world-icon{flex-basis:95px;transform:scale(.9)}.daily-card{margin:0 17px 18px;padding:18px;grid-template-columns:64px 1fr}.daily-visual{width:62px;height:62px;font-size:33px}.daily-copy p{display:none}.daily-card .dark-button{grid-column:1/3;width:100%}.grownup-note{margin:0 17px;align-items:flex-start}.page-title{padding:34px 20px 20px}.page-title h1{font-size:31px}.leaf-doodle{font-size:45px}.category-tabs{margin:0 17px 18px}.tab{font-size:12px;padding:10px 4px}.tab span{display:block;margin:0}.learning-intro{padding:0 23px}.card-grid{padding:0 17px;grid-template-columns:repeat(2,1fr);gap:12px}.learn-card{min-height:165px}.game-wrap{padding:16px 12px}.game-topline{margin-bottom:12px}.game-card{padding:28px 14px 30px;border-radius:27px}.game-card h1{font-size:24px}.answer-grid{gap:8px}.answer{min-height:150px;border-radius:18px}.answer .main{font-size:37px}.answer .emoji{font-size:31px}.answer .sub{font-size:10px}.bottom-nav{bottom:10px}.bottom-nav button{width:77px}.bottom-nav button b{font-size:11px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition:none!important}}

/* Version 2: practice modes, smart review and growth report */
.play-title { padding-bottom: 32px; }
.mode-grid { max-width:1154px; margin:0 auto 24px; padding:0 8px; display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.mode-card { position:relative; min-height:330px; padding:30px; border:0; border-radius:30px; text-align:left; cursor:pointer; overflow:hidden; transition:.22s ease; box-shadow:0 12px 28px rgba(61,76,67,.08); }
.mode-card:hover { transform:translateY(-6px) rotate(-.4deg); box-shadow:var(--shadow); }
.mode-card:after { content:""; position:absolute; width:180px; height:180px; border-radius:50%; right:-56px; top:-65px; background:rgba(255,255,255,.35); }
.listen-mode { background:#fff0c9; }.trace-mode { background:#dcefe7; }.match-mode { background:#e8e3f5; }
.mode-art { width:92px; height:92px; margin-bottom:20px; border-radius:28px; display:grid; place-items:center; background:rgba(255,255,255,.72); font-size:48px; transform:rotate(-4deg); box-shadow:0 9px 18px rgba(72,82,73,.09); }
.mode-card small,.review-callout small,.report-card>small { color:#9a816d; font:700 10px "Fredoka"; letter-spacing:1.6px; }
.mode-card h2 { margin:6px 0 8px; font-size:25px; }.mode-card p { color:#747f78; font-size:14px; line-height:1.7; margin:0 0 24px; }.mode-card em { position:absolute; left:30px; bottom:25px; font-style:normal; font-size:13px; font-weight:800; }
.review-callout { max-width:1138px; margin:0 auto; padding:21px 27px; border-radius:24px; display:flex; align-items:center; gap:18px; background:#40534a; color:white; box-shadow:0 13px 30px rgba(48,68,58,.14); }
.review-callout>span { width:65px; height:65px; border-radius:50%; display:grid; place-items:center; background:#eef7e9; font-size:34px; }.review-callout>div { flex:1; display:flex; flex-direction:column; }.review-callout small { color:#c4ddca; }.review-callout b { font-size:20px; }.review-callout p { color:#ccd8d1; font-size:12px; margin:2px 0 0; }.review-callout button { border:0; border-radius:15px; padding:13px 21px; background:#fff2c9; color:#4c584f; font-weight:800; cursor:pointer; }

.activity-wrap { min-height:calc(100vh - 84px); padding:28px; }.trace-bg { background:linear-gradient(145deg,#d9eee5,#fff2d3 60%,#f4dfda); }.match-bg { background:linear-gradient(145deg,#e8e2f5,#fff1d0 55%,#dcefe8); }
.activity-topline { max-width:900px; margin:0 auto 18px; display:grid; grid-template-columns:auto 1fr auto; gap:22px; align-items:center; }.activity-progress { height:9px; border-radius:10px; background:rgba(255,255,255,.62); overflow:hidden; }.activity-progress i { display:block; height:100%; width:0; background:var(--coral); border-radius:inherit; transition:.35s; }
.activity-card { max-width:900px; margin:0 auto; padding:34px 50px 40px; background:rgba(255,254,249,.94); border:1px solid white; border-radius:35px; box-shadow:0 24px 50px rgba(68,77,69,.13); text-align:center; }.activity-card h1 { margin:7px 0 5px; font-size:30px; }.activity-tip { margin:0 0 22px; color:var(--muted); font-size:13px; }
.trace-stage { width:min(100%,520px); height:360px; margin:0 auto 19px; position:relative; border-radius:28px; overflow:hidden; background:repeating-linear-gradient(0deg,transparent 0 44px,rgba(99,131,116,.07) 45px),repeating-linear-gradient(90deg,#fffefa 0 44px,rgba(99,131,116,.07) 45px); border:2px dashed rgba(106,147,128,.3); touch-action:none; }
.trace-stage:before,.trace-stage:after { content:""; position:absolute; z-index:0; pointer-events:none; opacity:.25; }.trace-stage:before { left:50%; top:0; bottom:0; border-left:1px dashed #83a494; }.trace-stage:after { top:50%; left:0; right:0; border-top:1px dashed #83a494; }
.trace-guide { position:absolute; inset:0; display:grid; place-items:center; color:rgba(242,125,102,.18); -webkit-text-stroke:4px rgba(242,125,102,.22); font:800 260px/1 "Fredoka","Noto Sans SC"; user-select:none; }.trace-guide:after { content:attr(data-copy); position:absolute; color:transparent; -webkit-text-stroke:3px rgba(84,113,99,.35); -webkit-text-fill-color:transparent; }
#traceCanvas { position:absolute; inset:0; width:100%; height:100%; z-index:2; cursor:crosshair; touch-action:none; }.trace-actions { display:flex; justify-content:center; gap:14px; }.soft-button { border:0; border-radius:17px; padding:15px 22px; background:#f0ece3; color:#6f7771; font-weight:800; cursor:pointer; }

.match-board { max-width:680px; margin:24px auto 20px; display:grid; grid-template-columns:1fr 50px 1fr; gap:13px; align-items:stretch; }.match-column { display:flex; flex-direction:column; gap:12px; }.match-path { display:grid; place-items:center; color:#d5bfc7; font-size:32px; line-height:2.8; }
.match-tile { min-height:95px; border:3px solid transparent; border-radius:22px; display:flex; align-items:center; justify-content:center; gap:11px; background:white; box-shadow:0 8px 20px rgba(65,78,69,.08); cursor:pointer; transition:.18s; touch-action:none; user-select:none; }.match-tile.word-tile { font:800 34px "Fredoka","Noto Sans SC"; }.match-tile.picture-tile { font-size:42px; }.match-tile small { color:#868b85; font:600 12px "Fredoka"; }.match-tile.selected { border-color:#f0b74d; background:#fff8dd; transform:scale(1.03); }.match-tile.matched { border-color:#78b89b; background:#effaf4; opacity:.62; pointer-events:none; }.match-tile.nope { animation:shake .3s; border-color:#e88773; }.match-tile.dragging { position:relative; z-index:5; transform:scale(1.05) rotate(-2deg); box-shadow:0 16px 28px rgba(72,83,75,.2); }.next-match { display:none; margin:10px auto 0; }.next-match.show { display:inline-block; }

.growth-hero { max-width:1154px; margin:0 auto; padding:48px 28px 25px; display:flex; justify-content:space-between; align-items:end; }.growth-hero h1 { font-size:40px; margin:6px 0; }.growth-hero p { margin:0; color:var(--muted); }.garden-level { width:80px; height:80px; border-radius:50%; display:flex; flex-direction:column; align-items:center; justify-content:center; background:#fff0bd; border:5px solid #fff9df; color:#9e7522; box-shadow:0 7px 18px rgba(105,91,62,.12); }.garden-level span { font:700 9px "Fredoka"; letter-spacing:1px; }.garden-level b { font:700 31px "Fredoka"; }
.garden-scene { max-width:1154px; min-height:295px; margin:0 auto 22px; padding:35px 38px; border-radius:34px; position:relative; overflow:hidden; display:grid; grid-template-columns:repeat(6,1fr); align-items:end; gap:15px; background:linear-gradient(#cfeaf2 0 58%,#cde5a9 59% 77%,#9dcc86 78%); box-shadow:inset 0 0 0 1px rgba(255,255,255,.45),0 14px 35px rgba(67,83,71,.1); }.garden-scene:before { content:"☁️　　　☁️　　　　　　　　☁️"; position:absolute; top:24px; left:5%; right:2%; font-size:36px; opacity:.8; }.garden-plant { position:relative; z-index:2; min-height:115px; display:flex; flex-direction:column; align-items:center; justify-content:end; filter:grayscale(.9); opacity:.28; transition:.5s; }.garden-plant.grown { filter:none; opacity:1; animation:growIn .45s ease both; }.garden-plant b { font-size:48px; line-height:1; }.garden-plant i { width:8px; height:38px; background:#5f9d68; border-radius:8px; position:relative; }.garden-plant i:after { content:""; position:absolute; width:20px; height:11px; left:4px; top:14px; border-radius:100% 0 100% 0; background:#79b877; transform:rotate(-15deg); }.garden-plant small { margin-top:4px; padding:3px 8px; border-radius:9px; background:rgba(255,255,255,.7); color:#5f7766; }.garden-plant.seed b { font-size:25px; }
@keyframes growIn { from { transform:scale(.35) translateY(20px); } }
.report-grid { max-width:1154px; margin:0 auto; display:grid; grid-template-columns:.85fr 1.35fr; gap:18px; }.report-card { padding:27px; border-radius:27px; background:white; border:1px solid var(--line); box-shadow:0 11px 27px rgba(68,79,71,.07); }.report-card h2 { margin:5px 0 20px; font-size:23px; }.metric-row { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }.metric-row>div { border-radius:18px; padding:14px 8px; text-align:center; background:#f7f1e7; }.metric-row b { display:block; font:700 30px "Fredoka"; color:var(--coral); }.metric-row span { color:#7e847e; font-size:11px; }.skill-row { display:grid; grid-template-columns:95px 1fr 42px; align-items:center; gap:10px; margin:13px 0; font-size:12px; }.skill-row>div { height:9px; background:#f0ede5; border-radius:10px; overflow:hidden; }.skill-row i { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--mint),#5eae8c); transition:.5s; }.skill-row b { font:700 12px "Fredoka"; text-align:right; }.parent-card>p { margin:18px 0 0; padding:12px 15px; background:#fff6da; border-radius:14px; color:#7b6b50; font-size:12px; }

@media(max-width:900px){.mode-grid{grid-template-columns:1fr}.mode-card{min-height:240px;padding-left:145px}.mode-art{position:absolute;left:30px;top:35px}.report-grid{grid-template-columns:1fr}.garden-scene{grid-template-columns:repeat(4,1fr)} }
@media(max-width:620px){.mode-grid{padding:0 17px}.mode-card{min-height:250px;padding:27px}.mode-art{position:static;width:72px;height:72px;font-size:38px}.review-callout{margin:0 17px;padding:18px}.review-callout>span{display:none}.review-callout button{padding:11px 14px}.activity-wrap{padding:14px 10px}.activity-topline{grid-template-columns:auto 1fr auto;gap:9px}.activity-card{padding:26px 13px 30px;border-radius:27px}.activity-card h1{font-size:24px}.trace-stage{height:330px}.trace-guide{font-size:225px}.match-board{grid-template-columns:1fr 24px 1fr;gap:5px}.match-path{font-size:18px}.match-tile{min-height:90px;border-radius:18px;flex-direction:column;gap:1px}.match-tile.word-tile{font-size:29px}.match-tile.picture-tile{font-size:36px}.growth-hero{padding:34px 18px 22px}.growth-hero h1{font-size:31px}.growth-hero p{font-size:13px}.garden-scene{margin:0 16px 18px;padding:26px 12px;min-height:330px;grid-template-columns:repeat(3,1fr)}.garden-plant:nth-child(n+10){display:none}.report-grid{margin:0 16px}.report-card{padding:22px 17px}.metric-row b{font-size:25px}.bottom-nav button{width:65px;padding:8px 5px}.bottom-nav{gap:1px}.bottom-nav button span{font-size:15px}}

/* Version 3: story adventure and graded learning route */
.story-teaser { max-width:1154px; width:calc(100% - 56px); min-height:112px; margin:0 auto 22px; padding:18px 24px; border:0; border-radius:25px; display:grid; grid-template-columns:76px 1fr 150px auto; gap:20px; align-items:center; text-align:left; cursor:pointer; color:white; background:linear-gradient(110deg,#5c796b,#3e554a); box-shadow:0 13px 29px rgba(46,69,57,.16); transition:.2s; }
.story-teaser:hover { transform:translateY(-3px); }.story-teaser-art { width:72px; height:72px; display:grid; place-items:center; border-radius:22px; background:#fff4cf; font-size:39px; transform:rotate(-3deg); }.story-teaser-copy { display:flex; flex-direction:column; }.story-teaser-copy small { color:#bad8c7; font:700 9px "Fredoka"; letter-spacing:1.7px; }.story-teaser-copy b { font-size:22px; }.story-teaser-copy em { color:#cfddd6; font-size:12px; font-style:normal; }.story-teaser-progress { height:7px; border-radius:8px; background:rgba(255,255,255,.18); overflow:hidden; }.story-teaser-progress i { display:block; height:100%; width:0; border-radius:inherit; background:#f5c95c; transition:.4s; }.story-teaser-arrow { padding:11px 15px; border-radius:13px; background:#fff2c7; color:#4b5b52; font-weight:800; font-size:13px; }
.story-feature { max-width:1138px; width:calc(100% - 16px); min-height:190px; margin:0 auto 20px; padding:0; border:0; border-radius:30px; overflow:hidden; display:grid; grid-template-columns:38% 1fr 90px; align-items:center; text-align:left; background:#fff; box-shadow:0 12px 28px rgba(61,76,67,.09); cursor:pointer; transition:.22s; }.story-feature:hover { transform:translateY(-4px); box-shadow:var(--shadow); }.story-feature-scene { align-self:stretch; background:linear-gradient(90deg,transparent 65%,white),url("assets/story-counting-forest.png") center/cover; }.story-feature-copy { padding:24px 26px; display:flex; flex-direction:column; }.story-feature-copy small { color:#a27b61; font:700 9px "Fredoka"; letter-spacing:1.7px; }.story-feature-copy b { font-size:27px; }.story-feature-copy p { margin:5px 0 13px; color:var(--muted); font-size:13px; }.story-feature-copy em { color:var(--coral-dark); font-style:normal; font-size:12px; font-weight:800; }.story-feature-badge { width:62px; height:62px; display:grid; place-items:center; border-radius:50%; background:#fff2c7; font-size:31px; }

.story-map-head { max-width:1154px; margin:0 auto; padding:38px 28px 28px; display:grid; grid-template-columns:auto 1fr auto; gap:24px; align-items:center; }.story-map-head h1 { margin:5px 0 3px; font-size:37px; }.story-map-head p { margin:0; color:var(--muted); }.map-badges { width:86px; height:86px; border-radius:50%; display:flex; flex-direction:column; align-items:center; justify-content:center; background:#fff0bd; color:#957022; border:5px solid #fff8de; box-shadow:0 8px 20px rgba(91,79,53,.1); }.map-badges b { font:700 29px "Fredoka"; }.map-badges span { font-size:10px; }
.story-route { max-width:1050px; margin:0 auto; padding:4px 26px 20px; position:relative; display:flex; flex-direction:column; gap:24px; }.route-line { position:absolute; left:50%; top:38px; bottom:55px; width:7px; border-radius:10px; background:#e8e1d3; transform:translateX(-50%); overflow:hidden; }.route-line i { display:block; width:100%; height:0; background:linear-gradient(var(--coral),#f1bd4f); transition:.5s; }
.chapter-card { width:74%; min-height:180px; padding:18px 22px; position:relative; z-index:2; display:grid; grid-template-columns:48px 170px 1fr auto; gap:18px; align-items:center; border:1px solid rgba(69,83,74,.1); border-radius:28px; background:#fff; text-align:left; cursor:pointer; box-shadow:0 12px 28px rgba(64,76,68,.08); transition:.22s; }.chapter-card:nth-of-type(even) { align-self:flex-end; }.chapter-card:hover:not(.locked) { transform:translateY(-4px); box-shadow:var(--shadow); }.chapter-card.locked { opacity:.58; filter:grayscale(.7); cursor:not-allowed; }.chapter-card.complete { box-shadow:0 0 0 3px rgba(117,183,152,.25),0 12px 28px rgba(64,76,68,.08); }.chapter-number { width:44px; height:44px; display:grid; place-items:center; border-radius:15px; background:#f4ecdf; color:#a68265; font:700 15px "Fredoka"; }.chapter-thumb { height:135px; border-radius:21px; background-position:center; background-size:cover; }.chapter-one .chapter-thumb { background-image:url("assets/story-counting-forest.png"); }.chapter-two .chapter-thumb { background-image:url("assets/story-moon-home.png"); }.chapter-three .chapter-thumb { background-image:url("assets/story-animal-party.png"); }.chapter-four .chapter-thumb { background-image:url("assets/story-rainbow-bay.webp"); }.chapter-five .chapter-thumb { background-image:url("assets/story-rainy-town.webp"); }.chapter-six .chapter-thumb { background-image:url("assets/story-kite-meadow.webp"); }.chapter-copy { display:flex; flex-direction:column; }.chapter-copy small { color:#af8a6c; font-size:10px; }.chapter-copy b { margin:3px 0; font-size:24px; }.chapter-copy em { color:var(--muted); font-size:12px; font-style:normal; }.chapter-state { min-width:105px; padding:10px 12px; border-radius:13px; background:#f4eee4; color:#726f68; font-size:11px; font-weight:800; text-align:center; }.chapter-card.complete .chapter-state { background:#e0f2e9; color:#4c8b6f; }.story-parent-note { max-width:1000px; margin:0 auto; padding:15px 20px 110px; color:#8c857a; text-align:center; font-size:12px; }

.story-play-wrap { min-height:calc(100vh - 84px); padding:22px 28px 100px; background:linear-gradient(145deg,#e0efe8,#fff1d2 55%,#e9e3f4); }.story-play-top { max-width:1100px; margin:0 auto 14px; display:grid; grid-template-columns:auto 1fr auto; gap:22px; align-items:center; }.story-dots { display:flex; justify-content:center; gap:8px; }.story-dots i { width:11px; height:11px; border-radius:50%; background:rgba(71,88,78,.18); }.story-dots i.done { background:#76b89a; }.story-dots i.current { width:28px; border-radius:10px; background:var(--coral); }.story-mini-score { padding:8px 14px; border-radius:18px; background:white; color:#e6aa28; font-weight:800; }
.story-scene { max-width:1100px; height:min(70vw,650px); min-height:520px; margin:0 auto; border-radius:35px; position:relative; overflow:hidden; background-position:center; background-size:cover; box-shadow:0 25px 55px rgba(53,72,61,.2); }.story-shade { position:absolute; inset:0; pointer-events:none; background:linear-gradient(180deg,rgba(27,48,38,.08),transparent 38%,rgba(30,46,37,.12)); }.narrator-bubble { position:absolute; z-index:5; left:24px; right:24px; top:22px; min-height:100px; padding:14px 18px; display:grid; grid-template-columns:66px 1fr 45px; gap:14px; align-items:center; border-radius:24px; background:rgba(255,254,248,.94); box-shadow:0 12px 28px rgba(46,61,52,.18); backdrop-filter:blur(8px); }.narrator-bubble>span { width:62px; height:62px; border-radius:20px; display:grid; place-items:center; background:#fff0bd; font-size:37px; }.narrator-bubble div { display:flex; flex-direction:column; }.narrator-bubble small { color:#b18162; font:700 9px "Fredoka"; letter-spacing:1.4px; }.narrator-bubble b { font-size:21px; }.narrator-bubble p { margin:1px 0 0; color:var(--muted); font-size:12px; }.narrator-bubble button { width:42px; height:42px; border:0; border-radius:50%; background:#f2ece1; cursor:pointer; }
.hotspot-layer { position:absolute; inset:130px 0 0; z-index:3; }.story-hotspot { position:absolute; width:72px; height:72px; margin:-36px 0 0 -36px; border:4px solid rgba(255,255,255,.95); border-radius:50%; display:grid; place-items:center; background:rgba(242,125,102,.88); color:white; font:800 24px "Fredoka","Noto Sans SC"; box-shadow:0 7px 0 rgba(131,66,53,.2),0 9px 22px rgba(34,54,43,.22); cursor:pointer; animation:hotspotPulse 1.7s ease-in-out infinite; transition:.2s; }.story-hotspot:hover { transform:scale(1.09); }.story-hotspot.found { background:#70b292; pointer-events:none; animation:none; transform:scale(.65); opacity:.8; }.story-hotspot.wrong { background:#dc725f; animation:shake .3s; }.story-hotspot .lower { font-size:14px; margin-left:2px; }.story-hotspot .phonics { position:absolute; left:50%; top:57px; transform:translateX(-50%); white-space:nowrap; padding:3px 8px; border-radius:10px; background:rgba(255,255,255,.94); color:#5f6f66; font-size:9px; }.story-found { position:absolute; z-index:4; left:24px; bottom:21px; min-width:130px; padding:10px 15px; border-radius:16px; background:rgba(255,254,248,.92); color:#587064; font-size:12px; font-weight:800; backdrop-filter:blur(6px); }.story-found:empty { display:none; }
@keyframes hotspotPulse { 50% { box-shadow:0 7px 0 rgba(131,66,53,.2),0 0 0 10px rgba(255,255,255,.28),0 9px 22px rgba(34,54,43,.22); } }
.story-complete { position:absolute; z-index:8; inset:0; display:none; flex-direction:column; align-items:center; justify-content:center; padding:30px; text-align:center; background:rgba(255,252,241,.94); backdrop-filter:blur(10px); }.story-complete.show { display:flex; animation:pageIn .35s ease both; }.complete-badge { width:112px; height:112px; display:grid; place-items:center; border-radius:50%; background:#fff0b8; border:8px solid #fff8dd; font-size:61px; box-shadow:0 15px 32px rgba(79,72,50,.15); }.story-complete small { margin-top:18px; color:#b18461; font:700 10px "Fredoka"; letter-spacing:2px; }.story-complete h2 { margin:5px 0; font-size:35px; }.story-complete p { margin:0 0 22px; color:var(--muted); }.story-kind-note { margin:13px auto 0; color:#7e857f; text-align:center; font-size:12px; }

.learn-card.learned { box-shadow:0 0 0 2px rgba(116,183,152,.18),0 8px 20px rgba(79,87,77,.06); }.learn-card.learned .sound-dot { background:#dff1e7; color:#4b9876; }
.lower-letter { margin-left:5px; font-size:.52em; color:#9c7d68; vertical-align:middle; }.answer .lower-letter { font-size:.48em; }

@media(max-width:900px){.story-feature{grid-template-columns:35% 1fr 70px}.chapter-card{width:88%;grid-template-columns:46px 145px 1fr}.chapter-state{grid-column:3;justify-self:start}.story-scene{height:680px}}
@media(max-width:620px){.story-teaser{width:calc(100% - 34px);grid-template-columns:58px 1fr auto;padding:16px;gap:12px}.story-teaser-art{width:55px;height:55px;font-size:30px}.story-teaser-copy b{font-size:18px}.story-teaser-copy em,.story-teaser-progress{display:none}.story-teaser-arrow{padding:9px;font-size:0}.story-teaser-arrow:after{content:"→";font-size:16px}.story-feature{width:calc(100% - 34px);min-height:260px;grid-template-columns:1fr;margin-bottom:17px}.story-feature-scene{height:120px;background-image:linear-gradient(0deg,white,transparent 45%),url("assets/story-counting-forest.png")}.story-feature-copy{padding:14px 20px 20px}.story-feature-badge{display:none}.story-map-head{padding:25px 17px 19px;grid-template-columns:1fr auto}.story-map-head>.back-button{grid-column:1/3;justify-self:start}.story-map-head h1{font-size:29px}.map-badges{width:68px;height:68px}.story-route{padding:3px 17px 16px;gap:17px}.route-line{left:34px;transform:none}.chapter-card,.chapter-card:nth-of-type(even){width:100%;align-self:stretch;grid-template-columns:40px 92px 1fr;padding:13px;gap:10px;border-radius:22px}.chapter-thumb{height:102px}.chapter-copy b{font-size:19px}.chapter-copy em{display:none}.chapter-state{grid-column:3;padding:7px;min-width:auto}.story-play-wrap{padding:12px 8px 85px}.story-play-top{gap:8px}.story-play-top .back-button{font-size:11px;padding:9px}.story-scene{height:690px;min-height:690px;border-radius:25px}.narrator-bubble{left:12px;right:12px;top:12px;padding:11px;grid-template-columns:48px 1fr 39px}.narrator-bubble>span{width:46px;height:46px;border-radius:15px;font-size:28px}.narrator-bubble b{font-size:16px}.narrator-bubble p{font-size:10px}.hotspot-layer{inset:105px 0 0}.story-hotspot{width:58px;height:58px;margin:-29px 0 0 -29px;font-size:20px}.story-hotspot .phonics{top:47px}.story-found{left:12px;bottom:12px}.story-complete h2{font-size:28px}}

/* Keep story instructions outside the artwork so the full illustration stays visible. */
body.story-playing .bottom-nav,
body:has(#storyPlayPage.active) .bottom-nav { display:none; }
.narrator-bubble { position:relative; left:auto; right:auto; top:auto; width:100%; max-width:1100px; min-height:88px; margin:0 auto 14px; padding:12px 18px; grid-template-columns:58px 1fr 42px; border:1px solid rgba(72,87,77,.08); }
.narrator-bubble>span { width:54px; height:54px; font-size:32px; }
.story-scene { width:100%; height:auto; min-height:0; aspect-ratio:3/2; background-position:center; }
.hotspot-layer { inset:0; }
.hotspot-guides { position:absolute; z-index:0; inset:0; width:100%; height:100%; overflow:visible; pointer-events:none; }
.hotspot-guides line { stroke:rgba(255,255,255,.96); stroke-width:3; stroke-linecap:round; vector-effect:non-scaling-stroke; filter:drop-shadow(0 2px 2px rgba(42,61,50,.42)); }
.hotspot-guides .mobile-guide { display:none; }
.hotspot-guides circle { fill:#fff; stroke:rgba(70,94,80,.38); stroke-width:1.5; vector-effect:non-scaling-stroke; filter:drop-shadow(0 1px 2px rgba(42,61,50,.3)); }
.story-hotspot { z-index:1; width:58px; height:58px; margin:-29px 0 0 -29px; border-width:3px; font-size:20px; background:rgba(242,125,102,.88); }
.story-found { position:relative; left:auto; bottom:auto; width:max-content; min-width:130px; margin:10px auto 0; text-align:center; background:rgba(255,254,248,.96); box-shadow:0 7px 18px rgba(53,72,61,.09); }
.story-hotspot .phonics { top:49px; }
.chapter-two .chapter-thumb { background-size: contain; background-repeat: no-repeat; background-color: #ecf6f0; }
@media(max-width:620px){.narrator-bubble{position:relative;left:auto;right:auto;top:auto;width:100%;margin:0 auto 10px;padding:10px;grid-template-columns:45px 1fr 38px}.narrator-bubble>span{width:43px;height:43px;font-size:26px}.story-scene{height:auto;min-height:0;aspect-ratio:3/2;border-radius:22px}.story-scene:has(.story-complete.show){height:520px;aspect-ratio:auto}.hotspot-layer{inset:0}.story-hotspot{left:var(--mobile-x)!important;top:var(--mobile-y)!important;width:44px;height:44px;margin:-22px 0 0 -22px;border-width:2px;font-size:16px;box-shadow:0 4px 0 rgba(131,66,53,.2),0 5px 12px rgba(34,54,43,.2)}.story-hotspot .phonics{display:none}.hotspot-guides line{stroke-width:2}.hotspot-guides .desktop-guide{display:none}.hotspot-guides .mobile-guide{display:block}.hotspot-guides circle{stroke-width:1}.story-found{margin-top:8px;padding:8px 13px}.story-kind-note{margin-top:8px}}

/* Server accounts: one private learning garden per child. */
.profile-pill { height:42px; max-width:145px; padding:4px 13px 4px 5px; border:1px solid var(--line); border-radius:25px; display:flex; align-items:center; gap:7px; position:relative; background:#fff; cursor:pointer; box-shadow:0 4px 14px rgba(76,80,72,.06); }
.profile-pill span { width:32px; height:32px; border-radius:50%; display:grid; place-items:center; background:#e5f2e9; font-size:18px; }
.profile-pill b { max-width:82px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.profile-pill:after { content:""; width:8px; height:8px; position:absolute; right:1px; bottom:1px; border:2px solid white; border-radius:50%; background:#9da69f; }
.profile-pill[data-sync="saved"]:after { background:#66b38e; }.profile-pill[data-sync="saving"]:after { background:#efb94f; animation:syncPulse 1s infinite; }.profile-pill[data-sync="error"]:after { background:#e47260; }
@keyframes syncPulse { 50% { transform:scale(.65); opacity:.55; } }

dialog.auth-dialog { width:min(820px,calc(100% - 30px)); max-width:none; padding:0; overflow:hidden; text-align:left; border-radius:34px; }
.auth-panel { min-height:510px; display:grid; grid-template-columns:38% 1fr; }
.auth-art { position:relative; overflow:hidden; display:grid; place-items:center; background:linear-gradient(155deg,#d8eee5,#fff0bd); }
.auth-art:before,.auth-art:after { content:""; position:absolute; width:220px; height:220px; border-radius:50%; background:rgba(255,255,255,.42); }
.auth-art:before { left:-90px; top:-80px; }.auth-art:after { right:-105px; bottom:-85px; }
.auth-art span { font-size:105px; filter:drop-shadow(0 14px 15px rgba(65,85,72,.13)); transform:rotate(-5deg); }
.auth-art i { position:absolute; left:23%; top:21%; color:#e4a925; font-size:25px; font-style:normal; }.auth-art b { position:absolute; right:22%; bottom:22%; width:57px; height:57px; display:grid; place-items:center; border-radius:19px 19px 19px 5px; background:var(--coral); color:white; font-size:27px; transform:rotate(5deg); }
.auth-copy { padding:42px 48px 34px; }
.auth-copy .mini-label { color:#a17f67; }
dialog.auth-dialog h2 { margin:7px 0 5px; font:800 30px/1.25 "Fredoka","Noto Sans SC"; }
dialog.auth-dialog .auth-copy>p { margin:0 0 20px; font-size:13px; }
.auth-tabs { padding:4px; display:grid; grid-template-columns:1fr 1fr; border-radius:15px; background:#f2eee5; }
.auth-tabs button { padding:10px; border:0; border-radius:12px; background:transparent; color:#7f847e; cursor:pointer; font-weight:800; font-size:13px; }
.auth-tabs button.active { background:white; color:var(--coral-dark); box-shadow:0 3px 10px rgba(65,75,68,.08); }
#authForm { margin-top:18px; display:grid; gap:12px; }
#authForm>label:not(.migration-choice) { display:grid; gap:6px; color:#606c65; font-size:12px; font-weight:800; }
#authForm input:not([type="checkbox"]) { width:100%; height:45px; padding:0 14px; border:2px solid #e8e3d9; border-radius:13px; background:#fffefa; color:var(--ink); outline:0; font-size:16px; }
#authForm input:focus { border-color:#8cc6ac; box-shadow:0 0 0 4px rgba(140,198,172,.16); }
.migration-choice { display:none; align-items:center; gap:9px; padding:9px 11px; border-radius:12px; background:#eef7f1; color:#587064; font-size:11px; cursor:pointer; }
.migration-choice.show { display:flex; }.migration-choice input { width:17px; height:17px; accent-color:#65a989; }
dialog.auth-dialog p.auth-message { min-height:18px; margin:-2px 0; color:#cf604e; font-size:11px; font-weight:700; }
.auth-submit { width:100%; margin-top:0; border:0; }.auth-submit:disabled { opacity:.55; cursor:wait; }
.privacy-note { display:block; margin-top:13px; color:#9a9d98; text-align:center; font-size:10px; }

dialog.account-dialog { width:min(390px,calc(100% - 32px)); padding:36px; }
.account-avatar { width:94px; height:94px; margin:0 auto 13px; display:grid; place-items:center; border-radius:50%; background:#e4f2e9; font-size:53px; }
.account-dialog>small { color:#9a806c; font:700 9px "Fredoka"; letter-spacing:1.5px; }
dialog.account-dialog h2 { margin:5px 0; font:800 30px/1.2 "Fredoka","Noto Sans SC"; }
dialog.account-dialog p { font-size:12px; }
.account-dialog .soft-button { width:100%; }
.voice-pack-entry { width:100%; min-height:66px; margin:0 0 10px; padding:10px 14px; border:1px solid #ead8be; border-radius:18px; display:grid; grid-template-columns:43px 1fr; grid-template-rows:1fr 1fr; column-gap:11px; align-items:center; background:linear-gradient(120deg,#fff7df,#fffdf7); color:var(--ink); text-align:left; cursor:pointer; }
.voice-pack-entry>span { grid-row:1/3; width:43px; height:43px; display:grid; place-items:center; border-radius:14px; background:#f6c76d; font-size:23px; box-shadow:inset 0 0 0 4px rgba(255,255,255,.38); }.voice-pack-entry>b { align-self:end; font-size:13px; }.voice-pack-entry>small { align-self:start; color:#9c846c; font-size:10px; }

dialog.voice-dialog { width:min(760px,calc(100% - 30px)); max-width:none; max-height:calc(100vh - 28px); padding:0; overflow:auto; border-radius:34px; text-align:left; background:#fffdf7; }
.voice-studio-head { min-height:132px; padding:29px 66px 24px 31px; display:grid; grid-template-columns:76px 1fr auto; gap:17px; align-items:center; background:radial-gradient(circle at 88% 0,#ffe8a6,transparent 33%),linear-gradient(125deg,#e3f1e8,#fff8df); }
.voice-child-avatar { width:72px; height:72px; display:grid; place-items:center; border:5px solid rgba(255,255,255,.78); border-radius:24px; background:white; font-size:39px; transform:rotate(-2deg); box-shadow:0 8px 18px rgba(67,83,73,.1); }
.voice-studio-head h2 { margin:4px 0 1px!important; font:800 28px/1.2 "Fredoka","Noto Sans SC"!important; }.voice-studio-head p { margin:0!important; font-size:12px; }.voice-pack-progress { min-width:84px; padding:12px 13px; border-radius:18px; display:flex; flex-direction:column; align-items:center; background:rgba(255,255,255,.72); color:#8a6e3d; }.voice-pack-progress b { font:700 27px "Fredoka"; }.voice-pack-progress span { font-size:9px; font-weight:800; }
.voice-phrase-nav { padding:17px 28px 4px; display:flex; justify-content:center; gap:7px; flex-wrap:wrap; }.voice-phrase-nav button { width:28px; height:28px; padding:0; border:0; border-radius:50%; background:#ede9df; color:#9a948a; font:700 10px "Fredoka"; cursor:pointer; }.voice-phrase-nav button.recorded { background:#dcefe5; color:#4e8f70; }.voice-phrase-nav button.active { color:white; background:var(--coral); box-shadow:0 0 0 4px rgba(242,125,102,.15); }
.voice-record-card { margin:14px 28px 0; padding:24px 28px 20px; border:1px solid #eee3d3; border-radius:26px; display:flex; flex-direction:column; align-items:center; background:white; text-align:center; box-shadow:0 12px 28px rgba(66,77,69,.07); }.voice-sequence { color:#ab896c; font:700 9px "Fredoka"; letter-spacing:1.4px; }.voice-record-card blockquote { max-width:580px; margin:8px auto 4px; font-size:23px; font-weight:800; line-height:1.5; }.voice-record-card>p { margin:0; font-size:11px; }
.voice-wave { height:48px; margin:12px 0 0; display:flex; align-items:center; gap:5px; }.voice-wave i { width:5px; height:12px; border-radius:6px; background:#d9d3c8; }.voice-record-card.recording .voice-wave i { background:var(--coral); animation:voiceWave .7s ease-in-out infinite alternate; }.voice-record-card.recording .voice-wave i:nth-child(2),.voice-record-card.recording .voice-wave i:nth-child(6){animation-delay:.12s}.voice-record-card.recording .voice-wave i:nth-child(3),.voice-record-card.recording .voice-wave i:nth-child(5){animation-delay:.25s}.voice-record-card.recording .voice-wave i:nth-child(4){animation-delay:.37s}
.voice-timer { color:#8e8b84; font:700 12px "Fredoka"; letter-spacing:1px; }.voice-record-button { min-width:162px; height:52px; margin:10px 0 12px; padding:0 23px; border:0; border-radius:27px; display:flex; align-items:center; justify-content:center; gap:9px; background:#40534a; color:white; cursor:pointer; font-weight:800; box-shadow:0 8px 18px rgba(50,71,60,.2); }.voice-record-button span { color:#ff9f8e; font-size:19px; }.voice-record-card.recording .voice-record-button { background:#d96655; }.voice-record-card.recording .voice-record-button span { color:white; }.voice-record-button:disabled { opacity:.55; cursor:wait; }
.voice-clip-actions { min-height:39px; display:flex; align-items:center; gap:17px; }.voice-clip-actions .soft-button { padding:10px 18px; }.voice-delete { color:#ac776a; }.voice-clip-actions button:disabled { opacity:.35; cursor:not-allowed; }.voice-message { min-height:17px; margin:7px 0 0!important; color:#ca604f!important; font-size:10px!important; font-weight:700; }
.voice-pager { padding:15px 31px 9px; display:grid; grid-template-columns:auto 1fr auto; gap:15px; align-items:center; }.voice-pager button { padding:9px 12px; border:0; border-radius:12px; background:#f1ece2; color:#5f6b64; cursor:pointer; font-weight:800; }.voice-pager span { color:#858a84; text-align:center; font-size:10px; }.voice-privacy { margin:0!important; padding:3px 30px 24px; color:#92958f!important; text-align:center; font-size:9px!important; }
@keyframes voiceWave { from{height:10px} to{height:42px} }

@media(max-width:760px){
  .auth-panel { min-height:0; grid-template-columns:1fr; }
  .auth-art { min-height:120px; }.auth-art span { font-size:65px; }.auth-art i { top:18%; }.auth-art b { right:25%; bottom:16%; width:45px; height:45px; border-radius:15px; font-size:22px; }
  .auth-copy { padding:27px 25px 25px; }
}
@media(max-width:620px){
  .profile-pill { padding-right:5px; }.profile-pill b { display:none; }
  .star-pill { height:38px; padding:0 10px; }.star-pill span { font-size:13px; }
  .top-actions { gap:5px; }.top-actions>#soundToggle { display:none; }
  dialog.auth-dialog { max-height:calc(100vh - 18px); }.auth-art { min-height:96px; }.auth-art span { font-size:53px; }
  .auth-copy { padding:22px 20px; } dialog.auth-dialog h2 { font-size:25px; }
  dialog.voice-dialog { width:calc(100% - 16px); max-height:calc(100vh - 16px); border-radius:25px; }.voice-studio-head { min-height:112px; padding:23px 48px 19px 18px; grid-template-columns:56px 1fr; gap:11px; }.voice-child-avatar { width:55px; height:55px; border-width:3px; border-radius:18px; font-size:30px; }.voice-studio-head h2 { font-size:23px!important; }.voice-studio-head p { font-size:10px!important; }.voice-pack-progress { grid-column:1/3; min-width:0; padding:6px 10px; flex-direction:row; justify-content:center; gap:4px; }.voice-pack-progress b { font-size:19px; }.voice-phrase-nav { padding:14px 16px 2px; gap:6px; }.voice-phrase-nav button { width:25px; height:25px; }.voice-record-card { margin:12px 12px 0; padding:20px 13px 16px; border-radius:21px; }.voice-record-card blockquote { font-size:19px; }.voice-pager { padding:13px 15px 8px; gap:8px; }.voice-pager button { font-size:10px; }.voice-privacy { padding:3px 15px 19px; }
}

.register-only { display:none!important; }.register-only.show { display:grid!important; }
dialog.profile-dialog { width:min(700px,calc(100% - 30px)); max-width:none; min-height:470px; padding:0; overflow:hidden; text-align:center; }
.profile-picker { min-height:470px; padding:42px 46px 34px; background:linear-gradient(160deg,#fffef9,#fff9ea); }
.profile-picker.hidden { display:none; }
dialog.profile-dialog h2 { margin:7px 0 4px; font:800 31px/1.25 "Fredoka","Noto Sans SC"; }
dialog.profile-dialog .profile-picker>p { margin:0 auto 24px; font-size:13px; }
.child-list { display:grid; grid-template-columns:repeat(3,1fr); gap:13px; margin:22px 0 18px; }
.child-profile-card { min-height:155px; padding:17px 10px; border:2px solid transparent; border-radius:22px; display:flex; flex-direction:column; align-items:center; justify-content:center; background:white; cursor:pointer; box-shadow:0 7px 20px rgba(63,78,69,.08); transition:.18s; }
.child-profile-card:hover { transform:translateY(-4px); border-color:#8fc7ad; }
.child-profile-card span { width:68px; height:68px; margin-bottom:8px; display:grid; place-items:center; border-radius:50%; background:#e6f2e9; font-size:37px; }
.child-profile-card b { font-size:17px; }.child-profile-card small { margin-top:3px; color:#9a8e80; font-size:10px; }
.empty-children { grid-column:1/-1; min-height:155px; padding:22px; border:2px dashed #dfd8cb; border-radius:22px; display:flex; flex-direction:column; align-items:center; justify-content:center; color:#7e867f; }
.empty-children span { font-size:45px; }.empty-children b { margin-top:5px; }.empty-children small { margin-top:3px; color:#9b9e99; }
.add-child-button { min-width:220px; }.parent-logout { display:block; margin:18px auto 0; color:#9b8676; }
.child-stage { display:none; position:relative; max-width:500px; margin:0 auto; }.child-stage.show { display:flex; flex-direction:column; align-items:center; }
.profile-back { position:absolute; left:24px; top:23px; width:40px; height:40px; border:0; border-radius:50%; background:#f1ece2; cursor:pointer; }
.child-big-avatar { width:100px; height:100px; margin:11px auto 14px; display:grid; place-items:center; border-radius:50%; background:#e3f1e8; font-size:55px; }
#childUnlockForm,#childCreateForm { width:min(100%,390px); display:grid; gap:12px; }
#childUnlockForm>input,#childCreateForm input:not([type="checkbox"]) { width:100%; height:48px; padding:0 15px; border:2px solid #e5dfd3; border-radius:14px; background:white; outline:0; font-size:18px; }
#childUnlockForm>input { text-align:center; font-size:25px; letter-spacing:10px; }
#childUnlockForm>input:focus,#childCreateForm input:focus { border-color:#89c3a9; box-shadow:0 0 0 4px rgba(137,195,169,.15); }
#childUnlockForm .primary-button,#childCreateForm .primary-button { width:100%; border:0; }
#childCreateForm>label:not(.migration-choice) { display:grid; gap:6px; text-align:left; color:#606c65; font-size:12px; font-weight:800; }
dialog.profile-dialog p.auth-message { min-height:18px; margin:0; color:#cf604e; font-size:11px; font-weight:700; }
.parent-account-line { display:block; margin:-10px 0 18px; color:#8b918c; overflow-wrap:anywhere; }
.account-dialog #switchChildButton { width:100%; }.account-logout { margin:15px auto 0; color:#a57968; }

@media(max-width:620px){
  dialog.profile-dialog { max-height:calc(100vh - 18px); }.profile-picker { min-height:430px; padding:31px 18px 25px; }
  dialog.profile-dialog h2 { font-size:26px; }.child-list { grid-template-columns:repeat(2,1fr); gap:10px; }
  .child-profile-card { min-height:132px; }.child-profile-card span { width:58px; height:58px; font-size:32px; }
  .profile-back { left:13px; top:13px; }.child-big-avatar { width:82px; height:82px; font-size:45px; }
}

.forgot-password { justify-self:center; margin:-5px 0 0; color:#8b7b6e; font-size:11px; }
dialog.verify-dialog,dialog.recovery-dialog { width:min(460px,calc(100% - 30px)); padding:38px 42px; }
.verify-icon { width:92px; height:92px; margin:0 auto 15px; display:grid; place-items:center; border-radius:50%; background:#e7f2ea; font-size:48px; }
dialog.verify-dialog h2,dialog.recovery-dialog h2 { margin:7px 0 8px; font:800 29px/1.25 "Fredoka","Noto Sans SC"; }
dialog.verify-dialog>p,dialog.recovery-dialog>p { margin:0 0 18px; font-size:13px; }
.verify-note { margin:20px 0 13px; padding:13px; border-radius:14px; background:#fff4d4; color:#796a50; font-size:11px; }
dialog.verify-dialog p.auth-message { min-height:18px; margin:0 0 8px; color:#cf604e; font-size:11px; font-weight:700; }
.verify-dialog .soft-button { width:100%; }.verify-dialog>.text-button { margin-top:16px; color:#9b7769; }
#forgotForm,#resetForm { display:grid; gap:12px; text-align:left; }
#forgotForm.hidden { display:none; }.reset-form { display:none!important; }.reset-form.show { display:grid!important; }
#forgotForm label,#resetForm label { display:grid; gap:6px; color:#606c65; font-size:12px; font-weight:800; }
#forgotForm input,#resetForm input { width:100%; height:47px; padding:0 14px; border:2px solid #e5dfd4; border-radius:14px; background:white; outline:0; font-size:15px; }
#forgotForm input:focus,#resetForm input:focus { border-color:#89c3a9; box-shadow:0 0 0 4px rgba(137,195,169,.15); }
#forgotForm .primary-button,#resetForm .primary-button { width:100%; border:0; }
dialog.recovery-dialog p.auth-message { min-height:18px; margin:0; color:#cf604e; font-size:11px; font-weight:700; text-align:center; }

@media(max-width:620px){
  dialog.verify-dialog,dialog.recovery-dialog { padding:31px 21px; }.verify-icon { width:76px; height:76px; font-size:40px; }
}

/* iPad browser experience: a roomy, touch-first exploration desk. */
@media (min-width:621px) and (max-width:1366px) {
  :root { --ipad-gutter: clamp(24px,4vw,52px); }
  html { overscroll-behavior-y:none; }
  body { background:#dfe5db; }
  .app-shell { min-height:100dvh; }
  .topbar {
    height:calc(76px + env(safe-area-inset-top));
    padding:env(safe-area-inset-top) max(var(--ipad-gutter),env(safe-area-inset-right)) 0 max(var(--ipad-gutter),env(safe-area-inset-left));
    position:sticky;
    top:0;
    z-index:30;
    backdrop-filter:blur(18px) saturate(1.15);
  }
  .page { min-height:calc(100dvh - 76px - env(safe-area-inset-top)); padding-bottom:calc(118px + env(safe-area-inset-bottom)); }
  .profile-pill,.star-pill,.round-button { min-width:48px; min-height:48px; }
  .profile-pill { height:48px; max-width:170px; }
  .profile-pill span { width:38px; height:38px; }
  .star-pill { height:48px; }
  .round-button { width:48px; height:48px; }
  .speech-controls .round-button { width:44px; height:44px; }
  .top-actions { gap:10px; }
  .back-button,.tab,.text-button,.soft-button,.listen-word,.voice-pager button { min-height:48px; }
  .primary-button,.dark-button { min-height:52px; padding:15px 25px; }
  .dialog-close { width:48px; height:48px; right:14px; top:14px; }
  .narrator-bubble button { width:48px; height:48px; }
  dialog { max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  dialog.voice-dialog { width:min(860px,calc(100% - 40px)); max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .voice-phrase-nav { gap:9px; }
  .voice-phrase-nav button { width:44px; height:44px; font-size:12px; }
  .voice-pager button { padding:11px 18px; }
  .hero { min-height:430px; }
  .world-card,.mode-card,.learn-card,.answer,.chapter-card,.match-tile,.story-hotspot { -webkit-user-select:none; user-select:none; }
  .card-grid { gap:18px; }
  .learn-card { min-height:190px; }
  .learn-card .sound-dot { width:38px; height:38px; right:12px; bottom:12px; }
  .answer { min-height:190px; }
  .story-hotspot { width:68px; height:68px; margin:-34px 0 0 -34px; }
  .story-hotspot .phonics { top:59px; }
  .trace-stage { width:100%; max-width:600px; height:420px; }
  .trace-guide { font-size:300px; }
  .trace-actions { gap:16px; }
  .trace-actions button { min-height:52px; min-width:150px; }
  .match-tile { min-height:108px; }
  .bottom-nav { bottom:max(16px,env(safe-area-inset-bottom)); }
  .bottom-nav button { width:100px; min-height:52px; }
}

/* Portrait: two-handed browsing, with a stable bottom tool shelf. */
@media (min-width:621px) and (max-width:1024px) and (orientation:portrait) {
  .brand b { font-size:18px; }
  .brand small { display:none; }
  .top-actions { gap:7px; }
  .profile-pill { max-width:132px; }
  .speech-controls { gap:5px; }
  .hero { min-height:500px; padding:58px var(--ipad-gutter); background-position:57% center; }
  .hero-copy { max-width:500px; }
  .hero-friend { right:2%; transform:scale(.82); transform-origin:bottom right; }
  .section-heading,.world-grid { padding-left:var(--ipad-gutter); padding-right:var(--ipad-gutter); }
  .world-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .world-card { min-height:175px; }
  .world-card.words { grid-column:1 / -1; }
  .daily-card,.grownup-note,.story-teaser { width:auto; margin-left:var(--ipad-gutter); margin-right:var(--ipad-gutter); }
  .daily-card { grid-template-columns:76px 1fr auto; }
  .mode-grid { grid-template-columns:repeat(2,minmax(0,1fr)); padding:0 var(--ipad-gutter); }
  .mode-card { min-height:300px; padding-left:28px; }
  .mode-art { position:static; }
  .mode-card.match-mode { grid-column:1 / -1; min-height:220px; padding-left:150px; }
  .mode-card.match-mode .mode-art { position:absolute; left:30px; top:48px; }
  .story-feature,.review-callout { width:auto; margin-left:var(--ipad-gutter); margin-right:var(--ipad-gutter); }
  .story-map-head { padding-left:var(--ipad-gutter); padding-right:var(--ipad-gutter); }
  .story-route { padding-left:var(--ipad-gutter); padding-right:var(--ipad-gutter); }
  .chapter-card,.chapter-card:nth-of-type(even) { width:100%; align-self:stretch; grid-template-columns:46px 145px 1fr; }
  .chapter-state { grid-column:3; justify-self:start; }
  .game-wrap,.activity-wrap { min-height:calc(100dvh - 76px - env(safe-area-inset-top)); }
  .game-card,.activity-card { width:calc(100% - 32px); }
  .report-grid { margin-left:var(--ipad-gutter); margin-right:var(--ipad-gutter); }
}

/* Landscape: navigation becomes a left tool rail and the activity owns the stage. */
@media (min-width:960px) and (max-width:1366px) and (orientation:landscape) and (max-height:1100px) {
  main { padding-left:92px; }
  body.story-playing main { padding-left:0; }
  .page { padding-bottom:34px; }
  .bottom-nav {
    left:max(14px,env(safe-area-inset-left));
    top:calc(96px + env(safe-area-inset-top));
    bottom:auto;
    transform:none;
    width:72px;
    padding:8px;
    flex-direction:column;
    gap:8px;
    border-radius:25px;
  }
  .bottom-nav button { width:56px; min-height:62px; padding:7px 4px; flex-direction:column; gap:2px; }
  .bottom-nav span { font-size:19px; }
  .bottom-nav b { font-size:10px; }
  .hero { min-height:350px; padding:40px clamp(34px,5vw,72px); }
  .hero h1 { font-size:clamp(40px,4.5vw,54px); }
  .hero p { margin-bottom:22px; }
  .hero-friend { bottom:38px; right:8%; transform:scale(.78); transform-origin:bottom right; }
  .section-heading { margin-top:22px; }
  .world-grid { gap:14px; margin-bottom:22px; }
  .world-card { min-height:156px; padding:20px 16px; gap:12px; }
  .world-icon { flex-basis:90px; transform:scale(.84); transform-origin:center left; }
  .daily-card { padding:18px 24px; }
  .page-title { padding-top:30px; padding-bottom:20px; }
  .page-title h1 { font-size:34px; }
  .mode-card { min-height:278px; padding:25px; }
  .mode-art { width:76px; height:76px; margin-bottom:13px; font-size:40px; }
  .mode-card h2 { font-size:22px; }
  .mode-card p { line-height:1.55; }
  .mode-card em { left:25px; bottom:21px; }
  .story-map-head { padding-top:25px; padding-bottom:20px; }
  .story-route { max-width:1120px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
  .route-line { display:none; }
  .chapter-card,.chapter-card:nth-of-type(even) { width:100%; min-height:145px; align-self:stretch; grid-template-columns:40px 112px 1fr; gap:13px; padding:14px; }
  .chapter-thumb { height:112px; }
  .chapter-copy b { font-size:20px; }
  .chapter-copy em { display:none; }
  .chapter-state { grid-column:3; min-width:0; justify-self:start; padding:7px 10px; }
  .story-parent-note { padding-bottom:28px; }
  .game-wrap,.activity-wrap,.story-play-wrap { min-height:calc(100dvh - 76px - env(safe-area-inset-top)); }
  .game-wrap { padding:16px 26px 24px; }
  .game-topline { margin-bottom:12px; }
  .game-card { padding:23px 38px 27px; }
  .game-card h1 { margin:3px 0 12px; font-size:27px; }
  .listen-button { margin-bottom:18px; }
  .answer { min-height:155px; }
  .activity-wrap { padding:16px 24px 24px; }
  .activity-topline { max-width:1080px; margin-bottom:12px; }
  .activity-card.trace-card { max-width:1080px; min-height:470px; padding:31px 34px; display:grid; grid-template-columns:minmax(230px,.72fr) minmax(430px,1.28fr); grid-template-rows:auto auto auto 1fr auto auto; column-gap:34px; text-align:left; }
  .trace-card>.mini-label,.trace-card>h1,.trace-card>.activity-tip,.trace-card>.trace-actions,.trace-card>.feedback { grid-column:1; }
  .trace-card>h1 { margin-top:8px; }
  .trace-card>.activity-tip { max-width:250px; line-height:1.8; }
  .trace-card>.trace-stage { grid-column:2; grid-row:1 / 7; align-self:center; height:min(52dvh,430px); margin:0; }
  .trace-card>.trace-actions { align-self:end; justify-content:flex-start; flex-wrap:wrap; }
  .trace-card>.trace-actions button { min-width:128px; }
  .trace-card>.feedback { text-align:left; }
  .match-card { padding-top:25px; padding-bottom:25px; }
  .match-board { margin-top:15px; margin-bottom:12px; }
  .story-play-wrap { padding:13px 24px 22px; }
  .story-play-top { max-width:1000px; margin-bottom:10px; }
  .narrator-bubble { width:min(100%,1000px); min-height:74px; margin-bottom:10px; padding:9px 15px; }
  .narrator-bubble>span { width:50px; height:50px; }
  .story-scene { width:min(100%,calc((100dvh - 236px)*1.5)); }
  .story-found { margin-top:7px; }
  .story-kind-note { margin-top:7px; }
  .growth-hero { padding-top:30px; }
  .garden-scene { min-height:330px; }
}

/* Touch devices use pressed feedback; no important cue depends on hover. */
@media (hover:none) and (pointer:coarse) {
  .primary-button:hover,.world-card:hover,.learn-card:hover,.mode-card:hover,.story-teaser:hover,.story-feature:hover,.chapter-card:hover:not(.locked),.answer:hover,.story-hotspot:hover { transform:none; }
  .world-card:active,.learn-card:active,.mode-card:active,.story-teaser:active,.story-feature:active,.chapter-card:active:not(.locked),.answer:active,.match-tile:active { transform:scale(.975); filter:saturate(1.05); }
}
