/* =========================================================
   越南语学习 App — 样式
   视觉方向：纸张 + 漆器绿 + 赭黄；声调曲线作为签名元素
   ========================================================= */

:root {
  /* 中性基底 */
  --paper: #EFECE1;
  --paper-deep: #E6E2D4;
  --card: #FBF9F1;
  --ink: #16201B;
  --ink-soft: #4C574E;
  --ink-faint: #7E877C;
  --line: #D5D3C1;
  --line-soft: #E4E1D1;

  /* 主题色 */
  --jade: #0E5B49;
  --jade-deep: #073B31;
  --jade-soft: #D3E0D8;
  --ochre: #D8A02A;
  --ochre-soft: #F2E4C2;
  --coral: #C2452C;
  --coral-soft: #F2DAD3;

  /* 声调色 */
  --t-ngang: #7C857A;
  --t-sac: #C2452C;
  --t-huyen: #A9752A;
  --t-hoi: #2C7A66;
  --t-nga: #5C5A8E;
  --t-nang: #2A2B26;

  --vn: "Be Vietnam Pro", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --zh: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;

  --shadow-card: 0 1px 0 rgba(22, 32, 27, 0.04), 0 6px 20px -12px rgba(22, 32, 27, 0.28);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper-deep);
  color: var(--ink);
  font-family: var(--zh);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}

/* 手机外壳：桌面上也保持一段手机宽度的版面 */
#app {
  width: 100%;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}
.shell {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  /* 底部统一留出固定底栏的高度，任何页面都不再单独补 padding，避免最后一行被压住 */
  padding-bottom: calc(74px + env(safe-area-inset-bottom));
  box-shadow: 0 0 0 1px rgba(22, 32, 27, 0.06);
}

@media (min-width: 520px) {
  .shell {
    margin: 18px 0;
    min-height: calc(100vh - 36px);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 22px 60px -30px rgba(22,32,27,.5);
  }
}

/* ---------------- 基础排版 ---------------- */
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }

.vn { font-family: var(--vn); }
.label {
  font-family: var(--vn);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------------- 顶部 ---------------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px 10px;
  padding-top: max(14px, env(safe-area-inset-top));
}

.brand {
  display: flex;
  align-items: center;
  color: var(--jade-deep);
  flex: none;
  white-space: nowrap;
}

/* 字标：朱印图形标 + 字标，图形标用 em 跟随字号缩放 */
.brandmark {
  position: relative;
  display: inline-block;
  font-family: var(--vn);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--jade-deep);
  white-space: nowrap;
}
.brandmark .wm-nib {
  position: absolute;
  left: -0.13em;
  top: 0.04em;
  width: 0.09em;
  height: 0.36em;
  background: var(--coral);
}
.brandmark .wm-bead {
  position: absolute;
  right: -0.32em;
  top: 0.64em;
  width: 0.19em;
  height: 0.19em;
  border-radius: 50%;
  background: var(--ochre);
}
.brandmark.is-sm { font-size: 20px; }
.brandmark.is-hero { font-size: 50px; }

.chip-row { margin-left: auto; display: flex; gap: 5px; flex: 0 1 auto; min-width: 0; justify-content: flex-end; }

/* 胶囊一律不换行：高度固定，文字一旦折行就会被挤成两排（旧版顶部跳行即此） */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 27px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-family: var(--vn);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  flex: none;
  overflow: hidden;
}
.chip .chip-unit { font-size: 10.5px; font-weight: 600; opacity: .72; letter-spacing: .01em; }
.chip .chip-num { font-variant-numeric: tabular-nums; }
.chip.chip-hi { background: var(--ochre-soft); border-color: #E3CE9C; color: #7A5310; }
.chip-dir {
  background: var(--jade-deep);
  border-color: var(--jade-deep);
  color: #F4EFE2;
  font-weight: 600;
  padding: 0 10px;
  gap: 4px;
}
.chip-dir:active { background: var(--jade); }
.chip-dir span { letter-spacing: 0.02em; }

/* 极窄屏（≤352px）再收一档：方向胶囊只留切换图标，其余留白与字距收紧，避免三枚胶囊挤到字标 */
@media (max-width: 352px) {
  .topbar { gap: 8px; padding: 14px 14px 10px; padding-top: max(14px, env(safe-area-inset-top)); }
  .chip-dir .cd-txt { display: none; }
  .chip { padding: 0 7px; gap: 3px; font-size: 11.5px; }
  .chip .chip-unit { font-size: 10px; letter-spacing: 0; }
}

/* ---------------- 首页 Hero ---------------- */
.hero {
  position: relative;
  padding: 6px 18px 20px;
  overflow: hidden;
}

.hero-glyph {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  padding-top: 4px;
  color: var(--jade-deep);
}

.hero-glyph .glyph-accent { color: var(--coral); }

.hero-desc {
  margin-top: 10px;
  max-width: 320px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.hero-desc .hd-num { font-size: 13.5px; color: var(--ink-soft); }
.hero-desc .hd-next { font-size: 12.5px; color: var(--ink-soft); opacity: .85; }

/* 章节区隔标题：场景学习（两端渐隐细线 + 两侧枝叶小花） */
.sec-cap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 16px 18px 8px;
}
.sec-cap::before, .sec-cap::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(14, 91, 73, 0), rgba(14, 91, 73, .20));
}
.sec-cap::after {
  background: linear-gradient(270deg, rgba(14, 91, 73, 0), rgba(14, 91, 73, .20));
}
.sec-cap .sc-t {
  flex: none;
  font-family: var(--zh);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--jade-deep);
  padding: 0 2px;
}
.sec-cap .sc-sprig { flex: none; display: flex; align-items: center; }
.sec-cap .sc-sprig.is-r { transform: scaleX(-1); }
.sec-cap .sc-svg { display: block; width: 52px; height: auto; }

.hero-curve {
  position: absolute;
  right: -46px;
  top: -26px;
  width: 122px;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.today-card {
  margin: 0 18px 8px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--jade-deep);
  color: #F3F1E4;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-card);
}
.today-card .tc-label {
  font-family: var(--vn);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #A8C0B4;
}
.today-card .tc-main { font-size: 14px; font-weight: 700; margin-top: 3px; }
.today-card .tc-sub { font-size: 11.5px; color: #B9CEC3; margin-top: 3px; }
.today-card .tc-ring { margin-left: auto; flex: none; }

/* ---------------- 单元与课程路径 ---------------- */
.path { padding: 6px 18px 26px; display: flex; flex-direction: column; gap: 26px; }

.unit { display: flex; flex-direction: column; gap: 12px; }

.unit-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.unit-no {
  font-family: var(--vn);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--jade);
  padding: 2px 6px;
  border: 1px solid var(--jade-soft);
  border-radius: 6px;
  background: var(--jade-soft);
  flex: none;
}

.unit-titles { min-width: 0; }
.unit-title { font-size: 16.5px; line-height: 1.3; }
.unit-vi {
  font-family: var(--vn);
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 2px;
}
.unit-blurb { font-size: 12px; color: var(--ink-soft); line-height: 1.6; margin-top: 5px; }

.unit-sig { margin-left: auto; flex: none; opacity: .55; }

.lesson-list { display: flex; flex-direction: column; }

.lesson-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--zh);
  color: inherit;
  border-radius: var(--r-sm);
}
.lesson-row:active { background: rgba(14, 91, 73, 0.05); }
.lesson-row[disabled] { cursor: default; opacity: .46; }

.lesson-rail {
  position: relative;
  flex: none;
  width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lesson-node {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--vn);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-faint);
  position: relative;
  z-index: 1;
}
.lesson-node.is-done { background: var(--jade); border-color: var(--jade); color: #F5F3E7; }
.lesson-node.is-next { background: var(--card); border-color: var(--jade); color: var(--jade); box-shadow: 0 0 0 4px var(--jade-soft); }

.lesson-body { min-width: 0; flex: 1; }
.lesson-title { font-size: 14px; font-weight: 600; line-height: 1.4; }
.lesson-meta {
  font-family: var(--vn);
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 2px;
  display: flex;
  gap: 7px;
  align-items: center;
}
.lesson-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line); }

.lesson-go { flex: none; color: var(--ink-faint); }

/* ---------------- 通用卡片 / 按钮 ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 16px;
}

.btn {
  appearance: none;
  border: 1px solid var(--jade);
  background: var(--jade);
  color: #F6F4E8;
  height: 50px;
  border-radius: var(--r-sm);
  font-family: var(--zh);
  font-size: 15px;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease;
}
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: .45; cursor: default; }
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line);
}
.btn-quiet {
  background: transparent;
  border: 0;
  color: var(--ink-soft);
  height: 44px;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--zh);
}

/* ---------------- 课程页 ---------------- */
.lesson-view { display: flex; flex-direction: column; min-height: 100vh; }
@media (min-width: 520px) { .lesson-view { min-height: calc(100vh - 36px); } }

.lesson-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px 12px;
  padding: 14px 16px 8px;
  padding-top: max(14px, env(safe-area-inset-top));
}
.heart-row { display: inline-flex; align-items: center; gap: 5px; }
.heart-row .heart { color: var(--coral); display: flex; }
.heart-row .heart.is-off { color: #C9C6B4; }
.heart-row .heart-inf {
  font-family: var(--vn); font-size: 15px; font-weight: 700; color: var(--ink-faint);
  padding: 0 2px;
}
.lt-hearts { justify-self: start; }
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  display: grid; place-items: center;
  color: var(--ink-soft);
  cursor: pointer;
  flex: none;
}
.icon-btn:active { background: rgba(22,32,27,.06); }

.progress-track {
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: var(--paper-deep);
  overflow: hidden;
}
.lt-bar { grid-column: 1 / -1; height: 5px; }

/* 连击 */
.combo-pill {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 9px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--card);
  font-family: var(--vn); font-size: 11.5px; font-weight: 700; color: var(--ink-faint);
}
.combo-pill.is-hot {
  border-color: var(--ochre); background: var(--ochre-soft); color: #8A5B0B;
  animation: comboPop .4s cubic-bezier(.2,1.4,.4,1) both;
}
@keyframes comboPop { 0% { transform: scale(.86); } 55% { transform: scale(1.1); } 100% { transform: scale(1); } }
.progress-fill {
  height: 100%;
  background: var(--jade);
  border-radius: 99px;
  transition: width .35s cubic-bezier(.4,.9,.3,1);
}

.lesson-stage { flex: 1; padding: 10px 18px 18px; display: flex; flex-direction: column; }

.q-label { margin-bottom: 12px; }
.quiz-meta { font-size: 11px; letter-spacing: .04em; color: var(--ink-faint); margin-bottom: 7px; }

/* 学习卡 */
.study-card { display: flex; flex-direction: column; gap: 0; flex: 1; }

.vi-line {
  font-family: var(--vn);
  font-size: 31px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 6px 0 2px;
  color: var(--ink);
}

.w {
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  white-space: pre;
}
.w[data-tone="ngang"] { border-bottom-color: var(--t-ngang); }
.w[data-tone="sac"]   { border-bottom-color: var(--t-sac); }
.w[data-tone="huyen"] { border-bottom-color: var(--t-huyen); }
.w[data-tone="hoi"]   { border-bottom-color: var(--t-hoi); }
.w[data-tone="nga"]   { border-bottom-color: var(--t-nga); }
.w[data-tone="nang"]  { border-bottom-color: var(--t-nang); }
.w[data-tone="none"]  { border-bottom-color: transparent; }

.audio-row { display: flex; gap: 8px; margin-top: 14px; }
.audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-family: var(--zh);
  font-size: 12.5px;
  cursor: pointer;
}
.audio-btn:active { background: var(--jade-soft); }
.audio-btn.accent { border-color: var(--jade-soft); background: var(--jade-soft); color: var(--jade-deep); }

.zh-line {
  margin-top: 20px;
  padding: 13px 15px;
  border-left: 3px solid var(--ochre);
  background: #F7F2E2;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
}

.note-block { margin-top: 14px; }
.note-block .label { margin-bottom: 6px; display: block; }
.note-text { font-size: 13px; line-height: 1.85; color: var(--ink-soft); }

/* 声调条 */
.tone-strip {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tone-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px 5px 7px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line-soft);
}
.tone-chip .syl { font-family: var(--vn); font-size: 12.5px; font-weight: 600; }
.tone-chip .tname { font-size: 10.5px; color: var(--ink-faint); }

.tone-svg { display: block; }

/* ---------------- 练习 ---------------- */
.quiz { display: flex; flex-direction: column; flex: 1; }

.q-prompt {
  font-family: var(--vn);
  font-size: 27px;
  font-weight: 600;
  line-height: 1.42;
  letter-spacing: -0.01em;
  margin: 4px 0 6px;
}
.q-prompt-zh {
  font-family: var(--zh);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.5;
  margin: 4px 0 6px;
}

.audio-target {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px 0 22px;
}
.big-audio {
  width: 88px; height: 88px;
  border-radius: 50%;
  border: 1px solid var(--jade);
  background: var(--card);
  display: grid; place-items: center;
  color: var(--jade-deep);
  cursor: pointer;
  box-shadow: 0 8px 24px -16px rgba(14,91,73,.7);
}
.big-audio:active { background: var(--jade-soft); }
.audio-target .hint { font-size: 11.5px; color: var(--ink-faint); }

.options { display: flex; flex-direction: column; gap: 9px; margin-top: 6px; }
.option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--card);
  font-family: var(--vn);
  font-size: 15px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.option.opt-zh { font-family: var(--zh); font-size: 14px; line-height: 1.5; }
.option:active { background: var(--paper-deep); }
.option.is-selected { border-color: var(--jade); background: var(--jade-soft); }
.option.is-correct { border-color: var(--jade); background: #DFEBE2; }
.option.is-wrong { border-color: var(--coral); background: var(--coral-soft); }
.option.is-dim { opacity: .5; }

/* 填空题 */
.fill-line {
  font-family: var(--vn);
  font-size: 27px;
  font-weight: 600;
  line-height: 1.5;
  margin: 8px 0 4px;
}
.fill-blank {
  display: inline-block;
  min-width: 74px;
  border-bottom: 2px solid var(--jade);
  text-align: center;
  color: var(--jade);
}
.fill-blank.empty { color: transparent; }

/* 排序题 */
.order-answer {
  min-height: 78px;
  border: 1px dashed var(--line);
  border-radius: var(--r-sm);
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-content: flex-start;
  background: var(--card);
}
.order-bank {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px;
  border-radius: var(--r-sm);
  background: var(--paper-deep);
}
.token {
  font-family: var(--vn);
  font-size: 14.5px;
  padding: 7px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.token:active { transform: translateY(1px); }
.token.used { opacity: .32; pointer-events: none; }

/* 反馈条 */
.feedback {
  margin-top: auto;
  padding: 14px 16px 18px;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.feedback.ok { border-top-color: var(--jade); }
.feedback.bad { border-top-color: var(--coral); }
.fb-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; margin-bottom: 7px;
}
.fb-head.ok { color: var(--jade); }
.fb-head.bad { color: var(--coral); }
.fb-body { font-family: var(--vn); font-size: 13.5px; line-height: 1.7; color: var(--ink); }
.fb-body .zh { font-family: var(--zh); color: var(--ink-soft); font-size: 12.5px; display: block; margin-top: 5px; line-height: 1.8; }
/* 反馈区解释（越南人学中文时是越南语 noteVi；中→越方向是中文用法提示），与中文答案分行 */
.fb-body .fb-note { margin-top: 7px; font-family: var(--vn); font-size: 12.5px; line-height: 1.65; color: var(--ink-soft); }
.fb-body .pyz .pyz-p { line-height: 1.25; }
.fb-actions { margin-top: 12px; display: flex; gap: 8px; }

/* ---------------- 结算 ---------------- */
.result { padding: 30px 22px 26px; display: flex; flex-direction: column; align-items: center; gap: 0; text-align: center; }
.result-title { font-size: 22px; margin-top: 18px; }
.result-vi { font-family: var(--vn); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); margin-top: 6px; }
.result-score { font-family: var(--vn); font-size: 58px; font-weight: 700; line-height: 1; margin-top: 24px; color: var(--jade-deep); }
.result-score .pct { font-size: 22px; color: var(--ink-soft); }
.result-stats {
  display: flex; gap: 0; width: 100%; margin-top: 22px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.result-stats > div { flex: 1; padding: 13px 4px; }
.result-stats .rs-n { font-family: var(--vn); font-size: 19px; font-weight: 700; }
.result-stats .rs-l { font-size: 11px; color: var(--ink-faint); margin-top: 3px; }
.result-stats > div:not(:first-child) { border-left: 1px solid var(--line); }
.result-actions { width: 100%; margin-top: 26px; display: flex; flex-direction: column; gap: 9px; }
.result-glance { margin-top: 20px; text-align: left; width: 100%; }
.result-glance .label { margin-bottom: 8px; }
.result-glance li { list-style: none; padding: 7px 0; border-bottom: 1px dashed var(--line-soft); font-family: var(--vn); font-size: 13.5px; }
.result-glance li span { font-family: var(--zh); color: var(--ink-soft); font-size: 12px; display: block; margin-top: 2px; }

/* ---------------- 速查 ---------------- */
.page-head { padding: 4px 18px 12px; }
.page-title { font-size: 21px; }
.page-sub { font-size: 12.5px; color: var(--ink-soft); line-height: 1.7; margin-top: 6px; }

.search-wrap { padding: 0 18px 12px; position: sticky; top: 0; background: var(--paper); z-index: 3; padding-top: 2px; }
.search-row { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 0 12px; height: 42px; }
.search-row svg { flex: none; color: var(--ink-faint); }
.search-input {
  flex: 1; border: 0; background: transparent; outline: none;
  font-family: var(--zh); font-size: 14px; color: var(--ink); height: 100%;
}
.filter-row { display: flex; gap: 6px; margin-top: 9px; overflow-x: auto; padding-bottom: 2px; }
.filter-row::-webkit-scrollbar { display: none; }
.filter {
  flex: none; height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card);
  font-family: var(--zh); font-size: 12px; color: var(--ink-soft); cursor: pointer;
}
.filter.active { background: var(--jade-deep); border-color: var(--jade-deep); color: #F5F3E7; }

.book-list { padding: 4px 18px 8px; display: flex; flex-direction: column; gap: 9px; }
.book-item { padding: 12px 14px; border-radius: var(--r-sm); background: var(--card); border: 1px solid var(--line-soft); }
.book-item .bi-vi { font-family: var(--vn); font-size: 16px; font-weight: 600; line-height: 1.45; }
.book-item .bi-zh { font-size: 13px; color: var(--ink-soft); margin-top: 3px; }
.book-item .bi-note { font-size: 11.5px; color: var(--ink-faint); line-height: 1.75; margin-top: 6px; display: none; }
.book-item.open .bi-note { display: block; }
.bi-top { display: flex; align-items: flex-start; gap: 8px; }
.bi-play {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--jade);
  display: grid; place-items: center; cursor: pointer; margin-left: auto;
}
.empty-state { padding: 40px 18px; text-align: center; color: var(--ink-faint); font-size: 13px; line-height: 1.8; }

/* ---------------- 发音页 ---------------- */
.tone-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 0 18px 10px; }
.tone-card {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; gap: 6px;
}
.tone-card .tc-top { display: flex; align-items: baseline; gap: 6px; }
.tone-card .tc-zh { font-size: 14px; font-weight: 700; }
.tone-card .tc-mark { font-family: var(--vn); font-size: 16px; color: var(--ink-faint); margin-left: auto; }
.tone-card .tc-ex { font-family: var(--vn); font-size: 19px; font-weight: 600; }
.tone-card .tc-ex-zh { font-size: 11px; color: var(--ink-faint); }
.tone-card .tc-desc { font-size: 11.5px; line-height: 1.7; color: var(--ink-soft); }
.tone-card:active { background: var(--paper-deep); }

.section-gap { height: 22px; }
.sec-head { padding: 0 18px 10px; display: flex; align-items: baseline; gap: 8px; }
.sec-head h2 { font-size: 15px; }
.sec-head .label { margin-left: auto; }
/* 去掉大标题后：统计小字靠左，问号靠右，顶部留出呼吸 */
.sec-head.is-plain { padding-top: 14px; }
.sec-head.is-plain .label { margin-left: 0; }
.sec-head.is-plain .label:empty { display: none; }
.sec-head.is-plain .hint-q { margin-left: auto; }
.me .page-head.ph-flush.is-plain { display: flex; justify-content: flex-end; padding: 4px 0 2px; }
.me .page-head.is-plain .hint-q { position: static; }

.letter-list { padding: 0 18px; display: flex; flex-direction: column; gap: 0; }
.letter-row { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); align-items: flex-start; }
.letter-glyph { font-family: var(--vn); font-size: 19px; font-weight: 700; width: 64px; flex: none; color: var(--jade-deep); }
.letter-body { min-width: 0; }
.letter-read { font-size: 12.5px; font-weight: 600; }
.letter-note { font-size: 11.5px; color: var(--ink-soft); line-height: 1.75; margin-top: 3px; }
.letter-ex { font-family: var(--vn); font-size: 11.5px; color: var(--ink-faint); margin-top: 3px; }

.rule-list { padding: 0 18px; display: flex; flex-direction: column; gap: 9px; }
.rule { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-md); overflow: hidden; }
.rule-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 13px 14px; border: 0; background: none; cursor: pointer; text-align: left; font-family: var(--zh); font-size: 13.5px; font-weight: 600; color: var(--ink); }
.rule-btn span { margin-left: auto; color: var(--ink-faint); font-family: var(--vn); }
.rule-body { padding: 0 14px 14px; font-size: 12.5px; line-height: 1.9; color: var(--ink-soft); display: none; }
.rule.open .rule-body { display: block; }

/* ---------------- 我的 ---------------- */
.me { padding: 0 18px 26px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.stat-card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 13px 14px; }
.stat-card .sc-n {
  font-family: var(--vn); font-size: 26px; font-weight: 700; line-height: 1.1; color: var(--jade-deep);
  white-space: nowrap; overflow: hidden; text-overflow: clip; font-variant-numeric: tabular-nums;
}
.stat-card .sc-l { font-size: 11.5px; color: var(--ink-faint); margin-top: 4px; }

.setting-group { margin-top: 22px; }
.setting-group .label { display: block; margin-bottom: 9px; }
.setting-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.setting-row .sr-title { font-size: 13.5px; font-weight: 600; }
.setting-row .sr-sub { font-size: 11.5px; color: var(--ink-faint); margin-top: 3px; line-height: 1.6; }
.setting-row .sr-ctrl { margin-left: auto; flex: none; }
.select {
  height: 34px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); font-family: var(--zh); font-size: 12px; color: var(--ink); padding: 0 8px; max-width: 170px;
}
.switch { width: 46px; height: 27px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper-deep); position: relative; cursor: pointer; }
.switch.on { background: var(--jade); border-color: var(--jade); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 21px; height: 21px; border-radius: 50%; background: var(--card); transition: transform .18s ease; }
.switch.on::after { transform: translateX(19px); }

.range { width: 130px; accent-color: var(--jade); }

/* 复习入口卡 */
.review-card {
  margin-top: 14px; padding: 15px 16px; border-radius: var(--r-md);
  background: var(--ochre-soft); border: 1px solid #E3CE9C;
  display: flex; align-items: center; gap: 12px;
}
.review-card .rc-t { font-size: 13.5px; font-weight: 700; color: #6E4A0D; }
.review-card .rc-s { font-size: 11.5px; color: #8A6519; margin-top: 3px; line-height: 1.6; }
.review-card button { margin-left: auto; flex: none; height: 38px; padding: 0 14px; border-radius: 8px; border: 1px solid #C79A38; background: #FFFDF4; color: #6E4A0D; font-family: var(--zh); font-size: 12.5px; font-weight: 600; cursor: pointer; }

/* ---------------- 底部导航 ---------------- */
.bottombar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 440px;
  z-index: 5;
  display: flex;
  background: rgba(251, 249, 241, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.page { padding-bottom: 0; }
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 8px; margin: 6px 5px 2px; border: 0; border-radius: 15px; background: none; cursor: pointer;
  color: var(--ink-faint); font-family: var(--zh); font-size: 10.5px;
}
.nav-item.active { color: var(--jade-deep); font-weight: 700; background: var(--jade-soft); }
.nav-item.active .nav-ico { color: var(--jade); }
.nav-ico { display: grid; place-items: center; height: 22px; }

/* ---------------- 动效 ---------------- */
@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.animate-in { animation: riseIn .28s cubic-bezier(.3,.9,.3,1) both; }

@keyframes pulseRing { 0% { transform: scale(0.95); opacity: .7; } 70% { transform: scale(1.12); opacity: 0; } 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .animate-in { animation: none; }
  .progress-fill { transition: none; }
  .switch::after { transition: none; }
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------- 语音缺失提示 ---------------- */
.voice-warn {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin: 2px 0 4px;
  background: var(--ochre-soft); border: 1px solid #E3CE9C; border-left: 3px solid var(--ochre);
  border-radius: 10px; font-size: 11.5px; line-height: 1.65; color: #6E4A0D;
}
.voice-warn button {
  flex: none; margin-left: auto; height: 30px; padding: 0 10px;
  border-radius: 7px; border: 1px solid #C79A38; background: #FFFDF4;
  color: #6E4A0D; font-family: var(--zh); font-size: 11.5px; font-weight: 600; cursor: pointer;
}

.voice-setup {
  margin: 0 18px 16px; padding: 15px 16px;
  background: #FBF6E7; border: 1px solid #E3CE9C; border-left: 3px solid var(--ochre);
  border-radius: var(--r-md);
}
.voice-setup.ok { background: #EFF5F1; border-color: #B7CFC5; border-left-color: var(--jade); }
.voice-setup .vs-head {
  display: flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 700; color: #6E4A0D;
}
.voice-setup.ok .vs-head { color: var(--jade-deep); }
.voice-setup .vs-body { font-size: 12px; line-height: 1.8; color: var(--ink-soft); margin-top: 7px; }
.voice-setup .vs-list { margin: 8px 0 0; padding-left: 18px; font-size: 11.5px; line-height: 1.8; color: var(--ink-soft); }
.voice-setup .vs-list li { margin-bottom: 5px; }
.voice-setup .vs-actions { margin-top: 10px; }
.voice-setup .vs-actions button {
  height: 32px; padding: 0 14px; border-radius: 8px;
  border: 1px solid #C79A38; background: #FFFDF4; color: #6E4A0D;
  font-family: var(--zh); font-size: 12px; font-weight: 600; cursor: pointer;
}
.voice-setup.ok .vs-actions button { border-color: #B7CFC5; background: #FFF; color: var(--jade-deep); }

.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  z-index: 30; width: min(398px, calc(100vw - 36px));
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px; border-radius: 12px;
  background: rgba(7, 59, 49, 0.96); color: #F1EEE2;
  box-shadow: 0 10px 28px -14px rgba(7, 59, 49, 0.7);
  font-size: 12px; line-height: 1.6;
  /* 单独一套关键帧：动画里必须带 translateX(-50%)，否则收尾会把居中位移吃掉、整条甩出右缘 */
  animation: toastIn .22s ease both;
}
.toast > span {
  flex: 1 1 auto; min-width: 0;
  word-break: break-word; white-space: normal;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.toast button {
  flex: none; margin-left: auto; height: 28px; padding: 0 10px;
  border-radius: 7px; border: 1px solid rgba(241, 238, 226, 0.45);
  background: transparent; color: #F1EEE2;
  font-family: var(--zh); font-size: 11.5px; font-weight: 600; cursor: pointer;
}

/* ---------------- 游戏层：星级 / 连击 / 徽章 ---------------- */
.fb-head { display: flex; align-items: center; gap: 6px; }
.fb-xp {
  margin-left: auto; font-family: var(--vn); font-size: 11.5px; font-weight: 700;
  padding: 2px 8px; border-radius: 99px;
  background: rgba(14, 91, 73, 0.1); color: var(--jade-deep);
}
.fb-life {
  margin-left: auto; display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--coral);
}

.star-row { display: flex; gap: 8px; margin-top: 16px; }
.star-row .star { color: #CFCBB8; display: flex; }
.star-row .star.is-on { color: var(--ochre); animation: starIn .45s cubic-bezier(.2,1.5,.4,1) both; }
.star-row .star.is-on:nth-child(2) { animation-delay: .1s; }
.star-row .star.is-on:nth-child(3) { animation-delay: .2s; }
@keyframes starIn { 0% { transform: scale(.4) rotate(-14deg); opacity: 0; } 100% { transform: none; opacity: 1; } }

.mini-stars { display: inline-flex; gap: 2px; align-items: center; }
.mini-stars .ms { color: #CFCBB8; display: flex; }
.mini-stars .ms.is-on { color: var(--ochre); }

.result-top { margin-top: 6px; }
.result.is-fail { background: linear-gradient(180deg, #FBF1EE 0%, var(--card) 42%); }
.fail-mark { color: #D8CFC3; margin-top: 4px; }
.fail-mark svg { width: 52px; height: 52px; }
.result-sub { font-size: 12.5px; color: var(--ink-soft); line-height: 1.85; margin-top: 10px; max-width: 300px; }
.badge-hit {
  display: flex; align-items: center; gap: 8px; width: 100%;
  margin-top: 12px; padding: 10px 12px; border-radius: 10px;
  background: var(--ochre-soft); border: 1px solid #E3CE9C; color: #6E4A0D;
  font-size: 12.5px; font-weight: 600;
}
.badge-hit svg { color: #B8860B; }

/* 彩带 */
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti span {
  position: absolute; top: -12px; width: 6px; height: 10px; border-radius: 1px;
  opacity: 0; animation: confFall 2.6s cubic-bezier(.3,.6,.5,1) both;
}
@keyframes confFall {
  0% { opacity: 1; transform: translateY(-10px) rotate(0deg); }
  100% { opacity: 0; transform: translateY(320px) rotate(300deg); }
}

/* 等级条 */
.level-strip { display: flex; align-items: center; gap: 10px; padding: 12px 18px 0; }
.lv-badge {
  flex: none; font-family: var(--vn); font-size: 11.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 99px; background: var(--jade); color: #F3F0E4;
}
.lv-track { flex: 1; height: 5px; border-radius: 99px; background: var(--paper-deep); overflow: hidden; }
.lv-fill { height: 100%; background: var(--jade); border-radius: 99px; transition: width .35s ease; }
.lv-text { flex: none; font-size: 10.5px; color: var(--ink-faint); }

/* 今日任务 */
.quest-card {
  margin: 14px 18px 0; padding: 14px 15px;
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-md);
}
.qc-head { display: flex; align-items: baseline; font-size: 13px; font-weight: 700; }
.qc-head .qc-count { margin-left: auto; font-family: var(--vn); font-size: 11.5px; color: var(--ink-faint); }
.qc-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.qc-list li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-soft); }
.qc-list li.is-done { color: var(--jade-deep); }
.qc-dot {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  border: 1px solid var(--line); display: grid; place-items: center; color: #fff;
}
.qc-list li.is-done .qc-dot { background: var(--jade); border-color: var(--jade); }
.qc-hint { margin-top: 11px; font-size: 11px; color: var(--ink-faint); line-height: 1.7; }
.qc-chest {
  margin-top: 12px; width: 100%; height: 38px; border-radius: 9px;
  border: 1px solid #C79A38; background: #FFF7DF; color: #6E4A0D;
  font-family: var(--zh); font-size: 12.5px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  animation: chestGlow 1.9s ease-in-out infinite;
}
.qc-chest.is-done { border-color: var(--line); background: transparent; color: var(--ink-faint); animation: none; font-weight: 600; }
@keyframes chestGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(216, 160, 42, 0); }
  50% { box-shadow: 0 0 0 4px rgba(216, 160, 42, 0.18); }
}

/* 极速挑战入口 */
.speed-card {
  margin: 10px 18px 0; padding: 13px 15px; width: calc(100% - 36px);
  display: flex; align-items: center; gap: 11px; text-align: left;
  background: var(--jade-deep); border: 0; border-radius: var(--r-md);
  color: #EFEADB; cursor: pointer; font-family: var(--zh);
}
.speed-card .sp-ico { color: var(--ochre); display: flex; }
.speed-card .sp-body { flex: 1; min-width: 0; }
.speed-card .sp-t { font-size: 13.5px; font-weight: 700; }
.speed-card .sp-s { font-size: 11px; color: rgba(239, 234, 219, .68); margin-top: 3px; }
.speed-card .sp-best {
  margin-left: auto; flex: 0 0 auto; white-space: nowrap; font-family: var(--vn); font-size: 11px;
  border: 1px solid rgba(239, 234, 219, .35); border-radius: 99px; padding: 5px 10px;
}

/* 单元挑战 */
.boss-row {
  margin-top: 9px; width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 12px 13px; text-align: left; cursor: pointer; font-family: var(--zh);
  background: #FBF6E7; border: 1px solid #E3CE9C; border-radius: var(--r-sm);
  color: #6E4A0D;
}
.boss-row.is-cleared { background: #EFF5F1; border-color: #B7CFC5; color: var(--jade-deep); }
.boss-row .boss-ico { display: flex; color: #B8860B; }
.boss-row.is-cleared .boss-ico { color: var(--jade); }
.boss-row .boss-t { font-size: 12.5px; font-weight: 700; }
.boss-row .boss-s { font-size: 10.5px; color: var(--ink-faint); margin-top: 2px; }
.boss-row .boss-go { margin-left: auto; color: var(--ink-faint); display: flex; }

/* 我的：迷你行 + 徽章墙 */
.mini-row {
  display: flex; align-items: center; margin-top: 12px;
  font-size: 11.5px; color: var(--ink-faint);
}
.mini-row .mr-v { margin-left: auto; font-family: var(--vn); font-weight: 700; color: var(--ink-soft); }

.badge-block { margin-top: 24px; }
.badge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* 分组头：成就一段（上面），单元一段（下面） */
.badge-sec { margin-top: 4px; }
.badge-sec + .badge-sec { margin-top: 20px; }
.badge-sec-h { display: flex; align-items: baseline; gap: 8px; padding: 2px 2px 9px; }
.badge-sec-h b { flex: none; font-size: 13.5px; color: var(--jade-deep); letter-spacing: .2px; }
.badge-sec-h .bsh-sub {
  flex: 1; min-width: 0; font-size: 10.5px; color: var(--ink-faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.badge-sec-h .bsh-n { flex: none; font-family: var(--vn); font-size: 11px; color: var(--ink-faint); }
/* 稀有度角标：铜 / 银 / 金 */
.bc-rar {
  position: absolute; top: 9px; right: 9px; z-index: 2;
  font-size: 9.5px; line-height: 1; font-weight: 700; letter-spacing: .4px;
  padding: 3px 5px; border-radius: 5px; border: 1px solid transparent;
}
.bc-rar.r1 { color: #8A5E28; background: rgba(200, 138, 60, .14); border-color: rgba(200, 138, 60, .28); }
.bc-rar.r2 { color: #5B6B69; background: rgba(110, 123, 122, .14); border-color: rgba(110, 123, 122, .26); }
.bc-rar.r3 { color: #8C6410; background: rgba(216, 160, 42, .22); border-color: rgba(216, 160, 42, .42); }
.badge-cell.is-off .bc-rar { opacity: .42; }
/* 单元章整体降一档，让上面那层成就更显眼 */
.badge-grid.is-unit .badge-cell { padding: 9px 11px 10px; }
.badge-grid.is-unit .badge-cell .bc-ico { width: 38px; height: 38px; margin-bottom: 7px; }
.badge-grid.is-unit .badge-cell .bc-t { font-size: 11.5px; }
.badge-grid.is-unit .badge-cell .bc-d { font-size: 10px; opacity: .82; }
/* 每格一枚徽章：左上是一枚自己的漆盘图章，卡片底铺自己主色的淡光斑，右下压一枚同款的小图当底纹 */
.badge-cell {
  position: relative; overflow: hidden; text-align: left; font: inherit;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 11px 12px 12px; border-radius: var(--r-md); cursor: pointer;
  background-color: var(--card);
  background-image: repeating-linear-gradient(135deg, rgba(22, 32, 27, .018) 0 5px, transparent 5px 11px);
  border: 1px solid var(--line-soft);
  color: var(--ink-faint); -webkit-tap-highlight-color: transparent;
}
.badge-cell::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .13; z-index: 0;
  background:
    radial-gradient(64% 58% at 86% 6%, var(--c1), transparent 72%),
    linear-gradient(158deg, transparent 52%, var(--c2) 100%);
}
/* 右下角溢出的大图：只露一段弧，像印在纸上的暗纹，和这一格讲的是同一件东西 */
.badge-cell::after {
  content: ""; position: absolute; right: -52px; bottom: -56px; width: 172px; height: 172px;
  pointer-events: none; z-index: 0; opacity: .085;
  background-image: var(--bg); background-repeat: no-repeat; background-size: contain;
  -webkit-filter: saturate(.9); filter: saturate(.9);
}
.badge-cell.is-off::before { opacity: .05; background: radial-gradient(64% 58% at 86% 6%, #8C8877, transparent 72%); }
.badge-cell.is-off::after { opacity: .055; -webkit-filter: grayscale(.92) brightness(.98); filter: grayscale(.92) brightness(.98); }
.badge-cell .bc-ico, .badge-cell .bc-t, .badge-cell .bc-d { position: relative; z-index: 1; }
.badge-cell:active { transform: scale(.985); }
.badge-cell.is-on { border-color: #E3CE9C; color: var(--ink); }
.badge-cell .bc-ico {
  width: 46px; height: 46px; border-radius: 50%; display: block; margin-bottom: 9px;
  -webkit-filter: drop-shadow(0 7px 11px rgba(22, 32, 27, .2)); filter: drop-shadow(0 7px 11px rgba(22, 32, 27, .2));
}
.badge-cell .bc-ico img { display: block; width: 100%; height: 100%; border-radius: 50%; }
.badge-cell.is-off .bc-ico { -webkit-filter: grayscale(.86) brightness(.86) opacity(.58); filter: grayscale(.86) brightness(.86) opacity(.58); }
.badge-cell .bc-t { font-size: 12.5px; font-weight: 700; }
.badge-cell.is-off .bc-t { color: var(--ink-soft); }
.badge-cell .bc-d { font-size: 10.5px; line-height: 1.55; margin-top: 3px; opacity: .9; }
/* 已获得时这一行是拿到的时间，数字等宽、不折行 */
.badge-cell .bc-d.is-when { font-variant-numeric: tabular-nums; letter-spacing: .02em; }

/* ---------------- 极速挑战页 ---------------- */
.speed-hero { text-align: center; padding: 34px 26px 8px; }
.speed-hero .sh-ico { color: var(--ochre); display: flex; justify-content: center; }
.speed-hero .sh-t { font-size: 24px; font-weight: 700; margin-top: 12px; }
.speed-hero .sh-s { font-size: 12.5px; color: var(--ink-soft); line-height: 1.85; margin-top: 8px; }
.speed-rules { padding: 18px 18px 0; display: flex; flex-direction: column; gap: 8px; }
.sru {
  display: flex; align-items: center; padding: 11px 14px;
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  font-size: 12.5px; color: var(--ink-soft);
}
.sru b { margin-left: auto; font-family: var(--vn); color: var(--jade-deep); }
.sru b.is-bad { color: var(--coral); }
.speed-cta { padding: 18px; }
.speed-cta .btn { height: 50px; }
.speed-best-line { text-align: center; font-size: 11.5px; color: var(--ink-faint); padding-bottom: 24px; }

.speed-hud { display: flex; align-items: center; gap: 12px; padding: 16px 18px 0; }
.speed-hud .sh-timer {
  font-family: var(--vn); font-size: 22px; font-weight: 700; color: var(--jade-deep); flex: none;
  min-width: 58px;
}
.speed-hud .sh-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--paper-deep); overflow: hidden; }
.speed-hud .sh-fill { height: 100%; background: var(--ochre); border-radius: 99px; transition: width .9s linear; }
.speed-hud .sh-score { flex: none; font-family: var(--vn); font-size: 12px; color: var(--ink-faint); }
.sp-flash {
  height: 22px; padding: 0 18px; font-size: 11.5px; font-weight: 600;
}
.sp-flash.ok { color: var(--jade); }
.sp-flash.bad { color: var(--coral); }
.speed-quiz { padding-top: 6px; }
.speed-options .option { min-height: 56px; }

.speed-result { position: relative; padding: 30px 22px 26px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.sr-label { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.sr-score { font-family: var(--vn); font-size: 74px; font-weight: 700; line-height: 1; color: var(--jade-deep); margin-top: 10px; }
.sr-score .sr-unit { font-size: 22px; color: var(--ink-soft); margin-left: 4px; }
.sr-rank { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; }
.sr-stats {
  display: flex; width: 100%; margin-top: 20px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.sr-stats > div { flex: 1; padding: 12px 4px; }
.sr-stats > div + div { border-left: 1px solid var(--line); }
.sr-stats .rs-n { font-family: var(--vn); font-size: 19px; font-weight: 700; }
.sr-stats .rs-l { font-size: 11px; color: var(--ink-faint); margin-top: 3px; }
.sr-best { margin-top: 14px; font-size: 12px; font-weight: 700; color: #8A5B0B; }
.sr-best.is-quiet { font-weight: 500; color: var(--ink-faint); }

/* ---------- 连线题 ---------- */
.match-board { position: relative; display: flex; gap: 12%; margin-top: 10px; padding-bottom: 4px; }
.mb-col { flex: 1; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.mb-item {
  position: relative; z-index: 2;
  min-height: 54px; padding: 8px 12px 8px 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--card); color: var(--ink);
  font-size: 13.5px; line-height: 1.45; text-align: left;
  display: flex; align-items: center; word-break: break-word;
  transition: border-color .15s ease, background .15s ease, transform .12s ease;
}
.mb-vi { font-family: var(--vn); }
.mb-zh { font-family: var(--zh); color: var(--ink-soft); }
.mb-item:active { transform: scale(.985); }
.mb-item.is-sel { border-color: var(--jade); background: var(--jade-soft); }
.mb-item.is-sel::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--jade);
}
.mb-item.is-done { border-color: var(--jade); background: #E6F0E9; }
.mb-item.is-done::after {
  content: ""; position: absolute; right: 11px; width: 7px; height: 7px;
  border-radius: 99px; background: var(--jade);
}
.mb-zh.is-done { color: var(--ink); }
.mb-lines {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1; overflow: visible;
}
.mb-lines line {
  stroke: var(--jade); stroke-width: 2; stroke-linecap: round;
  vector-effect: non-scaling-stroke; opacity: .85;
}

/* ---------- 判断题 ---------- */
.tf-claim {
  margin-top: 8px; padding: 11px 13px;
  background: var(--paper-deep); border-left: 3px solid var(--ochre);
  border-radius: var(--r-sm);
  font-family: var(--zh); font-size: 14px; line-height: 1.6; color: var(--ink);
}
.options.is-duo { flex-direction: row; gap: 10px; }
.options.is-duo .option { flex: 1; min-height: 58px; }
.option.is-tf { font-family: var(--zh); font-size: 18px; font-weight: 600; justify-content: center; text-align: center; }

/* ---------- 选词填空 ---------- */
.blank-line {
  font-family: var(--vn); font-size: 22px; line-height: 2; color: var(--ink);
  margin: 12px 0 6px; word-break: break-word;
}
.blank-line .fill-blank { min-width: 78px; font-size: 22px; line-height: 1.15; vertical-align: baseline; }

/* ---------- 连线结算 ---------- */
.fb-pair {
  display: flex; flex-direction: column; gap: 2px;
  padding: 7px 0; border-bottom: 1px dashed var(--line);
}
.fb-pair:last-child { border-bottom: 0; }
.fp-vi { font-family: var(--vn); font-size: 13.5px; color: var(--ink); }
.fp-zh { font-family: var(--zh); font-size: 12.5px; color: var(--ink-soft); }

/* 我的 · 练习形式标签 */
.form-types { padding: 4px 0 14px; }
.ft-grid { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; }
.ft-tag {
  padding: 5px 11px; border-radius: 999px; font-size: 12px; line-height: 1.4;
  color: var(--ink-soft); background: #fff; border: 1px solid var(--line);
}

/* ---------------- 学习卡底部：左窄右宽 + 收藏 ---------------- */
.study-nav {
  margin-top: auto;
  padding-top: 18px;
  display: grid;
  grid-template-columns: 92px 1fr 46px;
  gap: 8px;
  align-items: stretch;
}
.study-nav .btn.sn-next { height: 48px; border-radius: var(--r-sm); }
.study-nav .sn-prev {
  height: 48px;
  width: 100%;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--zh);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.study-nav .sn-prev:active { background: var(--paper-deep); }
.study-nav .sn-prev.is-empty { visibility: hidden; }
.study-nav .sn-fav {
  width: 46px;
  height: 48px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-faint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.study-nav .sn-fav.is-on {
  border-color: var(--coral);
  color: var(--coral);
  background: var(--coral-soft);
}

/* 反向学习：中文当主角，越南语退成注释条 */
.zh-main {
  margin: 8px 0 2px;
  font-family: var(--zh);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.vi-sub {
  margin-top: 18px;
  padding: 12px 14px;
  border-left: 3px solid var(--jade);
  background: var(--jade-soft);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-family: var(--vn);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--jade-deep);
}

/* ---------------- 小按钮 / 收藏 ---------------- */
.mini-btn {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mini-btn:active { background: var(--paper-deep); }
.mini-btn.is-on { color: var(--coral); border-color: #E3BEB4; background: var(--coral-soft); }
.bi-play.bi-fav { margin-left: 6px; }

.chip-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 18px 12px;
  scrollbar-width: none;
}
.chip-scroll::-webkit-scrollbar { display: none; }
.f-chip {
  flex: 0 0 auto;
  height: 27px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  font-family: var(--zh);
  font-size: 12px;
  cursor: pointer;
}
.f-chip.is-on { background: var(--jade-deep); border-color: var(--jade-deep); color: #F4EFE2; }

/* ---------------- 收藏页 ---------------- */
.fav-group { padding: 0 18px 6px; }
.fav-group > .label { display: block; margin-bottom: 4px; }
.fav-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 11px 12px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-card);
}
.fav-main { flex: 1; min-width: 0; }
.fav-vi { font-family: var(--vn); font-size: 15px; font-weight: 600; line-height: 1.5; color: var(--ink); }
.fav-zh { font-family: var(--zh); font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; line-height: 1.6; }
.fav-meta { font-size: 10.5px; color: var(--ink-faint); margin-top: 5px; letter-spacing: 0.02em; }
.fav-acts { display: flex; gap: 6px; align-items: center; padding-top: 2px; }

.empty-card {
  margin: 14px 18px 20px;
  padding: 28px 22px;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  text-align: center;
  color: var(--ink-faint);
}
.empty-card .ec-t { margin-top: 12px; font-size: 15px; font-weight: 600; color: var(--ink); }
.empty-card .ec-s { margin-top: 7px; font-size: 12.5px; line-height: 1.85; color: var(--ink-soft); }

/* ---------------- 单词页 ---------------- */
.word-grid { display: flex; flex-direction: column; gap: 8px; padding: 0 18px 8px; }
.word-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 10px 12px;
  box-shadow: var(--shadow-card);
}
.wc-top { display: flex; align-items: center; gap: 6px; }
.wc-vi {
  flex: 1;
  min-width: 0;
  font-family: var(--vn);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
}
.wc-meta { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.wc-zh { flex: 1; min-width: 0; font-family: var(--zh); font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; }
.wc-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.wc-topic {
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 1px 7px;
}
.wc-foot .mini-btn { margin-left: auto; }
/* 学习卡上的方向标记（课程内不占顶栏位置） */
.study-head { display: flex; align-items: baseline; gap: 8px; }
.dir-tag {
  margin-left: auto;
  font-family: var(--zh);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--jade-deep);
  background: var(--jade-soft);
  border-radius: 999px;
  padding: 2px 8px;
}
.study-nav .btn.sn-next.sn-first { grid-column: 1 / 3; }

/* ---------------- 账号：登录 / 注册 ---------------- */
.auth-wrap {
  min-height: 100vh;
  padding: 44px 20px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.auth-hero { display: flex; justify-content: center; }
.auth-hero .brandmark { font-size: 52px; }
.auth-sub {
  text-align: center; font-family: var(--zh); font-size: 12px; color: var(--ink-faint);
  margin: -2px auto 0; max-width: 288px; line-height: 1.75; text-wrap: balance;
}
.auth-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-tabs { display: flex; gap: 4px; background: var(--paper-deep); border-radius: 999px; padding: 3px; }
.auth-tab {
  flex: 1; height: 34px; border: 0; border-radius: 999px; background: none; cursor: pointer;
  font-family: var(--zh); font-size: 12.5px; color: var(--ink-soft);
}
.auth-tab.is-on { background: var(--jade); color: #FBF9F1; font-weight: 600; }
.auth-field { display: flex; flex-direction: column; gap: 5px; }
.auth-field span { font-family: var(--zh); font-size: 11.5px; color: var(--ink-faint); padding-left: 2px; }
.auth-field input, .acc-input {
  height: 44px; width: 100%; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  padding: 0 12px; font-family: var(--zh); font-size: 14px; color: var(--ink); outline: none;
}
.auth-field input:focus, .acc-input:focus { border-color: var(--jade); box-shadow: 0 0 0 3px var(--jade-soft); }
.auth-msg {
  font-family: var(--zh); font-size: 12px; line-height: 1.6; color: #8A2E1B;
  background: var(--coral-soft); border-radius: 8px; padding: 8px 10px;
}
.btn.auth-go { height: 48px; margin-top: 2px; }
.auth-guest {
  border: 0; background: none; padding: 6px 0 2px; cursor: pointer;
  font-family: var(--zh); font-size: 12.5px; color: var(--ink-soft);
  text-decoration: underline; text-underline-offset: 3px;
}
.auth-foot { font-family: var(--zh); font-size: 11.5px; line-height: 1.7; color: var(--ink-faint); }
.auth-back {
  width: 100%; height: 42px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card);
  font-family: var(--zh); font-size: 13px; color: var(--ink-soft);
}

/* ---------------- 账号：管理页 ---------------- */
/* 「我的」页与「账号」页的当前账号共用一张卡：同底色、同高度、同头像、同字号 */
.acc-hero {
  box-sizing: border-box; width: 100%; margin: 0 0 14px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  background: var(--jade-deep); color: #FBF9F1;
  border: 0; border-radius: var(--r-md); font: inherit;
  -webkit-tap-highlight-color: transparent;
}
.acc-hero-page { margin: 0 18px 14px; width: calc(100% - 36px); }
.acc-hero:active { opacity: .94; }
.acc-hero .as-av { width: 40px; height: 40px; font-size: 15px; background: rgba(255, 255, 255, 0.16); }
.acc-hero .av-cam { background: rgba(255, 255, 255, .92); color: var(--jade-deep); border-color: transparent; }
.acc-hero .ah-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.acc-hero .ah-main b {
  font-family: var(--zh); font-size: 15px; font-weight: 700; color: #FBF9F1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.acc-hero .ah-main em {
  font-style: normal; font-family: var(--zh); font-size: 11.5px; color: rgba(251, 249, 241, .8);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.acc-hero .ah-go {
  flex: none; height: 22px; padding: 0 10px; border-radius: 999px;
  display: inline-flex; align-items: center;
  font-family: var(--zh); font-size: 11px; font-weight: 600;
  color: #FBF9F1; background: rgba(255, 255, 255, .22);
}
.as-av {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--jade); color: #FBF9F1;
  font-family: var(--vn); font-size: 14px; font-weight: 600;
}
.as-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.as-main b { font-family: var(--zh); font-size: 13.5px; font-weight: 600; color: var(--ink); }
.as-main em { font-style: normal; font-family: var(--zh); font-size: 11.5px; color: var(--ink-faint); }
.as-go { font-family: var(--zh); font-size: 11.5px; color: var(--jade); flex: none; }
.acc-row {
  margin: 0 18px 8px; width: calc(100% - 36px);
  display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-md);
  padding: 10px 12px;
}
.acc-row.is-cur { border-color: var(--jade); background: #F4F8F5; }
.acc-tag {
  margin-left: 6px; font-style: normal; font-family: var(--zh); font-size: 11px; font-weight: 600;
  color: var(--jade); background: rgba(14, 91, 73, .09);
  border: 0; border-radius: 999px; padding: 0 10px; height: 22px;
  display: inline-flex; align-items: center; vertical-align: middle;
}
.acc-pend {
  margin: -2px 18px 10px; padding: 10px 12px;
  background: var(--paper-deep); border-radius: var(--r-md);
  display: flex; flex-direction: column; gap: 8px;
}
.acc-btns { display: flex; gap: 8px; }
.acc-btns .btn { flex: 1; height: 40px; }
.ghost-btn {
  height: 40px; padding: 0 14px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card);
  font-family: var(--zh); font-size: 12.5px; color: var(--ink-soft);
}
.row-btn {
  margin: 0 18px 8px; width: calc(100% - 36px);
  display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-md);
  padding: 13px 12px; font-family: var(--zh); font-size: 13px; color: var(--ink);
}
.row-btn .rb-arrow { margin-left: auto; color: var(--ink-faint); }
.row-btn.danger { color: var(--coral); border-color: #E7C7BE; }
.acc-delbox {
  margin: 0 18px 10px; padding: 12px;
  background: var(--coral-soft); border-radius: var(--r-md);
  display: flex; flex-direction: column; gap: 8px;
}
.ad-t { font-family: var(--zh); font-size: 12px; line-height: 1.65; color: #8A2E1B; }
.btn.danger { background: var(--coral); color: #FFF8F5; }
.acc-note { padding: 6px 18px 0; font-family: var(--zh); font-size: 11.5px; line-height: 1.7; color: var(--ink-faint); }

/* 头像：账号条、账号行、当前账号卡都能点开头像换图，热区比 34px 再放大一圈 */
.av-wrap { position: relative; flex: none; display: inline-flex; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.av-wrap::after { content: ""; position: absolute; inset: -5px; }
.av-wrap:active { opacity: .82; }
.as-av.has-img { padding: 0; overflow: hidden; background: var(--paper-deep); }
.as-av.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-cam {
  position: absolute; right: -2px; bottom: -2px; width: 15px; height: 15px; border-radius: 50%;
  display: grid; place-items: center; font-style: normal;
  background: var(--card); color: var(--jade); border: 1px solid var(--line);
}
.acc-hero .av-cam { background: rgba(255, 255, 255, .94); color: var(--jade-deep); border-color: transparent; }
.av-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: -9999px; }
.ap-tip { font-family: var(--zh); font-size: 11px; line-height: 1.6; color: var(--ink-soft); }
/* 我的页：.me 自身留了 18px，账号卡不再二次缩进 */
.me .acc-hero { margin: 0 0 14px; width: 100%; }
.sec-head.danger { color: var(--coral); }


/* ---------------- 龙形象（图标同源 IP） ---------------- */
.hero { display: block; position: relative; padding: 4px 18px 16px; }
.hero-main { padding-right: 104px; }
.hero .hero-curve { display: none; }
.hero-dragon { position: absolute; right: 0; top: 6px; width: 112px; height: auto; margin: 0; }

.result-dragon { width: 146px; height: auto; margin: 4px 0 2px; }
.result-dragon.is-sad { width: 128px; margin-top: 0; }

.dragon-float { display: block; width: 116px; height: auto; margin: 0 auto 10px; }
.dragon-float.is-sm { width: 88px; margin: 6px auto 2px; }

.auth-dragon { display: block; width: 152px; height: auto; margin: 2px auto -4px; }

.me-head { position: relative; }
.me-dragon { position: absolute; right: 0; top: -10px; width: 74px; height: auto; }
/* 词性筛选与词性标签 */
.chip-scroll.is-pos { margin-top: 6px; }
.chip-scroll.is-pos .f-chip { font-size: 11.5px; padding: 5px 11px; }
.wc-pos {
  flex: none;
  font-size: 10px;
  letter-spacing: .03em;
  color: var(--ink-faint);
  border: 1px solid rgba(14, 91, 73, .16);
  border-radius: 999px;
  padding: 1px 7px;
  line-height: 1.5;
}
/* 字典页 */
.dict-list { display: flex; flex-direction: column; gap: 9px; padding: 6px 18px 8px; }
.dict-card { background: var(--card); border: 1px solid var(--line-soft); border-radius: 16px; overflow: hidden; }
.dict-card.is-open { border-color: rgba(14, 91, 73, .22); }
.dc-head { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; padding: 10px 12px 10px 14px; cursor: pointer; align-items: center; }
.dc-main { grid-column: 1; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.dc-vi { font-family: var(--vn); font-size: 19px; font-weight: 700; letter-spacing: .01em; }
.dc-zh { grid-column: 1; font-size: 12px; line-height: 1.45; color: var(--ink-soft); }
.dc-head .mini-btn { grid-column: 2; grid-row: 1 / span 2; }
.dc-words { border-top: 1px dashed rgba(14, 91, 73, .16); padding: 5px 8px 8px; display: flex; flex-direction: column; gap: 1px; }
.dw-row { display: flex; align-items: center; gap: 8px; padding: 6px 6px; border-radius: 10px; }
.dw-row + .dw-row { border-top: 1px solid rgba(14, 91, 73, .05); }
.dw-vi { font-family: var(--vn); font-size: 14px; color: var(--ink); }
.dw-zh { flex: 1; font-size: 11.5px; color: var(--ink-faint); text-align: right; }
/* 字典卡里去掉声调横线：字卡只留声调符号本身，不加彩色下划线 */
.dc-vi .w { border-bottom: 0 !important; padding-bottom: 0; }
.dc-vi { font-size: 20px; }
/* 无配音的喇叭：灰掉加斜杠，点了只给说明 */
.mini-btn.is-off { color: var(--ink-faint); opacity: .55; background: none; border-color: transparent; }
/* 多义项 / 组词辨析 */
.dc-flag { font-size: 10px; line-height: 1; padding: 3px 5px; border-radius: 6px; background: rgba(216, 160, 42, .18); color: #8A5B12; }
.si { display: block; }
.dc-zh .si + .si { margin-top: 2px; }
.dw-item { padding: 1px 0 3px; }
.dw-item + .dw-item { border-top: 1px solid rgba(14, 91, 73, .06); }
.dw-note { font-size: 11px; line-height: 1.55; color: var(--ink-faint); padding: 0 7px 4px 7px; }


/* ===== 更新日志 ===== */
.log-list { display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.log-item { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--shadow-card); }
.log-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.log-head b { font-family: var(--vn); font-size: 15px; letter-spacing: .02em; color: var(--jade); }
.log-date { font-size: 11px; color: var(--ink-faint); font-family: var(--vn); }
.log-ul { margin: 0; padding-left: 16px; }
.log-ul li { font-size: 12.5px; line-height: 1.72; color: var(--ink-soft); }
.log-ul li::marker { color: var(--ochre); }

/* ===== 阶梯奖励：首页那条 ===== */
.rw-strip {
  width: 100%; display: flex; align-items: center; gap: 10px;
  margin: 10px 0 0; padding: 11px 13px; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  font-family: var(--zh); color: var(--ink); cursor: pointer;
}
.rw-strip:active { transform: scale(.995); }
.rw-strip.is-hit { background: var(--ochre-soft); border-color: #E0BE72; }
.rw-strip.is-done { opacity: .9; }
.rw-strip.is-empty { border-style: dashed; background: rgba(251, 249, 241, .7); }
.rws-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: rgba(14, 91, 73, .10); color: var(--jade); flex: 0 0 auto; }
.rws-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rws-body b { font-size: 12.5px; font-weight: 600; line-height: 1.4; }
.rws-body em { font-style: normal; font-size: 11px; color: var(--ink-faint); line-height: 1.4; }
.rws-bar { display: block; height: 4px; border-radius: 3px; background: rgba(14, 91, 73, .10); overflow: hidden; margin-top: 2px; }
.rws-bar i { display: block; height: 100%; background: var(--jade); border-radius: 3px; }
.rws-go { flex: 0 0 auto; font-size: 11px; color: var(--jade); font-family: var(--vn); font-weight: 600; }

/* ===== 阶梯奖励页 ===== */
.rw-list { display: flex; flex-direction: column; gap: 10px; }
.rw-empty { font-size: 12.5px; color: var(--ink-soft); background: var(--card); border: 1px dashed var(--line); border-radius: var(--r-md); padding: 16px 14px; margin: 0 18px; text-align: center; }
.rw-card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--shadow-card); }
.rw-card.is-hit { border-color: #E0BE72; background: linear-gradient(180deg, #FBF3DF 0%, var(--card) 62%); }
.rw-card.is-done { opacity: .72; }
.rw-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rw-head b { font-size: 13.5px; font-family: var(--vn); letter-spacing: .01em; }
.rw-st { font-size: 10.5px; padding: 3px 7px; border-radius: 999px; background: rgba(14, 91, 73, .10); color: var(--jade); }
.rw-card.is-hit .rw-st { background: rgba(194, 69, 44, .12); color: var(--coral); }
.rw-gift { margin-top: 5px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }
.rw-bar { height: 6px; border-radius: 4px; background: rgba(14, 91, 73, .10); overflow: hidden; margin: 9px 0 7px; }
.rw-bar i { display: block; height: 100%; background: var(--jade); }
.rw-card.is-hit .rw-bar i { background: var(--ochre); }
.rw-foot { display: flex; align-items: center; gap: 8px; }
.rw-num { flex: 1 1 auto; font-size: 11.5px; color: var(--ink-faint); font-family: var(--vn); }
.rw-btn { height: 28px; padding: 0 11px; font-size: 11.5px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--ink-soft); font-family: var(--zh); cursor: pointer; }
.rw-btn.is-go { background: var(--jade); border-color: var(--jade); color: #F4F1E4; font-weight: 600; }
.rw-add { width: calc(100% - 36px); margin: 10px 18px 0; height: 42px; border-radius: var(--r-md); border: 1px dashed var(--line); background: rgba(251, 249, 241, .6); color: var(--jade); font-size: 13px; font-family: var(--zh); cursor: pointer; }
.rw-form { margin: 12px 18px 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px 14px; display: flex; flex-direction: column; gap: 7px; }
.rw-lab { font-size: 11px; color: var(--ink-faint); margin-top: 4px; }
.rw-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.rw-kind { height: 28px; padding: 0 10px; font-size: 11.5px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-soft); font-family: var(--zh); cursor: pointer; }
.rw-kind.is-on { background: var(--jade); border-color: var(--jade); color: #F4F1E4; }
.rw-in { width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #FFFDF7; padding: 0 11px; font-size: 13.5px; font-family: var(--zh); color: var(--ink); }
.rw-in:focus { outline: none; border-color: var(--jade); }
.rw-acts { display: flex; gap: 8px; margin-top: 8px; }
.rw-acts .rw-btn { flex: 1 1 0; height: 38px; font-size: 13px; }

/* 页头计数不换行 */
.sec-head .label { white-space: nowrap; }

/* 首页等级条可点击 */
.level-strip { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* 等级页 */
.lvt-card { margin: 0 18px 14px; padding: 16px 16px 14px; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-md); }
.lvt-hero { display: flex; align-items: baseline; gap: 10px; }
.lvt-lv { font-family: var(--vn); font-size: 30px; font-weight: 800; color: var(--jade); letter-spacing: -0.5px; }
.lvt-rank { font-size: 13px; font-weight: 700; color: var(--ink); }
.lvt-track { margin-top: 12px; height: 7px; border-radius: 99px; background: var(--paper-deep); overflow: hidden; }
.lvt-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--jade), var(--gold)); border-radius: 99px; }
.lvt-meta { margin-top: 8px; display: flex; justify-content: space-between; font-family: var(--vn); font-size: 11px; color: var(--ink-faint); }
.lvt-rows { display: flex; flex-direction: column; padding: 0 8px; }
.lvt-row { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.lvt-row:last-child { border-bottom: 0; }
.lvt-row.is-past { opacity: .6; }
.lvt-row.is-now { background: rgba(216,160,42,.10); margin: 0 -8px; padding: 9px 8px; border-radius: 10px; border-bottom-color: transparent; }
.lvt-badge { flex: none; min-width: 46px; font-family: var(--vn); font-size: 11px; font-weight: 700; text-align: center; padding: 3px 8px; border-radius: 99px; background: var(--paper-deep); color: var(--ink-soft); }
.lvt-row.is-now .lvt-badge { background: var(--jade); color: #F3F0E4; }
.lvt-name { flex: 1; font-size: 12.5px; color: var(--ink); }
.lvt-range { flex: none; font-family: var(--vn); font-size: 10.5px; color: var(--ink-faint); }
.lvt-tick { flex: none; display: flex; color: var(--jade); }
.lvt-on { flex: none; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--gold); color: #4A3208; }
.lvt-srcs { display: flex; flex-direction: column; }
.lvt-src { display: flex; align-items: baseline; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.lvt-src:last-child { border-bottom: 0; }
.lvs-t { flex: none; width: 96px; font-size: 12px; color: var(--ink); }
.lvs-v { flex: none; width: 42px; font-family: var(--vn); font-size: 12px; font-weight: 700; color: var(--jade); }
.lvs-n { flex: 1; font-size: 10.5px; color: var(--ink-faint); }

/* 同题重绘不播入场动画，避免点一下整页闪动 */
.is-rerender .animate-in { animation: none; }

/* ===== 1.12 阶梯奖励：首页按类型分组 + 点击展开 ===== */
.rw-home { display: flex; flex-direction: column; gap: 8px; margin: 12px 18px 0; }
.rw-strip {
  width: auto; margin: 0; padding: 0; display: flex; flex-direction: column;
  align-items: stretch; gap: 0; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
}
.rws-main {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 13px; background: transparent; border: 0;
  text-align: left; font-family: var(--zh); color: var(--ink); cursor: pointer;
}
.rws-sub { font-size: 11px; color: var(--ink-faint); }
.rw-strip.is-hit .rws-go { color: var(--coral); font-weight: 600; }

.rwt-open { border-top: 1px solid var(--line-soft); padding: 4px 0 4px; background: none; }
.rwt-item { display: block; margin-bottom: 2px; }
.rwt-row {
  width: 100%; display: flex; align-items: center; gap: 10px;
  min-height: 36px; padding: 7px 10px; border: 0; border-radius: 10px;
  background: transparent; font: inherit; color: inherit; text-align: left;
  cursor: default; -webkit-tap-highlight-color: transparent;
}
button.rwt-row { cursor: pointer; }
.rwt-t { flex: 0 0 auto; font-size: 11px; font-family: var(--vn); color: var(--ink-faint); white-space: nowrap; }
.rwt-g {
  flex: 1 1 auto; min-width: 0; font-size: 13px; font-weight: 700; color: var(--jade-deep); line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rwt-gi { font-style: normal; margin-right: 4px; opacity: .85; }
/* 状态列固定宽度，三行胶囊上下对齐 */
.rwt-s {
  flex: 0 0 auto; min-width: 62px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 9px; border-radius: 999px;
  font-size: 10.5px; color: var(--ink-faint); white-space: nowrap;
}
/* 三态同一套标签：差 N（灰字）/ 去领（红胶囊，整行可点）/ 已领（灰胶囊） */
.rwt-row.is-done { background: #FBF3DF; }
.rwt-row.is-done .rwt-g { color: var(--jade-deep); font-weight: 700; }
.rwt-row.is-hit .rwt-s { background: var(--coral); color: #FFFDF4; font-weight: 700; }
.rwt-row.is-hit:active { opacity: .86; }
.rwt-row.is-claiming { background: #FFFBF0; }
.rwt-row.is-claimed { background: transparent; }
.rwt-row.is-claimed .rwt-t, .rwt-row.is-claimed .rwt-g { color: var(--ink-faint); font-weight: 500; }
.rwt-row.is-claimed .rwt-s { background: rgba(22, 32, 27, .06); color: var(--ink-faint); }
/* 首页展开里的拍照领取面板 */
.rwt-item .rw-claim { margin: 2px 0 8px; }

/* 奖励页：一组一块，与其它卡片同样的左右边距 */
.rw-grp { margin: 14px 18px 0; }
.rwg-head { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 8px; padding: 0 0 8px; }
.rwg-head b { flex: 1 1 auto; min-width: 0; font-size: 14px; font-family: var(--zh); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rwg-cur { order: 3; flex: 0 0 100%; font-size: 11px; color: var(--ink-faint); font-family: var(--vn); white-space: nowrap; }
/* 与站内状态胶囊同一套：22px 高、圆角 999、浅底填充、无描边 */
.rwg-add {
  margin-left: auto; flex: 0 0 auto; height: 22px; padding: 0 10px; border-radius: 999px;
  border: 0; background: rgba(14, 91, 73, .09); color: var(--jade);
  font-size: 11px; font-weight: 600; font-family: var(--zh); line-height: 1;
  display: inline-flex; align-items: center; white-space: nowrap; cursor: pointer;
}
.rw-fhint { font-size: 11px; color: var(--ink-faint); margin: 2px 0 4px; }
.rw-shot { width: 42px; height: 42px; object-fit: cover; border-radius: 8px; margin-left: 8px; vertical-align: middle; border: 1px solid var(--line-soft); }

/* 已领档展开区：凭证缩略图与日期、按钮并排成一张证据卡，照片不再单独占一行 */
.rw-proof { display: flex; align-items: center; gap: 11px; padding-top: 9px; }
.rw-proof .rw-shot {
  flex: none; width: 68px; height: 68px; margin: 0;
  border-radius: 9px; border: 1px solid var(--line);
  background: var(--card); object-fit: cover; vertical-align: baseline;
}
.rw-proof-main { flex: 1 1 auto; min-width: 0; }
.rw-proof-main .rw-ops-at { padding-top: 0; }
.rw-proof-main .rw-ops-row { padding-top: 7px; gap: 6px; }
/* 三个按钮等分右列，右列不再左挤右空 */
.rw-proof-main .rw-ops-row .rw-btn {
  flex: 1 1 0; min-width: 0; padding: 0 2px;
  font-size: 11.5px; white-space: nowrap;
}
.rw-at { margin-left: 8px; font-size: 10.5px; color: var(--ink-faint); font-family: var(--vn); }

/* 领奖面板 */
.rw-claim { margin-top: 10px; padding: 11px 12px; border: 1px dashed #E0BE72; border-radius: var(--r-sm); background: #FFFBF0; }
.rwc-lab { font-size: 11.5px; color: var(--ink-soft); line-height: 1.55; }
.rwc-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.rwc-pick {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 12px; border-radius: 8px; border: 1px dashed var(--line);
  background: #FFFDF7; color: var(--jade); font-size: 11.5px; font-family: var(--zh);
}
.rwc-file { position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: 0; }
.rwc-tip { font-size: 10.5px; color: var(--ink-faint); }
.rwc-prev { display: block; width: 100%; max-height: 180px; object-fit: cover; border-radius: 10px; margin-top: 8px; border: 1px solid var(--line-soft); }

/* 问号说明：默认不占版面，点开才出现 */
.hint-q { position: relative; display: inline-flex; align-items: center; margin-left: 4px; }
.hint-btn {
  width: 17px; height: 17px; padding: 0; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--ink-faint);
  font-size: 10.5px; line-height: 1; font-family: var(--vn);
  display: grid; place-items: center; cursor: pointer;
}
.hint-pop {
  position: absolute; right: 0; top: 22px; z-index: 20; width: 216px;
  padding: 9px 11px; font-size: 11.5px; line-height: 1.7; color: var(--ink-soft);
  background: #FFFCF2; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 26px -14px rgba(22, 32, 27, .45); text-align: left;
}

/* ===== 1.12 阶梯：一组一段阶梯、整行可点的入口 ===== */
.rw-home {
  display: flex; flex-direction: column; gap: 8px;
  margin: 14px 18px 0; width: calc(100% - 36px);
}
.rw-strip {
  width: 100%; margin: 0; padding: 0; display: flex; flex-direction: column;
  align-items: stretch; gap: 0; overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-card);
}
.rws-sub { font-size: 11px; color: var(--ink-faint); }

.rw-ladder {
  margin: 0; background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-card);
}
.rw-tier { border-bottom: 1px solid var(--line-soft); }
.rw-tier:last-child { border-bottom: 0; }
.rw-tier.is-hit { background: linear-gradient(180deg, #FBF3DF 0%, #FFFFFF 72%); }
.rw-tier.is-claimed { background: #FAF8F1; }
.rw-tier-head {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 12px 13px 7px; background: none; border: 0;
  text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.rw-t { flex: 0 0 auto; font-family: var(--vn); font-size: 11px; font-weight: 500; color: var(--ink-faint); }
/* 奖励是这一行的主角：礼物图标 + 加粗绿字，档位值退为右侧小字 */
.rw-g { flex: 1 1 auto; min-width: 0; font-size: 13.5px; font-weight: 700; color: var(--jade-deep); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rw-gi { font-style: normal; margin-right: 4px; }
.rw-st { flex: 0 0 auto; height: 22px; min-width: 54px; display: inline-flex; align-items: center; justify-content: center; padding: 0 9px; border-radius: 999px; font-size: 10.5px; line-height: 1; white-space: nowrap; background: rgba(14, 91, 73, .10); color: var(--jade); }
.rw-tier.is-hit .rw-st { background: rgba(194, 69, 44, .12); color: var(--coral); }
.rw-tier.is-claimed .rw-st { background: rgba(22, 32, 27, .07); color: var(--ink-faint); }
.rw-tbar { height: 4px; margin: 0 13px 10px; border-radius: 3px; background: rgba(14, 91, 73, .08); overflow: hidden; }
.rw-tbar i { display: block; height: 100%; border-radius: 3px; background: var(--jade); }
.rw-tier.is-hit .rw-tbar i { background: var(--ochre); }

.rw-ops { padding: 0 13px 12px; border-top: 1px dashed rgba(22, 32, 27, .10); }
.rw-ops-at { font-size: 10.5px; color: var(--ink-faint); font-family: var(--vn); padding-top: 8px; }
.rw-ops-row { display: flex; gap: 8px; padding-top: 9px; }
.rw-ops-row .rw-btn { flex: 1 1 0; height: 32px; font-size: 12px; }
.rw-btn.is-danger { border-color: var(--coral); color: var(--coral); }
.rw-edit {
  margin-top: 10px; padding: 10px 11px; display: flex; flex-direction: column; gap: 6px;
  background: #FFFDF7; border: 1px solid var(--line); border-radius: 10px;
}
.rw-delask { margin-top: 10px; padding: 10px 11px; background: #FDF3EF; border: 1px dashed var(--coral); border-radius: 10px; }
.rw-delask-t { font-size: 11.5px; color: #8F3A26; line-height: 1.5; }

/* 变更记录 */
.rw-hist { margin: 8px 0 0; }
.rw-h-toggle { padding: 4px 0; background: none; border: 0; font-size: 11px; color: var(--ink-faint); font-family: var(--zh); cursor: pointer; }
.rw-h-list { margin-top: 2px; padding: 5px 10px; background: rgba(251, 249, 241, .82); border: 1px solid var(--line-soft); border-radius: 10px; }
.rw-h-row { display: flex; gap: 8px; padding: 4px 0; border-bottom: 1px dashed rgba(22, 32, 27, .08); font-size: 11px; line-height: 1.5; }
.rw-h-row:last-child { border-bottom: 0; }
.rw-h-at { flex: 0 0 auto; font-family: var(--vn); color: var(--ink-faint); }
.rw-h-txt { flex: 1 1 auto; min-width: 0; color: var(--ink-soft); word-break: break-word; }
.rw-h-empty { padding: 4px 0; font-size: 11px; color: var(--ink-faint); }

/* 窄屏：奖励文案与状态标签各收一档，奖励文字才不至于早早出现省略号 */
@media (max-width: 352px) {
  .rw-g { font-size: 12.5px; }
  .rw-st { font-size: 10px; min-width: 46px; padding: 0 7px; }
  .rw-proof-main .rw-ops-row .rw-btn { font-size: 11px; padding: 0 1px; }
  .badge-cell { padding: 10px 10px 11px; }
  .badge-cell .bc-ico { width: 42px; height: 42px; margin-bottom: 8px; }
  .badge-cell::after { width: 140px; height: 140px; right: -42px; bottom: -46px; opacity: .08; }
  .badge-cell .bc-t { font-size: 11.8px; }
  .badge-cell .bc-d { font-size: 10px; }
  .badge-sec-h .bsh-sub { display: none; }
  .bc-rar { top: 7px; right: 7px; font-size: 9px; padding: 3px 4px; }
}

/* 问号气泡宽一点，多行说明才不挤 */
.hint-pop { width: 232px; }

/* 我的页：整行可点的入口 */
.entry-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 2px; background: none; border: 0; border-bottom: 1px solid var(--line-soft);
  text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.entry-row:last-of-type { border-bottom: 0; }
.entry-row:active { background: rgba(14, 91, 73, .04); }
.er-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.er-main b { font-size: 13px; font-weight: 600; }
.er-main em { font-style: normal; font-size: 11px; color: var(--ink-faint); line-height: 1.45; }
.er-go { flex: 0 0 auto; color: var(--ink-faint); font-size: 15px; }

/* 我的页 1.29：入口、设置、徽章统一成一块块卡片，二级文字加深到 ink-soft，
   避免小字在纸底上糊成一片 */
.me .setting-group {
  background: #FFFDF7;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px 4px;
  margin-top: 14px;
}
.me .setting-group > .label {
  margin: 0 0 9px;
  font-family: var(--zh);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ink);
}
.me .setting-group .setting-row:last-child { border-bottom: 0; }
.me .badge-block {
  background: #FFFDF7;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px 14px;
}
.me .stat-card { background: #FFFDF7; border-color: var(--line); }
.me .stat-card .sc-l { color: var(--ink-soft); }
.me .badge-cell { background: var(--card); }
.me .badge-cell .bc-d { opacity: 1; color: var(--ink-soft); }
.me .badge-cell.is-on .bc-d { color: var(--ink-soft); }
.me .setting-row .sr-sub { color: var(--ink-soft); }

/* ===== 徽章详情：点一枚长出来，龙在章下面按各自动作现身 ===== */
.bsheet { position: fixed; inset: 0; z-index: 62; display: flex; align-items: center; justify-content: center; padding: 24px; }
.bs-mask { position: absolute; inset: 0; border: 0; padding: 0; background: rgba(20, 26, 21, .46); cursor: pointer; }
.bs-card {
  position: relative; width: 276px; max-width: 100%; padding: 22px 20px 20px; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 24px 48px -22px rgba(22, 32, 27, .6);
  animation: bsIn .26s cubic-bezier(.2, .9, .3, 1.06) both;
}
.bs-x { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border: 0; background: none; color: var(--ink-faint); font-size: 17px; line-height: 1; cursor: pointer; }
.bs-hero { position: relative; height: 152px; display: grid; place-items: center; }
.bs-halo { position: absolute; width: 108px; height: 108px; border-radius: 50%; background: radial-gradient(circle, rgba(216, 160, 42, .34), transparent 68%); animation: bsHalo 2.6s ease-in-out infinite; }
.bs-ring { position: absolute; width: 118px; height: 118px; border-radius: 50%; border: 1px dashed rgba(216, 160, 42, .55); animation: bsSpin 11s linear infinite; }
.bs-big {
  position: relative; width: 96px; height: 96px; border-radius: 50%; display: block;
  -webkit-filter: drop-shadow(0 12px 20px rgba(22, 32, 27, .34)); filter: drop-shadow(0 12px 20px rgba(22, 32, 27, .34));
  animation: bsPop 2.6s ease-in-out infinite;
}
.bs-big img { display: block; width: 100%; height: 100%; border-radius: 50%; }
.bs-dragon { position: absolute; width: 74px; right: -8px; bottom: -10px; transform-origin: 50% 88%; }
.bs-card.is-a0 .bs-dragon { animation: bsFloat 2.4s ease-in-out infinite; }
.bs-card.is-a1 .bs-dragon { animation: bsSway 2.8s ease-in-out infinite; }
.bs-card.is-a2 .bs-dragon { animation: bsShy 2.4s ease-in-out infinite; }
.bs-t { font-family: var(--zh); font-size: 19px; font-weight: 700; margin-top: 8px; color: var(--ink); }
.bs-d { font-family: var(--zh); font-size: 12px; line-height: 1.7; color: var(--ink-soft); margin-top: 6px; padding: 0 4px; }
.bs-rar { display: inline-block; margin-top: 7px; font-family: var(--zh); font-size: 10.5px; font-weight: 700; letter-spacing: .5px; padding: 3px 9px; border-radius: 999px; }
.bs-rar.r1 { color: #8A5E28; background: rgba(200, 138, 60, .16); }
.bs-rar.r2 { color: #5B6B69; background: rgba(110, 123, 122, .16); }
.bs-rar.r3 { color: #8C6410; background: rgba(216, 160, 42, .24); }
.bs-card.is-off .bs-rar { background: rgba(22, 32, 27, .06); color: var(--ink-faint); }
.bs-st { display: inline-block; margin-top: 13px; font-family: var(--zh); font-size: 11.5px; font-weight: 600; padding: 5px 13px; border-radius: 999px; background: rgba(216, 160, 42, .18); color: #8A6410; }
.bs-card.is-off .bs-st { background: rgba(22, 32, 27, .06); color: var(--ink-faint); font-weight: 500; }
/* 徽章详情底部的获得时间 */
.bs-when { margin-top: 8px; font-family: var(--zh); font-size: 11.5px; line-height: 1.5; color: var(--ink-soft); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.bs-card.is-off .bs-big { -webkit-filter: grayscale(.8) brightness(.9) opacity(.66) drop-shadow(0 10px 16px rgba(22, 32, 27, .2)); filter: grayscale(.8) brightness(.9) opacity(.66) drop-shadow(0 10px 16px rgba(22, 32, 27, .2)); }
.bs-card.is-off .bs-halo { background: radial-gradient(circle, rgba(22, 32, 27, .1), transparent 68%); }
.bs-card.is-off .bs-ring { border-color: rgba(22, 32, 27, .16); }
@keyframes bsIn { from { opacity: 0; transform: translateY(12px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes bsHalo { 0%, 100% { opacity: .55; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.14); } }
@keyframes bsPop { 0%, 100% { transform: translateY(0) scale(1); } 45% { transform: translateY(-3px) scale(1.035); } }
@keyframes bsSpin { to { transform: rotate(360deg); } }
@keyframes bsFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes bsSway { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes bsShy { 0% { transform: scale(.55); opacity: 0; } 14% { opacity: 1; transform: scale(1.08); } 24%, 100% { transform: scale(1); opacity: 1; } }


/* ===== 1.13 说明收进问号 + 底栏让位 ===== */
.page-head { position: relative; }
.page-head .hint-q { position: absolute; top: 5px; right: 18px; margin: 0; }
.page-head.ph-flush { padding: 0 0 14px; }
.page-head.ph-flush .hint-q { right: 0; }
.sec-head .hint-q { margin-left: 0; align-self: center; }
.hint-q { flex: none; }
.hint-pop { max-width: min(232px, 74vw); }
.me { padding: 0 18px 26px; }
.empty-state { padding: 40px 18px 18px; }
.speed-best-line { padding-bottom: 24px; }
.speed-result { padding-bottom: 26px; }
/* 底部留白统一由 .shell 承担，各页不再单独补 92px */
/* ===== 1.14 标题体系统一：页面标题 21px/700，区块标题 15px ===== */
h1 { font-size: 21px; line-height: 1.25; letter-spacing: -0.01em; }
h2 { font-size: 15px; line-height: 1.3; }
.page-title { font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.page > .sec-head:first-child { padding: 4px 18px 12px; }
.speed-hero .sh-t { font-size: 21px; line-height: 1.25; letter-spacing: -0.01em; }
.result-title { font-size: 21px; line-height: 1.25; letter-spacing: -0.01em; }
/* 1.14 极速页规则区紧接页头 */
.page > .sec-head:first-child + .speed-rules { padding-top: 4px; }

/* ===== 1.15 页面版式统一：卡片内边距与圆角、列表间距、空态 ===== */
.book-item { border-radius: var(--r-md); padding: 13px 14px; }
.dict-card { border-radius: var(--r-md); }
.log-item { padding: 13px 14px; }
.rw-card { padding: 13px 14px; }
.review-card { padding: 13px 14px; }
.speed-card { padding: 13px 14px; }
.lvt-card { padding: 14px 14px 12px; }
.book-list, .dict-list, .log-list, .rw-list { gap: 9px; }
.dict-list, .log-list { padding-top: 4px; }
.rw-empty { padding: 14px 14px; }

/* ===== 1.17 存档写入失败提示 ===== */
.save-warn { margin: 0 18px 10px; padding: 10px 12px; border-radius: 12px; background: #F7E9E5; border: 1px solid #C2452C; color: #8E2C1C; font-size: 12.5px; line-height: 1.7; }

/* 练习形式标签：让学生一眼知道当前是哪种练习 */
.q-kind {
  display: inline-block; margin-right: 7px; padding: 2px 8px;
  border-radius: 99px; background: var(--jade-soft); color: var(--jade-deep);
  font-family: var(--vn); font-size: 10.5px; font-weight: 700; letter-spacing: .02em;
}

/* 学到一半再进来：问一句继续还是重头 */
.rs-card {
  margin: 0 18px; padding: 18px 16px; background: var(--card);
  border: 1px solid var(--line-soft); border-radius: var(--r-md);
}
.rs-line { font-size: 13.5px; line-height: 1.85; color: var(--ink); }
.rs-line b { color: var(--jade); font-family: var(--vn); }
.rs-actions { display: flex; gap: 10px; margin-top: 16px; align-items: center; }
.rs-actions .btn { flex: 1; }
.rs-actions .btn-quiet {
  flex: 0 0 auto; height: 48px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--card); color: var(--ink-soft); font-size: 13.5px;
}

/* ===== 中文字典：汉字 + 拼音 + 越南语释义（越南人学中文方向） ===== */
.dc-hz { font-size: 22px; font-weight: 700; letter-spacing: .02em; line-height: 1.15; }
.dc-py {
  font-size: 12px; letter-spacing: .04em; color: #8A5B12;
  padding: 2px 6px; border-radius: 6px; background: rgba(216, 160, 42, .14);
}
.dw-hz { font-size: 15px; font-weight: 600; letter-spacing: .01em; color: var(--ink); }
/* 无中文发音时喇叭加一道斜杠，点了只给说明 */
.mini-btn.is-off { position: relative; }
.mini-btn.is-off::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 16px; height: 1.5px; border-radius: 2px;
  background: var(--ink-faint); transform: translate(-50%, -50%) rotate(-38deg);
}
.off-slash { display: none; }
/* 同音字（同拼音不同字）：点一下跳到那个字 */
.dc-same {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 8px 7px 3px; border-top: 1px solid rgba(14, 91, 73, .06);
}
.dc-same-t { font-size: 11px; color: var(--ink-faint); letter-spacing: .02em; }
.same-chip {
  display: inline-flex; align-items: baseline; gap: 4px;
  padding: 4px 8px; border-radius: 8px;
  border: 1px solid var(--line-soft); background: var(--card);
  font-size: 14px; color: var(--ink);
}
.same-chip:active { background: var(--paper-deep); }
.same-chip i { font-style: normal; font-size: 10.5px; color: #8A5B12; }
/* 例句 */
.dc-ex {
  margin: 8px 7px 4px; padding: 8px 10px;
  border-left: 2px solid rgba(216, 160, 42, .55);
  background: rgba(216, 160, 42, .06); border-radius: 0 8px 8px 0;
}
.dc-ex-head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.dc-ex-t { font-size: 10.5px; color: var(--ink-faint); letter-spacing: .04em; }
.dc-ex-head .mini-btn { margin-left: auto; }
.dc-ex-hz { font-size: 14px; line-height: 1.6; color: var(--ink); }
.dc-ex-vi { font-family: var(--vn); font-size: 12px; line-height: 1.5; color: var(--ink-soft); }

/* ============ 1.27：首页场景折叠 / 阶梯奖励合并 / 等级页版式 / 可拖滚动条 ============ */

/* 场景：收起态只露章名，点击展开课程。章名下挂副行（几课几旬），不再带 01/02 编号 */
.path { gap: 12px; }
.path .unit {
  display: block;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  overflow: hidden;
}
.path .unit.is-open { background: rgba(251, 249, 241, .92); }
.path .unit-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px;
  border: 0;
  background: rgba(14, 91, 73, .055);
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.path .unit.is-open .unit-head { background: rgba(14, 91, 73, .10); }
.path .unit-title { font-size: 16px; font-weight: 700; letter-spacing: .01em; line-height: 1.25; }
.path .unit-sub {
  margin-top: 4px;
  font-family: var(--vn);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-faint);
  letter-spacing: 0;
}
.unit-chev { margin-left: auto; flex: none; display: flex; color: var(--ink-soft); transition: transform .18s ease; }
.path .unit.is-open .unit-chev { transform: rotate(90deg); }
.path .lesson-list { padding: 2px 12px 8px; }
.path .boss-row { margin: 2px 12px 12px; }

/* 阶梯奖励：一个框里列所有目标类型，图标去掉，三态配色，已达成排后 */
.rw-home { margin: 12px 18px 0; }
.rw-panel {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 2px 14px 6px;
}
.rwp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.rwp-set {
  border: 0;
  background: none;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--jade);
  padding: 4px 2px 4px 10px;
  cursor: pointer;
}
.rwp-row { border-top: 1px solid var(--line-soft); }
.rwp-main {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.rwp-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
/* 标题行：左侧档位，右侧统一尺寸的状态胶囊，避免被拉伸成方块 */
.rwp-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rwp-line b {
  flex: 1 1 auto; min-width: 0; font-size: 12px; font-weight: 500; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rwp-gift {
  flex: 0 0 auto; min-width: 0; font-style: normal; font-size: 12.5px; font-weight: 700; line-height: 1.4;
  color: var(--jade-deep); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rwp-gift .g-fi { font-style: normal; margin-right: 3px; }
.rwp-line b { color: var(--ink-soft); }
.rwp-bar { height: 4px; border-radius: 3px; background: rgba(14, 91, 73, .10); overflow: hidden; }
.rwp-bar i { display: block; height: 100%; border-radius: 3px; background: var(--jade); transition: width .2s ease; }
.rwp-go {
  flex: 0 0 auto; height: 22px; display: inline-flex; align-items: center;
  padding: 0 10px; border-radius: 999px; background: rgba(22, 32, 27, .05);
  font-family: var(--vn); font-size: 11px; font-weight: 600; line-height: 1;
  white-space: nowrap;
}
.rwp-go.is-hit { background: var(--coral); color: #FFFDF4; font-weight: 700; }
.rwp-row.is-none .rwp-bar i { background: #C4BEAC; }
.rwp-row.is-none .rwp-go, .rwp-row.is-none .rwp-line b { color: var(--ink-faint); font-weight: 500; }
.rwp-row.is-part .rwp-bar i { background: var(--ochre); }
.rwp-row.is-part .rwp-go { color: #8A6410; }
.rwp-row.is-done .rwp-bar i { background: var(--jade); }
.rwp-row.is-done .rwp-go { color: var(--jade); }
.rwp-row.is-done .rwp-line b { color: var(--ink-soft); font-weight: 500; }
/* 「去领」一律红底白字，不被上面的状态配色盖成同色系 */
.rwp-row.is-none .rwp-go.is-hit,
.rwp-row.is-part .rwp-go.is-hit,
.rwp-row.is-done .rwp-go.is-hit { background: var(--coral); color: #FFFDF4; font-weight: 700; }
.rwp-row.is-open { background: rgba(216, 160, 42, .055); margin: 0 -14px; padding: 0 14px; }
.rwp-row .rwt-open { padding-left: 0; padding-right: 0; background: none; }

/* 等级页：等级表与 XP 来源跟上面等级卡同一版式（同左右边距、同圆角内边距） */
.lv-block {
  margin: 0 18px 12px;
  padding: 14px 14px 12px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
}
.lv-block .label { display: block; margin-bottom: 8px; }
.lv-block .lvt-rows, .lv-block .lvt-srcs { padding: 0; }

/* 字典：第二组筛选行 */
.chip-scroll.is-second { margin-top: 6px; }

/* 滚动条：原生条隐掉，改用右侧可按住拖动的浮条（长页面才出现） */
html { scrollbar-width: none; }
::-webkit-scrollbar { width: 0; height: 0; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: transparent; }
::-webkit-scrollbar-button { display: none; }

.scroll-rail {
  position: fixed; right: 0; top: 0;
  bottom: calc(80px + env(safe-area-inset-bottom));
  width: 18px; z-index: 42;
  touch-action: none; opacity: 0;
  transition: opacity .16s ease;
}
.scroll-rail.is-off { visibility: hidden; pointer-events: none; }
.scroll-rail.is-show { opacity: .92; }
.scroll-knob {
  position: absolute; right: 4px; top: 0; width: 10px;
  min-height: 30px; border-radius: 6px;
  background: rgba(14, 91, 73, .40);
  transition: width .12s ease, background .12s ease;
}
.scroll-rail.is-drag .scroll-knob { width: 12px; background: rgba(14, 91, 73, .80); }

/* ---------------- 汉字上方的拼音标注 ----------------
   只在「用越南语学中文」方向渲染 ruby；小字号处拼音有下限，避免糊成一团
   ruby-align 用 start：center 下浏览器会把偏短的拼音拉散铺满整字宽，
   「ān」会被拉成「ā n」，看着像标错；start 让一个音节的字母连着写 */
ruby {
  ruby-position: over;
  ruby-align: start;
}
ruby > rt {
  font-family: var(--vn);
  font-weight: 500;
  font-size: clamp(8px, 0.4em, 13px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink-faint);
}

/* 纯中文：整行注音，拼音一行在上、汉字一行在下
   比逐字 ruby 更适合小字号，音节之间靠空格自然分开，不会被字宽压成一坨 */
.pyz {
  display: inline-block;
  text-align: left;
  vertical-align: bottom;
}
.pyz .pyz-p {
  display: block;
  font-family: var(--vn);
  font-weight: 500;
  font-size: clamp(8px, 0.38em, 13px);
  line-height: 1.16;
  letter-spacing: 0.01em;
  color: var(--ink-faint);
  white-space: nowrap;
  overflow-wrap: normal;
}
.pyz .pyz-h {
  display: block;
}


/* 主句：拼音上来以后行距放宽一点，别让上下两行黏住 */
.zh-main {
  line-height: 1.55;
  margin: 2px 0 6px;
}
.q-prompt-zh {
  line-height: 1.6;
}
/* 小字号区域：给拼音留出高度，按钮不跳动 */
.zh-line {
  line-height: 1.7;
}
.option.opt-zh {
  line-height: 1.75;
  padding-top: 14px;
  padding-bottom: 12px;
}
.option.opt-zh.is-tf {
  line-height: 1.7;
}
.fav-zh {
  line-height: 1.8;
  margin-top: 6px;
}
.dc-ex-hz {
  line-height: 1.75;
}
.dw-hz {
  line-height: 1.7;
}
/* 连线卡右侧、反馈区的中文 */
.zh,
.fp-zh,
.result-glance li span {
  line-height: 1.7;
}

/* 词块上的拼音：给它多一点上下空间，块本身不跳动 */
.token.py {
  font-family: var(--zh);
  line-height: 1.55;
  padding-top: 9px;
  padding-bottom: 6px;
}

/* ---------------- 激励任务 ---------------- */
.tg-sec { margin-top: 0; }
.tg-head { margin: 0; padding: 4px 18px 12px; }
.tgc {
  margin: 0 18px 10px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
}
.tgc-main {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 12px 13px; border: 0; background: transparent; color: inherit;
  font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.tgc-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.tgc-line { display: flex; align-items: center; gap: 8px; }
.tgc-line b { flex: 1 1 auto; min-width: 0; font-size: 14px; font-family: var(--zh); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgc-go { flex: 0 0 auto; min-width: 62px; height: 22px; padding: 0 9px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; color: var(--ink-faint); white-space: nowrap; }
.tgc-go.is-hit { background: var(--coral); color: #FFFDF4; font-weight: 700; }
.tgc-gift { flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: var(--jade-deep); font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgc-gift .g-fi { margin-right: 4px; opacity: .85; }
.tgc-bar { flex: 1 1 100%; height: 5px; border-radius: 999px; background: rgba(22, 32, 27, .08); overflow: hidden; }
.tgc-bar i { display: block; height: 100%; border-radius: 999px; background: var(--jade); }
.tgc-open { border-top: 1px solid var(--line-soft); padding: 10px 13px 12px; display: flex; flex-direction: column; gap: 8px; }
.tg-items { display: flex; flex-direction: column; gap: 6px; }
.tgi-item { display: flex; flex-direction: column; }
.tgi-row {
  width: 100%; display: flex; align-items: center; gap: 10px; min-height: 36px;
  padding: 7px 10px; border: 0; border-radius: 10px; background: transparent;
  font: inherit; color: inherit; text-align: left; cursor: default; -webkit-tap-highlight-color: transparent;
}
button.tgi-row { cursor: pointer; }
.tgi-check { flex: 0 0 auto; width: 20px; text-align: center; font-size: 15px; color: var(--jade-deep); background: none; border: 0; cursor: pointer; padding: 0; }
.tgi-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: row; align-items: baseline; gap: 8px; }
.tgi-title { flex: 1 1 auto; min-width: 0; font-size: 12.5px; font-weight: 500; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgi-meta { font-size: 11px; font-family: var(--vn); color: var(--ink-faint); white-space: nowrap; }
.tgi-gift { flex: 0 0 auto; min-width: 0; font-size: 12.5px; font-weight: 700; color: var(--jade-deep);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgi-gift .rwt-gi { margin-right: 4px; opacity: .85; }
.tgi-st { flex: 0 0 auto; min-width: 62px; height: 22px; padding: 0 9px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; color: var(--ink-faint); white-space: nowrap; }
.tgi-row.is-done { background: #FBF3DF; }
.tgi-row.is-hit .tgi-st { background: var(--coral); color: #FFFDF4; font-weight: 700; }
.tgi-row.is-claiming { background: #FFFBF0; }
.tgi-row.is-claimed { background: transparent; }
.tgi-row.is-claimed .tgi-title, .tgi-row.is-claimed .tgi-gift { color: var(--ink-faint); font-weight: 500; }
.tgi-row.is-claimed .tgi-st { background: rgba(22, 32, 27, .06); color: var(--ink-faint); }
.tgg-item { margin-top: 2px; }
.tgg-item .tgi-row { background: rgba(216, 160, 42, .08); }
.tgg-item .tgi-title { color: #8A6410; }
.tg-ops-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tg-edit-item { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.tg-form .tg-edit-item:first-of-type { border-top: 0; }
.tg-form .rw-in.tg-tgt { margin-top: 0; }
.tgi-item .rw-claim { margin: 2px 0 8px; }

/* 留档照片全屏查看 */
.tg-view { position: fixed; inset: 0; z-index: 70; background: rgba(12, 18, 15, .92); display: flex; align-items: center; justify-content: center; padding: 24px; }
.tg-view-img { max-width: 100%; max-height: 100%; border-radius: var(--r-md); object-fit: contain; }
.tg-view-x { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #FFFDF4; font-size: 20px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.tg-view-hint { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .7); font-size: 12px; }

/* 失败页/结算页的错句：越南语一行、中文（带拼音）一行，两行之间留出气口 */
.result-glance li span {
  margin-top: 6px;
}

/* ---------------- 激励任务：首页就地展开 ---------------- */
.rwp-open {
  border-top: 1px solid var(--line-soft); padding: 6px 0 4px;
  display: flex; flex-direction: column; gap: 4px;
}
.rwp-row.is-open .rwp-open { margin: 0; }
.rwt-item {
  display: flex; align-items: center; gap: 10px; min-height: 34px;
  padding: 6px 10px; border-radius: 10px;
}
.rwt-check { flex: 0 0 auto; width: 20px; text-align: center; font-size: 15px; color: var(--jade-deep); }
.rwt-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: row; align-items: baseline; gap: 8px; }
.rwt-title { flex: 1 1 auto; min-width: 0; font-size: 12.5px; font-weight: 500; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rwt-meta { font-size: 11px; font-family: var(--vn); color: var(--ink-faint); white-space: nowrap; }
.rwt-gift { flex: 0 0 auto; min-width: 0; font-size: 12.5px; font-weight: 700; color: var(--jade-deep); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rwt-st {
  flex: 0 0 auto; min-width: 62px; height: 22px; padding: 0 9px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px;
  color: var(--ink-faint); white-space: nowrap;
}
.rwt-group { background: rgba(216, 160, 42, .08); }
.rwt-group .rwt-title { color: #8A6410; }

/* 详情：单个任务卡片（整卡常显，不带展开边） */
.tgc-single { overflow: visible; }
.tgc-single .tgc-open { border-top: 0; }

/* 勾选合并：按钮冻结在可视区底部，滚动始终可见 */
.tg-merge-sticky {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(72px + env(safe-area-inset-bottom));
  width: 100%; max-width: 440px; padding: 0 18px; z-index: 6;
}
.tg-merge-sticky .rw-add { margin: 0; width: 100%; }

/* 双新建按钮 */
.tg-new-row { display: flex; gap: 10px; margin: 10px 18px 0; }
.tg-new-row .rw-add.is-half { flex: 1 1 0; width: auto; margin: 0; }

/* 多选勾选 */
.tg-pick { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-soft); cursor: pointer; }
.tg-pick input { accent-color: var(--jade); }

/* 已领照片缩略图 */
.tg-thumb-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.tg-thumb {
  width: 64px; height: 64px; padding: 0; border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; background: #FFFDF7; cursor: pointer;
}
.tg-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* 已领照片操作区：窄屏允许换行，重拍占一行、删除/存下各半 */
.tg-photo .rw-acts { flex-wrap: wrap; }
.tg-photo .rwc-pick { flex: 1 1 100%; }
.tg-photo .rw-acts .rw-btn { flex: 1 1 38%; }

/* 全局居中弹窗：领取 / 已领照片 / 任务表单共用 */
.tg-mask { position: fixed; inset: 0; z-index: 60; background: rgba(12, 18, 15, .5); display: flex; align-items: center; justify-content: center; padding: 24px; }
.tg-modal { width: 100%; max-width: 360px; background: var(--card); border-radius: var(--r-md); padding: 16px 15px; display: flex; flex-direction: column; gap: 10px; max-height: 82vh; overflow-y: auto; box-shadow: 0 12px 32px rgba(12, 18, 15, .28); }
.tg-modal-head { font-size: 15px; font-weight: 700; color: var(--ink); font-family: var(--zh); }
.tg-modal-gift { font-size: 13px; font-weight: 700; color: var(--jade-deep); }
.tg-modal-shot { position: relative; display: block; width: 100%; height: 0; padding-top: 100%; border: 1.5px dashed var(--line); border-radius: 12px; background: #FFFDF7; cursor: pointer; overflow: hidden; }
.tg-modal-shot-sm { padding-top: 0; height: 84px; }
.tg-modal-cam { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--ink-faint); font-size: 12px; }
.tg-modal-cam i { font-style: normal; font-size: 24px; }
.tg-modal-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tg-modal-clear { align-self: flex-start; }
.tg-modal-form { display: flex; flex-direction: column; gap: 7px; }
.tg-thumb-lg { width: 84px; height: 84px; }
