@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&family=Noto+Sans+SC:wght@400;500;600;700;800;900&display=swap');

:root {
  --ink: #282643;
  --muted: #716f87;
  --paper: #fffdf8;
  --purple: #6454e8;
  --purple-deep: #4233b8;
  --yellow: #ffc845;
  --green: #41bb7a;
  --red: #f06b6b;
  --blue: #55a8eb;
  --line: rgba(44, 39, 91, .10);
  --shadow: 0 20px 55px rgba(53, 44, 117, .15);
  --radius: 26px;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 5% 5%, rgba(255,255,255,.95) 0 3%, transparent 21%),
    linear-gradient(145deg, #f6f1ff 0%, #edf9ff 52%, #fff8e5 100%);
}

button, input, select { font: inherit; }
button { border: 0; cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 4px solid rgba(100, 84, 232, .25);
  outline-offset: 3px;
}

.app-shell { min-height: 100vh; padding: 22px clamp(16px, 3vw, 42px) 42px; }
.page { max-width: 1180px; margin: 0 auto; animation: pageIn .35s ease both; }

.launcher-page { max-width: 1080px; padding-top: clamp(18px, 5vw, 64px); }
.launcher-hero {
  position: relative;
  min-height: 270px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 42px clamp(28px, 6vw, 76px);
  border: 4px solid #4031ad;
  border-radius: 34px;
  color: white;
  background: linear-gradient(120deg, #5141cf, #7967ed 54%, #8c76f3);
  box-shadow: 0 18px 0 #38278f, 0 30px 55px rgba(55, 39, 143, .22);
}
.launcher-hero::after { content: ""; position: absolute; width: 420px; height: 420px; right: 80px; top: -250px; border: 2px solid rgba(255,255,255,.18); border-radius: 50%; box-shadow: 0 0 0 28px rgba(255,255,255,.06), 0 0 0 58px rgba(255,255,255,.04); }
.launcher-copy { position: relative; z-index: 1; max-width: 650px; }
.launcher-copy .eyebrow { color: #f8dc76; }
.launcher-copy h2 { margin: 8px 0 14px; font-size: clamp(42px, 7vw, 76px); line-height: .95; letter-spacing: -3px; }
.launcher-copy > p:last-child { max-width: 560px; margin: 0; color: rgba(255,255,255,.86); font-weight: 600; line-height: 1.8; }
.launcher-orbit { position: relative; z-index: 1; width: 190px; height: 190px; flex: 0 0 auto; display: grid; place-items: center; border: 2px dashed rgba(255,255,255,.6); border-radius: 50%; background: rgba(255,255,255,.10); transform: rotate(8deg); }
.launcher-orbit span { font-size: 82px; filter: drop-shadow(0 10px 0 rgba(55,39,143,.35)); }
.launcher-orbit i, .launcher-orbit b { position: absolute; font-style: normal; font-size: 28px; }
.launcher-orbit i { top: 10px; right: 18px; }.launcher-orbit b { bottom: 12px; left: 18px; }
.game-library { margin-top: 58px; }
.launcher-heading { align-items: end; margin-bottom: 18px; }
.launcher-heading h2 { margin: 4px 0 0; font-size: 32px; }
.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.game-card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; padding: 0; color: inherit; text-align: left; text-decoration: none; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.78); box-shadow: 0 12px 30px rgba(53,44,117,.08); transition: transform .2s ease, box-shadow .2s ease; }
.game-card-playable { cursor: pointer; }.game-card-playable:hover { transform: translateY(-7px); box-shadow: 0 20px 36px rgba(53,44,117,.16); }
.game-card-coming { opacity: .72; }.game-card-art { position: relative; height: 170px; display: grid; place-items: center; overflow: hidden; color: white; }
.game-card-art::before, .game-card-art::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.15); }
.game-card-art::before { width: 190px; height: 190px; top: -90px; right: -55px; }.game-card-art::after { width: 90px; height: 90px; bottom: -38px; left: 28px; }
.multiplication-art { background: linear-gradient(145deg, #f9a944, #e85e68); }.multiplication-art span { font-size: 86px; font-weight: 900; transform: rotate(-10deg); text-shadow: 0 7px 0 rgba(126,49,77,.3); }.multiplication-art i, .multiplication-art b { position: absolute; font-style: normal; font-size: 28px; font-weight: 900; }.multiplication-art i { top: 22px; left: 42px; }.multiplication-art b { right: 44px; bottom: 18px; }
.maze-art { background: linear-gradient(145deg, #49bd91, #2583aa); }.maze-art span, .reaction-art span { font-size: 72px; filter: drop-shadow(0 7px 0 rgba(35,73,111,.25)); }.reaction-art { background: linear-gradient(145deg, #7766e9, #c05ec9); }
.punish-art { background: linear-gradient(145deg, #5540ba, #d45eac); }.punish-art span { position: relative; z-index: 1; font-size: 76px; filter: drop-shadow(0 8px 0 rgba(55,29,98,.28)); }.punish-art i, .punish-art b { position: absolute; z-index: 1; font-style: normal; font-weight: 900; font-size: 32px; }.punish-art i { left: 34px; top: 20px; }.punish-art b { right: 40px; bottom: 16px; }
.phonics-art { background: linear-gradient(145deg, #22a5c8, #66ca99); }.phonics-art span { position: relative; z-index: 1; font-size: 74px; filter: drop-shadow(0 8px 0 rgba(26,100,123,.28)); }.phonics-art i, .phonics-art b { position: absolute; z-index: 1; color: white; font-style: normal; font-weight: 900; }.phonics-art i { left: 25px; top: 24px; font-size: 24px; transform: rotate(-12deg); }.phonics-art b { right: 29px; bottom: 20px; font-size: 34px; }
.dictation-art { background: linear-gradient(145deg, #7047cc, #ef6d91); }.dictation-art span { position: relative; z-index: 1; font-size: 74px; filter: drop-shadow(0 8px 0 rgba(62,35,123,.28)); }.dictation-art i, .dictation-art b { position: absolute; z-index: 1; color: #fff7c7; font-style: normal; font-weight: 900; }.dictation-art i { left: 24px; top: 22px; font-size: 22px; transform: rotate(-10deg); }.dictation-art b { right: 31px; bottom: 17px; font-size: 38px; }
.chinese-art { background: linear-gradient(145deg, #d95045, #e9954b); }.chinese-art span, .chinese-art i, .chinese-art b { position: absolute; z-index: 1; color: #fff5cf; font-style: normal; font-weight: 900; text-shadow: 0 4px 0 rgba(126,45,34,.25); }.chinese-art span { font-size: 64px; }.chinese-art i { left: 30px; top: 22px; font-size: 26px; }.chinese-art b { right: 29px; bottom: 21px; font-size: 27px; }
.hanzi-art { background: linear-gradient(145deg, #f08a48, #efc84c); }.hanzi-art span, .hanzi-art i, .hanzi-art b { position: absolute; z-index: 1; color: #71382b; font-style: normal; font-weight: 900; }.hanzi-art span { display: grid; place-items: center; width: 82px; height: 82px; border-radius: 50%; background: #fff4c9; box-shadow: 0 7px 0 rgba(139,75,42,.25); font-size: 48px; }.hanzi-art i { left: 24px; top: 22px; color: #fff9d9; font-size: 18px; transform: rotate(-9deg); }.hanzi-art b { right: 30px; bottom: 18px; color: #fff9d9; font-size: 30px; }
.gomoku-art { background: linear-gradient(145deg, #285b4b, #d1a65f); }.gomoku-art span, .gomoku-art i, .gomoku-art b { position: absolute; z-index: 1; font-style: normal; font-weight: 900; }.gomoku-art span { display: grid; place-items: center; width: 82px; height: 82px; border-radius: 50%; color: #14221d; background: #1b2924; box-shadow: 0 8px 16px rgba(0,0,0,.25); font-size: 59px; }.gomoku-art i { left: 22px; top: 20px; color: #f4e5bf; font-size: 17px; transform: rotate(-8deg); }.gomoku-art b { right: 28px; bottom: 18px; color: #fffdf5; font-size: 35px; text-shadow: 0 3px 7px rgba(0,0,0,.2); }
.game-card-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 20px; }.game-card-body strong { font-size: 19px; }.game-card-body small { min-height: 44px; color: var(--muted); line-height: 1.65; }.game-card-body em { margin-top: auto; color: var(--purple); font-style: normal; font-weight: 900; }.game-card-coming .game-card-body em { color: var(--muted); }

.punish-page { max-width: 980px; padding-top: clamp(18px, 4vw, 48px); }.punish-shell { overflow: hidden; border-radius: 32px; background: #fffdf8; box-shadow: var(--shadow); }.punish-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 24px; color: #fff; background: #312561; }.punish-top > div { display: flex; flex-direction: column; align-items: center; gap: 3px; }.punish-top span { font-weight: 800; }.punish-top strong { color: #f8d85a; font-size: 13px; }.punish-top .back-btn { color: #fff; background: rgba(255,255,255,.13); }.punish-hearts { letter-spacing: 2px; white-space: nowrap; }
.punish-arena { position: relative; min-height: 335px; display: flex; align-items: center; justify-content: space-between; gap: 30px; overflow: hidden; padding: 42px clamp(28px, 7vw, 74px); color: white; background: radial-gradient(circle at 77% 32%, rgba(255,239,142,.35), transparent 10%), linear-gradient(130deg, #755bce, #bd62b2 64%, #e7847f); }.punish-arena::after { content: ""; position: absolute; width: 600px; height: 140px; bottom: -90px; left: -50px; border-radius: 50%; background: rgba(32,25,85,.24); box-shadow: 380px -45px 0 rgba(32,25,85,.15); }.punish-copy { position: relative; z-index: 1; max-width: 470px; }.punish-copy p { margin: 0 0 8px; color: #fff09c; font-weight: 900; }.punish-copy h2 { margin: 0 0 12px; font-size: clamp(32px, 5vw, 54px); line-height: 1.05; }.punish-copy small { color: rgba(255,255,255,.84); font-weight: 600; }.punish-monster { position: relative; z-index: 1; min-width: 175px; text-align: center; animation: monsterFloat 2.2s ease-in-out infinite; }.punish-monster > span { display: block; font-size: 126px; filter: drop-shadow(0 13px 0 rgba(66,32,92,.24)); }.punish-monster i { position: absolute; top: 19px; right: 3px; opacity: 0; font-style: normal; font-size: 36px; }.punish-monster.punish-hit i { opacity: 1; animation: pop .35s ease; }.punish-monster.punish-hit > span { animation: monsterHit .4s ease; }.punish-monster strong { display: block; margin-top: 4px; }.punish-hp { width: 155px; height: 14px; margin: 6px auto; overflow: hidden; border: 3px solid rgba(47,31,78,.52); border-radius: 99px; background: rgba(255,255,255,.4); }.punish-hp div { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7fe15f, #d7f050); transition: width .25s ease; }
.punish-question { width: min(100% - 32px, 720px); min-height: 315px; margin: -26px auto 34px; position: relative; z-index: 2; padding: 28px clamp(20px, 5vw, 46px); border: 2px solid rgba(72,49,143,.10); border-radius: 28px; text-align: center; background: rgba(255,255,255,.97); box-shadow: 0 20px 38px rgba(55,35,110,.17); }.punish-question .eyebrow { margin: 0; }.punish-equation { margin: 12px 0 20px; color: #322565; font-size: clamp(40px, 7vw, 66px); font-weight: 900; letter-spacing: 2px; }.punish-choices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }.punish-choices button { min-height: 62px; border: 2px solid #e0daf9; border-radius: 17px; color: #4d3bb7; background: #f7f4ff; font-size: 25px; font-weight: 900; transition: .18s ease; }.punish-choices button:hover { transform: translateY(-3px); border-color: #967eec; background: #fff; }.punish-feedback { min-height: 24px; margin: 16px 0 0; color: var(--muted); font-weight: 800; }.punish-feedback.correct { color: #1c9a5d; }.punish-feedback.wrong { color: #d34c57; }.punish-result { display: grid; place-items: center; min-height: 245px; }.punish-result > span { font-size: 60px; }.punish-result h2 { margin: 8px 0; font-size: 30px; }.punish-result p { margin: 0 0 20px; color: var(--muted); }.punish-result .primary-btn { min-width: 180px; }
@keyframes monsterFloat { 50% { transform: translateY(-10px) rotate(3deg); } } @keyframes monsterHit { 25% { transform: translateX(-14px) rotate(-8deg); } 70% { transform: translateX(8px) rotate(4deg); } }

.phonics-page { max-width: 920px; padding-top: clamp(18px, 4vw, 48px); }.phonics-shell { overflow: hidden; border-radius: 32px; background: #fffef9; box-shadow: var(--shadow); }.phonics-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 25px; color: white; background: linear-gradient(90deg, #197fae, #39b799); }.phonics-top > div { display: flex; flex-direction: column; align-items: center; gap: 3px; }.phonics-top > div span { font-size: 18px; font-weight: 900; }.phonics-top > div strong { color: #dffff3; font-size: 13px; }.phonics-top .back-btn { color: white; background: rgba(255,255,255,.15); }.phonics-top .pill { min-width: 82px; color: #1b7b6a; background: #f8e881; }.phonics-progress { height: 11px; background: #d8f2e9; }.phonics-progress div { height: 100%; border-radius: 0 99px 99px 0; background: linear-gradient(90deg, #ffc851, #f5a64f); transition: width .3s ease; }
.phonics-card, .phonics-result { min-height: 515px; padding: 36px 30px 40px; text-align: center; background: radial-gradient(circle at 12% 22%, rgba(113,210,181,.14) 0 8%, transparent 9%), radial-gradient(circle at 89% 76%, rgba(75,180,211,.13) 0 9%, transparent 10%); }.phonics-card > .eyebrow { margin: 0; color: #2b9e8a; }.phonics-word-art { width: 138px; height: 138px; display: grid; place-items: center; margin: 16px auto 10px; border: 8px solid #d5f1e8; border-radius: 42% 58% 51% 49% / 48% 42% 58% 52%; background: #edfff8; font-size: 78px; transform: rotate(-4deg); box-shadow: 0 10px 0 #b9e7d9; }.phonics-card h2 { margin: 10px 0 6px; color: #257f82; font-size: clamp(42px, 7vw, 64px); letter-spacing: 2px; }.phonics-card > p:not(.eyebrow):not(.phonics-feedback) { margin: 0 0 22px; color: var(--muted); font-weight: 700; }.phonics-options { width: min(100%, 580px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 auto; }.phonics-options button { min-height: 88px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 2px solid #cfece1; border-radius: 20px; color: #247d77; background: white; box-shadow: 0 6px 0 #bde4d7; transition: .18s ease; }.phonics-options button:hover:not(:disabled) { transform: translateY(-3px); border-color: #4ebba5; }.phonics-options button:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 #bde4d7; }.phonics-options button:disabled { cursor: default; opacity: .75; }.phonics-options button.answer-correct { border-color: #55b85e; color: #218444; background: #effbea; box-shadow: 0 6px 0 #aadea6; }.phonics-options strong { font-size: 27px; }.phonics-options small { min-height: 14px; color: currentColor; font-size: 10px; font-weight: 800; }.phonics-feedback { min-height: 25px; margin: 20px 0 0; color: var(--muted); font-weight: 800; }.phonics-feedback.correct { color: #16834c; }.phonics-feedback.wrong { color: #ca5757; }.phonics-result { display: grid; place-content: center; }.phonics-result > span { font-size: 74px; }.phonics-result .eyebrow { margin: 14px 0 3px; color: #2b9e8a; }.phonics-result h2 { margin: 5px 0 12px; font-size: 35px; }.phonics-result > p:not(.eyebrow) { max-width: 430px; margin: 0 auto 22px; color: var(--muted); line-height: 1.7; }

.dictation-page { max-width: 920px; padding-top: clamp(18px, 4vw, 48px); }.dictation-shell { overflow: hidden; border-radius: 32px; background: #fffdfb; box-shadow: var(--shadow); }.dictation-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 25px; color: white; background: linear-gradient(90deg, #5634ad, #c94d82); }.dictation-top > div { display: flex; flex-direction: column; align-items: center; gap: 3px; }.dictation-top > div span { font-size: 18px; font-weight: 900; }.dictation-top > div strong { color: #ffe49c; font-size: 13px; }.dictation-top .back-btn { color: white; background: rgba(255,255,255,.15); }.dictation-top .pill { min-width: 82px; color: #783071; background: #ffe28d; }.dictation-progress { height: 11px; background: #efd9f3; }.dictation-progress div { height: 100%; border-radius: 0 99px 99px 0; background: linear-gradient(90deg, #ffcc5c, #ef6d91); transition: width .3s ease; }
.dictation-card, .dictation-result { min-height: 570px; padding: 30px clamp(18px, 5vw, 42px) 38px; text-align: center; background: radial-gradient(circle at 10% 18%, rgba(239,109,145,.11) 0 8%, transparent 9%), radial-gradient(circle at 90% 80%, rgba(112,71,204,.10) 0 9%, transparent 10%); }.dictation-card > .eyebrow { margin: 0; color: #a33c82; }.dictation-visual { width: 108px; height: 108px; display: grid; place-items: center; margin: 12px auto; border: 7px solid #f0d7ef; border-radius: 48% 52% 45% 55%; background: #fff1f7; box-shadow: 0 8px 0 #dfb9dd; font-size: 61px; transform: rotate(-3deg); }.dictation-speaker { min-width: 220px; display: inline-grid; grid-template-columns: auto auto; column-gap: 9px; align-items: center; padding: 12px 22px; border-radius: 18px; color: white; background: linear-gradient(135deg, #6947c7, #9f54c5); box-shadow: 0 7px 0 #49318f; transition: transform .18s ease, box-shadow .18s ease; }.dictation-speaker:hover { transform: translateY(-2px); }.dictation-speaker:active { transform: translateY(4px); box-shadow: 0 3px 0 #49318f; }.dictation-speaker span { grid-row: 1 / 3; font-size: 30px; }.dictation-speaker strong { font-size: 16px; }.dictation-speaker small { color: #eadcff; font-size: 11px; }.dictation-counter { margin: 18px 0 12px; color: var(--muted); }.dictation-counter strong { color: #8b3ca5; font-size: 22px; }.dictation-form { width: min(100%, 560px); margin: 0 auto; text-align: left; }.dictation-form label { display: block; margin: 0 0 7px 4px; font-weight: 800; }.dictation-form > div { display: grid; grid-template-columns: 1fr auto; gap: 10px; }.dictation-form input { min-width: 0; padding: 14px 17px; border: 2px solid #d9caea; border-radius: 16px; color: #3d2c60; background: white; font-size: 21px; font-weight: 800; letter-spacing: 2px; }.dictation-form button { padding: 0 23px; border-radius: 16px; color: white; background: #ed6b91; font-weight: 900; box-shadow: 0 5px 0 #bd426c; }.dictation-form button:disabled, .dictation-form input:disabled { opacity: .72; cursor: default; }.dictation-hint-btn { margin-top: 14px; padding: 9px 15px; border-radius: 13px; color: #795589; background: #f5eaf7; font-weight: 800; }.dictation-feedback { min-height: 24px; margin: 14px 0 0; color: var(--muted); font-weight: 800; }.dictation-feedback.correct { color: #21834a; }.dictation-feedback.wrong { color: #c64b66; }.dictation-answer { width: min(100%, 520px); display: flex; align-items: baseline; justify-content: center; gap: 8px; margin: 10px auto 0; padding: 9px 14px; border-radius: 14px; color: #5f3976; background: #f7ebfa; }.dictation-answer strong { font-size: 22px; letter-spacing: 1px; }.dictation-answer small { color: var(--muted); }.dictation-result { display: grid; place-content: center; }.dictation-result > span { font-size: 74px; }.dictation-result .eyebrow { margin: 14px 0 3px; color: #a33c82; }.dictation-result h2 { margin: 5px 0 12px; font-size: 35px; }.dictation-result > p:not(.eyebrow) { max-width: 470px; margin: 0 auto 22px; color: var(--muted); line-height: 1.7; }

.chinese-page { max-width: 920px; padding-top: clamp(18px, 4vw, 48px); }.chinese-shell { overflow: hidden; border-radius: 32px; background: #fffdf7; box-shadow: var(--shadow); }.chinese-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 25px; color: white; background: linear-gradient(90deg, #b93f38, #d66c43); }.chinese-top > div { display: flex; flex-direction: column; align-items: center; gap: 3px; }.chinese-top > div span { font-size: 18px; font-weight: 900; }.chinese-top > div strong { color: #ffe8aa; font-size: 13px; }.chinese-top .back-btn { color: white; background: rgba(255,255,255,.15); }.chinese-top .pill { min-width: 82px; color: #a4482e; background: #ffe59b; }.chinese-progress { height: 11px; background: #f9d9ae; }.chinese-progress div { height: 100%; border-radius: 0 99px 99px 0; background: linear-gradient(90deg, #e97846, #d64943); transition: width .3s ease; }.chinese-card, .chinese-result { min-height: 510px; padding: 36px 30px 40px; text-align: center; background: radial-gradient(circle at 12% 22%, rgba(237,170,77,.15) 0 8%, transparent 9%), radial-gradient(circle at 89% 76%, rgba(207,75,57,.12) 0 9%, transparent 10%); }.chinese-card > .eyebrow { margin: 0; color: #c75a38; }.chinese-word-art { width: 124px; height: 124px; display: grid; place-items: center; margin: 16px auto 10px; border: 7px solid #f5d59a; border-radius: 42% 58% 51% 49% / 48% 42% 58% 52%; background: #fff7dd; font-size: 70px; transform: rotate(4deg); box-shadow: 0 9px 0 #edc478; }.chinese-blank { margin: 8px 0 5px; color: #9c3a2e; font-family: "Ma Shan Zheng", "KaiTi", cursive; font-size: clamp(54px, 9vw, 82px); letter-spacing: 9px; }.chinese-hint { margin: 0 0 22px; color: var(--muted); font-weight: 700; }.chinese-options { width: min(100%, 570px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 auto; }.chinese-options button { min-height: 88px; border: 2px solid #f0d7aa; border-radius: 20px; color: #a34830; background: white; box-shadow: 0 6px 0 #eac68e; font-family: "Ma Shan Zheng", "KaiTi", cursive; font-size: 39px; transition: .18s ease; }.chinese-options button:hover:not(:disabled) { transform: translateY(-3px); border-color: #e08054; }.chinese-options button:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 #eac68e; }.chinese-options button:disabled { cursor: default; opacity: .75; }.chinese-options button.answer-correct { border-color: #59ae59; color: #247b38; background: #eff9e9; box-shadow: 0 6px 0 #a9d69f; }.chinese-feedback { min-height: 25px; margin: 20px 0 0; color: var(--muted); font-weight: 800; }.chinese-feedback.correct { color: #237e3c; }.chinese-feedback.wrong { color: #c54d45; }.chinese-result { display: grid; place-content: center; }.chinese-result > span { font-size: 74px; }.chinese-result .eyebrow { margin: 14px 0 3px; color: #c75a38; }.chinese-result h2 { margin: 5px 0 12px; font-size: 35px; }.chinese-result > p:not(.eyebrow) { max-width: 430px; margin: 0 auto 22px; color: var(--muted); line-height: 1.7; }

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: white;
  background: linear-gradient(145deg, #7768f2, #4a38c4);
  box-shadow: 0 8px 0 #372a99, 0 14px 28px rgba(70, 51, 192, .22);
  font-size: 27px;
  transform: rotate(-4deg);
}

.brand h1 { margin: 0; font-size: clamp(18px, 2.2vw, 26px); line-height: 1.15; }
.brand small { color: var(--muted); font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 10px; }

.pill {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(60, 50, 115, .10);
  font-weight: 800;
  white-space: nowrap;
}
.pill.coin { color: #9a6500; }

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  font-size: 20px;
  box-shadow: 0 8px 22px rgba(60, 50, 115, .10);
}

.hero {
  min-height: 440px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, .72fr);
  align-items: stretch;
  overflow: hidden;
  border: 7px solid rgba(255,255,255,.75);
  border-radius: 38px;
  background-image: linear-gradient(90deg, rgba(28, 33, 70, .82) 0%, rgba(38, 35, 90, .62) 45%, rgba(38,35,90,.08) 70%), url("assets/adventure-world.png");
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(30px, 6vw, 70px);
  color: white;
}
.eyebrow {
  margin: 0 0 14px;
  color: #ffe17f;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .14em;
}
.hero h2 {
  margin: 0;
  font-family: "Ma Shan Zheng", "Noto Sans SC", sans-serif;
  font-size: clamp(42px, 6.8vw, 76px);
  line-height: 1;
  text-shadow: 0 5px 0 rgba(37, 24, 104, .35);
}
.hero-copy > p:not(.eyebrow) { max-width: 480px; margin: 20px 0 26px; color: rgba(255,255,255,.86); font-weight: 600; line-height: 1.8; }

.primary-btn, .secondary-btn, .danger-btn {
  min-height: 52px;
  padding: 0 23px;
  border-radius: 17px;
  font-weight: 900;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.primary-btn {
  color: #403000;
  background: linear-gradient(180deg, #ffdc65, #ffbd36);
  box-shadow: 0 7px 0 #d78812, 0 13px 26px rgba(79, 53, 0, .24);
}
.primary-btn:hover { transform: translateY(-2px); filter: brightness(1.04); }
.primary-btn:active { transform: translateY(5px); box-shadow: 0 2px 0 #d78812; }
.secondary-btn { color: #5040ca; background: #f0edff; box-shadow: inset 0 0 0 2px rgba(100,84,232,.10); }
.danger-btn { color: #b43d3d; background: #fff0f0; }
.wide-btn { width: 100%; }

.hero-side { display: flex; align-items: flex-end; justify-content: center; padding: 36px 30px; }
.hero-card {
  width: min(100%, 310px);
  padding: 24px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 26px;
  background: rgba(255,255,255,.87);
  backdrop-filter: blur(15px);
  box-shadow: 0 18px 42px rgba(33, 28, 77, .18);
}
.hero-card-top { display: flex; align-items: center; gap: 14px; }
.hero-card h3 { margin: 0 0 3px; font-size: 19px; }
.hero-card p { margin: 0; color: var(--muted); font-size: 13px; }
.avatar {
  --avatar-color: #7562ed;
  position: relative;
  width: 70px;
  height: 70px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 5px solid white;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--avatar-color), #3b2fa9);
  box-shadow: 0 7px 18px rgba(60,48,143,.25);
  font-size: 36px;
}
.avatar.small { width: 48px; height: 48px; border-width: 3px; font-size: 25px; }
.avatar.cape { --avatar-color: #e86767; }
.avatar.crown { --avatar-color: #f0a527; }
.avatar.starlight { --avatar-color: #4c9fdc; }
.progress-label { display: flex; justify-content: space-between; margin: 20px 0 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.progress-track { height: 11px; overflow: hidden; border-radius: 999px; background: #e8e5f3; }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6b57e6, #a66aed); transition: width .45s ease; }

.home-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 20px; }
.menu-card {
  min-height: 122px;
  padding: 19px;
  text-align: left;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 23px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 10px 30px rgba(53,44,117,.09);
  transition: transform .2s ease, background .2s ease;
}
.menu-card:hover { transform: translateY(-4px); background: white; }
.menu-card .menu-icon { display: block; margin-bottom: 13px; font-size: 27px; }
.menu-card strong { display: block; font-size: 16px; }
.menu-card small { color: var(--muted); }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 24px 0; }
.section-head h2 { margin: 0; font-size: clamp(25px, 4vw, 38px); }
.section-head p { margin: 6px 0 0; color: var(--muted); }
.back-btn { background: transparent; color: var(--ink); font-weight: 800; padding: 10px 0; }

.map-panel {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  padding: 32px;
  border: 7px solid rgba(255,255,255,.75);
  border-radius: 36px;
  background: linear-gradient(rgba(31, 29, 72, .10), rgba(31,29,72,.2)), url("assets/adventure-world.png") center / cover;
  box-shadow: var(--shadow);
}
.map-panel::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 50%, rgba(31,29,72,.32)); }
.level-grid { position: relative; z-index: 1; height: 540px; }
.level-node {
  --node-color: #57bd72;
  position: absolute;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 5px solid white;
  border-radius: 50%;
  color: white;
  background: var(--node-color);
  box-shadow: 0 7px 0 color-mix(in srgb, var(--node-color), #000 24%), 0 12px 24px rgba(24,21,67,.22);
  font-size: 19px;
  font-weight: 900;
  transition: transform .2s ease;
  transform: translate(-50%, -50%);
}
.level-node:hover:not(:disabled) { transform: translate(-50%, -56%) scale(1.07); }
.level-node:disabled { filter: grayscale(.9); opacity: .72; cursor: not-allowed; }
.level-node.boss { width: 72px; height: 72px; background: #8f57d5; font-size: 23px; }
.level-node.done::after { content: "★"; position: absolute; right: -6px; top: -10px; color: #ffd75e; text-shadow: 0 2px 0 #865c00; }
.zone-label {
  position: absolute;
  z-index: 2;
  padding: 8px 13px;
  border-radius: 12px;
  color: white;
  background: rgba(29, 27, 67, .65);
  backdrop-filter: blur(7px);
  font-weight: 800;
  pointer-events: none;
}
.zone-forest { left: 4%; top: 3%; }
.zone-desert { left: 35%; top: 7%; }
.zone-snow { left: 64%; top: 8%; }
.zone-castle { right: 3%; top: 3%; }

.battle-page { max-width: 1060px; }
.battle-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; margin-bottom: 15px; }
.battle-title { text-align: center; }
.battle-title small { display: block; color: var(--muted); font-weight: 700; }
.battle-title strong { font-size: 21px; }
.stat-cluster { display: flex; gap: 8px; }
.stat-cluster.right { justify-content: flex-end; }
.battle-arena {
  --arena-image: url("assets/adventure-world.png");
  position: relative;
  min-height: 590px;
  overflow: hidden;
  border: 7px solid rgba(255,255,255,.75);
  border-radius: 36px;
  background-image: linear-gradient(180deg, rgba(21,25,55,.05), rgba(21,25,55,.34)), var(--arena-image);
  background-size: cover;
  background-position: var(--arena-position, left center);
  box-shadow: var(--shadow);
}
.battle-arena::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 52%; background: linear-gradient(transparent, rgba(24,22,59,.45)); pointer-events: none; }
.battle-stage { min-height: 310px; display: flex; align-items: center; justify-content: space-around; padding: 34px 6% 8px; }
.fighter { position: relative; z-index: 1; text-align: center; transition: transform .2s ease; }
.fighter-sprite { font-size: clamp(75px, 10vw, 125px); filter: drop-shadow(0 14px 10px rgba(22,17,53,.25)); }
.monster .fighter-sprite { animation: monsterFloat 2.3s ease-in-out infinite; }
@keyframes monsterFloat { 50% { transform: translateY(-9px) rotate(2deg); } }
.fighter-label { display: inline-block; padding: 7px 13px; border-radius: 999px; color: white; background: rgba(31,28,69,.68); backdrop-filter: blur(8px); font-weight: 800; }
.hp-bar { width: 150px; height: 12px; margin: 9px auto 0; overflow: hidden; border: 2px solid rgba(255,255,255,.75); border-radius: 999px; background: rgba(49,39,70,.48); }
.hp-fill { height: 100%; background: linear-gradient(90deg, #ef6e72, #ffb24b); transition: width .35s ease; }
.hit { animation: hit .38s ease; }
.attack { animation: attack .42s ease; }
@keyframes hit { 25% { transform: translateX(15px) rotate(4deg); filter: brightness(1.8); } 55% { transform: translateX(-9px) rotate(-3deg); } }
@keyframes attack { 45% { transform: translateX(55px) scale(1.08); } }

.question-card {
  position: relative;
  z-index: 3;
  width: min(92%, 720px);
  min-height: 245px;
  margin: -6px auto 28px;
  padding: 22px clamp(18px, 4vw, 34px) 26px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 28px;
  background: rgba(255,255,255,.91);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(27,22,69,.24);
}
.question-meta { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; font-weight: 700; }
.timer { color: #e05b5b; font-variant-numeric: tabular-nums; }
.equation { margin: 6px 0 17px; font-size: clamp(38px, 7vw, 58px); font-weight: 900; letter-spacing: .04em; }
.choices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
.choice-btn {
  min-height: 58px;
  border: 2px solid #ded9f5;
  border-radius: 17px;
  color: #4d3ec3;
  background: #f7f5ff;
  font-size: 21px;
  font-weight: 900;
  transition: transform .16s ease, border-color .16s ease;
}
.choice-btn:hover { transform: translateY(-3px); border-color: #8e81ed; }
.answer-form { display: flex; gap: 10px; justify-content: center; }
.answer-input { width: min(230px, 60%); height: 60px; border: 3px solid #d8d3f3; border-radius: 17px; text-align: center; color: #4738bd; background: white; font-size: 25px; font-weight: 900; }
.feedback {
  min-height: 24px;
  margin-top: 13px;
  color: var(--muted);
  font-weight: 700;
}
.feedback.correct { color: #228451; }
.feedback.wrong { color: #c44949; }

.panel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }
.panel, .stat-card {
  padding: 24px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: var(--radius);
  background: rgba(255,255,255,.78);
  box-shadow: 0 12px 35px rgba(53,44,117,.09);
}
.panel h3 { margin: 0 0 15px; }
.stat-card strong { display: block; margin-top: 10px; font-size: 32px; }
.stat-card small { color: var(--muted); font-weight: 700; }
.stat-icon { font-size: 27px; }
.list { display: grid; gap: 10px; }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px; border-radius: 16px; background: rgba(244,242,252,.85); }
.list-item strong { font-size: 18px; }
.list-item small { display: block; color: var(--muted); }
.empty { padding: 45px 20px; text-align: center; color: var(--muted); }
.empty-icon { display: block; margin-bottom: 10px; font-size: 46px; }

.shop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.shop-item { padding: 22px 16px; text-align: center; border-radius: 24px; background: rgba(255,255,255,.8); box-shadow: 0 12px 35px rgba(53,44,117,.09); }
.shop-item .avatar { margin: 0 auto 14px; }
.shop-item h3 { margin: 0 0 4px; }
.shop-item p { min-height: 40px; margin: 0 0 15px; color: var(--muted); font-size: 13px; }
.shop-item button { width: 100%; min-height: 44px; border-radius: 14px; color: white; background: var(--purple); font-weight: 800; }
.shop-item button:disabled { background: #d4d1df; color: #878491; cursor: default; }

.settings-card { max-width: 660px; margin: 0 auto; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 19px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border: 0; }
.setting-row strong { display: block; }
.setting-row small { color: var(--muted); }
.select { min-height: 44px; padding: 0 12px; border: 2px solid #e0dcf2; border-radius: 13px; color: var(--ink); background: white; }
.switch { position: relative; width: 54px; height: 31px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #cfccd8; transition: .25s ease; }
.switch span::before { content: ""; position: absolute; left: 4px; top: 4px; width: 23px; height: 23px; border-radius: 50%; background: white; transition: .25s ease; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::before { transform: translateX(23px); }

.modal-wrap { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(29,25,61,.55); backdrop-filter: blur(8px); }
.modal { width: min(100%, 480px); padding: 30px; border-radius: 30px; background: var(--paper); box-shadow: 0 30px 90px rgba(21,18,55,.35); animation: pop .28s ease; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.modal h2 { margin: 0 0 8px; font-size: 29px; }
.modal > p { margin: 0 0 20px; color: var(--muted); line-height: 1.7; }
.name-input { width: 100%; height: 56px; margin-bottom: 16px; padding: 0 17px; border: 2px solid #ded9f4; border-radius: 16px; background: white; }
.result-stars { margin: 10px 0; color: #ffbd2e; font-size: 40px; letter-spacing: 5px; }
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 20px 0; }
.result-stat { padding: 13px 7px; border-radius: 15px; background: #f2effb; text-align: center; }
.result-stat strong { display: block; font-size: 19px; }
.result-stat small { color: var(--muted); }
.modal-actions { display: flex; gap: 10px; }
.modal-actions > * { flex: 1; }

.toast { position: fixed; z-index: 100; left: 50%; bottom: 28px; max-width: calc(100% - 30px); padding: 13px 20px; border-radius: 999px; color: white; background: #302b58; box-shadow: 0 12px 32px rgba(23,19,54,.3); font-weight: 800; opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.confetti-layer { position: fixed; inset: 0; z-index: 90; overflow: hidden; pointer-events: none; }
.confetti { position: absolute; top: -20px; width: 10px; height: 18px; border-radius: 2px; animation: fall 1.8s linear forwards; }
@keyframes fall { to { transform: translate3d(var(--drift), 110vh, 0) rotate(680deg); } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 850px) {
  .launcher-hero { min-height: 300px; }
  .launcher-orbit { width: 150px; height: 150px; }
  .game-grid { grid-template-columns: 1fr 1fr; }
  .punish-arena { min-height: 310px; }
  .phonics-options { grid-template-columns: repeat(2, 1fr); max-width: 390px; }
  .dictation-answer { flex-wrap: wrap; }
  .chinese-options { grid-template-columns: repeat(2, 1fr); max-width: 390px; }
  .hero { grid-template-columns: 1fr; min-height: 560px; }
  .hero-side { align-items: flex-end; justify-content: flex-start; padding-top: 0; }
  .home-grid, .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-grid { grid-template-columns: 1fr 1fr; }
  .map-panel { min-height: 650px; padding: 18px; background-position: center; }
  .level-grid { height: 590px; }
  .zone-label { display: none; }
  .battle-stage { min-height: 300px; }
}

@media (max-width: 620px) {
  .app-shell { padding: 12px 12px 28px; }
  .topbar { margin-bottom: 14px; }
  .brand small { display: none; }
  .brand-mark { width: 43px; height: 43px; border-radius: 14px; font-size: 23px; }
  .top-actions .player-pill { display: none; }
  .hero { min-height: 610px; border-width: 4px; border-radius: 28px; background-position: 22% center; }
  .hero-copy { justify-content: flex-start; padding: 40px 24px 10px; }
  .hero-copy > p:not(.eyebrow) { margin: 16px 0 22px; }
  .hero-side { padding: 20px; }
  .home-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .menu-card { min-height: 112px; padding: 15px; }
  .launcher-page { padding-top: 18px; }
  .launcher-hero { min-height: 440px; align-items: flex-start; padding: 34px 24px; border-radius: 28px; }
  .launcher-copy h2 { font-size: 54px; }
  .launcher-orbit { position: absolute; right: 24px; bottom: 28px; width: 145px; height: 145px; }
  .launcher-orbit span { font-size: 62px; }
  .game-library { margin-top: 44px; }
  .game-grid { grid-template-columns: 1fr; gap: 14px; }
  .game-card { flex-direction: row; min-height: 150px; }
  .game-card-art { width: 38%; height: auto; min-height: 150px; }
  .game-card-art span { font-size: 54px; }
  .game-card-body { padding: 16px; }
  .game-card-body strong { font-size: 17px; }
  .game-card-body small { min-height: 0; font-size: 12px; }
  .punish-page { padding-top: 8px; }
  .punish-top { padding: 14px; font-size: 12px; }
  .punish-top > div { align-items: flex-start; }
  .punish-top .back-btn { padding: 8px 10px; }
  .punish-arena { min-height: 395px; align-items: flex-start; padding: 32px 25px; }
  .punish-copy h2 { font-size: 36px; }
  .punish-monster { position: absolute; right: 18px; bottom: 16px; min-width: 130px; }
  .punish-monster > span { font-size: 92px; }
  .punish-hp { width: 118px; }
  .punish-question { width: calc(100% - 22px); margin-top: -18px; padding: 24px 15px; }
  .punish-choices { grid-template-columns: repeat(2, 1fr); }
  .phonics-page { padding-top: 8px; }
  .phonics-top { padding: 14px; font-size: 12px; }
  .phonics-top > div { align-items: flex-start; }
  .phonics-top > div span { font-size: 14px; }
  .phonics-top .back-btn { padding: 8px 10px; }
  .phonics-top .pill { min-width: auto; padding: 0 10px; }
  .phonics-card, .phonics-result { min-height: 490px; padding: 30px 18px; }
  .phonics-word-art { width: 120px; height: 120px; margin-top: 12px; font-size: 66px; }
  .phonics-options { grid-template-columns: repeat(2, 1fr); }
  .dictation-page { padding-top: 8px; }
  .dictation-top { padding: 14px; font-size: 12px; }
  .dictation-top > div { align-items: flex-start; }
  .dictation-top > div span { font-size: 14px; }
  .dictation-top .back-btn { padding: 8px 10px; }
  .dictation-top .pill { min-width: auto; padding: 0 10px; }
  .dictation-card, .dictation-result { min-height: 545px; padding: 25px 16px 30px; }
  .dictation-visual { width: 92px; height: 92px; font-size: 52px; }
  .dictation-form > div { grid-template-columns: 1fr; }
  .dictation-form button { min-height: 50px; }
  .dictation-answer { align-items: center; gap: 4px 8px; }
  .dictation-answer small { flex-basis: 100%; }
  .chinese-page { padding-top: 8px; }
  .chinese-top { padding: 14px; font-size: 12px; }
  .chinese-top > div { align-items: flex-start; }
  .chinese-top > div span { font-size: 14px; }
  .chinese-top .back-btn { padding: 8px 10px; }
  .chinese-top .pill { min-width: auto; padding: 0 10px; }
  .chinese-card, .chinese-result { min-height: 490px; padding: 30px 18px; }
  .chinese-word-art { width: 112px; height: 112px; margin-top: 12px; font-size: 63px; }
  .chinese-options { grid-template-columns: repeat(2, 1fr); }
  .section-head { align-items: flex-start; }
  .section-head .pill { display: none; }
  .map-panel { min-height: 570px; border-width: 4px; border-radius: 28px; background-position: center; }
  .level-grid { height: 520px; }
  .level-node { width: 53px; height: 53px; border-width: 4px; box-shadow: 0 6px 0 color-mix(in srgb, var(--node-color), #000 24%), 0 8px 16px rgba(24,21,67,.22); }
  .level-node.boss { width: 61px; height: 61px; }
  .battle-top { grid-template-columns: 1fr auto; }
  .battle-title { grid-column: 1 / -1; grid-row: 1; }
  .battle-top .stat-cluster:first-child { grid-row: 2; }
  .battle-top .stat-cluster.right { grid-row: 2; }
  .battle-arena { min-height: 610px; border-width: 4px; border-radius: 27px; }
  .battle-stage { min-height: 270px; padding-top: 28px; }
  .fighter-sprite { font-size: 75px; }
  .hp-bar { width: 110px; }
  .question-card { min-height: 290px; margin-bottom: 18px; padding: 18px 15px 22px; }
  .equation { margin: 10px 0 18px; }
  .choices { grid-template-columns: repeat(2, 1fr); }
  .panel-grid, .shop-grid { grid-template-columns: 1fr; }
  .result-stats { gap: 5px; }
  .modal { padding: 24px 20px; }
}

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