/* ============================================================
   逐句 · 精听工作台
   纸感底色 / 墨色文字 / 朱红强调；英文用衬线，中文用黑体
   ============================================================ */

:root {
  --paper: #f4f0e6;
  --paper-2: #faf7ef;
  --card: #fffefa;
  --ink: #1a1712;
  --ink-2: #4e473c;
  --muted: #8c8374;
  --faint: #b3aa99;
  --line: #e2d9c7;
  --line-2: #ece5d7;
  --accent: #b93a22;
  --accent-soft: #f0dcd3;
  --serif: "Charter", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, "Songti SC", "Noto Serif SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --r: 18px;
  --shadow: 0 1px 2px rgba(60, 45, 20, 0.04), 0 10px 26px -18px rgba(60, 45, 20, 0.3);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dark: #0f1210;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
input, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); }

#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; background: var(--paper); position: relative; }

.kicker {
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.num { font-variant-numeric: tabular-nums; }

.screen { padding: 0 20px calc(92px + env(safe-area-inset-bottom)); animation: fade 0.26s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------- 顶栏 ---------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top)) 0 16px;
  gap: 12px;
}
.brand { display: flex; align-items: baseline; gap: 8px; font-family: var(--serif); font-size: 19px; letter-spacing: 0.02em; }
.brand b { font-weight: 700; }
.brand span { font-family: var(--sans); font-size: 10px; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  font-size: 12px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pill.accent { border-color: #e5bdb4; color: var(--accent); background: #fdf2ee; }
.pill svg { width: 13px; height: 13px; }

/* ---------------- 今日进度线 ---------------- */
.todayline { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.todayline .goal { flex: 1; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.todayline .goal i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.todayline .kicker:last-child { color: var(--faint); }

/* ---------------- 首页 hero ---------------- */
.hero {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 17px 18px 16px;
  overflow: hidden;
}
.hero::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent); }
.hero-top { display: flex; align-items: center; justify-content: space-between; padding-left: 4px; gap: 10px; }
.hero-top .kicker:last-child { color: var(--accent); }
.hero-title {
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.2;
  font-weight: 700;
  margin: 12px 0 8px;
  padding-left: 4px;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.hero-intro {
  margin: 0 0 16px;
  padding-left: 4px;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.62;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-actions { display: flex; align-items: center; gap: 9px; padding-left: 4px; flex-wrap: wrap; }
.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px 0 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper-2);
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.15s var(--ease);
}
.btn-play:active { transform: scale(0.97); }
.btn-play svg { width: 15px; height: 15px; }
.btn-ghost {
  height: 46px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13px;
  white-space: nowrap;
}
.btn-ghost:active { background: var(--paper); }
.hero-progress { margin: 14px 0 0 4px; display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hero-progress .track { flex: 1; height: 3px; background: var(--line-2); border-radius: 2px; overflow: hidden; }
.hero-progress .track i { display: block; height: 100%; background: var(--accent); }

/* ---------------- 数据条 ---------------- */
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); margin: 24px 0 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 14px 0 12px; }
.stat + .stat { border-left: 1px solid var(--line); padding-left: 16px; }
.stat b { display: block; font-family: var(--serif); font-size: 24px; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.stat span { font-size: 11.5px; color: var(--muted); }

/* ---------------- 区块 ---------------- */
.sec { margin-top: 28px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; gap: 10px; }
.sec-head h2 { font-size: 14px; font-weight: 600; margin: 0; }
.sec-head button { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ---------------- 列表行 ---------------- */
.rows { border-top: 1px solid var(--line-2); }
.row { display: flex; gap: 12px; align-items: center; padding: 13px 2px; border-bottom: 1px solid var(--line-2); transition: background 0.15s; cursor: pointer; }
.row:active { background: rgba(0, 0, 0, 0.022); }
.row .body { flex: 1; min-width: 0; }
.row .t {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.36;
  font-weight: 600;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.row .m { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; min-width: 0; }
.row .m .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); flex: none; }
.row .m > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .go { color: var(--faint); display: flex; flex: none; }
.row .go svg { width: 15px; height: 15px; }
.row.done .t { color: var(--ink-2); }
.rp { height: 2px; background: var(--line-2); border-radius: 2px; margin-top: 8px; overflow: hidden; max-width: 220px; }
.rp i { display: block; height: 100%; background: var(--accent); }

.tag {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 5px;
  border-radius: 3px;
  font-size: 9px;
  letter-spacing: 0.09em;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-2);
  flex: none;
}
.tag.bbc { color: #8d2c1a; border-color: #e7c6bb; background: #fbf0eb; }
.tag.voa { color: #1c4a42; border-color: #c3d6cf; background: #eef4f1; }
.audio-mark { color: var(--accent); display: inline-flex; }
.audio-mark svg { width: 12px; height: 12px; }

/* ---------------- 复习入口卡 ---------------- */
.reviewcard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
}
.rc-words { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.rc-words span { font-family: var(--serif); font-size: 14px; color: var(--ink-2); border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.rc-go { display: flex; align-items: center; gap: 2px; font-size: 12.5px; color: var(--accent); white-space: nowrap; }
.rc-go svg { width: 14px; height: 14px; }

/* ---------------- 生词卡 ---------------- */
.wordcard { background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 14px 15px; margin-bottom: 9px; }
.wordcard .w { font-family: var(--serif); font-size: 19px; font-weight: 700; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.wordcard .w .x { font-size: 10.5px; color: var(--faint); font-family: var(--sans); font-weight: 400; }
.wordcard .d { font-size: 13px; color: var(--ink-2); margin-top: 5px; line-height: 1.55; }
.wordcard .c { font-family: var(--serif); font-style: italic; font-size: 12.5px; color: var(--muted); margin-top: 8px; padding-left: 10px; border-left: 2px solid var(--line); line-height: 1.5; }

.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty .big { font-family: var(--serif); font-size: 20px; color: var(--ink-2); margin-bottom: 8px; }
.empty p { font-size: 13px; margin: 0; line-height: 1.75; }

/* ---------------- 筛选 ---------------- */
.filters { position: sticky; top: 0; z-index: 5; background: var(--paper); padding: 6px 0 10px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); margin-bottom: 10px; }
.search svg { width: 15px; height: 15px; color: var(--faint); flex: none; }
.search input { border: 0; outline: 0; background: none; width: 100%; font-size: 14px; }
.search input::placeholder { color: var(--faint); }
.chips { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 29px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); background: var(--card); white-space: nowrap; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper-2); }

/* ---------------- 底部导航 ---------------- */
.tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 560px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  background: rgba(244, 240, 230, 0.94);
  backdrop-filter: saturate(1.3) blur(16px);
  -webkit-backdrop-filter: saturate(1.3) blur(16px);
  border-top: 1px solid var(--line);
  z-index: 40;
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 3px; color: var(--muted); font-size: 10.5px; transition: color 0.15s; }
.tab .ti { position: relative; display: flex; }
.tab svg { width: 21px; height: 21px; }
.tab.on { color: var(--ink); }
.tab .badge { position: absolute; top: -1px; right: -4px; width: 7px; height: 7px; border-radius: 4px; background: var(--accent); }

/* ---------------- 播放器 ---------------- */
.player { min-height: 100dvh; display: flex; flex-direction: column; background: var(--dark); color: #ece6d8; animation: fade 0.24s var(--ease); }
.pl-top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: max(12px, env(safe-area-inset-top)) 12px 10px;
  background: #0f1210;
}
.pl-top::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -18px;
  height: 18px;
  background: linear-gradient(#0f1210, rgba(15, 18, 16, 0));
  pointer-events: none;
}
.iconbtn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #cfc7b6; flex: none; }
.iconbtn:active { background: #1d211d; }
.iconbtn svg { width: 19px; height: 19px; }
.pl-head { flex: 1; min-width: 0; padding-top: 2px; }
.pl-head .kicker { color: #837c6c; font-size: 9px; letter-spacing: 0.16em; }
.pl-head h1 { font-family: var(--serif); font-size: 17.5px; line-height: 1.32; margin: 4px 0 0; font-weight: 600; letter-spacing: -0.005em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-meta { font-size: 10.5px; color: #7d7666; margin-top: 5px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pl-vocab {
  display: flex;
  gap: 7px;
  padding: 2px 16px 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 86%, transparent 99%);
  mask-image: linear-gradient(90deg, #000 0, #000 86%, transparent 99%);
}
.pl-vocab::-webkit-scrollbar { display: none; }
.pl-vocab button { flex: none; height: 29px; padding: 0 12px; border-radius: 999px; border: 1px solid #2a2e28; color: #ada593; font-size: 12px; background: #151915; }

.pl-tip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 16px 14px;
  padding: 9px 12px;
  border-radius: 9px;
  background: #151915;
  border: 1px solid #262b24;
  color: #948c7a;
  font-size: 11.5px;
  line-height: 1.5;
}
.pl-tip button { color: #cfc7b6; font-size: 11.5px; flex: none; }

.pl-body { flex: 1; padding: 6px 20px 190px; }
.para { margin: 0 0 22px; }
.para .who { font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: #746d5f; margin-bottom: 4px; font-weight: 700; }
.sent {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
  color: #b5ad9c;
  padding: 2px 8px 2px 12px;
  margin: 0 -8px 0 -12px;
  border-radius: 4px;
  border-left: 2px solid transparent;
  transition: background 0.22s, color 0.22s, border-color 0.22s;
  cursor: pointer;
  text-wrap: pretty;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.sent .w { border-radius: 2px; }
.sent .w:active { background: rgba(236, 228, 212, 0.18); }
.sent.on { background: rgba(236, 228, 212, 0.06); border-left-color: var(--accent); color: #f2ecdf; }
.sent .zh {
  display: none;
  margin-top: 7px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.65;
  color: #8e8778;
  letter-spacing: 0.01em;
}
.sent .zh.on { display: block; }
.sent.on .zh { color: #a9a190; }

.iconbtn.zh {
  width: 34px;
  height: 27px;
  border: 1px solid #2f342c;
  border-radius: 8px;
  margin-top: 5px;
  font-size: 12px;
  color: #a8a08e;
  letter-spacing: 0;
}
.iconbtn.zh.active { background: #23271f; color: #f0e9da; border-color: #4a4436; }

.blind-panel { flex-direction: column; align-items: center; text-align: center; padding: 46px 10px 30px; }
.wave { display: flex; align-items: flex-end; justify-content: center; gap: 5px; height: 40px; margin-bottom: 26px; }
.wave i { display: block; width: 3px; border-radius: 2px; background: #333830; }
.wave i:nth-child(1) { height: 9px; }
.wave i:nth-child(2) { height: 16px; }
.wave i:nth-child(3) { height: 24px; }
.wave i:nth-child(4) { height: 13px; }
.wave i:nth-child(5) { height: 19px; }
.wave i:nth-child(6) { height: 11px; }
.wave i:nth-child(7) { height: 22px; }
.wave.on i { animation: wv 1.15s ease-in-out infinite; background: #6b6454; }
.wave.on i:nth-child(2) { animation-delay: 0.1s; }
.wave.on i:nth-child(3) { animation-delay: 0.22s; }
.wave.on i:nth-child(4) { animation-delay: 0.06s; }
.wave.on i:nth-child(5) { animation-delay: 0.18s; }
.wave.on i:nth-child(6) { animation-delay: 0.3s; }
.wave.on i:nth-child(7) { animation-delay: 0.14s; }
@keyframes wv { 0%, 100% { height: 7px; } 50% { height: 30px; } }
.bp-title { font-family: var(--serif); font-size: 22px; color: #e6dfd0; margin-bottom: 10px; }
.bp-text { font-size: 13px; line-height: 1.85; color: #8a8373; margin: 0 0 24px; }
.bp-btn { height: 40px; padding: 0 22px; border-radius: 999px; border: 1px solid #3a3f36; color: #d6cebd; font-size: 13.5px; }
.noaudio { color: #7d7666; font-size: 12.5px; border-top: 1px solid #22271f; padding-top: 14px; margin-top: 8px; }

.pl-ctrl {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 560px;
  padding: 10px 20px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(15, 18, 16, 0) 0%, #0f1210 22%, #0f1210 100%);
  z-index: 20;
}
.track-btn { height: 24px; display: flex; align-items: center; touch-action: none; cursor: pointer; }
.track { position: relative; display: block; height: 3px; width: 100%; background: #2b2f29; border-radius: 2px; }
.track .fill { position: absolute; left: 0; top: 0; height: 100%; width: 0; background: var(--accent); border-radius: 2px; }
.track .knob { position: absolute; top: 50%; left: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #f3ecdd; box-shadow: 0 0 0 4px rgba(185, 58, 34, 0.15); }
.pl-time { display: flex; justify-content: space-between; font-size: 10.5px; color: #86806f; font-variant-numeric: tabular-nums; margin-top: 4px; }
.pl-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; gap: 10px; }
.mini {
  height: 34px;
  min-width: 48px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid #2a2e28;
  color: #b4ac9a;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  display: grid;
  place-items: center;
  background: #151915;
  flex: none;
}
.mini.on { color: var(--paper-2); border-color: #4a4436; background: #23271f; }
.mini svg { width: 17px; height: 17px; }
.transport { display: flex; align-items: center; gap: 20px; }
.tbtn { display: grid; place-items: center; width: 40px; height: 40px; color: #cfc7b6; }
.tbtn svg { width: 22px; height: 22px; }
.bigplay { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #f3ecdd; color: #14170f; transition: transform 0.15s var(--ease); }
.bigplay:active { transform: scale(0.95); }
.bigplay svg { width: 23px; height: 23px; margin-left: 2px; }

/* ---------------- 底部弹层 ---------------- */
.scrim { position: fixed; inset: 0; background: rgba(20, 16, 10, 0.42); z-index: 60; animation: fadein 0.2s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 560px;
  background: var(--card);
  color: var(--ink);
  border-radius: 20px 20px 0 0;
  padding: 8px 20px calc(20px + env(safe-area-inset-bottom));
  z-index: 61;
  animation: up 0.26s var(--ease);
  max-height: 82dvh;
  overflow-y: auto;
}
@keyframes up { from { transform: translate(-50%, 26%); opacity: 0.5; } to { transform: translate(-50%, 0); opacity: 1; } }
.sheet .grab { width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: 4px auto 16px; }
.sheet h3 { font-family: var(--serif); font-size: 23px; margin: 0 0 4px; letter-spacing: -0.01em; }
.sheet .sub { font-size: 11.5px; color: var(--muted); margin-bottom: 14px; }
.sheet .def { font-size: 14px; line-height: 1.65; color: var(--ink-2); margin-bottom: 10px; }
.sheet .def .pos { font-size: 10px; color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; margin-right: 6px; }
.sheet .ctx { font-family: var(--serif); font-style: italic; font-size: 13px; line-height: 1.6; color: var(--muted); border-left: 2px solid var(--line); padding-left: 10px; margin: 8px 0 4px; }
.sheet .act { display: flex; gap: 10px; margin-top: 18px; }
.sheet .act button { flex: 1; height: 44px; border-radius: 11px; font-size: 14px; font-weight: 600; background: var(--ink); color: var(--paper-2); }
.sheet .act button.alt { background: var(--paper); color: var(--ink-2); border: 1px solid var(--line); }
.vocab-row { display: flex; align-items: baseline; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.vocab-row .w { font-family: var(--serif); font-weight: 700; font-size: 16px; flex: none; }
.vocab-row .d { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.vocab-row .add { margin-left: auto; flex: none; color: var(--accent); font-size: 15px; }
.sheet .opt { display: flex; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.sheet .opt b { font-family: var(--serif); color: var(--accent); font-weight: 700; flex: none; width: 14px; }

/* ---------------- 复习 ---------------- */
.review {
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: 80;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 20px calc(20px + env(safe-area-inset-bottom));
  animation: fadein 0.2s ease;
}
.rv-top { display: flex; align-items: center; justify-content: space-between; padding: max(14px, env(safe-area-inset-top)) 0 10px; }
.rv-bar { height: 2px; background: var(--line-2); }
.rv-bar i { display: block; height: 100%; background: var(--accent); transition: width 0.3s var(--ease); }
.rv-card { flex: 1; display: flex; flex-direction: column; justify-content: center; text-align: center; gap: 6px; cursor: pointer; }
.rv-word { font-family: var(--serif); font-size: 34px; font-weight: 700; letter-spacing: -0.015em; }
.rv-hint { font-size: 12px; color: var(--muted); margin-top: 8px; }
.rv-def { font-size: 15px; line-height: 1.7; color: var(--ink-2); margin-top: 18px; padding: 0 6px; text-wrap: pretty; }
.rv-ctx { font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--muted); margin: 16px auto 0; max-width: 82%; line-height: 1.6; border-left: 2px solid var(--line); padding-left: 12px; text-align: left; }
.rv-src { font-size: 10.5px; color: var(--faint); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 14px; }
.rv-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.rv-btns button { height: 52px; border-radius: 12px; font-size: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); }
.rv-btns button.hard { color: var(--accent); border-color: #e9c7bf; }
.rv-btns button.good { background: var(--ink); color: var(--paper-2); border-color: var(--ink); }

/* ---------------- 我的 ---------------- */
.bigstat { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 2px; }
.bigstat b { font-family: var(--serif); font-size: 52px; line-height: 1; font-weight: 700; letter-spacing: -0.02em; }
.bigstat span { font-size: 13px; color: var(--muted); }
.weekbars { display: flex; align-items: flex-end; gap: 8px; height: 84px; margin: 18px 0 8px; }
.wb { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; justify-content: flex-end; height: 100%; }
.wb i { display: block; width: 100%; max-width: 24px; background: var(--line); border-radius: 3px 3px 1px 1px; min-height: 2px; }
.wb.today i { background: var(--accent); }
.wb span { font-size: 9.5px; color: var(--faint); letter-spacing: 0.04em; }
.setting { display: flex; align-items: center; justify-content: space-between; padding: 15px 2px; border-bottom: 1px solid var(--line-2); gap: 14px; }
.setting .lab { font-size: 14px; }
.setting .sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; flex: none; }
.seg button { height: 30px; padding: 0 10px; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.seg button.on { background: var(--ink); color: var(--paper-2); }
.switch { width: 46px; height: 27px; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: background 0.2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18); transition: left 0.2s var(--ease); }
.switch.on { background: var(--ink); }
.switch.on i { left: 22px; }
.about { font-size: 12.5px; color: var(--ink-2); line-height: 1.85; margin: 0; }
.foot { font-size: 11px; color: var(--faint); line-height: 1.7; margin: 28px 0 0; }

/* ---------------- 杂项 ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 104px;
  transform: translateX(-50%);
  background: rgba(26, 23, 18, 0.94);
  color: #f6f1e6;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 999px;
  z-index: 100;
  animation: toastin 0.22s var(--ease);
  pointer-events: none;
  max-width: 82vw;
  text-align: center;
}
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.hidden { display: none !important; }

#boot {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.32s ease;
}
#boot.gone { opacity: 0; pointer-events: none; }
.boot-mark { font-family: var(--serif); font-size: 24px; letter-spacing: 0.14em; color: var(--ink); }
.boot-sub { font-size: 11px; color: var(--muted); margin-top: 10px; letter-spacing: 0.12em; }
.sheet .link { display: inline-block; margin-top: 14px; font-size: 12.5px; color: var(--accent); }

@media (min-width: 561px) {
  #app { box-shadow: 0 0 0 1px var(--line); }
}
