/* Clavis Roots · 组件样式（参考实现）
 * 只用 tokens/roots-tokens.css 里的变量。字号用 rem，系统字号放大到 200% 时跟着放大。
 * 类名只是参考，开发可以按现有代码改名；数值以这里为准。
 */

* { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { flex: none; }
::-webkit-scrollbar { display: none; }

/* —— 外框（原型专用：模拟刘海和底部横条的安全区；正式代码用 env(safe-area-inset-*)） —— */
.app { --sat: 47px; --sab: 34px; position: relative; height: 100vh; overflow: hidden; display: flex; flex-direction: column; background: var(--bg); }
.app.tablet { --sat: 24px; --sab: 20px; }
.page { flex: 1; overflow-y: auto; scrollbar-width: none; padding-top: calc(var(--sat) + 8px); }
.page.has-tab { padding-bottom: calc(var(--tab-h) + var(--sab)); }
.wrap { width: 100%; max-width: var(--page-max); margin: 0 auto; padding: 0 var(--page-x); display: flex; flex-direction: column; gap: 16px; }

/* —— 文字 —— */
.word { font-family: var(--font-word); letter-spacing: -0.01em; }
.ipa { font-family: var(--font-ipa); }
.t-title { margin: 0; font-size: 1.625rem; line-height: 1.2; font-weight: 700; }
.t-h2 { margin: 0; font-size: 1.0625rem; font-weight: 700; }
.t-label { margin: 0; font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); }
.t-body { font-size: 1rem; line-height: 1.5; }
.t-sub { font-size: 0.90625rem; line-height: 1.45; color: var(--ink-2); }
.t-small { font-size: 0.75rem; color: var(--ink-2); }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* —— 按钮 —— */
.btn { min-height: var(--btn-h); padding: 0 20px; border: 0; border-radius: var(--r-m); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 1rem; font-weight: 600; white-space: nowrap; text-decoration: none; transition: transform var(--dur-1) var(--ease-out); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-secondary { background: var(--fill); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-block { width: 100%; }
.btn[disabled] { background: var(--line); color: var(--ink-2); cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row > .btn { flex: 1 1 auto; }          /* 放不下时整行换成两行，按钮文字不换行、不截断 */
.btn-row > .btn.wide { flex-grow: 1.4; }
.ibtn { width: var(--tap); height: var(--tap); border: 0; border-radius: 50%; background: var(--fill); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.ibtn.ghost { background: transparent; color: var(--ink-2); }
.ibtn.lg { width: 52px; height: 52px; background: var(--brand); color: var(--on-brand); }
.link { color: var(--brand-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; min-height: var(--tap); display: inline-flex; align-items: center; background: none; border: 0; padding: 0; }
.chip { white-space: nowrap; flex: none; min-height: var(--tap); padding: 0 14px; border-radius: 22px; border: 1px solid var(--line); background: var(--card); display: inline-flex; align-items: center; gap: 6px; font-size: 0.90625rem; font-weight: 500; }

/* —— 卡片、主卡、提示条 —— */
.card { background: var(--card); border-radius: var(--r-l); padding: 20px; }
.hero { background: var(--card); border-radius: var(--r-l); padding: 20px; display: flex; flex-direction: column; gap: 16px; position: relative; overflow: hidden; }
.hero.dark { background: var(--brand); color: var(--on-brand); }
.hero.dark .t-label, .hero.dark .t-sub { color: inherit; opacity: 0.78; }
.hero.dark .btn-primary { background: var(--on-brand); color: var(--brand); }
.hero-title { padding-right: 84px; }
.deco { position: absolute; right: 20px; top: 20px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.deco > div { display: flex; gap: 4px; }
.deco i { display: block; height: 14px; border-radius: 4px; }
@media (max-width: 359px) { .deco { display: none; } .hero-title { padding-right: 0; } }
.bar { min-height: 56px; border-radius: var(--r-m); background: var(--root-bg); color: var(--root-ink); display: flex; align-items: center; gap: 12px; padding: 0 8px 0 16px; font-size: 0.9375rem; font-weight: 600; text-decoration: none; border: 0; width: 100%; text-align: left; }
.bar .count { min-width: 28px; height: 28px; padding: 0 6px; border-radius: 14px; background: var(--badge-bg); color: var(--badge-ink); display: inline-flex; align-items: center; justify-content: center; font-size: 0.875rem; font-weight: 700; }
.bar .go { margin-left: auto; min-height: var(--tap); display: inline-flex; align-items: center; gap: 2px; padding: 0 8px; }
.banner { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-m); background: var(--fill); font-size: 0.90625rem; line-height: 1.5; color: var(--ink-2); }
.banner b { color: var(--ink); font-weight: 600; }
.banner.info { background: var(--root-bg); color: var(--root-ink); }
.banner.info b { color: inherit; }
.progress { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 4px; background: var(--brand); }

/* —— 词素色块（核心组件）：大 / 中 / 迷你 是同一个东西 ——
 * 结构：.morphs > (.morph + .plus)*；.morph = 词素文字 + 意思。
 * 排列走 flex 行方向，dir="rtl" 时自动从右往左；不写死左右。 */
.morphs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.plus { color: var(--ink-2); font-size: 1.25rem; font-weight: 500; }
.morph { --m-base: var(--base); display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 56px; max-width: 100%; padding: 10px 14px calc(10px + var(--m-base)); border-radius: var(--r-m); background: var(--m-bg); color: var(--m-ink); box-shadow: inset 0 calc(-1 * var(--m-base)) 0 var(--m-bar); text-align: center; }
.morph .mt { font-family: var(--font-word); font-size: 1.75rem; line-height: 1.15; font-weight: 700; overflow-wrap: anywhere; }
.morph .mm { font-size: 0.8125rem; line-height: 1.25; font-weight: 600; max-width: 9.5em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.morph.md { --m-base: 3px; min-width: 44px; padding: 6px 10px calc(6px + 3px); border-radius: 12px; }
.morph.md .mt { font-size: 1.25rem; }
.morph.md .mm { font-size: 0.75rem; }
.m-pre  { --m-bg: var(--pre-bg);  --m-ink: var(--pre-ink);  --m-bar: var(--pre); }
.m-root { --m-bg: var(--root-bg); --m-ink: var(--root-ink); --m-bar: var(--root); }
.m-suf  { --m-bg: var(--suf-bg);  --m-ink: var(--suf-ink);  --m-bar: var(--suf); }
.m-inf  { --m-bg: var(--inf-bg);  --m-ink: var(--inf-ink);  --m-bar: var(--inf); }
.m-neu  { --m-bg: var(--neutral-bg); --m-ink: var(--ink); --m-bar: var(--neutral-bar); }
.m-neu .mm { color: var(--ink-2); }
.mini { display: inline-flex; gap: 2px; font-family: var(--font-word); font-size: 0.875rem; font-weight: 600; flex: none; }
.mini > span { padding: 1px 6px 3px; border-radius: 6px; background: var(--m-bg); color: var(--m-ink); box-shadow: inset 0 -2px 0 var(--m-bar); }

/* —— 单词行 —— */
.list { background: var(--card); border-radius: var(--r-l); padding: 4px 16px; }
.row { min-height: 60px; width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.row:last-child { border-bottom: 0; }
.row .rw { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row .rw .word { font-size: 1.1875rem; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .rw .t-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc { display: inline-flex; align-items: center; gap: 4px; font-size: 0.75rem; font-weight: 600; flex: none; }
.acc.ok { color: var(--ok-ink); }
.acc.saved { color: var(--root-ink); }
.mastery { display: inline-flex; gap: 3px; flex: none; }
.mastery i { width: 8px; height: 16px; border-radius: 3px; background: var(--line); }
.mastery i.on { background: var(--root); }

/* —— 单元格 —— */
.units { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.unit { border: 0; border-radius: var(--r-m); background: var(--card); padding: 14px; display: flex; flex-direction: column; gap: 6px; text-align: left; min-height: 84px; }
.unit .un { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 6px; }
.unit .num { font-size: 1.25rem; font-weight: 700; }
.unit.todo .num { color: var(--ink-2); }
.unit.next { box-shadow: inset 0 0 0 2px var(--brand); }
.unit .prev { font-family: var(--font-word); font-size: 0.875rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
.pill { font-size: 0.75rem; font-weight: 600; padding: 3px 8px; border-radius: 10px; background: var(--brand); color: var(--on-brand); white-space: nowrap; }
.pill.soft { background: var(--fill); color: var(--ink-2); }
.dot-todo { width: 16px; height: 16px; border-radius: 8px; border: 1.9px solid var(--slot-dash); }
@media (min-width: 600px) { .units { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* —— 标签栏 —— */
.tabbar { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--tab-h) + var(--sab)); padding: 0 8px var(--sab); background: var(--tabbar-bg); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); backdrop-filter: blur(12px); z-index: 5; }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink-2); font-size: min(0.75rem, 14px); white-space: nowrap; /* 标签栏文字封顶 14px，和 iOS 一致；放大字号时由系统的大字内容查看器补位 */ font-weight: 500; text-decoration: none; border: 0; background: none; min-height: var(--tap); }
.tab.on { color: var(--ink); font-weight: 700; }
.tab .badge { position: absolute; top: 6px; left: 50%; margin-left: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--badge-bg); color: var(--badge-ink); font-size: 0.6875rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* —— 顶栏（全屏练习、二级页） —— */
.topbar { display: flex; align-items: center; gap: 8px; min-height: var(--tap); }
.topbar .progress { flex: 1; }
.topbar .count { font-size: 0.875rem; font-weight: 600; color: var(--ink-2); min-width: 3.2em; text-align: right; }

/* —— 底部面板 —— */
.scrim { position: absolute; inset: 0; background: var(--scrim); z-index: 10; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92%; z-index: 11; background: var(--card); border-radius: var(--r-l) var(--r-l) 0 0; display: flex; flex-direction: column; animation: sheet-in var(--dur-3) var(--ease-out); }
.sheet.full { height: 92%; }
@media (min-width: 700px) { .sheet { left: 50%; right: auto; width: 100%; max-width: var(--page-max); transform: translateX(-50%); } }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 12px 0 8px; flex: none; }
.sheet-body { flex: 1; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; padding: 4px 20px 16px; display: flex; flex-direction: column; gap: 20px; }
.sheet-foot { flex: none; padding: 12px var(--page-x) calc(var(--sab) + 4px); border-top: 1px solid var(--line); background: var(--card); }
.navpair { display: flex; align-items: center; gap: 4px; }
.navpair .t-small { min-width: 3.6em; text-align: center; font-size: 0.875rem; }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* —— 单词卡 —— */
.wc-head { display: flex; flex-direction: column; gap: 8px; }
.wc-word { font-family: var(--font-word); font-size: 2.5rem; line-height: 1.08; font-weight: 700; letter-spacing: -0.02em; hyphens: manual; overflow-wrap: anywhere; }
.wc-word.long { font-size: clamp(1.75rem, 9.2vw, 2.25rem); }     /* 11–13 个字母 */
.wc-word.xlong { font-size: clamp(1.5rem, 8.4vw, 2rem); }        /* 14 个字母以上：先缩字号，实在放不下才断行 */
.wc-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wc-meta { font-size: 0.9375rem; color: var(--ink-2); }
.wc-mean { font-size: 1.25rem; font-weight: 600; line-height: 1.35; }
.ex { display: flex; gap: 10px; align-items: flex-start; }
.ex .es { font-family: var(--font-word); font-size: 1.125rem; line-height: 1.45; font-weight: 500; }
.ex mark { background: var(--root-bg); color: inherit; border-radius: 4px; padding: 0 2px; }
.kin { display: flex; flex-wrap: wrap; gap: 8px; }
.kin button { min-height: var(--tap); border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 6px 12px; display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.kin .word { font-size: 1rem; font-weight: 600; }
.kin .t-small { font-size: 0.75rem; }

/* —— 拼词 —— */
.prompt { text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.prompt .big { font-size: 1.875rem; font-weight: 700; line-height: 1.25; }
.slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 12px; border-radius: var(--r-l); border: 2px solid transparent; transition: background var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out); }
.slots.ok { border-color: var(--ok); background: var(--ok-bg); }
.slots.no { border-color: var(--no); background: var(--no-bg); }
.slot { min-width: 72px; min-height: 72px; padding: 0 14px; border-radius: var(--r-m); border: 2px dashed var(--slot-dash); background: transparent; display: inline-flex; align-items: center; justify-content: center; }
.slot.full { border: 0; background: var(--m-bg); color: var(--m-ink); box-shadow: inset 0 calc(-1 * var(--base)) 0 var(--m-bar); font-family: var(--font-word); font-size: 1.625rem; font-weight: 700; animation: drop-in var(--dur-2) var(--ease-spring); }
.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tile { min-width: 64px; min-height: 56px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-family: var(--font-word); font-size: 1.375rem; font-weight: 700; box-shadow: 0 3px 0 var(--tile-shadow); transition: transform var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out), opacity var(--dur-2); }
.tile:active:not([disabled]) { transform: translateY(3px); box-shadow: 0 0 0 var(--tile-shadow); }
.tile[disabled] { opacity: 0.3; cursor: default; }
.feedback { padding: 20px var(--page-x) calc(var(--sab) + 4px); border-radius: var(--r-l) var(--r-l) 0 0; display: flex; flex-direction: column; gap: 16px; animation: sheet-in var(--dur-2) var(--ease-out); }
.feedback.ok { background: var(--ok-bg); }
.feedback.no { background: var(--no-bg); }
.verdict { display: flex; align-items: center; gap: 8px; font-size: 1.25rem; font-weight: 700; }
.feedback.ok .verdict { color: var(--ok-ink); }
.feedback.no .verdict { color: var(--no-ink); }
.eq { color: var(--ink-2); margin: 0 4px; }
@keyframes drop-in { from { transform: translateY(-10px) scale(0.92); } to { transform: none; } }

/* —— 选意思 —— */
.options { display: flex; flex-direction: column; gap: 10px; }
.opt { min-height: 60px; width: 100%; padding: 12px 16px; border-radius: var(--r-m); border: 2px solid var(--line); background: var(--card); display: flex; align-items: center; gap: 12px; text-align: left; font-size: 1.0625rem; font-weight: 500; transition: background var(--dur-2), border-color var(--dur-2); }
.opt .ic { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 0.8125rem; font-weight: 600; }
.opt.ok { border-color: var(--ok); background: var(--ok-bg); color: var(--ok-ink); }
.opt.no { border-color: var(--no); background: var(--no-bg); color: var(--no-ink); }
.opt.dim { opacity: 0.55; }

/* —— 结果 —— */
.ring { position: relative; width: 168px; height: 168px; margin: 0 auto; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .rv { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .rv b { font-size: 2.5rem; font-weight: 700; }

/* —— 复习卡 —— */
.flash { background: var(--card); border-radius: var(--r-l); padding: 28px 20px; min-height: 340px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.flash .word { font-size: 2.25rem; font-weight: 700; line-height: 1.1; overflow-wrap: anywhere; }
.flash hr { width: 100%; border: 0; border-top: 1px dashed var(--line); margin: 6px 0; }

/* —— 输入 —— */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 0.875rem; font-weight: 600; }
.input { height: var(--btn-h); padding: 0 16px; border-radius: var(--r-m); border: 1.5px solid var(--line); background: var(--card); font-size: 1.0625rem; width: 100%; }
.input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); }
.input.err { border-color: var(--no); }
.err-text { color: var(--no-ink); font-size: 0.875rem; font-weight: 500; display: flex; gap: 6px; align-items: center; }
.code { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.code span { min-height: 56px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; }
.code span.cur { border-color: var(--focus); }
.code.err span { border-color: var(--no); }

/* —— 首次打开 —— */
.onb { flex: 1; display: flex; flex-direction: column; gap: 24px; }
.choice { min-height: 72px; width: 100%; border-radius: var(--r-l); border: 0; background: var(--card); padding: 14px 18px; display: flex; align-items: center; gap: 14px; text-align: left; }
.choice .cn { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.choice .cn b { font-size: 1.125rem; }
.choice[disabled] { opacity: 0.55; cursor: default; }
.flagblk { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-family: var(--font-word); font-size: 1rem; font-weight: 700; flex: none; }

/* —— 拍照 —— */
.ocr-line { width: 100%; background: var(--card); border-radius: var(--r-m); padding: 4px 16px; display: flex; flex-direction: column; gap: 10px; }
.ocr-line.on { padding-bottom: 14px; }
.ocr-head { border: 0; background: none; padding: 10px 0; min-height: 48px; text-align: left; width: 100%; }
.ocr-line .es { font-family: var(--font-word); font-size: 1.0625rem; line-height: 1.45; }
.ocr-line.on { box-shadow: inset 0 0 0 2px var(--brand); }
.wordbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.wordbtns button { min-height: var(--tap); padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-family: var(--font-word); font-size: 1rem; font-weight: 600; }
.wordbtns button.split { background: var(--root-bg); color: var(--root-ink); border-color: transparent; box-shadow: inset 0 -2px 0 var(--root); }

/* —— 状态：空、加载、失败 —— */
.state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 24px; }
.state img { width: 180px; height: auto; }
.state .t-h2 { font-size: 1.25rem; }
.skel { background: var(--fill); border-radius: var(--r-m); position: relative; overflow: hidden; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--card) 60%, transparent), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* —— 轻提示 —— */
.toast { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--sab) + 92px); z-index: 20; background: var(--ink); color: var(--bg); border-radius: 999px; padding: 12px 18px; font-size: 0.90625rem; font-weight: 600; display: flex; align-items: center; gap: 8px; white-space: nowrap; box-shadow: 0 6px 20px rgba(0,0,0,0.18); }

/* —— 我的 —— */
.acct { display: flex; align-items: center; gap: 14px; }
.avatar { width: 52px; height: 52px; border-radius: 16px; background: var(--root-bg); color: var(--root-ink); display: flex; align-items: center; justify-content: center; flex: none; }
.setrow { min-height: 56px; width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font-size: 1rem; }
.setrow:last-child { border-bottom: 0; }
.setrow .v { margin-left: auto; color: var(--ink-2); font-size: 0.9375rem; display: inline-flex; align-items: center; gap: 4px; }
.seg { display: inline-flex; background: var(--fill); border-radius: 12px; padding: 3px; margin-left: auto; }
.seg button { min-height: 38px; min-width: 44px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; font-size: 0.875rem; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.12); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--bg); border-radius: var(--r-m); padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 1.375rem; }

/* —— 减少动态效果：全部关掉 —— */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.no-motion *, .no-motion *::before, .no-motion *::after { animation: none !important; transition: none !important; }

/* ===== 以下是开发加的：把原型的外框换成真机的安全区，补上设计说明里原型没做的动效和几个状态 ===== */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
.app, .app.tablet { --sat: max(env(safe-area-inset-top, 0px), 10px); --sab: env(safe-area-inset-bottom, 0px); height: 100vh; height: 100dvh; }
.page { -webkit-overflow-scrolling: touch; }
.wrap { padding-bottom: 20px; }
button { -webkit-tap-highlight-color: transparent; }
a.btn, a.setrow, a.bar { color: inherit; }
.btn-primary[disabled] { background: var(--line); color: var(--ink-2); }
.hero.dark .btn-primary { color: var(--brand); }
.sheet-body > * { flex: none; }
/* 练习、复习底部的固定区 */
.foot { flex: none; padding: 16px var(--page-x) calc(var(--sab) + 12px); }
.foot > div, .feedback > div { max-width: calc(var(--page-max) - 32px); margin: 0 auto; width: 100%; }
.feedback { flex: none; padding-bottom: calc(var(--sab) + 12px); }
.feedback > div { display: flex; flex-direction: column; gap: 14px; }
.grow { flex: 1; min-height: 12px; }
.sticky-cta { position: absolute; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--sab)); padding: 12px var(--page-x); background: linear-gradient(to top, var(--bg) 70%, transparent); z-index: 4; }
.sticky-cta > div { max-width: calc(var(--page-max) - 32px); margin: 0 auto; }
.has-cta .wrap { padding-bottom: 96px; }
.backchip { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + var(--sab) + 12px); box-shadow: 0 4px 16px rgba(0,0,0,.15); z-index: 4; }
.backchip[hidden] { display: none; }
/* M5 答对：色块收拢成一个词；M6 答错：晃两下 */
.slots.ok { gap: 2px; animation: merge var(--dur-2) var(--ease-spring); }
.slots.no { animation: shake var(--dur-2) var(--ease-out); }
@keyframes merge { 0% { gap: 8px; transform: scale(1); } 60% { transform: scale(1.04); } 100% { gap: 2px; transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25%, 75% { transform: translateX(-4px); } 50% { transform: translateX(4px); } }
.toast { animation: sheet-in var(--dur-2) var(--ease-out); max-width: 92vw; }
.rise { animation: sheet-in var(--dur-2) var(--ease-out); }
/* 验证码：六个格子上面盖一个真的输入框，手机上能直接填短信 / 邮件里的验证码 */
.codewrap { position: relative; }
.codewrap input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; border: 0; }
.codewrap:focus-within .code span.cur { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); }
.state img.icon76 { width: 76px; border-radius: 18px; }
.ex mark { font-weight: 600; }
.setrow svg:first-child { color: var(--ink-2); }
[hidden] { display: none !important; }
/* 小屏幕上内容比屏幕高时，反馈面板和底部按钮始终贴在底部，内容从下面滚过去 */
.feedback, .page > .foot { position: sticky; bottom: 0; z-index: 3; }
.page > .foot { background: linear-gradient(to top, var(--bg) 80%, transparent); }
