/* ═══════════════════════════════════════════
   青沐书笺 · Esther Editorial 编辑美学
   暖杏纸墨 · 杂志排版 · 匠心细节
   ═══════════════════════════════════════════ */

/* ─── Design Tokens ─── */
:root {
  /* 主色：暖杏金 */
  --accent: #C49A6C;
  --accent-soft: #DDBF92;
  --accent-tint: #F5EDE0;
  --accent-warm: #B8895A;

  /* 辅助色 */
  --cost-color: #E84A5F;
  --verdant: #7D9A6B;
  --verdant-dim: #5C7A4C;
  --verdant-tint: #E8EDE0;
  --qing-azure: #A0C4C2;
  --qing-light: #BCD3D0;

  /* 中性色：暖灰纸调 */
  --bg: #F5F1E8;
  --surface: #FEFCF7;
  --text: #2A2620;
  --muted: #9C9587;
  --border: #E4DCC8;
  --ink: #3D3529;

  /* 暗色模式 */
  --dark-bg: #2A2620;
  --dark-surface: #3D3529;
  --dark-text: #EDE8DC;
  --dark-muted: #A69E8D;
  --dark-border: #5C5243;
  --dark-verdant: #8BA87B;

  /* 字体栈 */
  --font-disp: 'Fraunces', 'Noto Serif SC', 'Times New Roman', Georgia, serif;
  --font-body: 'Inter', '-apple-system', 'BlinkMacSystemFont', 'Segoe UI', sans-serif;
  --font-mono: 'Fira Code', 'SF Mono', 'Consolas', monospace;

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* 阴影：更柔和的纸感 */
  --shadow-card: 0 1px 3px rgba(42,38,32,.04), 0 2px 8px rgba(42,38,32,.03);
  --shadow-card-hover: 0 4px 20px rgba(42,38,32,.07), 0 1px 4px rgba(42,38,32,.04);
  --shadow-panel: 0 12px 40px rgba(42,38,32,.1);
  --shadow-float: 0 8px 32px rgba(42,38,32,.12);

  /* 缓动 */
  --ease: cubic-bezier(.16,1,.3,1);
  --ease-spring: cubic-bezier(.175,.885,.32,1.275);
}

/* 暗色覆盖 */
.dark {
  --bg: var(--dark-bg);
  --surface: var(--dark-surface);
  --text: var(--dark-text);
  --muted: var(--dark-muted);
  --border: var(--dark-border);
  --shadow-card: 0 1px 3px rgba(0,0,0,.2), 0 2px 8px rgba(0,0,0,.15);
  --shadow-card-hover: 0 4px 20px rgba(0,0,0,.3), 0 1px 4px rgba(0,0,0,.2);
  --shadow-panel: 0 12px 40px rgba(0,0,0,.4);
  --shadow-float: 0 8px 32px rgba(0,0,0,.4);
}

@media (prefers-reduced-motion) {
  * { transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* ─── 体裁色标 ─── */
.genre-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .04em;
}
.genre-essay { background: #F5EDE0; color: #8A7A5A; }
.genre-sci-fi { background: #E0E8F0; color: #4A6A8A; }
.genre-suspense { background: #E8E0F0; color: #6A5A8A; }
.genre-horror { background: #F0E0E0; color: #8A4A4A; }
.genre-romance { background: #F0E0E8; color: #8A5A6A; }
.genre-crime { background: #E8E8E8; color: #5A5A5A; }
.genre-wuxia { background: #F0E8E0; color: #8A7A5A; }
.genre-reflection { background: #F0ECE0; color: #8A7A4A; }

/* ─── Reset & Base ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  background: var(--bg);
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background .3s var(--ease), color .3s var(--ease);
  padding-bottom: 64px;
  line-height: 1.6;
  position: relative;
  z-index: 0;
}

/* 背景光晕：Esther 风格多层径向渐变 */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(45% 35% at 25% 8%, rgba(196,154,108,.08) 0%, transparent 60%),
    radial-gradient(35% 30% at 75% 85%, rgba(125,154,107,.05) 0%, transparent 55%),
    radial-gradient(25% 20% at 90% 30%, rgba(160,196,194,.04) 0%, transparent 50%);
}
.dark body::before {
  background:
    radial-gradient(45% 35% at 25% 8%, rgba(196,154,108,.12) 0%, transparent 60%),
    radial-gradient(35% 30% at 75% 85%, rgba(125,154,107,.06) 0%, transparent 55%);
}

/* ─── Layout ─── */
.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 20px;
  position: relative;
  z-index: 2;
}

/* ─── Canvas 背景 ─── */
.shadow-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ─── Header ─── */
.header {
  background: rgba(254,252,247,.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(228,220,200,.5);
  position: sticky;
  top: 0;
  z-index: 10;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.dark .header {
  background: rgba(42,38,32,.88);
  border-bottom-color: rgba(92,82,67,.4);
}

.header-inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-family: var(--font-disp);
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -.02em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
}
.brand-icon {
  display: inline-block;
  width: 24px; height: 24px;
  background: url(/img/t-logo-mini.png) no-repeat 50% / contain;
  flex-shrink: 0;
}
.brand em { font-style: normal; color: var(--accent); }

.theme-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  font-family: var(--font-body);
  transition: all .2s var(--ease);
}
.theme-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196,154,108,.08);
}

.reader-back {
  display: none;
  font-size: 14px;
  color: var(--accent);
  cursor: pointer;
  font-family: var(--font-body);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background .2s;
}
.reader-back:hover { background: var(--accent-tint); }

/* ─── Greeting & Tagline ─── */
.greeting {
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: clamp(26px, 5.5vw, 34px);
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0;
  color: var(--text);
}
.greeting em { font-style: normal; color: var(--accent); }

.greeting-sub {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 14px;
  line-height: 1.5;
}

/* ─── 首页 Hero 打字机（#47） ─── */
.home-hero {
  margin-bottom: 6px;
}
.typing-container {
  font-family: var(--font-disp);
  font-size: clamp(17px, 3.5vw, 21px);
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -.01em;
  min-height: 1.3em;
}
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ─── 首页引言（#40 极简留白引号） ─── */
.home-quote {
  font-family: var(--font-disp);
  font-size: 14px;
  line-height: 2;
  color: var(--muted);
  margin: 0 0 22px;
  padding-left: 14px;
  border-left: 2px solid var(--accent-soft);
  max-width: 460px;
}

.eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  font-family: var(--font-mono);
}

/* ─── 时间选卡 ─── */
.time-strip {
  display: flex;
  gap: 8px;
  margin: 14px 0 18px;
}
.t-card {
  flex: 1;
  padding: 16px 10px;
  min-height: 48px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  background: var(--surface);
  text-align: center;
  cursor: pointer;
  transition: all .25s var(--ease);
  position: relative;
  overflow: hidden;
}
.t-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(196,154,108,.08);
  transform: translateY(-1px);
}
.t-card .num {
  font-family: var(--font-disp);
  font-size: 22px;
  font-weight: 700;
  display: block;
  color: var(--text);
  transition: color .2s var(--ease);
  letter-spacing: -.02em;
}
.t-card .label {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: .06em;
  font-family: var(--font-body);
  display: block;
  margin-top: 2px;
  transition: color .2s var(--ease);
}
.t-card.active {
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 4px 16px rgba(61,53,41,.18);
}
.t-card.active .num { color: var(--accent-soft); }
.t-card.active .label { color: rgba(221,191,146,.6); }
.t-card.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 20%;
  width: 60%; height: 2px;
  background: var(--accent-soft);
  border-radius: 1px 1px 0 0;
}
.dark .t-card.active { background: var(--accent); border-color: var(--accent); }
.dark .t-card.active .num { color: #fff; }
.dark .t-card.active .label { color: rgba(255,255,255,.7); }
.dark .t-card.active::after { background: rgba(255,255,255,.5); }

/* ─── 活动入口 ─── */
.promo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.promo-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: all .25s var(--ease);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}
.promo-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.promo-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.promo-card:hover::before { opacity: 1; }
.promo-card:active { transform: scale(.97); }
.promo-large { grid-column: 1 / -1; padding: 22px; }
.promo-medium { grid-column: 1 / -1; padding: 20px; }
.promo-small { padding: 16px; }
.promo-dubbed {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
}
.promo-dubbed::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/uploads/images/maine-coon-headphones.png') center/cover no-repeat;
  z-index: 0;
}
.promo-dubbed::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.93) 0%, rgba(255,255,255,0.82) 100%);
  z-index: 1;
}
.promo-dubbed > * {
  position: relative;
  z-index: 2;
}

.promo-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(196,154,108,.12), rgba(196,154,108,.04));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  border: 1px solid rgba(196,154,108,.12);
}
.promo-title {
  font-family: var(--font-disp);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}
.promo-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

/* ─── 排行榜 Tab ─── */
.rank-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.rank-tab {
  padding: 7px 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s var(--ease);
  background: var(--surface);
  font-family: var(--font-body);
  font-weight: 500;
}
.rank-tab.active {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
  box-shadow: 0 2px 8px rgba(61,53,41,.15);
}
.dark .rank-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ─── 推荐列表 ─── */
.rec-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0 10px;
  scrollbar-width: none;
}
.rec-scroll::-webkit-scrollbar { display: none; }

.rec-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all .2s var(--ease);
  box-shadow: var(--shadow-card);
  position: relative;
}
.rec-row::after {
  content: '';
  position: absolute;
  left: 0; top: 20%;
  width: 3px; height: 60%;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transition: opacity .2s var(--ease);
}
.rec-row:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-card-hover);
  transform: translateX(2px);
}
.rec-row:hover::after { opacity: 1; }
.rec-row:active { transform: scale(.98); }

.rec-row-title {
  font-family: var(--font-disp);
  font-size: 15px;
  color: var(--text);
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -.01em;
}
.rec-row-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.rec-row-meta-text {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}
.rec-row-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.rec-avatar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.rec-avatar svg {
  display: block;
  border-radius: 50%;
}

/* ─── 创作档案卡 ─── */
.article-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}
.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all .25s var(--ease);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.article-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--verdant), var(--qing-azure));
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.article-card:hover {
  border-color: var(--verdant);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.article-card:hover::before { opacity: 1; }
.article-card:active { transform: scale(.99); }

.article-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.article-card-title {
  font-family: var(--font-disp);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -.01em;
}
.article-card-title-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}
.article-card-badges {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.article-card-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 9px;
  font-family: var(--font-mono);
  font-weight: 600;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
}
.article-card-badge.verdant {
  background: var(--verdant-tint);
  color: var(--verdant);
  border-color: rgba(125,154,107,.2);
}
.article-card-menu {
  font-size: 16px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  transition: all .15s;
}
.article-card-menu:hover {
  color: var(--text);
  background: var(--bg);
}
.article-card-preview {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--font-body);
}
.article-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid rgba(228,220,200,.5);
}
.article-card-metrics {
  display: flex;
  gap: 16px;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--muted);
}
.article-card-metrics .score { color: var(--verdant); }
.article-card-date {
  font-size: 10px;
  color: var(--border);
  font-family: var(--font-mono);
}
.article-card-review {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  transition: all .2s var(--ease);
}
.article-card-review:hover {
  border-color: var(--verdant);
  color: var(--verdant);
  background: var(--verdant-tint);
}
.article-card-review.done {
  background: rgba(125,154,107,.06);
  border-color: rgba(125,154,107,.18);
  color: rgba(125,154,107,.7);
  cursor: default;
  pointer-events: none;
}
.article-card-tipcount {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* ─── 我的文章 Hero ─── */
.mya-hero {
  background: linear-gradient(145deg, var(--ink) 0%, #4a4035 100%);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-top: 18px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  color: var(--dark-text);
}
.mya-hero::after {
  content: '';
  position: absolute;
  right: -20px; top: -20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  border: 1px solid rgba(160,196,194,.12);
  pointer-events: none;
}
.mya-hero-deco {
  position: absolute;
  right: -16px; top: -16px;
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 1px solid rgba(160,196,194,.1);
  pointer-events: none;
}
.mya-hero-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--qing-light);
  letter-spacing: .12em;
  display: block;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.mya-hero-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.mya-hero-num {
  font-family: var(--font-disp);
  font-size: 40px;
  font-weight: 900;
  color: var(--accent-soft);
  line-height: 1;
  letter-spacing: -.03em;
}
.mya-hero-unit {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dark-muted);
  margin-left: 4px;
}
.mya-hero-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--dark-muted);
  margin-top: 6px;
  letter-spacing: .04em;
}
.mya-hero-action {
  padding: 11px 26px;
  border-radius: 24px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: all .2s var(--ease);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  border: none;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(196,154,108,.3);
}
.mya-hero-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(196,154,108,.4);
}
.mya-hero-action:active { opacity: .85; }

/* 行内点评按钮 */
.mya-review-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  transition: all .2s var(--ease);
}
.mya-review-btn:hover {
  border-color: var(--verdant);
  color: var(--verdant);
  background: var(--verdant-tint);
}

/* ─── 阅读记录 Time Assets 面板 ─── */
.time-assets-panel {
  background: var(--ink);
  border-radius: var(--radius-xl);
  padding: 22px;
  margin-top: 18px;
  margin-bottom: 16px;
  color: var(--dark-text);
  position: relative;
  overflow: hidden;
}
.time-assets-panel::after {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 100px; height: 100px;
  border-radius: 50%;
  border: 1px solid rgba(196,154,108,.08);
  pointer-events: none;
}
.time-assets-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--dark-muted);
  letter-spacing: .12em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
}
.time-assets-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 14px;
}
.time-assets-num {
  font-family: var(--font-disp);
  font-size: 32px;
  font-weight: 900;
  color: var(--accent-soft);
  line-height: 1;
  letter-spacing: -.03em;
}
.time-assets-unit {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dark-muted);
  margin-left: 4px;
}
.time-assets-right { text-align: right; }
.time-assets-sub {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--dark-text);
}
.time-assets-sub-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--dark-muted);
  margin-top: 2px;
  letter-spacing: .04em;
}
.time-assets-divider {
  height: 1px;
  background: var(--dark-border);
  margin-bottom: 12px;
  opacity: .5;
}
.progress-row { padding-top: 2px; }
.progress-row-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--dark-muted);
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: .04em;
}
.progress-row-track {
  height: 5px;
  background: var(--dark-border);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}
.progress-row-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  border-radius: 3px;
  transition: width .5s var(--ease);
}

/* ─── 阅读记录时间线 ─── */
.history-timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 18px;
}
.timeline-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.timeline-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.timeline-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.timeline-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .06em;
}

/* ─── 阅读记录卡片 ─── */
.history-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 18px;
  transition: all .2s var(--ease);
  cursor: pointer;
  box-shadow: var(--shadow-card);
}
.history-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-card-hover);
}
.history-card:active { transform: scale(.98); }
.history-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.history-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.history-card-title {
  font-family: var(--font-disp);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}
.history-card-tag {
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.history-card-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}
.history-card-time {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}
.history-depth-bar {
  position: relative;
}
.depth-track {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  margin-top: 6px;
}
.depth-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width .5s var(--ease);
}

/* ─── 打赏记录 投资面板 ─── */
.invest-panel {
  background: var(--ink);
  border-radius: var(--radius-xl);
  padding: 22px;
  margin-top: 18px;
  margin-bottom: 16px;
  color: var(--dark-text);
  position: relative;
  overflow: hidden;
}
.invest-ring {
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 1px solid rgba(196,154,108,.08);
  pointer-events: none;
}
.invest-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--dark-muted);
  letter-spacing: .12em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
}
.invest-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 14px;
}
.invest-num {
  font-family: var(--font-disp);
  font-size: 32px;
  font-weight: 900;
  color: var(--accent-soft);
  line-height: 1;
  letter-spacing: -.03em;
}
.invest-unit {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dark-muted);
  margin-left: 4px;
}
.invest-right { text-align: right; }
.invest-sub-num {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--dark-text);
}
.invest-sub-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--dark-muted);
  margin-top: 2px;
  letter-spacing: .04em;
}
.invest-divider {
  height: 1px;
  background: var(--dark-border);
  margin-bottom: 12px;
  opacity: .5;
}
.invest-genre-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--dark-muted);
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: .04em;
}
.genre-bar-track {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  gap: 2px;
}
.genre-bar-seg {
  border-radius: 2px;
  transition: width .5s var(--ease);
}

/* ─── 打赏记录 Tab ─── */
.tip-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  width: fit-content;
}
.tip-tab {
  padding: 6px 18px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
}
.tip-tab.active {
  background: var(--accent);
  color: #fff;
}

/* ─── 打赏记录卡片列表 ─── */
.tip-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.tip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all .2s var(--ease);
  box-shadow: var(--shadow-card);
}
.tip-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--accent-soft);
}
.tip-card-left { flex-shrink: 0; }
.tip-card-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.tip-card-mid {
  flex: 1;
  min-width: 0;
}
.tip-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.tip-card-title {
  font-family: var(--font-disp);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}
.tip-card-tag {
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.tip-card-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}
.tip-card-right {
  text-align: right;
  flex-shrink: 0;
}
.tip-card-cost {
  font-family: var(--font-disp);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -.02em;
}
.tip-card-combo {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

/* ─── 收藏搜索 ─── */
.fav-search {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  margin-top: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
  transition: border-color .2s;
}
.fav-search:focus-within { border-color: var(--accent); }
.fav-search-icon {
  font-size: 14px;
  margin-right: 8px;
  flex-shrink: 0;
}
.fav-search-input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
}
.fav-search-input::placeholder { color: var(--muted); }

/* ─── Profile ─── */
.profile-stats-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.profile-stat-item {
  flex: 1;
  padding: 14px 6px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all .2s var(--ease);
}
.profile-stat-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-card);
}
.profile-stat-num {
  font-family: var(--font-disp);
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -.02em;
  line-height: 1.1;
}
.profile-stat-label {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
  font-family: var(--font-mono);
  letter-spacing: .04em;
}

/* ─── 书房 Hero（Esther #1A 杂志裁切风 + #3 手写批注） ─── */
.profile-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-top: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.profile-hero::after {
  content: '✦';
  position: absolute;
  top: 12px; right: 16px;
  font-family: 'Caveat', cursive;
  font-size: 28px;
  color: var(--accent);
  opacity: .15;
  pointer-events: none;
}
.profile-hero-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.profile-avatar-ring {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  padding: 2px;
  box-shadow: 0 2px 10px rgba(196,154,108,.2);
}
.profile-avatar-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-disp);
  font-size: 22px;
  font-weight: 900;
  color: var(--accent-warm);
}
.profile-online-dot {
  position: absolute;
  bottom: 1px; right: 1px;
  width: 14px; height: 14px;
  background: var(--verdant);
  border: 2px solid var(--surface);
  border-radius: 50%;
}
.profile-hero-info { flex: 1; }
.profile-hero-name {
  font-family: var(--font-disp);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}
.profile-hero-phone {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
.profile-level-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 12px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  border: 1.5px solid;
  background: rgba(255,255,255,.04);
}
.profile-notes-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 20px;
  background: var(--accent-tint);
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--accent-warm);
  font-family: var(--font-mono);
}
.profile-notes-badge:hover {
  background: var(--accent);
  color: #fff;
}
.profile-notes-count {
  font-weight: 700;
  margin-left: 2px;
}
.profile-daily-goal {
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.profile-goal-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: .04em;
}
.profile-goal-track {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}
.profile-goal-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  border-radius: 3px;
  transition: width .5s var(--ease);
}

/* ─── 书房分组卡片（Esther #1C 标签卡片风格） ─── */
.profile-section-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}
.profile-section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.profile-section-header {
  padding: 10px 18px;
  background: linear-gradient(135deg, rgba(196,154,108,.04), rgba(160,196,194,.04));
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .08em;
}
.profile-section-body { display: flex; flex-direction: column; }
.profile-menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  cursor: pointer;
  transition: all .15s;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid rgba(228,220,200,.3);
}
.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-item:hover {
  background: linear-gradient(135deg, rgba(196,154,108,.04), rgba(160,196,194,.03));
  padding-left: 22px;
}
.profile-menu-item:active { transform: scale(.98); }
.menu-icon { display: inline-block; width: 22px; text-align: center; }
.profile-credits-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-tint);
  padding: 3px 12px;
  border-radius: 20px;
}
.profile-logout-btn {
  width: 100%;
  padding: 14px;
  border: 1.5px solid rgba(192,57,43,.2);
  border-radius: var(--radius-xl);
  background: rgba(192,57,43,.04);
  color: #c0392b;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}
.profile-logout-btn:hover {
  background: rgba(192,57,43,.08);
  border-color: rgba(192,57,43,.35);
}

/* ─── 收藏页 ─── */
.fav-stats {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 12px 0;
  margin: 12px 0;
  box-shadow: var(--shadow-card);
}
.fav-stat-item { text-align: center; flex: 1; }
.fav-stat-num {
  display: block;
  font-family: var(--font-disp);
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
}
.fav-stat-label {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--muted);
  letter-spacing: .08em;
  margin-top: 2px;
}
.fav-stat-divider {
  width: 1px; height: 24px;
  background: var(--border);
  flex-shrink: 0;
}
.fav-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .06em;
  margin: 18px 0 10px;
  padding-left: 4px;
}

/* ─── Tabbar ─── */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  z-index: 12;
  display: flex;
  background: rgba(254,252,247,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(228,220,200,.5);
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 0px));
}
.dark .tabbar {
  background: rgba(42,38,32,.92);
  border-top-color: rgba(92,82,67,.4);
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 10px;
  transition: all .2s var(--ease);
  border-radius: var(--radius-md);
}
.tab .icon {
  font-size: 20px;
  line-height: 1;
  transition: transform .2s var(--ease);
}
.tab.active { color: var(--accent); }
.tab.active .icon { transform: scale(1.1); }
.tab:hover { color: var(--text); }
#tabWrite {
  color: var(--accent);
}
#tabWrite .icon { font-size: 20px; }
#tabWrite:hover { color: var(--accent); opacity: .8; }

/* ─── Toast ─── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--ink);
  color: var(--surface);
  padding: 12px 28px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  max-width: 80%;
  text-align: center;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  font-family: var(--font-body);
  box-shadow: var(--shadow-float);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ─── Modal ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42,38,32,.5);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn .3s var(--ease);
  padding: 24px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-overlay.closing {
  animation: modalFadeOut .2s var(--ease) forwards;
}
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalFadeOut { from { opacity: 1; } to { opacity: 0; } }

.modal-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-panel);
  max-width: 360px;
  width: 100%;
  padding: 30px 26px 26px;
  text-align: center;
  animation: modalSlideUp .35s var(--ease);
}
.modal-overlay.closing .modal-card {
  animation: modalSlideDown .2s var(--ease) forwards;
}
@keyframes modalSlideUp {
  from { transform: translateY(32px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes modalSlideDown {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(24px); opacity: 0; }
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-title {
  font-family: var(--font-disp);
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -.01em;
}
.modal-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.5;
}
.modal-options {
  display: flex;
  gap: 12px;
}
.modal-option {
  flex: 1;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 14px;
  cursor: pointer;
  text-align: center;
  transition: all .2s var(--ease);
  font-family: var(--font-body);
}
.modal-option:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.modal-option:active { transform: scale(.97); }
.modal-option .option-icon {
  font-size: 30px;
  margin-bottom: 10px;
  display: block;
}
.modal-option .option-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.modal-option .option-desc {
  font-size: 11px;
  color: var(--muted);
}

/* ─── Modal 子元素（来自 coaching 合并） ─── */
.modal-body {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  text-align: center;
}
.modal-actions { display: flex; gap: 10px; }
.modal-actions button {
  flex: 1;
  padding: 11px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s var(--ease);
  font-family: var(--font-body);
}
.modal-btn-cancel {
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--muted);
}
.modal-btn-cancel:hover { background: var(--border); }
.modal-btn-confirm {
  background: linear-gradient(135deg, var(--ink) 0%, #4a4035 100%);
  border: none;
  color: #fff;
  box-shadow: 0 4px 14px rgba(61,53,41,.15);
}
.modal-btn-confirm:hover { opacity: .9; }

/* ─── Modal 通用按钮（用于 admin/tip 等页面） ─── */
.modal-btn {
  padding: 11px 26px;
  border-radius: 24px;
  border: 1px solid var(--border);
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all .2s var(--ease);
  font-weight: 500;
}
.modal-btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.modal-btn.primary:hover { opacity: .9; }
.modal-btn.secondary {
  background: var(--bg);
  color: var(--muted);
}
.modal-btn.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── Ref Modal 子元素（来自 coaching） ─── */
.ref-modal-note {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
  text-align: center;
}
.ref-modal-content {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
  max-height: 50vh;
  overflow-y: auto;
  padding: 4px;
}

/* ─── 出题展示区 ─── */
.topic-display {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
  max-height: 55vh;
  overflow-y: auto;
}
.topic-display h3 {
  font-family: var(--font-disp);
  font-size: 18px;
  font-weight: 700;
  margin: 20px 0 8px;
  color: var(--accent);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.topic-display h3:first-child { margin-top: 0; }
.topic-display strong { color: var(--text); font-weight: 600; }
.topic-display p { margin: 6px 0; }
.topic-display ul, .topic-display ol { padding-left: 20px; margin: 8px 0; }
.topic-display li { margin: 4px 0; }
.topic-display hr {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 16px 0;
}
.topic-display em { color: var(--muted); font-style: italic; }

.topic-loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.topic-loading .spinner {
  width: 30px; height: 30px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.topic-footer {
  text-align: center;
  margin-top: 16px;
}
.topic-footer .credits-info {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}

/* ─── 消耗积分提示 ─── */
.credits-cost {
  display: block;
  width: fit-content;
  margin: 12px auto 0;
  font-size: 12px;
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
}

/* ─── 虚线出题框 ─── */
.topic-box { margin-top: 16px; margin-bottom: 20px; }
.topic-box-empty {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 38px 24px;
  text-align: center;
  background: var(--bg);
  transition: border-color .2s, box-shadow .2s;
}
.topic-box-empty:hover {
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 4px rgba(196,154,108,.06);
}
.topic-box-empty .admin-btn {
  font-family: var(--font-body);
  font-size: 13px;
  padding: 8px 24px;
}

/* ─── 出题按钮 ─── */
.btn-generate-topic {
  display: inline-block;
  padding: 12px 30px;
  border: none;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-warm) 100%);
  color: #fff;
  font-family: var(--font-disp);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, opacity .2s;
  box-shadow: 0 4px 16px rgba(196,154,108,.3);
}
.btn-generate-topic:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(196,154,108,.4);
}
.btn-generate-topic:active { transform: scale(.96); }
.btn-generate-topic .btn-icon { font-size: 16px; margin-right: 4px; }

/* ─── 换一题按钮 ─── */
.topic-footer .admin-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  padding: 6px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.topic-footer .admin-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ─── 六维评分发布按钮 ─── */
.ed-publish-review {
  flex: 1;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  padding: 13px 22px;
  font-family: var(--font-disp);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 14px rgba(196,154,108,.25);
  letter-spacing: .02em;
}
.ed-publish-review:hover {
  opacity: .92;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(196,154,108,.35);
}
.ed-publish-review:active { transform: scale(.97); }
.ed-publish-review:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* ─── 积分充值 ─── */
.recharge-plan {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all .2s var(--ease);
}
.recharge-plan:hover {
  border-color: var(--accent);
  background: rgba(196,154,108,.04);
  box-shadow: var(--shadow-card);
}
.recharge-plan:active { transform: scale(.98); }
.recharge-plan-amount {
  font-family: var(--font-disp);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.recharge-plan-credits {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  margin-left: auto;
}
.recharge-plan-bonus {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #fff;
  background: var(--accent);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  margin-left: 6px;
}

/* ─── 阅读器 ─── */
.reader-title {
  font-family: var(--font-disp);
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: -.01em;
}
.article-text {
  font-family: 'Noto Serif SC', serif;
  font-size: 16px;
  line-height: 2;
  color: var(--text);
  letter-spacing: .02em;
}
.article-text p { margin: 10px 0; text-indent: 2em; }
.article-text p:first-of-type { text-indent: 0; }
.article-text h2 {
  font-family: var(--font-disp);
  font-size: 20px;
  margin: 28px 0 12px;
}

/* ─── 返回按钮（Esther #46 药丸风格） ─── */
.reader-back-bar {
  margin-bottom: 16px;
}
.reader-back-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 16px 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.reader-back-mini { padding: 4px 12px 4px 10px; font-size: 11px; }
.reader-back-mini:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-tint); transform: translateX(-1px); }
.reader-back-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-tint);
  transform: translateX(-2px);
}
.reader-back-pill:active { transform: scale(.96); }

/* ─── 阅读器元信息（Esther #22 杂志排版风） ─── */
.reader-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.reader-meta .rm-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .4;
}
.reader-meta .rm-genre {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 20px;
  background: var(--accent-tint);
  color: var(--accent-warm);
  font-weight: 600;
  font-size: 10px;
}
.reader-meta .rm-score {
  font-weight: 700;
  color: var(--accent);
}

/* ─── 阅读器操作栏 ─── */
.reader-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  justify-content: center;
}
.action-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 8px 18px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s var(--ease);
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.action-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.action-btn#favBtn:hover { color: #c0392b; border-color: #c0392b; }

/* ─── 质量评分面板 ─── */
.quality-panel {
  margin: 20px 0;
  padding: 16px 18px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.quality-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.quality-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: .06em;
}
.quality-score {
  font-family: var(--font-disp);
  font-size: 18px;
  font-weight: 900;
  color: var(--accent);
}
.quality-body {
  display: flex;
  gap: 14px;
  align-items: center;
}
.quality-radar {
  flex-shrink: 0;
  width: 160px; height: 160px;
  border-radius: var(--radius-sm);
}
.quality-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.quality-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
}
.q-label {
  width: 22px;
  font-family: var(--font-mono);
  color: var(--muted);
  text-align: right;
  flex-shrink: 0;
}
.q-track {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
}
.q-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  transition: width .6s var(--ease);
}
.q-val {
  width: 26px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

/* ─── 结构化评语（Esther #10C 手绘虚线框 · 四色） ─── */
.review-section {
  margin-top: 14px;
  padding: 18px 18px 16px;
  border-radius: var(--radius-lg);
  border: 1.5px dashed rgba(196,154,108,.25);
  background: var(--surface);
  position: relative;
}
.review-section-label {
  position: absolute;
  top: -11px; left: 14px;
  font-family: 'Caveat', cursive;
  font-size: 14px;
  font-weight: 700;
  background: var(--surface);
  padding: 0 8px;
  line-height: 1.2;
}
.review-section-body {
  font-size: 13px;
  color: var(--text);
  line-height: 1.8;
  white-space: pre-wrap;
  font-family: 'Noto Serif SC', serif;
}

/* 蓝色 — 亮点 */
.review-section-blue {
  border-color: rgba(43,127,216,.3);
}
.review-section-blue .review-section-label { color: #2B7FD8; }

/* 红色 — 可以更好 */
.review-section-red {
  border-color: rgba(232,74,95,.3);
}
.review-section-red .review-section-label { color: #E84A5F; }

/* 黄色 — 参考写法 */
.review-section-yellow {
  border-color: rgba(244,215,88,.5);
}
.review-section-yellow .review-section-label { color: #9a8100; }

/* 青沐绿 — 总结 */
.review-section-green {
  border-color: rgba(125,154,107,.35);
}
.review-section-green .review-section-label { color: var(--verdant); }



/* ─── 语法错误逐条展示 ─── */
.grammar-issues-panel {
  margin-top: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
}
.grammar-issues-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #c0392b;
  margin-bottom: 10px;
}
.grammar-issue-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.6;
}
.grammar-issue-item:last-child { border-bottom: none; padding-bottom: 0; }
.grammar-issue-location {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 3px;
}
.grammar-issue-type { color: #c0392b; }
.grammar-issue-original,.grammar-issue-fix,.grammar-issue-reason {
  font-size: 12px;
  color: var(--text);
  margin-bottom: 2px;
}
.grammar-issue-wrong { text-decoration: line-through; color: #c0392b; }
.grammar-issue-right { color: var(--verdant); font-weight: 600; }

/* ─── 阅读器隐身模式 ─── */
:root {
  --transition-enter: 500ms;
  --transition-exit: 800ms;
  --ease-gentle: cubic-bezier(0.4, 0, 0.2, 1);
}

body.reader-immersive #pageReader {
  animation: readerEnter var(--transition-enter) var(--ease-gentle) both;
}
#pageReader { scroll-margin-top: 70px; }

@keyframes readerEnter {
  from { opacity: 0; transform: scale(0.98); }
  to   { opacity: 1; transform: scale(1); }
}

body.reader-immersive .container::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(196,154,108,.10) 0%, transparent 55%);
  pointer-events: none;
  z-index: 1;
  animation: warmFlash 600ms ease-out forwards;
}
@keyframes warmFlash {
  0%   { opacity: 0; }
  25%  { opacity: 1; }
  100% { opacity: 0; }
}

body.reader-immersive.exiting #pageReader {
  animation: readerExit var(--transition-exit) var(--ease-gentle) forwards;
}
@keyframes readerExit {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.98); }
}

/* 阅读器头部 */
.reader-header { display: none; position: relative; align-items: center; padding: 12px 16px; min-height: 40px; box-sizing: border-box; width: 100%; }
.reader-title-wrap { display: flex; align-items: center; gap: 10px; }
.reader-title { flex: 1; }
.tts-inline-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}
.tts-inline-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.05);
}
.tts-inline-btn.tts-loading {
  opacity: 0.6;
  pointer-events: none;
  animation: tts-pulse 1s infinite;
}
@keyframes tts-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.tts-progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin: 8px 0;
  overflow: hidden;
}
.tts-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width .2s;
}


/* 文章内页底部返回按钮 */
.reader-back-bottom {
  display: flex;
  justify-content: center;
  margin-top: 32px;
  padding-bottom: 24px;
}
.reader-back-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 20px;
  border-radius: 999px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  box-shadow: var(--shadow-card);
}
.reader-back-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-card-hover);
}
.reader-back-pill:active { transform: scale(.96); }

/* 阅读进度条（固定在 tabbar 上方） */
.reader-progress-bar {
  position: fixed;
  bottom: 56px;
  left: 0; right: 0;
  height: 4px;
  background: var(--border);
  z-index: 99;
  display: flex;
  align-items: center;
}
.reader-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  transition: width .3s var(--ease);
}
.reader-progress-pct {
  position: absolute;
  right: 12px;
  top: -20px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* UI 退场 */
body.reader-immersive .reader-header,
body.reader-immersive .tabbar,
body.reader-immersive .reader-actions {
  transition: opacity 0.5s var(--ease-gentle), transform 0.5s var(--ease-gentle);
}

/* 呼吸微光点 */
.reader-glow-dot {
  position: fixed;
  bottom: 10px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  z-index: 5;
  opacity: 0;
  transition: opacity 0.8s var(--ease-gentle);
  pointer-events: none;
}
body.reader-immersive.ui-hidden .reader-glow-dot {
  opacity: 1;
  animation: glowBreathe 5s ease-in-out infinite;
}
@keyframes glowBreathe {
  0%, 100% { opacity: 0.15; }
  50%      { opacity: 0.35; }
}
.dark body.reader-immersive.ui-hidden .reader-glow-dot {
  background: radial-gradient(circle, rgba(237,232,220,0.5) 0%, transparent 70%);
  animation: glowBreatheDark 7.5s ease-in-out infinite;
}
@keyframes glowBreatheDark {
  0%, 100% { opacity: 0.10; }
  50%      { opacity: 0.22; }
}

/* 翻页边缘线 */
.flip-line {
  position: fixed;
  right: 0; top: 0;
  width: 1px; height: 100%;
  background: var(--accent);
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: none;
}
.flip-line.flash { animation: flipFlash 30ms ease-out forwards; }
@keyframes flipFlash {
  0%   { opacity: 0.7; }
  100% { opacity: 0; }
}

/* 首次手势提示 */
.gesture-hint {
  position: fixed;
  bottom: 76px; left: 50%;
  transform: translateX(-50%);
  background: rgba(61,53,41,.9);
  color: #EDE8DC;
  padding: 10px 20px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 11px;
  z-index: 25;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--ease-gentle);
  white-space: nowrap;
  letter-spacing: .02em;
  backdrop-filter: blur(8px);
}
.gesture-hint.show { opacity: 1; }
.gesture-hint .hint-arrow {
  display: inline-block;
  animation: hintBounce 1.2s ease-in-out infinite;
}
@keyframes hintBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(4px); }
}

/* PC 顶部热区 */
.reader-hotzone {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 80px;
  z-index: 25;
  pointer-events: none;
}
body.reader-immersive.ui-hidden .reader-hotzone { pointer-events: auto; }

/* 唤出后留痕悬浮 */
.trace-float {
  position: fixed;
  z-index: 19;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-gentle);
  background: rgba(61,53,41,.8);
  color: #EDE8DC;
  padding: 6px 14px;
  border-radius: 16px;
  font-family: var(--font-body);
  font-size: 11px;
  backdrop-filter: blur(8px);
}
.trace-float.show {
  opacity: 1;
  animation: traceLinger 2s var(--ease-gentle) forwards;
}
@keyframes traceLinger {
  0%   { opacity: 0; }
  15%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ─── 发现区 2×2 网格（Esther #1A 杂志裁切风） ─── */
.home-discover-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.home-discover-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px 18px;
  cursor: pointer;
  transition: all .25s var(--ease);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.home-discover-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}
.home-discover-card:active { transform: scale(.97); }
.home-discover-dubbed {
  position: relative;
  overflow: hidden;
}
.home-discover-dubbed::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/uploads/images/maine-coon-headphones.png') center/cover no-repeat;
  z-index: 0;
}
.home-discover-dubbed::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.93) 0%, rgba(255,255,255,0.82) 100%);
  z-index: 1;
}
.home-discover-dubbed > * {
  position: relative;
  z-index: 2;
}
.home-discover-icon {
  font-size: 26px;
  margin-bottom: 4px;
}
.home-discover-title {
  font-family: var(--font-disp);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}
.home-discover-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
.home-discover-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--accent);
  letter-spacing: .08em;
  margin-top: 4px;
  font-weight: 600;
}

/* ─── 活动入口 1×4 网格 ─── */
.hscroll-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.hscroll-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 18px 14px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: all .25s var(--ease);
  position: relative;
  overflow: hidden;
}
.hscroll-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
  border-color: var(--accent-soft);
}
.hscroll-card::before {
  content: '';
  position: absolute;
  top: 14px; right: 14px;
  font-family: 'Caveat', cursive;
  font-size: 24px;
  color: var(--accent);
  opacity: .2;
}
.hscroll-icon {
  font-size: 28px;
  margin-bottom: 12px;
  display: block;
}
.hscroll-title {
  font-family: var(--font-disp);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -.01em;
}
.hscroll-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}

/* ─── 杂志风推荐列表（Esther #1A 杂志裁切风） ─── */
.magazine-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.magazine-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all .2s var(--ease);
  animation: rowFadeIn .4s var(--ease) both;
}
@keyframes rowFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.magazine-row:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-card-hover);
  transform: translateX(3px);
}
.magazine-row:active { transform: scale(.98); }
.magazine-row-main { flex: 1; min-width: 0; }
.magazine-row-title {
  font-family: var(--font-disp);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.magazine-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
}
.magazine-score {
  color: var(--verdant);
  font-weight: 600;
}
.magazine-row-arrow {
  font-size: 16px;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform .2s;
}
.magazine-row:hover .magazine-row-arrow { transform: translateX(3px); color: var(--accent); }

/* ─── 排行榜单行（1排1条） ─── */
.rank-single-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.rank-single-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all .2s var(--ease);
}
.rank-single-row:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-card-hover);
  transform: translateX(3px);
}
.rank-single-row:active { transform: scale(.98); }
.rank-single-row[data-rank="1"] { border-left: 3px solid var(--accent-warm); }
.rank-single-row[data-rank="2"] { border-left: 3px solid #a0c4c2; }
.rank-single-row[data-rank="3"] { border-left: 3px solid #7d9a6b; }
.rank-single-medal {
  font-size: 20px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}
.rank-single-num {
  font-family: var(--font-disp);
  font-size: 16px;
  font-weight: 900;
  color: var(--muted);
}
.rank-single-main { flex: 1; min-width: 0; }
.rank-single-title {
  font-family: var(--font-disp);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -.01em;
}
.rank-single-meta {
  font-size: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  margin-top: 4px;
}
.rank-single-score {
  font-family: var(--font-disp);
  font-size: 16px;
  font-weight: 900;
  color: var(--accent);
  flex-shrink: 0;
  letter-spacing: -.02em;
}

/* ─── 推荐标签列表（Esther #1C 1排1条） ─── */
.rec-tag-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rec-tag-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all .2s var(--ease);
  animation: rowFadeIn .4s var(--ease) both;
}
.rec-tag-row:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-card-hover);
  transform: translateX(3px);
}
.rec-tag-row:active { transform: scale(.98); }
.rec-tag-pill {
  flex-shrink: 0;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
}
.rec-tag-main { flex: 1; min-width: 0; }
.rec-tag-title {
  font-family: var(--font-disp);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -.01em;
}
.rec-tag-meta {
  font-size: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  margin-top: 4px;
}
.rec-tag-score-right {
  font-family: var(--font-disp);
  font-size: 14px;
  font-weight: 900;
  color: var(--verdant);
  flex-shrink: 0;
  margin-right: 10px;
  letter-spacing: -.01em;
}
.dubbed-note {
  display: inline-block;
  font-size: 0;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  vertical-align: middle;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c6a4e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 18v-6a9 9 0 0 1 18 0v6'/%3E%3Cpath d='M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: 0.75;
}



/* ─── 排行榜编号网格（Esther #10A 大编号叠底） ─── */
.rank-numgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.rank-numgrid-card {
  position: relative;
  padding: 22px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  overflow: hidden;
  transition: all .2s var(--ease);
}
.rank-numgrid-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.rank-numgrid-card:active { transform: scale(.97); }
.rank-numgrid-bg {
  position: absolute;
  top: -10px; right: 8px;
  font-family: var(--font-disp);
  font-size: 56px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}
.rank-numgrid-title {
  font-family: var(--font-disp);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 6px;
  position: relative;
  letter-spacing: -.01em;
}
.rank-numgrid-meta {
  font-size: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  margin-bottom: 8px;
  position: relative;
}
.rank-numgrid-score {
  font-family: var(--font-disp);
  font-size: 18px;
  font-weight: 900;
  color: var(--accent);
  position: relative;
  letter-spacing: -.02em;
}
.rank-more-link {
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  font-family: var(--font-mono);
  transition: opacity .2s;
}
.rank-more-link:hover { opacity: .7; }

/* ─── 完整排行页（Esther #10A 大编号叠底） ─── */
.rank-full-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.rank-full-card {
  position: relative;
  padding: 24px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  overflow: hidden;
  transition: all .2s var(--ease);
}
.rank-full-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.rank-full-bg {
  position: absolute;
  top: -14px; right: 6px;
  font-family: var(--font-disp);
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}
.rank-full-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  position: relative;
}
.rank-full-minutes {
  font-size: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
}
.rank-full-title {
  font-family: var(--font-disp);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 12px;
  position: relative;
  letter-spacing: -.01em;
}
.rank-full-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.rank-full-score {
  font-family: var(--font-disp);
  font-size: 20px;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -.02em;
}
.rank-full-tips {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* ─── 分类标签网格（Esther #1C 标签卡片） ─── */
.genre-tag-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.genre-tag-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px 18px;
  cursor: pointer;
  transition: all .2s var(--ease);
  position: relative;
}
.genre-tag-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.genre-tag-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 12px;
}
.genre-tag-pill.tp-b { background: rgba(196,154,108,.1); color: var(--accent-warm); }
.genre-tag-pill.tp-y { background: rgba(160,196,194,.15); color: #5a8a88; }
.genre-tag-pill.tp-r { background: rgba(125,154,107,.1); color: var(--verdant); }

/* ─── 分类翻页 ─── */
.genre-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px 0 8px;
}
.genre-pager-btn {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.genre-pager-btn:hover:not(.disabled) {
  border-color: var(--accent);
  color: var(--accent);
}
.genre-pager-btn.disabled {
  opacity: .35;
  cursor: not-allowed;
}
.genre-pager-info {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ─── 通用 tp 药丸标签（Esther #1C） ─── */
.tp-b { background: rgba(196,154,108,.1); color: var(--accent-warm); }
.tp-y { background: rgba(160,196,194,.15); color: #5a8a88; }
.tp-r { background: rgba(125,154,107,.1); color: var(--verdant); }
.genre-tag-name {
  font-family: var(--font-disp);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -.01em;
}
.genre-tag-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 10px;
}
.genre-tag-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
}

/* ─── 我的文章列表（Esther #1C 标签卡片横排） ─── */
.mya-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mya-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all .2s var(--ease);
}
.mya-list-row:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-card-hover);
  transform: translateX(3px);
}
.mya-list-row:active { transform: scale(.98); }
.mya-list-pill {
  flex-shrink: 0;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
}
.mya-list-main { flex: 1; min-width: 0; }
 .mya-coach-icon { margin-right: 10px; flex-shrink: 0; font-size: 14px; cursor: pointer; }
 .mya-list-trophy { margin-right: 10px; flex-shrink: 0; }
.mya-list-title {
  font-family: var(--font-disp);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -.01em;
}
.mya-list-meta {
  font-size: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  margin-top: 4px;
}
.mya-list-score {
  font-family: var(--font-disp);
  font-size: 14px;
  font-weight: 900;
  color: var(--verdant);
  margin-right: 10px;
  letter-spacing: -.01em;
  flex-shrink: 0;
}
.mya-list-trophy { margin-left: 4px; }
.mya-list-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.mya-list-review-btn {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  background: var(--accent-tint);
  color: var(--accent);
  cursor: pointer;
  font-family: var(--font-mono);
  transition: all .2s;
}
.mya-list-review-btn:hover { background: var(--accent); color: #fff; }
.mya-list-review-done {
  font-size: 10px;
  color: var(--verdant);
  font-weight: 600;
  font-family: var(--font-mono);
}
.mya-list-enhance-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
  background: var(--accent-tint);
  color: var(--accent);
}
.mya-list-enhance-btn:hover { background: var(--accent); color: #fff; transform: scale(1.1); }
.mya-list-enhance-btn.done { background: var(--verdant-tint); color: var(--verdant); }
.mya-list-enhance-btn.loading { opacity: 0.6; cursor: wait; }

/* ─── 我的文章·翻页 ─── */
.mya-pager {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.mya-pager-btn {
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--font-mono);
  cursor: pointer;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all .2s var(--ease);
}
.mya-pager-btn:hover { color: var(--ink); border-color: var(--ink); }
.mya-pager-btn.active { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.dark .mya-pager-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }


/* ─── 点评弹窗（Esther #10C 手绘虚线框 + #3 手写批注） ─── */
.review-modal-card {
  background: var(--surface);
  border: 2px dashed rgba(196,154,108,.35);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  max-width: 360px;
  width: 100%;
  box-shadow: var(--shadow-panel);
  animation: modalPop .3s var(--ease) both;
  position: relative;
}
.review-modal-tag {
  font-family: 'Caveat', cursive;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}
.review-modal-title {
  font-family: var(--font-disp);
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -.01em;
}
.review-modal-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 18px;
}
.review-modal-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(228,220,200,.3);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
}
.review-modal-info-row:last-of-type { border-bottom: none; }
.review-modal-tip {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 14px;
  margin-bottom: 18px;
  text-align: center;
}
.review-modal-actions {
  display: flex;
  gap: 10px;
}
.review-modal-btn-cancel {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font-body);
}
.review-modal-btn-cancel:hover { background: var(--border); }
.review-modal-btn-confirm {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--accent);
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font-body);
  box-shadow: 0 4px 14px rgba(196,154,108,.25);
}
.review-modal-btn-confirm:hover { opacity: .9; transform: translateY(-1px); }

/* ─── Modal 弹窗（Esther #18） ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42,38,32,.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: modalFadeIn .3s var(--ease);
}
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 30px 26px;
  max-width: 380px;
  width: 100%;
  box-shadow: var(--shadow-panel);
  animation: modalPop .3s var(--ease) both;
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-title {
  font-family: var(--font-disp);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -.01em;
}
.modal-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}
.modal-close-btn {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font-body);
  margin-top: 8px;
}
.modal-close-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── 充值方案列表 ─── */
.recharge-plans {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.recharge-plan-hot {
  font-size: 9px;
  color: #fff;
  background: var(--accent);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 6px;
}

/* ─── 支付方式按钮 ─── */
.modal-pay-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.modal-pay-btn:hover {
  border-color: var(--accent);
  background: rgba(196,154,108,.06);
}

/* ─── 响应式 ─── */
@media (max-width: 768px) {
  .greeting { font-size: clamp(22px, 5vw, 28px); }
  .tagline { font-size: clamp(15px, 3.5vw, 18px); }
  .t-card .num { font-size: 18px; }
  .container { padding: 10px 16px; }
}
@media (max-width: 480px) {
  .container { padding: 8px 14px; }
  .header { padding: 14px 14px 8px; }
  .greeting { font-size: clamp(20px, 6.5vw, 24px); }
  .tagline { font-size: clamp(14px, 4vw, 16px); }
  .time-strip { gap: 4px; }
  .t-card { padding: 10px 4px; min-height: 38px; }
  .t-card .num { font-size: 16px; }
  .rec-row { padding: 14px; }
  .rec-row-title { font-size: 13px; }
  .history-card { padding: 14px; }
  .tip-card { padding: 14px; gap: 10px; }
  .profile-stats-row { gap: 6px; }
  .profile-stat-item { padding: 10px 4px; }
  .profile-stat-num { font-size: 18px; }
  .reader-title { font-size: 20px; }
  .article-text { font-size: 15px; }
}

/* ─── 设置页 ─── */
.set-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.set-row:last-child {
  border-bottom: none;
}

.toggle-switch {
  display: inline-block;
  cursor: pointer;
}
.toggle-track {
  display: inline-block;
  width: 44px;
  height: 24px;
  background: var(--border);
  border-radius: 12px;
  position: relative;
  transition: background 0.25s var(--ease);
  vertical-align: middle;
}
.toggle-thumb {
  display: block;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: left 0.25s var(--ease);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.dark .toggle-track {
  background: var(--dark-border);
}
.dark .toggle-thumb {
  background: var(--dark-text);
}

/* 设置项容器：品牌图背景 */
.setting-card {
  background-image: url('/img/1122x630.png');
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 16px;
  position: relative;
}
.setting-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(254,252,247,0.82);
  border-radius: var(--radius-lg);
  z-index: 0;
}
.dark .setting-card::before {
  background: rgba(42,38,32,0.82);
}
.setting-card > * {
  position: relative;
  z-index: 1;
}

/* ─── #33 Dark Hero Reveal · 青沐书笺品牌展示 ─── */
.dark-reveal-wrap {
  position: relative;
  margin-top: 20px;
  padding: 48px 24px 40px;
  background: #1a1510;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.dark-reveal-bgchar {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-disp);
  font-size: clamp(8rem, 18vw, 12rem);
  font-weight: 900;
  color: rgba(255,255,255,0.04);
  pointer-events: none;
  line-height: 1;
  user-select: none;
  overflow: hidden;
}
.dark-reveal-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 550px;
  margin: 0 auto;
}
.dark-reveal-textarea {
  position: relative;
  min-height: 5rem;
}
.dark-reveal-title {
  font-family: var(--font-disp);
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 900;
  line-height: 1.5;
  color: #f0e9dc;
  margin-bottom: 1.5rem;
  letter-spacing: -.01em;
}
.dark-reveal-foretext {
  font-size: 0.88rem;
  color: rgba(240,233,220,0.55);
  line-height: 2;
  max-height: 5rem;
  overflow: hidden;
  transition: opacity 0.4s ease 0.15s, max-height 0.4s ease 0.15s;
}
.dark-reveal-foretext.hidden {
  opacity: 0;
  max-height: 0;
  transition: opacity 0.3s ease, max-height 0.3s ease;
}
.dark-reveal-foretext .fore-en {
  font-family: var(--font-disp);
  font-style: italic;
  font-size: 0.82rem;
  color: rgba(160,196,194,0.5);
  margin-top: 8px;
  display: block;
}
.dark-reveal-divider {
  width: 40px;
  height: 2px;
  background: var(--accent-soft);
  margin: 0 auto 1.5rem;
}
.dark-reveal-poem {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.dark-reveal-poem.show {
  opacity: 1;
  max-height: 6rem;
  transition: opacity 0.4s ease 0.15s, max-height 0.4s ease 0.15s;
}
.dark-reveal-poem p {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: rgba(240,233,220,0.55);
  letter-spacing: .06em;
  line-height: 2;
}
.dark-reveal-btn {
  margin-top: 1.5rem;
  padding: 8px 24px;
  border: 1px solid var(--accent-soft);
  background: transparent;
  color: var(--accent-soft);
  border-radius: 20px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  font-family: var(--font-body);
  letter-spacing: .05em;
}
.dark-reveal-btn:hover {
  background: var(--accent-soft);
  color: #1a1510;
  box-shadow: 0 0 16px rgba(221,191,146,0.2);
}
.dark-reveal-btn:active {
  transform: scale(0.97);
}

/* 暗色模式下的适配 */
.dark .dark-reveal-wrap {
  background: #0f0d0a;
  border: 1px solid rgba(221,191,146,0.1);
}
.dark .dark-reveal-bgchar {
  color: rgba(255,255,255,0.025);
}

/* ─── 设置页卡片（Esther #1E-A 极简竖线 + 品牌图背景）─── */
.setting-card {
  position: relative;
  margin-top: 16px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-image: url('/img/1122x630.png');
  background-size: cover;
  background-position: center;
  min-height: 140px;
}
.setting-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(254,252,247,0.65);
  border-radius: var(--radius-lg);
  z-index: 0;
}
.dark .setting-card::after {
  background: rgba(42,38,32,0.65);
}
.setting-card-inner {
  position: relative;
  z-index: 1;
  padding: 8px 0;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 16px 28px;
  position: relative;
  border-bottom: 1px solid rgba(196,154,108,0.12);
}
.setting-row:last-child {
  border-bottom: none;
}
.setting-row::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 18px;
  background: var(--accent);
  opacity: 0.25;
  border-radius: 1px;
}
.setting-label {
  font-family: var(--font-disp);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.setting-value {
  font-size: 0.82rem;
  color: var(--muted);
  font-family: var(--font-mono);
}
.setting-value-text {
  font-size: 0.82rem;
  color: var(--muted);
}

/* Toggle 开关 */
.toggle-switch {
  display: inline-block;
  cursor: pointer;
  flex-shrink: 0;
}
.toggle-track {
  display: block;
  width: 40px;
  height: 22px;
  background: var(--border);
  border-radius: 11px;
  position: relative;
  transition: background 0.3s var(--ease);
}
.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #FEFCF7;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(42,38,32,0.15);
  transition: left 0.3s var(--ease);
}
.toggle-switch.is-on .toggle-track {
  background: var(--accent);
}
.toggle-switch.is-on .toggle-thumb {
  left: 20px;
}
.dark .toggle-track {
  background: var(--dark-border);
}
.dark .toggle-thumb {
  background: var(--dark-text);
}
.dark .toggle-switch.is-on .toggle-track {
  background: var(--accent-soft);
}
