/* ===========================================================
   萤火绘本 — 全站样式
   纸感、暖光、克制的动效
   =========================================================== */

:root {
  --cream: #faf5ea;
  --cream-2: #f3ecdc;
  --paper: #fffdf7;
  --ink: #22231e;
  --ink-2: #46473d;
  --muted: #7c7869;
  --line: rgba(47, 74, 58, 0.14);
  --line-2: rgba(47, 74, 58, 0.08);
  --forest: #2f4a3a;
  --forest-2: #3e5b45;
  --forest-3: #57755d;
  --amber: #e9a63c;
  --amber-2: #f2be6a;
  --amber-soft: #f8e3bd;
  --ember: #c96f3a;
  --night: #171c33;
  --night-2: #232a4c;
  --danger: #b3452f;
  --ok: #4e7d5b;

  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: "PingFang SC", "HarmonyOS Sans SC", "MiSans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --round: "Yuanti SC", "Yuanti TC", "Hiragino Sans GB", "PingFang SC", sans-serif;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --shadow-1: 0 1px 2px rgba(34, 35, 30, 0.05), 0 8px 24px rgba(34, 35, 30, 0.06);
  --shadow-2: 0 2px 6px rgba(34, 35, 30, 0.06), 0 24px 60px rgba(34, 35, 30, 0.12);
  --max: 1240px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(233, 166, 60, 0.12), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(47, 74, 58, 0.07), transparent 60%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--amber-soft); color: var(--ink); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.995); }
.btn.primary {
  background: var(--forest);
  color: #fdf9ee;
  box-shadow: 0 6px 18px rgba(47, 74, 58, 0.22);
}
.btn.primary:hover { background: #263f31; box-shadow: 0 8px 26px rgba(47, 74, 58, 0.28); }
.btn.ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.btn.ghost:hover { background: rgba(255, 255, 255, 0.5); color: var(--ink); border-color: rgba(47, 74, 58, 0.25); }
.btn.amber { background: var(--amber); color: #2b2416; }
.btn.amber:hover { background: var(--amber-2); }
.btn.lg { padding: 14px 26px; font-size: 15.5px; }
.btn.full { width: 100%; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid rgba(179, 69, 47, 0.25); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--forest);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px solid rgba(47, 74, 58, 0.3);
  padding-bottom: 1px;
}
.link-btn:hover { color: var(--ember); border-color: rgba(201, 111, 58, 0.4); }

/* ---------- 导航 ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px max(28px, calc((100vw - var(--max)) / 2));
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
.nav.scrolled {
  background: rgba(250, 245, 234, 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 var(--line-2);
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; filter: drop-shadow(0 2px 6px rgba(233, 166, 60, 0.35)); }
.brand-mark svg { width: 100%; height: 100%; }
.brand-mark.small { width: 28px; height: 28px; }
.brand-name { font-family: var(--serif); font-size: 19px; font-weight: 700; letter-spacing: 0.02em; line-height: 1.1; }
.brand-name em { display: block; font-family: var(--sans); font-style: normal; font-size: 9.5px; letter-spacing: 0.22em; color: var(--muted); font-weight: 600; text-transform: uppercase; margin-top: 2px; }
.nav-links { display: flex; gap: 26px; font-size: 14px; color: var(--ink-2); }
.nav-links a { position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 1.5px; background: var(--amber); transition: right 0.25s ease; }
.nav-links a:hover::after { right: 0; }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav-actions .btn { padding: 9px 18px; }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 40px;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 148px 28px 70px;
  min-height: 92vh;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--forest-2);
  background: rgba(47, 74, 58, 0.07);
  border: 1px solid rgba(47, 74, 58, 0.1);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(233, 166, 60, 0.16); }
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 3.75vw, 54px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  font-weight: 700;
}
.hero h1 .hl { position: relative; color: var(--forest); white-space: nowrap; }
.hero h1 .hl::after {
  content: "";
  position: absolute;
  left: -2%; right: -2%;
  bottom: 0.08em;
  height: 0.34em;
  background: linear-gradient(90deg, rgba(233, 166, 60, 0.45), rgba(233, 166, 60, 0.16));
  border-radius: 4px;
  z-index: -1;
}
.lede { margin-top: 22px; font-size: 16.5px; line-height: 1.85; color: var(--ink-2); max-width: 31em; }
.hero-actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.proof { display: flex; gap: 26px; margin-top: 38px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.proof b { color: var(--ink); font-family: var(--serif); font-size: 16px; margin-right: 3px; }

.hero-stage { position: relative; display: grid; place-items: center; min-height: 520px; perspective: 1400px; }
.hb-glow {
  position: absolute;
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(255, 214, 138, 0.55), rgba(233, 166, 60, 0.12) 45%, transparent 68%);
  filter: blur(6px);
  animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.06); opacity: 1; } }

.hero-book { position: relative; transform: rotateY(-17deg) rotateX(5deg); transform-style: preserve-3d; }
.hb-stack { position: relative; width: min(360px, 74vw); aspect-ratio: 4 / 5; }
.hb-page {
  position: absolute;
  inset: 0;
  border-radius: 6px 14px 14px 6px;
  background: var(--paper);
  box-shadow: 0 10px 30px rgba(34, 35, 30, 0.16);
  overflow: hidden;
}
.hb-page.back { transform: translate(14px, 10px) rotate(1.2deg); background: #efe5d2; }
.hb-page.mid { transform: translate(7px, 5px) rotate(0.6deg); background: #f8f1e2; }
.hb-page.front { transform: translate(0, 0); }
.hb-page.front img { width: 100%; height: 100%; object-fit: cover; }
.hb-page.front::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0.28), transparent 28%, transparent 72%, rgba(60, 40, 20, 0.08));
  pointer-events: none;
}
.hb-spine {
  position: absolute; left: 0; top: 0; bottom: 0; width: 16px;
  background: linear-gradient(90deg, rgba(60, 40, 20, 0.18), rgba(255, 255, 255, 0.05) 55%, transparent);
  border-radius: 6px 0 0 6px;
}
.hb-word {
  position: absolute;
  left: 22%; top: 57%;
  padding: 3px 12px 4px;
  border-radius: 999px;
  background: rgba(255, 226, 150, 0.55);
  box-shadow: 0 0 22px 10px rgba(255, 214, 120, 0.35);
  font-family: var(--serif);
  font-size: 17px;
  color: #4a3618;
  animation: wordGlow 4.6s ease-in-out infinite;
}
@keyframes wordGlow { 0%, 100% { box-shadow: 0 0 18px 6px rgba(255, 214, 120, 0.28); } 50% { box-shadow: 0 0 30px 14px rgba(255, 214, 120, 0.46); } }
.hb-float {
  position: absolute;
  background: rgba(255, 253, 247, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 32px rgba(34, 35, 30, 0.14);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink-2);
  animation: floatY 6s ease-in-out infinite;
}
.hb-float-a { right: -8%; top: 22%; transform: translateZ(60px); }
.hb-float-a small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.hb-float-b { left: -12%; bottom: 18%; display: flex; align-items: center; gap: 8px; font-size: 12.5px; animation-delay: -2.4s; }
.hb-live { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(233, 166, 60, 0.18); animation: pulse 1.8s infinite; }
@keyframes floatY { 0%, 100% { transform: translateY(0) translateZ(60px); } 50% { transform: translateY(-10px) translateZ(60px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

.agent-mini {
  position: absolute;
  right: -2%;
  bottom: -2%;
  width: 240px;
  background: #20283f;
  color: #d9dceb;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 11.5px;
  box-shadow: 0 24px 50px rgba(23, 28, 51, 0.32);
  transform: translateZ(90px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.am-head { display: flex; align-items: center; gap: 7px; font-size: 11px; letter-spacing: 0.06em; color: #8f97b5; margin-bottom: 10px; text-transform: uppercase; }
.am-dot { width: 6px; height: 6px; border-radius: 50%; background: #7ce0a3; box-shadow: 0 0 8px #7ce0a3; }
.am-row { padding: 3px 0; color: #a9b0c9; font-variant-numeric: tabular-nums; }
.am-row.done { color: #7ce0a3; }
.am-row.live { color: #f4cf8a; }
.am-row span { float: right; color: #7f88a8; }
.am-bar { height: 4px; background: rgba(255, 255, 255, 0.09); border-radius: 99px; margin-top: 10px; overflow: hidden; }
.am-bar i { display: block; height: 100%; background: linear-gradient(90deg, #e9a63c, #f4cf8a); border-radius: 99px; }

/* ---------- 支持条 ---------- */
.strip { position: relative; z-index: 2; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); background: rgba(255, 253, 247, 0.5); }
.strip-inner {
  max-width: var(--max); margin: 0 auto; padding: 18px 28px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  font-family: var(--serif); font-size: 14.5px; color: var(--ink-2);
}
.strip-inner > span { font-family: var(--sans); font-size: 12px; color: var(--muted); letter-spacing: 0.14em; }
.strip-inner b { font-weight: 600; }
.strip-inner i { width: 3px; height: 3px; border-radius: 50%; background: rgba(47, 74, 58, 0.3); }

/* ---------- 通用区块 ---------- */
section { position: relative; z-index: 2; }
.sec-head { max-width: 760px; margin: 0 auto 46px; text-align: center; padding: 0 24px; }
.sec-head.left { margin-left: max(28px, calc((100vw - var(--max)) / 2)); max-width: 680px; text-align: left; padding: 0; }
.kicker { display: inline-block; font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ember); font-weight: 700; margin-bottom: 12px; }
.sec-head h2, .cta-inner h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 700;
}
.sec-head p { margin-top: 16px; color: var(--muted); font-size: 15px; line-height: 1.85; }

/* ---------- 三步 ---------- */
.how { padding: 96px 0 40px; }
.steps {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.steps li {
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 26px 24px 0;
  box-shadow: var(--shadow-1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.num { font-family: var(--serif); font-size: 13px; color: var(--amber); letter-spacing: 0.12em; }
.steps h3 { font-family: var(--serif); font-size: 22px; margin: 8px 0 10px; }
.steps p { font-size: 14px; color: var(--muted); line-height: 1.8; min-height: 76px; }
.mini-visual { margin-top: 18px; border-radius: 12px 12px 0 0; background: #f6f0e2; border: 1px solid var(--line-2); border-bottom: 0; padding: 16px; min-height: 108px; }
.mini-visual.drop { display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.filechip { background: var(--paper); border-radius: 9px; padding: 10px 12px; font-size: 12px; box-shadow: 0 4px 12px rgba(34, 35, 30, 0.06); border: 1px solid var(--line-2); }
.filechip small { display: block; color: var(--muted); font-size: 10.5px; margin-top: 2px; }
.upload-bar { height: 4px; background: rgba(47, 74, 58, 0.1); border-radius: 99px; overflow: hidden; }
.upload-bar i { display: block; width: 68%; height: 100%; background: var(--amber); border-radius: 99px; }
.mini-visual.voices { display: flex; flex-wrap: wrap; gap: 8px; align-content: center; }
.vchip { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; font-size: 12px; display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.vchip em { font-style: normal; font-size: 10px; color: var(--muted); }
.vchip.on { background: var(--forest); color: #f9f5e9; border-color: var(--forest); }
.vchip.on em { color: rgba(255, 255, 255, 0.6); }
.mini-visual.logs { display: flex; flex-direction: column; gap: 6px; justify-content: center; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--ink-2); }
.mini-visual.logs code { background: rgba(255, 255, 255, 0.6); border-radius: 6px; padding: 4px 8px; }
.mini-visual.logs code.live { color: var(--ember); }

/* ---------- 模板 ---------- */
.templates { padding: 90px 0 30px; }
.tpl-grid { max-width: var(--max); margin: 0 auto; padding: 0 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.tpl-card {
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-2);
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tpl-card:hover { transform: translateY(-6px); }
.tpl-stage { position: relative; height: 360px; display: grid; place-items: center; overflow: hidden; }
.tpl-card.forest .tpl-stage { background: radial-gradient(120% 90% at 50% 10%, #4c6a4e 0%, #2f4a3a 42%, #1d2c25 100%); }
.tpl-card.night .tpl-stage { background: radial-gradient(120% 90% at 50% 8%, #39406b 0%, #232a4c 45%, #12162a 100%); }
.tpl-book { width: 190px; aspect-ratio: 4 / 5; background: var(--paper); border-radius: 4px 10px 10px 4px; overflow: hidden; box-shadow: 0 26px 50px rgba(0, 0, 0, 0.35), inset 6px 0 12px rgba(0, 0, 0, 0.08); transform: rotate(-4deg); position: relative; z-index: 2; }
.tpl-book img { width: 100%; height: 100%; object-fit: cover; }
.tpl-word { position: absolute; left: 14%; bottom: 16%; padding: 2px 9px; border-radius: 999px; background: rgba(255, 230, 165, 0.5); font-family: var(--serif); font-size: 12px; color: #4a3618; box-shadow: 0 0 16px 6px rgba(255, 214, 120, 0.28); }
.fireflies i, .stars i { position: absolute; border-radius: 50%; }
.fireflies i { width: 5px; height: 5px; background: #ffd97f; box-shadow: 0 0 10px 4px rgba(255, 217, 127, 0.55); animation: drift 9s ease-in-out infinite; }
.fireflies i:nth-child(1) { left: 18%; top: 26%; animation-delay: 0s; }
.fireflies i:nth-child(2) { left: 74%; top: 20%; animation-delay: -1.6s; width: 4px; height: 4px; }
.fireflies i:nth-child(3) { left: 62%; top: 68%; animation-delay: -3.2s; }
.fireflies i:nth-child(4) { left: 26%; top: 72%; animation-delay: -4.7s; width: 4px; height: 4px; }
.fireflies i:nth-child(5) { left: 86%; top: 52%; animation-delay: -6s; }
@keyframes drift { 0%, 100% { transform: translate(0, 0); opacity: 0.55; } 30% { transform: translate(14px, -18px); opacity: 1; } 65% { transform: translate(-10px, -34px); opacity: 0.7; } }
.stars i { width: 2px; height: 2px; background: #e9edff; animation: twinkle 5s ease-in-out infinite; }
.stars i:nth-child(1) { left: 16%; top: 18%; }
.stars i:nth-child(2) { left: 40%; top: 10%; animation-delay: -1.2s; width: 3px; height: 3px; }
.stars i:nth-child(3) { left: 78%; top: 24%; animation-delay: -2.4s; }
.stars i:nth-child(4) { left: 64%; top: 64%; animation-delay: -3.1s; width: 3px; height: 3px; }
.stars i:nth-child(5) { left: 24%; top: 62%; animation-delay: -0.6s; }
.stars i:nth-child(6) { left: 88%; top: 76%; animation-delay: -4s; }
@keyframes twinkle { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
.tpl-info { padding: 22px 24px 24px; }
.tpl-card.forest .tpl-info { background: #23372c; color: #f2eddf; }
.tpl-card.night .tpl-info { background: #1a2039; color: #e9ecf7; }
.tpl-info h3 { font-family: var(--serif); font-size: 20px; display: flex; align-items: baseline; gap: 8px; }
.tpl-info h3 em { font-style: normal; font-family: var(--sans); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.5; }
.tpl-info p { font-size: 13px; line-height: 1.75; opacity: 0.72; margin: 8px 0 12px; }
.tpl-info .link-btn { color: var(--amber-2); border-color: rgba(242, 190, 106, 0.4); font-size: 13px; }

/* ---------- 功能 ---------- */
.features { padding: 96px 0 40px; }
.feat-grid { max-width: var(--max); margin: 0 auto; padding: 0 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat { background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-1); }
.feat h3 { font-family: var(--serif); font-size: 19px; margin-bottom: 8px; }
.feat p { font-size: 13.5px; color: var(--muted); line-height: 1.8; }
.feat.big { grid-column: span 2; grid-row: span 2; padding: 30px; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(160deg, #fffdf7 55%, #f7edd8); }
.feat.big h3 { font-size: 26px; }
.feat.big p { font-size: 14.5px; max-width: 34em; }
.feat-demo { margin-top: 26px; background: var(--paper); border: 1px solid var(--line-2); border-radius: 16px; padding: 26px 24px; box-shadow: var(--shadow-1); }
.fd-line { font-family: var(--serif); font-size: clamp(20px, 2.2vw, 27px); line-height: 1.6; }
.fd-word { position: relative; padding: 2px 10px; border-radius: 999px; background: rgba(255, 224, 150, 0.55); box-shadow: 0 0 24px 8px rgba(255, 214, 120, 0.28); color: #4a3618; }
.fd-word i { position: absolute; left: 50%; top: calc(100% + 4px); transform: translateX(-50%); font-style: normal; font-family: var(--round); font-size: 11px; color: var(--ember); background: rgba(255, 253, 247, 0.95); padding: 1px 7px; border-radius: 999px; border: 1px solid rgba(201, 111, 58, 0.18); white-space: nowrap; }
.fd-wave { display: flex; align-items: center; gap: 4px; height: 34px; margin-top: 18px; }
.fd-wave i { width: 3px; border-radius: 99px; background: var(--forest-3); opacity: 0.55; animation: wave 1.1s ease-in-out infinite; }
.fd-wave i:nth-child(1) { height: 10px; animation-delay: 0s; }
.fd-wave i:nth-child(2) { height: 20px; animation-delay: 0.08s; }
.fd-wave i:nth-child(3) { height: 14px; animation-delay: 0.16s; }
.fd-wave i:nth-child(4) { height: 26px; animation-delay: 0.24s; }
.fd-wave i:nth-child(5) { height: 18px; animation-delay: 0.32s; }
.fd-wave i:nth-child(6) { height: 30px; animation-delay: 0.4s; }
.fd-wave i:nth-child(7) { height: 16px; animation-delay: 0.48s; }
.fd-wave i:nth-child(8) { height: 24px; animation-delay: 0.56s; }
.fd-wave i:nth-child(9) { height: 12px; animation-delay: 0.64s; }
@keyframes wave { 0%, 100% { transform: scaleY(0.5); opacity: 0.4; } 50% { transform: scaleY(1); opacity: 0.9; } }

/* ---------- 导出 ---------- */
.export-sec { padding: 70px 0 40px; }
.export-card {
  max-width: var(--max);
  margin: 0 auto;
  border-radius: var(--r-xl);
  background: linear-gradient(150deg, #29402f 0%, #1f3327 60%, #1a2a21 100%);
  color: #f3eedf;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 30px;
  padding: 50px clamp(26px, 5vw, 64px);
  box-shadow: var(--shadow-2);
  position: relative;
  overflow: hidden;
}
.export-card::after {
  content: "";
  position: absolute; right: -10%; top: -30%;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(233, 166, 60, 0.18), transparent 65%);
}
.export-copy { position: relative; z-index: 2; }
.export-copy .kicker { color: var(--amber-2); }
.export-copy h2 { font-family: var(--serif); font-size: clamp(28px, 3vw, 38px); line-height: 1.3; }
.export-copy p { margin-top: 14px; color: rgba(243, 238, 223, 0.72); font-size: 14.5px; line-height: 1.85; max-width: 30em; }
.ticks { margin-top: 22px; display: grid; gap: 8px; font-size: 13.5px; color: rgba(243, 238, 223, 0.85); }
.ticks li { display: flex; align-items: center; gap: 9px; }
.ticks li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: rgba(233, 166, 60, 0.2); border: 1px solid rgba(233, 166, 60, 0.55); flex: none; box-shadow: inset 0 0 0 3px rgba(233, 166, 60, 0.3); }
.export-visual { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.file-box { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 16px; padding: 18px 20px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; backdrop-filter: blur(4px); }
.fb-icon { grid-row: span 2; width: 52px; height: 60px; border-radius: 8px; background: linear-gradient(160deg, #f4cf8a, #e09a4c); color: #3a2a12; display: grid; place-items: center; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); }
.fb-name { font-size: 13.5px; font-weight: 600; word-break: break-all; }
.fb-meta { font-size: 11.5px; color: rgba(243, 238, 223, 0.55); margin-top: 3px; }
.pw-box { background: rgba(0, 0, 0, 0.22); border-radius: 14px; padding: 14px 18px; display: flex; align-items: center; gap: 12px; font-size: 12.5px; border: 1px solid rgba(255, 255, 255, 0.08); }
.pw-box span { color: rgba(243, 238, 223, 0.55); }
.pw-box b { letter-spacing: 0.3em; color: var(--amber-2); }
.pw-box i { margin-left: auto; font-style: normal; color: #8fd6a4; font-size: 11px; }

/* ---------- 价格 ---------- */
.pricing { padding: 92px 0 40px; }
.price-grid { max-width: 1040px; margin: 0 auto; padding: 0 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.price-card { background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 28px 24px; display: flex; flex-direction: column; box-shadow: var(--shadow-1); position: relative; }
.price-card h3 { font-family: var(--serif); font-size: 18px; color: var(--ink-2); }
.price { margin: 14px 0 4px; display: flex; align-items: baseline; gap: 6px; }
.price b { font-family: var(--serif); font-size: 44px; line-height: 1; letter-spacing: -0.02em; }
.price span { font-size: 12px; color: var(--muted); }
.price-sub { font-size: 12px; color: var(--muted); margin-bottom: 20px; }
.price-card ul { display: grid; gap: 9px; font-size: 13px; color: var(--ink-2); margin-bottom: 26px; }
.price-card ul li::before { content: "·"; color: var(--amber); font-weight: 800; margin-right: 8px; }
.price-card .btn { margin-top: auto; }
.price-card.hot { background: linear-gradient(165deg, #2b4334, #22372b); color: #f6f1e3; border-color: transparent; box-shadow: 0 22px 50px rgba(34, 35, 30, 0.18); transform: translateY(-6px); }
.price-card.hot h3, .price-card.hot .price span, .price-card.hot .price-sub, .price-card.hot ul { color: rgba(246, 241, 227, 0.72); }
.price-card.hot .price b { color: #fff8e6; }
.price-card.hot ul li::before { color: var(--amber-2); }
.badge { position: absolute; top: -11px; left: 24px; background: var(--amber); color: #38290f; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; padding: 4px 10px; border-radius: 999px; }

/* ---------- 尾屏 ---------- */
.cta-end { padding: 90px 24px 100px; text-align: center; }
.cta-inner { max-width: 720px; margin: 0 auto; }
.cta-inner .btn { margin-top: 28px; }
.tiny { font-size: 11.5px; color: var(--muted); margin-top: 14px; }
.cta-inner .tiny { margin-top: 16px; }

.foot { border-top: 1px solid var(--line-2); background: rgba(255, 253, 247, 0.55); position: relative; z-index: 2; padding: 44px max(28px, calc((100vw - var(--max)) / 2)) 26px; }
.foot-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.foot-brand { display: flex; gap: 12px; align-items: flex-start; max-width: 320px; }
.foot-brand b { font-family: var(--serif); font-size: 17px; }
.foot-brand p { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.7; }
.foot-links { display: flex; gap: 60px; flex-wrap: wrap; }
.foot-links div { display: flex; flex-direction: column; gap: 9px; font-size: 12.5px; color: var(--muted); }
.foot-links b { color: var(--ink); font-size: 12px; letter-spacing: 0.08em; margin-bottom: 2px; }
.foot-links a:hover { color: var(--forest); }
.foot-bottom { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line-2); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }

/* ---------- 弹窗 / 提示 ---------- */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(23, 28, 51, 0.42); backdrop-filter: blur(6px); animation: fadeIn 0.25s ease; }
.modal-card {
  position: relative;
  width: min(440px, 100%);
  background: var(--paper);
  border-radius: var(--r-lg);
  padding: 30px 28px 24px;
  box-shadow: 0 40px 90px rgba(23, 28, 51, 0.25);
  animation: pop 0.32s cubic-bezier(0.2, 0.9, 0.2, 1);
  max-height: 90vh;
  overflow: auto;
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
.modal-x { position: absolute; right: 14px; top: 12px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; font-size: 20px; color: var(--muted); cursor: pointer; }
.modal-x:hover { background: rgba(47, 74, 58, 0.06); color: var(--ink); }
.modal h2 { font-family: var(--serif); font-size: 24px; }
.modal-sub { font-size: 13px; color: var(--muted); margin: 8px 0 20px; line-height: 1.65; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; letter-spacing: 0.02em; }
.field input, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fffdf8;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field textarea:focus { border-color: var(--forest-3); box-shadow: 0 0 0 3px rgba(87, 117, 93, 0.12); }
.form-error { color: var(--danger); font-size: 12.5px; margin: 4px 0 12px; }
.auth-switch { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 16px; }
.auth-note { font-size: 10.5px; color: var(--muted); text-align: center; margin-top: 12px; line-height: 1.6; }
.auth-note a { border-bottom: 1px solid var(--line); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; }
.share-card { width: min(520px, 100%); }
.share-head { display: flex; gap: 16px; margin-bottom: 18px; align-items: center; }
.share-cover { width: 64px; height: 82px; border-radius: 4px 8px 8px 4px; background: var(--cream-2); overflow: hidden; flex: none; box-shadow: 0 8px 20px rgba(34, 35, 30, 0.14); }
.share-cover img { width: 100%; height: 100%; object-fit: cover; }
.qr-row { display: flex; align-items: center; gap: 16px; margin: 16px 0 20px; padding: 14px; background: #f7f1e4; border-radius: 14px; }
.qr { width: 92px; height: 92px; background: #fff; border-radius: 8px; padding: 6px; flex: none; }
.qr img, .qr canvas { width: 100%; height: 100%; }
.qr-tip { font-size: 12px; color: var(--muted); line-height: 1.7; }
.share-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.export-panel { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.export-panel p { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; line-height: 1.7; }
.export-progress { margin-top: 12px; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--forest-2); }
.export-progress i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(47, 74, 58, 0.2); border-top-color: var(--forest); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast-wrap { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #232a4c; color: #eef1ff; padding: 10px 18px; border-radius: 999px; font-size: 13px; box-shadow: 0 10px 30px rgba(23, 28, 51, 0.28); animation: toastIn 0.3s ease; }
.toast.err { background: #6b2c1d; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* ===========================================================
   工作台
   =========================================================== */
body.app-mode { background: #f7f2e7; }
body.app-mode #view-home, body.app-mode .nav, body.app-mode .foot { display: none; }

.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid var(--line-2);
  background: rgba(255, 253, 247, 0.6);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.side .brand { padding: 0 6px; }
.side-new { width: 100%; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: 13.5px; color: var(--ink-2); }
.side-nav a svg { width: 16px; height: 16px; opacity: 0.65; }
.side-nav a:hover { background: rgba(47, 74, 58, 0.05); }
.side-nav a.on { background: var(--forest); color: #f8f4e8; }
.side-nav a.on svg { opacity: 1; }
.side-nav .count { margin-left: auto; font-size: 11px; opacity: 0.6; }
.side-foot { margin-top: auto; font-size: 11.5px; color: var(--muted); padding: 0 8px; }
.quota-meter { margin-top: 10px; }
.quota-meter .bar { height: 4px; background: rgba(47, 74, 58, 0.12); border-radius: 99px; overflow: hidden; margin-bottom: 6px; }
.quota-meter .bar i { display: block; height: 100%; background: var(--amber); }
.side-user { display: flex; align-items: center; gap: 9px; padding: 10px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--paper); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--forest); color: #fff8e7; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.side-user .nm { font-size: 12.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user .em { font-size: 10px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user button { margin-left: auto; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 11px; }

.main { padding: 26px 38px 60px; min-width: 0; }
.main-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.main-head h1 { font-family: var(--serif); font-size: 30px; letter-spacing: -0.01em; }
.main-head p { color: var(--muted); font-size: 13px; margin-top: 6px; }
.head-actions { display: flex; gap: 8px; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 28px; }
.stat { background: var(--paper); border: 1px solid var(--line-2); border-radius: 14px; padding: 15px 16px; }
.stat b { font-family: var(--serif); font-size: 24px; display: block; line-height: 1.2; }
.stat span { font-size: 11.5px; color: var(--muted); }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .search { display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 14px; min-width: 220px; }
.toolbar .search input { border: 0; background: none; outline: none; font-size: 13px; width: 100%; }
.toolbar .chip { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer; color: var(--ink-2); }
.toolbar .chip.on { background: var(--forest); color: #f9f5e9; border-color: var(--forest); }
.toolbar .grow { flex: 1; }

.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.book-card { background: var(--paper); border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-1); transition: transform 0.25s ease, box-shadow 0.25s ease; position: relative; }
.book-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(34, 35, 30, 0.12); }
.book-cover { aspect-ratio: 4 / 5; background: linear-gradient(150deg, #e7ddc7, #d6c9ad); position: relative; overflow: hidden; }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover .status { position: absolute; top: 9px; left: 9px; font-size: 10px; padding: 3px 8px; border-radius: 999px; background: rgba(255, 253, 247, 0.92); color: var(--forest); font-weight: 600; backdrop-filter: blur(4px); }
.book-cover .status.generating { color: #8a5b13; }
.book-cover .status.failed { color: var(--danger); }
.book-cover .tpl-tag { position: absolute; bottom: 9px; right: 9px; font-size: 9.5px; color: rgba(255, 255, 255, 0.85); background: rgba(0, 0, 0, 0.28); padding: 2px 7px; border-radius: 999px; backdrop-filter: blur(4px); }
.book-body { padding: 12px 13px 10px; }
.book-body h3 { font-family: var(--serif); font-size: 15px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
.book-meta { font-size: 10.5px; color: var(--muted); margin-top: 5px; display: flex; gap: 8px; }
.book-actions { display: flex; gap: 4px; padding: 0 8px 8px; }
.icon-btn { border: 0; background: transparent; color: var(--muted); padding: 6px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: rgba(47, 74, 58, 0.07); color: var(--ink); }
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn.danger:hover { color: var(--danger); background: rgba(179, 69, 47, 0.08); }
.book-actions .spacer { flex: 1; }

.empty { text-align: center; padding: 70px 20px; border: 1px dashed var(--line); border-radius: 20px; background: rgba(255, 253, 247, 0.4); }
.empty h3 { font-family: var(--serif); font-size: 21px; }
.empty p { font-size: 13px; color: var(--muted); margin: 8px 0 20px; }

.collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.coll-card { background: var(--paper); border: 1px solid var(--line-2); border-radius: 16px; padding: 16px; display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow-1); }
.coll-stack { display: flex; flex: none; }
.coll-stack .mini { width: 38px; height: 50px; border-radius: 3px 6px 6px 3px; background: #e5dac4; margin-left: -12px; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,.1); border: 2px solid var(--paper); }
.coll-stack .mini:first-child { margin-left: 0; }
.coll-stack img { width: 100%; height: 100%; object-fit: cover; }
.coll-body { min-width: 0; }
.coll-body h3 { font-family: var(--serif); font-size: 16px; }
.coll-body p { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* ---------- 新建流程 ---------- */
.overlay { position: fixed; inset: 0; z-index: 80; background: #faf5ea; display: flex; flex-direction: column; animation: fadeIn .2s ease; }
.overlay[hidden] { display: none; }
.ov-head { display: flex; align-items: center; gap: 20px; padding: 16px 26px; border-bottom: 1px solid var(--line-2); background: rgba(255,253,247,.7); backdrop-filter: blur(10px); }
.ov-head .brand { font-size: 16px; }
.ov-steps { display: flex; gap: 6px; align-items: center; margin-left: 10px; }
.ov-step { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); padding: 5px 11px; border-radius: 999px; }
.ov-step b { width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 9.5px; font-weight: 700; }
.ov-step.on { background: rgba(47, 74, 58, 0.07); color: var(--ink); }
.ov-step.on b { background: var(--forest); color: #fff; border-color: var(--forest); }
.ov-step.done b { background: var(--amber); border-color: var(--amber); color: #fff; }
.ov-step.done { color: var(--ink-2); }
.ov-head .close { margin-left: auto; }
.ov-body { flex: 1; overflow: auto; }
.ov-pane { max-width: 1180px; margin: 0 auto; padding: 30px 28px 80px; }
.ov-pane[hidden] { display: none; }

.create-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 26px; align-items: start; }
.panel { background: var(--paper); border: 1px solid var(--line-2); border-radius: 18px; padding: 22px; box-shadow: var(--shadow-1); }
.panel h3 { font-family: var(--serif); font-size: 17px; margin-bottom: 4px; }
.panel .hint { font-size: 12px; color: var(--muted); margin-bottom: 16px; line-height: 1.65; }
.dropzone { border: 1.5px dashed rgba(47, 74, 58, 0.28); border-radius: 14px; padding: 38px 20px; text-align: center; background: rgba(247, 241, 228, 0.5); cursor: pointer; transition: all .2s ease; }
.dropzone:hover, .dropzone.over { background: rgba(248, 227, 189, 0.4); border-color: var(--amber); }
.dropzone .dz-icon { width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 14px; background: var(--amber-soft); display: grid; place-items: center; }
.dropzone h4 { font-family: var(--serif); font-size: 17px; margin-bottom: 6px; }
.dropzone p { font-size: 12px; color: var(--muted); line-height: 1.7; }
.dropzone input { display: none; }
.file-list { margin-top: 14px; display: grid; gap: 8px; max-height: 220px; overflow: auto; }
.file-row { display: flex; align-items: center; gap: 10px; background: #faf5e8; border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; font-size: 12px; }
.file-row .fi { width: 26px; height: 32px; border-radius: 4px; background: var(--forest); color: #fff; display: grid; place-items: center; font-size: 8px; font-weight: 700; flex: none; }
.file-row .fn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .fs { margin-left: auto; color: var(--muted); font-size: 10.5px; flex: none; }
.file-row .x { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px 4px; }

.parse-progress { margin-top: 16px; display: grid; gap: 8px; font-size: 12px; color: var(--ink-2); }
.parse-progress .row { display: flex; align-items: center; gap: 8px; }
.parse-progress .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.parse-progress .dot.ok { background: var(--ok); }
.bar { height: 4px; border-radius: 99px; background: rgba(47,74,58,.1); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--forest); transition: width .3s ease; }

.opt-group { margin-top: 20px; }
.opt-group > label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; letter-spacing: .02em; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { border: 1px solid var(--line); background: transparent; border-radius: 10px; padding: 8px 13px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: var(--forest); color: #fff8e8; border-color: var(--forest); }
.tpl-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tpl-opt { border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; background: #fff; text-align: left; padding: 0; }
.tpl-opt .mini-stage { height: 86px; position: relative; display: grid; place-items: center; }
.tpl-opt.forest .mini-stage { background: radial-gradient(120% 100% at 50% 0%, #4c6a4e, #24382c); }
.tpl-opt.night .mini-stage { background: radial-gradient(120% 100% at 50% 0%, #3a416e, #141830); }
.tpl-opt .mini-book { width: 34px; height: 45px; background: var(--paper); border-radius: 2px 4px 4px 2px; box-shadow: 0 6px 14px rgba(0,0,0,.28); }
.tpl-opt .lbl { padding: 8px 10px; font-size: 12px; display: flex; align-items: center; justify-content: space-between; }
.tpl-opt .lbl em { font-style: normal; font-size: 10px; color: var(--muted); }
.tpl-opt.on { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(47,74,58,.08); }
.voice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.voice-opt { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 11px; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.voice-opt .vname { font-size: 12.5px; }
.voice-opt .vdesc { font-size: 10px; color: var(--muted); margin-top: 1px; }
.voice-opt .play { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: #faf5e8; display: grid; place-items: center; flex: none; }
.voice-opt .play svg { width: 9px; height: 9px; }
.voice-opt.on { border-color: var(--forest); background: rgba(47,74,58,.04); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px dashed var(--line-2); font-size: 13px; }
.switch { width: 38px; height: 22px; border-radius: 99px; background: rgba(47,74,58,.18); border: 0; position: relative; cursor: pointer; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch.on { background: var(--forest); }
.switch.on::after { transform: translateX(16px); }

.preview-panel { position: sticky; top: 20px; }
.pv-stage { border-radius: 16px; padding: 26px 20px; display: grid; place-items: center; min-height: 330px; position: relative; overflow: hidden; }
.pv-stage.forest { background: radial-gradient(120% 90% at 50% 5%, #557455 0%, #2f4a3a 45%, #1c2a23 100%); }
.pv-stage.night { background: radial-gradient(120% 90% at 50% 5%, #3c4474 0%, #232a4c 45%, #12152a 100%); }
.pv-book { width: 168px; aspect-ratio: 4/5; background: var(--paper); border-radius: 3px 8px 8px 3px; overflow: hidden; box-shadow: 0 24px 44px rgba(0,0,0,.32), inset 5px 0 10px rgba(0,0,0,.08); position: relative; }
.pv-book img { width: 100%; height: 100%; object-fit: cover; }
.pv-book .pv-word { position: absolute; left: 16%; bottom: 22%; font-family: var(--serif); font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(255,229,160,.55); color: #4a3618; box-shadow: 0 0 16px 5px rgba(255,214,120,.3); }
.pv-fallback { width: 168px; aspect-ratio: 4/5; border-radius: 3px 8px 8px 3px; background: repeating-linear-gradient(180deg, #fffdf7 0 22px, #f3ecdc 22px 23px); box-shadow: 0 24px 44px rgba(0,0,0,.3); display: grid; place-items: center; color: #b8a888; font-size: 11px; }
.pv-cap { margin-top: 14px; font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.7; }
.pv-meta { margin-top: 14px; display: grid; gap: 7px; font-size: 11.5px; color: var(--ink-2); }
.pv-meta div { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line-2); padding-bottom: 6px; }
.pv-meta span { color: var(--muted); }

.fix-words { margin-top: 16px; display: grid; gap: 10px; max-height: 300px; overflow: auto; }
.fix-row { border: 1px solid var(--line-2); border-radius: 10px; padding: 10px; background: #fbf6ea; }
.fix-row .fh { font-size: 11px; color: var(--muted); margin-bottom: 6px; display: flex; justify-content: space-between; }
.fix-row textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px; font-size: 12.5px; min-height: 54px; resize: vertical; background: #fff; }

/* ---------- 生成进度 ---------- */
.gen-wrap { max-width: 1180px; margin: 0 auto; padding: 26px 28px 60px; }
.gen-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.gen-head h2 { font-family: var(--serif); font-size: 24px; }
.gen-head p { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.gen-elapsed { font-family: ui-monospace, monospace; font-size: 13px; color: var(--ink-2); background: var(--paper); border: 1px solid var(--line-2); padding: 6px 12px; border-radius: 999px; }
.gen-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 18px; align-items: start; }
.gen-pages { background: var(--paper); border: 1px solid var(--line-2); border-radius: 18px; padding: 16px; }
.gen-pages .gp-head { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-bottom: 10px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 7px; }
.thumb { aspect-ratio: 4/5; border-radius: 5px; background: #efe6d2; overflow: hidden; position: relative; opacity: 0.25; transform: translateY(6px) scale(.97); transition: opacity .45s ease, transform .45s ease; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.ready { opacity: 1; transform: none; box-shadow: 0 4px 12px rgba(34,35,30,.12); }
.thumb .tn { position: absolute; left: 3px; bottom: 3px; font-size: 8px; color: #fff; background: rgba(0,0,0,.35); padding: 0 4px; border-radius: 3px; }
.thumb .spark { position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255,235,180,.75), transparent 70%); transform: translateX(-100%); }
.thumb.proc .spark { animation: shimmer 1.1s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

.console { background: #1c2338; border-radius: 18px; overflow: hidden; box-shadow: 0 20px 50px rgba(23,28,51,.22); display: flex; flex-direction: column; min-height: 420px; }
.cs-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.07); font-size: 11px; letter-spacing: .1em; color: #8b93b1; text-transform: uppercase; }
.cs-head .lights { display: flex; gap: 5px; }
.cs-head .lights i { width: 8px; height: 8px; border-radius: 50%; background: #3a4360; }
.cs-head .lights i:first-child { background: #d96a54; }
.cs-head .lights i:nth-child(2) { background: #d9a94f; }
.cs-head .lights i:nth-child(3) { background: #5aa87a; }
.cs-head .cs-title { margin-left: 6px; }
.cs-body { padding: 14px 18px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; line-height: 1.95; color: #b9c0d8; flex: 1; overflow: auto; max-height: 330px; scroll-behavior: smooth; }
.cs-line { display: flex; gap: 8px; animation: lineIn .25s ease; }
@keyframes lineIn { from { opacity: 0; transform: translateY(3px); } }
.cs-line .t { color: #5c6584; flex: none; }
.cs-line.ok { color: #86e0a4; }
.cs-line.warn { color: #f0c176; }
.cs-line.dim { color: #7c85a4; }
.cs-line.cur { color: #f4cf8a; }
.cs-foot { padding: 12px 18px 14px; border-top: 1px solid rgba(255,255,255,.07); }
.cs-steps { display: flex; gap: 3px; margin-bottom: 9px; }
.cs-steps i { flex: 1; height: 3px; border-radius: 9px; background: rgba(255,255,255,.09); }
.cs-steps i.done { background: #7ce0a3; }
.cs-steps i.now { background: var(--amber); }
.cs-pct { display: flex; justify-content: space-between; font-size: 10.5px; color: #7c85a4; }

.gen-done { text-align: center; padding: 44px 20px; }
.gen-done .big-check { width: 58px; height: 58px; border-radius: 50%; background: rgba(78,125,91,.12); color: var(--ok); display: grid; place-items: center; margin: 0 auto 16px; font-size: 26px; }
.gen-done h2 { font-family: var(--serif); font-size: 26px; }
.gen-done p { font-size: 13px; color: var(--muted); margin: 8px 0 22px; }
.gen-done .btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.gen-done .stats { display: flex; gap: 22px; justify-content: center; margin-top: 22px; font-size: 12px; color: var(--muted); }
.gen-done .stats b { color: var(--ink); font-family: var(--serif); font-size: 16px; margin-right: 2px; }

/* ---------- 合集详情 ---------- */
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; cursor: pointer; }
.back-link:hover { color: var(--ink); }
.coll-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.coll-head h1 { font-family: var(--serif); font-size: 28px; }
.coll-head p { font-size: 12.5px; color: var(--muted); margin-top: 5px; }

/* ---------- 空状态 / 加载 ---------- */
.skeleton { border-radius: 16px; background: linear-gradient(90deg, #efe7d5 25%, #f7f1e3 37%, #efe7d5 63%); background-size: 400% 100%; animation: sk 1.3s infinite; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* 阅读器预览浮层 */
.reader-preview { position: fixed; inset: 0; z-index: 85; background: #0f1320; }
.reader-preview[hidden] { display: none; }
.reader-preview iframe { width: 100%; height: 100%; border: 0; }
.rp-close { position: absolute; right: 14px; top: 14px; z-index: 2; background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.2); width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 18px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; padding-top: 120px; min-height: auto; }
  .hero-stage { min-height: 420px; margin-top: 10px; }
  .agent-mini { right: 4%; bottom: -8%; width: 210px; font-size: 10.5px; }
  .steps, .tpl-grid, .feat-grid, .price-grid { grid-template-columns: 1fr 1fr; }
  .feat.big { grid-column: span 2; grid-row: auto; }
  .export-card { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 76px 1fr; }
  .side .brand-name, .side-nav a span, .side-new span, .side-foot, .side-user .nm, .side-user .em, .side-user button { display: none; }
  .side { align-items: center; padding: 18px 10px; }
  .side-nav a { justify-content: center; width: 46px; height: 42px; }
  .side-new { width: 44px; height: 44px; padding: 0; border-radius: 50%; }
  .side-user { padding: 6px; }
  .create-grid { grid-template-columns: 1fr; }
  .preview-panel { position: static; }
  .gen-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav { padding: 12px 18px; }
  .nav-links { display: none; }
  .nav-actions .btn.ghost { display: none; }
  .hero { padding: 104px 20px 50px; gap: 24px; }
  .hero h1 { font-size: clamp(32px, 9vw, 44px); }
  .lede { font-size: 15px; }
  .hero-actions .btn { flex: 1; }
  .proof { gap: 18px; }
  .hb-float-a { right: -2%; }
  .hb-float-b { left: -2%; }
  .agent-mini { display: none; }
  .strip-inner { gap: 10px; font-size: 12.5px; padding: 14px 20px; }
  section { padding-left: 0; padding-right: 0; }
  .how, .templates, .features, .pricing { padding-top: 64px; }
  .sec-head { margin-bottom: 28px; padding: 0 20px; }
  .sec-head.left { margin-left: 20px; }
  .steps, .tpl-grid, .feat-grid, .price-grid, .stat-row { grid-template-columns: 1fr; padding: 0 20px; }
  .feat.big { grid-column: auto; }
  .tpl-stage { height: 300px; }
  .export-card { margin: 0 16px; padding: 30px 22px; border-radius: 24px; }
  .cta-end { padding: 60px 20px 70px; }
  .foot { padding: 34px 20px 22px; }
  .foot-links { gap: 34px; }
  .main { padding: 18px 16px 50px; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; bottom: 0; top: auto; height: 60px; width: 100%; flex-direction: row; justify-content: space-around; z-index: 50; border-right: 0; border-top: 1px solid var(--line); padding: 6px 8px; background: rgba(255,253,247,.94); backdrop-filter: blur(12px); }
  .side .brand, .side-foot, .side-user { display: none; }
  .side-nav { flex-direction: row; }
  .side-nav a { width: 56px; height: 48px; flex-direction: column; gap: 2px; font-size: 9.5px; }
  .side-nav a span { display: block; }
  .side-nav a.on { background: transparent; color: var(--forest); }
  .side-nav a.on svg { stroke: var(--forest); }
  .side-new { position: fixed; right: 16px; bottom: 76px; width: 54px; height: 54px; box-shadow: 0 10px 24px rgba(47,74,58,.3); z-index: 51; }
  .book-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .ov-head { padding: 12px 16px; gap: 10px; flex-wrap: wrap; }
  .ov-steps { order: 3; width: 100%; overflow: auto; }
  .ov-pane { padding: 20px 16px 80px; }
  .tpl-pick, .voice-grid { grid-template-columns: 1fr; }
  .gen-wrap { padding: 20px 16px 80px; }
  .thumbs { grid-template-columns: repeat(4, 1fr); }
  .modal-card { padding: 26px 20px 20px; }
  .share-actions .btn { flex: 1; }
  .book-card { border-radius: 12px; }
  .book-body h3 { font-size: 13.5px; min-height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}