/* ============================================================
   岁月另我 OtherMe · 样式
   暖纸 / 墨色 / 旧金 · 明/暗/跟随系统 · 适老化大字号
   ============================================================ */
[hidden] { display: none !important; }

:root {
  --fs-base: 20px;
  --radius: 22px;
  --radius-sm: 14px;
  --maxw: 1180px;
  --shadow: 0 18px 50px -22px rgba(60, 40, 20, .35);
  --shadow-sm: 0 8px 24px -14px rgba(60, 40, 20, .3);

  --bg: #f6efe2;
  --bg-2: #efe5d2;
  --surface: #fffdf8;
  --surface-2: #f1e7d4;
  --text: #3a2e22;
  --muted: #8a7860;
  --line: #e3d6bf;
  --accent: #b1843c;
  --accent-2: #c8a15a;
  --accent-soft: #ecdcb8;
  --brand: #2b2018;
  --good: #5b7d4b;
}

[data-theme="dark"] {
  --bg: #17120c;
  --bg-2: #1f1810;
  --surface: #241c12;
  --surface-2: #2e2417;
  --text: #f1e7d3;
  --muted: #b6a385;
  --line: #3a2e1d;
  --accent: #d9b36a;
  --accent-2: #e6c585;
  --accent-soft: #46371f;
  --brand: #f1e7d3;
  --good: #9bc07f;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, .6);
  --shadow-sm: 0 8px 24px -14px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Noto Sans SC", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: var(--fs-base);
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background .4s ease, color .4s ease;
}

h1, h2, h3, .serif {
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-weight: 700;
  letter-spacing: .02em;
}

a { color: inherit; text-decoration: none; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .7rem clamp(1rem, 4vw, 2.4rem);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .55rem; }
.brand-mark { color: var(--accent); font-size: 1.5rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-cn { font-family: "Noto Serif SC", serif; font-weight: 900; font-size: 1.25rem; color: var(--brand); }
.brand-en { font-size: .68rem; letter-spacing: .28em; color: var(--muted); text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: clamp(.6rem, 2vw, 1.6rem); }
.nav a { font-weight: 500; color: var(--muted); padding: .3rem .2rem; transition: color .2s; }
.nav a:hover { color: var(--text); }
.nav-cta {
  background: var(--accent); color: #fff !important; padding: .5rem 1.1rem !important;
  border-radius: 999px; font-weight: 700; box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .nav-cta { color: #1a120a !important; }
.topbar-actions { display: flex; align-items: center; gap: .5rem; }
.icon-btn {
  width: 2.4rem; height: 2.4rem; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-size: 1.05rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: .2s;
}
.icon-btn:hover { background: var(--surface-2); transform: translateY(-1px); }
.font-size-control { display: flex; gap: .3rem; }
.theme-switch { display: flex; gap: .25rem; padding: .2rem; border-radius: 12px; background: var(--surface-2); }
.theme-btn {
  width: 2.1rem; height: 2.1rem; border: none; background: transparent; border-radius: 9px;
  cursor: pointer; font-size: 1rem; color: var(--muted); transition: .2s;
}
.theme-btn.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }

.hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.4fr .9fr; align-items: center; gap: 2rem;
  max-width: var(--maxw); margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 4vw, 2.4rem);
}
.hero-grain {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background:
    radial-gradient(60% 50% at 20% 20%, color-mix(in srgb, var(--accent-soft) 60%, transparent), transparent 70%),
    radial-gradient(50% 50% at 90% 80%, color-mix(in srgb, var(--accent-soft) 45%, transparent), transparent 70%);
}
.hero-inner { position: relative; z-index: 1; }
.hero-eyebrow { letter-spacing: .4em; color: var(--accent); font-size: .82rem; font-weight: 700; margin: 0 0 .6rem; }
.hero-title {
  font-size: clamp(3.4rem, 11vw, 6.6rem); line-height: .98; margin: 0 0 1rem; color: var(--brand); font-weight: 900;
}
.hero-title .hl { color: var(--accent); position: relative; }
.hero-slogan { font-family: "Noto Serif SC", serif; font-size: clamp(1.15rem, 3vw, 1.7rem); font-weight: 600; margin: 0 0 1.2rem; color: var(--text); }
.hero-desc { max-width: 40ch; color: var(--muted); font-size: 1.02rem; margin: 0 0 1.8rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 1.1rem; }
.hero-hint { font-size: .85rem; color: var(--muted); opacity: .85; margin: 0; }
.hero-photo { position: relative; z-index: 1; display: flex; justify-content: center; }
.photo-frame {
  width: min(280px, 70vw); aspect-ratio: 3/4; border-radius: 16px; padding: 14px;
  background: linear-gradient(160deg, var(--accent-soft), color-mix(in srgb, var(--accent-soft) 40%, var(--surface)));
  box-shadow: var(--shadow); transform: rotate(-3deg); position: relative; border: 1px solid var(--line);
}
.photo-film {
  width: 100%; height: 100%; border-radius: 8px;
  background:
    radial-gradient(40% 30% at 30% 25%, rgba(255,255,255,.5), transparent 60%),
    linear-gradient(150deg, #6b5436, #3a2c1c 70%);
  filter: sepia(.4) contrast(1.05);
}
.photo-cap {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  font-family: "Noto Serif SC", serif; color: #f3e7cf; font-size: .8rem; letter-spacing: .1em; opacity: .85;
}

.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 4vw, 2.4rem); }
.section-alt { background: var(--bg-2); max-width: none; }
.section-alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section-head { text-align: center; margin-bottom: 2.6rem; }
.section-kicker { display: inline-block; letter-spacing: .3em; color: var(--accent); font-size: .8rem; font-weight: 700; margin-bottom: .6rem; }
.section-title { font-size: clamp(1.8rem, 5vw, 2.8rem); margin: 0 0 .6rem; color: var(--brand); }
.section-sub { color: var(--muted); max-width: 52ch; margin: 0 auto; }

.btn-primary, .btn-gold, .btn-ghost, .btn-xl, .btn-lg {
  font-family: inherit; font-weight: 700; cursor: pointer; border-radius: 999px;
  transition: transform .2s cubic-bezier(.16,1,.3,1), box-shadow .2s, background .2s; border: 1px solid transparent;
}
.btn-primary { background: var(--brand); color: var(--bg); padding: .85rem 1.6rem; font-size: 1.05rem; box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-gold { background: var(--accent); color: #fff; padding: .8rem 1.5rem; font-size: 1.02rem; box-shadow: var(--shadow-sm); }
[data-theme="dark"] .btn-gold { color: #1a120a; }
.btn-gold:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); padding: .8rem 1.4rem; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-xl { padding: 1rem 2rem; font-size: 1.12rem; }
.btn-lg { padding: .9rem 1.5rem; font-size: 1.05rem; width: 100%; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.4rem; }
.story-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s;
  display: flex; flex-direction: column;
}
.story-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.story-cover {
  height: 150px; padding: 1.1rem; display: flex; flex-direction: column; justify-content: flex-end;
  color: #f4e9d2; position: relative;
}
.story-cover::after { content: "❧"; position: absolute; top: .8rem; right: 1rem; font-size: 1.3rem; opacity: .6; }
.story-cover .sc-author { font-size: .8rem; opacity: .9; }
.story-cover .sc-title { font-family: "Noto Serif SC", serif; font-weight: 700; font-size: 1.25rem; line-height: 1.2; }
.story-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.story-excerpt { color: var(--muted); font-size: .94rem; margin: 0; flex: 1; }
.story-more { color: var(--accent); font-weight: 700; font-size: .92rem; }

.salvage-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4rem; align-items: start; }
.salvage-intro p { color: var(--muted); margin-top: 0; }
.salvage-points { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .7rem; }
.salvage-points li { padding-left: 1.6rem; position: relative; color: var(--text); }
.salvage-points li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 900; }
.salvage-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
.salvage-steps li { display: flex; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); }
.step-no { flex: 0 0 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 900; font-family: "Noto Serif SC", serif; }
[data-theme="dark"] .step-no { color: #1a120a; }
.salvage-steps b { font-family: "Noto Serif SC", serif; }
.salvage-steps p { margin: .25rem 0 0; color: var(--muted); font-size: .95rem; }

.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.4rem; }
.plan {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem 1.6rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: .8rem; position: relative;
  transition: transform .3s cubic-bezier(.16,1,.3,1);
}
.plan:hover { transform: translateY(-5px); }
.plan.featured { border-color: var(--accent); box-shadow: var(--shadow); }
.plan.featured::before { content: "最受欢迎"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: .76rem; font-weight: 700; padding: .25rem .9rem; border-radius: 999px; }
[data-theme="dark"] .plan.featured::before { color: #1a120a; }
.plan-name { font-family: "Noto Serif SC", serif; font-weight: 700; font-size: 1.35rem; }
.plan-price { font-size: 2rem; font-weight: 900; color: var(--accent); font-family: "Noto Serif SC", serif; }
.plan-price small { font-size: .9rem; color: var(--muted); font-weight: 500; }
.plan-desc { color: var(--muted); font-size: .92rem; margin: 0; }
.plan-feats { list-style: none; padding: 0; margin: .4rem 0 0; display: grid; gap: .55rem; flex: 1; }
.plan-feats li { padding-left: 1.5rem; position: relative; font-size: .95rem; }
.plan-feats li::before { content: "✦"; position: absolute; left: 0; color: var(--accent); }

.essay-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.3rem; }
.essay-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.4rem 1.5rem; box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .3s, box-shadow .3s; }
.essay-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.essay-meta { font-size: .8rem; color: var(--accent); letter-spacing: .05em; margin-bottom: .4rem; }
.essay-title { font-family: "Noto Serif SC", serif; font-size: 1.3rem; margin: 0 0 .5rem; }
.essay-snippet { color: var(--muted); font-size: .95rem; margin: 0 0 .6rem; }
.essay-more { color: var(--accent); font-weight: 700; font-size: .9rem; }

.workbench { background: var(--bg-2); max-width: none; }
.workbench > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.wb-layout { display: grid; grid-template-columns: 300px 1fr; gap: 1.8rem; align-items: start; }
.chapters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm); position: sticky; top: 84px; }
.chapters-title { font-size: 1.2rem; margin: 0 0 1rem; }
.chapter-list { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; gap: .5rem; }
.chapter-item { display: flex; align-items: center; gap: .8rem; padding: .7rem .85rem; border-radius: 14px; cursor: pointer; border: 1px solid transparent; transition: .2s; background: var(--surface-2); }
.chapter-item:hover { border-color: var(--line); }
.chapter-item.active { background: var(--accent-soft); border-color: var(--accent); }
.chapter-emoji { font-size: 1.4rem; }
.chapter-meta { display: flex; flex-direction: column; line-height: 1.2; }
.chapter-name { font-weight: 700; }
.chapter-state { font-size: .78rem; color: var(--muted); }
.chapter-done .chapter-state { color: var(--good); }
.chapters-foot { display: grid; gap: .9rem; border-top: 1px solid var(--line); padding-top: 1.1rem; }
.progress-wrap { display: grid; gap: .35rem; }
.progress-label { font-size: .82rem; color: var(--muted); }
.progress-track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .5s ease; }

.stage { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.2rem, 3vw, 2rem); box-shadow: var(--shadow-sm); display: grid; gap: 1.4rem; }
.stage-head { text-align: center; }
.stage-emoji { font-size: 2.6rem; }
.stage-title { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: .3rem 0; }
.stage-desc { color: var(--muted); margin: 0; }

.guide-card, .milestones { background: var(--surface-2); border-radius: var(--radius-sm); padding: 1.1rem 1.3rem; }
.guide-head, .milestones-head { display: flex; align-items: center; gap: .5rem; font-weight: 700; margin-bottom: .7rem; }
.guide-ico { font-size: 1.2rem; }
.guide-list { margin: 0; padding-left: 1.3rem; display: grid; gap: .4rem; color: var(--text); }
.guide-list li { color: var(--muted); }

.recorder { display: grid; justify-items: center; gap: .9rem; padding: 1.2rem; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.rec-btn { display: inline-flex; align-items: center; gap: .7rem; font-family: inherit; font-weight: 700; font-size: 1.1rem; padding: 1rem 2rem; border-radius: 999px; border: none; cursor: pointer; color: #fff; background: var(--accent); box-shadow: var(--shadow-sm); transition: transform .2s, background .2s; }
[data-theme="dark"] .rec-btn { color: #1a120a; }
.rec-btn:hover { transform: translateY(-2px); }
.rec-dot { width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.3); }
[data-theme="dark"] .rec-dot { background: #1a120a; }
.rec-btn.recording { background: #c0392b; animation: pulse 1.4s infinite; }
[data-theme="dark"] .rec-btn.recording .rec-dot { background: #fff; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(192,57,43,.5); } 50% { box-shadow: 0 0 0 14px rgba(192,57,43,0); } }
.wave { width: 100%; max-width: 520px; height: 64px; opacity: .25; transition: opacity .3s; }
.wave.on { opacity: 1; }
.rec-status { color: var(--muted); font-size: .95rem; text-align: center; }
.rec-transcript { width: 100%; min-height: 2.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .9rem 1.1rem; color: var(--text); white-space: pre-wrap; line-height: 1.9; }

.saved-block { display: grid; gap: .7rem; }
.saved-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; }
.link-btn { background: none; border: none; color: var(--accent); cursor: pointer; font-size: .9rem; font-family: inherit; }
.saved-text { background: var(--surface-2); border-radius: var(--radius-sm); padding: 1rem 1.2rem; white-space: pre-wrap; line-height: 1.95; min-height: 2rem; color: var(--text); }
.typing-fallback { display: grid; gap: .5rem; margin-top: .4rem; }
.typing-fallback label { color: var(--muted); font-size: .9rem; }
.typing-fallback textarea { font-family: inherit; font-size: 1rem; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem; resize: vertical; }
.typing-fallback .btn-ghost { justify-self: start; }

.milestones-tip { color: var(--muted); font-size: .9rem; margin: 0 0 .8rem; }
.milestone-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem; }
.milestone-item { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: .2s; }
.milestone-item:hover { border-color: var(--accent); }
.milestone-check { width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; color: #fff; font-size: .9rem; flex: 0 0 auto; }
.milestone-item.done { background: color-mix(in srgb, var(--good) 16%, var(--surface)); border-color: var(--good); }
.milestone-item.done .milestone-check { background: var(--good); border-color: var(--good); }
.milestone-label { font-size: .95rem; }

.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 1.2rem; background: rgba(20, 14, 8, .55); backdrop-filter: blur(4px); animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card { width: min(680px, 96vw); max-height: 90vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); animation: rise .3s cubic-bezier(.16,1,.3,1); }
@keyframes rise { from { transform: translateY(18px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.modal-head h2 { margin: 0; font-size: 1.4rem; }
.bio-content, .reader-body { white-space: pre-wrap; line-height: 2; font-family: "Noto Serif SC", serif; padding: 1.5rem; font-size: 1.05rem; color: var(--text); }
.reader-body { font-size: 1.08rem; }
.bio-loading { display: flex; align-items: center; gap: 1rem; padding: 2rem 1.5rem; color: var(--muted); }
.spinner { width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: 0 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.audio-bar { display: flex; align-items: center; gap: .8rem; padding: .9rem 1.5rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.read-status { font-size: .9rem; color: var(--muted); }
.read-status.speaking { color: var(--accent); }
.read-progress { flex: 1; min-width: 120px; height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.read-progress-fill { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.modal-foot { display: flex; gap: .8rem; padding: 1.1rem 1.5rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.reader-card { width: min(760px, 96vw); }

.ai-body { padding: 1.4rem 1.5rem 1.6rem; display: grid; gap: 1.4rem; }
.ai-group { display: grid; gap: .7rem; }
.ai-group-title { margin: 0; font-size: 1.05rem; color: var(--accent); }
.ai-tip { color: var(--muted); font-size: .92rem; margin: 0; }
.ai-hint { color: var(--accent); font-size: .86rem; margin: 0; min-height: 1em; }
.ai-field { display: grid; gap: .4rem; font-weight: 500; font-size: .95rem; }
.ai-field input, .ai-field select { font-family: inherit; font-size: 1.02rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .75rem; }
.ai-actions { display: flex; gap: .8rem; }

.toast { position: fixed; left: 50%; bottom: 2rem; transform: translateX(-50%); background: var(--brand); color: var(--bg); padding: .9rem 1.4rem; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow); z-index: 90; animation: rise .3s ease both; max-width: 92vw; text-align: center; font-size: .95rem; }

.footer { background: var(--brand); color: var(--bg); padding: 3rem 1.5rem; text-align: center; }
.footer-inner { max-width: 720px; margin: 0 auto; }
.footer-brand { display: inline-flex; flex-direction: column; line-height: 1; margin-bottom: 1rem; }
.footer-brand .brand-cn { font-family: "Noto Serif SC", serif; font-weight: 900; font-size: 1.5rem; color: var(--bg); }
.footer-brand .brand-en { font-size: .7rem; letter-spacing: .3em; opacity: .7; }
.footer-philo { opacity: .85; line-height: 1.9; margin: 0 0 1.4rem; }
.footer-copy { font-size: .82rem; opacity: .6; margin: 0; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-inner { order: 1; }
  .hero-photo { order: 2; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .salvage-wrap { grid-template-columns: 1fr; }
  .wb-layout { grid-template-columns: 1fr; }
  .chapters { position: static; }
}
@media (max-width: 680px) {
  .nav a:not(.nav-cta) { display: none; }
  :root { --fs-base: 18px; }
  .topbar { flex-wrap: wrap; }
}

/* ===== 录入方式切换 ===== */
.input-tabs { display: flex; gap: .4rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: .3rem; justify-self: center; }
.input-tab { flex: 1; border: none; background: transparent; border-radius: 999px; padding: .6rem .9rem; font-family: inherit; font-weight: 700; font-size: .98rem; color: var(--muted); cursor: pointer; transition: .2s; white-space: nowrap; }
.input-tab.active { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
[data-theme="dark"] .input-tab.active { color: #1a120a; }
.text-pane { display: grid; gap: .7rem; }
.text-pane label { color: var(--muted); font-size: .95rem; }
.text-pane textarea { font-family: inherit; font-size: 1.02rem; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .9rem; resize: vertical; }
.text-pane .btn-gold { justify-self: start; }
.image-pane { display: grid; gap: .8rem; }
.pane-tip { color: var(--muted); font-size: .92rem; margin: 0; }
.upload-btn { display: inline-flex; align-items: center; gap: .4rem; justify-self: start; background: var(--accent); color: #fff; padding: .7rem 1.2rem; border-radius: 999px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-sm); }
[data-theme="dark"] .upload-btn { color: #1a120a; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .7rem; }
.img-cell { position: relative; margin: 0; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1; background: var(--surface-2); }
.img-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-del { position: absolute; top: .3rem; right: .3rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; border: none; background: rgba(20,14,8,.7); color: #fff; cursor: pointer; font-size: .85rem; line-height: 1; }

/* ===== 传记弹窗 AI 工具 ===== */
.ai-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; padding: .9rem 1.5rem; border-top: 1px solid var(--line); }
.ai-tool-status { font-size: .88rem; color: var(--accent); }
.illustration-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .9rem; padding: 0 1.5rem 1.2rem; }
.illustration-gallery:not([hidden]) { border-top: 1px dashed var(--line); padding-top: 1.2rem; }
.ill-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.ill-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.ill-cap { padding: .5rem .7rem; font-size: .85rem; font-weight: 700; color: var(--text); text-align: center; }

/* ===== AI 排版书稿弹窗 ===== */
#typesetContent { min-height: 8rem; }

/* ===== AI 数字人 ===== */
.avatar-body { display: grid; gap: 1.2rem; padding: 1.4rem 1.5rem; }
.avatar-stage { position: relative; aspect-ratio: 4/3; border-radius: var(--radius-sm); overflow: hidden; background: radial-gradient(60% 60% at 50% 35%, var(--accent-soft), var(--surface-2)); display: flex; align-items: center; justify-content: center; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-img.speaking { animation: avatarBreath 2.4s ease-in-out infinite; }
@keyframes avatarBreath { 0%,100% { transform: scale(1); filter: brightness(1); } 50% { transform: scale(1.03); filter: brightness(1.08); } }
.avatar-placeholder { color: var(--muted); text-align: center; font-size: .95rem; line-height: 1.7; padding: 1rem; }
.avatar-controls { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.avatar-controls .btn-gold:disabled { opacity: .5; cursor: not-allowed; }

/* ===== 视频预览 ===== */
.media-body { padding: 1.2rem 1.5rem; display: grid; gap: 1rem; }
.media-video { width: 100%; border-radius: var(--radius-sm); background: #000; max-height: 60vh; }

/* ===== 顶栏用户区 / 登录按钮 ===== */
.btn-login {
  font-family: inherit; font-weight: 700; font-size: .92rem; cursor: pointer; white-space: nowrap;
  padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--accent);
  background: transparent; color: var(--accent); transition: .2s;
}
.btn-login:hover { background: var(--accent); color: #fff; }
[data-theme="dark"] .btn-login:hover { color: #1a120a; }
.user-area { display: inline-flex; align-items: center; gap: .55rem; }
.user-name { font-size: .92rem; font-weight: 700; color: var(--text); white-space: nowrap; }
.cloud-dot {
  font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--line); color: var(--muted);
}
.cloud-dot.ok { color: var(--good); border-color: color-mix(in srgb, var(--good) 50%, var(--line)); background: color-mix(in srgb, var(--good) 12%, transparent); }
.cloud-dot.warn { color: #c0732b; border-color: #c0732b55; background: #c0732b18; }

/* ===== 登录 / 注册弹窗 ===== */
.auth-card { width: min(440px, 96vw); }
.auth-body { padding: 1.4rem 1.5rem 1.6rem; display: grid; gap: .9rem; }
.auth-tabs { display: flex; gap: .4rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: .3rem; }
.auth-tab { flex: 1; border: none; background: transparent; border-radius: 999px; padding: .55rem; font-family: inherit; font-weight: 700; font-size: .98rem; color: var(--muted); cursor: pointer; transition: .2s; }
.auth-tab.active { background: var(--accent); color: #fff; }
[data-theme="dark"] .auth-tab.active { color: #1a120a; }
.auth-field { display: grid; gap: .4rem; font-weight: 500; font-size: .95rem; }
.auth-field input { font-family: inherit; font-size: 1.05rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem; }
.auth-msg { margin: 0; min-height: 1.2em; font-size: .9rem; font-weight: 600; color: #c0392b; }
.auth-hint { margin: 0; font-size: .85rem; color: var(--muted); line-height: 1.7; }

/* ===== 故事库行动号召 ===== */
.lib-cta { margin-top: 2.4rem; text-align: center; display: grid; gap: 1rem; justify-items: center; }
.lib-cta p { color: var(--muted); max-width: 46ch; margin: 0; }
.lib-cta b { color: var(--text); }

/* ===== 打捞旧我：引语 + 数据看板 ===== */
.salvage-quote {
  margin: 1.6rem 0 0; padding: 1.1rem 1.3rem; border-left: 4px solid var(--accent);
  background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text); font-style: italic; line-height: 1.9;
}
.salvage-quote span { display: block; margin-top: .6rem; font-style: normal; font-size: .85rem; color: var(--muted); }
.salvage-stats {
  max-width: var(--maxw); margin: 2.6rem auto 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem;
}
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.3rem 1rem; text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat b { display: block; font-family: "Noto Serif SC", serif; font-size: 2rem; color: var(--accent); line-height: 1.1; }
.stat span { font-size: .88rem; color: var(--muted); }

/* ===== 岁月定制保障说明 ===== */
.custom-note { max-width: 60ch; margin: 2rem auto 0; text-align: center; color: var(--muted); font-size: .95rem; line-height: 1.8; }

/* ===== 录音小提示 ===== */
.rec-hint { margin: .2rem 0 0; font-size: .82rem; color: var(--accent); line-height: 1.6; text-align: center; }

/* ===== AI 排版书稿视图 ===== */
.typeset-content {
  white-space: pre-wrap; line-height: 2.1; font-family: "Noto Serif SC", serif; padding: 2rem 1.8rem; font-size: 1.05rem; color: var(--text);
  max-height: 62vh; overflow: auto; text-align: left;
}
.typeset-content::first-line { font-weight: 700; }
