/* =========================================================
   盼盼学华文 — iPad-first, kid-friendly styles
   ========================================================= */
:root {
  --bg: #FFF4E0;
  --bg2: #FFE8C7;
  --card: #FFFFFF;
  --ink: #3B2A1A;
  --ink-soft: #8A6E55;
  --primary: #FF6B4A;
  --primary-dark: #E04E2E;
  --good: #3DBE6B;
  --bad: #F0524F;
  --gold: #FFC531;
  --shadow: 0 6px 0 rgba(59, 42, 26, .12), 0 10px 24px rgba(59, 42, 26, .10);
  --radius: 24px;
  --font: ui-rounded, "SF Pro Rounded", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --hz: "Kaiti SC", "STKaiti", "KaiTi", "PingFang SC", "Microsoft YaHei", serif;
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, #FFFBF2 0 120px, transparent 121px),
    radial-gradient(circle at 90% 85%, #FFE2B8 0 180px, transparent 181px),
    var(--bg);
  background-attachment: fixed;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
small { font-weight: 500; color: var(--ink-soft); }
/* Custom drawings scale with font-size exactly like emoji */
.pic-img { width: 1.15em; height: 1.15em; vertical-align: -0.2em; display: inline-block; pointer-events: none; }
.topic-title.long { font-size: 24px; white-space: nowrap; }
.level-title { margin-top: 30px; padding-bottom: 6px; border-bottom: 3px dashed var(--bg2); }
.py { display: block; font-size: .85em; color: var(--ink-soft); letter-spacing: .02em; }
.en { display: block; font-size: .78em; color: var(--ink-soft); opacity: .85; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) calc(20px + var(--safe-r)) 10px calc(20px + var(--safe-l));
  background: rgba(255, 244, 224, .92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--bg2);
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; margin-right: auto; }
.brand-logo { width: 46px; height: 46px; border-radius: 12px; box-shadow: 0 3px 0 rgba(0,0,0,.1); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 24px; letter-spacing: .02em; }
.brand-text b i { font-style: normal; font-size: 17px; color: var(--primary-dark); margin-left: 2px; }
.brand-text small { font-size: 14px; }
.about { text-align: center; font-size: 17px; color: var(--ink-soft); margin: 14px 0 4px; }
.stats { display: flex; align-items: center; gap: 8px; }
.chip {
  background: var(--card); border-radius: 999px; padding: 8px 14px;
  font-size: 18px; box-shadow: 0 3px 0 rgba(0,0,0,.08);
}
.icon-btn {
  width: 52px; height: 52px; border-radius: 16px; font-size: 24px;
  background: var(--card); box-shadow: 0 3px 0 rgba(0,0,0,.1);
  display: grid; place-items: center;
}
.icon-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.1); }

/* ---------- Screens ---------- */
.screen-host { padding: 20px calc(24px + var(--safe-r)) 40px calc(24px + var(--safe-l)); max-width: 1280px; margin: 0 auto; }
.screen { animation: fadeUp .35s ease both; }
.section-title { font-size: 24px; margin: 26px 4px 14px; }
.section-title small { font-size: 16px; margin-left: 6px; }

/* ---------- Home ---------- */
.mascot-row { display: flex; align-items: center; gap: 18px; }
.mascot { font-size: 96px; line-height: 1; cursor: pointer; filter: drop-shadow(0 6px 0 rgba(0,0,0,.08)); }
.mascot.big { font-size: 110px; }
.bubble {
  position: relative; background: var(--card); border-radius: 22px; padding: 16px 22px;
  font-size: 24px; box-shadow: var(--shadow); max-width: 560px;
}
.bubble::before {
  content: ""; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  border: 10px solid transparent; border-right: 16px solid var(--card); border-left: 0;
}
.bubble .en { font-size: 16px; margin-top: 4px; }

.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 16px; }
.topic-card {
  position: relative; background: var(--card); border-radius: var(--radius);
  padding: 22px 16px 18px; text-align: center; box-shadow: var(--shadow);
  border-top: 10px solid var(--c);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  animation: popIn .45s cubic-bezier(.2,1.4,.4,1) both; animation-delay: var(--d);
  transition: transform .12s;
}
.topic-card:active { transform: scale(.96); }
.topic-icon { font-size: 64px; line-height: 1.1; }
.topic-icon.big { font-size: 84px; }
.topic-title { font-size: 30px; font-weight: 800; font-family: var(--hz); }
.topic-card .py { font-size: 16px; }
.topic-card .en { font-size: 15px; }
.level {
  position: absolute; top: 10px; right: 12px; font-size: 13px; font-weight: 700;
  background: var(--c); color: #fff; border-radius: 999px; padding: 2px 10px;
}
.bar { width: 80%; height: 10px; background: #F3E6D3; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--c); border-radius: 99px; transition: width .6s; }
.topic-stars { font-size: 15px; color: var(--ink-soft); }

/* ---------- Topic ---------- */
.topic-head { display: flex; align-items: center; gap: 18px; }
.topic-head h1 { margin: 0; font-size: 44px; font-family: var(--hz); }
.topic-head .py { font-size: 20px; display: inline; margin-right: 8px; }
.topic-head .en { font-size: 18px; display: inline; }

.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.game-card {
  background: var(--c); color: #fff; border-radius: var(--radius); padding: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  box-shadow: 0 7px 0 rgba(0,0,0,.18); transition: transform .1s;
  text-shadow: 0 2px 0 rgba(0,0,0,.22);
}
.game-card:active { transform: translateY(4px); box-shadow: 0 3px 0 rgba(0,0,0,.18); }
.game-icon { font-size: 56px; }
.game-name b { display: block; font-size: 26px; }
.game-name small { color: rgba(255,255,255,.9); font-size: 16px; }
.game-skill { font-size: 13px; background: rgba(255,255,255,.25); border-radius: 99px; padding: 2px 10px; }
.stars { font-size: 28px; letter-spacing: 2px; }
.stars .on { color: var(--gold); text-shadow: 0 2px 0 rgba(0,0,0,.15); }
.stars .off { color: rgba(255,255,255,.4); }

.word-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.word-card {
  background: var(--card); border-radius: 20px; padding: 14px 8px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  animation: popIn .4s cubic-bezier(.2,1.4,.4,1) both; animation-delay: var(--d);
}
.word-card .pic { font-size: 48px; }
.word-card .hz { font-size: 36px; font-weight: 700; font-family: var(--hz); }
.word-card .py { font-size: 17px; }
.word-card .en { font-size: 14px; }
.word-card.pop { animation: pop .35s ease; }

/* ---------- Buttons ---------- */
.btn {
  border-radius: 18px; padding: 14px 24px; font-size: 20px; font-weight: 700;
  min-height: 56px; box-shadow: 0 5px 0 rgba(0,0,0,.15);
}
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.15); }
.btn.primary { background: var(--primary); color: #fff; }
.btn.ghost { background: var(--card); }

/* ---------- Game common ---------- */
.game-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.game-bar h2 { margin: 0; font-size: 26px; }
.game-bar h2 small { font-size: 16px; }
.game-bar .spacer { flex: 1; }
.progress { flex: 1; height: 16px; background: #F3E6D3; border-radius: 99px; overflow: hidden; max-width: 380px; }
.progress i { display: block; height: 100%; width: 0; background: var(--c); border-radius: 99px; transition: width .4s; }
.hint { text-align: center; color: var(--ink-soft); font-size: 18px; margin: 10px 0; }

/* ---------- Memory Flip ---------- */
.mem-grid {
  display: grid; gap: 14px; margin: 0 auto;
  grid-template-columns: repeat(var(--cols, 4), 1fr);
  max-width: 900px;
}
.mem-card { aspect-ratio: 1 / 1; perspective: 800px; }
.mem-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform .45s cubic-bezier(.3,1.3,.5,1); transform-style: preserve-3d;
}
.mem-card.flipped .mem-inner, .mem-card.matched .mem-inner { transform: rotateY(180deg); }
.mem-face {
  position: absolute; inset: 0; border-radius: 22px; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: var(--shadow);
}
.mem-back {
  background: var(--c);
  background-image: radial-gradient(rgba(255,255,255,.25) 2px, transparent 2px);
  background-size: 18px 18px; font-size: 48px;
}
.mem-front { background: var(--card); transform: rotateY(180deg); padding: 6px; }
.mem-front .hz { font-size: clamp(30px, 5.5vw, 56px); font-weight: 800; font-family: var(--hz); }
.mem-front .hz.len3 { font-size: clamp(26px, 4.2vw, 44px); }
.mem-front .hz.len4 { font-size: clamp(22px, 3.3vw, 36px); }
.mem-front .pic { font-size: clamp(40px, 7vw, 72px); }
.mem-front .py { font-size: 17px; }
.mem-front .en { font-size: 14px; }
.mem-front .mem-py { font-size: clamp(18px, 2.6vw, 28px); font-weight: 700; color: var(--primary-dark); text-align: center; line-height: 1.25; padding: 0 4px; }
.word-card .pic:empty { display: none; } /* P3+ words have no picture */
.mem-card.matched .mem-front { background: #E6F9EC; outline: 4px solid var(--good); }
.mem-card.matched { animation: pop .4s ease .3s; }
.mem-card.nope .mem-front { outline: 4px solid var(--bad); }

/* ---------- Listen / Hawker Hero ---------- */
.stall {
  position: relative; background: var(--card); border-radius: 28px; box-shadow: var(--shadow);
  padding: 22px; display: flex; align-items: center; gap: 22px; min-height: 210px; overflow: hidden;
}
.stall.hawker::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 26px;
  background: repeating-linear-gradient(90deg, #F0524F 0 40px, #fff 40px 80px);
  border-radius: 28px 28px 0 0;
}
.stall.hawker { padding-top: 44px; }
.customer { font-size: 110px; line-height: 1; transition: transform .4s; }
.customer.enter { animation: walkIn .55s ease both; }
.customer.leave { animation: walkOut .5s ease both; }
.order-bubble {
  flex: 1; background: var(--bg); border-radius: 22px; padding: 18px 22px; position: relative;
}
.order-bubble .hz-line { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; font-family: var(--hz); }
.order-bubble .py { font-size: 20px; }
.order-bubble .en { font-size: 16px; }
.say-btn {
  width: 84px; height: 84px; border-radius: 50%; font-size: 40px; background: var(--c); color: #fff;
  box-shadow: 0 6px 0 rgba(0,0,0,.18); flex-shrink: 0;
}
.say-btn:active { transform: translateY(3px); }
.say-btn.pulse { animation: pulse 1.2s ease infinite; }
.patience { height: 12px; background: #F3E6D3; border-radius: 99px; overflow: hidden; margin-top: 12px; }
.patience i { display: block; height: 100%; width: 100%; background: var(--good); border-radius: 99px; transition: width .25s linear, background .3s; }
.counter { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 16px; margin-top: 22px; }
.dish {
  background: var(--card); border-radius: 24px; padding: 14px 6px 12px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: min(200px, 26vh); justify-content: center;
  transition: transform .1s;
}
.dish:active { transform: scale(.95); }
.dish .pic { font-size: clamp(64px, 9vw, 96px); }
.dish .en { font-size: 15px; }
.dish.word { min-height: 120px; }
.dish-hz { font-family: var(--hz); font-weight: 800; font-size: clamp(30px, 4.2vw, 46px); }
.dish-hz.len3 { font-size: clamp(26px, 3.4vw, 38px); }
.dish-hz.len4, .dish-hz.len5 { font-size: clamp(20px, 2.6vw, 30px); }
.dish.right { background: #E6F9EC; outline: 5px solid var(--good); animation: pop .4s; }
.dish.wrong { background: #FDE8E8; outline: 5px solid var(--bad); animation: shake .4s; }
.coin-fly { position: fixed; font-size: 44px; pointer-events: none; z-index: 50; animation: coinUp .9s ease forwards; }

/* ---------- Stroke Master ---------- */
.stroke-wrap { display: flex; gap: 28px; align-items: center; justify-content: center; flex-wrap: wrap; }
.tian {
  position: relative; background: #FFFDF8; border-radius: 22px; box-shadow: var(--shadow);
  border: 4px solid var(--c); touch-action: none;
}
.tian svg.grid { position: absolute; inset: 0; pointer-events: none; }
.tian .writer { position: relative; }
.stroke-side { display: flex; flex-direction: column; gap: 14px; min-width: 240px; align-items: center; text-align: center; }
.stroke-side .big-hz { font-size: 34px; font-weight: 800; }
.stroke-side .py { font-size: 26px; }
.stroke-side .en { font-size: 18px; }
.stroke-side .btn { width: 100%; }
.brush-rating { font-size: 40px; min-height: 50px; }
.char-dots { display: flex; gap: 8px; justify-content: center; }
.char-dots span {
  width: 46px; height: 46px; border-radius: 12px; background: var(--card); display: grid; place-items: center;
  font-size: 24px; font-family: var(--hz); box-shadow: 0 3px 0 rgba(0,0,0,.08); color: var(--ink-soft);
}
.char-dots span.cur { outline: 3px solid var(--c); color: var(--ink); }
.char-dots span.done { background: #E6F9EC; color: var(--good); }
.offline-msg { text-align: center; font-size: 20px; padding: 30px; background: var(--card); border-radius: 22px; }

/* ---------- Dictation card (topic page) ---------- */
.game-grid.four { grid-template-columns: repeat(4, 1fr); }
.game-grid.five { grid-template-columns: repeat(3, 1fr); }
.game-card.group { cursor: default; padding: 16px 14px; gap: 8px; }
.game-card.group:active { transform: none; box-shadow: 0 7px 0 rgba(0,0,0,.18); }
.sub-game {
  width: 100%; background: rgba(255,255,255,.22); border-radius: 16px; padding: 8px 10px;
  display: flex; align-items: center; gap: 8px; text-align: left; color: #fff;
}
.sub-game:active { transform: scale(.97); background: rgba(255,255,255,.35); }
.sub-game .sub-name { flex: 1; line-height: 1.15; }
.sub-game .sub-name b { display: block; font-size: 19px; }
.sub-game .sub-name small { color: rgba(255,255,255,.92); font-size: 13px; }
.sub-game .stars { font-size: 18px; letter-spacing: 0; }
.sub-game .sub-icon { font-size: 26px; }

/* ---------- 听写 Listen & Write ---------- */
.dict-prompt {
  display: flex; align-items: center; gap: 20px; background: var(--card); border-radius: 24px;
  padding: 14px 20px; box-shadow: var(--shadow); margin-bottom: 18px;
}
.dict-reveal { flex: 1; font-size: 26px; font-weight: 700; }
.dict-reveal .en { font-size: 16px; font-weight: 500; }
.dict-reveal .py { font-size: 22px; font-weight: 600; color: var(--primary-dark); display: inline; margin-right: 10px; }
.dict-answer { font-family: var(--hz); font-size: 40px; margin-right: 12px; }
.dict-answer .pic { font-family: var(--font); }
.dict-tools { display: flex; flex-direction: column; gap: 8px; }
.dict-tools .btn { min-height: 46px; padding: 8px 16px; font-size: 17px; }
.dict-boxes { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.dict-boxes .tian { border-color: #EADCC8; transition: border-color .2s, transform .2s; }
.dict-boxes .tian.active { border-color: var(--c); transform: scale(1.02); }

/* ---------- 认拼音 Pick the Pinyin ---------- */
.py-card {
  background: var(--card); border-radius: 28px; box-shadow: var(--shadow); text-align: center;
  padding: 18px 20px 14px; border-top: 10px solid var(--c);
}
.py-word { font-family: var(--hz); font-size: clamp(80px, 13vw, 130px); font-weight: 800; line-height: 1.15; }
.py-word.pop { animation: popIn .4s cubic-bezier(.2,1.4,.4,1); }
.py-after { font-size: 26px; min-height: 40px; color: var(--ink); }
.py-after .en { display: inline; font-size: 18px; margin-left: 8px; }
.py-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 20px; }
.py-opt {
  background: var(--card); border-radius: 22px; box-shadow: var(--shadow); min-height: 88px;
  font-size: clamp(28px, 3.6vw, 40px); font-weight: 700; letter-spacing: .03em;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
.py-opt:active { transform: scale(.97); }
.py-opt.right { background: #E6F9EC; outline: 5px solid var(--good); animation: pop .4s; }
.py-opt.wrong { background: #FDE8E8; outline: 5px solid var(--bad); animation: shake .4s; }

/* ---------- 📷 My Dictation ---------- */
.en-always { font-size: 18px; color: var(--ink-soft); }
.btn.small { min-height: 44px; padding: 8px 16px; font-size: 16px; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .45; pointer-events: none; }
.mylists-banner {
  width: 100%; margin-top: 22px; display: flex; align-items: center; gap: 16px; text-align: left;
  background: linear-gradient(120deg, #FF6B4A, #FF9A5A); color: #fff; border-radius: var(--radius);
  padding: 16px 22px; box-shadow: 0 7px 0 rgba(0,0,0,.15); text-shadow: 0 2px 0 rgba(0,0,0,.15);
}
.mylists-banner:active { transform: translateY(4px); box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.ml-icon { font-size: 48px; }
.ml-text { flex: 1; }
.ml-text b { display: block; font-size: 28px; }
.ml-text small { color: rgba(255,255,255,.95); font-size: 16px; }
.ml-count { font-size: 20px; font-weight: 800; background: rgba(255,255,255,.25); border-radius: 99px; padding: 6px 14px; white-space: nowrap; }

.ml-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.ml-action {
  display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow); cursor: pointer; text-align: left;
}
.ml-action.primary { background: var(--c); color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.15); }
.ml-action.primary small { color: rgba(255,255,255,.95); }
.ml-action:active { transform: scale(.98); }
.ml-a-icon { font-size: 52px; }
.ml-action b { display: block; font-size: 28px; }
.ml-action small { font-size: 16px; }
.ml-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.ml-card {
  background: var(--card); border-radius: 22px; padding: 16px 18px; box-shadow: var(--shadow); text-align: left;
  display: flex; flex-direction: column; gap: 6px; border-left: 8px solid var(--c);
}
.ml-card-name { font-size: 24px; font-weight: 800; }
.ml-card-words { font-size: 20px; font-family: var(--hz); }
.ml-card-meta { font-size: 14px; color: var(--ink-soft); }
.ml-card .stars .off { color: #EADCC8; }
.ml-empty { background: var(--card); border-radius: 22px; padding: 28px; text-align: center; font-size: 22px; color: var(--ink-soft); }
.privacy-note { text-align: center; color: var(--ink-soft); font-size: 15px; margin-top: 26px; }

/* crop */
.crop-stage { display: flex; justify-content: center; }
.crop-wrap { position: relative; display: inline-block; touch-action: none; cursor: crosshair; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.crop-wrap img { display: block; max-width: min(100%, 1100px); max-height: calc(100vh - 330px); -webkit-user-drag: none; }
.crop-box { position: absolute; border: 4px solid var(--c); background: rgba(255,107,74,.12); box-shadow: 0 0 0 9999px rgba(0,0,0,.35); border-radius: 6px; pointer-events: none; }
.scan-actions { display: flex; gap: 14px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.scan-actions label.btn { display: inline-flex; align-items: center; cursor: pointer; }
.ocr-progress { max-width: 520px; margin: 20px auto 0; text-align: center; font-size: 19px; }
.ocr-progress .progress { max-width: none; height: 20px; }

/* review */
.rv-cols { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; }
.rv-panel { background: var(--card); border-radius: 24px; box-shadow: var(--shadow); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.rv-label { font-size: 20px; font-weight: 800; margin-top: 4px; }
.rv-label small { font-size: 14px; }
.rv-panel textarea, .rv-panel input {
  font: inherit; font-size: 20px; border: 3px solid var(--bg2); border-radius: 14px; padding: 10px 12px;
  background: #FFFDF8; color: var(--ink); -webkit-user-select: text; user-select: text; width: 100%;
}
.rv-panel textarea { resize: vertical; font-family: var(--hz); line-height: 1.5; }
.rv-panel textarea:focus, .rv-panel input:focus { outline: none; border-color: var(--c); }
.rv-panel .btn.small { align-self: flex-start; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; max-height: 300px; overflow-y: auto; padding: 2px; }
.chip-w {
  font-family: var(--hz); font-size: 22px; padding: 8px 14px; border-radius: 14px; min-height: 48px;
  background: var(--bg); border: 3px solid transparent;
}
.chip-w.on { background: #E6F9EC; border-color: var(--good); }
.chip-w.on::after { content: " ✓"; color: var(--good); font-family: var(--font); font-size: 16px; }
.rv-add { display: flex; gap: 8px; }
.rv-add input { flex: 1; }
.rv-name { font-weight: 700; }
.rv-tip { margin: 0; font-size: 14px; color: var(--ink-soft); }
.rv-list { margin: 0; padding: 0 0 0 30px; max-height: 46vh; overflow-y: auto; }
.rv-list li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 2px dashed var(--bg2); font-size: 16px; }
.rv-list li::marker { color: var(--ink-soft); }
.rv-list .hz { font-family: var(--hz); font-size: 26px; font-weight: 700; min-width: 88px; }
.rv-list .py-in { flex: 1; font-size: 18px; padding: 6px 10px; min-width: 0; }
.rv-hear, .rv-rm, .rv-edit, .rv-ok { width: 44px; height: 44px; border-radius: 12px; background: var(--bg); font-size: 18px; flex-shrink: 0; }
.rv-ok { background: var(--good); color: #fff; font-weight: 900; }
.py-syls { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.syl {
  min-width: 52px; min-height: 44px; padding: 4px 10px; border-radius: 12px; font-size: 20px; font-weight: 700;
  background: #FFF4E0; border: 2px dashed #E8C9A8; font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
.syl:active { transform: scale(.94); background: #FFE2B8; }
.rv-conv { margin: 0; font-size: 15px; background: #E9F6FF; border-radius: 12px; padding: 8px 12px; }
.rv-conv b { font-family: var(--hz); font-size: 18px; }
.rv-rm { color: var(--bad); }
.rv-none { color: var(--ink-soft); font-size: 16px; list-style: none; }
.rv-save { width: 100%; margin-top: 6px; }

/* paragraph */
.rv-para { border-top: 3px dashed var(--bg2); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.rv-para-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.seg { display: flex; background: var(--bg); border-radius: 16px; padding: 4px; gap: 4px; }
.seg-btn { padding: 10px 16px; border-radius: 12px; font-size: 18px; font-weight: 700; min-height: 48px; }
.seg-btn.on { background: var(--c); color: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.para-box {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px;
  display: flex; gap: 18px; align-items: flex-start;
}
.para-box .say-btn { width: 64px; height: 64px; font-size: 30px; }
.para-text { font-family: var(--hz); font-size: 26px; line-height: 1.8; flex: 1; }
.paper-peek.para { font-family: var(--hz); font-size: 24px; line-height: 1.7; max-width: 640px; text-align: left; }
.paper-peek.para .hz { font-size: 40px; }
.para-answer {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px;
  display: flex; flex-wrap: wrap; gap: 8px 4px; line-height: 1.6;
}
.pa-phrase {
  font-family: var(--hz); font-size: 28px; padding: 6px 10px; border-radius: 12px;
  background: var(--bg); border: 3px solid transparent;
}
.pa-phrase .pa-punct { color: var(--ink-soft); }
.pa-phrase.wrong { background: #FDE8E8; border-color: var(--bad); text-decoration: underline wavy var(--bad); text-underline-offset: 6px; }

/* list screen */
.ml-title { flex: 1; }
.ml-head-actions { display: flex; gap: 10px; }
.paper-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 20px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.paper-opts { display: flex; gap: 24px; flex: 1; flex-wrap: wrap; }
.toggle.small { font-size: 19px; border: 0; padding: 4px 0; }
.big-btn { font-size: 22px; min-height: 64px; padding: 14px 28px; }
.last-wrong {
  margin-top: 14px; background: #FFF1E6; border: 3px dashed var(--c); border-radius: 18px; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 18px;
}
.last-wrong b { font-family: var(--hz); font-size: 22px; }
.mylist .word-card .py { display: block; }

/* paper dictation */
.paper-stage {
  background: var(--card); border-radius: 32px; box-shadow: var(--shadow); padding: 28px 24px 26px;
  display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 760px; margin: 0 auto;
}
.paper-num { font-size: 34px; font-weight: 800; }
.paper-num b { font-size: 64px; color: var(--c); margin: 0 6px; }
.say-btn.huge { width: 150px; height: 150px; font-size: 70px; }
.paper-peek { background: var(--bg); border-radius: 20px; padding: 10px 30px; text-align: center; }
.paper-peek .hz { display: block; font-family: var(--hz); font-size: 56px; font-weight: 800; }
.paper-peek .py { font-size: 22px; }
.paper-nav { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

.answer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.answer {
  position: relative; background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 14px 10px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 2px; border: 4px solid transparent;
}
.answer .num { position: absolute; top: 8px; left: 12px; font-size: 15px; color: var(--ink-soft); font-weight: 700; }
.answer .mark { position: absolute; top: 6px; right: 12px; font-size: 22px; color: var(--good); font-weight: 900; }
.answer .hz { font-family: var(--hz); font-size: 36px; font-weight: 800; }
.answer .py { font-size: 17px; color: var(--ink-soft); }
.answer.wrong { border-color: var(--bad); background: #FDE8E8; }
.answer.wrong .mark { color: var(--bad); }
.answer-summary { text-align: center; font-size: 30px; font-weight: 800; margin: 20px 0 14px; }
.answer-summary b { color: var(--good); font-size: 40px; }

@media (max-width: 820px) {
  .rv-cols, .ml-actions { grid-template-columns: 1fr; }
  .ml-text small { display: none; }
}

/* ---------- Result popup ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 40; background: rgba(59, 42, 26, .45);
  display: grid; place-items: center; animation: fade .25s ease both; padding: 20px;
}
.result-card {
  background: var(--card); border-radius: 32px; padding: 26px 40px 30px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.25); animation: popIn .5s cubic-bezier(.2,1.4,.4,1) both; max-width: 520px; width: 100%;
}
.result-card h2 { font-size: 44px; margin: 6px 0 0; }
.result-card .en { font-size: 18px; }
.result-stars { font-size: 76px; margin: 8px 0; letter-spacing: 6px; }
.result-stars span { display: inline-block; animation: starIn .5s cubic-bezier(.2,1.6,.4,1) both; animation-delay: var(--d); }
.result-stars .on { color: var(--gold); text-shadow: 0 4px 0 #E0A000; }
.result-stars .off { color: #EADCC8; }
.result-coins { font-size: 26px; font-weight: 700; margin: 4px 0 18px; }
.badge { font-size: 15px; background: var(--good); color: #fff; padding: 4px 10px; border-radius: 99px; margin-left: 6px; vertical-align: middle; }
.result-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 45; overflow: hidden; }
.confetti span { position: absolute; top: -40px; animation: fall linear forwards; }

/* ---------- 家长专区 Parents' area ---------- */
.gate-card {
  background: var(--card); border-radius: 32px; padding: 24px 30px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.25); animation: popIn .4s cubic-bezier(.2,1.4,.4,1) both;
  width: min(400px, 100%);
}
.gate-card.shake { animation: shake .4s; }
.gate-title { margin: 0; font-size: 26px; }
.gate-sub { margin: 6px 0 12px; font-size: 16px; color: var(--ink-soft); }
.gate-display {
  font-size: 34px; font-weight: 800; background: var(--bg); border-radius: 18px; padding: 12px;
  min-height: 66px; font-variant-numeric: tabular-nums;
}
.gate-display.pin { letter-spacing: 12px; color: var(--primary); }
.gate-msg { min-height: 22px; margin: 8px 0; font-size: 15px; color: var(--bad); }
.gate-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gate-key {
  height: 60px; border-radius: 18px; font-size: 26px; font-weight: 700;
  background: var(--bg); box-shadow: 0 3px 0 rgba(0,0,0,.1);
}
.gate-key:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.1); }
.gate-key.ok { background: var(--good); color: #fff; }
.gate-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.gate-actions .btn { box-shadow: none; color: var(--ink-soft); }

body.parent-mode .topbar { background: rgba(232, 240, 250, .94); border-bottom-color: #C9D8EC; }
body.parent-mode .stats .chip, body.parent-mode #btn-parent { display: none; }
.pa-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pa-head h1 { margin: 0; font-size: 34px; }
.pa-head h1 small { font-size: 18px; }
.pa-head .btn small { color: rgba(255,255,255,.9); font-size: 14px; margin-left: 4px; }
.pa-card { background: var(--card); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow); }
.pa-label { margin: 6px 0 10px; font-size: 20px; }
.pa-label small { font-size: 15px; margin-left: 4px; }
.pa-levels { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pa-lv {
  min-width: 76px; min-height: 54px; padding: 6px 10px; border-radius: 16px; font-size: 19px; font-weight: 800;
  background: var(--bg); border: 3px solid transparent; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.pa-lv small { font-size: 12px; font-weight: 500; }
.pa-lv.auto { font-size: 16px; }
.pa-lv.on { background: #E6F9EC; border-color: var(--good); }
.pa-skill { display: grid; grid-template-columns: 210px 1fr; align-items: center; gap: 12px; border-top: 2px solid var(--bg2); padding-top: 12px; }
.pa-skill .pa-levels { margin-bottom: 12px; }
.pa-skill-name { font-size: 20px; }
.pa-skill-name small { display: block; font-size: 14px; }
.pa-row { display: grid; grid-template-columns: minmax(220px, 1.4fr) 130px 1fr 110px; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 2px solid var(--bg2); font-size: 18px; }
.pa-row:last-child { border-bottom: 0; }
.pa-row .bar { width: 100%; margin: 0; --c: var(--gold); }
.pa-row-stars { text-align: right; white-space: nowrap; }
.pa-row.empty { color: var(--ink-soft); }
.pa-row-soon { grid-column: 2 / -1; font-size: 16px; }
.pa-row-count.two small { display: block; font-size: 14px; white-space: nowrap; }
.pa-soon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pa-soon { display: flex; flex-direction: column; gap: 4px; opacity: .75; }
.pa-soon span { font-size: 40px; }
.pa-soon b { font-size: 22px; }
.pa-soon small { font-size: 15px; }
.pa-soon em { font-style: normal; font-size: 14px; font-weight: 700; color: var(--primary-dark); margin-top: 4px; }
.pa-lock-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pa-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin-bottom: 18px; }
.pa-topic {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; text-align: left;
  min-height: 64px; padding: 8px 12px; border-radius: 16px; background: var(--bg); border: 3px solid transparent;
}
.pa-topic.on { background: #E6F9EC; border-color: var(--good); }
.pa-topic.on .pa-topic-text b::after { content: " ✓"; color: var(--good); font-family: var(--font); }
.pa-topic-icon { font-size: 32px; }
.pa-topic-text b { display: block; font-size: 20px; font-family: var(--hz); }
.pa-topic-text small { font-size: 13px; }
.pa-topic-meta { font-size: 13px; text-align: right; white-space: nowrap; color: var(--ink-soft); }
.pa-topic-meta i { display: block; font-style: normal; font-weight: 700; }
.pa-topic.s1 .pa-topic-meta i { color: var(--primary-dark); }
.pa-topic.s2 .pa-topic-meta i { color: #B07A00; }
.pa-topic.s3 .pa-topic-meta i { color: #23924A; }
.pa-plan-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 2px solid var(--bg2); padding-top: 12px; font-size: 18px; }
.pa-plan-foot .btn { margin-left: auto; }

.pa-lv:disabled { opacity: .45; }
.pa-sec { min-width: 140px; font-size: 18px; }
.pa-assigned {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: #E6F9EC; border-radius: 16px; padding: 12px 16px; margin-bottom: 14px; font-size: 18px;
}
.pa-assigned small { display: block; font-size: 14px; }
.pa-hist-title { border-top: 2px solid var(--bg2); padding-top: 14px; margin-top: 18px; }
.pa-hist {
  display: grid; grid-template-columns: 70px 1fr auto auto; align-items: center; gap: 14px; width: 100%;
  text-align: left; padding: 12px 14px; border-radius: 16px; background: var(--bg); margin-bottom: 8px; font-size: 18px; min-height: 56px;
}
.pa-hist-date { font-weight: 800; color: var(--ink-soft); }
.pa-hist-pct { font-size: 24px; font-weight: 800; }
.pa-hist-go { color: var(--primary-dark); font-weight: 700; }
.pa-ok { align-self: center; color: #23924A; font-weight: 700; font-size: 16px; }

/* 考试报告 */
.rep-row { display: grid; grid-template-columns: 170px 1fr 90px minmax(200px, 1.1fr); align-items: center; gap: 14px; padding: 12px 0; border-bottom: 2px solid var(--bg2); }
.rep-row:last-child { border-bottom: 0; }
.rep-name { font-size: 20px; }
.rep-name small, .rep-pct small, .rep-tip small { display: block; font-size: 13px; }
.rep-row .bar { width: 100%; margin: 0; --c: var(--gold); }
.rep-row .bar.good { --c: var(--good); }
.rep-row .bar.low { --c: var(--bad); }
.rep-pct { text-align: right; font-size: 22px; }
.rep-tip { font-size: 17px; }
.rep-tip.good b { color: #23924A; }
.rep-tip.mid b { color: #B07A00; }
.rep-tip.low b { color: var(--bad); }
.rep-wrong { margin: 0; padding-left: 4px; list-style: none; font-size: 18px; }
.rep-wrong li { padding: 8px 0; border-bottom: 1px dashed var(--bg2); }
.rep-wrong li:last-child { border-bottom: 0; }
.rep-sec { font-size: 13px; font-weight: 700; background: var(--bg2); border-radius: 99px; padding: 2px 8px; margin-right: 6px; }
.rep-ans { color: #23924A; font-weight: 700; margin-left: 10px; }
.rep-chosen { color: var(--bad); margin-left: 10px; }
@media (max-width: 900px) {
  .rep-row { grid-template-columns: 1fr auto; row-gap: 6px; }
  .rep-row .bar { grid-column: 1 / -1; grid-row: 2; }
  .rep-tip { grid-column: 1 / -1; }
  .pa-hist { grid-template-columns: 56px 1fr auto; }
  .pa-hist-go { display: none; }
}

/* 模拟考试 (child) */
/* 🔁 错字重温 */
.review-banner { margin-top: 14px; background: linear-gradient(120deg, #E8833A, #F5B841); animation: popIn .45s cubic-bezier(.2,1.4,.4,1) both; }
.review .counter { margin-top: 6px; }
.rv-msg { font-size: 20px; min-height: 64px; margin-top: 16px; }
.rv-msg small { font-size: 15px; color: var(--ink-soft); }
.rv-msg .py, .rv-msg .en { display: inline; margin-left: 6px; }
.rv-word { font-family: var(--hz); font-size: 30px; font-weight: 800; }
.rv-sum { font-size: 19px; margin: 6px 0 0; }
.rv-list { display: flex; flex-direction: column; }
.rv-row { display: grid; grid-template-columns: 1fr auto auto auto 48px; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--bg2); }
.rv-row:last-child { border-bottom: 0; }
.rv-h { font-family: var(--hz); font-size: 24px; font-weight: 700; }
.rv-h small, .rv-due small { display: block; font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.rv-kind { font-size: 15px; color: var(--ink-soft); }
.rv-dots { display: flex; gap: 4px; }
.rv-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--bg2); }
.rv-dots i.on { background: var(--good); }
.rv-due { font-size: 15px; text-align: right; min-width: 70px; }
.rv-row .btn.small { min-height: 44px; min-width: 44px; padding: 4px; }
.exam-banner { margin-top: 14px; background: linear-gradient(120deg, #2F9E6E, #5BC98B); animation: popIn .45s cubic-bezier(.2,1.4,.4,1) both; }
.ex-secs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-top: 22px; }
.ex-sec-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.ex-sec-card span { font-size: 44px; }
.ex-sec-card b { font-size: 26px; }
.ex-rules { text-align: center; font-size: 22px; margin: 26px 0 10px; line-height: 1.5; }
.ex-rules .en { font-size: 16px; }
.ex-start { text-align: center; }
.btn.big { font-size: 26px; padding: 18px 40px; }
.ex-big { text-align: center; font-size: 110px; line-height: 1.2; margin-top: 6px; }
.ex-big.hz { font-family: var(--hz); font-size: 96px; }
.ex-big.py { font-size: 64px; font-weight: 700; color: var(--primary-dark); }
.ex-q { text-align: center; font-size: 28px; font-weight: 700; margin: 10px 0 6px; }
.ex-q .en { font-size: 16px; font-weight: 500; }
.ex-tag { text-align: center; font-size: 20px; color: var(--ink-soft); margin: 4px 0; }
.ex-sentence { text-align: center; font-size: 38px; font-family: var(--hz); background: var(--card); border-radius: 22px; padding: 26px 18px; box-shadow: var(--shadow); }
.ex-blank { color: #5B8DEF; font-weight: 800; }
.ex-blank.dim { color: var(--ink-soft); font-weight: 500; }
.ex-passage .ex-blank { background: #EAF1FE; border-radius: 8px; }
.ex-passage .ex-blank.dim { background: none; }
.ex-passage { background: var(--card); border-radius: 22px; padding: 16px 26px; box-shadow: var(--shadow); }
.ex-passage h3 { margin: 4px 0 6px; text-align: center; font-size: 26px; }
.ex-passage p { margin: 0 0 6px; font-size: 26px; line-height: 1.75; font-family: var(--hz); text-indent: 2em; }
.ex-listen { display: flex; align-items: center; gap: 18px; background: var(--card); border-radius: 22px; padding: 14px 22px; box-shadow: var(--shadow); font-size: 24px; }
.ex-listen small { display: block; font-size: 16px; }
.ex-listen .say-btn:disabled { opacity: .4; }
.ex-mini { width: 48px; height: 48px; border-radius: 14px; background: var(--card); box-shadow: 0 3px 0 rgba(0,0,0,.1); font-size: 22px; vertical-align: middle; }
.ex-opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 16px; }
.ex-opt {
  min-height: 76px; padding: 12px 16px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow);
  font-size: 30px; font-family: var(--hz); font-weight: 700; border: 4px solid transparent;
}
.ex-opts.py .ex-opt { font-family: var(--font); font-size: 28px; }
.ex-opt:active { transform: scale(.97); }
/* 🔊 on quiz answers (U.sayBtn) */
.ex-opt, .cq-opt { position: relative; }
.ex-opt:has(.opt-say), .cq-opt:has(.opt-say) { padding-right: 62px; }
.opt-say {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: #EAF1FE; font-size: 22px; font-family: var(--font); box-shadow: 0 2px 0 rgba(0,0,0,.08);
}
.opt-say:active { transform: translateY(-50%) scale(.92); }
.opt-say.q-say { position: static; transform: none; display: inline-grid; vertical-align: middle; margin-left: 10px; font-size: 22px; }
.opt-say.q-say:active { transform: scale(.92); }
.opt-say.pop { animation: none; background: #D5E3FD; }
.ex-opt.right { background: #E6F9EC; border-color: var(--good); animation: pop .4s; }
.ex-opt.wrong { background: #FDE8E8; border-color: var(--bad); animation: shake .4s; }
.wu-word { font-size: 1.2em; font-weight: 800; color: #5B8DEF; }
/* 完成对话: one line per speaker, left-aligned inside the centred card */
.wu-talk { display: inline-block; text-align: left; font-size: 32px; line-height: 1.5; vertical-align: middle; }
.wu-talk p { margin: 2px 0; }
.game-wordUse .ex-sentence { margin-top: 6px; }
.game-wordUse .py-after { text-align: center; font-size: 26px; font-weight: 700; min-height: 40px; margin-top: 12px; font-family: var(--hz); color: #23924A; }
/* 重组句子 Sentence Builder */
.ro-line {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px;
  min-height: 104px; margin-top: 8px; padding: 16px; border-radius: 22px;
  background: var(--card); box-shadow: var(--shadow); border: 4px dashed #C9D6F5;
}
.ro-line.right { border: 4px solid var(--good); background: #E6F9EC; animation: pop .4s; }
.ro-line.wrong { border: 4px solid var(--bad); background: #FDE8E8; animation: shake .4s; }
.ro-empty { font-size: 22px; color: var(--ink-soft); }
.ro-bank { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; min-height: 76px; margin-top: 10px; }
.ro-tile {
  min-height: 60px; min-width: 60px; padding: 8px 18px; border-radius: 16px;
  background: #FFF6D9; border: 3px solid #F2C94C; box-shadow: 0 4px 0 rgba(0,0,0,.12);
  font-size: 30px; font-family: var(--hz); font-weight: 700; color: var(--ink);
  touch-action: manipulation;
}
.ro-line .ro-tile { background: #EAF1FE; border-color: #8FB0F5; }
.ro-tile:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.12); }
.ro-after { text-align: center; font-size: 24px; font-weight: 700; min-height: 40px; margin-top: 10px; color: var(--ink-soft); }
.ro-after .en { display: inline; margin-left: 8px; font-size: 16px; }
.ro-answer { font-family: var(--hz); font-size: 30px; color: #23924A; }
.ro-tools { display: flex; justify-content: center; gap: 14px; margin-top: 18px; }
.ro-tools .btn small { font-size: 13px; font-weight: 500; }
.ro-tools [hidden] { display: none; }
.cy-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding: 10px 14px; background: rgba(123, 92, 255, .08); border-radius: 20px; }
.cy-strip-title { font-size: 18px; font-weight: 800; margin-right: 4px; }
.cy-strip-title small { font-size: 13px; }
.cy-mini {
  display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 14px 6px 8px; border-radius: 16px;
  background: var(--card); box-shadow: 0 3px 0 rgba(0,0,0,.08); border-left: 6px solid var(--c); text-align: left;
}
.cy-mini:active { transform: scale(.97); }
.cy-mini-icon { font-size: 28px; }
.cy-mini b { display: block; font-family: var(--hz); font-size: 20px; }
.cy-mini .stars { font-size: 13px; }
.ex-opt.picked { border-color: #5B8DEF; background: #EAF1FE; }
.ex-done-note { font-size: 18px; margin: 0 0 16px; }
.ex-done-note .en { font-size: 14px; }
.game-bar .chip + .chip { margin-left: -4px; }
@media (max-width: 820px) {
  .ex-passage p { font-size: 23px; }
  .ex-opt { font-size: 26px; }
}

/* 今天的任务 on the child's home screen */
.task-box { margin: 18px 0 20px; padding: 2px 16px 18px; border-radius: 28px; background: rgba(255, 197, 49, .2); border: 3px dashed var(--gold); }
.task-box .section-title { margin-top: 16px; }
.topic-card.done { background: #F1FBF4; }
.task-done {
  position: absolute; top: -12px; left: -8px; width: 40px; height: 40px; border-radius: 50%;
  background: var(--good); color: #fff; font-size: 24px; font-weight: 800; display: grid; place-items: center;
  box-shadow: 0 3px 0 rgba(0,0,0,.15);
}
@media (max-width: 900px) {
  .pa-skill { grid-template-columns: 1fr; gap: 6px; }
  .pa-row { grid-template-columns: 1fr auto; row-gap: 6px; }
  .pa-row .bar { grid-column: 1; grid-row: 2; }
  .pa-row-stars { grid-column: 2; grid-row: 2; }
  .pa-row-soon { grid-column: 2; }
  .pa-soon-grid { grid-template-columns: 1fr; }
}

/* ---------- Settings sheet ---------- */
.sheet {
  border: 0; border-radius: 28px; padding: 26px 30px; width: min(480px, 92vw);
  box-shadow: 0 20px 60px rgba(0,0,0,.25); font-family: var(--font); color: var(--ink);
}
.sheet::backdrop { background: rgba(59, 42, 26, .45); }
.sheet h2 { margin-top: 0; }
.toggle {
  display: flex; align-items: center; gap: 14px; font-size: 22px; padding: 12px 0;
  border-bottom: 2px solid var(--bg2);
}
.toggle input { width: 30px; height: 30px; accent-color: var(--primary); }
.toggle small { font-size: 15px; margin-left: 4px; }
.toggle.voice-lang { justify-content: space-between; flex-wrap: wrap; }
.voice-note { font-size: 15px; color: var(--ink-soft); }
.sheet-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; }
.sheet-actions .ghost { font-size: 15px; box-shadow: none; color: var(--bad); }
.sheet-actions .ghost:disabled { opacity: .35; }
/* Settings in sections: 地区 → 华文 → 数学 → English → 共用 */
.sheet { width: min(560px, 94vw); max-height: 90dvh; overflow-y: auto; }
.set-group { margin: 10px 0 0; padding: 4px 16px 6px; border-radius: 20px; background: var(--bg); }
.set-group h3 { margin: 10px 0 2px; font-size: 21px; }
.set-group h3 small { font-size: 14px; font-weight: 600; color: var(--ink-soft); margin-left: 4px; }
.set-group .toggle { font-size: 20px; padding: 10px 0; }
.set-group .toggle:last-child { border-bottom: 0; }
.set-group.soon { opacity: .55; padding-bottom: 8px; }
.set-note { margin: -4px 0 4px; font-size: 14px; color: var(--ink-soft); }
.set-lockbar {
  display: none; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 18px; background: #FFF4DC; font-size: 18px; font-weight: 700;
}
.set-lockbar small { display: block; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.sheet.is-locked .set-lockbar { display: flex; }
.sheet.is-locked .set-locked { opacity: .5; filter: grayscale(.4); }

/* ---------- 成语动画 Idiom Stories ---------- */
.idiom-banner { margin-top: 14px; background: linear-gradient(120deg, #7B5CFF, #4FB3FF); }
.hero-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hero-card {
  background: var(--card); border-radius: 22px; padding: 10px 10px 14px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; border: 5px solid transparent;
}
.hero-card.on { border-color: var(--primary); background: #FFF8EE; }
.hero-card svg { width: 170px; height: 196px; }
.hero-card b { font-size: 24px; }
.hero-card small { font-size: 15px; }
.hero-card.on .hero-bob { animation: bob 1.6s ease-in-out infinite; }
.seg { display: inline-flex; background: var(--card); border-radius: 999px; padding: 5px; box-shadow: 0 3px 0 rgba(0,0,0,.08); }
.seg button { min-height: 48px; padding: 6px 18px; border-radius: 999px; font-size: 19px; font-weight: 700; white-space: nowrap; }
.seg button small { font-size: 13px; }
.seg button.on { background: var(--primary); color: #fff; }
.seg button.on small { color: rgba(255,255,255,.9); }
.cy-voice:empty { display: none; }
.cy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.cy-card {
  background: var(--card); border-radius: 22px; padding: 16px 18px; box-shadow: var(--shadow); text-align: left;
  display: flex; flex-direction: column; gap: 2px; border-top: 8px solid var(--c, #CDBBA4);
}
.cy-card:active { transform: scale(.98); }
.cy-card.soon { opacity: .5; }
.cy-icon { font-size: 36px; }
.cy-hz { font-family: var(--hz); font-size: 40px; font-weight: 800; letter-spacing: .06em; }
.cy-card .py { font-size: 17px; }
.cy-card .en { font-size: 14px; }
.cy-meta { margin-top: 6px; display: flex; align-items: center; gap: 8px; font-size: 22px; }
.cy-meta .stars .off { color: #EADCC8; }
.cy-meta .stars .on { color: var(--gold); }

.story-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.story-head .seg { margin-left: auto; }
.cy-tiles { display: flex; gap: 8px; }
.cy-tile { background: var(--card); border-radius: 16px; padding: 6px 12px; min-width: 70px; min-height: 44px; box-shadow: 0 4px 0 rgba(0,0,0,.1); text-align: center; }
.cy-tile b { font-family: var(--hz); font-size: 36px; display: block; line-height: 1.1; color: var(--c); }
.cy-tile .py { font-size: 15px; }
.cy-tile .en { font-size: 12px; white-space: nowrap; }
.cy-tile.pop { animation: pop .35s ease; }
.stage-wrap { position: relative; width: min(100%, max(520px, calc((100vh - 430px) * 1.786))); margin: 0 auto; }
.stage { display: block; width: 100%; height: auto; border-radius: 26px; background: #E4F6FF; box-shadow: var(--shadow); border: 4px solid #fff; }
.subtitle {
  display: block; width: min(100%, max(520px, calc((100vh - 430px) * 1.786))); margin: 14px auto 0; text-align: left;
  background: var(--card); border-radius: 20px; padding: 12px 20px; min-height: 84px;
  font-size: 25px; line-height: 1.5; box-shadow: 0 4px 0 rgba(0,0,0,.08);
}
.subtitle mark { background: #FFE58A; border-radius: 6px; padding: 0 4px; color: inherit; }
.subtitle .en { font-size: 16px; margin-top: 2px; }
.story-ctrl { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 14px; }
.scene-dots { display: flex; gap: 8px; }
.scene-dots i { width: 14px; height: 14px; border-radius: 50%; background: #EADCC8; transition: background .3s, transform .3s; }
.scene-dots i.seen { background: #FFC2A8; }
.scene-dots i.on { background: var(--primary); transform: scale(1.3); }
.story-end {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: 26px;
  background: rgba(59, 42, 26, .35); animation: fade .3s ease both; padding: 12px;
}
.end-card { background: var(--card); border-radius: 28px; padding: 18px 30px 22px; text-align: center; max-width: 560px; animation: popIn .45s cubic-bezier(.2,1.4,.4,1) both; }
.end-hz { font-family: var(--hz); font-size: 60px; font-weight: 800; letter-spacing: .1em; color: var(--c); }
.end-mean { font-size: 22px; margin: 8px 0 2px; }
.end-card .en { font-size: 16px; margin-bottom: 14px; }
.end-card .btn small { color: inherit; opacity: .85; font-size: 14px; }

/* 高年级成语 video stories */
.cy-badge { align-self: flex-start; margin-top: 6px; background: var(--c); color: #fff; border-radius: 999px; padding: 3px 12px; font-size: 14px; font-weight: 700; }
.vstage { aspect-ratio: 16 / 9; object-fit: cover; background: #2A2018; }
.vplay {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 110px; height: 110px; border-radius: 50%; font-size: 48px; padding-left: 8px;
  background: rgba(255, 255, 255, .92); color: var(--c); box-shadow: var(--shadow);
}
.vplay[hidden] { display: none; }

.cq-box { max-width: 860px; margin: 0 auto; }
.cq-q {
  width: 100%; display: flex; align-items: center; gap: 16px; text-align: left;
  background: var(--card); border-radius: 22px; padding: 18px 22px; box-shadow: var(--shadow); font-size: 28px;
}
.cq-q .say { font-size: 34px; }
.cq-q .en { font-size: 16px; }
.cq-opts { display: grid; gap: 14px; margin-top: 18px; }
.cq-opt {
  background: var(--card); border-radius: 20px; padding: 16px 22px; text-align: left; font-size: 24px; min-height: 64px;
  box-shadow: 0 5px 0 rgba(0,0,0,.12); border: 4px solid transparent;
}
.cq-opt .en { font-size: 15px; }
.cq-opt.right { border-color: var(--good); background: #E8F8EE; animation: pop .35s ease; }
.cq-opt.wrong { border-color: var(--bad); opacity: .55; animation: shake .4s ease; }

@media (max-width: 820px) {
  .hero-card svg { width: 130px; height: 150px; }
  .story-head .seg { margin-left: 0; }
  .story-ctrl .lbl { display: none; }
}

/* ---------- 高级华文 HCL (js/games/hcl.js) ---------- */
.word-card { position: relative; }
.word-card.deep { outline: 3px solid #B794F6; padding-top: 26px; }
.deep-tag {
  position: absolute; top: 5px; right: 8px; font-size: 13px; font-weight: 800; color: #fff;
  background: #8E5BE8; border-radius: 999px; padding: 1px 8px;
}
.hcl-passage {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 24px;
  font-family: var(--hz); font-size: 24px; line-height: 2.1; text-indent: 2em; margin: 8px 0 14px;
}
.hcl-blank {
  display: inline-block; text-indent: 0; font: inherit; font-weight: 800; color: #5B8DEF; background: #EAF1FE;
  border: 3px solid transparent; border-radius: 10px; padding: 0 4px; line-height: 1.5; min-height: 44px;
  touch-action: manipulation; cursor: pointer;
}
.hcl-blank.cur { border-color: #5B8DEF; animation: pulse 1.6s infinite; }
.hcl-blank.done { color: var(--good); background: #E6F9EC; cursor: default; }
.hcl-blank i, .hcl-mark i {
  font-style: normal; font-family: var(--font); font-size: 14px; font-weight: 800; color: #fff;
  background: #5B8DEF; border-radius: 999px; padding: 0 6px; margin-right: 4px; vertical-align: super;
}
.hcl-blank.done i { background: var(--good); }
.hcl-bank { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.hcl-bank .ex-opt { font-size: 26px; min-height: 64px; }
.hcl-bank .ex-opt.used { opacity: .35; }
.hcl-bank.over .ex-opt { pointer-events: none; }
.hcl-end { display: flex; justify-content: center; gap: 16px; margin-top: 16px; }
.hcl-mark { text-indent: 0; font-weight: 800; color: var(--bad); border-radius: 8px; padding: 0 2px; }
.hcl-mark.word { color: var(--ink); }
.hcl-mark.cur { background: #FFF1C2; outline: 3px solid var(--gold); }
.hcl-mark.fixed { color: var(--good); }
.hcl-mark.fixed i { background: var(--good); }
.hcl-ask .dict-q { font-size: 22px; }
.hcl-fix .hcl-passage { font-size: 22px; line-height: 1.9; padding: 12px 20px; margin-bottom: 8px; }
.hcl-fix .dict-prompt { margin: 0; }
.hcl-fix .dict-boxes { margin-top: 8px; }
.hcl-fix .hint { margin: 4px 0; }
@media (max-width: 820px) {
  .hcl-passage { font-size: 22px; padding: 14px 16px; }
  .hcl-bank { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Animations ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: scale(.6); } }
@keyframes pop { 50% { transform: scale(1.12); } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes pulse { 50% { transform: scale(1.08); box-shadow: 0 0 0 12px rgba(255,255,255,0), 0 6px 0 rgba(0,0,0,.18); } }
@keyframes walkIn { from { transform: translateX(-160%) rotate(-8deg); opacity: 0; } }
@keyframes walkOut { to { transform: translateX(260%) rotate(8deg); opacity: 0; } }
@keyframes coinUp { to { transform: translate(var(--dx), var(--dy)) scale(.5); opacity: 0; } }
@keyframes starIn { from { transform: scale(0) rotate(-90deg); opacity: 0; } }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }
@keyframes bob { 50% { transform: translateY(-8px); } }
@keyframes wiggleK { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
@keyframes jump { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-24px); } }
.bob { animation: bob 2.4s ease-in-out infinite; }
.wiggle { animation: wiggleK .5s ease; }
.jump { animation: jump .8s ease 2; }

/* ---------- Responsive (portrait iPad / small) ---------- */
@media (max-width: 1100px) {
  .game-grid.four, .game-grid.five { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .game-grid, .game-grid.four, .game-grid.five { grid-template-columns: 1fr; }
  .game-card.group { flex-direction: column; align-items: stretch; }
  .dict-prompt { flex-wrap: wrap; }
  .game-card { flex-direction: row; justify-content: flex-start; text-align: left; }
  .game-card .stars { margin-left: auto; }
  .game-icon { font-size: 44px; }
  .brand-text small { display: none; }
}
@media (orientation: portrait) {
  .counter { grid-template-columns: repeat(2, 1fr); }
  .dish { min-height: 22vh; }
  .dish .pic { font-size: clamp(80px, 14vw, 130px); }
}
@media (max-width: 600px) {
  .brand-text { display: none; }
  .chip { padding: 6px 10px; font-size: 16px; }
  .mascot { font-size: 70px; }
  .bubble { font-size: 19px; }
  .stall { flex-direction: column; text-align: center; }
  .customer { font-size: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- 📖 朗读练习 Reading aloud (js/reading.js) ---------- */
.reading-banner { margin-top: 14px; background: linear-gradient(120deg, #2E9E8F, #57C4A6); }
.rd-steps { display: flex; gap: 10px; justify-content: center; list-style: none; padding: 0; margin: 0 0 12px; flex-wrap: wrap; }
.rd-steps li { background: var(--card); border-radius: 99px; padding: 6px 16px; font-size: 18px; color: var(--ink-soft); box-shadow: 0 3px 0 rgba(0,0,0,.08); }
.rd-steps li .en { display: inline; margin-left: 4px; font-size: 14px; }
.rd-steps li.on { background: var(--c); color: #fff; }
.rd-steps li.on .en { color: rgba(255,255,255,.9); }
.rd-paper {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 30px 24px;
  max-width: 900px; margin: 0 auto; --lh: 52px;
}
.rd-title { text-align: center; font-family: var(--hz); font-size: 32px; margin: 0 0 8px; }
.rd-text { font-family: var(--hz); font-size: 30px; line-height: var(--lh); text-indent: 2em; -webkit-user-select: none; user-select: none; }
.rd-text ruby { ruby-position: over; }
.rd-text rt { font-family: var(--font); font-size: 14px; color: var(--ink-soft); }
.rd-paper:has(ruby) { --lh: 66px; }
.rd-sent { border-radius: 8px; cursor: pointer; transition: background .2s; }
.rd-sent.say { background: #FFE6A8; }
.rd-tip { font-size: 16px; }
.rd-tip .en { display: inline; margin-left: 6px; }
.rd-tools { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.rd-tools .btn small { font-size: 14px; margin-left: 4px; opacity: .85; }
.rd-rec { background: #E9524A; }
.recording .rd-rec { background: #333; animation: pulse 1.2s ease-in-out infinite; }
.rd-status { text-align: center; font-size: 19px; min-height: 30px; margin: 12px 0 4px; }
.rd-status small { display: block; font-size: 14px; color: var(--ink-soft); }
.rd-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: #E9524A; vertical-align: middle; animation: blink 1s steps(2) infinite; }
.rd-compare { display: flex; gap: 10px; justify-content: center; align-items: center; font-size: 18px; }
.rd-compare small { color: var(--ink-soft); font-size: 14px; }
.rd-done-row { text-align: center; margin: 16px 0 8px; }
.rd-py { min-width: 96px; }
.rd-rate-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 14px; }
.rd-rate-opts .btn { display: flex; flex-direction: column; align-items: center; font-size: 40px; padding: 12px 6px; }
.rd-rate-opts b { font-size: 18px; margin-top: 4px; }
.rd-rate-opts small { font-size: 13px; color: var(--ink-soft); }
.rd-rate h2 { font-size: 30px; }
@keyframes blink { 50% { opacity: .15; } }
@keyframes pulse { 50% { transform: scale(1.05); } }
/* hub */
.rd-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.rd-item {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 20px; text-align: left;
  background: var(--card); box-shadow: var(--shadow); border-left: 10px solid var(--c);
}
.rd-item-icon { font-size: 40px; width: 52px; text-align: center; }
.rd-item-icon img { width: 48px; height: 48px; }
.rd-item-text { flex: 1; }
.rd-item-text b { display: block; font-size: 22px; }
.rd-item-text small { color: var(--ink-soft); font-size: 15px; }
/* parent list */
.rd-plist { display: flex; flex-direction: column; }
.rd-prow { display: grid; grid-template-columns: 1fr auto auto 48px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--bg2); }
.rd-prow:last-child { border-bottom: 0; }
.rd-pname b { display: block; font-size: 19px; }
.rd-pname small { color: var(--ink-soft); font-size: 14px; }
.rd-pplay, .rd-checks { display: flex; gap: 6px; flex-wrap: wrap; }
.rd-check { min-height: 44px; padding: 4px 10px; border-radius: 12px; background: var(--bg); font-size: 16px; font-weight: 700; line-height: 1.1; }
.rd-check small { display: block; font-size: 11px; font-weight: 400; color: var(--ink-soft); }
.rd-check.on { background: var(--good); color: #fff; }
.rd-check.on small { color: rgba(255,255,255,.9); }
@media (max-width: 900px) {
  .rd-prow { grid-template-columns: 1fr 48px; }
  .rd-pplay, .rd-checks { grid-column: 1 / -1; }
  .rd-prow > .btn { grid-row: 1; grid-column: 2; }
}
@media (max-width: 820px) {
  .rd-list { grid-template-columns: 1fr; }
  .rd-paper { padding: 16px 20px 20px; }
  .rd-text { font-size: 27px; }
}

/* ---------- 🗣️ 说话 看图说话 / 看录像会话 (js/speaking.js) ---------- */
.rd-kind { font-size: 19px; font-weight: 700; margin: 4px 0 8px; }
.rd-kind small { font-weight: 400; color: var(--ink-soft); font-size: 15px; margin-left: 4px; }
.rd-list + .rd-kind { margin-top: 16px; }
.sp-wrap { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; align-items: start; }
.sp-media { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; }
.sp-img, .sp-media video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; background: #000; }
.sp-title { text-align: center; font-size: 20px; font-weight: 700; margin: 8px 0 2px; }
.sp-side { display: flex; flex-direction: column; gap: 10px; }
.sp-tip { margin: 0; font-size: 19px; }
.sp-tip .en { display: inline; margin-left: 6px; font-size: 14px; }
.sp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-chip { min-height: 44px; padding: 6px 14px; border-radius: 99px; background: var(--card); box-shadow: 0 3px 0 rgba(0,0,0,.08); font-size: 19px; font-weight: 700; }
.sp-chip.say { background: #FFE6A8; }
.sp-q:empty { display: none; }
.sp-q { background: var(--card); border-radius: 18px; padding: 12px 16px; box-shadow: 0 3px 0 rgba(0,0,0,.08); font-size: 21px; line-height: 1.5; }
.sp-q b { display: block; margin: 2px 0 8px; }
.sp-qn { display: inline-block; background: var(--c); color: #fff; border-radius: 99px; padding: 2px 12px; font-size: 15px; font-weight: 700; }
.sp-tools { display: flex; gap: 10px; flex-wrap: wrap; }
.sp-tools .btn { flex: 1 1 140px; font-size: 18px; padding: 10px 12px; }
.sp-tools .btn small { font-size: 13px; margin-left: 4px; opacity: .85; }
.sp-side .rd-status { text-align: left; margin: 0; min-height: 0; font-size: 17px; }
.sp-model { background: #FFF9EC; border: 2px dashed #F3D9A4; border-radius: 16px; padding: 10px 14px; font-family: var(--hz); font-size: 21px; line-height: 1.6; }
.sp-model small { display: block; font-family: var(--font); font-size: 13px; color: var(--ink-soft); }
.sp-side .rd-done-row { text-align: left; margin: 4px 0 0; }
.sp-side .rd-done-row small { font-size: 13px; margin-left: 6px; opacity: .85; }
@media (max-width: 900px), (orientation: portrait) {
  .sp-wrap { grid-template-columns: 1fr; }
}
.sp-novideo { aspect-ratio: 16 / 9; border-radius: 16px; background: #F3E6D3; display: grid; place-content: center; text-align: center; font-size: 22px; padding: 16px; }
.sp-novideo small { display: block; font-size: 15px; color: var(--ink-soft); margin-top: 6px; }
/* 朗读 language switch */
.rd-lang { display: inline-flex; background: var(--card); border-radius: 99px; padding: 3px; box-shadow: 0 3px 0 rgba(0,0,0,.08); }
.rd-lang-b { min-height: 40px; padding: 4px 14px; border-radius: 99px; font-size: 17px; font-weight: 700; color: var(--ink-soft); }
.rd-lang-b.on { background: var(--c); color: #fff; }

/* ---------- Home hub: background picture + corner doors (docs/design/HOME_REDESIGN.md) ---------- */
#scene {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .4s ease;
  background: var(--scene-land) center / cover no-repeat;
}
#scene::after { content: ""; position: absolute; inset: 0; background: rgba(255, 244, 224, .74); opacity: 0; transition: opacity .4s ease; }
@media (orientation: portrait) { #scene { background-image: var(--scene-port); } }
body.scene-on #scene { opacity: 1; }
body.scene-dim #scene::after { opacity: 1; }
.screen-host { position: relative; z-index: 1; }

.hub { min-height: calc(100vh - 140px); min-height: calc(100dvh - 140px); display: flex; flex-direction: column; }
.hub .mascot-row { margin-top: 4px; }
.doors {
  flex: 1; display: grid; grid-template-columns: 1.2fr 1.2fr 1fr 1fr; gap: 22px;
  align-items: center; align-content: center; padding: 24px 0 8px;
}
.door {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 14px 20px; border-radius: 34px; text-align: center;
  background: rgba(255, 255, 255, .78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 3px solid rgba(255, 255, 255, .9); box-shadow: 0 8px 0 rgba(59, 42, 26, .12), 0 16px 32px rgba(59, 42, 26, .14);
  animation: popIn .45s cubic-bezier(.2, 1.4, .4, 1) both;
}
.door:nth-child(2) { animation-delay: 60ms; } .door:nth-child(3) { animation-delay: 120ms; } .door:nth-child(4) { animation-delay: 180ms; }
.door:active { transform: translateY(5px); box-shadow: 0 3px 0 rgba(59, 42, 26, .12), 0 8px 16px rgba(59, 42, 26, .12); }
.door-img { display: block; width: 100%; aspect-ratio: 1; }
.door-img img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 8px 10px rgba(59, 42, 26, .18)); }
.door-learn .door-img, .door-exercise .door-img { animation: bob 3.2s ease-in-out infinite; }
.door-exercise .door-img { animation-delay: -1.6s; }
.door-name b { display: block; font-size: 32px; letter-spacing: .04em; }
.door-name .en { font-size: 16px; }
.door-sub { font-size: 16px; font-weight: 700; color: var(--ink-soft); background: var(--bg); border-radius: 99px; padding: 4px 12px; }
.door-learn .door-name b { color: var(--primary-dark); }
.door-exercise .door-name b { color: #2A9A58; }
.door-badge {
  position: absolute; top: -10px; right: -10px; min-width: 50px; height: 50px; padding: 0 10px; border-radius: 99px;
  display: grid; place-items: center; font-size: 26px; font-weight: 800; color: #fff;
  background: var(--bad); border: 4px solid #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .15);
}
.door.waiting .door-badge { animation: pulse 1.6s ease-in-out infinite; }
.door.locked { background: rgba(255, 255, 255, .6); }
.door.locked .door-img img { filter: grayscale(.55) opacity(.7) drop-shadow(0 6px 8px rgba(59, 42, 26, .12)); }
.door.locked .door-name b { font-size: 26px; color: var(--ink-soft); }
.door-soon { font-size: 16px; font-weight: 800; color: #fff; background: #A79A8C; border-radius: 99px; padding: 4px 12px; }
.door-soon small { color: rgba(255, 255, 255, .9); font-size: 13px; }

/* Corner screens */
.corner-head { display: flex; align-items: center; gap: 16px; }
.corner-img { width: 104px; height: 104px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(59, 42, 26, .16)); }
.corner-head h1 { margin: 0; font-size: 38px; letter-spacing: .04em; }
.corner-head .en { font-size: 17px; }
.corner.learn .corner-head h1 { color: var(--primary-dark); }
.corner.exercise .corner-head h1 { color: #2A9A58; }
.grade-tabs { display: flex; gap: 10px; margin-top: 20px; overflow-x: auto; padding: 10px 6px 8px; scrollbar-width: none; }
.grade-tabs::-webkit-scrollbar { display: none; }
.grade-tab {
  position: relative; flex: 1 0 auto; min-width: 104px; min-height: 64px; padding: 8px 14px; border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--card); box-shadow: 0 4px 0 rgba(0, 0, 0, .1);
}
.grade-tab b { font-size: 22px; }
.grade-tab small { font-size: 14px; }
.grade-tab.on { background: var(--primary); color: #fff; box-shadow: 0 4px 0 var(--primary-dark); }
.grade-tab.on small { color: rgba(255, 255, 255, .92); }
.grade-tab .me { position: absolute; top: -6px; right: -4px; font-style: normal; font-size: 13px; font-weight: 800; background: var(--good); color: #fff; border-radius: 99px; padding: 2px 7px; }
.task-box.empty { background: rgba(255, 255, 255, .6); }
.task-empty { margin: 0 4px 4px; font-size: 20px; font-weight: 700; }
.task-empty small { display: block; font-size: 15px; margin-top: 4px; }
.soon-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; padding: 12px 16px; border-radius: 22px; border: 3px dashed #CDBFAF; background: rgba(255, 255, 255, .5); }
.soon-title { font-size: 18px; font-weight: 800; color: var(--ink-soft); margin-right: 4px; }
.soon-chip { font-size: 17px; font-weight: 700; color: var(--ink-soft); background: var(--card); border-radius: 99px; padding: 6px 14px; opacity: .8; }

@media (orientation: portrait), (max-width: 900px) {
  .doors { grid-template-columns: 1fr 1fr; gap: 20px; align-content: center; }
  .door-img { width: 78%; }
  .door.locked .door-img { width: 58%; }
}
@media (max-width: 600px) {
  .doors { gap: 12px; }
  .door { padding: 10px 8px 14px; border-radius: 26px; }
  .door-name b { font-size: 24px; } .door.locked .door-name b { font-size: 20px; }
  .door-sub, .door-soon { font-size: 13px; }
  .corner-img { width: 72px; height: 72px; }
  .corner-head h1 { font-size: 30px; }
}

/* ---------- 📋 PSLE 全卷模拟 (js/psle.js) ---------- */
.psle-banner { background: linear-gradient(120deg, #3F6FD8, #6F9BF2); }
.ps-papers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 20px; }
.ps-paper {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 18px 14px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 3px solid transparent;
}
.ps-paper:active { transform: scale(.98); }
.ps-paper b { font-size: 22px; }
.ps-paper small { font-size: 14px; color: var(--ink-soft); }
.ps-paper-icon { font-size: 44px; }
.ps-paper-meta { font-size: 15px; color: var(--ink-soft); }
.ps-paper-go { margin-top: 6px; font-weight: 800; color: #3F6FD8; font-size: 18px; }
.ps-paper.done { border-color: var(--good); background: #F2FBF5; }
.ps-paper.done .ps-paper-go { color: var(--good); }
.ps-paper:disabled { opacity: 1; pointer-events: none; }
.chip.ps-low { background: #FDE8E8; color: var(--bad); animation: pulse 1.6s infinite; }
.ps-n { margin: 4px 0 0; font-weight: 800; color: #3F6FD8; font-size: 18px; }
.ex-passage.ps-long p { font-size: 22px; line-height: 1.7; }
.ex-passage.ps-notice p { text-indent: 0; font-family: var(--font); font-size: 19px; line-height: 1.6; margin: 0 0 2px; }
.ps-kind { font-size: 15px; background: #EAF1FE; color: #3F6FD8; border-radius: 8px; padding: 2px 8px; vertical-align: middle; }
.ps-open { background: var(--card); border-radius: 22px; padding: 14px 22px 14px 64px; box-shadow: var(--shadow); font-size: 22px; line-height: 1.6; margin: 12px 0 20px; }
.ps-open li { margin: 6px 0; }
.ps-m { color: var(--ink-soft); font-size: 16px; }
/* 写作 */
.ps-choose { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 12px; }
.ps-choice {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 220px; padding: 18px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 3px solid transparent;
}
.ps-choice:active { border-color: #5B8DEF; }
.ps-choice img { width: 100%; border-radius: 14px; }
.ps-choice-kind { font-size: 20px; font-weight: 800; color: #3F6FD8; }
.ps-title { font-family: var(--hz); font-size: 34px; }
.ps-title.big { font-size: 46px; display: block; text-align: center; margin: 10px 0; }
.ps-label { margin: 0; font-weight: 800; color: var(--ink-soft); }
.ps-write { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: start; margin-top: 8px; }
.ps-write-media { background: var(--card); border-radius: 22px; padding: 16px; box-shadow: var(--shadow); }
.ps-write-media img { width: 100%; border-radius: 14px; display: block; }
.ps-write-media p { font-size: 19px; margin: 10px 0 0; }
.ps-tips { font-size: 21px; line-height: 1.6; padding-left: 28px; margin: 6px 0 12px; }
.ps-paper-note { font-size: 19px; background: #FFF7E0; border-radius: 14px; padding: 10px 14px; }
.ps-paper-note .en { font-size: 14px; }
/* 口试 */
.ps-prep { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.ps-talk video { width: 100%; border-radius: 16px; background: #000; display: block; }
.ps-talk .sp-q { margin-top: 12px; }
.psle .rd-paper { margin-top: 6px; }
/* 家长: 评分 */
.ps-parent { border-top: 2px solid var(--bg2); margin-top: 18px; padding-top: 6px; }
.ps-pick { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 8px 12px; margin: 8px 0; }
.ps-pick .pa-levels { margin: 0; }
.ps-pick-label b { display: block; }
.ps-pick-label small { color: var(--ink-soft); font-size: 13px; }
.ps-total { font-size: 34px; color: #3F6FD8; }
.ps-rub { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--bg2); }
.ps-rub-name { flex: 1; }
.ps-rub-name small { margin-left: 6px; }
.ps-rub-tip { display: block; margin: 2px 0 0 !important; color: var(--ink-soft); font-size: 14px; }
.ps-rub-in { font-size: 20px; font-weight: 800; white-space: nowrap; }
.ps-rub-in input { width: 78px; min-height: 48px; font-size: 22px; text-align: center; border: 2px solid var(--bg2); border-radius: 12px; font-weight: 800; }
.ps-parts { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 17px; margin: 4px 0 10px; }
.ps-details { margin: 8px 0; background: var(--bg); border-radius: 12px; padding: 8px 14px; }
.ps-details summary { cursor: pointer; font-weight: 700; min-height: 32px; }
.ps-ptext { font-size: 17px; line-height: 1.6; margin: 4px 0; }
.ps-oq { border-top: 1px solid var(--bg2); padding: 10px 0; }
.ps-oq-q { margin: 0 0 6px; font-size: 18px; }
.ps-oq-a { margin: 0 0 6px; font-size: 17px; background: #F2FBF5; border-radius: 10px; padding: 8px 12px; }
.ps-oq-a small, .ps-oq-k small { display: block; color: var(--ink-soft); font-size: 13px; }
.ps-oq-k { margin: 0 0 8px; font-size: 15px; }
.ps-oq-k span { display: inline-block; background: #EAF1FE; border-radius: 8px; padding: 2px 8px; margin: 2px 4px 2px 0; }
.ps-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-chip { min-width: 48px; min-height: 48px; border-radius: 12px; background: var(--card); border: 2px solid var(--bg2); font-size: 20px; font-weight: 800; }
.ps-chip.on { background: #E6F9EC; border-color: var(--good); }
.ps-recs { margin: 6px 0 10px; }
.ps-rec-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--bg2); font-size: 16px; }
.ps-rec-row > span:last-child { display: flex; gap: 6px; flex-shrink: 0; }
@media (orientation: portrait), (max-width: 900px) {
  .ps-write, .ps-prep { grid-template-columns: 1fr; }
  .ps-rec-row { flex-direction: column; align-items: stretch; }
}
@media (max-width: 640px) {
  .ps-papers, .ps-choose { grid-template-columns: 1fr; }
}
.ps-u { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.ps-words { display: grid; grid-template-columns: repeat(4, 1fr); border: 2px solid var(--ink-soft); border-radius: 8px; overflow: hidden; margin-top: 6px; }
.ps-words span { padding: 8px 4px; text-align: center; font-family: var(--hz); font-size: 20px; border: 1px solid var(--bg2); }
.ps-dialogue { background: var(--card); border-radius: 22px; padding: 12px 22px; box-shadow: var(--shadow); font-size: 21px; line-height: 1.6; }
.ps-dialogue p { margin: 4px 0; }
.ex-opts.ps-wide { grid-template-columns: 1fr; }
.ex-opts.ps-wide .ex-opt { text-align: left; font-size: 22px; }
.ps-bank-n { display: inline-block; min-width: 30px; color: #3F6FD8; }
@media (min-width: 900px) { .ex-opts.ps-wide.ps-bank2 { grid-template-columns: 1fr 1fr; } }
/* 看图作文: the 6-panel picture needs the full width */
.ps-write.pic { grid-template-columns: 1fr; }
.ps-write.pic .ps-write-media img { max-height: 62vh; width: auto; max-width: 100%; margin: 0 auto; background: #fff; }

/* ---------- Home shelf: subjects (js/core/app.js goShelf) ---------- */
.shelf-tasks { margin-top: 14px; padding: 12px 14px 4px; border-radius: 26px; background: rgba(255, 255, 255, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.shelf-tasks-title { display: block; font-size: 20px; font-weight: 800; margin: 0 4px 4px; }
.shelf-tasks-title small { font-size: 15px; color: var(--ink-soft); margin-left: 6px; }
.shelf-tasks .topic-grid { margin-top: 6px; }
.subjects { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-content: center; padding: 22px 0 8px; }
.subject-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 220px;
  padding: 20px 14px 22px; border-radius: 34px; text-align: center; justify-content: center;
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 3px solid rgba(255, 255, 255, .9); box-shadow: 0 8px 0 rgba(59, 42, 26, .12), 0 16px 32px rgba(59, 42, 26, .14);
  animation: popIn .45s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: var(--d, 0ms);
}
.subject-card:active { transform: translateY(5px); box-shadow: 0 3px 0 rgba(59, 42, 26, .12), 0 8px 16px rgba(59, 42, 26, .12); }
.subject-mark {
  display: grid; place-items: center; width: 108px; height: 108px; border-radius: 32px;
  font-size: 54px; font-weight: 900; color: #fff; background: var(--c); letter-spacing: -.02em;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .16); pointer-events: none;
}
.subject-card:not(.locked) .subject-mark, .subject-card:not(.locked) .subject-img { animation: bob 3.2s ease-in-out infinite; }
.subject-img { display: block; width: 150px; height: 150px; pointer-events: none; }
.subject-img img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(59, 42, 26, .18)); }
.subject-card.locked .subject-img img { filter: grayscale(.55) opacity(.7) drop-shadow(0 6px 8px rgba(59, 42, 26, .12)); }
.subject-name b { display: block; font-size: 34px; letter-spacing: .03em; color: var(--c); }
.subject-name small { font-size: 16px; color: var(--ink-soft); }
.subject-card.locked { background: rgba(255, 255, 255, .6); }
.subject-card.locked .subject-mark { filter: grayscale(.5) opacity(.65); }
.subject-card.locked .subject-name b { color: var(--ink-soft); font-size: 28px; }
.subject-card.waiting .door-badge { animation: pulse 1.6s ease-in-out infinite; }
.doors.mini { flex: 0 0 auto; grid-template-columns: 1fr 1fr; gap: 22px; padding: 6px 0 4px; }
.doors.mini .door { flex-direction: row; justify-content: center; gap: 14px; padding: 10px 18px; border-radius: 26px; }
.doors.mini .door-img { width: 72px; flex: 0 0 72px; }
.doors.mini .door-name b { font-size: 24px; }
.doors.mini .door { flex-wrap: wrap; row-gap: 4px; }
.doors.mini .door-soon { white-space: nowrap; }
.doors.two { grid-template-columns: 1fr 1fr; max-width: 820px; width: 100%; margin: 0 auto; }
.region-chip:empty { display: none; }
.region-chip { font-size: 20px; padding-left: 10px; padding-right: 10px; }

/* First-run region picker */
.region-card { max-width: 640px; }
.region-card h2 small { display: block; font-size: 17px; color: var(--ink-soft); margin-top: 4px; }
.region-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0 10px; }
.region-opt {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 10px; border-radius: 26px;
  background: var(--bg); border: 3px solid transparent; box-shadow: 0 5px 0 rgba(0, 0, 0, .1); min-height: 44px;
}
.region-opt:active { transform: translateY(3px); border-color: var(--primary); }
.region-flag { font-size: 56px; line-height: 1.1; }
.region-opt b { font-size: 30px; }
.region-opt > small { font-size: 16px; color: var(--ink-soft); }
.region-note { margin-top: 6px; font-size: 17px; font-weight: 700; background: var(--card); border-radius: 14px; padding: 6px 12px; }
.region-note small { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.region-foot { font-size: 16px; color: var(--ink-soft); margin: 6px 0 0; }
.region-foot small { display: block; font-size: 14px; }

/* 家长专区: one tab per subject */
.pa-subject-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 4px; }
.pa-subject-tab {
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 8px 18px; border-radius: 99px;
  font-size: 19px; background: var(--card); box-shadow: 0 4px 0 rgba(0, 0, 0, .1);
}
.pa-subject-tab.on { background: var(--primary); color: #fff; box-shadow: 0 4px 0 var(--primary-dark); }
.pa-subject-tab.soon { opacity: .55; box-shadow: none; font-size: 16px; }
.pa-subject-tab.soon small { font-size: 13px; }

@media (orientation: portrait), (max-width: 900px) {
  .subjects { gap: 16px; }
  .subject-card { min-height: 200px; }
  .subject-mark { width: 92px; height: 92px; font-size: 46px; }
  .subject-img { width: 130px; height: 130px; }
  .doors.mini .door-img { width: 64px; flex-basis: 64px; }
  .doors.two .door-img { width: 78%; }
}
@media (max-width: 600px) {
  .subjects { grid-template-columns: 1fr; }
  .subject-card { flex-direction: row; min-height: 0; padding: 14px 18px; justify-content: flex-start; text-align: left; flex-wrap: wrap; }
  .subject-mark { width: 64px; height: 64px; font-size: 30px; border-radius: 20px; }
  .subject-img { width: 72px; height: 72px; }
  .doors.mini .door { padding: 8px 10px; gap: 8px; }
  .doors.mini .door-img { width: 44px; flex-basis: 44px; }
  .doors.mini .door-name b { font-size: 18px; }
  .region-opts { grid-template-columns: 1fr; }
}

/* ---------- 📖 高华阅读理解 (js/subjects/chinese/hcl-reading.js) ---------- */
.hr-banner { background: linear-gradient(120deg, #6A4FD8, #A18BF2); }
.hr-list .ps-paper-name { display: flex; flex-direction: column; gap: 2px; }
.hr-list .grade-tabs { margin-top: 12px; }
.ps-paper-go.hr-wait { color: #C77A12; }
.ps-paper.done .ps-paper-go.hr-wait { color: #C77A12; }
.hr-passage p { text-indent: 0; }
.hr-pn { display: inline-block; min-width: 1.6em; color: #6A4FD8; font-weight: 800; }
.hr-qs li { margin: 10px 0; }
.hr-table { border-collapse: collapse; margin: 8px 0 4px; font-size: 18px; width: 100%; max-width: 640px; }
.hr-table th, .hr-table td { border: 2px solid var(--bg2); padding: 6px 10px; text-align: left; vertical-align: top; }
.hr-table th { background: #F1EDFE; }
.hr-table td { height: 2.2em; }
.hr-mk { float: right; font-weight: 800; color: var(--good); }
.hr-note { margin: 0; }
.rep-row.hr-row { grid-template-columns: 1fr auto auto; }

/* ---------- 📝 高华模拟卷 (js/subjects/chinese/hcl-mock.js) ---------- */
.hm-banner { background: linear-gradient(120deg, #4F3BB8, #8E6FF0); }
.hm-time { display: flex; justify-content: center; gap: 12px; margin: 14px 0 4px; }
.hm-sit { display: block; font-size: 17px; color: var(--ink-soft); margin-top: 6px; text-align: left; line-height: 1.5; }
.hm-sit-text { font-size: 20px; line-height: 1.7; margin: 4px 0 0; }
.hcl-blank.set { color: #3F2FA8; background: #EEEAFE; }
.hm-paper .hcl-bank .ex-opt.used { opacity: .45; }
.hm-paper .hm-fix { font-size: 21px; line-height: 1.85; padding: 12px 20px; margin-bottom: 8px; }
.hm-paper .grade-tabs { margin: 10px 0; }
.hm-paper .grade-tab small { display: block; font-size: 13px; }
.hm-list { list-style: none; padding-left: 0; }
.hm-list li { margin: 4px 0; }
.ask-pop .result-card h2 { font-size: 26px; line-height: 1.4; margin: 6px 0; }
.ask-pop .result-actions { margin-top: 16px; }

/* ---------- 🔤 English (js/subjects/english/) ---------- */
/* Corners: English titles are long, so let them wrap (as Maths); topic page: the topic's sounds as tiles */
.english .topic-title.long { white-space: normal; font-size: 22px; line-height: 1.15; text-align: center; }
.english .grade-tab { flex: 0 0 auto; }
.en-gpcs { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 6px; }
.en-gpc { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; min-height: 64px;
  padding: 4px 14px; border-radius: 18px; background: var(--card); border: 3px solid var(--c); font-size: 34px; font-weight: 800; }
.en-tricky { font-size: 19px; color: var(--ink-soft); margin: 10px 0; }
/* English lesson (lesson.js): letter and picture answers on the board */
.english .board-opt.en-letter { font-size: clamp(40px, 5.4vw, 56px); padding-bottom: .12em; }
.english .board-opt.pic { font-size: clamp(36px, 4.8vw, 50px); line-height: 1; }
/* English games (games.js) */
.en-hear { display: block; margin: 14px auto 4px; width: 132px; height: 132px; border-radius: 50%; font-size: 60px;
  background: var(--c); color: #fff; box-shadow: 0 7px 0 rgba(0, 0, 0, .15); }
.en-hear:active { transform: translateY(4px); box-shadow: 0 3px 0 rgba(0, 0, 0, .15); }
.en-tiles { display: flex; justify-content: center; gap: 34px; margin: 22px 0 6px; transition: gap .6s ease; }
.en-tiles.joined { gap: 4px; }
.en-tile { min-width: 104px; height: 120px; padding: 0 16px; border-radius: 22px; background: var(--card);
  border: 4px solid var(--c); box-shadow: var(--shadow); font-size: clamp(60px, 8vw, 84px); font-weight: 800; line-height: 1; }
.en-tile.lit { background: #FFE9A8; }
.en-tile.hint { animation: wiggleK .5s ease; }
.en-tiles.many { gap: 14px; }
.en-tiles.many.joined { gap: 4px; }
.en-tiles.many .en-tile { min-width: 80px; padding: 0 10px; font-size: clamp(46px, 6vw, 66px); }
.en-tile.split { border-color: #E8505B; }
.en-tile.silent { border-color: #E8505B; border-style: dashed; color: #9AA5B1; }
.en-hear.pic { font-size: 76px; }
.en-word { font-size: clamp(28px, 4vw, 46px); font-weight: 800; line-height: 1.1; }
.dish.lit { outline: 5px solid #FFC93C; }
/* Grade units: key words on the topic page (tap = hear the word) */
.en-vocab { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 6px; }
.en-vword { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 4px 16px; border-radius: 16px;
  background: var(--card); border: 3px solid var(--c); font-size: 22px; font-weight: 700; color: var(--ink); }
.en-vword .pic { font-size: 28px; line-height: 1; }
/* English grade games (grade-games.js) */
.en-show-word { width: auto; min-width: 132px; height: 112px; padding: 0 34px; border-radius: 60px; font-size: clamp(40px, 6vw, 62px); font-weight: 800; }
.en-show-pic { display: grid; place-items: center; }
.dish.word .en-word.mid { font-size: clamp(22px, 3vw, 36px); }
.dish.word .en-word.long { font-size: clamp(19px, 2.4vw, 26px); font-weight: 700; }
.en-sent { max-width: 960px; margin: 28px auto 6px; text-align: center; font-size: clamp(28px, 4vw, 44px); font-weight: 700; line-height: 1.45; color: var(--ink); }
.en-gap { display: inline-block; min-width: 2.6em; padding: 0 .2em; border-bottom: 4px solid var(--c); color: var(--c); text-align: center; }
.en-gap.on { background: #FFF3C4; border-radius: 8px 8px 0 0; }
.en-gap.filled { color: var(--good); border-bottom-color: var(--good); }
.en-line { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; min-height: 96px; max-width: 980px;
  margin: 22px auto 8px; padding: 12px; border-bottom: 4px dashed #CFD8E3; }
.en-line.done .en-block { border-color: var(--good); background: #E6F9EC; }
.en-blocks, .en-bank { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; max-width: 980px; margin: 18px auto; }
.en-block { min-width: 64px; min-height: 64px; padding: 0 20px; border-radius: 18px; background: var(--card); border: 4px solid var(--c);
  box-shadow: var(--shadow); font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; color: var(--ink); }
.en-block.placed { display: inline-flex; align-items: center; box-shadow: none; }
.en-block.wrong { background: #FDE8E8; animation: shake .4s; }
/* Fill the Gap + Read & Answer: the text card */
.en-passage { max-width: 960px; margin: 14px auto 6px; padding: 16px 22px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow);
  font-size: clamp(21px, 2.6vw, 28px); line-height: 1.6; color: var(--ink); }
.en-passage .lit { background: #FFE9A8; border-radius: 6px; }
.en-passage .en-gap { min-width: 3em; }
.en-q { margin: 12px 0 0; text-align: center; font-size: clamp(22px, 3vw, 30px); font-weight: 800; color: var(--ink); }
.dish.word.en-long { min-height: 64px; }
.en-done { display: block; margin: 14px auto 0; }

/* ---------- ➗ Maths (js/subjects/maths/) ---------- */
/* Corners: English titles are long, so let them wrap; a single grade tab stays tab-sized */
.maths .topic-title.long { white-space: normal; font-size: 22px; line-height: 1.15; text-align: center; }
.maths .grade-tab { flex: 0 0 auto; }
/* Whiteboard lesson player (board.js) */
.board-top h2 { margin: 0 0 16px; }
.board-top h2 small { display: block; margin-top: 2px; font-size: 19px; color: var(--ink-soft); }
.board-wrap {
  background: #FFFDF6;
  border: 6px solid #8B6B4A;
  border-radius: 20px;
  box-shadow: 0 10px 0 rgba(0, 0, 0, .12), inset 0 0 0 3px #EAD9B6;
  position: relative;
  /* fit the whole board + controls on one screen (5:3 board) */
  width: min(100%, 960px, calc((100vh - 330px) * 5 / 3));
  width: min(100%, 960px, calc((100dvh - 330px) * 5 / 3));
  margin: 0 auto;
  overflow: hidden;
  cursor: pointer;
}
.board-wrap svg { display: block; width: 100%; height: auto; }
.board-ask {
  position: absolute; right: 4%; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px;
}
.board-ask[hidden] { display: none; }
.board-opt {
  width: clamp(64px, 9vw, 92px); height: clamp(64px, 9vw, 92px); border-radius: 22px;
  font-size: clamp(34px, 4.6vw, 48px); font-weight: 800; color: var(--ink);
  background: #fff; border: 4px solid #E89A1A; box-shadow: 0 5px 0 rgba(0, 0, 0, .14);
  animation: popIn .35s ease both;
}
.board-opt.word { width: auto; min-width: clamp(64px, 9vw, 92px); padding: 0 .35em; white-space: nowrap; font-size: clamp(26px, 3.4vw, 36px); }
.board-opt:nth-child(2) { animation-delay: .08s; }
.board-opt:nth-child(3) { animation-delay: .16s; }
.board-opt.right { background: var(--good, #2BB673); border-color: var(--good, #2BB673); color: #fff; }
.board-opt.wrong { animation: shake .45s ease; }
.board-controls { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 18px 0 10px; }
.board-btn {
  width: 58px; height: 58px; border-radius: 18px; font-size: 24px; line-height: 1;
  background: var(--card); box-shadow: 0 4px 0 rgba(0, 0, 0, .12);
  display: grid; place-items: center;
}
.board-btn.play { width: 82px; background: var(--c, #2BB673); color: #fff; }
.board-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .12); }
.board-dots { display: flex; gap: 0; justify-content: center; margin: 4px 0 6px; }
.board-dots .dot { width: 14px; height: 14px; padding: 12px; box-sizing: content-box; background-clip: content-box !important; cursor: pointer; border-radius: 99px; background: var(--bg2); transition: all .2s ease; }
.board-dots .dot.on { background: var(--c, #2BB673); transform: scale(1.3); }

/* Maths games (games.js) */
.count-q { margin: 14px 0 0; text-align: center; font-size: clamp(26px, 3.6vw, 36px); font-weight: 800; color: var(--ink); }
.count-items {
  text-align: center; padding: 24px 12px;
  font-size: clamp(52px, 8vw, 108px); line-height: 1.45;
  overflow-wrap: anywhere;
}
.count-items:has(.count-row) { display: grid; justify-content: center; }
.count-row { display: block; white-space: nowrap; text-align: left; }
.count-items.wide { font-size: clamp(30px, 4.6vw, 60px); padding: 14px 8px; }
.m-gap { display: inline-block; width: .45em; }
.count-items.small.to20 { font-size: clamp(24px, 3.3vw, 42px); }
.sum-pics.stack { flex-direction: column; gap: 0; }
.sum-pics.stack .sum-op { font-size: clamp(30px, 4vw, 44px); line-height: 1; }
.count-items.small { display: inline-grid; padding: 4px; font-size: clamp(34px, 4.6vw, 58px); line-height: 1.3; }
.m-item { display: inline-block; position: relative; }
.m-item.gone { opacity: .45; }
.m-item.gone::after { /* crossed out (take away) */
  content: ""; position: absolute; left: 8%; right: 8%; top: 50%; height: 6px; border-radius: 3px;
  background: var(--bad); transform: rotate(-35deg);
}
/* ⚖️ More or Fewer */
.cmp-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 14px; }
.cmp-set {
  min-height: min(260px, 32vh); border-radius: 26px; background: var(--card); box-shadow: var(--shadow);
  display: grid; place-items: center; padding: 10px;
}
.cmp-set.right { background: #E6F9EC; outline: 5px solid var(--good); animation: pop .4s; }
.cmp-set.wrong { background: #FDE8E8; outline: 5px solid var(--bad); animation: shake .4s; }
.cmp-num { font-size: clamp(80px, 12vw, 140px); font-weight: 900; }
/* 🚂 Number Train */
.train { display: flex; justify-content: center; align-items: flex-end; gap: 8px; margin: 18px 0 6px; flex-wrap: wrap; }
.train .loco { font-size: clamp(54px, 7vw, 80px); line-height: 1; }
.train .car {
  min-width: clamp(56px, 8vw, 84px); height: clamp(56px, 8vw, 84px); border-radius: 16px;
  display: grid; place-items: center; font-size: clamp(32px, 4.6vw, 48px); font-weight: 900;
  background: var(--card); box-shadow: 0 5px 0 rgba(0, 0, 0, .14); border-bottom: 8px solid #5A6B7B;
}
.train .car.miss { background: #FFF4DC; outline: 4px dashed #E89A1A; color: #C07600; }
.train .car.found { background: #E6F9EC; color: var(--good); animation: pop .4s; }
/* ➕ / ➖ Picture Sums */
.sum-pics { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.sum-op { font-size: clamp(44px, 6vw, 64px); font-weight: 900; color: var(--ink-soft); }
.sum-hidden {
  min-width: 120px; min-height: 90px; border-radius: 18px; display: grid; place-items: center;
  border: 4px dashed #E89A1A; color: #C07600; font-size: 48px; font-weight: 900; background: #FFF4DC;
}
.sum-eq { text-align: center; font-size: clamp(34px, 4.6vw, 48px); font-weight: 900; margin: 6px 0 0; }
.eq-box {
  display: inline-grid; place-items: center; min-width: 1.6em; height: 1.4em; padding: 0 .2em; border-radius: 12px;
  border: 3px solid #C9D3DC; background: #fff;
}
.eq-box.miss { border: 3px dashed #E89A1A; background: #FFF4DC; color: #C07600; }
.eq-box.found { border-color: var(--good); background: #E6F9EC; color: var(--good); }
/* 🧦 Odd or Even: things in pairs (columns of two) */
.oe-pics { display: flex; justify-content: center; align-items: center; gap: 22px; flex-wrap: wrap; margin: 10px 0; min-height: 150px; }
.oe-num { font-size: clamp(56px, 8vw, 88px); font-weight: 900; color: var(--ink); }
.oe-grid { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 100%; }
.oe-pair {
  display: flex; flex-direction: column; align-items: center; font-size: clamp(32px, 4.2vw, 50px); line-height: 1.15;
  padding: 4px 4px; border-radius: 16px; background: rgba(255, 255, 255, .7); box-shadow: 0 3px 0 rgba(0, 0, 0, .06);
}
.oe-pair span:empty { width: 1em; height: 1.15em; }
.oe-pair.lone.show { outline: 4px dashed #E89A1A; background: #FFF4DC; }
/* 📖 Story Problems */
.story-card {
  margin: 8px auto 0; max-width: 820px; padding: 18px 22px; border-radius: 22px; background: var(--card);
  box-shadow: var(--shadow); font-size: clamp(22px, 2.9vw, 30px); font-weight: 700; line-height: 1.5;
}
.eq-box.op { min-width: 1.2em; }
/* 🧱 Tens and Ones: ten rods + one cubes (also ⚖️ compare to 100) */
.tens-wrap { display: grid; place-items: center; min-height: 190px; margin: 6px 0; }
.tens-pic { --u: clamp(12px, 1.7vw, 18px); display: inline-flex; align-items: flex-end; gap: calc(var(--u) * .45); padding: 6px; }
.tens-pic.big { --u: clamp(15px, 2.2vw, 24px); }
.tens-pic .rod {
  display: block; width: var(--u); height: calc(var(--u) * 10); border: 2px solid #3B82C4; border-radius: 3px; box-sizing: content-box;
  background: repeating-linear-gradient(#D6E7F8 0 calc(var(--u) - 2px), #3B82C4 calc(var(--u) - 2px) var(--u));
}
.tens-pic .ones { display: grid; grid-template-columns: repeat(2, var(--u)); gap: 3px; margin-left: calc(var(--u) * .6); direction: ltr; }
.tens-pic .cube { display: block; width: var(--u); height: var(--u); border: 2px solid #E8505B; border-radius: 3px; background: #FDE1E3; box-sizing: border-box; }
.tens-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 10px; }
.tens-opts .cmp-set { min-height: 0; padding: 12px 6px; }
/* 💯 Hundred Chart */
.hund { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; max-width: 720px; margin: 8px auto 4px; }
.hc {
  display: grid; place-items: center; height: clamp(44px, 6vw, 58px); border-radius: 10px; background: var(--card);
  font-size: clamp(20px, 2.6vw, 28px); font-weight: 800; box-shadow: 0 2px 0 rgba(0, 0, 0, .08);
}
.hc.dim { opacity: .5; }
.hc.hl { background: #DDEBFA; outline: 4px solid #3B82C4; opacity: 1; }
.hc.miss { background: #FFF4DC; outline: 4px dashed #E89A1A; color: #C07600; }
.hc.found { background: #E6F9EC; color: var(--good); outline: 4px solid var(--good); animation: pop .4s; }
/* 🧮 Column sums */
.colsum {
  display: grid; grid-template-columns: repeat(3, 1.25em); justify-content: center; align-items: center; row-gap: 2px;
  font-size: clamp(50px, 7vw, 80px); font-weight: 900; line-height: 1.15; margin: 4px auto 6px; width: max-content;
  padding: 6px 28px; border-radius: 24px; background: var(--card); box-shadow: var(--shadow); text-align: center;
}
.colsum .cs-head { font-size: .3em; color: #3B82C4; font-weight: 800; }
.colsum .cs-head.o { color: #E8505B; }
.colsum .cs-mark { font-size: .42em; color: #E8771A; min-height: 1em; line-height: 1; }
.colsum .cs-op { color: #E8771A; }
.colsum .struck { color: #9AA6B2; text-decoration: line-through #E8505B 5px; }
.colsum .cs-rule { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--ink); margin: 2px 0 6px; }
.colsum .cs-ans { border: 3px solid #C9D3DC; border-radius: 14px; margin: 0 4px; color: #9AA6B2; }
.colsum .cs-ans.now { border: 4px dashed #E89A1A; background: #FFF4DC; color: #C07600; }
.colsum .cs-ans.found { border-color: var(--good); background: #E6F9EC; color: var(--good); }
/* 🏁 Ordinals: a line of animals from the flag */
.ord-wrap { display: grid; place-items: center; min-height: 140px; margin: 10px 0; }
.ord-row { display: flex; align-items: center; gap: clamp(2px, .8vw, 10px); padding: 10px 12px; border-radius: 24px; background: rgba(255, 255, 255, .75); max-width: 100%; }
.ord-row.rtl { flex-direction: row-reverse; }
.ord-flag { font-size: clamp(30px, 4.4vw, 56px); }
.ord-item {
  font-size: clamp(30px, 4.4vw, 60px); line-height: 1.2; padding: 3px; border-radius: 14px; border: 0; background: transparent;
  min-width: 44px; min-height: 44px; touch-action: manipulation;
}
button.ord-item { cursor: pointer; background: var(--card); box-shadow: 0 3px 0 rgba(0, 0, 0, .1); }
.ord-item.target { outline: 5px solid #E89A1A; background: #FFF4DC; animation: pop .6s; }
.ord-item.right { outline: 5px solid var(--good); background: #E6F9EC; animation: pop .4s; }
.ord-item.wrong { outline: 5px solid var(--bad); background: #FDE8E8; animation: shake .4s; }
.ord-big { display: inline-block; padding: 0 .35em; margin-right: .2em; border-radius: 12px; background: #7A5CC2; color: #fff; }
.bond-wrap { text-align: center; padding: 6px; }
.bond-svg { display: block; width: min(340px, 62vw); height: auto; margin: 0 auto; }
.dish .num { font-weight: 900; font-size: clamp(44px, 6vw, 72px); line-height: 1.1; }
/* ---- Maths Step 3: 🔷 shapes ---- */
.shape-svg { display: block; width: 100%; height: auto; }
.shape-stage { display: grid; place-items: center; margin: 6px 0; }
.shape-stage .shape-svg.big { width: min(240px, 30vh); }
.dish .shape-name { font-weight: 900; font-size: clamp(24px, 3.2vw, 38px); line-height: 1.15; }
.hunt-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 12px; }
.shape-tile {
  aspect-ratio: 1; max-height: 24vh; justify-self: center; width: 100%; border: 0; border-radius: 22px; padding: 10px;
  background: var(--card); box-shadow: var(--shadow); touch-action: manipulation; cursor: pointer;
}
.shape-tile .shape-svg { width: 100%; height: 100%; }
.shape-tile.found, .shape-tile.right { background: #E6F9EC; outline: 5px solid var(--good); animation: pop .4s; }
.shape-tile.wrong { background: #FDE8E8; outline: 5px solid var(--bad); animation: shake .4s; }
.hunt-count { display: inline-block; padding: 0 .4em; border-radius: 12px; background: #2E9C8F; color: #fff; font-size: .8em; }
.pat-row {
  display: flex; justify-content: center; align-items: center; gap: clamp(4px, 1vw, 12px); max-width: 100%;
  padding: 12px; margin: 12px auto; border-radius: 24px; background: rgba(255, 255, 255, .75);
}
.pat-item { width: clamp(50px, 9vw, 96px); aspect-ratio: 1; display: grid; place-items: center; }
.pat-item.miss { border: 4px dashed #E89A1A; border-radius: 16px; background: #FFF4DC; color: #C07600; font-size: clamp(34px, 5vw, 56px); font-weight: 900; }
.pat-item.found { border-radius: 16px; background: #E6F9EC; outline: 4px solid var(--good); animation: pop .4s; }
#pt-opts .dish .shape-svg { width: min(110px, 60%); margin: 0 auto; }
/* 📏 length */
.len-list { display: grid; gap: 12px; margin-top: 12px; }
.len-item, .tower { border: 0; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); touch-action: manipulation; cursor: pointer; }
.len-item { padding: 8px 14px; min-height: 56px; }
.len-item svg { display: block; width: 100%; height: auto; max-height: 9vh; }
.tower-row { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 14px; margin-top: 12px; }
.tower { padding: 10px; }
.tower svg { display: block; width: 100%; height: min(300px, 38vh); }
.len-item.right, .tower.right { background: #E6F9EC; outline: 5px solid var(--good); animation: pop .4s; }
.len-item.wrong, .tower.wrong { background: #FDE8E8; outline: 5px solid var(--bad); animation: shake .4s; }
.ruler-wrap { margin: 10px 0; padding: 8px; border-radius: 24px; background: var(--card); box-shadow: var(--shadow); }
.ruler-wrap svg { display: block; width: 100%; height: auto; }
.dish .num small { font-size: .45em; }
/* 🕒 clocks */
.clock-svg { display: block; width: 100%; height: auto; }
.clock-stage { display: grid; place-items: center; margin: 6px 0; }
.clock-stage .clock-svg { width: min(300px, 34vh); }
.time-big { padding: 4px 24px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); font-size: clamp(48px, 7vw, 84px); font-weight: 900; color: #3B6FD9; }
.clock-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 12px; }
.clock-opts .cmp-set { min-height: 0; padding: 10px; }
.clock-opts .clock-svg { width: min(100%, 30vh); margin: 0 auto; }
/* ---- Maths Step 3b: 💰 money ---- */
.money-stage { display: grid; place-items: center; min-height: 120px; margin: 10px 0; }
.purse { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.m-coin {
  width: calc(var(--r) * var(--k, 2.4) * 1px); height: calc(var(--r) * var(--k, 2.4) * 1px); border-radius: 50%;
  display: grid; place-items: center; background: var(--c); border: 4px solid var(--ring);
  font-weight: 900; font-size: calc(var(--r) * var(--k, 2.4) * .29px); color: #2F3B48;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .45), 0 3px 0 rgba(0, 0, 0, .12);
}
.m-note { display: block; width: calc(var(--mm) * var(--k, 2.4) * .42px); height: auto; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .12)); }
.pay-item { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 8px 0; }
.pay-thing { font-size: clamp(64px, 9vw, 96px); }
.pay-tag { padding: 4px 18px; border-radius: 14px; background: #FFF4DC; border: 4px solid #E89A1A; color: #8A5A00; font-size: clamp(36px, 5vw, 56px); font-weight: 900; }
.pay-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pay-opts .cmp-set { min-height: 0; padding: 12px 8px; }
.pay-opts .purse { --k: 2; gap: 6px; }
.money-stage .purse { --k: 3.2; gap: 16px; }
@media (orientation: portrait) { .pay-opts { grid-template-columns: 1fr; } .pay-opts .purse { --k: 2.6; } }
/* 📊 picture graph */
.pgraph { display: grid; gap: 6px; max-width: 760px; margin: 10px auto; padding: 10px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.pg-row { display: flex; align-items: center; gap: 10px; padding: 4px 8px; border-radius: 14px; border-bottom: 2px solid #E3E8ED; }
.pg-row.hlA { background: #FFF1C9; outline: 4px solid #E8B31A; }
.pg-row.hlB { background: #DDEBFA; outline: 4px solid #3B82C4; }
.pg-label { padding: 2px 10px; border-radius: 10px; background: #EEF2F5; font-size: clamp(30px, 4vw, 44px); }
.pg-pics { font-size: clamp(26px, 3.8vw, 42px); letter-spacing: .12em; white-space: nowrap; }
.pg-opt { font-size: clamp(50px, 7vw, 80px); }
/* 🧺 groups and sharing */
.grp-wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 10px 0; }
.grp-plate {
  width: clamp(104px, 14vw, 156px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); border: 5px solid #C9D3DC; box-shadow: var(--shadow);
}
.grp-in { max-width: 82%; text-align: center; font-size: clamp(22px, 3vw, 32px); line-height: 1.15; overflow-wrap: anywhere; }
.grp-eq { display: inline-block; margin-left: .3em; padding: 0 .4em; border-radius: 12px; background: #C0504D; color: #fff; }
#sr-items { display: block; width: max-content; max-width: 100%; margin: 8px auto 0; }
/* ---- Maths P2a: 📦 hundreds · 🧮 3-digit columns · ✖️ / ➗ ---- */
.tens-pic.hund, .tens-pic.hund.big { --u: clamp(9px, 1.35vw, 15px); flex-wrap: wrap; justify-content: center; }
.tens-pic .flat {
  display: block; width: calc(var(--u) * 10); height: calc(var(--u) * 10); border: 2px solid #2A9A58; border-radius: 3px; box-sizing: content-box;
  background-color: #DFF3E6;
  background-image: repeating-linear-gradient(90deg, transparent 0 calc(var(--u) - 1px), #2A9A58 calc(var(--u) - 1px) var(--u)),
    repeating-linear-gradient(0deg, transparent 0 calc(var(--u) - 1px), #2A9A58 calc(var(--u) - 1px) var(--u));
}
.pv-hl { color: #E8771A; text-decoration: underline 6px; text-underline-offset: 8px; }
.pv-words { display: inline-block; padding: 8px 20px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); font-size: clamp(30px, 4.2vw, 46px); font-weight: 900; }
.colsum.c4 { grid-template-columns: repeat(4, 1.25em); }
.colsum.c5 { grid-template-columns: repeat(5, 1.35em); font-size: clamp(42px, 5.8vw, 68px); }
.colsum.c5 .cs-head { font-size: .24em; }
.colsum .cs-head.h { color: #2A9A58; }
.colsum .cs-head.th { color: #7A5CC2; }
/* ✖️ column multiplication */
.mcol {
  display: grid; grid-template-columns: repeat(3, 1.3em); justify-content: center; align-items: center; row-gap: 2px;
  font-size: clamp(48px, 7vw, 78px); font-weight: 900; line-height: 1.15; margin: 4px auto 6px; width: max-content;
  padding: 6px 28px; border-radius: 24px; background: var(--card); box-shadow: var(--shadow); text-align: center;
}
.mcol .head { font-size: .28em; color: #3B82C4; font-weight: 800; }
.mcol .head.o { color: #E8505B; }
.mcol .head.h { color: #2A9A58; }
.mcol .mark { font-size: .4em; color: #E8771A; min-height: 1em; line-height: 1; }
.mcol .times { color: #E8771A; }
.mcol .rule { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--ink); margin: 2px 0 6px; }
.mcol .ans { border: 3px solid #C9D3DC; border-radius: 14px; margin: 0 4px; color: #9AA6B2; }
.mcol .ans.now { border: 4px dashed #E89A1A; background: #FFF4DC; color: #C07600; }
.mcol .ans.found { border-color: var(--good); background: #E6F9EC; color: var(--good); }
/* ➗ long division: a grid (divisor column + one column per dividend digit); quotient on row 1, dividend on row 2
   under the bar, the working rows below (product with a rule under it, then the difference + the digit brought down) */
.ldiv {
  display: grid; grid-template-columns: repeat(var(--cols, 3), 1.05em); grid-auto-rows: 1.2em; align-items: center;
  justify-content: center; width: max-content; margin: 4px auto 8px; padding: 8px 30px 10px 22px; border-radius: 24px;
  background: var(--card); box-shadow: var(--shadow); font-size: clamp(34px, 4.6vw, 54px); font-weight: 900; text-align: center;
}
.ldiv .ld-c { line-height: 1.1; }
.ldiv .ld-top { border-top: 5px solid var(--ink); }
.ldiv .ld-first { border-left: 5px solid var(--ink); border-top-left-radius: 14px; }
.ldiv .ld-d { color: #B4442E; text-align: right; padding-right: .15em; }
.ldiv .ld-rule { border-bottom: 4px solid var(--ink); }
.ldiv .ld-down { color: #E8771A; }
.ldiv .ld-zero { color: #9AA6B2; }
.ldiv .ld-rem { color: var(--good); }
.ldiv .ld-ans { border: 3px solid #C9D3DC; border-radius: 12px; margin: 0 3px; color: #9AA6B2; line-height: 1.05; }
.ldiv .ld-ans.now { border: 4px dashed #E89A1A; background: #FFF4DC; color: #C07600; }
.ldiv .ld-ans.found { border-color: var(--good); background: #E6F9EC; color: var(--good); }
/* column cells with class "hund" must not pick up the 💯 hundred-chart grid (.hund): it pushed the hundreds box
   off-centre in the 3- and 4-digit column games */
.colsum .hund, .mcol .hund { display: block; max-width: none; margin: 0; }
.colsum .cs-ans.hund, .mcol .ans.hund { margin: 0 4px; }
/* 🍬 remainder: each group of d circled in green, the leftovers in red */
.rm-groups { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 900px; margin: 4px auto 0; }
.rm-grp { display: inline-flex; flex-wrap: wrap; justify-content: center; max-width: 5.6em; padding: 4px 6px; border: 3px dashed #2A9A58; border-radius: 16px; font-size: clamp(20px, 2.8vw, 32px); line-height: 1.15; }
.rm-grp i { font-style: normal; }
.rm-grp.left { border-color: #E8505B; background: #FDE1E3; }
/* 🧩 partial products: 23 × 4 over "= 20 × 4 + 3 × 4", the part asked about in colour */
#pp-eq { line-height: 1.2; text-align: center; }
#pp-eq small { font-size: .62em; color: #5A6B7B; }
#pp-eq small b { color: #E8771A; }
.tt-cap { margin: 2px 0 0; text-align: center; font-size: clamp(20px, 2.6vw, 28px); font-weight: 800; color: #5A6B7B; }
.tt-cap.hint { display: table; margin: 8px auto 0; padding: 4px 16px; border-radius: 14px; background: #FFF4DC; color: #8A5A00; font-size: clamp(28px, 3.6vw, 40px); }
/* ---- Maths P3b: 🟰 equal fractions ---- */
.feq-pics { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 8px; flex-wrap: wrap; }
.feq-pics .frac-pic.bar { width: min(220px, 30vw); }
/* the shown fraction + 3 cards with bars must fit an 820 px tall iPad screen */
#fe-pic .frac-big .frac { font-size: clamp(44px, 6vw, 64px); }
#fe-opts .frac-big .frac { font-size: clamp(36px, 4.6vw, 52px); }
#fe-pic .frac-pic.bar { width: min(300px, 60%); }
@media (orientation: portrait) { #fe-opts .frac-pic.bar { width: min(280px, 60%); } }
#fa-pic { display: flex; justify-content: center; align-items: center; gap: 24px; flex-wrap: wrap; }
#fa-pic .frac-pic.bar { width: min(300px, 40vw); margin: 0; }
/* ---- Maths P3b: 💲 money sums (SG) ---- */
.ma-purses { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 0; }
.ma-purses .purse { --k: 2; gap: 6px; }
.ma-plus, .cf-plus { font-size: clamp(32px, 4.6vw, 48px); font-weight: 900; color: #E8771A; }

/* ---- Maths P2b: 🍕 fractions · 💵 money · ⚖️ scales · ⏳ duration ---- */
.frac { display: inline-grid; justify-items: center; line-height: 1; font-weight: 900; vertical-align: middle; }
.frac b { padding: 0 .15em .08em; border-bottom: .09em solid currentColor; }
.frac i { font-style: normal; padding-top: .08em; }
.dish .frac { font-size: clamp(34px, 4.8vw, 54px); }
.frac-big .frac { font-size: clamp(56px, 8vw, 92px); color: #D2691E; }
.frac-pic { display: block; width: min(220px, 26vh); height: auto; margin: 0 auto; }
.frac-pic.bar { width: min(360px, 80%); }
.shape-stage .frac-pic { width: min(260px, 30vh); }
.shape-stage .frac-pic.bar { width: min(520px, 80vw); }
.frac-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 10px; }
.frac-opts .cmp-set, #fc-sets .cmp-set { min-height: 0; padding: 12px 8px; gap: 8px; }
.pay-opts.two { grid-template-columns: 1fr 1fr; }
.scale-stage { display: grid; place-items: center; }
.scale-stage svg { width: min(520px, 90%); max-height: 40vh; height: auto; }
.clock-opts.two { grid-template-columns: 1fr 1fr; max-width: 640px; margin: 8px auto 0; }
.du-clock { display: grid; gap: 6px; justify-items: center; }
.du-clock b { font-size: clamp(18px, 2.4vw, 26px); color: #5A6B7B; }
.du-clock .clock-svg { width: min(100%, 26vh); }
@media (orientation: portrait) { .frac-opts { grid-template-columns: 1fr; } .frac-opts .cmp-set { padding: 8px; } }
/* ---- Maths P2c: patterns · angles · compass ---- */
.pt-tile { display: grid; place-items: center; width: 100%; }
.pt-tile svg { transform: scale(var(--z, 1)); transform-origin: center; }
.angle-svg { display: block; width: min(340px, 34vh); height: auto; margin: 0 auto; }
#ac-sets .cmp-set { min-height: 0; padding: 10px; }
#ac-sets .angle-svg { width: min(100%, 40vh); }
.map-wrap { position: relative; width: max-content; margin: 0 auto; }
.compass-rose { position: absolute; top: 6px; right: -70px; display: grid; justify-items: center; font-size: 34px; color: #E8505B; line-height: 1; }
.compass-rose b { font-size: 24px; }
/* 🎲 solids · 🧭 Where Is It? grid (not ".shelf": that is the home screen) */
.solid-big { display: block; width: min(290px, 33vh); }
.solid-thing { font-size: clamp(100px, 16vh, 150px); line-height: 1.1; }
.wh-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(380px, 40vh); margin: 10px auto;
  padding: 10px; border: 6px solid #A0704A; border-radius: 16px; background: #FBF1E4;
}
.wh-cell { display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; background: #fff; font-size: clamp(40px, 6vh, 64px); }
.wh-cell.start { outline: 5px solid #E8B31A; background: #FFF1C9; }
#tt-pic .count-items, #dv-pic .count-items { display: grid; justify-content: center; width: max-content; max-width: 100%; margin: 0 auto; font-size: clamp(28px, 3.8vw, 46px); line-height: 1.2; }

/* P3b: 🔁 measures, 🕞 24-hour clock, ⏱️ time line */
.cv-big { font-size: clamp(40px, 6vw, 72px); white-space: nowrap; }
.c24-stage .clock-svg { width: min(250px, 28vh); }
.c24-lab { margin: 4px 0 0; text-align: center; font-size: clamp(26px, 3.4vw, 36px); font-weight: 900; color: #5B4BB7; }
.et-stage svg { display: block; width: min(100%, 760px); height: auto; margin: 8px auto; }
/* P3c: 🟩 area and perimeter */
.ar-stage { display: grid; place-items: center; margin: 4px 0; }
.ar-stage svg { display: block; width: 100%; height: auto; max-height: 34vh; }
.ar-note { margin: 0 0 4px; font-size: clamp(20px, 2.6vw, 28px); font-weight: 800; color: #5A6B7B; text-align: center; }
.lf-chip { display: inline-block; width: 1.1em; height: 0.5em; margin-right: 0.35em; border-radius: 4px; vertical-align: middle; }
/* P3c: 📶 bar graphs */
.bm-wrap { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; margin-top: 6px; }
.bm-table { border-collapse: collapse; background: var(--card); box-shadow: var(--shadow); border-radius: 14px; font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
.bm-table td { padding: 4px 18px; border-bottom: 2px solid #E3E8EE; text-align: center; }
.bm-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); gap: 12px; }
.bm-opts .bm-g { padding: 6px; }
.bm-opts .bm-g svg { display: block; width: 100%; height: auto; max-height: 30vh; }
.bm-opts .bm-g { position: relative; } .bm-tag { position: absolute; top: 6px; left: 10px; font-weight: 900; color: #5A6B7B; font-size: 22px; }
.bm-tag { left: auto; right: 12px; }
/* Maths 📝 Mock Test (exam.js) */
.game-mathexam .ex-q { margin: 6px 0; }
.ex-count { font-weight: 900; color: #5A6B7B; margin-right: 8px; }
.ex-pic svg, .ex-svg { display: block; width: 100%; height: auto; max-height: 30vh; margin: 0 auto; }
.ex-clock .clock-svg { width: min(220px, 26vh); margin: 0 auto; }
.ex-big { font-size: clamp(34px, 5vw, 56px); font-weight: 900; text-align: center; color: #3A4A5A; }
.ex-opts .dish.picked { outline: 5px solid #2B7A9E; background: #E3F2F8; }
.ex-nav { display: flex; justify-content: space-between; gap: 12px; margin: 14px 0 6px; }
.ex-nav .btn { min-height: 48px; min-width: 130px; }
.ex-result { padding: 8px 4px 24px; }
.ex-score { font-size: clamp(48px, 8vw, 84px); font-weight: 900; color: #2B7A9E; text-align: center; }
.ex-score small { font-size: 0.4em; color: #5A6B7B; }
.ex-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.ex-review { padding-left: 1.3em; line-height: 1.5; }
.exam-card { width: 100%; }
.game-mathexam .ex-pic svg, .game-mathexam .ex-svg { max-height: 24vh; }
.game-mathexam .ex-nav { margin: 8px 0 4px; }
/* P4a */
.cmp-num.pv5 { font-size: clamp(56px, 9vw, 110px); letter-spacing: 0.02em; }
.cmp-num.es-eq { font-size: clamp(44px, 7vw, 84px); }
/* P4b */
.mixed { display: inline-flex; align-items: center; gap: 0.12em; }
.mixed .mx-w { font-weight: 900; }
.dish.frac-opt { font-size: clamp(32px, 4.4vw, 50px); }
.dish.frac-opt .frac { font-size: 1em; }
.mixed-pic { display: block; width: 100%; height: auto; margin: 0 auto; }
.es-eq .frac, .fs-eq .frac { font-size: 0.8em; }
.vs { margin: 0 0.4em; color: #E89A1A; }
/* P4c */
.sym-opts, .net-opts { grid-template-columns: repeat(3, minmax(0, 220px)); }
.net-opts { grid-template-columns: repeat(4, minmax(0, 200px)); }
.sym-opts .bm-g svg, .net-opts .bm-g svg { max-height: 22vh; }
#g3-pic svg { max-height: 27vh; }
/* P5a */
#pbg-pic, #bgm-pic { min-height: 130px; }
#bgm-pic .pv-words { margin-top: 8px; font-size: clamp(22px, 3vw, 32px); }
#pbg-opts .dish .num, #bgm-opts .dish .shape-name { font-size: clamp(22px, 2.8vw, 34px); }
#pbg-opts .dish.word .shape-name { font-size: clamp(20px, 2.6vw, 30px); }
/* English practice paper (js/subjects/english/exam.js) */
.game-enexam .ex-q { margin: 6px 0; }
.game-enexam .en-sent { margin: 14px auto 4px; }
.game-enexam .ex-passage { margin: 6px auto; padding: 12px 18px; font-size: clamp(18px, 2.2vw, 22px); line-height: 1.55;
  max-height: 40vh; overflow-y: auto; }
.game-enexam .ex-passage .en-gap.ex-chosen { color: #2B7A9E; border-bottom-color: #2B7A9E; }
.game-enexam .en-q { margin: 8px 0 0; }
.game-enexam .ex-opts.ex-bank { grid-template-columns: repeat(4, 1fr); }
.game-enexam .ex-bank .dish.word, .game-enexam .ex-opts.ps-wide .dish.word { min-height: 64px; }
@media (orientation: portrait) { .game-enexam .ex-opts.ex-bank { grid-template-columns: repeat(3, 1fr); } }

/* English Primary 3 games (grade-games.js): 💎 Word Power, 🔗 Join It, long 📖 Read & Answer */
.en-sent.en-sent-long { font-size: clamp(24px, 3.2vw, 38px); }
.en-join { max-width: 960px; margin: 12px auto 0; padding: 10px 20px 12px; border-radius: 20px; background: var(--card);
  box-shadow: var(--shadow); text-align: center; }
.en-join p { margin: 4px 0; font-size: clamp(22px, 2.8vw, 30px); font-weight: 700; color: var(--ink); }
.en-joinword { display: inline-block; margin-top: 6px; padding: 4px 18px; border: 3px solid var(--c); border-radius: 12px;
  font-size: clamp(22px, 2.8vw, 30px); font-weight: 800; color: var(--c); }
.game-enJoin .en-line { min-height: 76px; margin: 14px auto 6px; }
.game-enJoin .en-blocks { gap: 10px; margin: 12px auto; }
.game-enJoin .en-block { min-height: 56px; padding: 0 14px; font-size: clamp(22px, 2.8vw, 30px); }
.en-read-long { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: start; max-width: 1120px; margin: 6px auto 0; }
.en-read-long .en-passage { margin: 0; max-height: calc(100vh - 190px); overflow-y: auto; -webkit-overflow-scrolling: touch;
  font-size: clamp(18px, 2vw, 22px); line-height: 1.55; }
.en-read-long .en-passage .para::before { content: ""; display: block; height: .6em; }
.en-read-long .en-q { margin: 0; text-align: left; font-size: clamp(20px, 2.4vw, 26px); }
.en-read-long .counter { margin-top: 12px; gap: 10px; }
.en-read-long .counter.stack { grid-template-columns: 1fr; }
.en-read-long .dish.word { min-height: 64px; padding: 8px 12px; }
@media (orientation: portrait) {
  .en-read-long { grid-template-columns: 1fr; }
  .en-read-long .en-passage { max-height: 44vh; }
}

/* 🔍 Spot and Fix + typed answers (grade-games.js enEdit; the P3 paper and Spelling reuse .en-type / .en-input / .en-err) */
.en-edit { line-height: 2; }
.en-err { padding: 0 .12em; border-radius: 6px; font-weight: 800; text-decoration: underline; text-decoration-thickness: 3px;
  text-underline-offset: 5px; }
.en-err sup { margin-right: 2px; font-size: .55em; color: #5A6B7B; }
.en-err.on { background: #FFF3C4; text-decoration-color: var(--c); }
.en-err.fixed { color: var(--good); text-decoration: none; }
.en-err.shown { color: #D35400; text-decoration: none; }
.en-type { display: flex; gap: 12px; justify-content: center; align-items: center; max-width: 760px; margin: 14px auto 0; }
.en-type-n { min-width: 1.6em; text-align: right; font-size: 28px; font-weight: 900; color: var(--c); }
.en-input { flex: 1; min-width: 0; min-height: 60px; padding: 0 18px; border: 4px solid var(--c); border-radius: 16px;
  background: var(--card); font: inherit; font-size: 30px; font-weight: 700; color: var(--ink); }
.en-input.wrong { border-color: #E8505B; background: #FDE8E8; animation: shake .4s; }
.en-type .btn { min-height: 60px; min-width: 120px; font-size: 22px; }
.en-type-msg { min-height: 1.4em; margin: 8px 0 0; text-align: center; font-size: 22px; font-weight: 700; color: #5A6B7B; }

/* English P3 practice paper (exam.js): typed editing answers, joining */
.game-enexam .ex-type { margin-top: 16px; }
.game-enexam .ex-passage.en-edit { line-height: 1.9; }
.ex-typed { color: #2B7A9E; font-weight: 700; }
.game-enexam .en-join { margin: 6px auto; }

/* 🔤 Spelling (spell.js) */
.spell-card { width: 100%; }
.en-spell-top { display: flex; align-items: center; justify-content: center; gap: 24px; margin-top: 8px; }
.en-spell-top .en-hear { margin: 0; }
.en-spell-pic { font-size: 76px; line-height: 1; }
.en-spell-pic:empty, .en-sent.en-spell-hint:empty { display: none; }
.en-sent.en-spell-hint { margin: 14px auto 0; font-size: clamp(22px, 2.8vw, 32px); }

/* P5a (continued) */
#sht-opts .dish.word .shape-name, #tmu-opts .dish.word .shape-name { font-size: clamp(22px, 2.8vw, 34px); }
#tmu-t { font-size: clamp(24px, 3.2vw, 36px); max-width: 90%; }
#tmu-hint { margin: 8px auto 0; font-size: clamp(20px, 2.6vw, 30px); background: #FFF4DC; }
#fst-t { font-size: clamp(22px, 3vw, 34px); max-width: 92%; line-height: 1.5; }
#fst-opts .dish.word .shape-name { font-size: clamp(22px, 2.8vw, 34px); }
#fst-opts .dish.frac-opt { font-size: clamp(24px, 3.4vw, 40px); }
#fst-opts .dish { flex-direction: row; gap: 0.3em; white-space: nowrap; }
#fst-opts .dish .shape-name { white-space: nowrap; }
#ftm-pic svg { max-height: 16vh; }

/* P5b */
#dtm-opts .dish.word .shape-name, #drd-opts .dish.word .shape-name { font-size: clamp(22px, 2.8vw, 34px); white-space: nowrap; }
#fdv-pic svg { max-height: 16vh; }
#uni-t { font-size: clamp(22px, 3vw, 34px); max-width: 92%; line-height: 1.5; }
#uni-opts .dish { flex-direction: row; gap: 0.3em; white-space: nowrap; }
#uni-opts .dish.word .shape-name { font-size: clamp(22px, 2.8vw, 34px); white-space: nowrap; }
#alw-t { font-size: clamp(22px, 3vw, 34px); max-width: 92%; line-height: 1.5; }
#alv-x { font-size: clamp(26px, 3.6vw, 40px); }
#alw-opts .dish, #alv-opts .dish { flex-direction: row; gap: 0.3em; white-space: nowrap; }
#alw-opts .dish.word .shape-name, #alv-opts .dish.word .shape-name { font-size: clamp(24px, 3.2vw, 38px); white-space: nowrap; }
#alw-opts .dish .frac, #alv-opts .dish .frac { font-size: 1em; }
#beq-pic svg { width: min(520px, 90vw); max-height: 20vh; }
#beq-eq { font-size: clamp(34px, 5vw, 56px); }
#beq-opts .dish.word .shape-name { font-size: clamp(20px, 2.6vw, 30px); }
#eqs-t { font-size: clamp(22px, 3vw, 34px); max-width: 92%; line-height: 1.5; }
#eqs-opts .dish.word .shape-name { font-size: clamp(24px, 3.2vw, 38px); white-space: nowrap; }
#pco-pic svg { width: min(240px, 36vw); max-height: 29vh; }
#pco-t, #dsc-t { font-size: clamp(22px, 3vw, 34px); max-width: 92%; line-height: 1.5; }
#pco-eq { font-size: clamp(34px, 5vw, 56px); }
#pco-opts .dish, #dsc-opts .dish { flex-direction: row; gap: 0.3em; white-space: nowrap; }
#dsc-opts .dish.word .shape-name { font-size: clamp(24px, 3.2vw, 38px); white-space: nowrap; }
#rtf-t { font-size: clamp(22px, 3vw, 34px); max-width: 92%; line-height: 1.5; }
#rtf-opts .dish.word .shape-name { font-size: clamp(24px, 3.2vw, 38px); white-space: nowrap; }
#rtb-table { border-collapse: collapse; background: var(--card); box-shadow: var(--shadow); border-radius: 14px; font-size: clamp(22px, 3vw, 34px); font-weight: 800; max-width: 96vw; }
#rtb-table th { padding: 8px 14px; text-align: left; white-space: nowrap; color: #2874A6; background: #EAF2FB; }
#rtb-table td { padding: 8px 14px; min-width: 2.2em; text-align: center; border-left: 2px solid #E3E8EE; }
#rtb-table tr + tr > * { border-top: 2px solid #E3E8EE; }
#rtb-table td.rtb-q { background: #FFF3D6; color: #C47F0A; outline: 3px dashed #E89A1A; outline-offset: -5px; }

/* P5c */
@media (orientation: portrait) { #cbc-pic svg { max-height: 26vh; } }
#tkf-pic .tk-eq { font-size: clamp(34px, 5vw, 56px); font-weight: 900; color: #1A5276; text-align: center; min-height: 150px; display: grid; place-items: center; }
#tkf-opts .dish.word .shape-name, #tkl-opts .dish.word .shape-name { font-size: clamp(22px, 2.8vw, 34px); }
#xsc-opts .dish .shape-svg { width: min(88px, 70%); margin: 0 auto; }
#xsc-opts .dish.word .shape-name { font-size: clamp(22px, 2.8vw, 34px); }
