:root {
  --paper: #efe9dd;
  --surface: #fffdf8;
  --ink: #232120;
  --muted: #6f6960;
  --faint: #a8a196;
  --line: #ddd5c6;
  --accent: #d4552b;
  --accent-dark: #b2421c;
  --accent-soft: #fbe6da;
  --good: #3f7d5c;
  --good-soft: #e1efe6;
  --hand: 'Patrick Hand', 'Comic Sans MS', 'Chalkboard SE', cursive;
  --sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --shadow: 0 1px 2px rgba(35, 33, 32, .06), 0 4px 14px rgba(35, 33, 32, .07);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.app {
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 16px 40px;
}

/* 顶栏 */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 44px;
}
.title { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; min-width: 0; }
#pause { white-space: nowrap; }
.place { font-weight: 700; }
.task { color: var(--muted); font-size: 14px; }
.progress {
  display: flex; gap: 6px; list-style: none; margin: 0 0 0 auto; padding: 0;
}
.progress li { display: flex; }
.progress li.gap { width: 4px; }
/* 进度点可以点：跳到任意一步 */
.dot {
  width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center;
}
.dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: transform .15s; }
.dot-more::before { border-radius: 2px; transform: rotate(45deg); }
.dot-summary::before { border-radius: 2px; }
.dot.done::before { background: var(--ink); }
.dot.now::before { background: var(--accent); transform: scale(1.4); }
.dot.dot-more.now::before { transform: rotate(45deg) scale(1.4); }
.dot:hover:not(:disabled)::before { transform: scale(1.5); }
.dot:disabled { cursor: default; }
.back { font-size: 20px; line-height: 1; padding: 6px 10px 6px 0; }
.btn-text {
  border: 0; background: none; padding: 8px 4px; color: var(--muted); font-size: 14px;
}
.btn-text:hover { color: var(--ink); }

/* 舞台 */
.stage {
  position: relative;
  margin-top: 8px;
  aspect-ratio: 16 / 10;
  max-height: 46vh;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: #f7f2e7;
  box-shadow: var(--shadow);
}
/* 镜头：人物和背景一起推拉，半身时腿出画 */
.world {
  position: absolute; inset: 0;
  transition: transform .9s cubic-bezier(.3, .7, .2, 1);
  transform-origin: 50% 8%;
}
.world[data-shot="mid"] { transform: scale(1.35); }
.world[data-shot="npc"] { transform: scale(1.8); transform-origin: 82% 6%; }
.world[data-shot="me"] { transform: scale(1.8); transform-origin: 16% 6%; }
@media (prefers-reduced-motion: reduce) { .world { transition: none; } }
.stage[data-shot="me"] .bubble-me { left: 46%; top: 30%; }
.stage[data-shot="npc"] .bubble { right: 40%; top: 10%; }
.backdrop, .backdrop svg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* 火柴人：两人面对面站着，按舞台高度缩放 */
.actor {
  position: absolute;
  right: 12%;
  bottom: 2%;
  height: 86%;
  transition: opacity .35s, transform .35s;
}
.actor.enter { opacity: 0; transform: translateX(24px); }
.me {
  position: absolute;
  left: 10%;
  bottom: 2%;
  height: 86%;
}
.stick {
  display: block; height: 100%; width: auto; overflow: visible;
  /* 白描边让黑线在照片上也看得清 */
  filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 1.5px #fff) drop-shadow(0 3px 6px rgba(0,0,0,.28));
}
/* 猫角色本身有黑色描边，不加白色描边（加了会在半透明边缘衬出一圈白边，看着像重影） */
.stick.cat { filter: drop-shadow(0 3px 6px rgba(0,0,0,.28)); }
.photo-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.92) brightness(.97); }
/* 照片底部压暗一点，人物站得更稳 */
.stage.photo .backdrop::after {
  content: ""; position: absolute; inset: 55% 0 0 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,.28));
}
/* 对话角色站在照片里的柜台后面 */
.stage.behind-counter .actor { bottom: 16%; height: 80%; }
/* 猫角色：前台和你一样高，往下站，袍子下摆落在柜台台面以下，腿和脚都被柜台挡住 */
.cats .stage.behind-counter .actor { bottom: -4%; height: 96%; }
.stage.photo .counter .photo-bg { filter: saturate(.92) brightness(.97); }
.stage.call .actor {
  right: 6%; bottom: 10%; height: 78%;
  padding: 2% 3% 0; border: 4px solid var(--ink); border-radius: 22px;
  background: rgba(255, 255, 255, .45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}
.stage.call .actor::before {
  content: "视频通话"; position: absolute; left: 50%; top: -14px; transform: translateX(-50%);
  padding: 1px 10px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; white-space: nowrap;
}
.credit {
  position: absolute; right: 10px; bottom: 6px;
  font-size: 10px; color: #fff; opacity: .8; text-shadow: 0 1px 2px rgba(0,0,0,.7);
}
.stage .counter { pointer-events: none; }

.bubble {
  position: absolute;
  right: 27%;
  top: 6%;
  max-width: 30%;
  min-width: 96px;
  padding: 12px 16px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 20px 20px 6px 20px;
  box-shadow: 3px 4px 0 rgba(35, 33, 32, .15);
}
.bubble-me {
  left: 30%; right: auto; top: 36%; max-width: 34%;
  border-radius: 20px 20px 20px 6px;
  background: #fff8e8;
  font-family: var(--hand); font-size: clamp(18px, 3.2vw, 26px); line-height: 1.2;
}
.bubble p { margin: 0; }
.bubble-en { font-family: var(--hand); font-size: clamp(18px, 3.2vw, 26px); line-height: 1.2; }
.bubble-zh { color: var(--muted); font-size: 14px; margin-top: 4px !important; }
.dots { display: inline-flex; gap: 6px; padding: 6px 0; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink); opacity: .25; }
.dots.on i { animation: dot 1s infinite; }
.dots.on i:nth-child(2) { animation-delay: .15s; }
.dots.on i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

.badge {
  position: absolute; left: 14px; top: 12px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 600;
}

/* 面板 */
.panel {
  margin-top: 16px;
  background: var(--surface);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.panel h2 { margin: 0; font-size: 20px; line-height: 1.3; }
.panel .lead { margin: 6px 0 0; color: var(--muted); }
.eyebrow { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }

.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stack > * + * { margin-top: 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border-radius: 12px; border: 0;
  font-weight: 650;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 2px 0 var(--accent-dark); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: var(--accent-soft); color: var(--accent-dark); }
.btn-secondary:hover { background: #f7d6c4; }
.btn-quiet { background: #f1ece2; color: var(--ink); }
.btn-quiet:hover { background: #e8e1d4; }
.btn-wide { width: 100%; }
.btn-record { min-height: 56px; font-size: 17px; }
.btn-record.rec { background: var(--ink); box-shadow: none; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #ff5a3c; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 12px; border-radius: 999px;
  border: 0; background: #f1ece2; font-size: 14px;
}
.chip:hover { background: #e8e1d4; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* 提示扶梯 */
.ladder { list-style: none; margin: 0; padding: 0; }
.ladder li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0;
}
.ladder li + li { border-top: 1px dashed var(--line); }
.step-no {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-dark);
  font-size: 13px; font-weight: 700; display: grid; place-items: center; margin-top: 2px;
}
.ladder .label { font-size: 13px; color: var(--muted); }
.ladder .content { font-size: 17px; }
.skeleton, .model {
  font-family: var(--hand); font-size: 26px; line-height: 1.2; letter-spacing: .01em;
}
.model { color: var(--accent-dark); }
.tip {
  padding: 12px 14px; border-radius: 12px; background: var(--good-soft); color: #2d5b43; font-size: 15px;
}
.hint-note { font-size: 14px; color: var(--muted); }
.notice {
  padding: 12px 14px; border-radius: 12px; background: #fdf0d5; color: #7a5413; font-size: 15px;
}

/* 开场的手机 */
.phone-row { display: flex; gap: 18px; align-items: center; }
.phone {
  flex: none; width: 54px; height: 92px; border: 4px solid var(--ink); border-radius: 12px;
  position: relative; background: #fff;
}
.phone::after {
  content: '3%'; position: absolute; left: 0; right: 0; bottom: 10px; text-align: center;
  font-family: var(--hand); font-size: 18px; color: #d33;
}
.phone .bat {
  position: absolute; left: 10px; right: 10px; top: 14px; height: 14px;
  border: 3px solid var(--ink); border-radius: 3px;
}
.phone .bat::before {
  content: ''; position: absolute; left: 1px; top: 1px; bottom: 1px; width: 4px; background: #e33;
  animation: pulse .9s infinite;
}

/* 总结卡 */
.card-pattern {
  padding: 18px; border-radius: 14px; background: var(--ink); color: #fff;
}
.card-pattern .big { font-family: var(--hand); font-size: 34px; line-height: 1.1; }
.card-pattern .zh { color: #cfc8bc; margin-top: 4px; }
.examples { list-style: none; margin: 0; padding: 0; }
.examples li {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
}
.examples li + li { border-top: 1px solid #f0eadf; }
.examples .en { font-family: var(--hand); font-size: 22px; line-height: 1.2; }
.examples .where { font-size: 13px; color: var(--muted); }
.play {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: var(--accent-soft); color: var(--accent-dark); font-size: 15px;
}
.effort { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.effort button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.fine { font-size: 13px; color: var(--muted); }

.demo-flag {
  display: table; margin: 0 auto 16px; padding: 4px 12px; border-radius: 999px; background: #fdf0d5; color: #7a5413; font-size: 12px;
}

@media (max-width: 560px) {
  .stage { aspect-ratio: 4 / 3.4; max-height: none; border-radius: 14px; }
  .actor { right: 4%; bottom: 2%; height: 80%; }
  .me { left: 2%; bottom: 2%; height: 80%; }
  .bubble { max-width: 50%; right: 26%; top: 4%; padding: 8px 12px; }
  .bubble-me { left: 30%; top: 40%; max-width: 50%; }
  .panel { padding: 16px; }
  .task { display: none; }
  .topbar { gap: 6px; }
  .progress { gap: 0; }
  .dot { width: 15px; }
  .place { font-size: 15px; }
  #pause { font-size: 13px; }
  /* 窄屏半身镜头推得少一点，免得你被切出画面 */
  .world[data-shot="mid"] { transform: scale(1.15); transform-origin: 50% 4%; }
  .world[data-shot="me"] { transform: scale(1.55); transform-origin: 8% 4%; }
  .world[data-shot="npc"] { transform: scale(1.55); transform-origin: 92% 4%; }
  .stage[data-shot="me"] .bubble-me { left: 50%; top: 34%; max-width: 46%; }
  .stage[data-shot="npc"] .bubble { right: 46%; }
}

/* 更多场景卡片 */
.more { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.more li {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 14px; border-radius: 14px; background: var(--paper);
}
.more li.open { background: #fff8e8; }
.more-main { flex: 1; min-width: 0; }
.more .tag { display: inline-block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.more .zh-line { font-size: 16px; font-weight: 600; }
.more .en-line { font-family: var(--hand); font-size: 22px; line-height: 1.2; margin-top: 4px; }
.more .word { font-size: 13px; color: var(--muted); margin-top: 2px; }
.more .reveal { padding: 4px 0; font-size: 13px; color: var(--accent); }
.more-act { display: flex; gap: 6px; }
mark { background: #fbd9a8; color: inherit; border-radius: 4px; padding: 0 3px; }
.star {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; font-size: 20px; color: var(--muted); cursor: pointer;
}
.star.on { color: #d99a1e; background: #fdf0d5; }

/* ---------- 每日一句：首页 ---------- */
.center { text-align: center; }
.label { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.btn-text.inline { display: inline; padding: 0 2px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.btn-text.center { display: block; margin: 0 auto; }
.btn-big { min-height: 60px; font-size: 18px; border-radius: 14px; }
.home-title { font-size: 28px; line-height: 1.15; margin-top: 2px; }

.plan-card {
  padding: 18px 20px; border-radius: 16px; background: var(--paper);
  border: 1px solid var(--line);
}
.plan-label { font-size: 13px; font-weight: 700; color: var(--accent-dark); letter-spacing: .02em; }
.plan-pattern { font-family: var(--hand); font-size: 34px; line-height: 1.1; margin-top: 6px; }
.plan-zh { font-size: 16px; color: var(--ink); margin-top: 4px; }
.plan-why { font-size: 14px; color: var(--muted); margin-top: 10px; }
.plan-card.resume .plan-pattern { font-size: 26px; }

.time-choice { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip-time {
  min-height: 40px; min-width: 64px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); font-size: 15px; color: var(--ink);
}
.chip-time:hover { background: #f6f1e6; }
.chip-time[aria-checked="true"], .chip-time[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.home-links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.home-links li { border-bottom: 1px solid var(--line); }
.home-links button {
  width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 14px 4px; border: 0; background: none; text-align: left; position: relative;
}
.home-links button::after { content: "›"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 22px; }
.home-links button:hover span { color: var(--accent-dark); }
.home-links span { font-weight: 650; font-size: 16px; }
.home-links small { color: var(--muted); font-size: 13px; }

/* ---------- 一轮练习里新增的部分 ---------- */
.ladder li.situation .step-no { background: var(--paper); color: var(--muted); }
.ladder li.situation .content { font-size: 16px; color: var(--ink); }
.reveal-model { font-family: var(--hand); font-size: 34px; line-height: 1.15; color: var(--accent-dark); }
.reveal-zh { color: var(--muted); margin-top: -4px; }
.grades { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 8px; }
.grades .btn { padding: 0 8px; min-height: 52px; font-size: 15px; }

/* ---------- 进度、路上听、真实使用 ---------- */
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.numbers div { padding: 12px 8px; border-radius: 12px; background: var(--paper); text-align: center; }
.numbers b { display: block; font-family: var(--hand); font-size: 32px; line-height: 1; }
.numbers span { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.3; }
.lv-list, .listen-list, .real-list { list-style: none; margin: 0; padding: 0; }
.lv-list li, .listen-list li { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.lv-list li + li, .listen-list li + li { border-top: 1px solid #f0eadf; }
.lv-list .en, .listen-list .en { font-family: var(--hand); font-size: 20px; line-height: 1.2; }
.lv-list .where, .listen-list .where { font-size: 13px; color: var(--muted); }
.lv-list li.lv-0 .en { color: var(--faint); }
.lv-dots { flex: none; display: grid; grid-template-columns: repeat(2, 8px); gap: 3px; }
.lv-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.lv-dots i.on { background: var(--good); }
.listen-list .num { flex: none; width: 28px; font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.real-list li + li { margin-top: 8px; }
.real-list button {
  width: 100%; display: flex; flex-direction: column; align-items: flex-start; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left;
}
.real-list button:hover { border-color: var(--good); background: var(--good-soft); }
.real-list .en { font-family: var(--hand); font-size: 22px; line-height: 1.2; }
.real-list small { color: var(--muted); }
.field { display: block; }
.field input {
  width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); font: inherit;
}
.field input:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.data-box { padding: 14px 16px; border-radius: 14px; background: var(--paper); }
.data-box p { margin: 0 0 10px; }
.file-btn { cursor: pointer; }

@media (max-width: 560px) {
  .home-title { font-size: 24px; }
  .plan-pattern { font-size: 30px; }
  .grades { grid-template-columns: 1fr 1fr; }
  .grades .btn:last-child { grid-column: 1 / -1; }
  .numbers { grid-template-columns: repeat(2, 1fr); }
}

/* 首页：舞台缩小，主按钮不用滚动；工具页不显示舞台 */
.app[data-view="home"] .stage { aspect-ratio: 16 / 9; max-height: 34vh; }
.app[data-view="util"] .stage { display: none; }
@media (max-width: 560px) {
  .app[data-view="home"] .stage { aspect-ratio: 16 / 9; max-height: none; }
}

/* ---------- 阶段一：举一反十 ---------- */
.stage-strip { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.stage-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.stage-head b { font-size: 15px; }
.stage-head span { font-size: 13px; color: var(--muted); }
.stage-cells { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin: 10px 0 8px; }
.stage-cell {
  height: 10px; border-radius: 3px;
  background: linear-gradient(to right, var(--accent-soft) var(--pct), var(--line) var(--pct));
}
.stage-cell.done { background: var(--good); }
.stage-strip .fine { margin: 0; }
.scene-goal { font-size: 22px; line-height: 1.35; margin-top: 4px; }
.pattern-progress { list-style: none; margin: 0; padding: 0; }
.pattern-progress li { display: flex; flex-direction: column; padding: 8px 0; }
.pattern-progress li + li { border-top: 1px solid #f0eadf; }
.pattern-progress .en { font-family: var(--hand); font-size: 20px; line-height: 1.2; }
.pattern-progress .where { font-size: 13px; color: var(--muted); }
/* 首页只留进度条，说明放在进度页，保证“开始”不用滚动就能点到 */
.app[data-view="home"] .stage-strip .fine { display: none; }
.app[data-view="home"] .stage-strip { padding: 10px 14px; }
.app[data-view="home"] .stage-cells { margin-bottom: 0; }
