/* 识字量快测（P3-3 · 2026-11-12）
 *
 * 三段式单页：开场 → 答题 → 结果，同一份 HTML 里切换 hidden。
 * 为什么不拆三个页面：答题中途刷新会丢进度，而"答到第 20 题手滑刷新"
 * 是这个流程里最让人恼火的一件事 —— 同页切换至少不产生一次导航。
 *
 * 颜色全部走 app.css 的令牌（S12：不得自己定义 :root 值）。
 * 唯一例外的"纸"是分享卡 canvas：它是白底固定色，不跟主题 —— 发出去是要打印的。
 */

.lt-main { padding-bottom: 48px; }

/* 开场 ---------------------------------------------------------------- */
.lt-intro-card { padding: 20px 20px 18px; }
.lt-points {
  margin: 0 0 18px; padding: 0; list-style: none;
  display: grid; gap: 12px;
}
.lt-points li {
  position: relative; padding-left: 26px;
  font-size: var(--font-sm); line-height: 1.7; color: var(--text-body);
}
.lt-points li b { color: var(--text-h1); }
.lt-points li::before {
  content: ""; position: absolute; left: 8px; top: .62em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary);
}
.lt-actions {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin-top: 4px;
}
.lt-actions .btn-primary { min-width: 132px; justify-content: center; }

/* 答题 ---------------------------------------------------------------- */
.lt-quiz-head { margin: 4px 0 14px; }
.lt-progress {
  display: flex; justify-content: space-between;
  font-size: var(--font-sm); color: var(--text-aux); margin-bottom: 8px;
}
.lt-bar {
  height: 6px; border-radius: var(--radius-pill);
  /* 轨道色用 border-light 而不是 bg-soft：卡片底色就是 bg-card，
     bg-soft 只差一点点，第 1 题时进度还是 0%，整条会"看不见"。 */
  background: var(--border-light); overflow: hidden;
}
.lt-bar-fill {
  display: block; height: 100%; width: 0;
  background: var(--primary); border-radius: var(--radius-pill);
  transition: width .18s ease;
}
.lt-quiz-card { padding: 22px 20px 14px; }
.lt-ask {
  margin: 0 0 6px; font-size: var(--font-sm); color: var(--text-aux);
}
.lt-stem {
  display: flex; align-items: center; justify-content: center;
  min-height: 150px; margin: 6px 0 18px;
  font-family: var(--kai);
  font-size: 108px; line-height: 1.1; color: var(--text-h1);
  text-align: center; word-break: break-all;
}
/* 看音选字时题面是拼音：字号要降下来，否则一行放不下四个声调符号 */
.lt-stem.is-pinyin { font-family: inherit; font-size: 52px; font-weight: 700; letter-spacing: .02em; }

.lt-opts {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
@media (max-width: 480px) { .lt-opts { grid-template-columns: 1fr; } }
.lt-opt {
  display: flex; align-items: center; justify-content: center;
  min-height: 60px; padding: 8px 12px;
  background: var(--bg-card); color: var(--text-h1);
  border: 1.5px solid var(--border); border-radius: var(--radius-input);
  font-family: inherit; font-size: 24px; line-height: 1.2;
  cursor: pointer; transition: border-color .12s, background .12s, transform .12s;
}
.lt-opt:active { transform: scale(.985); }
.lt-opt:hover { border-color: var(--primary); background: var(--primary-light); }
.lt-opt:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
/* 选项是汉字时用楷体：孩子认的是字形，黑体（尤其细体）和课本上的样子差得远 */
.lt-opt.is-han { font-family: var(--kai); font-size: 30px; }
/* 选中态：不给"对/错"，只给"记下了" —— 红叉会让下一题的答案变得没意义 */
.lt-opt.is-picked {
  border-color: var(--primary); background: var(--primary-light);
  color: var(--primary-hover); font-weight: 700;
}
.lt-opt[disabled] { cursor: default; opacity: .9; }
.lt-quiz-foot { display: flex; justify-content: center; margin-top: 12px; }

/* 结果 ---------------------------------------------------------------- */
.lt-result-card { padding: 22px 20px 18px; text-align: center; }
.lt-kicker {
  margin: 0 0 6px; font-size: var(--font-sm); color: var(--text-aux); letter-spacing: .08em;
}
.lt-big {
  margin: 0; display: flex; align-items: baseline; justify-content: center; gap: 6px;
  font-variant-numeric: tabular-nums;
}
.lt-big span:first-child {
  font-size: 64px; font-weight: 800; line-height: 1.05; color: var(--text-h1);
}
.lt-unit { font-size: 20px; font-weight: 600; color: var(--text-aux); }
.lt-range { margin: 10px 0 0; font-size: var(--font-sm); color: var(--text-body); }
.lt-level {
  display: inline-block; margin: 12px 0 0; padding: 5px 14px;
  background: var(--primary-light); color: var(--primary-hover);
  border-radius: var(--radius-pill);
  font-size: var(--font-sm); font-weight: 700;
}

.lt-scale { margin-top: 20px; }
.lt-scale-track {
  position: relative; height: 26px; border-radius: var(--radius-tag);
  /* 不能 overflow:hidden：年级刻度标签是它的子元素、要露到条下面去。
     圆角改由 fill 自己负责（见下）。 */
  background: var(--bg-soft);
}
.lt-scale-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: linear-gradient(90deg, var(--primary), var(--reward));
  border-radius: var(--radius-pill);
  opacity: .9;
}
.lt-scale-tick {
  position: absolute; top: 0; bottom: 0; width: 1px;
  background: var(--border);
}
.lt-scale-label {
  position: absolute; top: 30px; transform: translateX(-50%);
  font-size: var(--font-xs); color: var(--text-aux); white-space: nowrap;
}
.lt-scale-note {
  margin: 26px 0 0; font-size: var(--font-xs); color: var(--text-aux); line-height: 1.6;
}

.lt-detail-card { padding: 20px; margin-top: 16px; }
.lt-h2 {
  margin: 0 0 14px; font-size: var(--font-title); color: var(--text-h1);
}
.lt-layers { display: grid; gap: 8px; }
.lt-layer {
  display: grid; grid-template-columns: 84px 1fr 52px;
  align-items: center; gap: 10px;
  font-size: var(--font-sm); color: var(--text-body);
}
.lt-layer-name { color: var(--text-aux); font-size: var(--font-xs); }
.lt-layer-track {
  height: 8px; border-radius: var(--radius-pill);
  background: var(--bg-soft); overflow: hidden;
}
.lt-layer-fill {
  display: block; height: 100%; width: 0;
  background: var(--primary); border-radius: var(--radius-pill);
}
.lt-layer-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-h1); }

/* 分享卡弹窗 ---------------------------------------------------------- */
.lt-modal {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(20, 18, 16, .62);
}
.lt-modal[hidden] { display: none; }
.lt-modal-box {
  width: min(420px, 100%); max-height: 92vh; overflow: auto;
  background: var(--bg-card); border-radius: var(--radius-card);
  padding: 12px; box-shadow: var(--shadow-card);
}
.lt-modal-img {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius-input); background: #FFFBF6;
}
.lt-modal-actions {
  display: flex; gap: 8px; margin-top: 12px;
}
.lt-modal-actions .btn { flex: 1; justify-content: center; }

/* 三级自评刷字（C-3） */
.fc-card { max-width: 560px; margin: 0 auto; text-align: center; }
.fc-card textarea { width: 100%; margin: 8px 0; }
.fc-face { font-size: 96px; line-height: 1.3; min-height: 140px; display: flex;
  align-items: center; justify-content: center; font-family: var(--kai, serif); }
.fc-level { color: var(--text-aux); font-size: var(--font-sm); margin: 4px 0 12px; }
.fc-acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.fc-acts .btn { min-width: 96px; }
