﻿:root {
  --ink: #1d2a3a;
  --ink-soft: #5b6b7f;
  --paper: #fffaf1;
  --card: #ffffff;
  --sea: #bfe3f2;
  --sea-deep: #8cc8e4;
  --navy: #1d3557;
  --accent: #e76f51;
  --accent-soft: #fde4dc;
  --good: #2a9d8f;
  --good-soft: #d7f2ee;
  --warn: #e9a23b;
  --line: #eadfcf;
  --radius: 18px;
  --shadow: 0 6px 20px rgba(29, 53, 87, .10);
  --zh: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --kai: "KaiTi", "STKaiti", "Kaiti SC", serif;
  --en: "Segoe UI", -apple-system, system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: var(--en), var(--zh);
  color: var(--ink);
  background: var(--paper);
  font-size: 18px;
  line-height: 1.55;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: env(safe-area-inset-bottom);
}
button, a, .tappable { touch-action: manipulation; }
button { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; }
small { color: var(--ink-soft); font-weight: 400; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px max(20px, env(safe-area-inset-left));
  background: rgba(255, 250, 241, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: 20px; color: var(--navy); text-decoration: none; }
.logo { font-size: 28px; }
.topbar nav { display: flex; gap: 6px; }
.topbar nav a {
  min-height: 44px; display: inline-flex; align-items: center;
  padding: 0 16px; border-radius: 999px; text-decoration: none; color: var(--ink-soft); font-weight: 600;
}
.topbar nav a.active { background: var(--navy); color: #fff; }
.topbar nav a { white-space: nowrap; }
@media (max-width: 900px) { .topbar nav { gap: 2px; } .topbar nav a { padding: 0 9px; font-size: 15px; } .brand small { display: none; } }
@media (max-width: 600px) { .brand { white-space: nowrap; flex-shrink: 0; } .brand > :not(.logo) { display: none; }
  .topbar nav { overflow-x: auto; scrollbar-width: none; min-width: 0; } }
.parent-link { border: 1px dashed var(--line); }

main { max-width: 1200px; margin: 0 auto; padding: 20px max(20px, env(safe-area-inset-left)) 60px; }

/* ---------- Buttons ---------- */
.btn {
  min-height: 48px; padding: 0 20px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--card); font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  justify-content: center; text-decoration: none; color: var(--ink);
  transition: transform .08s ease, background .15s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.good { background: var(--good); border-color: var(--good); color: #fff; }
.btn.ghost { background: transparent; }
.btn.xl { min-height: 60px; font-size: 22px; padding: 0 34px; border-radius: 18px; }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn[disabled] { opacity: .45; cursor: default; }
.btn.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: #f2ebe0; }
.seg .btn { border: none; min-height: 40px; background: transparent; }
.seg .btn.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.12); }

/* ---------- Cards ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.grid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--ink-soft); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: #f2ebe0; font-size: 15px; font-weight: 600; }

/* ---------- Home ---------- */
.hello { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.hello h1 { font-size: 30px; margin: 0; }
.ocean {
  position: relative; border-radius: 28px; padding: 28px;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.5) 0 2px, transparent 3px) 0 0/60px 60px,
    linear-gradient(160deg, var(--sea), var(--sea-deep));
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
  box-shadow: inset 0 0 60px rgba(29,53,87,.15);
}
.island {
  position: relative; border: none; cursor: pointer; text-align: center;
  background: #fdf3df; border-radius: 46% 54% 50% 50% / 55% 45% 55% 45%;
  padding: 26px 12px 22px; min-height: 170px;
  box-shadow: 0 10px 0 rgba(29,53,87,.12), 0 0 0 8px rgba(255,255,255,.35);
  transition: transform .15s ease;
}
.island:nth-child(2n) { border-radius: 55% 45% 48% 52% / 45% 55% 45% 55%; }
.island:hover { transform: translateY(-4px) rotate(-1deg); }
.island .ico { font-size: 52px; display: block; }
.island .zh { font-size: 22px; font-weight: 800; display: block; }
.island .en { font-size: 14px; color: var(--ink-soft); }
.island .bar { height: 8px; border-radius: 99px; background: rgba(0,0,0,.08); margin: 10px 24px 0; overflow: hidden; }
.island .bar i { display: block; height: 100%; background: var(--good); }
.island.locked { filter: grayscale(.85); opacity: .7; }
.island.locked::after { content: "🔒"; position: absolute; top: 10px; right: 22px; font-size: 24px; }
.island .lock-note { display: block; font-size: 13px; color: var(--ink-soft); margin-top: 6px; }

.quest { margin-bottom: 20px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.quest .badge { font-size: 46px; }
.quest h2 { margin: 0; font-size: 22px; }
.quest-list { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.unit-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 16px; }
.extras { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.step {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--ink);
  padding: 18px 10px; border-radius: 16px; background: #fbf6ee; border: 2px solid var(--line); position: relative;
  min-height: 120px; justify-content: center;
}
.step .ico { font-size: 34px; }
.step b { font-size: 18px; }
.step small { font-size: 13px; }
.step.done { border-color: var(--good); background: var(--good-soft); }
.step.done::after { content: "✓"; position: absolute; top: 8px; right: 12px; color: var(--good); font-weight: 900; }

/* ---------- Island page ---------- */
.unit-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.unit-card { display: block; text-decoration: none; color: var(--ink); position: relative; transition: transform .12s; }
a.unit-card:hover { transform: translateY(-3px); }
.unit-card h2 { margin: 6px 0 2px; font-size: 24px; }
.unit-card p { font-size: 16px; color: var(--ink-soft); }
.unit-no { display: inline-block; font-size: 13px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 10px; border-radius: 99px; }
.unit-card.locked { opacity: .55; background: #f5efe4; box-shadow: none; border: 2px dashed var(--line); }
.unit-card.locked .unit-no { color: var(--ink-soft); background: #eee5d6; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 26px; }
.back { min-width: 48px; }

/* ---------- Reader ---------- */
.reader-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.story { display: grid; gap: 18px; }
.story.both { grid-template-columns: 1fr 1fr; }
.story-col { background: var(--card); border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow); }
.story-col h3 { font-size: 15px; letter-spacing: .05em; color: var(--ink-soft); text-transform: uppercase; }
.sent { border-radius: 8px; padding: 2px 3px; cursor: pointer; transition: background .2s; }
.sent.playing { background: #fff1b8; box-shadow: 0 0 0 3px #fff1b8; }
.zh-text { font-family: var(--zh); font-size: 26px; line-height: 2.3; }
.zh-text.pinyin-all { line-height: 2.6; }
.en-text { font-size: 22px; line-height: 1.9; }
.hz { cursor: pointer; border-radius: 4px; }
.hz.now, .w.now { background: #ffd166; }
.hz:hover { background: #ffeaa7; }
.w { cursor: pointer; border-radius: 4px; }
.w:hover { background: #e3f0ff; }
ruby rt { font-size: 13px; color: var(--accent); font-family: var(--en); }
.char-pop {
  position: fixed; z-index: 50; background: var(--navy); color: #fff; border-radius: 14px; padding: 10px 16px;
  text-align: center; box-shadow: var(--shadow); pointer-events: none; transform: translate(-50%, -110%);
}
.char-pop .py { font-size: 18px; color: #ffd166; }
.char-pop .big { font-size: 40px; font-family: var(--kai); line-height: 1.2; }
.rate { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.rate input { width: 120px; }

/* ---------- Character recognition ---------- */
.chip { display: inline-flex; flex-direction: column; align-items: center; min-width: 52px; padding: 4px 6px; border-radius: 12px; background: #fff; border: 2px solid var(--line); line-height: 1.1; }
.chip small { font-size: 12px; }
.rec-char { font-size: 120px; text-align: center; line-height: 1.2; }
.char-opts { grid-template-columns: repeat(3, 1fr); }
.char-opts .opt { text-align: center; font-size: 56px; min-height: 110px; }
.meter { height: 12px; border-radius: 99px; background: #eee5d6; overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--warn), var(--good)); transition: width .5s; }
/* ---------- Quiz ---------- */
.quiz-wrap { max-width: 760px; margin: 0 auto; }
.level-dots { display: flex; gap: 6px; }
.level-dots i { width: 34px; height: 10px; border-radius: 99px; background: #eee5d6; }
.level-dots i.on { background: var(--accent); }
.q-text { font-size: 28px; font-weight: 700; margin: 10px 0 22px; white-space: pre-line; }
.opts { display: grid; gap: 12px; }
.opt {
  min-height: 64px; text-align: left; padding: 12px 20px; font-size: 22px; border-radius: 16px; border: 3px solid var(--line);
  background: var(--card); cursor: pointer; font-weight: 600;
}
.opt.right { border-color: var(--good); background: var(--good-soft); }
.opt.wrong { border-color: var(--accent); background: var(--accent-soft); }
.why { margin-top: 16px; padding: 14px 18px; border-radius: 14px; background: #fff7dc; font-size: 18px; }
.level-msg { text-align: center; font-weight: 800; font-size: 20px; padding: 10px; border-radius: 14px; margin-bottom: 14px; }
.level-msg.up { background: var(--good-soft); color: var(--good); }
.level-msg.down { background: #eef4ff; color: var(--navy); }

/* ---------- Journal ---------- */
.journal-box textarea {
  width: 100%; min-height: 160px; font-size: 24px; font-family: var(--zh); line-height: 1.8; padding: 16px;
  border-radius: 16px; border: 2px solid var(--line); resize: vertical; background: #fffdf8;
}
.mic { font-size: 22px; }
.mic.rec { background: var(--accent); color: #fff; border-color: var(--accent); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(231,111,81,.15); } }
.pick-chars { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pick-chars button {
  font-family: var(--kai); font-size: 30px; width: 54px; height: 54px; border-radius: 12px; border: 2px solid var(--line);
  background: #fff; cursor: pointer;
}
.pick-chars button.known { color: #b8c2cc; border-style: dashed; }
.pick-chars button.added { background: var(--good-soft); border-color: var(--good); }
.entry { padding: 14px 0; border-bottom: 1px solid var(--line); font-family: var(--zh); font-size: 20px; white-space: pre-line; }
.entry small { display: block; font-family: var(--en); font-size: 13px; white-space: normal; }
.entry small + * { white-space: normal; }

.jfields { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 6px 0 12px; }
.jfields label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.jfields small { font-weight: 400; color: var(--ink-soft); }
.jfields input, .own-input { font-size: 20px; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--line); background: #fffdf8; font-family: var(--zh); min-width: 0; }
.own-input { flex: 1; }
.jchips { gap: 8px; margin: 6px 0 10px; flex-wrap: wrap; }
.journal-box.letter .jlang > textarea { background: repeating-linear-gradient(#fffdf8 0 42px, #efe4cf 42px 43px); line-height: 43px; padding-top: 0; min-height: 260px; font-family: var(--kai); font-size: 26px; }
.private { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 16px; color: var(--ink-soft); }
.private input { width: 22px; height: 22px; }

/* ---------- Island activities ---------- */
.act-intro { font-size: 19px; margin: -4px 0 14px; }
.otile {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 104px; min-height: 72px;
  padding: 8px 16px; border-radius: 16px; border: 3px solid var(--line); background: #fff; cursor: pointer; font: inherit; box-shadow: 0 3px 0 var(--line);
}
.otile b { font-size: 24px; font-family: var(--zh); }
.otile small { font-size: 13px; color: var(--ink-soft); }
.otile .oi { font-size: 26px; line-height: 1; }
.otile .oy { font-style: normal; font-size: 13px; font-weight: 800; color: var(--good); }
.otile.in { border: 0; box-shadow: none; background: transparent; min-height: 0; padding: 0; flex-direction: row; gap: 10px; cursor: inherit; }
.otile.in small { font-size: 14px; }
.order-pool { display: flex; flex-wrap: wrap; gap: 12px; min-height: 84px; padding: 6px 0 18px; border-bottom: 2px dashed var(--line); align-items: center; }
.order-track { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.track-label { font-size: 14px; font-weight: 800; color: var(--ink-soft); }
.order-slots { display: flex; flex-direction: column; gap: 10px; }
.slot {
  display: flex; align-items: center; gap: 14px; min-height: 66px; width: var(--w, 100%); padding: 6px 14px; border-radius: 16px;
  border: 3px dashed var(--line); background: #fffdf8; cursor: pointer; transition: border-color .2s, background .2s;
}
.slot.filled { border-style: solid; background: #fff; }
.slot.right, .slot.locked { border-color: var(--good); background: var(--good-soft); cursor: default; }
.slot.wrong { border-color: var(--accent); background: var(--accent-soft); animation: shake .4s; }
.slot-no { width: 30px; height: 30px; border-radius: 50%; background: var(--line); display: grid; place-items: center; font-weight: 800; flex: none; }
.slot-empty { color: #c9bca7; letter-spacing: 4px; }
.order-track.thermo, .order-track.thermo .order-slots { flex-direction: column-reverse; }
.order-track.thermo .order-slots { border-left: 16px solid; border-image: linear-gradient(to top, #74b9ff, #ffd166, #ef476f) 1; padding-left: 12px; }
.order-track.zoom .slot { margin: 0 auto; }
.order-track.timeline .order-slots { border-left: 4px solid var(--navy); padding-left: 14px; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.tl-axis { position: relative; height: 150px; margin: 18px 6px 0; }
.tl-axis::before { content: ""; position: absolute; left: 0; right: 0; top: 74px; height: 4px; background: var(--navy); border-radius: 4px; }
.tl-pt { position: absolute; top: 0; height: 150px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
.tl-pt i { position: absolute; top: 68px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--accent); }
.tl-pt span { position: absolute; top: 0; font-size: 13px; text-align: center; white-space: nowrap; line-height: 1.3; }
.tl-pt.below span { top: 92px; }
.tl-zero { position: absolute; top: 60px; height: 32px; border-left: 2px dashed var(--ink-soft); }
.tl-zero span { position: absolute; top: 34px; left: 4px; font-size: 11px; color: var(--ink-soft); white-space: nowrap; }

.comic { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.panel {
  position: relative; min-height: 210px; border: 4px solid var(--ink); border-radius: 6px; background: #fff; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 12px; gap: 6px;
  box-shadow: 5px 5px 0 rgba(29,42,58,.85);
}
.panel.active { outline: 4px solid var(--warn); outline-offset: 3px; }
.panel .pn { position: absolute; top: 6px; left: 8px; font-weight: 900; color: var(--ink-soft); }
.panel .scene { font-size: 46px; letter-spacing: 4px; }
.panel .who { font-size: 14px; font-weight: 800; color: var(--ink-soft); }
.bubble {
  position: relative; align-self: stretch; margin: 18px 10px auto; padding: 10px 14px; border: 3px solid var(--ink); border-radius: 22px;
  background: #fff; font-size: 20px; font-weight: 700; font-family: var(--zh); min-height: 48px; display: grid; place-items: center;
}
.bubble.say::after { content: ""; position: absolute; bottom: -14px; left: 42%; border: 12px solid transparent; border-top-color: var(--ink); border-bottom: 0; }
.bubble.think { border-style: dashed; border-radius: 40px; }
.bubble.think::after { content: "∘ ○"; position: absolute; bottom: -24px; left: 45%; font-size: 18px; color: var(--ink); }
.panel.done .bubble { background: #fffbe6; }

.map-card { padding: 16px; max-width: max(560px, min(100%, calc((100vh - 330px) * 2 + 32px))); margin: 0 auto; }
.map-q { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 20px; margin-bottom: 10px; min-height: 44px; }
.map-target { font-size: 28px; color: var(--accent); }
.worldmap { width: 100%; height: auto; display: block; border-radius: 14px; cursor: crosshair; touch-action: manipulation; }
.worldmap .sea { fill: #bfe3f2; }
.worldmap .land { fill: #f3e2b8; stroke: #c9b07a; stroke-width: 0.6; stroke-linejoin: round; }
.worldmap .grid { stroke: rgba(29,53,87,.12); stroke-width: 1; }
.worldmap .grid.eq { stroke: rgba(29,53,87,.35); stroke-dasharray: 6 5; }
.worldmap .pin.ok { fill: var(--good); stroke: #fff; stroke-width: 2.5; }
.worldmap .pin.ring { fill: none; stroke: var(--good); stroke-width: 3; animation: ring 1s infinite; transform-box: fill-box; transform-origin: center; }
.worldmap .miss { fill: var(--accent); font-size: 22px; font-weight: 900; text-anchor: middle; }
.worldmap .mlabel { font-size: 16px; font-weight: 800; text-anchor: middle; paint-order: stroke; stroke: #fff; stroke-width: 4px; fill: var(--navy); font-family: var(--zh); }
.worldmap .mlabel.fix { fill: var(--good); }
@keyframes ring { 50% { transform: scale(1.5); opacity: .4; } }

.sky-card { padding: 16px; }
.sky-msg { font-size: 18px; margin-bottom: 12px; min-height: 76px; }
.sky-wrap { border-radius: 16px; overflow: hidden; }
.sky-wrap canvas { width: 100%; display: block; cursor: pointer; touch-action: manipulation; }
.sky-ctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.sky-ctl input[type=range] { width: 200px; }

.peb-layout { grid-template-columns: 1fr 1fr; align-items: start; }
.peb-count { font-size: 22px; margin: 8px 0; }
.why.warn { background: var(--accent-soft); }
.peb-board { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 6px; max-width: 460px; margin: 0 auto; }
.cell { aspect-ratio: 1; border-radius: 50%; border: 2px dashed #e2d5bf; background: #fffdf8; cursor: pointer; padding: 0; transition: transform .1s; }
.cell:active { transform: scale(.9); }
.cell.on { border: 0; background: radial-gradient(circle at 35% 30%, #ffc48a, #e07a3a); box-shadow: 0 3px 0 #b85c22; }
.cell.blue { border: 0; background: radial-gradient(circle at 35% 30%, #9ad0ff, #3a86e0); box-shadow: 0 3px 0 #2563a8; cursor: default; }
.cell.ghost { border: 2px dashed var(--good); background: var(--good-soft); }
.cell.solved.on, .cell.solved.blue { animation: pop .5s ease; }

.scene-card { max-width: 820px; margin: 0 auto; }
.scene-icon { font-size: 70px; text-align: center; }
.scene-text { font-size: 24px; font-weight: 700; font-family: var(--zh); }
.opt.picked { border-color: var(--navy); background: #eef4ff; }
.outcome { display: flex; gap: 14px; align-items: center; margin-top: 16px; padding: 14px 18px; border-radius: 16px; font-size: 19px; }
.outcome.great { background: var(--good-soft); }
.outcome.meh { background: #fff7dc; }
.outcome.oops { background: var(--accent-soft); }
.oc-emoji { font-size: 40px; }

.mood-row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.mood { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 96px; padding: 12px 0; border-radius: 18px; border: 3px solid var(--line); background: #fff; cursor: pointer; font: inherit; }
.mood span { font-size: 46px; }
.mood:hover, .mood.on { border-color: var(--good); background: var(--good-soft); }
.breath-card { text-align: center; max-width: 640px; margin: 0 auto; }
.breath-stage { height: 340px; display: grid; place-items: center; }
.breath-ball {
  width: 300px; height: 300px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 40% 35%, #b8f0e6, #2a9d8f); color: #fff; transform: scale(.45); transition: transform 4s ease-in-out;
  box-shadow: 0 0 60px rgba(42,157,143,.35);
}
.breath-ball span { font-size: 40px; font-weight: 800; }
.breath-ball b { font-size: 30px; }
.breath-ball.in, .breath-ball.hold { transform: scale(1); }
.breath-ball.out { transform: scale(.45); }

/* ---------- Cards collection ---------- */
.collection { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.kcard {
  aspect-ratio: 3/4; border-radius: 18px; padding: 14px; text-align: center; display: flex; flex-direction: column;
  justify-content: center; align-items: center; background: linear-gradient(160deg, #fff, #fdf0d9); box-shadow: var(--shadow);
  border: 3px solid #f1d9a7;
}
.kcard .c { font-family: var(--kai); font-size: 64px; line-height: 1.1; }
.kcard.locked { background: #eee; border-color: #ddd; color: #aaa; }
.kcard.expert { border-color: #f4c430; box-shadow: 0 0 0 4px #fff4c2, var(--shadow); }

/* ---------- Parent ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--card); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.stat b { font-size: 30px; display: block; }
.stat span { font-size: 14px; color: var(--ink-soft); }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 140px; padding-top: 10px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; font-size: 12px; color: var(--ink-soft); }
/* Daily time: one stacked bar per day — 探索 on top of 数学打卡 on top of 阅读打卡 (bottom). */
.bars .b .stack { width: 100%; max-width: 38px; flex: 1; display: flex; flex-direction: column-reverse; justify-content: flex-start;
  border-radius: 8px 8px 3px 3px; overflow: hidden; border-bottom: 3px solid #d9dee5; }
.bars .b .stack i { display: block; width: 100%; flex: none; }
.bars .b.today > span:first-child { color: var(--ink); font-weight: 700; }
.k-ex { background: var(--sea-deep); }
.k-ma { background: #f4a261; }
.k-rd { background: #2a9d8f; }
.k-mu { background: #8e6cc9; }
.tlegend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--ink-soft); }
.tlegend i, .tsplit i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.tsplit { display: block; margin-top: 6px; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.tsplit i { margin-left: 2px; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); }
th { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
td .meter { width: 120px; height: 8px; }
.kai { font-family: var(--kai); font-size: 26px; }
.target-band { position: relative; height: 18px; border-radius: 99px; background: #eee5d6; margin: 8px 0 4px; }
.target-band .zone { position: absolute; left: 70%; width: 15%; top: 0; bottom: 0; background: var(--good-soft); border: 2px solid var(--good); border-radius: 4px; }
.target-band .dot { position: absolute; top: -4px; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); transform: translateX(-50%); border: 3px solid #fff; }
.setting { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.setting label { min-width: 140px; font-weight: 600; }
.setting input[type=text] { font-size: 18px; padding: 8px 12px; border-radius: 10px; border: 2px solid var(--line); }

/* ---------- Overlays ---------- */
.start-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(29,53,87,.55); display: grid; place-items: center; backdrop-filter: blur(4px); }
.start-card { background: var(--paper); border-radius: 28px; padding: 40px 50px; text-align: center; box-shadow: var(--shadow); }
.big-emoji { font-size: 72px; }
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 90; background: var(--navy); color: #fff;
  padding: 14px 24px; border-radius: 16px; font-weight: 700; box-shadow: var(--shadow); max-width: 90vw; text-align: center;
}
.celebrate { animation: pop .5s ease; }
@keyframes pop { 0% { transform: scale(.8); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }

/* ---------- Responsive ---------- */
@media (max-width: 1050px) {
  .grid2, .story.both { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .comic { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .ocean { grid-template-columns: repeat(2, 1fr); padding: 18px; gap: 16px; }
  .unit-steps { grid-template-columns: repeat(2, 1fr); }
  .brand small { display: none; }
  .peb-layout { grid-template-columns: 1fr; }
  .panel .scene { font-size: 36px; letter-spacing: 1px; }
  .breath-ball { width: 240px; height: 240px; }
}
@media (hover: none) { .hz:hover, .w:hover, .island:hover { background: inherit; transform: none; } }

/* Translation line under questions, options and feedback */
.tr { display: block; font-size: .78em; font-weight: 400; color: var(--ink-soft); margin-top: 3px; line-height: 1.35; }
.opt .tr { opacity: .85; }
.btn .tr { font-size: .8em; margin-top: 1px; }
.toast { white-space: pre-line; }


/* Typing practice */
.typing { margin-top: 16px; padding: 14px; border: 2px dashed var(--line); border-radius: 16px; background: var(--card, #fff); }
.typing h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; flex-wrap: wrap; }
.typing h3 small { font-weight: 400; color: var(--ink-soft); }
.typing h3 [data-tclose] { margin-left: auto; }
.ttarget { font-size: 26px; line-height: 1.7; letter-spacing: 1px; margin-bottom: 10px; word-break: break-word; }
.ttarget span { color: var(--ink-soft); opacity: .55; border-radius: 4px; }
.ttarget span.ok { color: var(--good); opacity: 1; }
.ttarget span.bad { color: #fff; background: var(--accent); opacity: 1; }
.ttarget span.next { opacity: 1; color: var(--ink); box-shadow: inset 0 -3px 0 var(--accent); }
.typing textarea { width: 100%; box-sizing: border-box; font-size: 22px; min-height: 80px; padding: 10px; border-radius: 12px; border: 2px solid var(--line); resize: vertical; }

/* Where on Earth? (people & places in a story) */
.places { margin: 0 0 18px; }
.places > summary { list-style: none; cursor: pointer; }
.places > summary::-webkit-details-marker { display: none; }
.places > summary h3 { margin: 0; display: inline; }
.places > summary::after { content: ' ▾'; color: var(--ink-soft); }
.places:not([open]) > summary::after { content: ' ▸'; }
.places[open] > summary { margin-bottom: 12px; }
.pcards { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.pcard { display: flex; align-items: center; gap: 12px; flex: 1 1 240px; text-align: left; padding: 10px 12px; border: 2px solid var(--pc); border-radius: 16px; background: #fff; cursor: pointer; font: inherit; color: inherit; }
.pcard:active { transform: scale(.98); }
.pcard .av { position: relative; flex: none; width: 60px; height: 60px; border-radius: 50%; background: var(--pc); display: grid; place-items: center; font-size: 34px; line-height: 1; }
.pcard .av i { position: absolute; right: -6px; bottom: -4px; font-style: normal; font-size: 22px; background: #fff; border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.pcard .ptxt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pcard .ptxt b { font-size: 18px; }
.pcard .ptxt small { color: var(--ink-soft); }
.pcard .pwhere { font-size: 15px; }
.placemap { cursor: default; }
.placemap .pline { stroke-linecap: round; }
.placemap .pline.home { stroke: rgba(43,45,66,.45); stroke-width: 2; stroke-dasharray: 5 6; }
.placemap .pline.link { stroke: #e07a5f; stroke-width: 3.5; }
.placemap .ppin { cursor: pointer; transform-box: fill-box; transform-origin: center; }
.placemap .ppin.hot { animation: pbounce .6s ease 2; }
@keyframes pbounce { 50% { transform: translateY(-8px) scale(1.15); } }
.placemap .pemoji { font-size: 18px; text-anchor: middle; }
.placemap .plabel { font-size: 15px; font-weight: 800; text-anchor: middle; paint-order: stroke; stroke: #fff; stroke-width: 4px; fill: var(--navy); font-family: var(--zh); }
.pdist { margin: 12px 0 0; padding-left: 0; list-style: none; display: grid; gap: 8px; font-size: 16px; }
.pdist li.plink { font-size: 17px; }

/* Little round pictures next to names (孔子, 长城…) */
.gl { display: inline-block; width: 1.25em; height: 1.25em; vertical-align: -0.22em; margin: 0 .12em 0 .05em; cursor: pointer; }
.gl .glsvg { width: 100%; height: 100%; display: block; }
.gl.pop { animation: glpop .5s ease; }
@keyframes glpop { 50% { transform: scale(1.6); } }
.pinyin-all .gl { vertical-align: -0.05em; }
.q-text .gl { width: 1.15em; height: 1.15em; }
.pcard .av.has-gl { background: none; }
.pcard .av .glsvg { width: 60px; height: 60px; display: block; }

/* Journal: one box per language, with a checklist before saving */
.jlang { margin-top: 14px; padding: 12px; border: 2px solid var(--line); border-radius: 16px; }
.jlang-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.jlang-head b { font-size: 18px; }
.jlang textarea { margin-top: 0; }
.jlang .mic { font-size: 18px; }
.jcheck { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: #fff7e6; }
.jcheck span { color: var(--ink-soft); }
.jcheck span.ok { color: var(--good); font-weight: 600; }
.btn.locked { opacity: .55; }

/* ---------- Progress panel ---------- */
.side { position: fixed; z-index: 30; top: 0; right: 0; bottom: 0; width: 340px; max-width: 88vw; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; overscroll-behavior: contain;
  background: #fffdf8; border-left: 1px solid var(--line); padding: 14px 14px calc(24px + env(safe-area-inset-bottom));
  transform: translateX(105%); transition: transform .25s ease; box-shadow: -8px 0 24px rgba(29, 53, 87, .12); }
body.side-open .side { transform: none; }
.sidedim { position: fixed; inset: 0; z-index: 29; background: rgba(29, 42, 58, .35); display: none; }
body.side-open .sidedim { display: block; }
.sidefab { position: fixed; z-index: 25; right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom));
  min-height: 52px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--navy); color: #fff; font-size: 18px; box-shadow: var(--shadow); cursor: pointer; }
.sidefab b { color: #fff; }
/* Big screens: always docked on the right, below the top bar. */
@media (min-width: 1100px) {
  body.side-on .side { top: 65px; transform: none; box-shadow: none; z-index: 15; }
  body.side-on .sidefab, body.side-on .sclose, body.side-on .sidedim { display: none !important; }
  body.side-on main { margin-right: 340px; margin-left: max(0px, calc((100vw - 340px - 1200px) / 2)); }
  body.side-on .topbar { z-index: 20; }
}
.shero { display: flex; gap: 12px; align-items: center; position: relative; }
.shero > div { display: flex; flex-direction: column; line-height: 1.35; }
.shero b { font-size: 20px; color: var(--navy); }
.shero small { font-size: 14px; }
.sclose { position: absolute; top: 0; right: 0; }
.ring { width: 88px; height: 88px; flex: none; }
.ring .rbg { fill: none; stroke: #eee3cf; stroke-width: 9; }
.ring .rfg { fill: none; stroke: var(--good); stroke-width: 9; stroke-linecap: round; transition: stroke-dasharray .5s; }
.ring .rnum { text-anchor: middle; font-weight: 800; font-size: 17px; fill: var(--navy); }
.ring .rsub { text-anchor: middle; font-size: 10px; fill: var(--ink-soft); }
.snext { display: flex; flex-direction: column; align-items: flex-start; width: 100%; margin: 12px 0 10px; text-align: left; }
.snext small { color: rgba(255,255,255,.85); font-size: 13px; }
.snext.all { padding: 12px; border-radius: 14px; background: var(--good-soft); color: var(--good); font-weight: 700; text-align: center; align-items: center; }
.sstats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 14px; margin-bottom: 10px; }
.sstats span { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; }
.sstats b { color: var(--navy); font-size: 16px; }
.slegend { display: flex; gap: 12px; font-size: 13px; color: var(--ink-soft); margin: 4px 2px 8px; }
.slegend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; border: 2px dashed #cbbfa9; margin-right: 4px; vertical-align: -1px; }
.slegend i.d { background: var(--good); border: 2px solid var(--good); }
.slegend i.nx { background: #fff; border: 2px solid var(--accent); }
.sunit { background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 8px 10px 10px; margin-bottom: 8px; }
.sunit.here { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(29, 53, 87, .12); }
.sunit.full { background: #f1fbf8; border-color: #bfe6de; }
.shead { display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; }
.sico { font-size: 22px; }
.sname { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.sname b { font-size: 16px; }
.sname small { font-size: 12px; }
.scount { font-weight: 700; color: var(--navy); font-size: 15px; }
.sbar { height: 6px; background: #f0e7d6; border-radius: 6px; margin: 6px 0 8px; overflow: hidden; }
.sbar i { display: block; height: 100%; background: var(--good); border-radius: 6px; }
.ssteps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sstep { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 6px 2px 4px; border-radius: 12px;
  border: 2px dashed #d9ccb4; text-decoration: none; color: var(--ink-soft); background: #fffdf8; }
.sstep span { font-size: 22px; line-height: 1.1; filter: grayscale(.85); opacity: .7; }
.sstep small { font-size: 11px; line-height: 1.2; text-align: center; margin-top: 2px; }
.sstep em { position: absolute; top: -6px; right: -4px; font-style: normal; }
.sstep.d { border: 2px solid var(--good); background: var(--good-soft); color: var(--ink); }
.sstep.d span { filter: none; opacity: 1; }
.sstep.d em { width: 20px; height: 20px; border-radius: 50%; background: var(--good); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.sstep.nx { border: 2px solid var(--accent); background: #fff; color: var(--ink); }
.sstep.go { animation: nxpulse 1.8s ease-in-out infinite; background: var(--accent-soft); }
.sstep.nx span { filter: none; opacity: 1; }
.sstep.now { outline: 3px solid var(--navy); outline-offset: 1px; }
@keyframes nxpulse { 50% { box-shadow: 0 0 0 4px rgba(231, 111, 81, .2); } }
@media (prefers-reduced-motion: reduce) { .sstep.go { animation: none; } .side { transition: none; } }

/* PIN fields: plain text shown as dots (keeps password managers out) */
.pin-in { font-size: 24px; padding: 10px; width: 200px; border-radius: 12px; border: 2px solid var(--line); text-align: center; letter-spacing: 6px;
  display: block; margin: 8px auto; -webkit-text-security: disc; text-security: disc; font-family: var(--en); }
.pin-in.show { -webkit-text-security: none; text-security: none; }
.pin-in.sm { display: inline-block; width: 140px; font-size: 18px; padding: 6px 8px; letter-spacing: 3px; margin: 0 4px; }
.pin-in::placeholder { letter-spacing: 2px; -webkit-text-security: none; }

/* ---------- Practice islands: weekly plan ---------- */
.wplans { display: grid; gap: 10px; }
.wplans:not(.compact) { grid-template-columns: 1fr 1fr; }
.wplans.compact { margin: 12px 0; }
.wtitle { font-weight: 700; font-size: 15px; }
.wplan { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: #f7f1e6; text-decoration: none; color: var(--ink); border: 2px solid transparent; }
.wplan:hover { border-color: var(--line); }
.wplan.full { background: var(--good-soft); }
.wplans.compact .wplan { padding: 8px 10px; gap: 8px; }
.wico { font-size: 30px; }
.wplans.compact .wico { font-size: 22px; }
.wname { display: flex; flex-direction: column; flex: 1; line-height: 1.25; }
.wname small { font-size: 13px; }
.wslots { display: inline-flex; gap: 6px; }
.wslots i { width: 26px; height: 26px; border-radius: 50%; border: 2px dashed #c9b99f; display: inline-grid; place-items: center; font-style: normal; font-size: 14px; font-weight: 800; color: var(--ink-soft); }
.wslots i.d { background: var(--good); border: 2px solid var(--good); color: #fff; }
.wmin { font-size: 14px; white-space: nowrap; }
.weekbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 700; }

/* ---------- Skill ladder (a staircase, easy at the bottom-left) ---------- */
.ladder { display: flex; gap: 10px; align-items: flex-end; overflow-x: auto; padding: 14px 2px 4px; }
.lstep { flex: 1 0 150px; margin-bottom: calc(var(--li) * 0px); }
.lhead { border-radius: 12px 12px 4px 4px; background: #efe6d6; padding: 8px 10px; display: grid; grid-template-columns: 1fr auto; }
.lhead small { grid-column: 1 / -1; font-size: 12px; line-height: 1.3; }
.lhead em { font-style: normal; font-size: 13px; color: var(--ink-soft); grid-row: 1; grid-column: 2; }
.lhead.full { background: var(--good-soft); }
.lhead.here { background: var(--accent); color: #fff; }
.lhead.here small, .lhead.here em { color: #ffe9e2; }
.lskills { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.lsk { font-size: 13px; padding: 4px 8px; border-radius: 8px; background: #faf6ef; color: var(--ink-soft); line-height: 1.3; }
.lsk.d { background: var(--good-soft); color: var(--good); font-weight: 600; }
.lsk.nx { background: var(--accent-soft); color: var(--accent); font-weight: 800; animation: nxpulse 1.6s ease-in-out infinite; }
.lsk.lpick { border: 1px solid transparent; font-family: inherit; text-align: left; cursor: pointer; }
.lsk.lpick:hover { border-color: var(--navy); background: #e6edf7; color: var(--navy); }
.pickhint { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: #e6edf7; color: var(--navy); font-weight: 600; }

/* ---------- Practice session ---------- */
body.focus .topbar nav { visibility: hidden; }
.sess-head { flex-wrap: wrap; }
.stimer { display: flex; align-items: center; gap: 8px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stimer .meter { width: 120px; }
.qwrap { max-width: 860px; margin: 10px auto 0; }
.mcard { display: flex; flex-wrap: wrap; gap: 28px 40px; align-items: center; justify-content: center; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.mcard > .hint { flex-basis: 100%; order: 3; text-align: center; margin: -10px 0 0; font-size: 15px; }
.mq { --cw: 54px; font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mq.h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.mq.v, .mq.ld { display: grid; grid-auto-rows: auto; row-gap: 4px; justify-items: center; align-items: center; }
.mq .dg { width: var(--cw); text-align: center; line-height: 1.2; }
.mq .op { width: var(--cw); text-align: center; }
.mq .vline { height: 4px; background: var(--ink); border-radius: 2px; justify-self: stretch; margin: 2px 0 6px; }
.mq .rlab { font-size: 26px; color: var(--ink-soft); }
.cell { display: inline-grid; place-items: center; width: var(--cw, 54px); height: 60px; border: 3px solid #d8ccb8; border-radius: 10px; background: #fffdf8; cursor: pointer; font-size: 36px; color: var(--navy); }
.cell.free { width: auto; min-width: 84px; padding: 0 10px; }
.cell.carry { height: 32px; width: 34px; font-size: 20px; border-width: 2px; border-style: dashed; color: var(--accent); }
.cell.scratch { background: #f3f0ea; color: var(--ink-soft); border-style: dashed; }
.cell.act { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.cell.right { border-color: var(--good); background: var(--good-soft); }
.cell.wrong { border-color: #d9534f; background: #fde2e1; }
.mq.ld .bracket { align-self: stretch; border-left: 4px solid var(--ink); border-radius: 0 0 0 14px; }
.mq.ld .dg.top { border-top: 4px solid var(--ink); }
.fr { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; gap: 4px; }
.fr > :first-child { border-bottom: 4px solid var(--ink); padding-bottom: 4px; }
.fr .cell { height: 52px; min-width: 64px; }
.keypad { display: grid; grid-template-columns: repeat(3, 76px); gap: 10px; user-select: none; -webkit-user-select: none; }
.keypad button { height: 64px; border-radius: 14px; border: 2px solid var(--line); background: #fff; font-size: 28px; font-weight: 800; cursor: pointer; touch-action: manipulation; }
.keypad button:active { transform: scale(.95); background: #f7f1e6; }
.keypad .kn { font-size: 16px; }
.keypad .kok { grid-column: 1 / -1; background: var(--good); border-color: var(--good); color: #fff; font-size: 24px; }
.keypad button[disabled] { opacity: .45; }
.keypad button[data-d="-"], .keypad button[data-d="."] { font-size: 18px; }
/* 6A–O questions: an expression line, then the answer line or four choices */
.mcard > .row { flex-basis: 100%; }
.mq.x { flex-basis: 100%; text-align: center; font-size: 30px; line-height: 1.6; }
.mq.x .fr { font-size: 26px; margin: 0 4px; }
.mq.x .fr > :first-child { border-bottom-width: 3px; padding: 0 4px 2px; }
.mq.x sub, .mq.x sup { font-size: 60%; }
.mq.x .eqs { display: inline-flex; flex-direction: column; align-items: flex-start; border-left: 4px solid var(--ink); padding-left: 14px; margin-left: 8px; vertical-align: middle; text-align: left; }
.mq.xa { font-size: 32px; }
.mcount { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 420px; margin: 0 auto 8px; font-size: 40px; }
.mcount .dot { display: inline-block; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); }
.mcopts { flex-basis: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 640px; }
.mcopt { min-height: 72px; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--line); background: #fff; font-size: 26px; font-weight: 700; cursor: pointer; }
.mcopt .fr { font-size: 20px; }
.mcopt.right { border-color: var(--good); background: var(--good-soft); }
.mcopt.wrong { border-color: #d9534f; background: #fde2e1; }
.mcopt[disabled] { cursor: default; }
.qfb { margin-top: 16px; padding: 16px 20px; border-radius: 16px; font-size: 20px; }
.qfb.ok { background: var(--good-soft); color: #1d6f65; }
.qfb.bad { background: #fde8e6; }
.qfb .why { font-size: 24px; font-weight: 700; margin: 6px 0; }
.qfb .lvl { margin-top: 8px; font-weight: 700; }
.qfb .btn { margin-top: 10px; }
.cool { max-width: 520px; margin: 30px auto; text-align: center; }
.pstart .btn.xl { white-space: normal; text-align: center; }
@media (max-width: 760px) {
  .mq { --cw: 44px; font-size: 32px; }
  .cell { height: 52px; font-size: 30px; }
  .keypad { grid-template-columns: repeat(3, 68px); }
  .wplans:not(.compact) { grid-template-columns: 1fr; }
}
.cell.sm { height: 42px; font-size: 26px; }

/* ---------- Reading island ---------- */
.rcard { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 26px; }
.rq { font-size: 22px; font-weight: 700; margin: 4px 0 12px; }
.rq.sm { font-size: 17px; color: var(--ink-soft); margin: 12px 0 6px; }
.rcard.zh .rq, .rcard.zh .rclaim { font-family: var(--zh); }
.rq.cloze { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rpass { border: 2px solid var(--line); border-radius: 16px; padding: 12px 16px; background: #fffdf8; margin: 8px 0; }
.rpass.blur .rtext { filter: blur(7px); user-select: none; }
.rtools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.rtip { font-size: 14px; }
.rtext { font-size: 24px; line-height: 1.9; }
.rpass.zh .rtext { font-family: var(--kai); font-size: 30px; line-height: 2.1; letter-spacing: 1px; }
.rpass.zh ruby rt { font-family: var(--en); font-size: 13px; color: var(--ink-soft); letter-spacing: 0; }
.tk { border-radius: 6px; padding: 1px 1px; }
.tk.tap { cursor: pointer; }
.tk.tap:hover { background: #f3ead9; }
.tk.on { background: #ffe08a; box-shadow: 0 0 0 2px #ffe08a; }
.tk.on.right { background: var(--good-soft); box-shadow: 0 0 0 2px var(--good); }
.tk.on.wrong { background: #fde2e1; box-shadow: 0 0 0 2px #d9534f; }
.rsubmit { display: flex; justify-content: center; margin-top: 16px; }
.tiles .tline { min-height: 64px; border-bottom: 3px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 4px; align-items: center; }
.tiles .tpool { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 4px 0; justify-content: center; }
.tile { min-height: 50px; padding: 0 16px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-size: 22px; font-weight: 600; cursor: pointer; box-shadow: 0 3px 0 var(--line); }
.tiles.zh .tile { font-family: var(--kai); font-size: 28px; }
.tile.in { background: #fff6dc; border-color: #f1d9a7; }
.tile[disabled] { visibility: hidden; }
.tiles.right .tline { border-color: var(--good); background: var(--good-soft); border-radius: 10px; }
.tiles.wrong .tline { border-color: #d9534f; background: #fde2e1; border-radius: 10px; }
.spell { display: flex; align-items: center; gap: 16px; justify-content: center; }
.semoji { font-size: 84px; }
.ropts, .rtf { display: flex; flex-wrap: wrap; gap: 10px; }
.ropt { min-height: 52px; padding: 0 18px; border-radius: 14px; border: 2px solid var(--line); background: #fff; font-size: 20px; font-weight: 600; cursor: pointer; }
.ropt.on { border-color: var(--navy); background: #e6edf7; }
.ropt.right { border-color: var(--good); background: var(--good-soft); }
.ropt.wrong { border-color: #d9534f; background: #fde2e1; }
.ropt.missed { border-color: var(--good); border-style: dashed; }
.ropt { padding-top: 8px; padding-bottom: 8px; text-align: left; line-height: 1.35; }
.en-sub { display: block; font-size: max(15px, .62em); font-weight: 400; opacity: .9; margin-top: 3px; line-height: 1.35; }
.keypad button small { display: block; font-size: 11px; font-weight: 400; opacity: .75; }
.rbig { font-size: 96px; font-weight: 700; text-align: center; line-height: 1.1; margin: 4px 0 10px; }
.ropts.pics { justify-content: center; }
.ropts.pics .ropt { font-size: 52px; min-width: 96px; min-height: 96px; text-align: center; }
.rclaim { font-size: 24px; font-weight: 700; background: #f7f1e6; border-radius: 14px; padding: 12px 16px; margin-bottom: 12px; }
.rsents { display: flex; flex-direction: column; gap: 8px; }
.rsent { text-align: left; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-size: 20px; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.rsents.zh .rsent { font-family: var(--kai); font-size: 26px; }
.rsent em { font-style: normal; min-width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: #f2ebe0; font-weight: 800; font-family: var(--en); font-size: 16px; }
.rsent.on { border-color: var(--navy); background: #e6edf7; }
.rsent.on em { background: var(--navy); color: #fff; }
.rsent.right { border-color: var(--good); background: var(--good-soft); }
.rsent.wrong { border-color: #d9534f; background: #fde2e1; }
.rmem { font-size: 30px; font-weight: 700; text-align: center; padding: 20px; background: #fff6dc; border-radius: 16px; margin-bottom: 12px; }
.rcard.zh .rmem { font-family: var(--kai); font-size: 36px; }
.rorig { font-size: 26px; padding: 10px 16px; background: #f7f1e6; border-radius: 14px; margin-bottom: 12px; }
.rcard.zh .rorig { font-family: var(--kai); font-size: 32px; }
.rtype { font: inherit; font-size: 22px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line); width: 100%; }
.rtype.sm { width: 180px; display: inline-block; }
.rtype.area { resize: vertical; }
.rtype.right { border-color: var(--good); background: var(--good-soft); }
.rtype.wrong { border-color: #d9534f; background: #fde2e1; }
.rtable { border-collapse: collapse; margin: 6px 0 10px; min-width: 60%; }
.rtable th, .rtable td { border: 2px solid var(--line); padding: 8px 12px; font-size: 19px; text-align: left; }
.rtable th { background: #f7f1e6; width: 40%; }
.rtable tr.cur th { background: #ffe08a; }
.rtable tr.right td { background: var(--good-soft); }
.rtable tr.wrong td { background: #fde2e1; }
.rread { font-size: 22px; font-weight: 700; text-align: center; margin: 8px 0; }

/* ---------- Test mode bar ---------- */
.testbar { position: sticky; top: 64px; z-index: 19; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 20px; background: #fff3c4; border-bottom: 2px dashed #e9a23b; font-size: 15px; }
.testbar .tjump { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 14px; }
.testbar .tjump label { display: flex; align-items: center; gap: 6px; }
.testbar select { font: inherit; font-size: 14px; padding: 6px; border-radius: 8px; max-width: 260px; }

/* ==================== Activities, part 2 ==================== */
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes popin { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
/* Zoomed maps keep thin borders */
.worldmap.zoomed .land, .worldmap.zoomed .grid { vector-effect: non-scaling-stroke; }
.worldmap .mref { fill: #7d8aa0; }
.worldmap .mriver { fill: none; stroke: #2f80c9; stroke-linejoin: round; stroke-linecap: round; opacity: .85; }
.worldmap .mreft.riv { fill: #1f5f99; }
.worldmap .mreft { fill: #56627a; font-family: var(--zh); font-weight: 700; paint-order: stroke; stroke: #fff; stroke-width: .25em; }
/* Match */
.match2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mcol { display: flex; flex-direction: column; gap: 10px; }
.mhead { font-weight: 800; color: var(--ink-soft); font-size: 15px; text-align: center; min-height: 1em; }
.mcard2 { min-height: 58px; padding: 10px 14px; border-radius: 14px; border: 3px solid var(--line); background: #fff; font-size: 20px; font-weight: 700; cursor: pointer; text-align: center; }
.mcard2.on { border-color: var(--navy); background: #e8f1fb; transform: scale(1.03); }
.mcard2.bad { border-color: var(--accent); background: var(--accent-soft); animation: shake .35s; }
.mcard2.done { cursor: default; color: var(--ink); animation: popin .3s; }
.mcard2.done.c0 { background: #d7f2ee; border-color: #2a9d8f; } .mcard2.done.c1 { background: #fde4dc; border-color: #e76f51; }
.mcard2.done.c2 { background: #fff1c9; border-color: #e9a23b; } .mcard2.done.c3 { background: #e3e8ff; border-color: #6c7ee1; }
.mcard2.done.c4 { background: #f3e1f7; border-color: #b05cc6; } .mcard2.done.c5 { background: #e1f4dc; border-color: #5aa64a; }
.mcard2 .tr { display: block; font-size: 14px; font-weight: 400; }
/* Sort */
.sdeck { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 6px 0 16px; }
.scard { min-width: 220px; max-width: 90%; padding: 18px 26px; border-radius: 20px; border: 3px solid var(--navy); background: #fff; box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; animation: popin .3s; }
.scard .si { font-size: 52px; line-height: 1.1; } .scard b { font-size: 26px; } .scard small { font-size: 16px; }
.sbins { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 12px; }
.sbin { min-height: 130px; border-radius: 18px; border: 3px dashed #c9bca7; background: #fffaf1; cursor: pointer; display: flex; flex-direction: column; align-items: stretch; padding: 10px; font-size: 19px; font-weight: 800; }
.sbin:hover:not([disabled]) { border-color: var(--navy); background: #eef5fc; }
.sbin.bad { border-color: var(--accent); background: var(--accent-soft); animation: shake .35s; }
.sbin.got { border-color: var(--good); background: var(--good-soft); }
.sbh { display: flex; flex-direction: column; align-items: center; } .sbh small { font-size: 14px; }
.sbc { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 8px; font-size: 24px; font-style: normal; }
.sbc i { font-style: normal; font-size: 15px; background: #fff; border-radius: 8px; padding: 2px 6px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
/* Idiom */
.idiom-card { text-align: center; }
.ipic { font-size: 54px; letter-spacing: 6px; }
.iclue { font-size: 20px; max-width: 680px; margin: 8px auto 14px; }
.islots { display: flex; justify-content: center; gap: 10px; margin: 6px 0 16px; }
.islot { width: 76px; height: 76px; border-radius: 14px; border: 3px dashed #c9bca7; background: #fffaf1; font-family: var(--kai); font-size: 44px; cursor: pointer; }
.islot.right { border: 3px solid var(--good); background: var(--good-soft); }
.islot.wrong { border: 3px solid var(--accent); background: var(--accent-soft); animation: shake .35s; }
.ipool { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.itile { width: 64px; height: 64px; border-radius: 14px; border: 3px solid var(--line); background: #fff; font-size: 36px; cursor: pointer; box-shadow: 0 3px 0 #eadfcf; }
.itile[disabled] { opacity: .25; }
/* Moon */
.moonwrap { display: flex; gap: 16px; align-items: center; justify-content: center; flex-wrap: wrap; }
.moonsys { width: min(100%, 460px); height: auto; }
.moonsys .mslot { fill: rgba(255,255,255,.06); stroke: #5c6f91; cursor: pointer; }
.moonsys .mslot:hover { fill: rgba(255,255,255,.18); }
.moonside { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.moonview { width: 190px; height: 190px; }
.mname { font-size: 26px; font-weight: 800; font-family: var(--zh); } .mname small { display: block; font-size: 15px; }
/* Binary */
.bcards { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.bcard { width: 104px; height: 150px; border-radius: 14px; border: 3px solid var(--navy); background: #1d3557; color: #fff; cursor: pointer; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; transition: transform .2s; }
.bcard.up { background: #fff; color: var(--ink); }
.bcard .bback { font-size: 40px; opacity: .5; }
.bcard b { font-size: 24px; }
.bcard em { position: absolute; bottom: -30px; font-style: normal; font-weight: 900; font-size: 22px; color: var(--navy); }
.bdots { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; width: 80px; }
.bdots i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.bline { text-align: center; font-size: 26px; margin: 40px 0 10px; }
.bbits { font-family: ui-monospace, Consolas, monospace; letter-spacing: 4px; font-weight: 800; color: var(--navy); }
.abc { display: grid; grid-template-columns: repeat(13, 1fr); gap: 4px; font-size: 13px; margin-top: 10px; text-align: center; }
.abc span { background: #f6efe3; border-radius: 6px; padding: 2px; } .abc b { display: block; font-size: 16px; }
/* Robot */
.robot-card { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; }
.rgrid { display: grid; grid-template-columns: repeat(var(--w), 56px); gap: 4px; background: #e8dcc6; padding: 6px; border-radius: 14px; }
.rcell { width: 56px; height: 56px; background: #fffaf1; border-radius: 8px; display: grid; place-items: center; font-size: 32px; }
.rcell.rock { background: #d9cdb6; }
.rprog { display: flex; flex-wrap: wrap; gap: 6px; min-height: 52px; padding: 8px; border: 2px dashed var(--line); border-radius: 12px; margin: 10px 0; align-items: center; }
.rstep { font-size: 22px; padding: 4px 6px; border-radius: 10px; border: 2px solid var(--line); background: #fff; cursor: pointer; }
.rstep.bug { border-color: var(--accent); background: var(--accent-soft); animation: shake .35s; }
.rkeys { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; } .rkeys .btn { font-size: 22px; }
@media (max-width: 720px) { .robot-card { grid-template-columns: 1fr; } .rgrid { grid-template-columns: repeat(var(--w), 46px); } .rcell { width: 46px; height: 46px; font-size: 26px; } }
/* Roman */
.roman-card { text-align: center; }
.rq2 { font-size: 22px; } .rq2 b { font-size: 34px; color: var(--accent); }
.rdisp { font-family: Georgia, "Times New Roman", serif; font-size: 58px; letter-spacing: 6px; font-weight: 700; min-height: 80px; color: var(--navy); }
.rnow { min-height: 1.4em; }
.rkeys2 { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.rk { display: flex; flex-direction: column; align-items: center; min-width: 64px; } .rk b { font-family: Georgia, serif; font-size: 26px; } .rk small { font-size: 12px; }
.rtable2 { display: flex; justify-content: center; gap: 6px; margin-top: 18px; flex-wrap: wrap; font-size: 14px; color: var(--ink-soft); }
.rtable2 span { background: #f6efe3; border-radius: 8px; padding: 3px 10px; } .rtable2 b { font-family: Georgia, serif; margin-right: 4px; color: var(--ink); }
/* Mirror */
.mgrid { display: grid; grid-template-columns: repeat(var(--w), 1fr); gap: 3px; width: min(100%, 480px); margin: 0 auto; position: relative; }
.mgrid.v::after { content: ''; position: absolute; left: 50%; top: -6px; bottom: -6px; border-left: 3px dashed var(--accent); }
.mgrid.h::after { content: ''; position: absolute; top: 50%; left: -6px; right: -6px; border-top: 3px dashed var(--accent); }
.mc { aspect-ratio: 1; border-radius: 6px; border: 1px solid #e3d8c4; background: #fff; cursor: pointer; padding: 0; }
.mc.given { background: #f6f1e8; cursor: default; }
.mc.f.c0 { background: #6c7ee1; } .mc.f.c1 { background: #f4a261; } .mc.f.c2 { background: #e76f51; } .mc.f.c3 { background: #2a9d8f; }
.mc.bad { outline: 3px solid var(--accent); outline-offset: -2px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line); cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 3px var(--navy); }
.swatch.c0 { background: #6c7ee1; } .swatch.c1 { background: #f4a261; } .swatch.c2 { background: #e76f51; } .swatch.c3 { background: #2a9d8f; }
/* Pizza */
.order { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.order .who { font-size: 54px; }
.bubble2 { background: #fff7dc; border-radius: 18px; padding: 12px 18px; font-size: 21px; font-weight: 700; position: relative; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pzrow { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; }
.pzrow.two { gap: 30px; }
.pizza { width: 220px; height: 220px; }
.pizza .slice { fill: #f6d77a; stroke: #b5651d; stroke-width: 2; cursor: pointer; }
.pizza .slice.on { fill: #f4a03d; } .pizza .pep { fill: #c0392b; pointer-events: none; }
.pzinfo { font-size: 20px; line-height: 1.9; }
.pzpick { border: 3px solid var(--line); border-radius: 18px; background: #fff; padding: 10px; cursor: pointer; font-size: 22px; }
.pzpick .pizza { width: 170px; height: 170px; } .pzpick.right { border-color: var(--good); background: var(--good-soft); }
.frac { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; font-weight: 800; line-height: 1.1; margin: 0 4px; }
.frac i { width: 100%; min-width: 18px; border-top: 2px solid currentColor; margin: 2px 0; }
/* Flip */
.fgrid { display: grid; grid-template-columns: repeat(var(--c), 1fr); gap: 10px; max-width: 640px; margin: 0 auto; }
.fcard { aspect-ratio: 4 / 3; border-radius: 14px; border: 3px solid var(--navy); background: var(--navy); color: #fff; font-size: 22px; font-weight: 800; cursor: pointer; display: grid; place-items: center; }
.fcard .ff { display: none; } .fcard.up { background: #fff; color: var(--ink); animation: popin .2s; } .fcard.up .ff { display: block; } .fcard.up .fb { display: none; }
.fcard .fb { font-size: 30px; opacity: .6; } .fcard.got { border-color: var(--good); background: var(--good-soft); }
/* Span */
.span-card { text-align: center; }
.sdigits { font-family: ui-monospace, Consolas, monospace; font-size: 46px; font-weight: 800; letter-spacing: 6px; margin: 18px 0; color: var(--navy); }
.sdigits .sgrp { background: #fff1c9; border-radius: 10px; padding: 0 8px; } .sdigits i { font-style: normal; color: var(--ink-soft); margin: 0 4px; }
.sdigits.typed span { display: inline-block; min-width: 36px; } .sdigits .ok { color: var(--good); } .sdigits .no { color: var(--accent); }
.skeys { display: grid; grid-template-columns: repeat(6, 64px); gap: 8px; justify-content: center; } .skeys .btn { font-size: 24px; justify-content: center; }
@media (max-width: 720px) { .sbins { grid-template-columns: repeat(2, 1fr); } .match2 { gap: 10px; } .mcard2 { font-size: 17px; } .islot { width: 62px; height: 62px; font-size: 36px; } }

/* ---------- Accounts: sign-in, user chip, parent account form ---------- */
.login-card { max-width: 400px; margin: 48px auto; text-align: center; }
.login-card label { display: block; text-align: left; margin-top: 12px; font-weight: 600; }
.login-card input { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; font-size: 18px; padding: 10px 12px; border: 2px solid #ddd; border-radius: 12px; }
.login-card input:focus { outline: none; border-color: var(--accent); }
.userchip { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; font-size: 14px; white-space: nowrap; }
.kidpick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kidpick small { opacity: .7; font-weight: 400; }

/* ---------- Parent page: compact layout (body.pp) ---------- */
body.pp main { padding-top: 12px; padding-bottom: 30px; }
body.pp .page-head { margin-bottom: 8px; gap: 10px; }
body.pp .page-head h1 { font-size: 20px; }
body.pp .pnote { margin: -2px 0 8px; font-size: 13px; }
body.pp h2 { font-size: 17px; margin: 16px 0 8px !important; }
body.pp h2 small { font-size: 12px; font-weight: 400; color: var(--ink-soft); }
body.pp .card { padding: 12px 14px; margin-top: 10px !important; margin-bottom: 0 !important; border-radius: 14px; }
body.pp .card h3 { font-size: 15px; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
body.pp .card h3 small { font-size: 12px; font-weight: 400; color: var(--ink-soft); }
body.pp .grid2 { gap: 10px; grid-template-columns: 1fr 1fr; }
body.pp .grid2 > .card { margin-top: 10px !important; }
body.pp .stats { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 0; }
body.pp main > .stats { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 700px) { body.pp main > .stats { grid-template-columns: repeat(2, 1fr); } }
body.pp .stat { padding: 8px 12px; border-radius: 12px; }
body.pp .stat b { font-size: 20px; }
body.pp .stat b small { font-size: 12px; font-weight: 500; color: var(--ink-soft); }
body.pp .stat span { font-size: 12px; line-height: 1.35; display: block; }
body.pp .tsplit { font-size: 11px; margin-top: 2px; line-height: 1.3; }
body.pp .stat .target-band { height: 8px; margin: 6px 0 2px; }
body.pp .stat .target-band .zone { border-width: 1px; }
body.pp .stat .target-band .dot { width: 14px; height: 14px; top: -3px; border-width: 2px; }
body.pp .tlegend { margin: 0 0 0 auto; gap: 4px 10px; font-size: 11px; font-weight: 400; }
body.pp .bars { height: 92px; gap: 6px; padding-top: 4px; }
body.pp .bars .b { font-size: 11px; gap: 2px; }
body.pp table { font-size: 13px; }
body.pp th, body.pp td { padding: 4px 6px; }
body.pp ul.tight { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.5; }
body.pp p { margin: 4px 0; }
body.pp .entry { font-size: 15px; padding: 6px 0; }
body.pp .entry small { font-size: 11px; }
body.pp .setting { padding: 6px 0; gap: 8px; font-size: 14px; }
body.pp .setting label { min-width: 90px; font-size: 14px; }
body.pp .setting input[type=text] { font-size: 15px; padding: 5px 8px; }
body.pp details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
body.pp details > summary::-webkit-details-marker { display: none; }
body.pp details > summary::after { content: '▸'; margin-left: auto; color: var(--ink-soft); transition: transform .2s; }
body.pp details[open] > summary::after { transform: rotate(90deg); }
body.pp details.card > summary h3 { margin: 0; }
body.pp details.card[open] > summary { margin-bottom: 8px; }
body.pp details.isl { border-bottom: 1px solid var(--line); }
body.pp details.isl > summary { padding: 5px 0; font-size: 14px; }
body.pp details.isl .iname { flex: 0 0 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.pp details.isl .meter { flex: 1; height: 8px; }
body.pp details.isl .muted { flex: 0 0 auto; font-size: 12px; }
body.pp details.isl table { margin: 0 0 6px; }
body.pp .sicons { white-space: nowrap; letter-spacing: 1px; }
body.pp .sicons i { color: #ccc; font-style: normal; }
body.pp .hzgrid { display: flex; flex-wrap: wrap; gap: 4px; }
.hzc { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 4px; border-radius: 7px; font-size: 18px; border: 2px solid transparent; }
.card h3 small .hzc { min-width: 0; height: 18px; font-size: 11px; padding: 0 5px; margin-right: 3px; font-family: var(--en); }
.hzc.b-expert { background: #c8e6c9; } .hzc.b-mastered { background: #e3f1d9; } .hzc.b-familiar { background: #fff3c4; } .hzc.b-new { background: #fde0dc; }
.hzc.due { border-color: var(--accent); }
/* Practice report inside the parent page */
body.pp .ladder { padding: 6px 2px 2px; gap: 6px; align-items: flex-start; }
body.pp ul.tight .kai { font-size: 17px; line-height: 1; }
body.pp .lstep { flex-basis: 120px; }
body.pp .lhead { padding: 4px 8px; font-size: 13px; }
body.pp .lhead small { font-size: 11px; }
body.pp .lsk { font-size: 12px; padding: 2px 6px; }
body.pp .lskills { gap: 2px; margin-top: 4px; max-height: 128px; overflow-y: auto; }
body.pp .card .row { gap: 8px; flex-wrap: wrap; font-size: 13px; }
body.pp .card .row h3 { font-size: 15px; }
body.pp .card .grid2 { margin-top: 6px !important; font-size: 13px; }
body.pp .card .grid2 ul { margin: 2px 0; padding-left: 18px; }
@media (max-width: 760px) { body.pp .grid2 { grid-template-columns: 1fr; } }
.acct-new { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acct-new input[type=text] { flex: 1 1 200px; padding: 8px 10px; border: 1px solid #ccc; border-radius: 10px; font-size: 15px; }
.acct-new label { flex: 1 1 100%; font-size: 15px; }
.meanwhile-en { display: block; color: var(--muted, #777); font-size: 13px; }

.lsk .lsheet { display:block; font-size:12px; opacity:.75; font-weight:400; }

/* English reading: Chinese help (smaller than the English), evidence and picture cards */
.rq-zh { display: block; white-space: pre-line; font-size: 15px; font-weight: 400; color: var(--ink-soft); font-family: var(--zh); margin-top: 3px; line-height: 1.5; }
.rclaim .rq-zh { font-size: 15px; }
.rzh { margin-top: 10px; padding: 8px 12px; border-left: 4px solid #e6d8bd; background: #faf6ee; border-radius: 8px; font-family: var(--zh); font-size: 15px; line-height: 1.75; color: var(--ink-soft); }
.rzh-tag { display: inline-block; font-size: 12px; background: #e6d8bd; color: #6b5a3a; border-radius: 6px; padding: 0 6px; margin-right: 6px; vertical-align: 1px; }
.rev { margin: 10px 0; padding: 10px 12px; background: #fff7dc; border-radius: 10px; font-size: 16px; }
.rev-s { margin-top: 4px; font-size: 18px; line-height: 1.6; }
.rvis { display: flex; gap: 14px; align-items: center; margin: 10px 0; padding: 10px; border: 2px solid var(--line); border-radius: 14px; background: #fff; flex-wrap: wrap; }
.rvis-art { flex: 0 0 auto; width: 240px; max-width: 100%; }
.rvis-art svg { width: 100%; height: auto; display: block; }
.rvis-art .scene { font-size: 46px; text-align: center; line-height: 1.3; letter-spacing: 4px; }
.rvis-txt { flex: 1 1 220px; font-size: 16px; line-height: 1.55; }
.rvis-txt small { display: block; margin-top: 6px; font-family: var(--zh); font-size: 14px; color: var(--ink-soft); }
