/* ===== 词语拼写 · 小学 1-6 年级（风格参照「星空刷题」多邻国设计）===== */
:root {
  --green: #58cc02;
  --green-dark: #46a302;
  --blue: #1cb0f6;
  --red: #ff5b5b;
  --yellow: #ffc800;
  --purple: #ce82ff;
  --orange: #f59e0b;
  --ink: #3c3c3c;
  --gray: #afafaf;
  --gray-light: #e5e5e5;
  --bg: #ffffff;
  --bg-soft: #f7f7f7;
  --border: #d9d9d9;
  --radius: 14px;
  --shadow: 0 4px 0 var(--border);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }
body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg-soft);
  line-height: 1.5;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 24px rgba(0,0,0,.06);
}

.hidden { display: none !important; }
[hidden] { display: none !important; }
.muted { color: var(--gray); }

.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 20px; overflow-y: auto; }
.screen.quiz { overflow: hidden; }

/* ===== 通用按钮 ===== */
.btn {
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .5px;
  padding: 15px 20px;
  cursor: pointer;
  transition: transform .05s, filter .15s;
  color: #fff;
  background: var(--green);
  box-shadow: 0 4px 0 var(--green-dark);
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--green-dark); }
.btn-primary { background: var(--green); }
.btn-ghost { background: #fff; color: var(--green-dark); border: 2px solid var(--gray-light); box-shadow: 0 4px 0 var(--gray-light); }
.btn-blue { background: var(--blue); box-shadow: 0 4px 0 #1899d6; }
.btn-blue:active { transform: translateY(3px); box-shadow: 0 1px 0 #1899d6; }
.btn-block { width: 100%; margin-top: 14px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn-sm { font-size: 13px; padding: 10px 14px; margin-top: 0; flex-shrink: 0; }

.icon-btn {
  border: none; background: transparent; font-size: 22px; color: var(--gray);
  cursor: pointer; width: 36px; height: 36px; border-radius: 8px;
}
.icon-btn:active { background: var(--bg-soft); }

/* ===== 主页 ===== */
.home-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { font-size: 34px; }
.brand h1 { font-size: 22px; color: var(--ink); }
.brand-sub { font-size: 12px; color: var(--gray); font-weight: 600; }
.streak-pill {
  display: flex; align-items: center; gap: 4px; font-weight: 800; color: #ff9600;
  background: #fff3e0; padding: 6px 12px; border-radius: 999px; font-size: 16px;
}
.flame { font-size: 18px; }
.home-top-right { display: flex; align-items: center; gap: 8px; }
.icon-btn.gear {
  width: 40px; height: 40px; border-radius: 999px; font-size: 20px;
  background: #fff; border: 2px solid var(--gray-light); border-bottom-width: 4px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.icon-btn.gear:active { transform: translateY(2px); border-bottom-width: 2px; }

/* 首页设置摘要卡 */
.cfg-summary {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: #fff; border: 2px solid var(--gray-light); border-bottom-width: 4px;
  border-radius: 16px; padding: 14px 16px; margin-bottom: 14px;
  cursor: pointer; text-align: left; font-family: inherit;
}
.cfg-summary:active { transform: translateY(2px); border-bottom-width: 2px; }
.cfg-icon { font-size: 24px; line-height: 1; }
.cfg-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cfg-text strong { font-size: 15px; color: var(--ink); font-weight: 800; }
.cfg-text small { font-size: 11px; color: var(--gray); font-weight: 600; }
.cfg-arrow { font-size: 24px; color: var(--gray); line-height: 1; }

.hero-card {
  display: flex; gap: 20px; align-items: center;
  background: linear-gradient(135deg, #f0faff, #eafce0);
  border: 2px solid var(--gray-light);
  border-radius: 20px; padding: 20px; margin-bottom: 14px;
}
.hero-ring { position: relative; width: 110px; height: 110px; flex-shrink: 0; }
.ring-svg { width: 110px; height: 110px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--gray-light); stroke-width: 12; }
.ring-fg {
  fill: none; stroke: var(--green); stroke-width: 12; stroke-linecap: round;
  stroke-dasharray: 326.7; stroke-dashoffset: 326.7;
  transition: stroke-dashoffset .6s ease;
}
.ring-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 2px; }
.ring-label strong { font-size: 28px; color: var(--ink); line-height: 1; }
.ring-label span { font-size: 13px; color: var(--gray); font-weight: 700; line-height: 1; }

.hero-info { flex: 1; min-width: 0; }
.hero-info h2 { font-size: 18px; margin-bottom: 2px; }
.hero-info p { font-size: 12px; margin-bottom: 10px; }
.hero-stats { display: grid; grid-template-columns: auto repeat(2, 1fr); gap: 4px 14px; align-items: center; }
.hs-cell { display: flex; flex-direction: column; }
.hs-head { font-size: 11px; color: var(--gray); font-weight: 700; }
.hs-rowlabel { font-size: 12px; color: var(--gray); font-weight: 700; }
.hero-stats .hs-val { font-size: 17px; font-weight: 800; color: var(--blue); line-height: 1.1; }
.hero-stats .hs-hist { color: var(--gray); }

/* 本学期总进度条 */
.term-card {
  background: #fff; border: 2px solid var(--gray-light); border-radius: 16px;
  padding: 14px 16px; margin-bottom: 14px;
}
.term-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 9px; }
.term-head strong { font-size: 15px; font-weight: 800; color: var(--ink); }
.term-num { font-size: 12px; font-weight: 700; color: var(--gray); }
.term-pct { margin-left: auto; font-size: 16px; font-weight: 800; color: var(--green-dark); }
.term-bar { height: 12px; border-radius: 999px; background: var(--gray-light); overflow: hidden; }
.term-fill { height: 100%; width: 0; background: var(--green); border-radius: 999px; transition: width .5s ease; }
.term-note { font-size: 12px; margin-top: 8px; }

/* ===== 设置区（年级/模式/题量）===== */
.field { margin-bottom: 14px; }
.field > .field-label { display: block; font-size: 14px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 2px solid var(--gray-light); border-bottom-width: 4px; border-radius: 999px;
  background: #fff; color: var(--ink); font-size: 14px; font-weight: 700;
  padding: 8px 14px; cursor: pointer; transition: border-color .12s, background .12s;
}
.chip:active { transform: translateY(2px); border-bottom-width: 2px; }
.chip.active { border-color: var(--green); background: #f3fbec; color: var(--green-dark); }
.mode-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 0; border-radius: var(--radius); flex: 1; padding: 10px 12px; }
.mode-chip small { font-size: 11px; color: var(--gray); font-weight: 600; }
.mode-chip.active small { color: var(--green-dark); }
.mode-chip-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode-chip[disabled] { opacity: .4; cursor: default; }
.mode-chip-row > .mode-chip:nth-child(odd):last-child { grid-column: 1 / -1; }

/* 自由手写 OCR 服务状态提示 */
.ocr-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--gray); }
.ocr-note.ok { color: var(--green-dark); }
.ocr-note.err { color: #c93c3c; }
.ocr-recheck {
  border: none; background: transparent; padding: 0; cursor: pointer;
  font-size: 12px; font-weight: 700; color: var(--blue); text-decoration: underline;
}

/* ===== 错题入口卡片 ===== */
.wrong-card {
  display: flex; align-items: center; gap: 12px;
  border: 2px solid var(--gray-light); border-bottom-width: 4px; border-radius: var(--radius);
  background: #fff; padding: 12px 16px; margin-bottom: 8px;
}
.wrong-emoji { font-size: 26px; }
.wrong-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.wrong-info strong { font-size: 15px; }
.wrong-info small { font-size: 12px; color: var(--gray); }
.wrong-card.empty { opacity: .6; }
.btn-today { background: var(--red); box-shadow: 0 4px 0 #d64545; }
.btn-today:active { transform: translateY(3px); box-shadow: 0 1px 0 #d64545; }
.btn-repeated { background: var(--orange); box-shadow: 0 4px 0 #d97706; }
.btn-repeated:active { transform: translateY(3px); box-shadow: 0 1px 0 #d97706; }
.btn-longterm { background: var(--purple); box-shadow: 0 4px 0 #b35de6; }
.btn-longterm:active { transform: translateY(3px); box-shadow: 0 1px 0 #b35de6; }

.bank-note { margin-top: auto; padding-top: 16px; text-align: center; font-size: 12px; color: var(--gray); }

/* ===== 答题页 ===== */
.quiz-top { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.progress-track { flex: 1; height: 16px; background: var(--gray-light); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--green); border-radius: 999px; transition: width .3s ease; }
.quiz-counter { font-weight: 800; color: var(--gray); font-size: 14px; min-width: 44px; text-align: right; }

.quiz-body { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 20px; display: flex; flex-direction: column; }
.q-meta { display: flex; gap: 8px; margin-bottom: 14px; }
.badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.badge-source { background: #eef6ff; color: var(--blue); }
.badge-type { background: #f3e9ff; color: var(--purple); }
.badge-wrong { background: #ffe9e9; color: #c93c3c; }

.q-tip { font-size: 15px; font-weight: 700; color: var(--gray); margin-bottom: 14px; }

/* 拼音展示 */
.pinyin-display {
  display: flex; justify-content: center; gap: 18px; flex-wrap: wrap;
  font-size: 30px; font-weight: 800; letter-spacing: 1px;
  padding: 26px 10px; color: var(--ink);
}
.pinyin-display .py { text-align: center; }

/* 词语解释（题目/反馈/错题通用底样式） */
.word-exp {
  text-align: center; font-size: 14px; font-weight: 700; color: var(--gray);
  margin: 0 auto 10px; max-width: 92%; line-height: 1.5;
}
.feedback-exp { font-size: 13px; font-weight: 700; color: var(--gray); margin-top: 4px; line-height: 1.5; }
.feedback-exp:empty { display: none; }

/* 听写大喇叭 */
.speaker-btn {
  display: block; width: 110px; height: 110px; margin: 16px auto;
  border-radius: 50%; border: none; cursor: pointer;
  background: var(--blue); box-shadow: 0 6px 0 #1899d6;
  font-size: 46px; color: #fff;
}
.speaker-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #1899d6; }
.speaker-btn.replay { background: var(--green); box-shadow: 0 6px 0 var(--green-dark); }
.listen-hint { text-align: center; font-size: 13px; color: var(--gray); font-weight: 700; }

/* 输入框 */
.write-input {
  display: block; width: 100%; max-width: 320px; margin: 18px auto 0;
  font: inherit; font-size: 26px; font-weight: 800; text-align: center;
  padding: 12px 14px; border: 2px solid var(--gray-light); border-bottom-width: 4px;
  border-radius: 12px; background: #fff; color: var(--ink); outline: none;
}
.write-input:focus { border-color: var(--blue); }
.write-input::placeholder { font-size: 15px; font-weight: 600; color: var(--gray); }

/* 选择补全：汉字格子 */
.tile-row { display: flex; justify-content: center; gap: 12px; margin: 10px 0 22px; flex-wrap: wrap; }
.tile { width: 66px; text-align: center; }
.tile .tile-py { font-size: 14px; font-weight: 800; color: var(--gray); height: 22px; }
.tile .tile-box {
  width: 66px; height: 66px; border: 2px solid var(--gray-light); border-bottom-width: 4px;
  border-radius: 12px; background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 700; color: var(--ink);
}
.tile.blank .tile-box { border-style: dashed; border-color: var(--blue); background: #f2faff; color: var(--blue); cursor: pointer; }
.tile.blank .tile-py { color: var(--blue); }
.tile.filled .tile-box { border-style: solid; border-color: var(--blue); background: #ddf4ff; }
.tile.right .tile-box { border-color: var(--green); background: #d7ffb8; color: var(--green-dark); }
.tile.wrong .tile-box { border-color: var(--red); background: #ffdfe0; color: #c93c3c; }

.opt-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.opt-cell {
  width: 62px; height: 62px; border: 2px solid var(--gray-light); border-bottom-width: 4px;
  border-radius: 12px; background: #fff; cursor: pointer;
  font-size: 30px; font-weight: 700; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: background .12s, border-color .12s;
}
.opt-cell:hover { background: var(--bg-soft); }
.opt-cell.used { opacity: .3; pointer-events: none; }
.opt-cell.selected { border-color: var(--blue); background: #ddf4ff; color: #1873aa; }
.opt-cell.correct { border-color: var(--green); background: #d7ffb8; color: var(--green-dark); }
.opt-cell.wrong { border-color: var(--red); background: #ffdfe0; color: #c93c3c; }
.opt-cell:disabled { cursor: default; }

.q-actions { display: flex; flex-direction: column; gap: 10px; }

/* ===== 反馈条 ===== */
.feedback {
  flex-shrink: 0; margin: 0 -20px -20px; padding: 16px 20px;
  border-top: 2px solid var(--gray-light); animation: slideUp .25s ease;
  max-height: 55vh; overflow-y: auto;
}
.feedback.right { background: #d7ffb8; }
.feedback.wrong { background: #ffdfe0; }
.feedback-inner { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.feedback-icon {
  width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff; flex-shrink: 0;
}
.feedback.right .feedback-icon { background: var(--green-dark); }
.feedback.wrong .feedback-icon { background: var(--red); }
.feedback-text { flex: 1; min-width: 0; }
.feedback-text strong { display: block; font-size: 16px; }
.feedback.right .feedback-text strong { color: var(--green-dark); }
.feedback.wrong .feedback-text strong { color: #c93c3c; }
.feedback-word { display: flex; align-items: baseline; gap: 12px; margin-top: 2px; }
.feedback-word .fw { font-size: 30px; font-weight: 800; letter-spacing: 2px; }
.feedback-word .fp { font-size: 16px; font-weight: 700; color: var(--gray); }
.feedback .btn { margin-top: 0; background: var(--green); }
.feedback.wrong .btn { background: var(--red); box-shadow: 0 4px 0 #d64545; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ===== 结果页 ===== */
.result { justify-content: center; align-items: center; text-align: center; }
.result-card { width: 100%; max-width: 360px; }
.result-emoji { font-size: 72px; margin-bottom: 12px; animation: pop .4s ease; }
.result-card h2 { font-size: 26px; margin-bottom: 22px; }
.result-score { display: flex; justify-content: center; gap: 14px; margin-bottom: 18px; }
.score-item {
  background: var(--bg-soft); border: 2px solid var(--gray-light); border-radius: 14px;
  padding: 16px 18px; min-width: 88px;
}
.score-item span { display: block; font-size: 26px; font-weight: 800; color: var(--green-dark); }
.score-item small { font-size: 12px; color: var(--gray); }
.result-wrongs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 10px; }
.result-wrongs .rw {
  background: #fff; border: 2px solid var(--gray-light); border-radius: 10px;
  padding: 6px 10px; font-size: 15px; font-weight: 700;
}
.result-wrongs .rw small { display: block; font-size: 10px; color: var(--gray); font-weight: 700; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* ===== 错题集页 ===== */
.wb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.wb-head h2 { font-size: 18px; flex: 1; text-align: center; }

.tabs { display: flex; background: var(--bg-soft); border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.tab {
  flex: 1; border: none; background: transparent; padding: 9px 4px; border-radius: 9px;
  font-weight: 800; color: var(--gray); cursor: pointer; font-size: 14px;
}
.tab.active { background: #fff; color: var(--green-dark); box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.tab .tab-count { color: var(--red); margin-left: 2px; }
.tab.active .tab-count { color: var(--red); }

.wb-list { flex: 1; min-height: 0; overflow-y: auto; }
.wb-item {
  display: flex; align-items: center; gap: 12px;
  border: 2px solid var(--gray-light); border-bottom-width: 4px; border-radius: var(--radius);
  background: #fff; padding: 10px 14px; margin-bottom: 8px;
}
.wb-word { width: 120px; flex-shrink: 0; }
.wb-word .w { font-size: 22px; font-weight: 800; letter-spacing: 1px; }
.wb-word .p { font-size: 12px; font-weight: 700; color: var(--gray); }
.wb-word .exp { font-size: 11px; font-weight: 600; color: var(--gray); line-height: 1.35; margin-top: 2px; }
.wb-meta { flex: 1; min-width: 0; font-size: 12px; color: var(--gray); font-weight: 600; }
.wb-meta .flags { display: flex; gap: 4px; margin-bottom: 2px; flex-wrap: wrap; }
.flag { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.flag-today { background: #ffe9e9; color: #c93c3c; }
.flag-repeated { background: #fff3e0; color: #b45309; }
.flag-longterm { background: #f3e9ff; color: #9333ea; }
.flag-fixed { background: #eafce0; color: var(--green-dark); }
.flag-unfixed { background: #ffdfe0; color: #c93c3c; }
.btn-del { background: transparent; color: var(--gray); border: none; font-size: 13px; font-weight: 800; cursor: pointer; padding: 8px; flex-shrink: 0; }
.btn-del:active { color: var(--red); }

.wb-empty { text-align: center; padding: 48px 0; color: var(--gray); font-size: 14px; font-weight: 700; }
.wb-footer { padding-top: 10px; }
.wb-tip { font-size: 12px; color: var(--gray); text-align: center; margin-top: 8px; }

/* ===== 危险按钮 ===== */
.btn-danger { background: var(--red); box-shadow: 0 4px 0 #d64545; }
.btn-danger:active { transform: translateY(3px); box-shadow: 0 1px 0 #d64545; }

/* ===== 手写米字格（Hanzi Writer 离线笔画校验）===== */
.hw-row { display: flex; justify-content: center; gap: 10px; margin: 8px 0 14px; flex-wrap: wrap; }
.hw-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hw-box {
  position: relative; border: 2px solid var(--gray-light); border-radius: 12px;
  background-color: #fff; touch-action: none; overflow: hidden;
  background-image:
    linear-gradient(to right, transparent calc(50% - 1px), rgba(255,91,91,.18) calc(50% - 1px), rgba(255,91,91,.18) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(to bottom, transparent calc(50% - 1px), rgba(255,91,91,.18) calc(50% - 1px), rgba(255,91,91,.18) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(45deg, transparent calc(50% - 1px), rgba(255,91,91,.12) calc(50% - 1px), rgba(255,91,91,.12) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(-45deg, transparent calc(50% - 1px), rgba(255,91,91,.12) calc(50% - 1px), rgba(255,91,91,.12) calc(50% + 1px), transparent calc(50% + 1px));
}
.hw-box.active { border-color: var(--blue); box-shadow: 0 0 0 3px #ddf4ff; }
.hw-box.done { border-color: var(--green); background-color: #f6ffed; }
.hw-box.miss { border-color: var(--red); background-color: #fff5f5; }
.hw-status { font-size: 12px; font-weight: 800; color: var(--gray); }
.hw-box.active ~ .hw-status { color: var(--blue); }
.hw-box.done ~ .hw-status { color: var(--green-dark); }
.hw-box.miss ~ .hw-status { color: #c93c3c; }
.hw-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--gray); font-size: 13px; font-weight: 700; text-align: center; padding: 4px;
}
.hw-tip { text-align: center; font-size: 12px; color: var(--gray); font-weight: 700; margin-bottom: 8px; }

/* ===== 自由手写画板（本地 RapidOCR 识别）===== */
.free-row { display: flex; justify-content: center; gap: 10px; margin: 8px 0 14px; flex-wrap: wrap; }
.free-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.free-box {
  position: relative; border: 2px solid var(--gray-light); border-radius: 12px;
  background-color: #fff; touch-action: none; overflow: hidden;
  background-image:
    linear-gradient(to right, transparent calc(50% - 1px), rgba(255,91,91,.18) calc(50% - 1px), rgba(255,91,91,.18) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(to bottom, transparent calc(50% - 1px), rgba(255,91,91,.18) calc(50% - 1px), rgba(255,91,91,.18) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(45deg, transparent calc(50% - 1px), rgba(255,91,91,.12) calc(50% - 1px), rgba(255,91,91,.12) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(-45deg, transparent calc(50% - 1px), rgba(255,91,91,.12) calc(50% - 1px), rgba(255,91,91,.12) calc(50% + 1px), transparent calc(50% + 1px));
}
.free-box canvas { display: block; position: relative; z-index: 2; touch-action: none; cursor: crosshair; }
.free-ghost {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  color: #d0d0d0; font-weight: 800; line-height: 1;
  pointer-events: none; user-select: none;
}
.free-box.right { border-color: var(--green); }
.free-box.wrong { border-color: var(--red); }
.free-meta { display: flex; align-items: center; gap: 8px; }
.free-status { font-size: 12px; font-weight: 800; color: var(--gray); }
.free-box.right ~ .free-meta .free-status { color: var(--green-dark); }
.free-box.wrong ~ .free-meta .free-status { color: #c93c3c; }
.free-clear {
  border: none; background: transparent; padding: 0; cursor: pointer;
  font-size: 12px; font-weight: 700; color: var(--blue);
}
.free-clear:active { opacity: .6; }

/* ===== 设置页 ===== */
.screen.settings { padding-top: 16px; }
.settings-tip { margin-top: 8px; font-size: 12px; color: var(--gray); line-height: 1.6; }

/* ===== 登录 / 注册页 ===== */
.screen.auth { justify-content: center; }
.brand-center { justify-content: center; text-align: left; margin-bottom: 18px; }
.auth-card { width: 100%; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.auth-tab {
  flex: 1; border: 2px solid var(--gray-light); border-bottom-width: 4px; border-radius: 12px;
  background: #fff; color: var(--gray); font-size: 15px; font-weight: 800; padding: 10px 0; cursor: pointer;
}
.auth-tab.active { border-color: var(--green); background: #f3fbec; color: var(--green-dark); }
.auth-form { display: flex; flex-direction: column; }
.field > input[type="text"], .field > input[type="password"] {
  width: 100%; font-size: 16px; font-family: inherit; color: var(--ink);
  padding: 12px 14px; border: 2px solid var(--gray-light); border-bottom-width: 4px;
  border-radius: 12px; background: var(--bg-soft);
}
.field > input:focus { outline: none; border-color: var(--blue); background: #fff; }
.auth-error { min-height: 20px; font-size: 13px; font-weight: 700; color: var(--red); margin: 6px 0 0; }
.auth-error.ok { color: var(--green-dark); }
.auth-tip { margin-top: 16px; font-size: 12px; color: var(--gray); line-height: 1.6; text-align: center; }

/* ===== 设置页账号区 ===== */
.account-field { border-top: 2px dashed var(--gray-light); padding-top: 16px; margin-top: 18px; }
.account-line { font-size: 14px; margin-bottom: 6px; }
.account-line strong { color: var(--green-dark); }
.sync-state { font-size: 12px; color: var(--gray); margin-bottom: 10px; }
.sync-state.err { color: var(--red); }
.pw-row { display: flex; flex-direction: column; gap: 8px; }
.pw-row input {
  width: 100%; font-size: 15px; font-family: inherit; color: var(--ink);
  padding: 10px 12px; border: 2px solid var(--gray-light); border-bottom-width: 3px; border-radius: 12px;
}

/* ===== 小屏适配 ===== */
@media (max-width: 380px) {
  .tile, .tile .tile-box { width: 56px; }
  .tile .tile-box { height: 56px; font-size: 28px; }
  .opt-cell { width: 54px; height: 54px; font-size: 26px; }
  .pinyin-display { font-size: 26px; }
  .wb-word { width: 96px; }
}
