:root {
  --bg: #faf7f2;
  --card: #ffffff;
  --text: #2f2a26;
  --muted: #7a7268;
  --line: #e6e0d6;
  --accent: #8a6f52;
  --accent-soft: #f0e8dc;
  --danger: #a8443a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

.hidden { display: none !important; }

h1 { font-size: 22px; font-weight: 500; margin: 0; }
h2 { font-size: 17px; font-weight: 500; margin: 0 0 12px; }

.brand { text-align: center; padding: 24px 0 20px; }
.brand h1 { font-size: 26px; letter-spacing: 2px; }
.sub { color: var(--muted); font-size: 14px; margin: 6px 0 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}

input, select, textarea {
  width: 100%;
  display: block;
  margin-top: 6px;
  padding: 11px 12px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

textarea { resize: vertical; }

.row { display: flex; gap: 12px; }
.row label { flex: 1; }

button {
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 11px 16px;
}

.primary {
  width: 100%;
  background: var(--accent);
  color: #fff;
  margin-top: 4px;
}

.ghost {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 8px 14px;
  font-size: 14px;
}

.link {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  padding: 4px 8px;
}

.danger { color: var(--danger); }

.hint { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.empty { color: var(--muted); font-size: 14px; text-align: center; padding: 24px 0; }

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

.item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.item-link { color: var(--accent); text-decoration: none; font-size: 14px; }

.cover { text-align: center; padding: 8px 0 20px; }
.cover-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--accent-soft);
}
.cover-name { margin-top: 18px; font-size: 24px; letter-spacing: 2px; }
.cover-years { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.cover-summary { color: var(--muted); font-size: 15px; margin: 10px 0 0; }

.badges { margin-top: 12px; }
.badge {
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 12px;
}

.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted);
  padding: 12px 4px;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}

.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ===== 时间线：借鉴参考图 —— 贯通竖轴 + 轴左日期 + 年代圆徽章 + 彩色气泡 ===== */

.timeline { position: relative; }

/* 贯通整条时间线的主轴：穿过「节点圆点列」的中心（52 + 12 = 64px） */
.axis {
  position: absolute;
  left: 63px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    rgba(138, 111, 82, 0) 0,
    var(--line) 24px,
    var(--line) calc(100% - 24px),
    rgba(138, 111, 82, 0) 100%
  );
}

/* 年代圆徽章：骑在轴上，可点击收起/展开该年代 */
.era {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 20px 0 14px;
  width: 56px;
  height: 56px;
  margin-left: 36px; /* 56px 徽章中心对准 64px 轴线 */
  border-radius: 50%;
  background: linear-gradient(145deg, #eda06a, #d97f45);
  color: #fff;
  line-height: 1.1;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  user-select: none;
  -webkit-user-select: none;
}
.era:active { transform: scale(0.96); }
.era .era-num { font-size: 15px; font-weight: 600; letter-spacing: 0.5px; }
.era .era-sub { font-size: 10px; opacity: 0.92; }
.era.era-unknown { background: linear-gradient(145deg, #b9aea2, #9c9084); }

/* 收起时显示的数量角标（红色小方块） */
.era-count {
  position: absolute;
  left: 52px;
  top: -2px;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 7px;
  background: #e5484d;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* 标签筛选：无关节点淡出，位置不变，避免跳切 */
.node.dim { opacity: 0.22; }

.node.flash > .card-node {
  box-shadow: 0 0 0 2px var(--accent);
  transition: box-shadow 0.3s ease;
}

/* 三列布局：轴左日期 | 圆点列 | 气泡卡片 */
.node {
  position: relative;
  display: grid;
  grid-template-columns: 52px 24px 1fr;
  margin-bottom: 18px;
}

/* 轴左侧的日期（如 10月 / 1998） */
.node-when {
  text-align: right;
  padding-right: 6px;
  padding-top: 12px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}
.node-when .when-year { display: block; font-size: 15px; font-weight: 700; color: var(--accent, #8a6f52); line-height: 1.25; }
.node-when .when-main { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.node-when .when-unknown { display: block; font-size: 13px; font-weight: 600; color: var(--danger); }
/* 时间未知的片段：圆点标红，统一沉到时间线最底部 */
.node-unknown .dot { border-color: var(--danger); background: var(--danger); }

/* 圆点：空心圆环，颜色跟随气泡色调 */
.dot {
  position: relative;
  z-index: 1;
  justify-self: center;
  margin-top: 14px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--card);
  border: 3px solid var(--accent);
}

/* 彩色气泡：头部色条 + 白色内容区 */
.card-node {
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
}

.bubble-title {
  margin: 0;
  padding: 10px 14px;
  color: #fff;
  font-size: 15px;
  line-height: 1.5;
  /* 双保险：line-clamp 在个别浏览器会「截高度不截文字」，导致溢出。
     标题最长 30 字本就短，max-height 再兜一道底。 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 4.6em;
}
.bubble-title.open {
  display: block;
  overflow: visible;
  max-height: none;
}

.bubble-body { padding: 12px 14px 12px; }

/* 五种暖色调轮换，参考图的彩色区分思路，但整体更沉稳 */
.tone-0 .bubble-title { background: linear-gradient(145deg, #b08968, #97724f); }
.tone-1 .bubble-title { background: linear-gradient(145deg, #8aa392, #6f8a77); }
.tone-2 .bubble-title { background: linear-gradient(145deg, #93a3ba, #76869e); }
.tone-3 .bubble-title { background: linear-gradient(145deg, #bd9191, #a17474); }
.tone-4 .bubble-title { background: linear-gradient(145deg, #c8ab74, #ad8f55); }
.tone-0 .dot { border-color: #a97e58; }
.tone-1 .dot { border-color: #7d987f; }
.tone-2 .dot { border-color: #8595ac; }
.tone-3 .dot { border-color: #ad8282; }
.tone-4 .dot { border-color: #b69a5f; }

.node-head { display: none; } /* 日期已移至轴左侧，保留类名避免旧引用报错 */

.tag {
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 10px;
}

/* 照片完整显示，不裁切；竖长图按高度上限等比缩放并居中 */
.node-img {
  display: block;
  max-width: 100%;
  max-height: 420px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  margin: 10px auto 0;
  background: var(--accent-soft);
  cursor: zoom-in;
}

/* 文字介绍：图片下方，默认只露两行，点击展开全文 */
.bubble-caption {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: calc(2 * 1.7em + 1px); /* 与上同理，防截高不截字 */
  cursor: pointer;
}

.bubble-caption.open {
  display: block;
  overflow: visible;
  max-height: none;
  cursor: default;
}

/* 旧版 caption 类已由 .bubble-caption 取代（保留兜底，无引用时无害） */
.caption {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}

.caption.open {
  display: block;
  overflow: visible;
}

/* ---------- 上传进度环 ---------- */

.upload-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 4px;
  padding: 10px 12px;
  background: var(--accent-soft, #f4ede4);
  border-radius: 10px;
}

.progress-ring {
  position: relative;
  width: 48px;
  height: 48px;
  flex: none;
}

.progress-ring svg { width: 48px; height: 48px; transform: rotate(-90deg); }

.progress-ring circle {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
}

.progress-ring .ring-bg { stroke: rgba(0, 0, 0, 0.08); }

.progress-ring .ring-val {
  stroke: #b08968;
  stroke-dasharray: 0 126;
  transition: stroke-dasharray 0.15s linear;
}

.progress-ring span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--muted);
}

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }

/* 大图查看层 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(20, 17, 15, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  gap: 14px;
  cursor: zoom-out;
}
.lightbox.hidden { display: none; }

.lightbox img {
  max-width: 100%;
  max-height: 74vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  cursor: default;
}

.lb-meta { max-width: 640px; text-align: center; cursor: default; }
.lb-date { color: #d9c9a8; font-size: 13px; }
.lb-caption {
  margin: 6px 0 0;
  color: #f2ece4;
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
}
.lb-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.12);
  color: #f2ece4;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
}

.link.small { font-size: 13px; }

.msg {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.msg-head { display: flex; justify-content: space-between; align-items: baseline; }
.msg-author { font-size: 14px; font-weight: 500; }
.msg-time { font-size: 12px; color: var(--muted); }
.msg-body { margin: 8px 0 6px; font-size: 15px; white-space: pre-wrap; }
.msg-actions { display: flex; gap: 4px; align-items: center; }
.flag { font-size: 12px; color: var(--danger); }

.edit-item { display: flex; gap: 12px; margin-bottom: 16px; }
.thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--accent-soft);
}

.fields { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.fields input { margin-top: 0; font-size: 14px; padding: 8px 10px; }
.edit-actions { display: flex; gap: 8px; }

.token {
  display: block;
  word-break: break-all;
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 10px;
  font-size: 12px;
  color: var(--accent);
}

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--muted);
}

.foot a { color: var(--accent); text-decoration: none; }
.status { font-size: 13px; }

input[type="file"] { padding: 8px; font-size: 14px; }

/* ---------- 标签栏与抽屉 ---------- */

.tag-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

.tag-bar-text { font-size: 14px; color: var(--accent); }
.ghost.small { padding: 4px 12px; font-size: 13px; }

.drawer {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 640px;
  background: var(--card);
  border-top: 1px solid var(--line);
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -6px 24px rgba(47, 42, 38, 0.12);
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
  z-index: 30;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 8px;
}

.drawer-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.drawer-item {
  flex: 0 0 auto;
  width: 148px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
}

.drawer-info { display: flex; flex-direction: column; gap: 2px; }
.drawer-date { font-size: 12px; color: var(--accent); }
.drawer-text {
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 弹窗 ---------- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(47, 42, 38, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 40;
}

.modal-box {
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: 14px;
  padding: 18px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-head h3 { margin: 0; font-size: 17px; font-weight: 500; }

.pm-img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--accent-soft);
  margin-bottom: 12px;
}

.modal-foot {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.modal-foot .primary { flex: 1; margin-top: 0; }

.date-btn {
  width: 100%;
  margin-top: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  text-align: left;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
}

.check input { width: auto; margin: 0; }

/* ---------- 日期轮盘 ---------- */

.wheel-row {
  display: flex;
  gap: 10px;
  margin: 8px 0 14px;
}

.wheel-col { flex: 1; }

.wheel-label {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.wheel {
  height: 200px;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  scrollbar-width: none;
}

.wheel::-webkit-scrollbar { display: none; }

.wheel-item {
  height: 40px;
  line-height: 40px;
  text-align: center;
  font-size: 15px;
  color: var(--muted);
  scroll-snap-align: center;
  cursor: pointer;
}

.wheel-item.sel {
  color: var(--accent);
  font-weight: 700;
  font-size: 18px;
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent), inset -3px 0 0 var(--accent);
}

.wheel-item.wheel-special {
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
}

/* ---------- 照片下的留言 ---------- */

.msg-count {
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-soft);
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  margin-top: 10px;
  cursor: pointer;
}

.comments {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  cursor: default;
}

.comments .msg {
  padding: 10px;
  margin-bottom: 8px;
  background: var(--bg);
}

.comment-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.comment-form textarea { margin-top: 0; }
.comment-form .primary { margin-top: 0; }
.comment-actions { display: flex; gap: 8px; align-items: center; }
.comment-actions .primary { flex: 0 0 auto; width: auto; padding-left: 26px; padding-right: 26px; }
.rec-btn {
  flex: 1 1 auto;
  font-size: 15px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--line, #e3dccf);
  background: #fbf7ef;
  color: var(--accent, #8a6f52);
  cursor: pointer;
  touch-action: none;          /* 触屏按住时不要误触发滚动 */
  -webkit-user-select: none;
  user-select: none;
}
.rec-btn:active { background: #f3ebda; }
.rec-btn.recording {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}
.rec-btn:disabled { opacity: .55; cursor: not-allowed; }
.msg-audio { width: 100%; margin-top: 4px; height: 38px; }

.edit-item {
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  align-items: center;
}

@media (max-width: 400px) {
  .row { flex-direction: column; gap: 0; }
}

/* ---------- 生卒日期选择器 ---------- */

.person-date { display: block; }
.person-date .date-btn { width: 100%; }

/* ---------- 代表图网格 ---------- */

.cover-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.cover-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
  cursor: pointer;
}
.cover-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cover-cell.active { border-color: var(--accent); }
.cover-cell.active::after {
  content: "✓";
  position: absolute;
  top: 4px;
  right: 6px;
  color: #fff;
  background: var(--accent);
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 50%;
  font-size: 13px;
}

/* ---------- 进门封面页 ---------- */

.cover-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 24px calc(28px + env(safe-area-inset-bottom));
  background: linear-gradient(165deg, #211e1a 0%, #3a3128 55%, #4a3c2c 100%);
  color: #f4ede2;
  text-align: center;
  animation: csFade 600ms ease both;
}
@keyframes csFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cs-inner { width: 100%; max-width: 420px; }
.cs-frame {
  width: 168px;
  aspect-ratio: 3 / 4;
  margin: 0 auto 22px;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-frame .cs-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-frame .cs-initial { font-size: 64px; font-weight: 500; opacity: 0.9; }
.cs-name {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 30px;
  letter-spacing: 3px;
  margin: 0 0 8px;
}
.cs-life { margin: 0; font-size: 16px; opacity: 0.86; }
.cs-summary {
  margin: 10px auto 26px;
  max-width: 320px;
  font-size: 14px;
  line-height: 1.7;
  opacity: 0.7;
}
.cs-enter {
  font-size: 18px;
  padding: 13px 40px;
  letter-spacing: 2px;
}
.cs-share {
  margin-top: 14px;
  font-size: 15px;
  padding: 9px 26px;
  color: var(--ink, #5a5248);
  border-color: rgba(255,255,255,0.5);
}
.cs-share:hover { background: rgba(255,255,255,0.12); }

/* ---------- 漂浮工具条（老年模式 + 使用帮助） ---------- */

.float-tools {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 50; /* 低于封面页(60)/引导层(70)，封面页时会自然被盖住 */
  display: flex;
  gap: 8px;
}

.ft-btn {
  width: auto;
  margin: 0;
  padding: 7px 13px;
  font-size: 14px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(47, 42, 38, 0.14);
  cursor: pointer;
}
.ft-btn:active { transform: scale(0.95); }
.ft-help { font-size: 16px; font-weight: 700; }

/* ---------- 老年模式：整体放大字号与点按区 ---------- */

body.elder { font-size: 19px; line-height: 1.78; }
body.elder h1 { font-size: 26px; }
body.elder h2 { font-size: 20px; margin-bottom: 14px; }
body.elder .sub { font-size: 16px; }
body.elder label { font-size: 16px; margin-bottom: 14px; }
body.elder input,
body.elder select,
body.elder textarea {
  font-size: 18px;
  padding: 15px 14px;
  border-radius: 10px;
}
body.elder .row { gap: 14px; }
body.elder button { font-size: 18px; padding: 15px 18px; }
body.elder .primary { font-size: 19px; padding: 15px 18px; }
body.elder .ghost { font-size: 16px; padding: 11px 18px; }
body.elder .link { font-size: 15px; padding: 6px 10px; }
body.elder .date-btn { font-size: 17px; padding: 15px 14px; }
body.elder .tab { font-size: 17px; padding: 15px 4px; }
body.elder .hint { font-size: 15px; }
body.elder .token { font-size: 13px; }
body.elder .cover-name { font-size: 28px; }
body.elder .cover-summary { font-size: 17px; }
body.elder .cs-name { font-size: 34px; }
body.elder .cs-life { font-size: 18px; }
body.elder .cs-summary { font-size: 16px; }
body.elder .cs-enter { font-size: 20px; padding: 15px 44px; }
body.elder .cs-share { font-size: 18px; padding: 12px 32px; }
body.elder .era .era-num { font-size: 17px; }
body.elder .era .era-sub { font-size: 11px; }
body.elder .node-when .when-year { font-size: 17px; }
body.elder .node-when .when-main { font-size: 14px; }
body.elder .node-when .when-unknown { font-size: 15px; }
body.elder .bubble-title { font-size: 17px; }
body.elder .bubble-caption { font-size: 16px; }
body.elder .wheel-item { font-size: 17px; height: 46px; line-height: 46px; }
body.elder .wheel-item.sel { font-size: 20px; }
body.elder .tag { font-size: 14px; padding: 3px 12px; }
body.elder .msg-count { font-size: 15px; padding: 8px 16px; }
body.elder .comment-form textarea { font-size: 17px; }

/* ---------- 首次使用引导：分步高亮遮罩 ---------- */

.coach {
  position: fixed;
  inset: 0;
  z-index: 70; /* 高于所有弹窗与封面页 */
  pointer-events: auto; /* 拦截点击，避免点到底层 */
}

.coach-spot {
  position: absolute;
  border-radius: 12px;
  /* 巨大投影在四周形成暗色遮罩，仅高亮目标区域 */
  box-shadow: 0 0 0 9999px rgba(20, 17, 15, 0.66);
  background: transparent;
  pointer-events: none;
  transition: top 0.2s ease, left 0.2s ease, width 0.2s ease, height 0.2s ease;
}

.coach-tip {
  position: absolute;
  width: min(88vw, 330px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 10px 36px rgba(47, 42, 38, 0.28);
  pointer-events: auto;
}

.coach-step { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.coach-title { margin: 0 0 8px; font-size: 18px; font-weight: 600; color: var(--accent); }
.coach-text { margin: 0; font-size: 15px; line-height: 1.7; color: var(--text); }
body.elder .coach-title { font-size: 21px; }
body.elder .coach-text { font-size: 18px; }
body.elder .coach-step { font-size: 15px; }

.coach-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.coach-actions .link { margin-right: auto; }
.coach-actions .ghost { flex: 0 0 auto; }
.coach-actions .primary { flex: 1; margin-top: 0; }

