/* ==========================================================================
   赵琪 ♥ 沈婷婷 · 专属浪漫表白网站样式表
   ========================================================================== */

:root {
  --bg-deep: #0b0711;
  --bg-plum: #1b0f26;
  --bg-wine: #2d1226;
  --gold: #e5c185;
  --gold-bright: #f7dfb2;
  --gold-dim: rgba(229, 193, 133, 0.35);
  --rose: #f2a6b8;
  --rose-deep: #d66885;
  --crimson: #6c1428;
  --crimson-dark: #470a18;
  --parchment: #fbf6ee;
  --parchment-warm: #f3e8d6;
  --ink: #382522;
  --ink-soft: #6f544e;
  --cinnabar: #b8332a;
  --glass-bg: rgba(24, 14, 34, 0.72);
  --glass-border: rgba(229, 193, 133, 0.28);

  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --font-calligraphy: "Ma Shan Zheng", "STKaiti", "KaiTi", "BiauKai", "FangSong", serif;
  --font-sans: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow-gold: 0 14px 45px rgba(0, 0, 0, 0.55), 0 0 28px rgba(229, 193, 133, 0.14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at 50% 18%, #2a1436 0%, #140b1e 48%, #07040b 100%);
  color: #f8efe6;
  font-family: var(--font-serif);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* 画布层级 */
#cosmos-canvas,
#fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#cosmos-canvas {
  z-index: 0;
}

#fx-canvas {
  z-index: 60;
}

/* ==========================================================================
   顶部导航栏
   ========================================================================== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 24px;
  background: rgba(11, 7, 17, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(229, 193, 133, 0.16);
}

.brand-badge {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-monogram {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold-bright);
}

.heart-beat {
  display: inline-block;
  font-style: normal;
  color: var(--rose);
  animation: heartbeat 1.7s ease-in-out infinite;
}

.brand-domain {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: rgba(248, 239, 230, 0.55);
}

.step-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.step-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(229, 193, 133, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(248, 239, 230, 0.78);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.step-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(229, 193, 133, 0.16);
  color: var(--gold);
}

.step-pill.active {
  background: linear-gradient(135deg, rgba(229, 193, 133, 0.28), rgba(242, 166, 184, 0.22));
  border-color: var(--gold);
  color: #fff;
  box-shadow: 0 0 18px rgba(229, 193, 133, 0.25);
}

.step-pill.active .step-dot {
  background: var(--gold);
  color: #1f111d;
}

.step-pill.completed {
  border-color: rgba(242, 166, 184, 0.45);
  color: var(--rose);
}

.step-pill.completed .step-dot {
  background: rgba(242, 166, 184, 0.25);
  color: var(--rose);
}

.step-pill.locked {
  opacity: 0.42;
  cursor: not-allowed;
}

.step-pill:not(.locked):hover {
  transform: translateY(-1px);
  border-color: var(--gold-bright);
}

.step-connector {
  width: 14px;
  height: 1px;
  background: rgba(229, 193, 133, 0.22);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(229, 193, 133, 0.34);
  background: rgba(229, 193, 133, 0.1);
  color: var(--gold-bright);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.icon-pill-btn:hover {
  background: rgba(229, 193, 133, 0.2);
}

.icon-pill-btn.subtle {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(248, 239, 230, 0.72);
}

.vinyl-disc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold) 25%, #2b1826 30%, #150b16 100%);
  color: #fff;
  font-size: 0.7rem;
}

.icon-pill-btn.playing .vinyl-disc {
  animation: spinSlow 4s linear infinite;
  box-shadow: 0 0 12px rgba(242, 166, 184, 0.55);
}

/* ==========================================================================
   浮动悄悄话提示条
   ========================================================================== */
.whisper-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 24px);
  z-index: 80;
  max-width: min(90vw, 480px);
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(34, 15, 38, 0.94);
  border: 1px solid rgba(229, 193, 133, 0.55);
  color: var(--gold-bright);
  font-size: 0.92rem;
  text-align: center;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6), 0 0 22px rgba(242, 166, 184, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.whisper-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ==========================================================================
   主舞台与篇章切换
   ========================================================================== */
.stage-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

.stage {
  display: none;
  animation: stageEnter 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.stage.active {
  display: block;
}

.section-header {
  text-align: center;
  margin-bottom: 28px;
}

.step-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid rgba(229, 193, 133, 0.35);
  background: rgba(229, 193, 133, 0.08);
  color: var(--gold);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.55rem, 3.2vw, 2.2rem);
  font-weight: 700;
  color: #fff6ea;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 20px rgba(229, 193, 133, 0.22);
}

.section-desc {
  margin-top: 8px;
  color: rgba(248, 239, 230, 0.75);
  font-size: 0.96rem;
  max-width: 640px;
  margin-inline: auto;
}

/* 通用按钮 */
.primary-romantic-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 234, 196, 0.65);
  background: linear-gradient(135deg, #c97a8e 0%, #9b3251 50%, #c6914f 100%);
  background-size: 180% 180%;
  color: #fffaf3;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(182, 65, 98, 0.45), 0 0 22px rgba(229, 193, 133, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-position 0.4s ease;
}

.primary-romantic-btn:hover {
  transform: translateY(-2px);
  background-position: 100% 50%;
  box-shadow: 0 14px 36px rgba(214, 104, 133, 0.55), 0 0 30px rgba(229, 193, 133, 0.42);
}

.primary-romantic-btn.grand {
  padding: 16px 36px;
  font-size: 1.12rem;
}

.primary-romantic-btn.compact {
  padding: 10px 20px;
  font-size: 0.92rem;
}

.mini-ghost-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(111, 84, 78, 0.35);
  background: rgba(111, 84, 78, 0.08);
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mini-ghost-btn:hover {
  background: rgba(111, 84, 78, 0.16);
  color: var(--ink);
}

.mini-ghost-btn.dark,
.mini-ghost-btn.light {
  border-color: rgba(229, 193, 133, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold-bright);
}

.mini-ghost-btn.dark:hover,
.mini-ghost-btn.light:hover {
  background: rgba(229, 193, 133, 0.16);
}

/* ==========================================================================
   Stage 0: 序幕 · 火漆信封
   ========================================================================== */
.prelude-inner {
  min-height: calc(100vh - 150px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 0 32px;
}

.eyebrow-tag {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  letter-spacing: 0.28em;
  color: rgba(229, 193, 133, 0.8);
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.25;
  color: #fff8ef;
  margin-bottom: 12px;
}

.gold-shimmer {
  background: linear-gradient(90deg, #e5c185, #fff0cf, #f2a6b8, #e5c185);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 5s linear infinite;
}

.hero-subtitle {
  color: rgba(248, 239, 230, 0.8);
  font-size: clamp(0.98rem, 2vw, 1.12rem);
  margin-bottom: 34px;
}

.highlight-name {
  color: var(--rose);
  font-weight: 600;
}

/* 精美信封 */
.envelope-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.envelope-card {
  position: relative;
  width: min(340px, 86vw);
  height: 226px;
  cursor: pointer;
  perspective: 1000px;
  transition: transform 0.35s ease;
}

.envelope-card:hover {
  transform: translateY(-5px) scale(1.015);
}

.envelope-glow {
  position: absolute;
  inset: -18px;
  border-radius: 26px;
  background: radial-gradient(circle, rgba(242, 166, 184, 0.28) 0%, rgba(229, 193, 133, 0.12) 45%, transparent 72%);
  filter: blur(12px);
  z-index: 0;
  animation: glowPulse 3s ease-in-out infinite;
}

.envelope-body {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  background: linear-gradient(155deg, #5e1529 0%, #3d0b1a 100%);
  border: 1.5px solid rgba(229, 193, 133, 0.45);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.65), inset 0 0 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  z-index: 1;
}

.envelope-letter-peek {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 22px;
  height: 150px;
  background: linear-gradient(180deg, #fffaf0, #f5e9d4);
  border-radius: 8px;
  border: 1px solid rgba(212, 168, 102, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 22px;
  color: var(--ink);
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}

.envelope-letter-peek span {
  font-family: var(--font-calligraphy);
  font-size: 1.4rem;
  color: #7c2437;
}

.envelope-letter-peek small {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.24em;
  color: #9e7e68;
  margin-top: 4px;
}

.envelope-pocket {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(33deg, #4b0f21 49.5%, transparent 50.5%),
    linear-gradient(-33deg, #571226 49.5%, transparent 50.5%);
  border-top: 1px solid rgba(229, 193, 133, 0.22);
}

.envelope-flap-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 125px;
  z-index: 4;
  background: linear-gradient(180deg, #741a33 0%, #521022 100%);
  clip-path: polygon(0 0, 100% 0, 50% 94%);
  border-bottom: 2px solid rgba(229, 193, 133, 0.45);
  transform-origin: top center;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.wax-seal {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  z-index: 5;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 2px solid #f7dfb2;
  background: radial-gradient(circle at 35% 30%, #e5be79 0%, #b4782f 58%, #7b4a16 100%);
  color: #2b120e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55), 0 0 24px rgba(229, 193, 133, 0.5);
  transition: transform 0.35s ease, opacity 0.45s ease;
}

.wax-ring {
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 1.5px solid rgba(229, 193, 133, 0.65);
  animation: ripple 2.2s ease-out infinite;
}

.wax-text {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.08em;
}

.envelope-card.opened .wax-seal {
  transform: translate(-50%, -50%) scale(1.35);
  opacity: 0;
  pointer-events: none;
}

.envelope-card.opened .envelope-flap-top {
  transform: rotateX(175deg);
  z-index: 1;
}

.envelope-card.opened .envelope-letter-peek {
  transform: translateY(-44px);
}

.tap-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-bright);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 10px var(--rose);
  animation: heartbeat 1.4s infinite;
}

/* 拆开后序幕诗卡 */
.prelude-revealed {
  margin-top: 26px;
  width: 100%;
  max-width: 660px;
  animation: stageEnter 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.poetic-card {
  position: relative;
  padding: 34px 30px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-gold);
  backdrop-filter: blur(12px);
}

.card-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--gold);
  border-style: solid;
  opacity: 0.7;
}

.card-corner.tl { top: 12px; left: 12px; border-width: 1.5px 0 0 1.5px; }
.card-corner.tr { top: 12px; right: 12px; border-width: 1.5px 1.5px 0 0; }
.card-corner.bl { bottom: 12px; left: 12px; border-width: 0 0 1.5px 1.5px; }
.card-corner.br { bottom: 12px; right: 12px; border-width: 0 1.5px 1.5px 0; }

.poetic-line {
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: #fff6ea;
  line-height: 2;
}

.custom-banner-note {
  margin-top: 16px;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(242, 166, 184, 0.14);
  border: 1px dashed rgba(242, 166, 184, 0.45);
  color: #ffdce5;
  font-size: 0.94rem;
}

.prelude-action {
  margin-top: 24px;
}

/* ==========================================================================
   Stage 1: 第一步 · 亲笔情书
   ========================================================================== */
.letter-paper {
  max-width: 780px;
  margin: 0 auto;
  padding: 14px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.7), transparent 45%),
    repeating-linear-gradient(0deg, rgba(163, 128, 89, 0.04) 0px, rgba(163, 128, 89, 0.04) 1px, transparent 1px, transparent 34px),
    linear-gradient(170deg, #fcf8f0 0%, #f5ead8 100%);
  color: var(--ink);
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(229, 193, 133, 0.4);
}

.paper-border-inner {
  border: 1.5px solid rgba(184, 140, 86, 0.35);
  border-radius: 10px;
  padding: 32px 36px 36px;
}

.letter-meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed rgba(138, 99, 68, 0.28);
}

.letter-date-block {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.meta-value {
  font-weight: 700;
  color: #7c2437;
}

.stamp-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.postmark {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 1.5px dashed rgba(124, 36, 55, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.58rem;
  line-height: 1.25;
  color: rgba(124, 36, 55, 0.72);
  transform: rotate(-12deg);
}

.postage-stamp {
  width: 54px;
  height: 64px;
  padding: 4px;
  background: linear-gradient(135deg, #982b46, #6d182d);
  border: 3px dotted #fbf6ee;
  border-radius: 4px;
  color: #fde9c9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.stamp-heart {
  font-size: 1.2rem;
  line-height: 1;
}

.stamp-code {
  font-family: var(--font-sans);
  font-size: 0.55rem;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.letter-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.letter-salutation {
  margin-top: 12px;
  font-size: 1.18rem;
  font-weight: 700;
  color: #6a1d2f;
}

.letter-body {
  margin-top: 18px;
  min-height: 220px;
  font-size: 1.05rem;
  line-height: 2.05;
  color: var(--ink);
}

.letter-body p {
  margin-bottom: 16px;
  text-indent: 2em;
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: #8d2940;
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blinkCursor 0.8s steps(2) infinite;
}

.whisper-mark {
  display: inline;
  padding: 1px 4px;
  border-bottom: 1.5px dashed #b94865;
  background: rgba(214, 104, 133, 0.1);
  border-radius: 4px;
  color: #7c2038;
  cursor: pointer;
  transition: background 0.2s ease;
}

.whisper-mark:hover {
  background: rgba(214, 104, 133, 0.24);
}

.letter-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed rgba(138, 99, 68, 0.28);
  animation: stageEnter 0.6s ease both;
}

.signature-block {
  text-align: right;
}

.sig-line {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.sig-name-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.sig-role {
  font-size: 0.98rem;
  color: var(--ink);
}

.sig-calligraphy {
  font-family: var(--font-calligraphy);
  font-size: 2rem;
  color: #5e1828;
  line-height: 1;
}

.cinnabar-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--cinnabar);
  border-radius: 4px;
  color: var(--cinnabar);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.1;
  transform: rotate(-4deg);
  opacity: 0.88;
}

.receipt-zone {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.fingerprint-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1.5px solid #b94865;
  background: linear-gradient(135deg, rgba(214, 104, 133, 0.14), rgba(229, 193, 133, 0.2));
  color: #7c2038;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.fingerprint-btn:hover {
  transform: scale(1.03);
  background: linear-gradient(135deg, rgba(214, 104, 133, 0.24), rgba(229, 193, 133, 0.34));
  box-shadow: 0 8px 24px rgba(185, 72, 101, 0.25);
}

.fingerprint-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #b94865;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: heartbeat 1.8s infinite;
}

.receipt-stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: stampPop 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.receipt-badge {
  padding: 8px 20px;
  border: 2px solid #a9324b;
  border-radius: 8px;
  color: #a9324b;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: rgba(185, 72, 101, 0.08);
  transform: rotate(-2deg);
}

/* ==========================================================================
   Stage 2: 第二步 · 3D 爱情之书
   ========================================================================== */
.book-experience {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.book-viewport {
  width: 100%;
  display: flex;
  justify-content: center;
  perspective: 2200px;
}

.book-shell {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(880px, 95vw);
  min-height: 520px;
  border-radius: 16px;
  background: #2e151d;
  padding: 10px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.75), 0 0 40px rgba(229, 193, 133, 0.12);
  transform-style: preserve-3d;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
}

.book-shell.single-cover-mode {
  grid-template-columns: 1fr;
  width: min(440px, 92vw);
}

.book-shell.single-cover-mode .book-spine-shadow {
  display: none;
}

.book-spine-shadow {
  position: absolute;
  left: 50%;
  top: 10px;
  bottom: 10px;
  width: 34px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(46, 20, 22, 0.28) 46%, rgba(20, 8, 12, 0.48) 50%, rgba(46, 20, 22, 0.25) 54%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
  z-index: 15;
}

/* 3D 翻页瞬态特效页 */
.book-flip-fx {
  display: none;
  position: absolute;
  top: 10px;
  bottom: 10px;
  width: calc(50% - 10px);
  z-index: 25;
  pointer-events: none;
  backface-visibility: hidden;
  border-radius: 8px;
}

.book-flip-fx.flipping-forward {
  display: block;
  right: 10px;
  transform-origin: left center;
  background: linear-gradient(90deg, #e8d8be 0%, #fbf5ea 28%, #f2e4ce 100%);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.35);
  animation: flipLeafForward 0.56s cubic-bezier(0.45, 0.05, 0.55, 0.95) forwards;
}

.book-flip-fx.flipping-backward {
  display: block;
  left: 10px;
  transform-origin: right center;
  background: linear-gradient(-90deg, #e8d8be 0%, #fbf5ea 28%, #f2e4ce 100%);
  box-shadow: 8px 0 24px rgba(0, 0, 0, 0.35);
  animation: flipLeafBackward 0.56s cubic-bezier(0.45, 0.05, 0.55, 0.95) forwards;
}

.book-page {
  display: none;
  flex-direction: column;
  padding: 28px 30px;
  min-height: 500px;
  position: relative;
}

.book-page.is-visible {
  display: flex;
}

.book-page.slot-left {
  border-radius: 10px 3px 3px 10px;
  border-right: 1px solid rgba(139, 98, 66, 0.25);
}

.book-page.slot-right {
  border-radius: 3px 10px 10px 3px;
}

/* 丝绒烫金封面 */
.cover-page {
  border-radius: 10px !important;
  background: radial-gradient(circle at 30% 22%, #7d1933 0%, #4b0b1d 65%, #300511 100%);
  border: 2px solid rgba(229, 193, 133, 0.6);
  color: var(--gold-bright);
  padding: 20px;
  box-shadow: inset 12px 0 24px rgba(0, 0, 0, 0.45);
}

.cover-velvet-frame {
  flex: 1;
  border: 1.5px solid rgba(229, 193, 133, 0.5);
  border-radius: 8px;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
}

.cover-ornament {
  color: var(--gold);
  letter-spacing: 0.5em;
  font-size: 0.95rem;
}

.cover-sub {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  color: rgba(247, 223, 178, 0.75);
}

.cover-title {
  font-size: 2.1rem;
  line-height: 1.4;
  color: var(--gold-bright);
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.cover-title span {
  font-size: 1.65rem;
  color: #ffdce5;
}

.cover-emblem {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.emblem-heart {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1.5px solid rgba(229, 193, 133, 0.65);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--rose);
  background: rgba(0, 0, 0, 0.22);
}

.emblem-initials {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: rgba(229, 193, 133, 0.85);
}

.cover-author {
  font-size: 1.02rem;
  color: #fff2dc;
}

.cover-edition {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: rgba(229, 193, 133, 0.6);
}

/* 羊皮纸内页 */
.parchment-page {
  background: linear-gradient(170deg, #fcf7ee 0%, #f3e8d5 100%);
  color: var(--ink);
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(154, 114, 72, 0.24);
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.chapter-tag {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: #8f3549;
  font-weight: 700;
}

.page-num {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: #9e7f65;
}

.page-title {
  font-size: 1.32rem;
  color: #5b1828;
  margin-bottom: 12px;
}

.page-quote {
  padding: 12px 14px;
  margin-bottom: 14px;
  border-left: 3px solid #b94865;
  background: rgba(185, 72, 101, 0.06);
  color: #6a2536;
  font-size: 0.94rem;
  line-height: 1.75;
}

.page-prose {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--ink);
  margin-bottom: 12px;
}

.compact-note {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(229, 193, 133, 0.16);
  font-size: 0.9rem;
}

.toc-box {
  margin-top: auto;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px dashed rgba(154, 114, 72, 0.4);
  background: rgba(255, 255, 255, 0.45);
}

.toc-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #7c2437;
  margin-bottom: 8px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
}

.toc-list li {
  display: flex;
  justify-content: space-between;
  color: var(--ink-soft);
}

.toc-list em {
  font-style: normal;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: #9e7f65;
}

/* 心动翻牌卡 */
.interactive-flip-card {
  margin-top: auto;
  padding: 18px 16px;
  border-radius: 12px;
  border: 1.5px dashed #b94865;
  background: linear-gradient(135deg, rgba(242, 166, 184, 0.14), rgba(229, 193, 133, 0.18));
  cursor: pointer;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.interactive-flip-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(185, 72, 101, 0.18);
}

.memory-card-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  padding: 2px 10px;
  border-radius: 999px;
  background: #9b3251;
  color: #fff;
  margin-bottom: 10px;
}

.memory-card-front,
.memory-card-back {
  font-size: 0.96rem;
  font-weight: 600;
  color: #621c2d;
}

/* 日常信物卡片 */
.token-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 6px;
}

.love-token {
  text-align: left;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid rgba(168, 125, 78, 0.35);
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.25s ease;
}

.love-token:hover {
  border-color: #b94865;
  transform: translateY(-2px);
}

.love-token.lit {
  background: linear-gradient(135deg, rgba(242, 166, 184, 0.26), rgba(229, 193, 133, 0.25));
  border-color: #b94865;
  box-shadow: 0 6px 16px rgba(185, 72, 101, 0.16);
}

.token-icon {
  font-size: 1.25rem;
}

.love-token strong {
  color: #6a1d2f;
  font-size: 0.96rem;
}

.love-token small {
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.5;
}

/* 宠妻兑换券 */
.coupon-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.love-coupon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1.5px dashed #b94865;
  background: linear-gradient(135deg, #fffaf2, #fceef2);
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
}

.love-coupon:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(185, 72, 101, 0.16);
}

.coupon-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.coupon-tag {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 700;
  color: #b94865;
  letter-spacing: 0.1em;
}

.love-coupon strong {
  font-size: 0.96rem;
  color: #5b1828;
}

.love-coupon small {
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.coupon-action {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: #9b3251;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 600;
}

.love-coupon.claimed {
  border-style: solid;
  border-color: #c6914f;
  background: linear-gradient(135deg, #fff5df, #fde6ec);
}

.love-coupon.claimed .coupon-action {
  background: #c6914f;
  color: #fff;
}

.coupon-counter {
  margin-top: auto;
  padding-top: 12px;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: #8f3549;
}

/* 守则列表 */
.vows-list {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink);
}

.vows-list strong {
  color: #7c2038;
}

/* 实时计时器 */
.love-timer-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.timer-unit {
  padding: 12px 6px;
  border-radius: 10px;
  background: linear-gradient(165deg, #6d182f, #480e1d);
  color: var(--gold-bright);
  text-align: center;
  box-shadow: 0 6px 16px rgba(72, 14, 29, 0.25);
}

.timer-unit span {
  display: block;
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
}

.timer-unit small {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: rgba(255, 232, 200, 0.78);
}

.timer-origin-note {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-align: center;
  margin-bottom: 14px;
}

.inline-link-btn {
  border: none;
  background: none;
  color: #9b3251;
  text-decoration: underline;
  font-size: 0.8rem;
  cursor: pointer;
  margin-left: 6px;
}

.epilogue-seal-note {
  margin-top: auto;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(185, 72, 101, 0.25);
  background: rgba(185, 72, 101, 0.06);
  text-align: center;
  font-size: 0.9rem;
  color: #6a1d2f;
}

/* 书本翻页控制栏 */
.book-controls {
  display: flex;
  align-items: center;
  gap: 18px;
}

.book-nav-btn {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(229, 193, 133, 0.42);
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold-bright);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.book-nav-btn:not(:disabled):hover {
  background: rgba(229, 193, 133, 0.2);
}

.book-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.book-indicator {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: rgba(248, 239, 230, 0.82);
  min-width: 118px;
  text-align: center;
}

.book-next-stage {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.progress-hint {
  font-size: 0.88rem;
  color: rgba(229, 193, 133, 0.78);
}

/* ==========================================================================
   Stage 3: 第三步 · 星河拾光
   ========================================================================== */
.stars-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
  align-items: center;
}

.constellation-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 600 / 460;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 50% 48%, rgba(89, 34, 86, 0.42) 0%, rgba(16, 9, 26, 0.88) 72%);
  border: 1px solid rgba(229, 193, 133, 0.26);
  box-shadow: var(--shadow-gold);
  overflow: hidden;
}

.constellation-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.heart-guide-path {
  fill: none;
  stroke: rgba(229, 193, 133, 0.16);
  stroke-width: 2;
  stroke-dasharray: 6 7;
}

.star-link-line {
  fill: none;
  stroke: #f6cf8c;
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(247, 223, 178, 0.8));
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.star-link-line.drawn {
  stroke-dashoffset: 0;
}

.star-node {
  position: absolute;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 4;
}

.star-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin-top: -10px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(229, 193, 133, 0.45);
  animation: ripple 2.4s ease-out infinite;
}

.star-core {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 250, 235, 0.9) 0%, rgba(229, 193, 133, 0.32) 70%);
  border: 1.5px solid rgba(229, 193, 133, 0.75);
  color: #361822;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.35s ease;
}

.star-node.lit .star-core {
  background: radial-gradient(circle, #ffffff 0%, #f7dfb2 45%, #f2a6b8 100%);
  border-color: #fff;
  box-shadow: 0 0 24px #f7dfb2, 0 0 42px rgba(242, 166, 184, 0.85);
  transform: scale(1.16);
}

.star-node.lit .star-halo {
  border-color: var(--rose);
}

.star-label {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(11, 7, 17, 0.72);
  border: 1px solid rgba(229, 193, 133, 0.25);
  color: #f8efe6;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  white-space: nowrap;
}

.constellation-heart-core {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  animation: stampPop 0.7s ease both;
}

.constellation-heart-core span {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold-bright);
  text-shadow: 0 0 20px rgba(242, 166, 184, 0.9);
}

.constellation-heart-core small {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  letter-spacing: 0.26em;
  color: var(--rose);
}

.star-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.star-message-card {
  padding: 26px 24px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-gold);
  backdrop-filter: blur(12px);
}

.star-card-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  color: var(--gold);
  margin-bottom: 10px;
}

#star-card-title {
  font-size: 1.3rem;
  color: #fff5e6;
  margin-bottom: 10px;
}

#star-card-body {
  color: rgba(248, 239, 230, 0.88);
  font-size: 0.98rem;
  line-height: 1.9;
}

.star-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.stars-progress-text {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--rose);
}

/* ==========================================================================
   Stage 4: 第四步终章 · 郑重表白与纪念证书
   ========================================================================== */
.finale-proposal {
  max-width: 700px;
  margin: 18px auto 0;
  padding: 40px 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(46, 17, 42, 0.84), rgba(20, 10, 28, 0.9));
  border: 1px solid rgba(229, 193, 133, 0.42);
  box-shadow: var(--shadow-gold);
  text-align: center;
}

.rose-crown {
  font-size: 3rem;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 18px rgba(242, 166, 184, 0.65));
  animation: floatSlow 3.5s ease-in-out infinite;
}

.finale-title {
  font-size: clamp(2rem, 4.8vw, 2.9rem);
  color: var(--gold-bright);
  margin: 6px 0 18px;
}

.finale-speech {
  font-size: 1.05rem;
  line-height: 2;
  color: rgba(248, 239, 230, 0.9);
}

.domain-highlight {
  color: var(--gold);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 1px 8px;
  border-radius: 6px;
  background: rgba(229, 193, 133, 0.14);
}

.finale-question {
  margin-top: 18px;
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-weight: 700;
  color: #ffdce5;
}

.finale-btn-group {
  margin-top: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.secondary-playful-btn {
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid rgba(242, 166, 184, 0.42);
  background: rgba(255, 255, 255, 0.06);
  color: #f4ccd6;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.secondary-playful-btn:hover {
  background: rgba(242, 166, 184, 0.16);
}

.shy-response-line {
  min-height: 28px;
  margin-top: 16px;
  font-size: 0.95rem;
  color: var(--gold-bright);
}

/* 纪念证书 */
.finale-certificate {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  animation: stageEnter 0.8s ease both;
}

.celebration-banner {
  padding: 10px 22px;
  border-radius: 999px;
  background: rgba(229, 193, 133, 0.15);
  border: 1px solid rgba(229, 193, 133, 0.48);
  color: var(--gold-bright);
  font-size: 0.96rem;
  text-align: center;
}

.certificate-card {
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(155deg, #fffaf0 0%, #f5e6cb 100%);
  color: var(--ink);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.72), 0 0 42px rgba(229, 193, 133, 0.35);
}

.cert-border {
  position: relative;
  border: 2px solid #c5964e;
  outline: 1px solid rgba(197, 150, 78, 0.45);
  outline-offset: -8px;
  border-radius: 10px;
  padding: 36px 34px;
  text-align: center;
}

.cert-top-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: #8f6b43;
  margin-bottom: 16px;
}

.cert-title {
  font-size: clamp(1.5rem, 3.6vw, 2.15rem);
  color: #691428;
  letter-spacing: 0.08em;
}

.cert-subtitle {
  font-size: 0.94rem;
  color: var(--ink-soft);
  margin-top: 6px;
}

.cert-names {
  margin: 26px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  flex-wrap: wrap;
}

.cert-person {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cert-person small {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  color: #8b6a52;
}

.cert-person strong {
  font-family: var(--font-calligraphy);
  font-size: 2.2rem;
  color: #561324;
  font-weight: 500;
}

.cert-heart-bridge {
  font-size: 1.8rem;
  color: #c23958;
  animation: heartbeat 1.6s infinite;
}

.cert-oath {
  max-width: 600px;
  margin: 0 auto 24px;
  font-size: 0.98rem;
  line-height: 1.9;
  color: var(--ink);
}

.cert-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding-top: 18px;
  border-top: 1px dashed rgba(139, 106, 82, 0.35);
}

.cert-meta-grid small {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--ink-soft);
  margin-bottom: 3px;
}

.cert-meta-grid strong {
  font-size: 0.9rem;
  color: #691428;
}

.cert-seal {
  position: absolute;
  right: 26px;
  bottom: 84px;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 2.5px solid rgba(184, 51, 42, 0.72);
  color: rgba(184, 51, 42, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.25;
  transform: rotate(-14deg);
  pointer-events: none;
}

.finale-after-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================================================
   定制弹窗 Modal
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(7, 4, 11, 0.76);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  width: min(480px, 100%);
  padding: 26px 24px;
  border-radius: var(--radius-lg);
  background: #1b0f26;
  border: 1px solid rgba(229, 193, 133, 0.4);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
}

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

.modal-header h3 {
  color: var(--gold-bright);
  font-size: 1.15rem;
}

.modal-close-btn {
  background: none;
  border: none;
  color: rgba(248, 239, 230, 0.7);
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-desc {
  font-family: var(--font-sans);
  font-size: 0.84rem;
  color: rgba(248, 239, 230, 0.72);
  margin-bottom: 18px;
}

.custom-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field span {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--gold);
}

.form-field input,
.form-field textarea {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(229, 193, 133, 0.3);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.modal-actions {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* ==========================================================================
   动画关键帧
   ========================================================================== */
@keyframes stageEnter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.16); }
  45% { transform: scale(1); }
  65% { transform: scale(1.12); }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.65; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes ripple {
  0% { transform: translate(-50%, -50%) scale(0.85); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(1.45); opacity: 0; }
}

@keyframes blinkCursor {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes stampPop {
  0% { opacity: 0; transform: scale(1.45) rotate(-6deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes flipLeafForward {
  0% {
    transform: rotateY(0deg);
    opacity: 0.96;
  }
  50% {
    opacity: 0.98;
  }
  100% {
    transform: rotateY(-180deg);
    opacity: 0;
  }
}

@keyframes flipLeafBackward {
  0% {
    transform: rotateY(0deg);
    opacity: 0.96;
  }
  50% {
    opacity: 0.98;
  }
  100% {
    transform: rotateY(180deg);
    opacity: 0;
  }
}

@keyframes mobilePageTurn {
  0% {
    opacity: 0.35;
    transform: perspective(1200px) rotateY(-18deg) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: perspective(1200px) rotateY(0deg) scale(1);
  }
}

/* ==========================================================================
   响应式移动端适配
   ========================================================================== */
@media (max-width: 860px) {
  .top-nav {
    flex-wrap: wrap;
    padding: 10px 14px;
  }

  .step-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    padding-top: 6px;
    border-top: 1px solid rgba(229, 193, 133, 0.1);
  }

  .step-pill {
    padding: 4px 8px;
    font-size: 0.74rem;
  }

  .step-connector {
    width: 6px;
  }

  .custom-btn-text {
    display: none;
  }

  .paper-border-inner {
    padding: 22px 18px 26px;
  }

  .letter-meta-row {
    flex-direction: column;
  }

  /* 移动端单页书籍布局 */
  .book-shell,
  .book-shell.single-cover-mode {
    grid-template-columns: 1fr;
    width: min(460px, 94vw);
    min-height: 460px;
  }

  .book-spine-shadow {
    display: none;
  }

  .book-page {
    min-height: 440px;
    padding: 22px 18px;
    border-radius: 10px !important;
  }

  .book-shell.mobile-turning .book-page.is-visible {
    animation: mobilePageTurn 0.42s ease both;
  }

  .book-flip-fx {
    display: none !important;
  }

  .stars-layout {
    grid-template-columns: 1fr;
  }

  .cert-border {
    padding: 26px 18px;
  }

  .cert-meta-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .cert-seal {
    position: static;
    margin: 18px auto 0;
  }
}
