/* web/css/style.css —— 千语网页版，延续小程序信纸风格 */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

[v-cloak] { display: none; }

html, body {
  min-height: 100%;
}

body {
  /* ====== 日间主题变量 ====== */
  --bg-page: #f7f1e3;
  --bg-card: rgba(255, 252, 244, 0.9);
  --bg-card-solid: #fffcf4;
  --bg-input: rgba(255, 252, 244, 0.7);
  --text-primary: #4a3b2a;
  --text-secondary: #8a7350;
  --text-tertiary: #a89272;
  --text-muted: #b3a184;
  --border: rgba(154, 132, 98, 0.2);
  --border-strong: rgba(154, 132, 98, 0.3);
  --shadow: rgba(90, 60, 20, 0.06);
  --shadow-md: rgba(90, 60, 20, 0.12);
  --shadow-lg: rgba(90, 60, 20, 0.18);
  --accent: #c8452c;
  --accent-dark: #a53122;
  --accent-light: rgba(200, 69, 44, 0.08);
  --accent-border: rgba(200, 69, 44, 0.3);
  --bg-gradient-warm1: rgba(190, 155, 100, 0.10);
  --bg-gradient-warm2: rgba(160, 120, 60, 0.10);
  --bg-gains: linear-gradient(135deg, #fff8e8, #fff3d6);
  --border-gains: rgba(200, 160, 60, 0.2);

  background-color: var(--bg-page);
  background-image:
    radial-gradient(circle at 20% 10%, var(--bg-gradient-warm1), transparent 45%),
    radial-gradient(circle at 85% 90%, var(--bg-gradient-warm2), transparent 40%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  transition: background-color 0.6s ease, color 0.6s ease;
}

/* 全局主题过渡 */
body * {
  transition: background-color 0.6s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* ====== 傍晚主题（20:30–23:30）柔彩黑 ====== */
.theme-evening {
  --bg-page: #0d0d0d;
  --bg-card: rgba(22, 22, 22, 0.9);
  --bg-card-solid: #161616;
  --bg-input: rgba(22, 22, 22, 0.7);
  --text-primary: #e8e0d8;
  --text-secondary: #a89a8c;
  --text-tertiary: #8a7c6e;
  --text-muted: #6a5c4e;
  --border: rgba(212, 165, 116, 0.15);
  --border-strong: rgba(212, 165, 116, 0.28);
  --shadow: rgba(0, 0, 0, 0.15);
  --shadow-md: rgba(0, 0, 0, 0.25);
  --shadow-lg: rgba(0, 0, 0, 0.35);
  --accent: #d4a574;
  --accent-dark: #b8865a;
  --accent-light: rgba(212, 165, 116, 0.10);
  --accent-border: rgba(212, 165, 116, 0.30);
  --bg-gradient-warm1: rgba(212, 165, 116, 0.04);
  --bg-gradient-warm2: rgba(196, 154, 138, 0.03);
  --bg-gains: linear-gradient(135deg, #1a1610, #14120e);
  --border-gains: rgba(212, 165, 116, 0.15);
}

/* ====== 深夜主题（23:30–06:00）霓虹赛博 ====== */
.theme-neon {
  --bg-page: #08080e;
  --bg-card: rgba(14, 14, 24, 0.9);
  --bg-card-solid: #0e0e18;
  --bg-input: rgba(14, 14, 24, 0.7);
  --text-primary: #e0dce8;
  --text-secondary: #9a96a8;
  --text-tertiary: #7a7688;
  --text-muted: #5a5668;
  --border: rgba(0, 210, 255, 0.12);
  --border-strong: rgba(0, 210, 255, 0.25);
  --shadow: rgba(0, 0, 0, 0.20);
  --shadow-md: rgba(0, 0, 0, 0.30);
  --shadow-lg: rgba(0, 0, 0, 0.40);
  --accent: #00d2ff;
  --accent-dark: #00a8cc;
  --accent-light: rgba(0, 210, 255, 0.08);
  --accent-border: rgba(0, 210, 255, 0.25);
  --bg-gradient-warm1: rgba(0, 210, 255, 0.03);
  --bg-gradient-warm2: rgba(255, 60, 120, 0.02);
  --bg-gains: linear-gradient(135deg, #0e0e18, #0a0a14);
  --border-gains: rgba(0, 210, 255, 0.15);
}

/* 楷体：仅用于品牌标语和信纸区域 */
.font-kaiti {
  font-family: "Kaiti SC", "STKaiti", "KaiTi", "楷体", serif;
}

#app {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 60px;
}

/* ====== 信纸 ====== */
.paper-rice   { background-color: #fbf5e6; color: #4a3b2a; }
.paper-bamboo { background-color: #f0f4e2; color: #3c4a2e; }
.paper-blush  { background-color: #fbeeea; color: #5a3030; }

.lined {
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0, transparent 33px,
    rgba(120, 90, 40, 0.16) 33px, rgba(120, 90, 40, 0.16) 34px
  );
}

.sheet-shadow { box-shadow: 0 8px 24px var(--shadow-lg); }

/* ====== 顶栏 ====== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 4px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.seal-sm {
  width: 34px; height: 34px;
  border-radius: 7px;
  background: linear-gradient(135deg, #c8452c, #a53122);
  color: #fdf3e3;
  font-size: 19px;
  display: flex; align-items: center; justify-content: center;
  transform: rotate(-6deg);
  box-shadow: 0 2px 6px rgba(160, 50, 30, 0.35);
}
.brand-name { font-size: 22px; letter-spacing: 6px; }
.user-tag {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(200, 69, 44, 0.12);
  color: #a53122;
  font-size: 14px;
  cursor: pointer;
}
.user-tag.ghost { background: rgba(154, 132, 98, 0.15); color: #8a7350; }

/* 顶栏返回按钮：与笔名胶囊同风格，灰调弱化 */
.back-tag {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(154, 132, 98, 0.12);
  color: #8a7350;
  font-size: 14px;
  cursor: pointer;
  margin-right: 8px;
}

/* 顶栏日夜切换按钮 */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 999px;
  background: rgba(154, 132, 98, 0.12);
  font-size: 16px;
  cursor: pointer;
  margin-right: 8px;
  transition: background 0.2s;
  user-select: none;
}
.theme-toggle:hover { background: rgba(154, 132, 98, 0.22); }
.theme-evening .theme-toggle { background: rgba(212, 165, 116, 0.15); }
.theme-evening .theme-toggle:hover { background: rgba(212, 165, 116, 0.28); }
.theme-neon .theme-toggle { background: rgba(0, 210, 255, 0.10); }
.theme-neon .theme-toggle:hover { background: rgba(0, 210, 255, 0.22); }

/* ====== 右上角信箱图标 ====== */
.topics-section {
  position: relative;
}

.mailbox-float {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 20;
  cursor: pointer;
}

.mailbox-img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
}

.mailbox-badge {
  position: absolute;
  top: -4px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  font-size: 10px;
  color: #fff;
  background: #c8452c;
  border-radius: 999px;
  padding: 0 3px;
  box-shadow: 0 1px 4px rgba(200, 69, 44, 0.5);
}

/* ====== 按钮 ====== */
button {
  font-family: inherit;
  border: none;
  cursor: pointer;
  font-size: 16px;
  border-radius: 10px;
  transition: opacity 0.15s;
}
button:disabled { opacity: 0.55; cursor: not-allowed; }
button:active:not(:disabled) { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, #c8452c, #a53122);
  color: #fdf3e3;
  padding: 12px 26px;
  font-weight: 600;
  letter-spacing: 2px;
  box-shadow: 0 4px 12px rgba(160, 50, 30, 0.28);
}
.btn-plain {
  background: rgba(154, 132, 98, 0.14);
  color: #6d5a3d;
  padding: 12px 22px;
  position: relative;
}
.btn-sm { padding: 7px 14px; font-size: 14px; }
.btn-block { width: 100%; margin-top: 6px; }
.badge {
  display: inline-block;
  min-width: 18px; height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  background: #c8452c;
  color: #fff;
  font-size: 12px;
  margin-left: 6px;
  padding: 0 4px;
}

/* ====== 首页 ====== */
.page { animation: fadein 0.35s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* 卡片依次入场 */
.topic-card { opacity: 0; animation: fadeSlideUpWeb 0.4s ease forwards; }
.topic-card:nth-child(1) { animation-delay: 0.08s; }
.topic-card:nth-child(2) { animation-delay: 0.16s; }
.topic-card:nth-child(3) { animation-delay: 0.24s; }
.treehole-entry { opacity: 0; animation: fadeSlideUpWeb 0.4s ease forwards; animation-delay: 0.32s; }
@keyframes fadeSlideUpWeb { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.hero {
  border-radius: 14px;
  padding: 46px 26px 36px;
  text-align: center;
  margin-top: 8px;
  box-shadow: none;
}
.hero-title { font-size: 34px; letter-spacing: 10px; font-weight: normal; color: var(--text-primary); }
.hero-sub { margin-top: 12px; color: var(--text-tertiary); font-size: 15px; }
.hero-badge { margin-top: 8px; font-size: 12px; color: var(--text-muted); letter-spacing: 1px; }
.hero-quote {
  margin: 26px auto 0;
  max-width: 420px;
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.8;
  cursor: pointer;
}
.hero-actions { margin-top: 30px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.home-tip {
  margin-top: 26px;
  text-align: center;
  color: #9a8462;
  font-size: 14px;
  line-height: 2;
}
.home-tip-sub { color: #b3a184; font-size: 13px; }

/* ====== 写信 ====== */
.write-sheet {
  border-radius: 10px;
  padding: 22px 20px 20px;
  margin-top: 8px;
}
.write-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.write-label { color: #8a7350; font-size: 14px; flex-shrink: 0; }
.cat-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.cat-chip {
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(154, 132, 98, 0.13);
  color: #6d5a3d;
  font-size: 14px;
  cursor: pointer;
}
.cat-chip.on {
  background: rgba(200, 69, 44, 0.16);
  color: #a53122;
  box-shadow: inset 0 0 0 1px rgba(200, 69, 44, 0.45);
}
.write-body {
  width: 100%;
  height: 280px;
  margin-top: 16px;
  border: none;
  outline: none;
  resize: none;
  background-color: transparent;
  font-family: inherit;
  font-size: 17px;
  line-height: 34px;
  color: inherit;
  caret-color: #c8452c;
}
.write-body::placeholder { color: rgba(138, 115, 80, 0.5); }
.write-foot { margin-top: 8px; }
.write-foot-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.write-name {
  flex: 1;
  min-width: 120px;
  border: none;
  border-bottom: 1px solid rgba(138, 115, 80, 0.25);
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  color: inherit;
  outline: none;
  padding: 4px 2px;
  transition: border-color 0.2s;
}
.write-name:focus {
  border-bottom-color: rgba(200, 69, 44, 0.5);
}
.write-count { color: #b3a184; font-size: 13px; margin-left: auto; }
.paper-chips { display: flex; gap: 8px; }
.paper-chip {
  padding: 5px 13px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(120, 90, 40, 0.2);
}
.paper-chip.on { box-shadow: inset 0 0 0 2px #c8452c; }
.prefer { font-size: 14px; color: #6d5a3d; cursor: pointer; user-select: none; }
.write-quota-tip { margin: 0 0 12px; text-align: center; font-size: 13px; color: rgba(138, 116, 82, 0.8); }
.checkbox {
  width: 16px; height: 16px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(120, 90, 40, 0.5);
  display: inline-block;
}
.checkbox.on {
  background: #c8452c;
  box-shadow: none;
  position: relative;
}
.checkbox.on::after {
  content: '✓';
  color: #fff;
  font-size: 12px;
  position: absolute;
  top: -2px; left: 2px;
}

/* ====== 信箱 ====== */
.inbox-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 2px;
}
.inbox-head h2 { font-size: 22px; font-weight: normal; letter-spacing: 4px; }

/* 信件区：固定高度带边框容器，只有框内滚动，页头不随之移动 */
.inbox-box {
  border: 1px solid rgba(154, 132, 98, 0.3);
  border-radius: 14px;
  background: rgba(255, 252, 244, 0.7);
  padding: 14px;
  height: calc(100vh - 220px);
  min-height: 300px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 首页反馈入口：低调小字 */
.fb-entry {
  text-align: center;
  margin: 22px 0 6px;
  font-size: 13px;
  letter-spacing: 2px;
  color: rgba(138, 115, 80, 0.7);
  cursor: pointer;
}

.fb-entry.strong {
  color: #a83a26;
  font-size: 14px;
}

/* 套餐购买页 */
.shop-head { text-align: center; margin-bottom: 24px; }
.shop-title { font-size: 22px; font-weight: normal; letter-spacing: 6px; color: #5a4a33; }
.shop-sub { margin-top: 6px; font-size: 12px; letter-spacing: 2px; color: rgba(138, 115, 80, 0.7); }
.quota-line {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 18px;
  border-radius: 999px;
  font-size: 12px;
  color: #7a6748;
  background: rgba(255, 252, 244, 0.85);
  border: 1px solid rgba(154, 132, 98, 0.28);
}
.quota-num { color: #b0432e; font-size: 16px; font-weight: 600; }

.pkg-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto 14px;
  padding: 18px 16px;
  border-radius: 10px;
  border: 1px solid rgba(154, 132, 98, 0.3);
  box-shadow: 0 2px 10px rgba(90, 60, 20, 0.06);
}
.pkg-tag {
  position: absolute;
  top: -9px;
  right: 14px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  color: #fff;
  background: #b0432e;
}
.pkg-name { font-size: 16px; letter-spacing: 2px; color: #5a4a33; }
.pkg-desc { margin-top: 4px; font-size: 12px; color: rgba(138, 115, 80, 0.75); }
.pkg-buy { text-align: right; }
.pkg-price { font-size: 18px; color: #b0432e; font-weight: 600; margin-bottom: 6px; }
.pkg-btn {
  padding: 6px 18px;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 1px;
  color: #fff;
  background: #a83a26;
  cursor: pointer;
}
.pkg-btn:disabled { opacity: 0.5; cursor: default; }

.shop-notes {
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 252, 244, 0.6);
  border: 1px dashed rgba(154, 132, 98, 0.3);
}
.notes-title { font-size: 13px; letter-spacing: 2px; color: #7a6748; margin-bottom: 8px; }
.notes-item { font-size: 12px; line-height: 1.9; color: rgba(138, 115, 80, 0.75); }

/* 购买记录 */
.orders-head { text-align: center; margin-bottom: 20px; }
.orders-loading { text-align: center; padding: 40px 0; color: #b3a184; font-size: 14px; }
.order-list { display: flex; flex-direction: column; gap: 12px; }
.order-item {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 252, 244, 0.8);
  border: 1px solid rgba(154, 132, 98, 0.15);
}
.order-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.order-name { font-size: 15px; color: #5a4a33; letter-spacing: 1px; }
.order-status { font-size: 12px; padding: 2px 8px; border-radius: 4px; }
.st-paid { color: #5a8a5a; background: rgba(90, 138, 90, 0.1); }
.st-refunded { color: #8a8a8a; background: rgba(138, 138, 138, 0.1); }
.st-pending { color: #b08a50; background: rgba(176, 138, 80, 0.1); }
.order-meta { display: flex; gap: 12px; font-size: 12px; color: rgba(138, 115, 80, 0.7); }
.order-fee { margin-left: auto; color: #b0432e; font-weight: 600; }
.empty-state { text-align: center; padding: 40px 0; }
.empty-text { color: #b3a184; font-size: 14px; margin-bottom: 16px; }
.orders-tip { text-align: center; margin-top: 24px; font-size: 12px; color: rgba(138, 115, 80, 0.6); }

/* 首页底部氛围展示：笔友来信数 + 主题热度 */
.stats-band {
  text-align: center;
  margin: 26px 0 4px;
}

.stats-count {
  font-size: 13px;
  letter-spacing: 2px;
  color: rgba(138, 115, 80, 0.78);
}

.stats-num {
  color: #b0432e;
  font-size: 18px;
  font-weight: 600;
}

.stats-themes {
  margin-top: 10px;
}

.theme-tag {
  display: inline-block;
  margin: 3px 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 1px;
  color: rgba(138, 115, 80, 0.7);
  background: rgba(255, 252, 244, 0.7);
  border: 1px solid rgba(154, 132, 98, 0.22);
}

.theme-tag.hot {
  color: #a83a26;
  background: rgba(255, 236, 226, 0.85);
  border: 1px solid rgba(200, 90, 60, 0.35);
}
.empty { text-align: center; padding: 60px 0 30px; color: #8a7350; }
.empty-seal { margin: 0 auto 18px; width: 60px; height: 60px; font-size: 30px; }
.empty-sub { margin: 6px 0 22px; font-size: 14px; color: #b3a184; }

.letter-card {
  position: relative;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 14px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(90, 60, 20, 0.06);
}
.letter-top {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.letter-dir {
  width: 26px; height: 26px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.letter-dir.in  { background: rgba(200, 69, 44, 0.85); color: #fdf3e3; }
.letter-dir.out { background: rgba(154, 132, 98, 0.35); color: #6d5a3d; }
.letter-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.letter-time { color: #b3a184; font-size: 13px; }
.letter-preview {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(74, 59, 42, 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.unread-dot {
  position: absolute;
  top: 14px; right: 14px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #c8452c;
}

/* ====== 注册 / 登录 ====== */
.auth-sheet {
  border-radius: 14px;
  padding: 26px 22px;
  margin-top: 8px;
}
.auth-tabs {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 18px;
}
.auth-tabs span {
  padding-bottom: 6px;
  color: #9a8462;
  cursor: pointer;
  font-size: 18px;
  letter-spacing: 3px;
}
.auth-tabs span.on {
  color: #a53122;
  border-bottom: 2px solid #c8452c;
}
.auth-tip {
  font-size: 13px;
  color: #9a8462;
  line-height: 1.8;
  margin-bottom: 18px;
  text-align: center;
}
.auth-hint { color: #a04a30; }
.field { margin-bottom: 16px; }
.field-label {
  display: block;
  font-size: 13px;
  color: #8a7350;
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  border: none;
  border-bottom: 1px dashed rgba(138, 115, 80, 0.5);
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  color: inherit;
  outline: none;
  padding: 6px 2px;
}
.auth-skip {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: #9a8462;
  cursor: pointer;
}

/* ====== 弹层 ====== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(60, 40, 15, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.modal-sheet {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  border-radius: 10px;
  padding: 26px 24px;
  position: relative;
  animation: fadein 0.2s ease;
}
.modal-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #9a8462;
  margin-bottom: 16px;
}
.modal-body {
  font-size: 17px;
  line-height: 34px;
  white-space: pre-wrap;
  word-break: break-all;
  padding-bottom: 10px;
}
.modal-seal {
  width: 52px; height: 52px;
  border-radius: 9px;
  background: linear-gradient(135deg, #c8452c, #a53122);
  color: #fdf3e3;
  font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  transform: rotate(-6deg);
  box-shadow: 0 3px 9px rgba(160, 50, 30, 0.35);
  margin: 18px 0 0 auto;
}
.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 22px;
  flex-wrap: wrap;
}
.reg-prompt { text-align: center; }
.reg-prompt h3 { font-weight: normal; letter-spacing: 4px; margin: 14px 0 10px; }
.reg-prompt p { font-size: 14px; color: #8a7350; line-height: 1.9; }
.reg-prompt .modal-seal { margin: 0 auto; }
.reg-prompt-sub { margin-top: 14px; font-size: 12px; color: #b3a184; }
.modal-sheet h3 { font-weight: normal; letter-spacing: 4px; text-align: center; margin-top: 12px; }
.account-sub { text-align: center; color: #9a8462; font-size: 13px; margin-top: 6px; }

/* ====== 回信评价 ====== */
.rate-row {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(154, 132, 98, 0.08);
  text-align: center;
}
.rate-label { font-size: 13px; color: #8a7350; }
.rate-btns { display: flex; gap: 12px; margin-top: 10px; }
.rate-btn {
  flex: 1;
  padding: 9px 0;
  border-radius: 999px;
  font-size: 14px;
  border: none;
  cursor: pointer;
}
.rate-btn.good {
  color: #fdf3e3;
  background: linear-gradient(135deg, #6f9c5a, #4a7c3f);
}
.rate-btn.bad {
  color: #8a7350;
  background: rgba(154, 132, 98, 0.16);
}
.rate-done { font-size: 13px; color: #9a8462; }

/* ====== Toast ====== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 60px;
  transform: translateX(-50%);
  background: rgba(60, 40, 15, 0.85);
  color: #fdf3e3;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 999px;
  z-index: 99;
  max-width: 80vw;
  animation: fadein 0.2s ease;
}

@keyframes fadein {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ====== 主题展示区 ====== */
.topics-section {
  padding: 20px 0;
}

.section-title {
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  color: var(--text-primary);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.section-sub {
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.topic-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.topic-card {
  display: flex;
  align-items: center;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 2px 10px var(--shadow);
  cursor: pointer;
  transition: all 0.2s;
}

.topic-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--shadow-md);
}

.topic-card:active {
  transform: scale(0.97);
}

.topic-icon {
  font-size: 28px;
  margin-right: 14px;
}

.topic-info {
  flex: 1;
}

.topic-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.topic-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: normal;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 999px;
}

.topic-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.topic-arrow {
  font-size: 20px;
  color: var(--text-muted);
  margin-left: 10px;
}

/* ====== 树洞入口 ====== */
.treehole-entry {
  display: flex;
  align-items: center;
  margin-top: 16px;
  padding: 14px 18px;
  background: rgba(240, 248, 240, 0.6);
  border: 1px dashed rgba(100, 140, 100, 0.3);
  border-radius: 12px;
  cursor: pointer;
}

.treehole-entry:hover {
  background: rgba(235, 245, 235, 0.8);
}

.treehole-icon {
  font-size: 26px;
  margin-right: 14px;
}

.treehole-info {
  flex: 1;
}

.treehole-name {
  font-size: 15px;
  font-weight: 600;
  color: #4a6a4a;
  margin-bottom: 3px;
}

.treehole-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: normal;
  color: #5a8a5a;
  background: rgba(90, 138, 90, 0.15);
  border-radius: 999px;
}

.treehole-desc {
  font-size: 13px;
  color: #6a8a6a;
  line-height: 1.5;
}

.treehole-arrow {
  font-size: 18px;
  color: #8aaa8a;
  margin-left: 10px;
}

/* ====== 首页底部入口 ====== */
.home-entries {
  margin-top: 20px;
  padding-bottom: 20px;
}

/* ====== 信箱 tabs ====== */
.inbox-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin: 10px 0 0;
}
.inbox-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 15px;
  letter-spacing: 1px;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}
.inbox-tab.on {
  color: var(--accent);
  font-weight: 600;
}
.inbox-tab.on::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 25%;
  width: 50%;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* ====== 「我」tab 卡片 ====== */
.mine-card {
  margin-top: 16px;
  border-radius: 14px;
  background: var(--bg-card);
  box-shadow: 0 2px 12px var(--shadow);
  overflow: hidden;
}
.user-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 18px 14px;
}
.avatar-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c8452c, #a53122);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.avatar-text {
  color: #fdf3e3;
  font-size: 20px;
  font-weight: 600;
}
.user-info { flex: 1; }
.pen-name {
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--text-primary);
}
.user-role {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}
.quota-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px 16px;
}
.quota-row {
  font-size: 14px;
  color: var(--text-secondary);
}
.quota-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  margin-left: 6px;
}
.shop-btn {
  padding: 6px 16px !important;
  font-size: 13px !important;
}

.entry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--bg-card);
  box-shadow: 0 1px 6px var(--shadow);
  cursor: pointer;
}
.entry-label {
  font-size: 15px;
  color: var(--text-primary);
  letter-spacing: 1px;
}
.entry-more {
  font-size: 16px;
  color: var(--text-muted);
}

/* ====== 浮动写信按钮 ====== */
.fab {
  position: fixed;
  right: 20px;
  bottom: 80px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c8452c, #a53122);
  color: #fdf3e3;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(160, 50, 30, 0.35);
  cursor: pointer;
  z-index: 40;
  line-height: 1.2;
  transition: transform 0.15s;
}
.fab:active { transform: scale(0.92); }

/* ====== 底部入口 ====== */
.bottom-entries {
  text-align: center;
  margin: 22px 0 6px;
}
.entry-btn {
  background: none;
  border: none;
  font-size: 13px;
  letter-spacing: 2px;
  color: rgba(138, 115, 80, 0.7);
  cursor: pointer;
  padding: 0;
}
.entry-btn:active { opacity: 0.6; }

/* ====== 主题适配：傍晚/深夜 ====== */
.theme-evening .avatar-circle { background: linear-gradient(135deg, #d4a574, #b8865a); }
.theme-neon .avatar-circle { background: linear-gradient(135deg, #00d2ff, #00a8cc); }
.theme-neon .fab { background: linear-gradient(135deg, #00d2ff, #00a8cc); box-shadow: 0 4px 16px rgba(0, 210, 255, 0.3); }

@media (min-width: 700px) {
  #app { padding-top: 20px; }
}

/* ====== 心灵探索：左侧标签 ====== */
.test-tab {
  position: fixed;
  left: 0;
  top: 25%;
  transform: translateY(-50%);
  z-index: 50;
  width: 25px;
  padding: 11px 6px;
  background: var(--bg-card);
  border-radius: 0 8px 8px 0;
  box-shadow: 1px 1px 6px var(--shadow-md);
  border-right: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.test-tab span {
  writing-mode: vertical-rl;
  font-size: 17px;
  letter-spacing: 6px;
  color: var(--text-secondary);
}

/* 遮罩层 */
.drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 98;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  transition: background 0.3s;
}

.drawer-mask.visible {
  background: rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}

/* 侧边抽屉 */
.test-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 99;
  width: 78%;
  max-width: 320px;
  background: var(--bg-page);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 16px var(--shadow-lg);
}

.test-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  padding: 50px 22px 18px;
  border-bottom: 1px solid rgba(154, 132, 98, 0.15);
}

.drawer-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--text-primary);
  letter-spacing: 4px;
}

.drawer-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-tertiary);
  letter-spacing: 1px;
}

.drawer-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 14px;
}

.test-item {
  display: flex;
  align-items: center;
  padding: 14px 12px;
  margin-bottom: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 4px var(--shadow);
  cursor: pointer;
  transition: all 0.15s;
}

.test-item:hover {
  background: rgba(255, 248, 235, 0.95);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(120, 100, 70, 0.1);
}

.test-item:active {
  transform: scale(0.98);
}

.test-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(154, 132, 98, 0.08);
  border: 1px solid rgba(154, 132, 98, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #8a7452;
  margin-right: 12px;
  flex-shrink: 0;
  letter-spacing: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}

.test-info {
  flex: 1;
}

.test-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.test-meta {
  font-size: 12px;
  color: var(--text-tertiary);
}

.test-price {
  font-size: 14px;
  color: #c0392b;
  font-weight: 600;
  margin-left: auto;
  margin-right: 4px;
}

.test-arrow {
  font-size: 18px;
  color: var(--text-muted);
  margin-left: 8px;
}

.drawer-feedback {
  text-align: center;
  padding: 18px 12px 28px;
  font-size: 12px;
  color: var(--text-tertiary);
  letter-spacing: 1px;
  cursor: pointer;
}

/* ====== 测试答题页 ====== */
.test-intro { padding: 20px 0; }
.test-intro-head { text-align: center; margin-bottom: 24px; position: relative; }
.test-intro-head::after { content: ''; display: block; width: 36px; height: 2px; background: linear-gradient(90deg, transparent, rgba(200,69,44,0.35), transparent); margin: 14px auto 0; }
.test-intro-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(154, 132, 98, 0.06);
  border: 1px solid rgba(154, 132, 98, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #8a7452;
  letter-spacing: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}
.test-intro-title { font-size: 24px; font-weight: bold; color: var(--text-primary); letter-spacing: 3px; margin-top: 8px; }
.test-intro-sub { font-size: 14px; color: var(--text-tertiary); margin-top: 4px; }

.test-intro-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px var(--shadow);
}
.test-intro-overview { font-size: 14px; color: var(--text-primary); line-height: 1.8; margin-bottom: 12px; }
.test-intro-meta { border-top: 1px solid rgba(154, 132, 98, 0.12); padding-top: 10px; }
.test-intro-meta p { font-size: 13px; color: #5a4a2a; margin: 4px 0; }
.tm-label { display: inline-block; width: 56px; color: #a89272; font-size: 12px; }
.test-intro-val { margin-top: 10px; font-size: 12px; color: #6d5a3d; line-height: 1.7; padding: 10px; background: rgba(154,132,98,0.06); border-radius: 8px; }
.test-intro-usage { padding: 12px 14px; background: var(--accent-light); border-radius: 10px; border-left: 3px solid var(--accent-border); font-size: 13px; color: var(--text-primary); line-height: 1.7; margin-bottom: 12px; }
.test-intro-disclaimer { font-size: 12px; color: var(--text-tertiary); text-align: center; margin-bottom: 16px; }

/* 版本选择 */
.test-versions { margin-bottom: 16px; }
.versions-title { font-size: 14px; color: var(--text-secondary); text-align: center; margin-bottom: 10px; letter-spacing: 1px; }
.versions-list { display: flex; gap: 10px; }
.version-card { flex: 1; padding: 14px 12px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; text-align: center; cursor: pointer; transition: all 0.2s; position: relative; }
.version-card:hover { border-color: var(--accent-border); }
.version-card.active { border-color: var(--accent); background: var(--accent-light); box-shadow: 0 2px 8px var(--shadow); }
.version-badge { position: absolute; top: -1px; right: -1px; background: var(--accent); color: #fff; font-size: 10px; padding: 2px 8px; border-radius: 0 6px 0 6px; line-height: 1.4; }
.version-label { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.version-subtitle { font-size: 12px; color: var(--text-secondary); line-height: 1.4; margin-bottom: 8px; }
.version-divider { height: 1px; background: var(--border); margin: 6px 0; }
.version-features { text-align: left; padding: 2px 4px; }
.version-feature { display: flex; align-items: flex-start; margin-bottom: 3px; }
.feature-check { color: var(--accent); font-size: 11px; margin-right: 4px; flex-shrink: 0; line-height: 1.5; }
.feature-text { font-size: 11px; color: var(--text-secondary); line-height: 1.5; }
.version-meta { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.version-price { font-size: 16px; font-weight: 700; color: var(--accent); margin-top: 4px; }

/* 补差价升级入口 */
.tr-upgrade { background: var(--bg-card); border: 1px solid var(--accent); border-radius: 10px; padding: 16px; margin-bottom: 16px; box-shadow: 0 2px 8px var(--shadow); }
.tr-upgrade-header { display: flex; align-items: flex-start; margin-bottom: 12px; }
.tr-upgrade-icon { font-size: 24px; margin-right: 10px; flex-shrink: 0; }
.tr-upgrade-info { flex: 1; }
.tr-upgrade-info strong { display: block; font-size: 14px; color: var(--text-primary); margin-bottom: 4px; }
.tr-upgrade-info small { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.tr-upgrade-pricing { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding: 0 2px; }
.tr-upgrade-full { font-size: 13px; color: var(--text-muted); text-decoration: line-through; }
.tr-upgrade-diff { font-size: 14px; color: var(--accent); font-weight: 600; }
.tr-upgrade-btn { width: 100%; padding: 10px; text-align: center; background: var(--accent); color: #fff; font-size: 14px; font-weight: 600; border-radius: 8px; border: none; cursor: pointer; }
.tr-upgrade-btn:hover { opacity: 0.9; }
.tr-upgrade-btn.disabled { opacity: 0.5; cursor: not-allowed; }

/* 答题页 */
.test-question { padding: 16px 0; }
.tq-progress { height: 3px; background: rgba(154,132,98,0.15); border-radius: 2px; margin-bottom: 6px; overflow: hidden; }
.tq-bar { height: 100%; background: linear-gradient(90deg, #c8452c, #e06050); border-radius: 2px; transition: width 0.3s ease; }
.tq-counter { text-align: right; font-size: 12px; color: #a89272; margin-bottom: 20px; }
.tq-text { font-size: 18px; color: var(--text-primary); line-height: 1.7; margin-bottom: 24px; }
.tq-options { display: flex; flex-direction: column; gap: 10px; }
.tq-option { display: flex; align-items: center; padding: 14px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; transition: all 0.15s; font-size: 15px; }
.tq-option:hover { background: rgba(255,248,235,0.95); }
.tq-option.selected { background: var(--accent-light); border-color: rgba(200,69,44,0.4); }
.tq-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(154,132,98,0.4); margin-right: 12px; flex-shrink: 0; transition: all 0.15s; }
.tq-dot.on { border-color: #c8452c; background: #c8452c; box-shadow: inset 0 0 0 2px #fdf3e3; }
/* 时间/数字题（PSQI） */
.tq-input-area { margin-top: 8px; }
.tq-input-row { display: flex; align-items: center; gap: 8px; }
.tq-input { width: 100%; padding: 12px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; font-size: 16px; color: var(--text-primary); box-sizing: border-box; }
.tq-input-unit { font-size: 14px; color: var(--text-secondary); flex-shrink: 0; }
.tq-confirm-btn { margin-top: 14px; width: 100%; padding: 12px 0; background: var(--primary); color: #fff; border: none; border-radius: 22px; font-size: 15px; cursor: pointer; }

.tq-ab-hint { font-size: 13px; color: #a89272; text-align: center; margin-bottom: 14px; }
.tq-ab-card { display: flex; align-items: flex-start; padding: 14px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-size: 15px; line-height: 1.6; transition: all 0.15s; }
.tq-ab-card:hover { background: rgba(255,248,235,0.95); }
.tq-ab-card.selected { background: var(--accent-light); border-color: rgba(200,69,44,0.4); }
.tq-ab-tag { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px; background: rgba(154,132,98,0.15); color: #6d5a3d; font-size: 13px; font-weight: 600; margin-right: 10px; flex-shrink: 0; }
.tq-ab-card.selected .tq-ab-tag { background: #c8452c; color: #fdf3e3; }
.tq-ab-or { text-align: center; font-size: 12px; color: #b3a184; padding: 4px 0; }
.tq-prev { text-align: center; padding: 16px 0; font-size: 14px; color: #a89272; cursor: pointer; }

/* 结果页 */
.test-result { padding: 20px 0; }
.tr-head { text-align: center; margin-bottom: 24px; }
.tr-score { width: 80px; height: 80px; border-radius: 50%; border: 3px solid; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto 12px; }
.tr-num { font-size: 28px; font-weight: bold; color: var(--text-primary); }
.tr-max { font-size: 12px; color: #a89272; }
.tr-badge { display: inline-block; padding: 6px 20px; border-radius: 999px; font-size: 18px; font-weight: bold; color: #fff; letter-spacing: 2px; margin-bottom: 10px; }
.tr-title { font-size: 20px; font-weight: bold; letter-spacing: 2px; }
.tr-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 12px; font-size: 14px; color: var(--text-primary); line-height: 1.8; box-shadow: 0 2px 10px var(--shadow); }
.tr-label { font-size: 13px; color: var(--text-tertiary); font-weight: 600; margin-bottom: 8px; }
.tr-suggest-list { list-style: none; padding: 0; }
.tr-suggest-list li { font-size: 14px; color: var(--text-primary); line-height: 1.8; padding-left: 14px; position: relative; margin-bottom: 4px; }
.tr-suggest-list li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #c8452c; position: absolute; left: 0; top: 9px; }
/* 重要提示卡（临床类量表） */
.tr-notice { background: rgba(200, 69, 44, 0.08); border: 1px solid rgba(200, 69, 44, 0.35); border-left: 4px solid var(--accent); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; font-size: 13px; color: var(--text-primary); line-height: 1.8; }
.tr-notice-title { font-size: 13px; color: var(--accent); font-weight: 700; margin-bottom: 6px; }
/* 分档标题 */
.tr-entry-title { font-size: 16px; color: var(--text-primary); font-weight: 700; margin: 6px 0 10px; }
/* 就医红线卡（警示样式） */
.tr-redlines { background: rgba(200, 69, 44, 0.08); border: 1px solid rgba(200, 69, 44, 0.35); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.tr-redlines-title { font-size: 13px; color: var(--accent); font-weight: 700; margin-bottom: 8px; line-height: 1.6; }
.tr-redlines-item { font-size: 13px; color: var(--text-primary); line-height: 1.9; }
.tr-dim-list { display: flex; flex-direction: column; gap: 16px; }
.tr-dim-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.tr-dim-item:last-child { border-bottom: none; }
.tr-dim-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tr-dim-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.tr-dim-pct { font-size: 14px; font-weight: 600; color: #c8452c; }
.tr-dim-bar { width: 100%; height: 8px; background: var(--bg-secondary); border-radius: 4px; overflow: hidden; margin-bottom: 6px; }
.tr-dim-fill { height: 100%; background: linear-gradient(90deg, #c8452c, #e06050); border-radius: 4px; transition: width 0.5s ease; }
.tr-dim-score { font-size: 12px; color: var(--text-tertiary); text-align: right; }
.tr-dim-interp { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-top: 10px; padding: 12px; background: var(--bg-secondary); border-radius: 8px; }
/* 子维度得分 */
.tr-factor-warn { font-size: 12px; color: var(--accent); font-weight: 600; }
.tr-dim-fill-warn { background: var(--accent) !important; }
/* 压力源对比 */
.tr-fc-row { display: flex; align-items: center; justify-content: space-between; margin: 14px 0; }
.tr-fc-item { flex: 1; text-align: center; padding: 14px 8px; background: var(--bg-secondary); border-radius: 10px; opacity: 0.65; }
.tr-fc-item.tr-fc-active { opacity: 1; border: 1px solid var(--primary); }
.tr-fc-name { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }
.tr-fc-val { font-size: 24px; font-weight: 700; color: var(--primary); }
.tr-fc-vs { font-size: 12px; color: var(--text-secondary); padding: 0 14px; font-weight: 600; }
.tr-fc-note { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }
/* 4 周计划 */
.tr-week-list { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.tr-week-item { background: var(--bg-secondary); border-radius: 10px; padding: 12px; }
.tr-week-head { font-size: 14px; font-weight: 600; color: var(--primary); margin-bottom: 8px; }
.tr-week-task { font-size: 13px; color: var(--text-primary); line-height: 1.8; }
.tr-section { padding: 14px 0; border-bottom: 1px solid var(--border); }
.tr-section:last-child { border-bottom: none; padding-bottom: 0; }
.tr-section:first-child { padding-top: 4px; }
.tr-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.tr-section-label { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.tr-section-score { font-size: 13px; color: var(--text-secondary); }
.tr-section-level { font-size: 13px; font-weight: 600; }
.tr-section-desc { font-size: 13px; color: var(--text-primary); line-height: 1.8; margin-bottom: 8px; }
.tr-hotline { padding: 12px 14px; background: rgba(200,69,44,0.04); border-radius: 10px; border: 1px solid rgba(200,69,44,0.15); margin-bottom: 12px; font-size: 13px; }
.tr-hotline-title { color: #a83a26; font-weight: 600; margin-bottom: 6px; }
.tr-hotline a { color: #a83a26; font-weight: 600; text-decoration: none; }
/* 紧急求助提示（临床量表结果页） */
.tr-emergency { padding: 12px 14px; background: #a83a26; color: #fff; border-radius: 10px; margin-bottom: 12px; font-size: 13px; line-height: 1.7; }
/* 危机干预弹窗 */
.crisis-mask { position: fixed; inset: 0; background: rgba(30,20,15,0.55); display: flex; align-items: center; justify-content: center; z-index: 999; padding: 24px; }
.crisis-card { background: #fffaf3; border-radius: 14px; padding: 28px 24px 20px; max-width: 360px; width: 100%; box-shadow: 0 8px 32px rgba(60,30,10,0.25); }
.crisis-title { font-size: 16px; font-weight: 700; color: #4a3520; margin-bottom: 12px; text-align: center; }
.crisis-text { font-size: 14px; color: #5a4a38; line-height: 1.8; margin-bottom: 20px; }
.crisis-text a { color: #a83a26; font-weight: 700; text-decoration: none; }
.crisis-btn { display: block; width: 100%; padding: 10px 0; background: #a83a26; color: #fff; border: none; border-radius: 10px; font-size: 14px; cursor: pointer; }
.tr-convert { text-align: center; padding: 16px 0; }
.tr-convert p { font-size: 14px; color: #8a7452; line-height: 1.7; margin-bottom: 12px; }

/* 人话总结 */
.tr-human {
  padding: 14px 12px;
  margin-bottom: 10px;
  background: var(--accent-light);
  border-radius: 10px;
  border-left: 3px solid var(--accent-border);
}
.tr-human-text {
  font-size: 16px;
  color: var(--text-primary);
  line-height: 1.8;
  letter-spacing: 1px;
}

/* 介绍页价格 */
.test-intro-price { display: flex; align-items: center; justify-content: center; margin: 16px 0 8px; font-size: 14px; color: #8b7355; }
.test-intro-price strong { font-size: 22px; color: #c0392b; margin-left: 8px; }
.test-intro-price strong.test-price-free { color: var(--accent); }
.test-intro-hint { text-align: center; font-size: 12px; color: #a89272; margin-top: 8px; }
.version-price-free { color: var(--accent); }

/* 你将获得 */
.test-intro-gains { background: var(--bg-gains); border: 1px solid var(--border-gains); border-radius: 10px; padding: 16px 14px; margin-bottom: 14px; }
.test-gains-title { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 10px; letter-spacing: 1px; }
.test-gains-item { display: flex; align-items: flex-start; margin-bottom: 8px; font-size: 14px; color: var(--text-primary); line-height: 1.6; }
.test-gains-item:last-child { margin-bottom: 0; }
.test-gains-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(200, 69, 44, 0.45); margin-top: 9px; margin-right: 10px; flex-shrink: 0; }
.btn-primary.disabled { background: #c4b99a !important; box-shadow: none !important; cursor: not-allowed; }

/* 深度报告解锁卡片 */
.tr-report { padding: 0; margin: 12px 0; background: var(--bg-card); border-radius: 10px; border: 1px solid var(--border); overflow: hidden; box-shadow: 0 2px 10px var(--shadow); }
/* 免费预览：核心解读段 + 底部淡出 */
.tr-report-preview { position: relative; padding: 14px 16px 28px; }
.tr-report-preview-label { font-size: 12px; font-weight: 600; color: var(--accent); margin: 0 0 8px; }
.tr-report-preview-text { font-size: 13px; color: var(--text-primary); line-height: 1.8; margin: 0; max-height: 140px; overflow: hidden; }
.tr-report-preview-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: linear-gradient(to bottom, transparent, var(--bg-card)); }
/* 锁定区：内容说明 + 解锁按钮 */
.tr-report-lock { padding: 14px 16px; border-top: 1px dashed var(--border); text-align: center; }
.tr-report-lock strong { display: block; font-size: 14px; color: var(--text-primary); margin-bottom: 4px; }
.tr-report-lock small { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 10px; }
.tr-report-btn { display: block; width: 100%; padding: 10px; font-size: 14px; font-weight: 600; color: #fff; background: linear-gradient(135deg, #d4a017, #b8860b); border: none; border-radius: 20px; cursor: pointer; }
.tr-report-combo { margin: 8px 0 0; font-size: 12px; color: var(--accent); cursor: pointer; }
.tr-report-btn.disabled { background: #c4b99a; cursor: not-allowed; }
/* 深度报告（解锁后） */
.tr-dreport { margin-top: 8px; }
.tr-dreport-divider { display: flex; align-items: center; margin: 20px 0 14px; }
.tr-dreport-divider::before, .tr-dreport-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.tr-dreport-divider span { padding: 0 14px; font-size: 14px; font-weight: 600; color: var(--primary); letter-spacing: 3px; }
.tr-dreport-head { text-align: center; margin-bottom: 14px; }
.tr-dreport-head h3 { font-size: 18px; color: var(--text-primary); margin: 0 0 4px; }
.tr-dreport-head p { font-size: 12px; color: var(--text-tertiary); margin: 0; }
.tr-dreport-sublabel { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin: 12px 0 4px; }
.tr-dreport-q { font-size: 13px; color: var(--primary); margin: 0 0 4px; }
.tr-dreport-letter { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 18px 16px; margin-top: 6px; box-shadow: 0 2px 10px var(--shadow); }
.tr-dreport-letter-title { font-size: 14px; font-weight: 700; color: var(--primary); margin: 0 0 8px; }
.tr-dreport-letter-text { font-size: 14px; color: var(--text-primary); line-height: 2; white-space: pre-line; margin: 0; }
.tr-disclaimer { font-size: 12px; color: #a89272; text-align: center; margin: 12px 0; }
.tr-actions { display: flex; justify-content: center; gap: 14px; padding: 12px 0 30px; }

/* ====== 分享预览弹窗 ====== */
.share-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.share-modal { width: 85%; max-width: 380px; background: #fdf8ee; border-radius: 16px; padding: 24px 20px 20px; text-align: center; }
.share-modal-title { font-size: 16px; font-weight: 700; color: #4a3b2a; margin-bottom: 14px; }
.share-modal-img { width: 100%; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.1); }
.share-style-toggle { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.share-style-btn { padding: 5px 18px; border-radius: 999px; font-size: 13px; color: #8a7452; background: rgba(154,132,98,0.1); border: 1px solid transparent; cursor: pointer; }
.share-style-btn.active { background: rgba(200,69,44,0.08); color: #c8452c; border-color: rgba(200,69,44,0.3); font-weight: 600; }
.share-modal-hint { font-size: 12px; color: #a89272; margin-top: 8px; }
.share-modal-actions { display: flex; gap: 12px; margin-top: 16px; }
.share-modal-btn { flex: 1; height: 40px; line-height: 40px; border-radius: 20px; font-size: 14px; text-align: center; cursor: pointer; }
.share-modal-btn.cancel { background: rgba(154,132,98,0.12); color: #8a7452; }
.share-modal-btn.confirm { background: linear-gradient(135deg, #c8452c, #a53122); color: #fdf3e3; }

/* ========== 我的觉察记录 ========== */
.test-records { max-width: 560px; margin: 0 auto; }
.records-header { text-align: center; padding: 18px 0 22px; }
.records-title { font-size: 24px; font-weight: 700; color: var(--text-primary); letter-spacing: 2px; }
.records-sub { margin-top: 8px; font-size: 13px; color: var(--text-tertiary); }
.records-empty { text-align: center; padding: 56px 0; }
.records-empty-icon { font-size: 40px; margin-bottom: 12px; }
.records-empty-text { font-size: 16px; color: var(--text-secondary); }
.records-empty-hint { margin-top: 8px; font-size: 13px; color: var(--text-tertiary); }
.record-item { display: flex; align-items: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; box-shadow: 0 2px 10px var(--shadow); cursor: pointer; transition: all 0.15s; }
.record-item:hover { border-color: var(--accent); }
.record-icon { width: 40px; height: 40px; line-height: 40px; text-align: center; font-size: 22px; border-radius: 8px; background: var(--accent-light); margin-right: 12px; flex-shrink: 0; }
.record-info { flex: 1; min-width: 0; }
.record-title { font-size: 15px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.record-result { margin-top: 3px; font-size: 14px; font-weight: 600; }
.record-meta { margin-top: 3px; font-size: 12px; color: var(--text-tertiary); }
.record-report-tag { color: var(--accent); }
.record-del { width: 28px; height: 28px; line-height: 28px; text-align: center; font-size: 13px; color: var(--text-tertiary); flex-shrink: 0; border-radius: 6px; cursor: pointer; }
.record-del:hover { color: var(--accent); background: var(--accent-light); }

/* ========== 底部协议链接 ========== */
.footer-links { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; padding: 16px 0; }
.footer-link { font-size: 13px; color: var(--text-tertiary); cursor: pointer; letter-spacing: 1px; }
.footer-link:hover { color: var(--accent); }
.footer-divider { font-size: 13px; color: var(--border-strong); }

/* ========== 协议/隐私弹窗 ========== */
.agreement-modal { max-width: 520px; max-height: 80vh; }
.agreement-modal .modal-body { padding: 20px 24px; }
.agreement-modal h4 { font-size: 15px; font-weight: 600; color: var(--text-primary); margin: 16px 0 8px; padding-left: 10px; border-left: 3px solid var(--accent); }
.agreement-modal h4:first-of-type { margin-top: 8px; }
.agreement-modal p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 8px; }
.agreement-modal .doc-date { font-size: 12px; color: var(--text-muted); text-align: center; margin-bottom: 16px; }

/* ====== 信件详情：水印层 ====== */
.watermark-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.watermark-text {
  position: absolute;
  font-size: 13px;
  color: rgba(120, 90, 40, 0.08);
  white-space: nowrap;
  transform: rotate(-30deg);
  font-family: "Kaiti SC", "STKaiti", "KaiTi", "楷体", serif;
  letter-spacing: 4px;
}
.watermark-text:nth-child(1) { top: 15%; left: 5%; }
.watermark-text:nth-child(2) { top: 45%; left: 25%; }
.watermark-text:nth-child(3) { top: 75%; left: 10%; }

/* 信件详情：称呼与署名 */
.modal-salutation {
  font-size: 17px;
  color: var(--text-primary);
  margin-bottom: 12px;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", "楷体", serif;
}
.modal-sign-area {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  justify-content: flex-end;
}
.modal-sign-text {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.modal-sign-name {
  font-size: 15px;
  color: var(--text-primary);
  font-family: "Kaiti SC", "STKaiti", "KaiTi", "楷体", serif;
}
.modal-sign-date {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* 保密提示 */
.privacy-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 14px;
  letter-spacing: 1px;
}

/* ====== 写信页：信纸内称呼与署名 ====== */
.sheet-salutation {
  font-size: 17px;
  color: rgba(74, 59, 42, 0.7);
  margin: 14px 0 4px;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", "楷体", serif;
}
.sheet-sign {
  text-align: right;
  font-size: 15px;
  color: rgba(74, 59, 42, 0.5);
  margin: 4px 0 0;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", "楷体", serif;
}
.send-tip {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  letter-spacing: 1px;
}

/* ====== 反馈页标题 ====== */
.fb-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  letter-spacing: 3px;
  margin-bottom: 6px;
}
.fb-sub {
  font-size: 13px;
  color: var(--text-tertiary);
  text-align: center;
  margin-bottom: 18px;
}

/* ====== 测试介绍页：作答说明标题 ====== */
.test-intro-usage .usage-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
  letter-spacing: 1px;
}
.test-intro-usage .usage-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.7;
}

/* ====== 千语故事（待上线）====== */
.stories-head { text-align: center; margin: 16px 0 12px; }
.stories-title { font-size: 22px; font-weight: normal; letter-spacing: 6px; color: var(--text-primary); }
.stories-sub { margin-top: 6px; font-size: 13px; color: var(--text-tertiary); letter-spacing: 1px; }
.stories-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.stories-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 15px;
  letter-spacing: 1px;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
}
.stories-tab.on {
  color: var(--accent);
  font-weight: 600;
}
.stories-tab.on::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 25%;
  width: 50%;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}
.stories-loading { text-align: center; padding: 40px 0; color: var(--text-muted); font-size: 14px; }
.stories-empty { text-align: center; padding: 60px 0 30px; }
.stories-empty-icon { font-size: 40px; margin-bottom: 12px; }
.stories-empty-text { font-size: 16px; color: var(--text-secondary); margin-bottom: 6px; }
.stories-empty-sub { font-size: 13px; color: var(--text-tertiary); }
.story-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.story-card:hover { border-color: var(--accent-border); }
.story-card.expanded { cursor: default; }
.story-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.story-title { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.story-body {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 8px 0;
}
.story-preview {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.story-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}
.story-author { color: var(--text-tertiary); }
.story-views { color: var(--text-muted); }
.story-time { margin-left: auto; }
.story-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
}
.story-status.pending { color: #b08a50; background: rgba(176, 138, 80, 0.1); }
.story-status.published { color: #5a8a5a; background: rgba(90, 138, 90, 0.1); }
.story-status.rejected { color: #8a5a5a; background: rgba(138, 90, 90, 0.1); }
.story-reject { font-size: 12px; color: #a53122; margin-top: 6px; }
.stories-submit-tip {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.7;
  margin: 8px 0 14px;
  padding: 10px;
  background: rgba(154, 132, 98, 0.06);
  border-radius: 8px;
}
