/* ==========================================================================
   六级冲刺 · 设计系统
   克制、留白、单一强调色。参考 Apple / Notion / Linear 的界面语言。
   ========================================================================== */

:root {
    /* —— 底色：冷调白，给内容让位 —— */
    --bg:         #F7F7F9;
    --surface:    #FFFFFF;
    --elevated:   #FFFFFF;
    --surface-2:  #F2F2F5;
    --surface-3:  #E8E8ED;

    /* —— 描边：三级层次，取代大面积色块 —— */
    --border:     #EBEBEF;
    --border-2:   #DCDCE3;
    --border-3:   #C8C8D2;

    /* —— 文字：四级灰阶 —— */
    --text:       #16161A;
    --text-2:     #55555F;
    --text-3:     #8E8E99;
    --ink-soft:   #6B6B76;

    /* —— 品牌色：深青绿，仅用于主操作与激活态 —— */
    --accent:     #0E6E63;
    --accent-h:   #0B5A51;
    --accent-soft:#EAF6F4;
    --accent-line:#C4E4DF;

    /* —— 语义色 —— */
    --ok:         #12805C;
    --ok-soft:    #E9F6F1;
    --err:        #C0392B;
    --err-soft:   #FCEEEC;
    --warn:       #B4791A;
    --warn-soft:  #FDF6E7;

    /* —— 阴影：更柔，只做层次不做装饰 —— */
    --sh-1: 0 1px 2px rgba(22,22,26,.04);
    --sh-2: 0 1px 3px rgba(22,22,26,.055), 0 4px 14px rgba(22,22,26,.035);
    --sh-3: 0 12px 32px rgba(22,22,26,.09), 0 2px 8px rgba(22,22,26,.04);

    /* —— 圆角 —— */
    --r-sm: 8px;
    --r:    12px;
    --r-lg: 16px;

    --topbar-h: 56px;
    --tabbar-h: 62px;
    --fs-scale: 1;
    --font-en: "Iowan Old Style", "Charter", "Source Serif Pro", Georgia, "Times New Roman", serif;
    --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
    --ease: cubic-bezier(.32, .72, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
      --bg:         #0C0C0F;
      --surface:    #16161A;
      --elevated:   #1C1C21;
      --surface-2:  #1F1F25;
      --surface-3:  #2A2A32;

      --border:     #26262E;
      --border-2:   #33333D;
      --border-3:   #45454F;

      --text:       #F4F4F6;
      --text-2:     #A6A6B0;
      --text-3:     #71717C;
      --ink-soft:   #8E8E99;

      --accent:     #2AB3A0;
      --accent-h:   #3FC9B5;
      --accent-soft:#0A2723;
      --accent-line:#17564D;

      --ok:         #35C08D;
      --ok-soft:    #082419;
      --err:        #F07167;
      --err-soft:   #2A1512;
      --warn:       #E0A83C;
      --warn-soft:  #2A2010;

      --sh-1: 0 1px 2px rgba(0,0,0,.4);
      --sh-2: 0 1px 3px rgba(0,0,0,.5), 0 4px 14px rgba(0,0,0,.3);
      --sh-3: 0 12px 32px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.35);
  }
}

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

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: calc(15.5px * var(--fs-scale));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

/* ---------- 图标 ---------- */
.ic { display: block; flex: none; }
.ic.inline { display: inline-block; vertical-align: -.15em; }

/* ---------- 布局 ---------- */
#app { min-height: 100vh; display: flex; flex-direction: column; }

#topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  height: calc(var(--topbar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 16px 0;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease);
}
#topbar.scrolled { border-bottom-color: var(--border); }

#pageTitle {
  flex: 1; margin: 0;
  font-size: 1rem; font-weight: 600;
  letter-spacing: -.015em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#topRight { display: flex; align-items: center; gap: 6px; }

#view {
  flex: 1; width: 100%;
  max-width: 760px; margin: 0 auto;
  padding: calc(var(--topbar-h) + env(safe-area-inset-top) + 20px) 18px
           calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 32px);
}

#tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 9px 0 8px;
  border: 0; background: none; cursor: pointer;
  font-family: inherit; font-size: .6875rem; font-weight: 500;
  letter-spacing: .01em;
  color: var(--text-3);
  transition: color .18s var(--ease);
}
.tab .ic { transition: transform .22s var(--ease), opacity .18s; opacity: .9; }
.tab:active .ic { transform: scale(.9); }
.tab.active { color: var(--accent); font-weight: 600; }
.tab.active .ic { opacity: 1; }
@media (hover: hover) {
  .tab:hover { color: var(--text-2); }
  .tab.active:hover { color: var(--accent-h); }
}

/* ---------- 排版 ---------- */
h2 {
  font-size: 1.375rem; font-weight: 640; line-height: 1.25;
  letter-spacing: -.022em; margin: 0 0 6px;
}
h3 {
  font-size: .9375rem; font-weight: 620; line-height: 1.35;
  letter-spacing: -.008em; margin: 0 0 8px;
}
p { margin: 0 0 10px; }
.muted { color: var(--text-2); font-size: .875rem; line-height: 1.55; }
.tiny  { color: var(--text-3); font-size: .75rem; line-height: 1.5; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin: 26px 0 10px;
}
.section-head:first-child { margin-top: 0; }
.section-head h3 { margin: 0; }

/* ---------- 容器 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
  margin-bottom: 12px;
}
.card.tight { padding: 14px 16px; }
.card.flat { background: var(--surface-2); border-color: transparent; }

.divider { height: 1px; background: var(--border); margin: 16px 0; border: 0; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface); color: var(--text);
  font-family: inherit; font-size: .875rem; font-weight: 550;
  letter-spacing: -.005em;
  cursor: pointer;
  transition: background .16s var(--ease), border-color .16s var(--ease),
              transform .1s var(--ease), box-shadow .16s var(--ease);
}
@media (hover: hover) {
  .btn:hover { background: var(--surface-2); border-color: var(--border-2); }
}
.btn:active { transform: scale(.975); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn.primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: var(--sh-1);
}
@media (hover: hover) {
  .btn.primary:hover { background: var(--accent-h); border-color: var(--accent-h); }
}
.btn.ghost { background: none; border-color: transparent; color: var(--accent); }
@media (hover: hover) { .btn.ghost:hover { background: var(--accent-soft); } }
.btn.danger { color: var(--err); background: none; }
@media (hover: hover) { .btn.danger:hover { background: var(--err-soft); border-color: var(--err-soft); } }
.btn.block { width: 100%; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: .8125rem; border-radius: 7px; }
.btn.lg { min-height: 48px; padding: 0 22px; font-size: .9375rem; border-radius: 10px; }
.btn:disabled, .btn[disabled] { opacity: .4; cursor: default; transform: none; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--text-2);
  cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease), transform .1s;
}
@media (hover: hover) { .icon-btn:hover { background: var(--surface-2); color: var(--text); } }
.icon-btn:active { transform: scale(.92); }

/* 选项组：横向排列的小按钮 */
.seg {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--surface-2); border-radius: 10px;
}
.seg > button {
  border: 0; background: none; cursor: pointer;
  padding: 6px 13px; border-radius: 7px;
  font-family: inherit; font-size: .8125rem; font-weight: 550;
  color: var(--text-2);
  transition: background .16s var(--ease), color .16s var(--ease), box-shadow .16s;
}
.seg > button.on {
  background: var(--surface); color: var(--text);
  box-shadow: var(--sh-1);
}

/* ---------- 标签 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 6px;
  background: var(--surface-2); color: var(--text-2);
  font-size: .6875rem; font-weight: 560; letter-spacing: .005em;
  white-space: nowrap;
}
.badge.ok   { background: var(--ok-soft);   color: var(--ok); }
.badge.err  { background: var(--err-soft);  color: var(--err); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.acc  { background: var(--accent-soft); color: var(--accent); }

/* ---------- 栅格 / 行 ---------- */
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grow { flex: 1; min-width: 0; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 430px) { .grid3 { grid-template-columns: repeat(3, 1fr); gap: 8px; } }

/* ---------- 指标 ---------- */
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 14px;
}
.stat .v {
  font-size: 1.5rem; font-weight: 660; line-height: 1.1;
  letter-spacing: -.028em; font-variant-numeric: tabular-nums;
}
.stat .l { font-size: .75rem; color: var(--text-3); margin-top: 3px; font-weight: 500; }

/* 首页主视觉 */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  padding: 22px 20px;
  margin-bottom: 18px;
  background: linear-gradient(140deg, #0F766E 0%, #0D9488 55%, #14B8A6 100%);
  color: #fff;
  box-shadow: var(--sh-2);
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 88% 0%, rgba(255,255,255,.22), transparent 55%);
  pointer-events: none;
}
.hero .eyebrow {
  font-size: .6875rem; font-weight: 600; letter-spacing: .09em;
  text-transform: uppercase; opacity: .8;
}
.hero .title {
  font-size: 1.875rem; font-weight: 700; line-height: 1.12;
  letter-spacing: -.035em; margin: 6px 0 10px;
}
.hero .meta { font-size: .8125rem; opacity: .9; display: flex; gap: 14px; flex-wrap: wrap; }
.hero .meta b { font-weight: 650; }

/* 倒计时数字 */
.hero .countdown {
  display: flex; align-items: baseline; gap: 8px;
  margin: 4px 0 10px;
}
.hero .countdown .num {
  font-size: 3.25rem; font-weight: 720;
  line-height: 1; letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
}
.hero .countdown .unit {
  font-size: 1.0625rem; font-weight: 600; opacity: .85;
}
@media (max-width: 420px) {
  .hero .countdown .num { font-size: 2.75rem; }
}
@media (prefers-color-scheme: dark) {
  .hero { background: linear-gradient(140deg, #115E59 0%, #0F766E 55%, #0D9488 100%); }
}

.bar { height: 5px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar > i {
  display: block; height: 100%; border-radius: 999px;
  background: var(--accent);
  transition: width .5s var(--ease);
}

/* ---------- 英文正文（阅读题）---------- */
.passage {
  font-family: var(--font-en);
  font-size: 1.0625rem;
  line-height: 1.8;
  letter-spacing: .002em;
  color: var(--text);
  max-width: 66ch;
  margin: 0 auto;
}
.passage p { margin: 0 0 .85em; text-indent: 1.5em; }
.passage p:first-child { text-indent: 0; }
.passage .para-tag {
  display: inline-block;
  font-family: var(--font-ui); font-size: .6875rem; font-weight: 700;
  color: var(--accent); text-indent: 0;
  margin-right: .5em; vertical-align: .08em;
}

.blank {
  display: inline-block; min-width: 3.2em; padding: 0 .3em;
  border-bottom: 1.5px solid var(--accent-line);
  text-align: center;
  font-family: var(--font-ui); font-size: .8125rem; font-weight: 620;
  color: var(--accent); vertical-align: baseline;
}
.blank.filled { background: var(--accent-soft); border-radius: 3px 3px 0 0; }
.blank.wrong  { color: var(--err); border-color: var(--err); background: var(--err-soft); }

.w {
  border-bottom: 1px dotted color-mix(in srgb, var(--accent) 45%, transparent);
  cursor: pointer;
}
.w.known { border-bottom-color: transparent; }

/* ---------- 听力音频 ---------- */
.audio-card { padding: 14px 16px; }
.audio-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.audio-title {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .8125rem; font-weight: 620; color: var(--text);
}
.audio-title .ic { color: var(--accent); }
.audio-card audio {
  width: 100%; height: 40px; display: block;
  border-radius: 8px;
}
.audio-tools { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.audio-tools .btn { font-variant-numeric: tabular-nums; }
.audio-note {
  font-size: .75rem; line-height: 1.6; color: var(--text-3);
  background: var(--surface-2); border-radius: 7px;
  padding: 7px 10px; margin-bottom: 10px;
}
a.btn { text-decoration: none; }

/* ---------- 听力（严格按官方卷面：只印选项）---------- */
.note-bar {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 13px; margin-bottom: 12px;
  background: var(--surface-2); border-radius: 10px;
  font-size: .8125rem; line-height: 1.6; color: var(--text-2);
}
.note-bar .ic { margin-top: 1px; color: var(--text-3); flex: none; }
.note-bar b { color: var(--text); font-weight: 600; }

.lsection { margin-bottom: 26px; }
.lsection-head {
  display: flex; align-items: baseline; gap: 8px;
  padding: 0 0 10px; margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.lsection-head > span:first-child {
  font-size: .8125rem; font-weight: 660; letter-spacing: .02em;
  color: var(--text);
}
.lsection-head .muted { font-size: .75rem; }

.lg { margin-bottom: 20px; }
.lg-head {
  font-size: .8125rem; line-height: 1.6; color: var(--text-3);
  margin-bottom: 12px;
}

/* 题干占位：作答前只有题号 */
.q .stem.stem-hidden .stem-slot {
  display: inline-block; min-width: 62%;
  border-bottom: 1px dashed var(--border-2);
  color: transparent;
}
.q .stem-slot .stem-src {
  font-family: var(--font-ui); font-size: .6875rem; font-weight: 500;
  color: var(--text-3); margin-left: 7px;
  border: 1px solid var(--border); border-radius: 5px;
  padding: 1px 6px; white-space: nowrap;
}


.q { margin: 0 0 22px; }
.q .stem {
  font-family: var(--font-en); font-size: 1rem; line-height: 1.62;
  font-weight: 500; margin: 0 0 11px;
}
.q .stem .n {
  font-family: var(--font-ui); font-size: .8125rem; font-weight: 700;
  color: var(--accent); margin-right: 6px;
  font-variant-numeric: tabular-nums;
}

.opt {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 11px 14px; margin-bottom: 7px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  font-family: var(--font-en); font-size: .9375rem; line-height: 1.55;
  transition: border-color .16s var(--ease), background .16s var(--ease),
              transform .1s var(--ease);
}
@media (hover: hover) {
  .opt:hover { border-color: var(--border-2); background: var(--surface-2); }
}
.opt:active { transform: scale(.994); }
.opt .k {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 21px; height: 21px; margin-top: 1px;
  border-radius: 6px;
  background: var(--surface-2); color: var(--text-2);
  font-family: var(--font-ui); font-size: .6875rem; font-weight: 700;
  transition: background .16s, color .16s;
}
.opt.sel     { border-color: var(--accent); background: var(--accent-soft); }
.opt.sel     .k { background: var(--accent); color: #fff; }
.opt.correct { border-color: var(--ok); background: var(--ok-soft); }
.opt.correct .k { background: var(--ok); color: #fff; }
.opt.wrong   { border-color: var(--err); background: var(--err-soft); }
.opt.wrong   .k { background: var(--err); color: #fff; }
.opt.dim { opacity: .5; }

/* 解析块 */
.explain {
  margin-top: 11px; padding: 13px 15px;
  background: var(--surface-2);
  border-left: 2px solid var(--accent);
  border-radius: 0 10px 10px 0;
  font-size: .875rem; line-height: 1.72;
  animation: reveal .26s var(--ease);
}
@keyframes reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.explain .lbl {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .6875rem; font-weight: 680; letter-spacing: .03em;
  color: var(--accent); margin-bottom: 6px;
}
.explain .zh { color: var(--text-2); font-size: .8125rem; line-height: 1.75; }
.explain .you { color: var(--err); }

/* 双语对照 */
.bi { display: grid; gap: 3px; margin-bottom: 14px; }
.bi .en { font-family: var(--font-en); font-size: 1rem; line-height: 1.72; }
.bi .zh { font-size: .875rem; line-height: 1.72; color: var(--text-2); }
.bi.hidden .zh { filter: blur(5px); user-select: none; cursor: pointer; }

/* ---------- 列表 ---------- */
.list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.li {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 13px 15px;
  border: 0; border-bottom: 1px solid var(--border);
  background: var(--surface); color: var(--text);
  font-family: inherit; font-size: .9375rem; text-align: left;
  cursor: pointer;
  transition: background .16s var(--ease);
}
.li:last-child { border-bottom: 0; }
@media (hover: hover) { .li:hover { background: var(--surface-2); } }
.li:active { background: var(--surface-3); }
.li .lead {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 34px; height: 34px;
  border-radius: 9px; background: var(--surface-2); color: var(--text-2);
}
.li .lead.acc { background: var(--accent-soft); color: var(--accent); }
.li .t { font-weight: 560; letter-spacing: -.008em; }
.li .s { font-size: .75rem; color: var(--text-3); margin-top: 2px; line-height: 1.45; }
.li .trail { flex: none; color: var(--text-3); }
.li.static { cursor: default; }
@media (hover: hover) { .li.static:hover { background: var(--surface); } }

/* ---------- 单词卡 ---------- */
.wcard {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px; margin-bottom: 10px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
@media (hover: hover) {
  .wcard:hover { border-color: var(--border-2); box-shadow: var(--sh-1); }
}
.wcard .hw {
  font-family: var(--font-en); font-size: 1.3125rem; font-weight: 600;
  letter-spacing: -.018em; line-height: 1.2;
}
.wcard .ipa {
  font-family: var(--font-ui); font-size: .8125rem; color: var(--accent);
  margin-top: 1px; font-variant-numeric: tabular-nums;
}
.wcard .def { margin-top: 9px; font-size: .9375rem; line-height: 1.65; color: var(--text); }
.wcard .ex {
  margin-top: 8px; font-family: var(--font-en); font-style: italic;
  font-size: .8125rem; line-height: 1.6; color: var(--text-2);
}

.speak {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--border); border-radius: 50%;
  background: var(--surface); color: var(--text-2);
  cursor: pointer;
  transition: background .16s var(--ease), color .16s var(--ease),
              border-color .16s, transform .1s;
}
@media (hover: hover) {
  .speak:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
}
.speak:active { transform: scale(.9); }
.speak.playing {
  background: var(--accent); color: #fff; border-color: var(--accent);
  animation: pulse 1.1s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .72; } }

/* ---------- 拼写 ---------- */
.spell-box {
  display: flex; flex-wrap: wrap; gap: 4px; justify-content: center;
  margin: 22px 0 14px;
}
.slot {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 42px;
  border-bottom: 2px solid var(--border-2);
  font-family: var(--font-en); font-size: 1.375rem; font-weight: 600;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.slot.on  { border-color: var(--accent); }
.slot.ok  { border-color: var(--ok); color: var(--ok); }
.slot.bad { border-color: var(--err); color: var(--err); }
.slot.space { border: 0; width: 14px; }

.spell-input {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid var(--border); border-radius: 11px;
  background: var(--surface); color: var(--text);
  font-family: var(--font-en); font-size: 1.125rem; letter-spacing: .04em;
  text-align: center;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.spell-input::placeholder { color: var(--text-3); letter-spacing: 0; }
.spell-input:focus {
  outline: 0; border-color: var(--accent);
  box-shadow: 0 0 0 3.5px var(--accent-soft);
}

/* ---------- 表单控件 ---------- */
select.btn, input.btn { appearance: none; padding-right: 30px; }
select.btn {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A1A1AA' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
input[type=range] {
  appearance: none; height: 4px; border-radius: 999px;
  background: var(--surface-3); outline: 0;
}
input[type=range]::-webkit-slider-thumb {
  appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border-2);
  box-shadow: var(--sh-1); cursor: pointer;
  transition: transform .12s var(--ease);
}
input[type=range]::-webkit-slider-thumb:active { transform: scale(1.12); }
input[type=checkbox] { accent-color: var(--accent); }

/* ---------- 提示 / 空态 / 加载 ---------- */
.toast {
  position: fixed; left: 50%; z-index: 200;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 20px);
  transform: translateX(-50%);
  padding: 10px 20px; border-radius: 999px;
  background: color-mix(in srgb, var(--text) 92%, transparent);
  color: var(--bg); backdrop-filter: blur(12px);
  font-size: .8125rem; font-weight: 550; letter-spacing: -.005em;
  box-shadow: var(--sh-3);
  animation: toastIn .28s var(--ease);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.96); }
}

.empty { text-align: center; padding: 52px 24px; color: var(--text-3); }
.empty .ic-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; margin-bottom: 14px;
  border-radius: 14px; background: var(--surface-2); color: var(--text-3);
}
.empty .title { color: var(--text-2); font-size: .9375rem; font-weight: 550; margin-bottom: 4px; }
.empty .hint { font-size: .8125rem; line-height: 1.6; }

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

.blurred { filter: blur(6px); user-select: none; cursor: pointer; transition: filter .28s var(--ease); }
mark { background: color-mix(in srgb, var(--warn) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }

/* ---------- 移动端适配 ---------- */
@media (max-width: 420px) {
  #view { padding-left: 15px; padding-right: 15px; }
  .card { padding: 16px; }
  h2 { font-size: 1.25rem; }
  .hero { padding: 20px 18px; }
  .hero .title { font-size: 1.625rem; }
  .stat { padding: 12px; }
  .stat .v { font-size: 1.3125rem; }
  .slot { width: 26px; height: 38px; font-size: 1.1875rem; }
  .passage { font-size: 1.03125rem; }
}

@media (min-width: 768px) {
  #view { padding-top: calc(var(--topbar-h) + 28px); }
  #tabbar {
    max-width: 760px; margin: 0 auto;
    border-left: 1px solid var(--border); border-right: 1px solid var(--border);
    border-radius: var(--r) var(--r) 0 0;
  }
}

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: var(--border-2); border-radius: 999px;
  border: 3px solid var(--bg); background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-3); background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* 尊重「减少动效」 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   学习产品化组件 —— 进度、连续天数、今日目标
   ========================================================================== */

/* ---------- 做题进度条 ---------- */
.progress-strip {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 12px;
}
.sp-bar {
  flex: 1; height: 6px; border-radius: 99px;
  background: var(--surface-3); overflow: hidden;
}
.sp-fill {
  display: block; height: 100%; width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-h) 100%);
  transition: width .38s cubic-bezier(.22,.61,.36,1);
}
.sp-text {
  font-size: .75rem; font-weight: 640; color: var(--text-3);
  font-variant-numeric: tabular-nums; min-width: 54px; text-align: right;
}
.progress-strip.done .sp-text { color: var(--ok); }
.progress-strip.done .sp-fill { background: var(--ok); }

/* ---------- 今日学习面板 ---------- */
.today {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--sh-1);
}
.today-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.today-title {
  display: flex; align-items: center; gap: 8px;
  font-size: .9375rem; font-weight: 660; color: var(--text);
}
.today-title .ic { color: var(--accent); }
.streak {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .75rem; font-weight: 640;
  color: var(--text-2); background: var(--surface-2);
  border-radius: 99px; padding: 4px 10px;
}
.streak .ic { color: var(--warn); }

/* 今日目标环 */
.goal-row { display: flex; align-items: center; gap: 16px; }
.goal-ring { flex: 0 0 68px; position: relative; }
.goal-ring svg { display: block; transform: rotate(-90deg); }
.goal-ring .ring-bg { stroke: var(--surface-3); }
.goal-ring .ring-fg {
  stroke: var(--accent); stroke-linecap: round;
  transition: stroke-dashoffset .5s cubic-bezier(.22,.61,.36,1);
}
.goal-ring .ring-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .8125rem; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.goal-copy { flex: 1; min-width: 0; }
.goal-copy .g-main { font-size: .875rem; font-weight: 620; color: var(--text); margin-bottom: 3px; }
.goal-copy .g-sub  { font-size: .75rem; color: var(--text-3); line-height: 1.55; }

/* 今日指标 */
.metrics {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--border-2);
  border-radius: var(--r); overflow: hidden;
  margin-top: 16px;
}
.metric {
  background: var(--surface); padding: 12px 10px; text-align: center;
}
.metric .m-val {
  font-size: 1.25rem; font-weight: 720; color: var(--text);
  font-variant-numeric: tabular-nums; line-height: 1.2;
}
.metric .m-lab { font-size: .6875rem; color: var(--text-3); margin-top: 3px; }

/* ---------- 名言卡 ---------- */
.quote {
  text-align: center;
  padding: 22px 20px 20px;
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--accent-soft) 0%, var(--surface) 62%);
  border: 1px solid var(--accent-line);
}
.quote-en {
  font-family: var(--font-en);
  font-size: 1.0625rem; line-height: 1.55;
  font-weight: 600; color: var(--text);
  letter-spacing: -.005em;
}
.quote-zh {
  font-size: .75rem; color: var(--text-3);
  margin-top: 7px; line-height: 1.6;
}

/* ---------- 学习路径 ---------- */
.path { display: grid; gap: 8px; }
.path-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  cursor: pointer;
  transition: border-color .16s, box-shadow .16s, transform .16s;
}
.path-item:hover {
  border-color: var(--accent-line);
  box-shadow: var(--sh-1);
  transform: translateY(-1px);
}
.path-item.done { background: var(--ok-soft); border-color: transparent; }
.path-num {
  flex: 0 0 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700;
  background: var(--surface-2); color: var(--text-2);
}
.path-item.done .path-num { background: var(--ok); color: #fff; }
.path-body { flex: 1; min-width: 0; }
.path-title { font-size: .875rem; font-weight: 620; color: var(--text); }
.path-desc  { font-size: .75rem; color: var(--text-3); margin-top: 2px; }
.path-arrow { color: var(--text-3); flex: 0 0 auto; }

/* ---------- 顶栏右上角：联系站主 ---------- */
.topbar-right { display: flex; align-items: center; gap: 6px; }
.top-contact {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .75rem; font-weight: 600; color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 99px; padding: 6px 11px;
  cursor: pointer; white-space: nowrap;
  transition: background .16s, color .16s, border-color .16s;
}
.top-contact:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.top-contact .ic { color: currentColor; }
@media (max-width: 380px) { .top-contact span { display: none; } .top-contact { padding: 7px; } }

/* ---------- 完成反馈 ---------- */
.celebrate {
  text-align: center; padding: 24px 18px;
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--ok-soft) 0%, var(--surface) 70%);
  border: 1px solid var(--ok-soft);
}
.celebrate .c-ic {
  width: 44px; height: 44px; margin: 0 auto 12px;
  border-radius: 50%; background: var(--ok); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.celebrate .c-title { font-size: 1rem; font-weight: 680; color: var(--text); }
.celebrate .c-sub { font-size: .8125rem; color: var(--text-3); margin-top: 5px; line-height: 1.6; }

/* 空状态图标容器统一 */
.empty .ic-wrap {
  width: 52px; height: 52px; margin: 0 auto 14px;
  border-radius: 50%; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
}

/* ==========================================================================
   视觉精修 —— 收敛绿色用量，强化中性层次
   ========================================================================== */

/* 徽章：默认中性，仅「真题高频」用品牌色 */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .6875rem; font-weight: 620; letter-spacing: .01em;
  padding: 3px 8px; border-radius: 6px;
  background: var(--surface-2); color: var(--text-2);
  border: 1px solid transparent;
}
.badge.acc  { background: var(--accent-soft); color: var(--accent); }
.badge.ok   { background: var(--ok-soft);     color: var(--ok); }
.badge.warn { background: var(--warn-soft);   color: var(--warn); }

/* 题型标签页：未选中为中性描边，选中才用品牌色 */
#secTabs .btn {
  background: var(--surface); border: 1px solid var(--border-2);
  color: var(--text-2); font-weight: 560;
}
#secTabs .btn:hover { border-color: var(--border-3); color: var(--text); }
#secTabs .btn.primary {
  background: var(--accent); border-color: var(--accent);
  color: #fff; font-weight: 620;
  box-shadow: 0 1px 2px rgba(14,110,99,.22);
}

/* 通用按钮：次级为白底描边，主按钮才实心 */
.btn {
  background: var(--surface);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-weight: 560;
  transition: background .15s var(--ease), border-color .15s var(--ease),
              color .15s var(--ease), box-shadow .15s var(--ease);
}
.btn:hover  { border-color: var(--border-3); background: var(--surface-2); }
.btn:active { transform: translateY(.5px); }
.btn.primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 1px 2px rgba(14,110,99,.22);
}
.btn.primary:hover { background: var(--accent-h); border-color: var(--accent-h); }

/* 卡片：靠描边和微阴影做层次，不靠色块 */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: none;
}
.card + .card { margin-top: 10px; }

/* 顶部导航：白底细线，去掉色块 */
#topbar {
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
#topbar.scrolled { border-bottom-color: var(--border); }

/* 底部标签栏 */
#tabbar {
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--border);
}
#tabbar .tab { color: var(--text-3); }
#tabbar .tab.active { color: var(--accent); }

/* 选项按钮：中性底 + 清晰选中态 */
.opt {
  background: var(--surface);
  border: 1px solid var(--border-2);
  color: var(--text);
  transition: border-color .14s var(--ease), background .14s var(--ease);
}
.opt:hover { border-color: var(--border-3); background: var(--surface-2); }
.opt.correct { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); font-weight: 580; }
.opt.wrong   { border-color: var(--err); background: var(--err-soft); color: var(--err); }
.opt.dim     { opacity: .42; }

/* 题目块：当前题用左侧细线标记，不用大片底色 */
.q {
  border-left: 2px solid transparent;
  padding-left: 12px; margin-left: -14px;
  transition: border-color .2s var(--ease);
}
.q[data-done="1"] { border-left-color: var(--ok); }

/* 释义与释义框 */
.explain {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-2);
}

/* 段落标记：弱化 */
.para-tag {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; margin-right: 8px;
  border-radius: 5px; background: var(--surface-3); color: var(--text-2);
  font-size: .6875rem; font-weight: 680;
  vertical-align: 2px;
}

/* 空白标记：细下划线而非绿块 */
.blank {
  display: inline-block; min-width: 58px;
  border-bottom: 1.5px dashed var(--accent);
  color: var(--accent); font-weight: 660;
  text-align: center; margin: 0 2px;
}

/* ==========================================================================
   弹层 / 底部抽屉
   ========================================================================== */
.sheet-wrap {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: flex-end; justify-content: center;
  pointer-events: none;
}
.sheet-wrap.in { pointer-events: auto; }
.sheet-mask {
  position: absolute; inset: 0;
  background: rgba(16,16,20,.42);
  backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .22s var(--ease);
}
.sheet-wrap.in .sheet-mask { opacity: 1; }
.sheet {
  position: relative;
  width: 100%; max-width: 460px;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(16,16,20,.18);
  padding: 8px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform .26s var(--ease);
  max-height: 86vh; overflow-y: auto;
}
.sheet-wrap.in .sheet { transform: translateY(0); }
.sheet-grip {
  width: 34px; height: 4px; border-radius: 99px;
  background: var(--border-3); margin: 4px auto 12px;
}
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px;
}
.sheet-title { font-size: .9375rem; font-weight: 660; color: var(--text); }
.sheet-body { padding-bottom: 4px; }

/* 桌面端居中显示 */
@media (min-width: 720px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: var(--r-lg); padding: 8px 22px 22px; max-width: 420px; }
  .sheet-grip { display: none; }
  .sheet-head { margin-top: 14px; }
}

/* 联系站主 */
.contact-sheet { display: flex; gap: 16px; align-items: flex-start; }
.contact-sheet .qr {
  flex: none; width: 132px; height: auto;
  border-radius: 10px; border: 1px solid var(--border); display: block;
}
.contact-copy { flex: 1; min-width: 0; }
.contact-copy .cc-title { font-size: .875rem; font-weight: 620; margin-bottom: 6px; }
.contact-copy .cc-sub { font-size: .75rem; color: var(--text-3); line-height: 1.75; }
@media (max-width: 380px) {
  .contact-sheet { flex-direction: column; align-items: center; text-align: center; }
}

/* ==========================================================================
   账号界面
   ========================================================================== */
.auth-wrap { max-width: 380px; margin: 0 auto; }
.auth-head { text-align: center; margin-bottom: 22px; }
.auth-head .ah-ic {
  width: 48px; height: 48px; margin: 0 auto 14px;
  border-radius: 14px; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.auth-head .ah-title { font-size: 1.125rem; font-weight: 700; color: var(--text); }
.auth-head .ah-sub { font-size: .8125rem; color: var(--text-3); margin-top: 6px; line-height: 1.6; }

.field { margin-bottom: 12px; }
.field label {
  display: block; font-size: .75rem; font-weight: 600;
  color: var(--text-2); margin-bottom: 6px;
}
.field input {
  width: 100%; box-sizing: border-box;
  padding: 11px 13px; font-size: .9375rem;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-2); border-radius: var(--r-sm);
  font-family: inherit;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field .err { font-size: .75rem; color: var(--err); margin-top: 5px; }

.auth-alt { text-align: center; font-size: .8125rem; color: var(--text-3); margin-top: 18px; }
.auth-alt button {
  background: none; border: none; padding: 0;
  color: var(--accent); font-weight: 620; cursor: pointer;
  font-size: inherit; font-family: inherit;
}
.sync-note {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: .75rem; color: var(--text-3); line-height: 1.7;
  background: var(--surface-2); border-radius: var(--r-sm);
  padding: 10px 12px; margin-top: 16px;
}
.sync-note .ic { flex: none; margin-top: 1px; color: var(--text-3); }

/* ==========================================================================
   倒计时卡 —— 收敛绿色面积：改为浅底 + 品牌色描边，只在数字上用色
   ========================================================================== */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  padding: 22px 20px;
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: none;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 100% 0%, var(--accent-soft) 0%, transparent 58%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }

.hero .eyebrow {
  font-size: .75rem; font-weight: 560;
  color: var(--text-3); letter-spacing: .01em;
}
.hero .countdown {
  display: flex; align-items: baseline; gap: 6px;
  margin: 8px 0 10px;
}
.hero .countdown .num {
  font-size: 3.25rem; font-weight: 720; line-height: 1;
  color: var(--accent);
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.hero .countdown .unit {
  font-size: 1.0625rem; font-weight: 620; color: var(--accent);
}
.hero .meta { font-size: .8125rem; color: var(--text-3); display: flex; gap: 14px; flex-wrap: wrap; }
.hero .meta b { font-weight: 650; color: var(--text-2); }

/* 暗色模式下让辉光更明显 */
@media (prefers-color-scheme: dark) {
  .hero::after {
    background: radial-gradient(120% 90% at 100% 0%, rgba(42,179,160,.16) 0%, transparent 62%);
  }
}
