:root {
  --bg: #fdf9f0;
  --card: #ffffff;
  --ink: #2b2b3a;
  --muted: #7a7a8c;
  --primary: #6c5ce7;
  --primary-dark: #4b3fc4;
  --accent: #ff9f43;
  --ok: #2ecc71;
  --bad: #ff6b6b;
  --thou: #8e44ad;
  --hund: #4a90e2;
  --tens: #27ae60;
  --ones: #f39c12;
  --line: #e8e3f5;
  --radius: 18px;
  --shadow: 0 6px 20px rgba(80, 60, 160, 0.10);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.5;
  min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 28px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-size: 24px; font-weight: 800; color: var(--primary-dark); }
.brand-zh { font-size: 16px; color: var(--muted); font-weight: 600; margin-left: 6px; }
.topbar nav a {
  margin-left: 18px; padding: 8px 14px; border-radius: 12px; font-weight: 600; color: var(--ink);
}
.topbar nav a.active, .topbar nav a:hover { background: #efeafd; color: var(--primary-dark); }
.badge { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 11px; background: var(--bad); color: #fff; font-size: 13px; text-align: center; line-height: 22px; }
.badge.zero { background: #ccc; }

#app { max-width: 1040px; margin: 0 auto; padding: 24px 20px 80px; }

h1 { font-size: 30px; margin: 0 0 6px; }
h2 { font-size: 24px; margin: 0 0 12px; }
.sub { color: var(--muted); font-size: 16px; }
.en { color: var(--muted); font-size: 0.85em; font-weight: 500; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 26px; margin-bottom: 18px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; }
.center { text-align: center; }
.mt { margin-top: 16px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: none;
  background: var(--primary); color: #fff; font-size: 18px; font-weight: 700;
  padding: 12px 22px; border-radius: 14px; box-shadow: 0 4px 0 var(--primary-dark);
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--primary-dark); }
.btn.secondary { background: #fff; color: var(--primary-dark); border: 2px solid var(--primary); box-shadow: 0 4px 0 #d9d2f7; }
.btn.accent { background: var(--accent); box-shadow: 0 4px 0 #d9822b; }
.btn.ok { background: var(--ok); box-shadow: 0 4px 0 #1e9e56; }
.btn.small { font-size: 15px; padding: 8px 14px; }
.btn.big { font-size: 22px; padding: 16px 30px; }
.btn:disabled { opacity: .5; cursor: default; }

/* home */
.unit { margin-bottom: 26px; }
.unit-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.unit-num { background: var(--primary); color: #fff; border-radius: 50%; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; }
.kp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.kp-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px;
  border: 2px solid transparent; cursor: pointer; transition: transform .12s, border-color .12s;
  display: block; color: var(--ink);
}
.kp-card:hover { transform: translateY(-3px); border-color: var(--primary); }
.kp-card.soon { opacity: .55; cursor: default; }
.kp-card.soon:hover { transform: none; border-color: transparent; }
.kp-title { font-weight: 700; font-size: 18px; }
.kp-en { color: var(--muted); font-size: 14px; margin-top: 2px; }
.stars { font-size: 20px; letter-spacing: 2px; margin-top: 8px; }
.stars .dim { opacity: .25; }
.soon-tag { font-size: 13px; color: var(--muted); background: #eee; border-radius: 8px; padding: 2px 8px; margin-top: 8px; display: inline-block; }

/* KP page */
.crumb { font-size: 15px; color: var(--muted); margin-bottom: 10px; }
.mode-tabs { display: flex; gap: 10px; margin: 18px 0; flex-wrap: wrap; }
.mode-tabs .btn { flex: 1; justify-content: center; min-width: 160px; }
.mode-tabs .btn.inactive { background: #fff; color: var(--primary-dark); border: 2px solid #ddd6f8; box-shadow: none; }

.sec-head { display: flex; align-items: center; gap: 12px; margin: 14px 0 12px; }
.sec-card .unit-num { flex-shrink: 0; }

/* learn (examples) */
.example-nav { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: 20px; background: #efeafd; color: var(--primary-dark); font-weight: 700; cursor: pointer; border: 2px solid transparent; font-size: 15px; }
.chip.active { background: var(--primary); color: #fff; }
.chip.done { border-color: var(--ok); }
.stage { min-height: 260px; display: flex; align-items: center; justify-content: center; padding: 10px; }
.explain { font-size: 22px; font-weight: 700; margin-top: 14px; min-height: 60px; }
.explain .en { display: block; font-size: 16px; }
.stepbar { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.dots { display: flex; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: #ddd; }
.dot.on { background: var(--primary); }
.speak { background: none; border: none; font-size: 24px; cursor: pointer; }

/* place value table */
.pv { display: inline-grid; grid-template-columns: repeat(3, 110px); border: 2px solid var(--line); border-radius: 12px; overflow: hidden; margin: 8px auto; }
.pv div { padding: 8px; text-align: center; font-weight: 700; }
.pv .h { color: var(--hund); }
.pv .t { color: var(--tens); }
.pv .o { color: var(--ones); }
.pv .head { background: #f4f1fc; font-size: 13px; color: var(--muted); }
.pv .val { font-size: 34px; min-height: 56px; }
.pv .val.blank { color: #ccc; }
.bignum { font-size: 52px; font-weight: 800; color: var(--primary-dark); letter-spacing: 4px; }
.bignum .d { display: inline-block; transition: transform .3s; }
.bignum .h { color: var(--hund); } .bignum .t { color: var(--tens); } .bignum .o { color: var(--ones); }

/* words split */
.wordsplit { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; font-size: 26px; font-weight: 700; }
.wordsplit span { padding: 6px 12px; border-radius: 10px; background: #f4f1fc; opacity: .3; transition: opacity .3s, transform .3s; }
.wordsplit span.on { opacity: 1; transform: scale(1.05); }
.wordsplit span.h { color: var(--hund); } .wordsplit span.t { color: var(--tens); } .wordsplit span.o { color: var(--ones); } .wordsplit span.and { color: var(--muted); }

.wordtable { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 12px; font-size: 15px; }
.wordtable table { width: 100%; border-collapse: collapse; }
.wordtable td { padding: 3px 6px; border-bottom: 1px solid var(--line); }
.wordtable td:first-child { font-weight: 700; color: var(--primary-dark); width: 40px; }

/* choice buttons */
.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 760px; margin: 10px auto; }
.choice { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 700; color: var(--primary-dark); background: #fff; border: 3px solid var(--line); border-radius: 16px; padding: 14px 18px; cursor: pointer; text-align: left; transition: transform .08s, border-color .1s; }
.choice:hover:not(:disabled) { border-color: var(--primary); transform: translateY(-2px); }
.choice .key { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: #efeafd; color: var(--primary-dark); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.choice.right { border-color: var(--ok); background: #eafaf1; }
.choice.right .key { background: var(--ok); color: #fff; }
.choice.wrong { border-color: var(--bad); background: #fff0f0; opacity: .6; text-decoration: line-through; }
.choice.wrong .key { background: var(--bad); color: #fff; }
.choice:disabled { cursor: default; }
@media (max-width: 700px) { .choices { grid-template-columns: 1fr; } }

/* practice */
.qhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; flex-wrap: wrap; gap: 8px; }
.qprogress { display: flex; gap: 6px; flex-wrap: wrap; }
.qdot { width: 26px; height: 26px; border-radius: 6px; background: #e6e6ee; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; color: #888; font-weight: 700; border: none; cursor: pointer; padding: 0; transition: transform .1s; }
.qdot:hover { transform: scale(1.2); outline: 2px solid var(--primary); }
.qdot.cur { outline: 3px solid var(--primary); }
.qdot.ok { background: var(--ok); color: #fff; }
.qdot.bad { background: var(--bad); color: #fff; }
.qdot.fixed { background: #ffd166; color: #fff; }
.result-list .skip { color: #aaa; }
.toolbar { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.qnav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.navbtn { width: 34px; height: 34px; border-radius: 10px; border: 2px solid var(--line); background: #fff; color: var(--primary-dark); font-size: 16px; cursor: pointer; font-weight: 700; }
.navbtn:hover:not(:disabled) { border-color: var(--primary); }
.navbtn:disabled { opacity: .35; cursor: default; }
input.ans:disabled { background: #fafafa; }
input.ans.shake:disabled { animation: none; border-color: var(--bad); background: #fff5f5; }
.question { font-size: 26px; font-weight: 700; margin: 12px 0; }
.question .en { display: block; font-size: 16px; }
.qstage { display: flex; justify-content: center; align-items: center; min-height: 120px; margin: 8px 0; }
.qstage:empty { display: none; }
.answer-row { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 14px 0; flex-wrap: wrap; }
.answer-row label { font-size: 22px; font-weight: 700; }
input.ans {
  font-size: 30px; font-weight: 700; padding: 10px 16px; border: 3px solid var(--line); border-radius: 14px;
  width: 200px; text-align: center; outline: none; font-family: inherit; color: var(--primary-dark);
}
input.ans.wide { width: 560px; max-width: 100%; font-size: 24px; text-align: left; }
input.ans:focus { border-color: var(--primary); }
input.ans.shake { animation: shake .4s; border-color: var(--bad); }
input.ans.good { border-color: var(--ok); background: #eafaf1; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-8px)} 40%,80%{transform:translateX(8px)} }
.feedback { min-height: 70px; font-size: 22px; font-weight: 700; text-align: center; margin-top: 6px; }
.feedback.ok { color: var(--ok); }
.feedback.bad { color: var(--bad); }
.feedback .hint { display: block; font-size: 18px; color: var(--ink); font-weight: 600; margin-top: 4px; }
.feedback .en { display: block; }
.actions { display: flex; gap: 12px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.streak { font-size: 16px; color: var(--muted); }

.summary-big { font-size: 60px; text-align: center; margin: 10px 0; }
.result-list { list-style: none; padding: 0; margin: 10px 0; }
.result-list li { padding: 8px 12px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.result-list .ok { color: var(--ok); } .result-list .bad { color: var(--bad); }

/* wrong book */
.wrong-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.wrong-q { font-weight: 700; font-size: 18px; }
.wrong-meta { font-size: 15px; color: var(--muted); }
.wrong-meta b.bad { color: var(--bad); } .wrong-meta b.ok { color: var(--ok); }
.tag { font-size: 13px; background: #efeafd; color: var(--primary-dark); padding: 2px 8px; border-radius: 8px; margin-right: 6px; }

/* explanation overlay */
.overlay { position: fixed; inset: 0; background: rgba(40,30,80,.45); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.overlay .card { width: 900px; max-width: 100%; max-height: 92vh; overflow: auto; }

/* confetti */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 100; }
.confetti i { position: absolute; top: -20px; width: 12px; height: 18px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: .8; } }

/* blocks svg */
.blocks svg { max-width: 100%; height: auto; }
.blk { transition: fill .25s, opacity .25s, transform .25s; }
.blk.dim { opacity: .18; }
.blk.hl { filter: drop-shadow(0 0 6px rgba(255,159,67,.9)); }
.counter { font-size: 40px; font-weight: 800; }

@media (max-width: 700px) {
  body { font-size: 16px; }
  .topbar { padding: 10px 14px; flex-wrap: wrap; }
  .pv { grid-template-columns: repeat(3, 80px); }
}

/* ---- fill (填空) ---- */
.fill { font-size: 22px; font-weight: 700; line-height: 2.6; text-align: center; }
.fill .nowrap { white-space: nowrap; }
input.blank { font-size: 24px; font-weight: 700; padding: 4px 8px; border: none; border-bottom: 3px solid var(--primary); background: #f7f5ff; border-radius: 8px 8px 0 0; text-align: center; outline: none; font-family: inherit; color: var(--primary-dark); margin: 0 4px; }
input.blank:focus { background: #efeafd; }
input.blank.good { border-color: var(--ok); background: #eafaf1; color: #1e9e56; }
input.blank.badf { border-color: var(--bad); background: #fff0f0; color: var(--bad); }
input.blank:disabled { opacity: .9; }
.seg { display: inline-flex; gap: 6px; margin: 0 6px; vertical-align: middle; }
.segbtn { font-family: inherit; font-size: 18px; font-weight: 700; padding: 6px 14px; border-radius: 10px; border: 2px solid var(--line); background: #fff; color: var(--primary-dark); cursor: pointer; }
.segbtn:hover:not(:disabled) { border-color: var(--primary); }
.segbtn.sel { background: var(--primary); color: #fff; border-color: var(--primary); }
.segbtn.right { background: var(--ok); border-color: var(--ok); color: #fff; }
.segbtn.wrong { background: var(--bad); border-color: var(--bad); color: #fff; text-decoration: line-through; }
.segbtn:disabled { cursor: default; }
.seg-placeholder { display: inline-block; min-width: 3em; padding: 0 8px; border-bottom: 3px solid var(--primary); color: var(--primary-dark); }
.small-choices { margin-top: 6px; }
.small-choices .choice { font-size: 19px; padding: 10px 14px; }
.expand-line { font-size: 30px; font-weight: 800; margin-top: 12px; color: var(--ink); }

/* ---- 比较/排序表 ---- */
.cmp-table { display: inline-grid; grid-template-columns: 90px repeat(3, 64px); gap: 4px; margin: 6px auto; }
.cmp-head { font-size: 14px; color: var(--muted); font-weight: 700; text-align: center; }
.cmp-head.h { color: var(--hund); } .cmp-head.t { color: var(--tens); } .cmp-head.o { color: var(--ones); }
.cmp-num { font-size: 26px; font-weight: 800; text-align: right; padding-right: 10px; color: var(--primary-dark); display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.cmp-num .rank { font-size: 13px; background: var(--accent); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; }
.cmp-cell { font-size: 26px; font-weight: 800; text-align: center; padding: 4px; border-radius: 8px; background: #f7f5ff; }
.cmp-cell.h { color: var(--hund); } .cmp-cell.t { color: var(--tens); } .cmp-cell.o { color: var(--ones); }
.cmp-cell.hl { background: #fff3d6; outline: 3px solid var(--accent); }

/* ---- 数字条 ---- */
.numrow { display: inline-block; margin: 8px auto; }
.numrow-label { font-size: 18px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.numrow-boxes { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.nbox { min-width: 58px; padding: 8px 6px; border: 2px solid var(--primary); border-radius: 8px; font-size: 24px; font-weight: 800; color: var(--primary-dark); background: #fff; text-align: center; transition: background .3s; }
.nbox.on { background: #fff3d6; border-color: var(--accent); }
.nbox.blank { color: #bbb; border-style: dashed; }

/* ---- arrange (排序) ---- */
.arrange { text-align: center; }
.tiles, .slots { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.tile { font-family: inherit; font-size: 26px; font-weight: 800; padding: 12px 20px; border-radius: 14px; border: 3px solid var(--primary); background: #efeafd; color: var(--primary-dark); cursor: pointer; transition: transform .1s; }
.tile:hover:not(:disabled):not(.used) { transform: translateY(-3px); }
.tile.used { opacity: .25; cursor: default; }
.arrow-hint { font-size: 16px; color: var(--muted); margin: 6px 0; }
.slot { display: inline-flex; align-items: center; justify-content: center; min-width: 78px; height: 56px; border: 3px dashed #ccc; border-radius: 14px; font-size: 26px; font-weight: 800; color: var(--primary-dark); }
.slot.filled { border-style: solid; border-color: var(--primary); background: #fff; }
.slot.right { border-color: var(--ok); background: #eafaf1; }
.slot.wrong { border-color: var(--bad); background: #fff0f0; }

/* ---- 横式 ---- */
.eq-big { font-size: 46px; font-weight: 800; color: var(--primary-dark); letter-spacing: 2px; }
.eq-big .eq-q { color: var(--accent); }

/* ---- 竖式 ---- */
.column { display: inline-grid; gap: 2px 0; margin: 8px auto; }
.col-head { font-size: 13px; color: var(--muted); font-weight: 700; text-align: center; }
.col-head.h { color: var(--hund); } .col-head.t { color: var(--tens); } .col-head.o { color: var(--ones); }
.col-cell { position: relative; height: 62px; display: flex; align-items: flex-end; justify-content: center; font-size: 36px; font-weight: 800; color: var(--ink); padding-bottom: 4px; border-radius: 6px; }
.col-cell.h .dg { color: var(--hund); } .col-cell.t .dg { color: var(--tens); } .col-cell.o .dg { color: var(--ones); }
.col-cell.hl { background: #fff3d6; }
.col-cell .regroup { position: absolute; top: 2px; left: 0; right: 0; text-align: center; font-size: 16px; font-weight: 700; color: var(--bad); line-height: 1; }
.col-cell .regroup .carry { font-style: normal; color: var(--bad); }
.col-cell .op { position: absolute; left: -26px; bottom: 4px; color: var(--muted); font-size: 32px; }
.col-cell.res { border-top: 3px solid var(--ink); height: 66px; }
.col-cell .dg.strike { text-decoration: line-through; text-decoration-color: var(--bad); text-decoration-thickness: 3px; opacity: .55; }
input.col-in { width: 48px; height: 52px; font-size: 34px; font-weight: 800; text-align: center; border: 2px dashed var(--primary); border-radius: 8px; background: #f7f5ff; color: var(--primary-dark); font-family: inherit; outline: none; }
input.col-in:focus { border-style: solid; background: #efeafd; }
input.col-in.good { border-color: var(--ok); background: #eafaf1; color: #1e9e56; }
input.col-in.badf { border-color: var(--bad); background: #fff0f0; color: var(--bad); }
input.carry-in { width: 36px; height: 20px; font-size: 14px; font-weight: 700; text-align: center; border: 1px dashed #ccc; border-radius: 4px; background: transparent; color: var(--bad); font-family: inherit; outline: none; }
input.carry-in:focus { border-color: var(--bad); }

/* ---- 方块表格（加减） ---- */
.blk-table { display: inline-block; margin: 6px auto; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; }
.blk-row { display: grid; grid-template-columns: 100px 200px 200px 140px; align-items: center; border-bottom: 1px solid var(--line); }
.blk-row:last-child { border-bottom: none; }
.blk-num { font-size: 22px; font-weight: 800; color: var(--primary-dark); text-align: center; }
.blk-cell { padding: 6px; min-height: 60px; display: flex; align-items: center; justify-content: center; border-left: 1px solid var(--line); }
.blk-cell.hl { background: #fff3d6; }
.blk-cell .blocks svg { max-height: 130px; width: auto; }
.blk-row.head div { font-size: 14px; font-weight: 700; color: var(--muted); text-align: center; padding: 4px; background: #f4f1fc; }
.blk-row.head .h { color: var(--hund); } .blk-row.head .t { color: var(--tens); } .blk-row.head .o { color: var(--ones); }
.blk-row.sum div { font-size: 28px; font-weight: 800; text-align: center; padding: 6px; min-height: 48px; }
.blk-row.sum .h { color: var(--hund); } .blk-row.sum .t { color: var(--tens); } .blk-row.sum .o { color: var(--ones); }
.blk-row.sum .on { background: #fff3d6; }
.blk.crossed rect { fill: #ffb3b3 !important; fill-opacity: .5 !important; stroke: var(--bad) !important; }
.blk.crossed line { stroke: var(--bad) !important; }
.blk.crossed { opacity: .7; }
@media (max-width: 760px) { .blk-row { grid-template-columns: 70px 1fr 1fr 90px; } }

/* ---- 应用题 ---- */
.wp-text { text-align: left; max-width: 760px; margin: 0 auto; }
.wp-en { font-size: 22px; font-weight: 700; line-height: 1.5; color: var(--ink); }
.wp-zh { font-size: 17px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.small-speak { font-size: 14px; background: #efeafd; border-radius: 8px; padding: 2px 8px; margin-right: 6px; color: var(--primary-dark); font-weight: 700; }

/* ---- 图片组（乘除法） ---- */
.pic-groups { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 6px 0; }
.pic-group { position: relative; display: grid; grid-template-columns: repeat(var(--per, 5), auto); gap: 2px 4px; padding: 8px 10px; border: 2px solid #d9d2f7; border-radius: 14px; background: #fbfaff; transition: background .25s, border-color .25s; }
.pic-group.circle { border-radius: 30px; border-color: #c8c0f0; }
.pic-group.on { background: #fff3d6; border-color: var(--accent); }
.pic-group .pic-label { position: absolute; top: -10px; right: -6px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 800; border-radius: 10px; padding: 0 7px; }
.pic-item { font-size: 26px; line-height: 1.15; transition: transform .2s; }
.pic-item.on { transform: scale(1.15); filter: drop-shadow(0 0 4px rgba(255,159,67,.9)); }
.pic-loose { display: flex; flex-wrap: wrap; gap: 4px 8px; justify-content: center; max-width: 560px; margin: 6px auto; }
.pic-array { display: inline-grid; gap: 4px 8px; margin: 6px auto; padding: 10px 14px; border: 2px solid #d9d2f7; border-radius: 14px; }
.pic-array .pic-item.on { background: #fff3d6; border-radius: 6px; }
.qstage .pic-groups, .qstage .pic-array { max-width: 100%; }

/* ---- 秤 ---- */
.scale-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: flex-end; }
.digital { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 14px; background: #fbfaff; }
.digital-item { font-size: 16px; font-weight: 700; }
.digital-screen { font-family: "Consolas", monospace; font-size: 26px; font-weight: 700; background: #1b2b1b; color: #7CFC00; padding: 4px 16px; border-radius: 8px; letter-spacing: 2px; }

/* ---- 钱 ---- */
.money-group { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin: 6px 0; }
.money { display: inline-flex; align-items: center; justify-content: center; cursor: default; user-select: none; transition: transform .12s, opacity .25s; }
.money.note { flex-direction: column; width: 92px; height: 46px; border-radius: 6px; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 18%, #fff); color: var(--c); }
.money.note b { font-size: 20px; line-height: 1; }
.money.note i { font-style: normal; font-size: 8px; letter-spacing: .5px; margin-top: 2px; }
.money.coin { width: 46px; height: 46px; border-radius: 50%; border: 3px solid #999; background: radial-gradient(#f4f4f4, #cfcfcf); color: #444; font-size: 15px; box-shadow: inset 0 0 0 2px #fff; }
.money.coin.big { width: 54px; height: 54px; font-size: 17px; }
.money.coin.small { width: 40px; height: 40px; font-size: 13px; }
.money.coin.gold { border-color: #c9a227; background: radial-gradient(#fff2b3, #e0b93e); color: #7a5c00; font-size: 18px; clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); border-radius: 0; }
.money.dim { opacity: .2; }
.money.hl { transform: scale(1.15); filter: drop-shadow(0 0 6px rgba(255,159,67,.9)); }
.pick-set .money { cursor: pointer; }
.pick-set .money:hover:not(.locked) { transform: translateY(-3px); }
.pick-set .money.sel { outline: 4px solid var(--primary); outline-offset: 2px; background-color: #efeafd; }
.pick-set .money.locked { cursor: default; }
.pick-set { border: 2px solid var(--line); border-radius: 14px; padding: 10px; margin: 10px 0; }
.pick-set.right { border-color: var(--ok); background: #f3fcf6; }
.pick-set.wrong { border-color: var(--bad); background: #fff6f6; }
.pick-sum.ok { color: var(--ok); }
.money-table { margin: 6px auto; border-collapse: collapse; font-size: 20px; }
.money-table th, .money-table td { padding: 6px 18px; border: 1px solid var(--line); text-align: center; }
.money-table th { background: #f4f1fc; color: var(--muted); font-size: 14px; }
.money-table td:first-child { font-weight: 700; color: var(--primary-dark); }
.money-table td.hl { background: #fff3d6; font-weight: 800; }

/* ---- 图形（Unit 13） ---- */
.figimg { display: inline-block; max-width: 100%; height: auto; border-radius: 8px; }
.shp.hl { filter: drop-shadow(0 0 6px rgba(255,159,67,.9)); }
.shape-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.shape-cell { display: flex; flex-direction: column; align-items: center; padding: 8px 10px; border-radius: 12px; border: 2px solid transparent; transition: background .25s; }
.shape-cell.on { background: #fff3d6; border-color: var(--accent); }
.shape-name { font-size: 14px; font-weight: 700; text-align: center; line-height: 1.2; margin-top: 4px; }
.pat-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; }
.pat-cell { display: inline-flex; align-items: center; justify-content: center; width: 70px; height: 70px; border-radius: 10px; border: 2px solid transparent; transition: background .25s; }
.pat-cell.on { background: #fff3d6; border-color: var(--accent); }
.pat-cell.next { border: 3px dashed var(--primary); font-size: 30px; color: var(--primary); }
.pick-opts { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 10px 0; }
.pick-opts .choice { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 14px; min-width: 120px; text-align: center; }
.pick-opts .choice .key { margin-bottom: 2px; }
.pick-opts .choice.wrong { text-decoration: none; }
.gridq { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(120px, 1fr)); gap: 10px; margin: 6px 0; }
.gq-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border: 2px solid var(--line); border-radius: 14px; background: #fff; }
.gq-cell.right { border-color: var(--ok); background: #f3fcf6; }
.gq-cell.wrong { border-color: var(--bad); background: #fff6f6; }
.gq-pic { display: flex; align-items: center; justify-content: center; min-height: 80px; }
.gq-seg { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.gq-seg .segbtn { font-size: 15px; padding: 4px 9px; }
@media (max-width: 700px) { .gridq { grid-template-columns: repeat(2, 1fr); } }
.gc-wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; }
.gc { border: 2px solid var(--line); border-radius: 12px; background: #fff; max-width: 100%; height: auto; }
.gc.live .gc-dot { cursor: pointer; transition: r .1s; }
.gc.live .gc-dot:hover { r: 10; }
.gc.live .gc-dot.start { fill: var(--accent); stroke: var(--accent); }
.gc.bad { border-color: var(--bad); animation: shake .4s; }

/* ---- 分数（Unit 14） ---- */
.fracin { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 6px; line-height: 1; }
.fracin input.blank { width: 2.2em !important; font-size: 20px; padding: 2px 4px; margin: 0; border-radius: 6px; border-bottom-width: 2px; text-align: center; }
.fracin .fbar { width: 2.6em; height: 3px; background: var(--ink); margin: 3px 0; border-radius: 2px; }
.frac { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 4px; line-height: 1.05; font-weight: 800; }
.frac .n { padding: 0 4px; } .frac .d { padding: 0 4px; border-top: 2.5px solid currentColor; }
.frac.big { font-size: 34px; } .frac.big .d { border-top-width: 3px; }
.fig svg { max-width: 100%; height: auto; }
.fig .piece { transition: fill .15s; }
.fig.live .piece { cursor: pointer; }
.fig.live .piece:hover { fill: #e0d8ff; }
.fig .piece.on { fill: #9d8fee; }
.fig .piece.right { fill: #9be3b7; } .fig .piece.wrong { fill: #ffb3b3; }
.fig-row { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; align-items: center; }
.fig-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; border-radius: 12px; border: 2px solid transparent; }
.fig-item.on { background: #fff3d6; border-color: var(--accent); }
.fig-item .lbl { font-size: 14px; color: var(--muted); font-weight: 700; }
.fbar-model { display: inline-flex; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; }
.fbar-model span { width: 34px; height: 30px; border-right: 1px solid var(--ink); background: #fff; }
.fbar-model span:last-child { border-right: none; }
.fbar-model span.a { background: #9d8fee; } .fbar-model span.b { background: #ffcf8a; } .fbar-model span.x { background: #ddd; }
.tile.frac-tile { display: inline-flex; flex-direction: column; align-items: center; padding: 8px 18px; line-height: 1.05; }
.tile.frac-tile .d { border-top: 2.5px solid currentColor; padding: 0 3px; }
.slot .frac { font-size: 20px; }

/* ---- 时间（Unit 15） ---- */
.timein { display: inline-flex; align-items: center; gap: 2px; margin: 0 4px; vertical-align: middle; }
.timein input.blank { width: 2.3em !important; text-align: center; margin: 0; }
.timein b { font-size: 26px; line-height: 1; }
.clock svg { max-width: 100%; height: auto; }
.clock.live .clk-hit { cursor: crosshair; }
.clock.bad svg { filter: drop-shadow(0 0 6px rgba(255,107,107,.9)); }
.clock.goodc svg { filter: drop-shadow(0 0 6px rgba(46,204,113,.9)); }
.clockset .fill { margin-top: 10px; }

/* ---- 象形图（Unit 16） ---- */
.pg { display: inline-block; max-width: 100%; border: 2px solid var(--ink); border-radius: 10px; background: #fff; padding: 6px 10px 8px; text-align: left; }
.pg-title { text-align: center; font-weight: 800; font-size: 18px; margin: 4px 0 8px; }
.pg-sym { font-size: 26px; line-height: 1.1; display: inline-block; transition: transform .15s; }
.pg-sym.hl { transform: scale(1.25); filter: drop-shadow(0 0 6px rgba(255,159,67,.9)); }
.pg-sym.dim { opacity: .35; }
.pg-horiz { display: table; border-collapse: collapse; }
.pg-row { display: table-row; }
.pg-row .pg-lab, .pg-row .pg-cells { display: table-cell; border: 1px solid #999; padding: 4px 10px; vertical-align: middle; }
.pg-row .pg-lab { font-weight: 700; font-size: 17px; white-space: nowrap; min-width: 100px; }
.pg-row .pg-cells { letter-spacing: 4px; min-width: 240px; white-space: nowrap; }
.pg-row.hl .pg-lab, .pg-row.hl .pg-cells { background: #fff3d6; }
.pg-num, .pg-note { font-size: 16px; color: var(--accent2, #7c3aed); font-weight: 700; letter-spacing: 0; margin-left: 10px; }
.pg-vert { display: flex; align-items: flex-end; border: 1px solid #999; }
.pg-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; border-right: 1px solid #999; min-width: 88px; padding: 6px 4px 0; transition: background .15s; }
.pg-col:last-child { border-right: none; }
.pg-col.hl { background: #fff3d6; }
.pg-col.right { background: #e5f9ec; } .pg-col.wrong { background: #ffe1e1; }
.pg-stack { display: flex; flex-direction: column-reverse; align-items: center; min-height: 34px; }
.pg-stack .pg-sym { animation: pop .18s ease-out; }
.pg-col .pg-lab { border-top: 1px solid #999; width: 100%; text-align: center; font-weight: 700; font-size: 15px; padding: 4px 2px; line-height: 1.2; }
.pg-col .pg-ico { display: block; font-size: 24px; }
.pg-col .pg-num { margin: 0 0 4px; }
.pg-col .pg-note { margin: 0; padding: 2px 4px 4px; text-align: center; }
.pg-ctl { display: flex; gap: 6px; padding: 6px 0; }
.pg-ctl button { width: 34px; height: 34px; border-radius: 10px; border: 2px solid var(--primary); background: #fff; color: var(--primary); font-size: 22px; font-weight: 800; cursor: pointer; line-height: 1; }
.pg-ctl button:hover:not(:disabled) { background: var(--primary); color: #fff; }
.pg-ctl button:disabled { opacity: .35; cursor: default; }
.pg-foot { text-align: center; margin-top: 8px; font-size: 16px; border-top: 1px solid #999; padding-top: 6px; }
.pg-rect { display: inline-block; width: 26px; height: 14px; border: 2px solid var(--ink); border-radius: 3px; background: #e9e4ff; vertical-align: middle; margin: 2px 0; }
.pg-chart { display: inline-flex; align-items: flex-end; border: 2px solid var(--ink); border-radius: 10px; background: #fff; overflow: hidden; }
.pgc-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; border-right: 1px solid #999; padding: 8px 8px 0; min-width: 80px; }
.pgc-col:last-child { border-right: none; }
.pgc-col.hl { background: #fff3d6; }
.pgc-stack { display: flex; flex-wrap: wrap-reverse; flex-direction: row; justify-content: center; max-width: 76px; gap: 2px; }
.pgc-stack .pg-sym { font-size: 22px; }
.pgc-cnt { font-weight: 800; color: var(--accent2, #7c3aed); font-size: 18px; }
.pgc-lab { border-top: 1px solid #999; width: 100%; text-align: center; font-size: 14px; font-weight: 700; padding: 3px 0; }
.pg-scene { display: inline-block; border: 2px solid var(--ink); border-radius: 14px; background: #f3f3f3; padding: 10px 16px; }
.pgs-row { display: flex; flex-wrap: wrap; gap: 6px 10px; justify-content: center; margin: 6px 0; }
.pgs-row .pg-sym { font-size: 32px; }
.pgs-cnt { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; margin-top: 8px; font-size: 18px; }
.pgmake { text-align: center; }
.pgmake .pg { margin-top: 8px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (max-width: 700px) { .pg-row .pg-cells { white-space: normal; min-width: 0; } .pg-col { min-width: 64px; } .pg-sym { font-size: 22px; } }

/* ---- 容量（Unit 17） ---- */
.vessel { display: inline-block; vertical-align: bottom; border-radius: 10px; padding: 4px; transition: background .15s; }
.vessel.hl { background: #fff3d6; outline: 3px solid var(--accent); }
.vessel svg { display: block; }
.vol-row { align-items: flex-end; }
.vol-arrow { font-size: 30px; color: #7a7a8c; margin: 0 6px; }
.cups { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.cup { display: inline-block; border-radius: 6px; padding: 1px; }
.cup.hl { background: #fff3d6; }
.cup.dim { opacity: .3; }
.cups-cnt { margin-left: 10px; font-size: 20px; color: var(--primary); }
.vol-list { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin: 0 auto; width: max-content; max-width: 100%; }
.vol-item { display: flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 12px; border: 2px solid transparent; }
.vol-item.hl { background: #fff3d6; border-color: var(--accent); }
.vol-name { font-weight: 800; font-size: 18px; min-width: 70px; }
.vol-emoji { font-size: 56px; }
.paint svg text { font-size: 12px; }

/* ---- 年级选择 ---- */
.level-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; margin-top: 18px; }
.level-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px 22px; background: #fff; border-radius: 18px; border: 3px solid transparent; box-shadow: 0 4px 14px rgba(0,0,0,.06); text-decoration: none; color: var(--ink); transition: transform .15s, border-color .15s; position: relative; }
.level-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.level-card.soon { opacity: .5; }
.level-card.soon:hover { transform: none; border-color: transparent; }
.level-num { width: 74px; height: 74px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 40px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.level-card.soon .level-num { background: #b8b8c8; }
.level-name { font-size: 22px; font-weight: 800; letter-spacing: .5px; }
.lv-head { margin: 18px 0 6px; font-size: 18px; color: var(--primary); }

/* ---- Level 1 ---- */
.tf { display: inline-grid; grid-template-columns: repeat(5, 58px); grid-auto-rows: 58px; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; background: #fff; }
.tf-cell { position: relative; border: 1px solid #aaa; display: flex; align-items: center; justify-content: center; }
.tf-cell.hl { background: #fff3d6; }
.tf-ico { font-size: 34px; line-height: 1; }
.tf-num { position: absolute; top: 1px; left: 3px; font-size: 13px; color: var(--accent); font-weight: 900; }
.tf.small { grid-template-columns: repeat(5, 40px); grid-auto-rows: 40px; } .tf.small .tf-ico { font-size: 24px; }
.l1row { display: inline-flex; flex-wrap: wrap; gap: 6px 8px; justify-content: center; align-items: flex-end; vertical-align: middle; }
.l1item { position: relative; font-size: 40px; line-height: 1.1; display: inline-block; padding-top: 14px; transition: transform .15s; }
.l1item .tf-num { top: -2px; left: 50%; transform: translateX(-50%); font-size: 15px; }
.l1item.hl { transform: scale(1.2); filter: drop-shadow(0 0 6px rgba(255,159,67,.9)); }
.l1item.dim { opacity: .3; }
.l1item.gone { opacity: .35; text-decoration: line-through; text-decoration-color: var(--bad); text-decoration-thickness: 4px; }
.l1item.pop { animation: pop .18s ease-out; }
.l1row.badrow { outline: 3px dashed var(--bad); border-radius: 12px; padding: 4px 8px; } .l1row.goodrow { outline: 3px solid var(--ok); border-radius: 12px; padding: 4px 8px; }
.l1dots { display: inline-flex; gap: 6px; vertical-align: middle; } .l1dots .dot { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); display: inline-block; } .l1dots .dot.x { background: #ddd; }
.bignum { font-size: 44px; font-weight: 900; color: var(--ink); margin-right: 14px; vertical-align: middle; min-width: 1.4em; display: inline-block; text-align: center; }
.cmp-dots { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; width: max-content; margin: 0 auto; } .cmp-dots > div { padding: 6px 12px; border-radius: 12px; } .cmp-dots > div.hl { background: #fff3d6; outline: 3px solid var(--accent); }
.pair { display: inline-block; text-align: left; }
.pair-lab { display: flex; flex-direction: column; justify-content: space-between; float: left; height: 150px; margin-right: 10px; font-weight: 800; font-size: 17px; }
.pair-cols { display: inline-flex; gap: 6px; }
.pair-col { display: flex; flex-direction: column; align-items: center; width: 52px; }
.pair-top, .pair-bot { font-size: 36px; height: 48px; line-height: 48px; }
.pair-line { width: 0; height: 50px; border-left: 3px dotted #888; } .pair-line.none { border-left-color: transparent; }
.wordtab { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; } .wordtab span { display: inline-flex; flex-direction: column; align-items: center; padding: 6px 10px; border-radius: 10px; background: #fff; border: 2px solid #ddd; font-size: 16px; min-width: 62px; } .wordtab span b { font-size: 24px; } .wordtab span.hl { border-color: var(--accent); background: #fff3d6; }
.matchdemo { display: inline-flex; align-items: center; gap: 12px; font-size: 26px; font-weight: 800; } .matchdemo .mline { width: 90px; border-top: 4px solid var(--accent); } .matchdemo .mkey, .matchdemo .mcar { padding: 8px 18px; border: 3px solid var(--ink); border-radius: 30px; background: #fff; }
.stamp-scene { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; min-height: 90px; padding: 10px; border: 2px dashed #ccc; border-radius: 14px; background: #fff; margin: 10px auto; max-width: 640px; }
.stamp-scene .scene { font-size: 64px; }
.match-cols { display: flex; justify-content: center; gap: 60px; }
.match-col { display: flex; flex-direction: column; gap: 8px; }
.mitem { position: relative; font-family: inherit; font-size: 22px; font-weight: 800; padding: 6px 18px; min-width: 110px; border-radius: 30px; border: 3px solid #cfcfe0; background: #fff; color: var(--ink); cursor: pointer; }
.mitem:hover:not(:disabled) { border-color: var(--primary); }
.mitem.sel { background: #efeafd; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(108,92,231,.25); }
.mitem.paired { background: #fafafa; }
.mitem.right { background: #eafaf1; } .mitem.wrong { background: #fff0f0; border-color: var(--bad) !important; }
.mchip { position: absolute; top: -10px; right: -10px; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.mitem[data-side="R"] .mchip { right: auto; left: -10px; }
.pick-opts .choice.pm.sel { border-color: var(--primary); background: #efeafd; }
.pick-opts .choice.pm .big { font-size: 34px; }
.center-list { align-items: center; }
.numshape { display: inline-flex; align-items: center; justify-content: center; width: 84px; height: 84px; font-size: 36px; font-weight: 900; color: var(--ink); }
.numshape.tri { clip-path: polygon(50% 0, 100% 100%, 0 100%); background: #ffe9c9; padding-top: 22px; }
.numshape.tridown { clip-path: polygon(0 0, 100% 0, 50% 100%); background: #ffe9c9; padding-bottom: 22px; }
.numshape.circ { border-radius: 50%; background: #e0f0ff; }
.numshape.rect { border-radius: 8px; background: #e8ffe8; width: 100px; height: 66px; }
.numshape.oval { border-radius: 50%; background: #fde2ff; width: 110px; height: 70px; }
.numshape.plain { background: none; }
@media (max-width: 700px) { .match-cols { gap: 20px; } .pair-col { width: 40px; } .pair-top, .pair-bot { font-size: 28px; } .tf { grid-template-columns: repeat(5, 46px); grid-auto-rows: 46px; } .tf-ico { font-size: 26px; } }
.flower { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: #ffd6e7; font-weight: 900; font-size: 22px; vertical-align: middle; margin: 0 4px; }
.shapes-row .l1item { font-size: 34px; }
.wordtab.path span b { color: var(--primary); }
.l1wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
.l1wrap .fig-row, .l1wrap .pair { margin: 0 auto; }
/* number bond */
.bond { position: relative; display: inline-block; width: 220px; height: 150px; vertical-align: middle; }
.bond svg { position: absolute; left: 0; top: 0; }
.bond-c { position: absolute; width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 900; color: var(--ink); }
.bond-c.w { left: 30px; top: 47px; width: 60px; height: 60px; }
.bond-c.a { left: 150px; top: 10px; } .bond-c.b { left: 150px; top: 82px; }
.bond-c.q { color: #bbb; border-style: dashed; }
.bond-c.hl { background: #fff3d6; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255,159,67,.3); }
.bond-c input.bondin { width: 44px !important; height: 40px; font-size: 24px; text-align: center; padding: 0; margin: 0; border: none; border-bottom: 3px solid var(--primary); border-radius: 4px; background: #f3f0ff; }
.bond-groups { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.bond-grp { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 14px; border: 3px solid transparent; }
.bond-grp.hl { background: #fff3d6; border-color: var(--accent); } .bond-grp.dim { opacity: .35; }
.bond-plus { font-size: 26px; color: #999; font-weight: 800; }
.grp-cnt { font-size: 22px; color: var(--primary); margin-left: 4px; }
.shp-glyph { font-size: 38px; color: #8a8a99; line-height: 1; } .shp-glyph.hollow { color: var(--ink); }
.bondq .fill { margin-top: 6px; }
/* 往后数 */
.counton { display: inline-flex; align-items: flex-end; gap: 6px; flex-wrap: wrap; justify-content: center; }
.co-grp { display: inline-flex; align-items: flex-end; gap: 4px; padding: 6px 8px; border-radius: 12px; }
.co-grp.on { background: #fff8ea; }
.co-item { display: inline-flex; flex-direction: column; align-items: center; width: 44px; }
.co-top { height: 26px; font-size: 18px; font-weight: 900; color: var(--accent); display: flex; align-items: center; gap: 2px; }
.co-ico { font-size: 34px; line-height: 1.1; }
.co-bot { font-size: 13px; color: #999; }
.co-item.hl .co-ico { transform: scale(1.15); filter: drop-shadow(0 0 5px rgba(255,159,67,.9)); }
.co-start { font-size: 22px; font-weight: 900; color: var(--primary); margin: 0 4px 22px; }
.co-arrow { display: inline-block; width: 14px; height: 10px; border-top: 3px solid var(--accent); border-right: 3px solid var(--accent); transform: rotate(45deg) translateY(4px); margin-right: 2px; }
.hops { display: inline-flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hop { display: inline-flex; flex-direction: column; align-items: center; font-size: 26px; font-weight: 900; color: #bbb; min-width: 34px; }
.hop.start { color: var(--primary); } .hop.on { color: var(--ink); }
.hop .co-arrow { margin-bottom: 4px; }
.eqline { display: inline-flex; align-items: center; gap: 10px; font-size: 30px; font-weight: 900; color: var(--ink); }
.eq-c, .eq-t, .eq-s { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border: 3px solid var(--accent); background: #fff; }
.eq-c { border-radius: 50%; } .eq-t { clip-path: polygon(50% 0, 100% 100%, 0 100%); background: #ffe9c9; border: none; padding-top: 14px; } .eq-s { border-radius: 6px; }
.eq-c.hl, .eq-s.hl { background: #fff3d6; box-shadow: 0 0 0 4px rgba(255,159,67,.3); }
.sum-opt { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border: 2px solid var(--ink); border-radius: 6px; font-size: 24px; font-weight: 800; background: #fff; }
.sum-opt.right { background: #9be3b7; } .sum-opt.wrong { background: #eee; color: #999; }
.pick-opts .choice .sum-opt { border: none; background: none; padding: 0; }

.speak.speaking { color: var(--bad); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .4; } }
/* 减法 */
.l1item.gone { opacity: 1; text-decoration: none; }
.l1item.gone::after { content: '✕'; position: absolute; left: 50%; top: 55%; transform: translate(-50%, -50%); font-size: 46px; font-weight: 900; color: var(--bad); line-height: 1; pointer-events: none; }
.l1item.gone .tf-num { opacity: .4; }
.l1item.cx { cursor: pointer; } .l1item.cx:hover { transform: scale(1.1); }
.tf-cell .l1item.tfx { padding-top: 0; font-size: 34px; }
.nstrip { display: inline-flex; border: 2px solid var(--ink); border-radius: 6px; background: #fff; }
.ns { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: var(--ink); position: relative; }
.ns.on { background: #fff3d6; } .ns.circle { box-shadow: inset 0 0 0 3px var(--accent); border-radius: 50%; }
.famgrid { display: grid; grid-template-columns: repeat(2, auto); gap: 8px 22px; }
.fam { font-size: 24px; font-weight: 800; padding: 4px 14px; border-radius: 8px; background: #eee; color: #aaa; text-align: center; min-width: 120px; }
.fam.on { background: #fff; color: var(--ink); border: 2px solid var(--accent); }
.bondq input.bondtx { width: 2.6em !important; }
.crossq .fill { margin-top: 8px; }
.crossq input.blank { width: 3em !important; }
/* 图形与位置 */
.shp2 { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; border-radius: 10px; padding: 4px; position: relative; }
.shp2.hl { background: #fff3d6; outline: 3px solid var(--accent); }
.shp2.blank-shp { width: 60px; height: 60px; border: 2px dashed #bbb; color: #bbb; font-size: 28px; font-weight: 800; }
.shp2.letter { width: 48px; height: 48px; border: 2px solid var(--ink); background: #fff; font-size: 26px; font-weight: 900; margin: 0 3px; }
.shp2.lab { flex-direction: column; } .shp2.lab i { font-style: normal; font-weight: 700; font-size: 15px; }
.shaperow { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; }
.shapefield { display: flex; flex-wrap: wrap; gap: 10px 14px; justify-content: center; align-items: center; max-width: 620px; margin: 0 auto; padding: 12px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; }
.pick-opts .choice .shp2 { padding: 0; }
.pfblank { display: inline-flex; align-items: center; justify-content: center; width: 68px; height: 68px; border: 3px dashed var(--primary); border-radius: 10px; background: #f3f0ff; cursor: pointer; font-size: 28px; color: #aaa; font-weight: 800; }
.pfblank.right { border-style: solid; border-color: var(--ok); background: #eafaf1; } .pfblank.wrong { border-style: solid; border-color: var(--bad); background: #fff0f0; }
.cyitem { position: relative; cursor: pointer; display: inline-flex; border-radius: 10px; padding: 2px; }
.cyitem:hover { background: #f3f0ff; }
.cytag { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 26px; font-weight: 900; color: var(--primary); pointer-events: none; }
.cyitem.right { background: #eafaf1; } .cyitem.wrong { background: #ffe1e1; }
.ordrow { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.orditem { display: inline-flex; flex-direction: column; align-items: center; width: 56px; padding: 4px 0; border-radius: 10px; }
.orditem.hl { background: #fff3d6; outline: 3px solid var(--accent); }
.ordico { font-size: 36px; line-height: 1.1; } .ordlab { font-size: 13px; color: var(--accent); height: 18px; }
.pick-opts.ordpick-wrap .choice, .pick-opts .choice.ordpick { min-width: 0; }
.ordpick-opts .choice { min-width: 54px; padding: 6px 4px; font-size: 34px; }
.pick-opts.ordpick { gap: 6px; } .pick-opts.ordpick .choice { min-width: 54px; padding: 6px 4px; font-size: 34px; }
/* 20 以内 */
.frames2 { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tf.hlf { outline: 3px solid var(--accent); background: #fff3d6; }
.tf-cell.gonecell .tf-ico { opacity: .25; } .tf-cell.gonecell::after { content: '✕'; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); color: var(--bad); font-size: 34px; font-weight: 900; }
.dots20 { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 10px; }
.dots20 > b { font-size: 26px; min-width: 1.6em; text-align: center; }
.dots20.hl { background: #fff3d6; outline: 3px solid var(--accent); }
.shp2.numshp { position: relative; } .shp2.numshp b { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 20px; }
.l1item.cb.gone::after { font-size: 36px; }
/* 长度 */
.sizeimg { display: inline-block; transform-origin: center bottom; }
.sizeimg.big img { max-width: 220px !important; } .sizeimg.small img { max-width: 140px !important; }
.pick-opts .choice .sizeimg img { display: block; }
.sizeimg.big img { max-width: 260px !important; } .sizeimg.small img { max-width: 170px !important; }
/* 40 以内 */
.frames2.wrapf { flex-wrap: wrap; }
.l1row.tight { gap: 2px 4px; } .l1row.tight .l1item { font-size: 30px; padding-top: 4px; }
.bond-groups.wrapg { flex-wrap: wrap; max-width: 760px; }
.tri10 { display: inline-block; padding: 4px; border-radius: 8px; } .tri10.hl { background: #fff3d6; }
.hldots { background: #fff3d6; border-radius: 8px; padding: 4px; }
.tochart { border-collapse: collapse; font-size: 20px; margin: 0 8px; } .tochart th, .tochart td { border: 2px solid var(--ink); padding: 4px 16px; text-align: center; } .tochart th { background: #e9e4ff; font-size: 15px; } .tochart.hl { outline: 3px solid var(--accent); }
.setbox2 { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.setbox { border: 2px solid var(--accent); border-radius: 8px; padding: 8px 12px; min-width: 200px; display: flex; flex-direction: column; align-items: center; gap: 6px; } .setbox > b { font-size: 16px; }
.setbox .l1row { max-width: 230px; }
.numbox { display: inline-flex; gap: 30px; border: 2px solid var(--ink); padding: 8px 24px; font-size: 22px; font-weight: 800; }
.nstrip .ns.blankn { color: #bbb; background: #f3f0ff; }
.cmp-dots .bignum { font-size: 22px; }

/* 错题本：完整题目快照 */
.wq-snap { border: 2px dashed #ddd; border-radius: 12px; padding: 8px 12px; margin: 6px 0; background: #fffdf8; }
.wq-snap .stage.small { min-height: 0; padding: 4px; }
.wq-snap .stage.small img, .wq-snap .stage.small .figimg { max-width: 320px !important; }
.wq-snap .wq-prompt { font-weight: 700; margin-bottom: 4px; }
.wq-snap .fill { font-size: 18px; line-height: 2.2; }
.wq-snap .btn, .wq-snap .sub { display: none; }
.wq-snap .choices { max-width: 520px; margin: 4px 0; } .wq-snap .choice { font-size: 17px; padding: 6px 10px; }
.wq-snap .l1item { font-size: 28px; } .wq-snap .tf { grid-template-columns: repeat(5, 36px); grid-auto-rows: 36px; } .wq-snap .tf-ico { font-size: 22px; }
.wrong-item.done { opacity: .85; }
.done-card summary { cursor: pointer; list-style: none; } .done-card summary::-webkit-details-marker { display: none; }
/* 条形图（应用题） */
.bar2 { display: inline-flex; flex-direction: column; align-items: stretch; min-width: 260px; }
.barrow { display: flex; border: 2px solid var(--ink); border-radius: 4px; overflow: hidden; }
.barseg { padding: 6px 10px; text-align: center; font-weight: 800; background: #e9e4ff; } .barseg.alt { background: #ffe9c9; border-left: 2px solid var(--ink); }
.barlab { text-align: center; font-weight: 800; margin-top: 2px; color: var(--accent); }

/* Level 1 象形图 */
.l1pg .pg-stack.wide { flex-direction: row; flex-wrap: wrap-reverse; max-width: 74px; justify-content: center; gap: 2px; }
.l1pg .pg-stack.row { display: inline; }
.l1pg .pg-sym img, .l1pg .pg-ico img { height: 30px; vertical-align: middle; }
.l1pg .pg-row .pg-lab .pg-ico { font-size: 22px; margin-right: 6px; }
.l1pg .pg-foot .zh { color: #888; font-size: 14px; margin-left: 8px; }
.l1pg .pg-col .pg-note { order: -1; margin-bottom: 4px; }
.l1pg .pg-col { min-width: 80px; }
.l1pg input.pg-in { width: 46px; height: 34px; font-size: 20px; text-align: center; margin: 4px; }
.l1pg .pg-row.right .pg-cells { background: #e5f9ec; } .l1pg .pg-row.wrong .pg-cells { background: #ffe1e1; }
.l1pg .pg-sym.dice { font-size: 32px; }
.l1pg .pg-lab .dice, .l1pg .pg-note .dice, .expand-line .dice { font-size: 30px; line-height: 1; vertical-align: middle; }
.pic-item img { height: 64px; vertical-align: middle; }
.l1wrap .pic-groups { margin: 6px 0 10px; }
.divboxes { display: inline-flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 6px 0; }
.divbox { display: inline-flex; align-items: center; justify-content: center; min-width: 70px; height: 54px; border: 2px solid var(--accent); border-radius: 8px; background: #fff; font-size: 30px; }
.divbox.cont { border-style: dashed; }
.divshape { font-size: 30px; line-height: 1; color: var(--ink); }
.scene-ico { font-size: 44px; line-height: 1.2; }
.match .mitem svg { display: block; }
.setbox2.big { flex-direction: column; align-items: stretch; }
.setbox2.big .setbox { max-width: 100%; }
.setbox2.big .frames2 { justify-content: flex-start; }
.cmp-dots .frames2 .tf { transform: scale(.8); margin: -4px -6px; }
.money-two { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; } .money-two > span { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; border: 2px dashed #ccc; border-radius: 12px; padding: 6px 10px; } .money-two .op { border: none; font-size: 30px; font-weight: 800; color: var(--accent); }
.price-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 8px 0; } .ptag { border: 2px solid var(--accent); border-radius: 20px; padding: 4px 12px; font-size: 15px; background: #fffdf5; } .ptag b { color: var(--primary); margin-left: 4px; } .ptag.hl { background: #fff3d6; outline: 3px solid var(--accent); }
.match .mitem .money-group { display: inline-flex; max-width: 300px; gap: 3px; } .match .mitem .money { transform: scale(.72); margin: -6px -5px; }
.pick-set .money { cursor: pointer; }

/* Level 3：圆片、四位数位值 */
.bignum .th { color: var(--thou); }
.cmp-table.four { grid-template-columns: 90px repeat(4, 64px); }
.cmp-head.th, .cmp-cell.th { color: var(--thou); }
.discs { display: inline-grid; grid-auto-flow: column; border: 2px solid var(--ink); border-radius: 6px; background: #fff; }
.discs .dcol { display: grid; grid-template-columns: repeat(2, auto); grid-auto-rows: 30px; align-content: start; gap: 2px 3px; padding: 6px 8px; min-width: 60px; min-height: 160px; border-right: 1px solid #999; }
.discs .dcol:last-child { border-right: none; }
.discs .dcol.hl { background: #fff3d6; }
.disc { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 26px; border-radius: 50%; border: 1.5px solid #666; background: #eee; font-size: 12px; font-weight: 700; color: #333; }
.disc.d1000 { width: 46px; } .disc.d1 { width: 26px; }
.disc.on { background: #fff3d6; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.disc-pair { display: inline-grid; grid-template-columns: 70px auto; align-items: center; gap: 4px 10px; }
.disc-pair .lbl { font-size: 24px; font-weight: 800; }
.pv4 { border-collapse: collapse; margin: 6px auto; font-size: 18px; } .pv4 th, .pv4 td { border: 1.5px solid #666; padding: 4px 12px; text-align: center; min-width: 80px; }
.pv4 th { font-weight: 700; background: #f7f5ff; } .pv4 td { font-size: 24px; font-weight: 800; }
.pv4 td.th { color: var(--thou); } .pv4 td.h { color: var(--hund); } .pv4 td.t { color: var(--tens); } .pv4 td.o { color: var(--ones); } .pv4 td.hl { background: #fff3d6; }
.pv4 td.blankc { color: #bbb; }
.nline { max-width: 100%; }
.digits-row { display: inline-flex; gap: 8px; } .digits-row span { width: 44px; height: 44px; border: 2px solid var(--primary); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; background: #fff; }
.digits-row span.used { opacity: .3; } .digits-row span.pick { background: #fff3d6; border-color: var(--accent); }
.disc.x { position: relative; opacity: .55; } .disc.x::after { content: ''; position: absolute; inset: -2px; background: linear-gradient(45deg, transparent 46%, #7cb342 46%, #7cb342 54%, transparent 54%), linear-gradient(-45deg, transparent 46%, #7cb342 46%, #7cb342 54%, transparent 54%); }

/* 短除式 */
pre.ldiv { display: inline-block; font-family: 'Consolas', 'Menlo', monospace; font-size: 24px; line-height: 1.35; margin: 6px auto; padding: 8px 14px; background: #fff; border-radius: 8px; text-align: left; }
pre.ldiv .lq { color: var(--primary); font-weight: 800; border-bottom: 2px solid var(--ink); display: inline-block; padding-left: 0; }
pre.ldiv .ldv { display: inline-block; width: 1ch; margin-right: 0; }
pre.ldiv .lbr { display: inline-block; margin-right: 0; }
pre.ldiv .lsub { text-decoration: underline; text-underline-offset: 6px; }
pre.ldiv .lrem { color: var(--bad); font-weight: 800; }
pre.ldiv.mcol { font-size: 22px; } pre.ldiv .mhl { background: #fff3d6; border-radius: 4px; padding: 0 2px; } pre.ldiv .mcarry { color: var(--bad); font-size: 14px; }
.beakers { display: inline-flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; justify-content: center; }
#bk.badf svg { outline: 3px dashed var(--bad); border-radius: 10px; }
.mapbox { display: inline-block; text-align: left; font-size: 16px; line-height: 2; border: 2px solid var(--ink); border-radius: 10px; padding: 8px 14px; background: #fff; white-space: pre; }
#pf.badf svg { outline: 3px dashed var(--bad); border-radius: 10px; }
.polyfig .vtx.on { filter: drop-shadow(0 0 4px #ff9f43); }
.choice .frac { font-size: 22px; }
#gg.badf svg, [id^=ad].badf svg { outline: 3px dashed var(--bad); border-radius: 10px; }
.geogrid, .cellfig { background: #fff; border-radius: 6px; }

/* ---- Level 4：五位数 ---- */
:root { --tenth: #c0392b; }
.pv4 td.tt, .bignum .tt, .cmp-head.tt, .cmp-cell.tt { color: var(--tenth); }
.pv4.five th { font-size: 15px; padding: 4px 8px; min-width: 70px; }
.cmp-table.five { grid-template-columns: 120px repeat(5, 60px); }
.disc.d10000 { width: 54px; font-size: 11px; }
.discs.five .dcol { min-width: 64px; padding: 6px 6px; }
.discrow { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 6px; background: #fff; max-width: 620px; justify-content: center; }
.l4sameq input.blank { width: 5.6em; }
.nl-line { margin: 6px 0; }
.col-head.tt, .col-cell.tt .dg { color: var(--tenth); } .col-head.th, .col-cell.th .dg { color: var(--thou); }
pre.mul2 { display: inline-block; font-family: 'Consolas', 'Menlo', monospace; font-size: 26px; line-height: 1.4; margin: 6px auto; padding: 8px 18px; background: #fff; border-radius: 8px; text-align: right; }
pre.mul2 .cr { color: var(--bad); font-size: 14px; display: block; line-height: 1; height: 14px; }
pre.mul2 .ln { display: block; border-top: 2px solid var(--ink); }
pre.mul2 .hl { background: #fff3d6; border-radius: 4px; }
pre.mul2 .ans { font-weight: 800; color: var(--primary); }
.prot.live { cursor: crosshair; touch-action: none; }
#pr.badf svg, #afig.badf svg { outline: 3px solid var(--bad); border-radius: 8px; }
.prot text { user-select: none; }
.gridfig .gpt:hover { fill: rgba(108,92,231,.18); }
.mixin { display: inline-flex; align-items: center; gap: 2px; vertical-align: middle; margin: 0 6px; }
.mixin input.mw { width: 2.2em !important; font-size: 22px; text-align: center; }
.mixed { display: inline-flex; align-items: center; gap: 2px; vertical-align: middle; font-weight: 800; }
.mixed .w { font-size: 1.25em; }
.tile.mix-tile .frac { font-size: .85em; } .tile.mix-tile .mixed .w { font-size: 1.1em; }
.pick-opts .choice .mixed, .pick-opts .choice .frac { font-size: 26px; }
.ddiscs { display: inline-flex; flex-direction: column; gap: 6px; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 6px; background: #fff; align-items: flex-start; max-width: 100%; }
.ddiscs .drow { display: flex; flex-wrap: wrap; gap: 4px; padding: 2px 4px; border-radius: 6px; } .ddiscs .drow.hl { background: #fff3d6; }
.disc.d01 { width: 34px; } .disc.d001 { width: 42px; font-size: 11px; } .disc.d0001 { width: 50px; font-size: 10px; }
.pv4.pvd th { font-size: 13px; padding: 4px 6px; min-width: 56px; } .pv4.pvd th.dot, .pv4.pvd td.dot { min-width: 10px; padding: 4px 2px; font-size: 24px; font-weight: 900; }
.bignum .d.dot { color: var(--ink); }
pre.mul2.dcol { text-align: right; font-size: 28px; }
.pv4.dtab th { font-size: 14px; } .pv4.dtab td.hl, .pv4.dtab th.hl { background: #fff3d6; }
.discs.seven .dcol { grid-template-columns: repeat(2, auto); min-width: 56px; padding: 6px 4px; }
.discs.seven { max-width: 100%; overflow-x: auto; }
.disc.d100000 { width: 56px; font-size: 10px; } .disc.d1000000 { width: 64px; font-size: 10px; }
.pv4.seven th { font-size: 12px; padding: 3px 5px; min-width: 52px; line-height: 1.1; } .pv4.seven th small { font-weight: 400; color: #666; font-size: 9px; } .pv4.seven td { font-size: 22px; }
.canc { position: relative; display: inline-block; } .canc s { color: #999; } .canc i { position: absolute; font-style: normal; font-size: .55em; color: #d35400; left: 50%; transform: translateX(-50%); } .canc i.up { top: -.9em; } .canc i.dn { bottom: -1em; }
.frac.big .canc { margin: .5em 0; }
.icongrp { text-align: center; } .icons { display: inline-grid; gap: 2px 6px; font-size: 24px; line-height: 1.1; } .icons span { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; }
.views { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; } .viewbox { text-align: center; } .viewbox.badf svg, #v_top.badf svg, #v_front.badf svg, #v_side.badf svg { outline: 3px solid var(--bad); border-radius: 6px; }
/* L5 Unit 9 小数点移位示意 */
.dsh { display: flex; align-items: baseline; justify-content: center; font-size: 34px; font-weight: 800; color: var(--ink); margin-top: 6px; }
.dsh .dg { padding: 0 4px; line-height: 1.2; }
.dsh .dg.hop { text-decoration: underline wavy #ff7f2a; text-decoration-thickness: 3px; text-underline-offset: 8px; }
.dsh .pt { font-size: 40px; line-height: 1; } .dsh .pt.old { color: #c9c4d6; } .dsh .pt.new { color: #ff7f2a; }
.dsh-cap { font-size: 14px; color: #777; margin-top: 4px; }
