/* ============================================================
   精读 — 样式表
   一个每天要盯 30 分钟的阅读界面，所以：行宽、行高、对比度
   都按"能连续读一小时不累"来调，不用花哨的东西。
   ============================================================ */

:root {
  --bg:          #faf8f4;
  --surface:     #ffffff;
  --surface-2:   #f3f0e9;
  --surface-3:   #eae5db;
  --text:        #1c1b19;
  --text-2:      #57534e;
  --text-3:      #8f8a82;
  --line:        #e6e1d7;
  --line-2:      #d5cec1;

  --accent:      #2f6f5e;
  --accent-ink:  #ffffff;
  --accent-soft: #e6f1ed;
  --accent-line: #b9d5cb;

  --new:         #9c5a06;
  --new-soft:    #fbf0dd;
  --new-line:    #e8cf9f;

  --marked:      #a92c22;
  --marked-soft: #fbeae7;
  --marked-line: #eec3bd;

  --ok:          #2f6f5e;
  --warn:        #9c5a06;

  --radius:      10px;
  --radius-lg:   16px;
  --shadow:      0 1px 2px rgba(28,27,25,.05), 0 4px 14px rgba(28,27,25,.06);
  --shadow-lg:   0 2px 6px rgba(28,27,25,.08), 0 18px 40px rgba(28,27,25,.14);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
           "Times New Roman", "Songti SC", serif;

  --measure: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #14161a;
    --surface:     #1c1f24;
    --surface-2:   #23272d;
    --surface-3:   #2c3138;
    --text:        #e8e6e1;
    --text-2:      #a8a49c;
    --text-3:      #7a766e;
    --line:        #2e333a;
    --line-2:      #3d434c;

    --accent:      #6ec5a8;
    --accent-ink:  #10231d;
    --accent-soft: #1b2f29;
    --accent-line: #2f5045;

    --new:         #e0a458;
    --new-soft:    #2e2519;
    --new-line:    #4d3d22;

    --marked:      #e8847a;
    --marked-soft: #33201e;
    --marked-line: #553430;

    --shadow:      0 1px 2px rgba(0,0,0,.3), 0 4px 14px rgba(0,0,0,.25);
    --shadow-lg:   0 2px 6px rgba(0,0,0,.35), 0 18px 40px rgba(0,0,0,.5);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* ── 布局 ─────────────────────────────────────────────────── */

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem max(1rem, env(safe-area-inset-left)) .5rem max(1rem, env(safe-area-inset-right));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
  min-height: 52px;
}
.topbar[hidden] { display: none; }

.topbar__title {
  font-weight: 600; font-size: .95rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar__spacer { flex: 1; }

.view {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.5rem max(1rem, env(safe-area-inset-left)) 6rem max(1rem, env(safe-area-inset-right));
}
.view--wide { max-width: 56rem; }

/* ── 排版 ─────────────────────────────────────────────────── */

.h1 { font-size: 1.7rem; line-height: 1.25; font-weight: 650; margin: 0 0 .5rem; letter-spacing: -.01em; }
.h2 { font-size: 1.15rem; font-weight: 640; margin: 2rem 0 .75rem; }
.h3 { font-size: .95rem; font-weight: 640; margin: 1.5rem 0 .5rem; }

.sub  { color: var(--text-2); font-size: .9rem; margin: 0 0 1.5rem; }
.muted { color: var(--text-3); }
.small { font-size: .85rem; }
.tiny  { font-size: .78rem; }
.mono  { font-variant-numeric: tabular-nums; }
.center { text-align: center; }

/* 英文正文：衬线体，行高放到 1.85，这是能连续读一小时不累的区间 */
.en {
  font-family: var(--serif);
  font-size: 1.14rem;
  line-height: 1.85;
  letter-spacing: .002em;
}
.cn {
  font-size: .95rem;
  line-height: 1.75;
  color: var(--text-2);
}

/* ── 按钮 ─────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .62rem 1.05rem;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: .92rem; font-weight: 550;
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .06s;
  -webkit-tap-highlight-color: transparent;
  min-height: 42px;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn--primary {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
  font-weight: 600;
}
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 88%, black); }

.btn--ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }

.btn--danger { border-color: var(--marked-line); color: var(--marked); background: transparent; }
.btn--danger:hover { background: var(--marked-soft); }
.btn--danger.is-on { background: var(--marked); color: #fff; border-color: var(--marked); }

.btn--lg { padding: .85rem 1.5rem; font-size: 1.02rem; min-height: 52px; border-radius: 12px; }
.btn--sm { padding: .35rem .7rem; font-size: .82rem; min-height: 34px; border-radius: 8px; }
.btn--block { display: flex; width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }

/* ── 卡片 / 容器 ──────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: .85rem; }
.card--flat { box-shadow: none; }
.card--pad0 { padding: 0; overflow: hidden; }

.stack > * + * { margin-top: .85rem; }
.row { display: flex; align-items: center; gap: .6rem; }
.row--between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }

/* ── 标签 / 徽章 ──────────────────────────────────────────── */

.chip {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .18rem .55rem;
  border-radius: 999px;
  font-size: .74rem; font-weight: 560;
  background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.chip--new    { background: var(--new-soft);    color: var(--new);    border-color: var(--new-line); }
.chip--accent { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.chip--marked { background: var(--marked-soft); color: var(--marked); border-color: var(--marked-line); }
.chip--plain  { background: transparent; }

/* ── 进度条 ───────────────────────────────────────────────── */

.bar {
  height: 7px; border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.bar__fill {
  height: 100%; border-radius: 999px;
  background: var(--accent);
  transition: width .3s ease;
}

/* 顶部那圈细进度 */
.topbar .bar { flex: 0 0 auto; width: 84px; }

/* ── 统计格子 ─────────────────────────────────────────────── */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: .55rem; }
.stat {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: .7rem .8rem;
}
.stat__n { font-size: 1.45rem; font-weight: 660; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat__l { font-size: .76rem; color: var(--text-3); margin-top: .1rem; }

/* ── 阅读页 ───────────────────────────────────────────────── */

.article__head { margin-bottom: 1.5rem; }
.article__src { font-size: .76rem; color: var(--text-3); margin-top: .6rem; }

.para {
  margin: 0 0 1.35rem;
  padding: .35rem .55rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background .12s;
}
.para:hover { background: var(--surface-2); }
.para.is-open { background: var(--surface-2); }

/* 句子本身不再是点击目标：整段点击看翻译，词点击进单词页。
   保留 .sent 的间距和标记样式。 */
.sent {
  position: relative;
  padding: .1rem 0;
  margin: 0 0 .25rem;
  border-radius: 7px;
  cursor: inherit;
}
.sent.is-marked {
  background: var(--marked-soft);
  box-shadow: inset 3px 0 0 var(--marked);
}

/* 生词高亮：只在"本篇生词"里，不是每个词都标 */
.w {
  border-radius: 4px;
  padding: 0 .1em;
  cursor: pointer;
  transition: background .12s;
}
.w--new {
  background: var(--new-soft);
  box-shadow: inset 0 -2px 0 var(--new-line);
}
.w:hover, .w.is-active { background: var(--new-line); }

/* 整段翻译 */
.para__cn {
  margin: .65rem 0 .15rem;
  padding: .75rem .85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-line);
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: default;
}
.para__row { padding: .45rem 0; }
.para__row + .para__row { border-top: 1px dashed var(--line-2); }
.para__row.is-marked { box-shadow: inset 3px 0 0 var(--marked); padding-left: .5rem; }

/* 句子展开后附在下面的讲解 */
.sent__panel {
  margin: .45rem 0 .1rem;
  padding: .8rem .95rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-line);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.sent__cn { font-size: .95rem; line-height: 1.8; color: var(--text-2); }

/* 意群切分 —— 这是精读页最有价值的东西 */
.chunks { margin: .7rem 0 0; display: flex; flex-direction: column; gap: .3rem; }
.chunk {
  display: flex; gap: .6rem; align-items: baseline;
  padding: .32rem .5rem;
  background: var(--surface-2);
  border-radius: 7px;
  font-size: .89rem;
}
.chunk__t { font-family: var(--serif); font-size: .95rem; flex: 1 1 auto; }
.chunk__role {
  flex: 0 0 auto; font-size: .7rem; font-weight: 600;
  color: var(--accent); background: var(--accent-soft);
  padding: .1rem .42rem; border-radius: 5px;
}
.chunk__cn { flex: 0 0 auto; color: var(--text-3); font-size: .8rem; }

.grammar {
  margin-top: .7rem; padding-top: .7rem;
  border-top: 1px dashed var(--line-2);
  font-size: .87rem; color: var(--text-2);
}
.grammar b { color: var(--accent); font-weight: 600; }

/* 段末主旨对照 */
.gist { margin-top: .9rem; }
.gist__box {
  width: 100%; min-height: 4.2rem; resize: vertical;
  padding: .6rem .7rem;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--surface); font-size: .92rem;
}
.gist__ref {
  margin-top: .5rem; padding: .6rem .75rem;
  background: var(--accent-soft); border-radius: var(--radius);
  font-size: .9rem; line-height: 1.7;
}

/* 生词气泡 */
.bubble {
  position: absolute; z-index: 30;
  width: min(21rem, calc(100vw - 2.5rem));
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: .75rem .85rem;
}
.bubble__head { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.bubble__w { font-family: var(--serif); font-size: 1.12rem; font-weight: 620; }
.bubble__ipa { color: var(--text-3); font-size: .85rem; }
.bubble__sense { margin-top: .45rem; font-size: .93rem; line-height: 1.65; }
.bubble__cue { color: var(--text-3); font-size: .82rem; font-style: italic; }
.bubble__roots { margin-top: .5rem; display: flex; flex-wrap: wrap; gap: .3rem; }
.bubble__foot { margin-top: .65rem; display: flex; gap: .4rem; align-items: center; }

/* ── 复习卡 ───────────────────────────────────────────────── */

.revcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.35rem;
  box-shadow: var(--shadow);
  text-align: center;
  min-height: 15rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .9rem;
}
.revcard__word { font-family: var(--serif); font-size: 2rem; font-weight: 620; letter-spacing: -.01em; }
.revcard__ipa  { color: var(--text-3); font-size: 1rem; }
.revcard__ctx  { font-family: var(--serif); font-size: 1.08rem; line-height: 1.8; text-align: left; }
.revcard__blank {
  display: inline-block; min-width: 5.5rem;
  border-bottom: 2px solid var(--accent);
  color: transparent;
}
.revcard__blank.is-shown { color: var(--accent); font-weight: 620; }
.revcard__answer { font-size: 1.25rem; font-weight: 600; color: var(--accent); }
.revcard__hint { color: var(--text-3); font-size: .82rem; }

/* ── 测验 ─────────────────────────────────────────────────── */

.q { margin-bottom: 1.15rem; }
.q__text { font-weight: 560; margin-bottom: .55rem; font-size: .96rem; }
.opt {
  display: flex; gap: .6rem; align-items: flex-start;
  padding: .6rem .75rem; margin-bottom: .35rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); cursor: pointer;
  font-size: .92rem; line-height: 1.6;
  transition: background .12s, border-color .12s;
}
.opt:hover { background: var(--surface-2); }
.opt__k {
  flex: 0 0 auto; width: 1.45rem; height: 1.45rem;
  display: grid; place-items: center;
  border-radius: 6px; background: var(--surface-3);
  font-size: .78rem; font-weight: 650;
}
.opt.is-right { border-color: var(--accent); background: var(--accent-soft); }
.opt.is-right .opt__k { background: var(--accent); color: var(--accent-ink); }
.opt.is-wrong { border-color: var(--marked); background: var(--marked-soft); }
.opt.is-wrong .opt__k { background: var(--marked); color: #fff; }
.opt.is-locked { cursor: default; }

.explain {
  margin-top: .4rem; padding: .55rem .7rem;
  background: var(--surface-2); border-radius: var(--radius);
  font-size: .87rem; line-height: 1.7; color: var(--text-2);
}

/* ── 摸底 ─────────────────────────────────────────────────── */

.calib__w {
  font-family: var(--serif); font-size: 1.9rem; font-weight: 600;
  text-align: center; margin: .5rem 0 1.2rem;
}

/* ── 列表 ─────────────────────────────────────────────────── */

.list { display: flex; flex-direction: column; gap: .5rem; }
.item {
  display: flex; gap: .75rem; align-items: center;
  padding: .75rem .9rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer; text-align: left; width: 100%;
  transition: border-color .12s, background .12s;
}
.item:hover { border-color: var(--line-2); background: var(--surface-2); }
.item__main { flex: 1 1 auto; min-width: 0; }
.item__t { font-weight: 570; font-size: .95rem; }
.item__s { font-size: .8rem; color: var(--text-3); margin-top: .12rem; }
.item__r { flex: 0 0 auto; text-align: right; }

/* ── 提示条 ───────────────────────────────────────────────── */

.note {
  padding: .8rem .95rem;
  border-radius: var(--radius);
  font-size: .89rem; line-height: 1.7;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.note--warn  { background: var(--new-soft);    border-color: var(--new-line); }
.note--bad   { background: var(--marked-soft); border-color: var(--marked-line); }
.note--ok    { background: var(--accent-soft); border-color: var(--accent-line); }
.note b { font-weight: 640; }

kbd {
  font-family: var(--sans); font-size: .78rem;
  padding: .1rem .38rem; border-radius: 5px;
  background: var(--surface-3); border: 1px solid var(--line-2);
}

/* ── toast ────────────────────────────────────────────────── */

.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
  z-index: 100;
  background: var(--text); color: var(--bg);
  padding: .6rem 1.05rem; border-radius: 999px;
  font-size: .87rem; box-shadow: var(--shadow-lg);
  max-width: calc(100vw - 2rem);
}
.toast[hidden] { display: none; }

/* ── 隐藏工具 ─────────────────────────────────────────────── */

[hidden] { display: none !important; }

.hr { height: 1px; background: var(--line); margin: 1.5rem 0; border: 0; }

/* ── 手机 ─────────────────────────────────────────────────── */

@media (max-width: 560px) {
  .view { padding-top: 1.1rem; }
  .h1 { font-size: 1.45rem; }
  .en { font-size: 1.08rem; line-height: 1.8; }
  .revcard { padding: 1.5rem 1rem; min-height: 13rem; }
  .revcard__word { font-size: 1.7rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .chunk { flex-wrap: wrap; }
  .chunk__cn { flex: 1 0 100%; padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media print {
  .topbar, .btn, .toast { display: none !important; }
}

/* ============================================================
   视觉层
   前面是"能读一小时的骨架"，这一层负责让它看起来值得打开。
   原则没变：装饰只放在外围（背景、顶栏、卡片边），正文区域
   不加任何会分散注意力的东西。
   ============================================================ */

:root {
  --accent-grad: linear-gradient(135deg, #2f6f5e 0%, #4a9a7f 58%, #66b598 100%);
  --accent-glow: rgba(47, 111, 94, .22);
  --wash-1: rgba(47, 111, 94, .10);
  --wash-2: rgba(185, 129, 47, .09);
  --hero-grad: linear-gradient(140deg, #ffffff 0%, #f4f8f5 52%, #e9f1ed 100%);
  --card-sheen: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 42%);
  --gold: #b9812f;
  --blue: #5c6fa8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent-grad: linear-gradient(135deg, #3d8f74 0%, #63b394 60%, #85d2b6 100%);
    --accent-glow: rgba(110, 197, 168, .16);
    --wash-1: rgba(110, 197, 168, .09);
    --wash-2: rgba(224, 164, 88, .06);
    --hero-grad: linear-gradient(140deg, #1f242a 0%, #1b2621 55%, #16231e 100%);
    --card-sheen: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, 0) 45%);
    --gold: #e0a458;
    --blue: #93a6d8;
  }
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(54rem 36rem at 6% -10%, var(--wash-1), transparent 62%),
    radial-gradient(44rem 30rem at 104% -4%, var(--wash-2), transparent 58%),
    radial-gradient(42rem 34rem at 50% 112%, var(--wash-1), transparent 66%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* ── 顶栏 ─────────────────────────────────────────────────── */

.topbar {
  box-shadow: 0 1px 0 var(--line), 0 8px 28px rgba(28, 27, 25, .045);
}
.topbar__brand {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--text); text-decoration: none;
  padding: .15rem .2rem .15rem 0;
}
.topbar__mark {
  width: 1.72rem; height: 1.72rem; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--accent-grad); color: #fff;
  font-family: var(--serif); font-size: .95rem; font-weight: 600;
  box-shadow: 0 3px 10px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.topbar__name { font-size: .88rem; font-weight: 650; letter-spacing: .06em; }
.topbar__title { font-weight: 600; }
.topbar .bar { height: 6px; background: color-mix(in srgb, var(--surface-3) 70%, transparent); }
.topbar .bar__fill { background: var(--accent-grad); }

/* ── 页面进入 ─────────────────────────────────────────────── */

@keyframes jd-rise {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.view { animation: jd-rise .26s ease both; }

/* ── 按钮 ─────────────────────────────────────────────────── */

.btn { transition: background .12s, border-color .12s, transform .12s, box-shadow .12s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--accent-grad);
  border-color: transparent;
  color: var(--accent-ink);
  font-weight: 650;
  box-shadow: 0 6px 18px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn--primary:hover { background: var(--accent-grad); filter: brightness(1.045); }
.btn--lg { letter-spacing: .01em; }
.btn--ghost:focus-visible { outline-offset: 1px; }

/* ── 卡片 ─────────────────────────────────────────────────── */

.card {
  background-image: var(--card-sheen);
  border-color: var(--line);
}
.card--flat { background-image: none; }

/* ── 今日页的问候区与进度环 ───────────────────────────────── */

.hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-lg) + 4px);
  background: var(--hero-grad);
  box-shadow: var(--shadow);
}
.hero::after {
  content: ''; position: absolute; right: -3.5rem; top: -4.5rem;
  width: 13rem; height: 13rem; border-radius: 50%;
  background: radial-gradient(circle, var(--wash-1), transparent 68%);
  pointer-events: none;
}
.hero__main { position: relative; z-index: 1; min-width: 0; }
.hero__eyebrow {
  font-size: .7rem; font-weight: 700; letter-spacing: .18em;
  color: var(--accent); margin-bottom: .18rem;
}

.ring {
  --size: 5.7rem;
  position: relative; z-index: 1; flex: 0 0 auto;
  width: var(--size); height: var(--size);
  border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(28, 27, 25, .08);
}
.ring__inner {
  width: calc(var(--size) - 13px); height: calc(var(--size) - 13px);
  border-radius: 50%;
  background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px var(--line);
}
.ring__n {
  font-size: 1.12rem; font-weight: 700; line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.ring__l { font-size: .58rem; color: var(--text-3); letter-spacing: .05em; margin-top: .1rem; }
.ring--done .ring__n { color: var(--accent); }
.ring--empty .ring__n { color: var(--text-3); font-weight: 600; }

/* ── 统计格子 ─────────────────────────────────────────────── */

.stat {
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: .8rem .9rem .75rem 1.05rem;
}
.stat::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent); opacity: .75;
}
.stats .stat:nth-child(2)::before { background: var(--new); }
.stats .stat:nth-child(3)::before { background: var(--blue); }
.stats .stat:nth-child(4)::before { background: var(--marked); }
.stat__n { font-size: 1.6rem; letter-spacing: -.01em; }
.stat__l { font-size: .74rem; margin-top: .15rem; }

/* ── 底部导航 ─────────────────────────────────────────────── */

.navrow { gap: .42rem; }
.navrow .btn {
  flex: 1 1 auto; min-width: 4.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-2);
  box-shadow: 0 1px 2px rgba(28, 27, 25, .04);
}
.navrow .btn:hover {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

/* ── 列表 ─────────────────────────────────────────────────── */

.list .item {
  border-left: 3px solid transparent;
  transition: border-color .12s, background .12s, transform .12s;
}
.list .item:hover {
  border-left-color: var(--accent-line);
  transform: translateX(2px);
}
.item__t { font-weight: 600; }

/* 书架上的小书脊：纯装饰，让一列条目不至于像账单 */
.item .cover {
  flex: 0 0 auto; width: 2.35rem; height: 2.9rem;
  display: grid; place-items: center;
  border-radius: 7px;
  font-family: var(--serif); font-size: 1.02rem; color: #fff;
  background: var(--accent-grad);
  box-shadow: 0 2px 8px rgba(28, 27, 25, .14), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.list .item:nth-child(3n+2) .cover { background: linear-gradient(150deg, #8a5a2b, #c98a3c); }
.list .item:nth-child(3n)   .cover { background: linear-gradient(150deg, #4c5f96, #7b8fc7); }

/* ── 阅读页 ───────────────────────────────────────────────── */

.sent.is-open { box-shadow: inset 3px 0 0 var(--accent-line); }
.sent__panel {
  box-shadow: 0 2px 10px rgba(28, 27, 25, .045), inset 0 1px 0 var(--surface);
}
.chunk__role { letter-spacing: .02em; }
.w--new { border-radius: 5px; }

/* ── 复习卡 ───────────────────────────────────────────────── */

.revcard {
  position: relative; overflow: hidden;
  background: var(--hero-grad);
}
.revcard::before {
  content: ''; position: absolute; left: 50%; top: -6rem;
  width: 18rem; height: 18rem; margin-left: -9rem; border-radius: 50%;
  background: radial-gradient(circle, var(--wash-1), transparent 68%);
  pointer-events: none;
}
.revcard > * { position: relative; z-index: 1; }
.revcard__word { font-size: 2.15rem; }

/* 新词卡：这张是"讲一遍"，不是考试。标题和原句都比考题卡安静 */
.revcard--learn { background: var(--surface); }
.revcard--learn .revcard__blank {
  min-width: 0; padding: 0 .15rem;
  border-bottom: 0; border-radius: 4px;
  background: var(--accent-soft, var(--surface-3));
  color: var(--accent);
}
.revcard--learn .revcard__ctx { line-height: 1.9; }
.revcard--learn .btn-row { width: 100%; }

/* ── 摸底 ─────────────────────────────────────────────────── */

.calib__w { font-size: 2.25rem; letter-spacing: -.01em; }

/* ── 提示条 ───────────────────────────────────────────────── */

.note { border-left: 3px solid var(--line-2); }
.note--warn { border-left-color: var(--new); }
.note--bad  { border-left-color: var(--marked); }
.note--ok   { border-left-color: var(--accent); }

/* ── 表单控件 ─────────────────────────────────────────────── */

input[type="range"] { accent-color: var(--accent); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

/* ── 手机 ─────────────────────────────────────────────────── */

@media (max-width: 560px) {
  .topbar__name { display: none; }
  .hero { padding: 1rem 1.05rem; }
  .ring { --size: 4.9rem; }
  .ring__n { font-size: .98rem; }
  .stat__n { font-size: 1.4rem; }
  .navrow { gap: .32rem; }
  .navrow .btn { min-width: 0; padding: .35rem .5rem; }
}