/* ═══════════════════════════════════════════════════════════
   繁星守护 · 全局视觉规范
   主题：深邃藏青蓝夜空 + 淡紫调雾霭，拒绝纯黑
   氛围：包裹感、沉静、温柔 — 如人间夜晚抬头望见的夜空
   ═══════════════════════════════════════════════════════════ */

:root {
  /* 夜空色板 — 深蓝向暗紫渐变，更深邃，绝不纯黑 */
  --sky-deep:   #080b26;
  --sky-mid:    #0f1540;
  --sky-soft:   #1a2156;
  --mist-purple:#2e2358;
  --mist-pink:  #3d2a60;

  /* 星光色 */
  --star-warm:  #fff3d6;
  --star-gold:  #f2c97d;
  --star-pale:  #dfe6ff;
  --star-blue:  #b8c4f0;

  /* 文字 */
  --ink:        #e9e6f4;
  --ink-soft:   #b8b3d4;
  --ink-dim:    #8d89ad;

  /* 强调 */
  --accent:     #f0c974;   /* 暖金 */
  --accent-soft:#c9a86a;
  --line:       rgba(200, 190, 255, .16);

  /* 卡片 */
  --card-bg:    rgba(24, 29, 66, .62);
  --card-bg-2:  rgba(30, 36, 80, .55);
  --card-edge:  rgba(190, 180, 255, .14);

  /* 字体 */
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;

  /* 布局 */
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ─────────── 基础 ─────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(168deg,
    var(--sky-deep) 0%,
    var(--sky-mid) 38%,
    var(--sky-soft) 72%,
    var(--mist-purple) 104%);
  background-attachment: fixed;
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.9;
  letter-spacing: .04em;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

::selection { background: rgba(240, 201, 116, .3); color: var(--ink); }

/* ─────────── 星空画布 & 雾霭层 ─────────── */
#starfield {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

.mist {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  animation: mist-drift 60s ease-in-out infinite alternate;
}
.mist-1 {
  width: 70vmax; height: 55vmax;
  left: -18vmax; top: -12vmax;
  background: radial-gradient(ellipse, rgba(88, 68, 160, .30), transparent 68%);
}
.mist-2 {
  width: 62vmax; height: 50vmax;
  right: -20vmax; bottom: -8vmax;
  background: radial-gradient(ellipse, rgba(120, 82, 160, .24), transparent 68%);
  animation-delay: -22s;
}
.mist-3 {
  width: 46vmax; height: 40vmax;
  left: 24vw; top: 32vh;
  background: radial-gradient(ellipse, rgba(70, 90, 180, .18), transparent 70%);
  animation-delay: -40s;
  animation-duration: 80s;
}
@keyframes mist-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(4vmax, 3vmax) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .mist { animation: none; }
}

/* ─────────── 全局悬浮按钮 ─────────── */
.float-btn {
  position: fixed;
  z-index: 60;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--card-edge);
  background: rgba(20, 25, 60, .72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink-soft);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .35s ease, box-shadow .35s ease, color .35s ease;
}
.float-btn:active { transform: scale(.92); }

.music-toggle { right: 16px; top: 16px; }
.music-toggle .music-icon { transition: color .4s ease; }
.music-toggle.playing {
  color: var(--accent);
  box-shadow: 0 0 18px rgba(240, 201, 116, .28);
  animation: music-pulse 3.2s ease-in-out infinite;
}
@keyframes music-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(240, 201, 116, .12); }
  50%      { box-shadow: 0 0 22px rgba(240, 201, 116, .34); }
}

.home-btn { left: 16px; top: 16px; font-size: 20px; }
.home-btn:hover { color: var(--accent); transform: scale(1.06); }

/* ─────────── 页面路由 ─────────── */
.pages-container { position: relative; z-index: 10; }

.page {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 72px 20px calc(120px + var(--safe-b));
}
.page.active {
  display: block;
  animation: page-in .8s ease both;
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .page.active { animation: none; }
}

.page-inner {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 30px;
}
.wide-inner { max-width: 760px; }

/* ─────────── 主页 ─────────── */
.home-inner { padding-top: 6vh; gap: 22px; }

.home-constellation {
  color: var(--ink-dim);
  font-size: 13px;
  letter-spacing: .5em;
  opacity: .8;
  animation: constellation-breathe 6s ease-in-out infinite;
}
@keyframes constellation-breathe { 0%,100% { opacity: .45; } 50% { opacity: .95; } }

.home-title {
  /* 沉静温润、有呵护感的衬线字体，拒绝锋利张扬 */
  font-family: "Noto Serif SC", "Songti SC", "STZhongsong", "STSong", "SimSun", serif;
  font-size: clamp(38px, 9vw, 54px);
  font-weight: 600;
  letter-spacing: .32em;
  text-indent: .32em;
  color: var(--star-warm);
  /* 柔和微光，不刺眼 */
  text-shadow: 0 0 22px rgba(242, 201, 125, .30), 0 0 56px rgba(242, 201, 125, .12);
}

.home-tagline {
  font-size: 15px;
  color: var(--ink-soft);
  letter-spacing: .28em;
}

.home-divider {
  display: flex; align-items: center; gap: 14px;
  width: min(240px, 60vw); margin: 6px 0;
}
.home-divider span {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}
.home-divider i {
  font-style: normal;
  color: var(--accent);
  font-size: 12px;
  text-shadow: 0 0 12px rgba(240, 201, 116, .5);
}

.home-intro {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 2.3;
}

/* ── 打字机逐字浮现（仅桌面端，由 app.js 控制；手机端完整显示） ── */
.tw-char { opacity: 0; transition: opacity .55s ease; }
.tw-char.on { opacity: 1; }
.tw-caret {
  display: inline-block;
  width: 1px;
  height: 1em;
  margin-left: 3px;
  vertical-align: -0.12em;
  background: rgba(240, 201, 116, .5);
  animation: caret-soft 1.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes caret-soft { 0%, 100% { opacity: .12; } 50% { opacity: .65; } }

.home-modules {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 420px;
  margin-top: 14px;
}

.module-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-rows: auto auto;
  column-gap: 16px;
  align-items: center;
  text-align: left;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid var(--card-edge);
  background: linear-gradient(135deg, var(--card-bg), var(--card-bg-2));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  transition: transform .4s ease, border-color .4s ease, box-shadow .4s ease;
}
.module-card:hover, .module-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(240, 201, 116, .38);
  box-shadow: 0 12px 36px rgba(10, 12, 40, .5), 0 0 24px rgba(240, 201, 116, .08);
}
.module-card:active { transform: translateY(-1px) scale(.99); }

.module-icon {
  grid-row: 1 / 3;
  font-size: 30px;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: radial-gradient(circle at 34% 30%, rgba(240, 201, 116, .16), rgba(120, 110, 220, .10));
  border: 1px solid var(--card-edge);
}
.module-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--star-warm);
}
.module-desc {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 3px;
  letter-spacing: .06em;
}
.module-hint {
  grid-column: 2;
  font-size: 11.5px;
  color: var(--ink-dim);
  margin-top: 6px;
  letter-spacing: .03em;
}

.home-footer-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-dim);
  letter-spacing: .18em;
}

/* ─────────── 散文段落（树洞/过渡/感谢页） ─────────── */
.prose-block {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 16.5px;
  color: var(--ink);
  line-height: 2.2;
  max-width: 30em;
}
.prose-block em {
  font-style: normal;
  color: var(--star-gold);
  text-shadow: 0 0 14px rgba(242, 201, 125, .3);
}

/* ─────────── 树洞说明文字容器 ───────────
   手机端：正常展开，随页面整体滚动（默认）
   桌面端：固定高度 + 自动缓慢上滚（见媒体查询） */
.treehole-scroll {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

/* ─────────── #letter 匿名信纸 ─────────── */
.letter-title {
  font-family: "Noto Serif SC", "Songti SC", "STZhongsong", "STSong", "SimSun", serif;
  font-size: clamp(26px, 5vw, 32px);
  font-weight: 600;
  letter-spacing: .3em;
  text-indent: .3em;
  color: var(--star-warm);
  text-shadow: 0 0 22px rgba(242, 201, 125, .3);
}
.letter-tip {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 2;
  max-width: 30em;
}

.letter-paper {
  width: min(620px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 18px 16px;
  border-radius: 18px;
  border: 1px solid var(--card-edge);
  background: linear-gradient(150deg, var(--card-bg), var(--card-bg-2));
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  box-shadow: 0 10px 40px rgba(4, 6, 24, .4);
}

.letter-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
}
.mic-btn {
  font-family: inherit;
  font-size: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--card-edge);
  background: rgba(255, 255, 255, .06);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .35s ease, box-shadow .35s ease, transform .35s ease;
  flex: none;
}
.mic-btn:hover {
  background: rgba(242, 201, 125, .12);
  box-shadow: 0 0 18px rgba(242, 201, 125, .18);
}
.mic-btn:active { transform: scale(.94); }
/* 录音中：柔和暖光呼吸（缓入缓出，不频闪） */
.mic-btn.recording {
  border-color: rgba(242, 201, 125, .55);
  background: rgba(242, 201, 125, .16);
  box-shadow: 0 0 22px rgba(242, 201, 125, .3);
  animation: mic-breathe 2.6s ease-in-out infinite;
}
@keyframes mic-breathe {
  0%, 100% { box-shadow: 0 0 14px rgba(242, 201, 125, .22); }
  50%      { box-shadow: 0 0 26px rgba(242, 201, 125, .42); }
}
.mic-hint {
  font-size: 12.5px;
  color: var(--ink-dim);
  line-height: 1.6;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.letter-textarea {
  font-family: inherit;
  font-size: 16px;
  line-height: 2.1;
  letter-spacing: .02em;
  color: var(--ink);
  width: 100%;
  min-height: 200px;
  max-height: 46vh;
  resize: vertical;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--card-edge);
  background: rgba(6, 8, 28, .35);
  outline: none;
  caret-color: var(--star-gold);
  transition: border-color .4s ease, box-shadow .4s ease;
}
.letter-textarea::placeholder { color: var(--ink-dim); }
.letter-textarea:focus {
  border-color: rgba(242, 201, 125, .4);
  box-shadow: 0 0 20px rgba(242, 201, 125, .1);
}
.letter-textarea::-webkit-scrollbar { width: 6px; }
.letter-textarea::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 3px; }

/* ─────────── 按钮体系 ─────────── */
.btn-primary {
  font-family: inherit;
  font-size: 17px;
  letter-spacing: .14em;
  color: #2a2408;
  background: linear-gradient(140deg, #f6d68e, var(--accent) 55%, #d9ae62);
  border: none;
  border-radius: 999px;
  padding: 15px 44px;
  cursor: pointer;
  box-shadow: 0 6px 26px rgba(242, 201, 125, .22), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .35s ease, box-shadow .35s ease, filter .35s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 34px rgba(242, 201, 125, .32);
  filter: brightness(1.05);
}
.btn-primary:active { transform: translateY(0) scale(.98); }

.btn-secondary {
  font-family: inherit;
  font-size: 15.5px;
  letter-spacing: .12em;
  color: var(--star-warm);
  background: transparent;
  border: 1px solid rgba(240, 201, 116, .5);
  border-radius: 999px;
  padding: 13px 38px;
  cursor: pointer;
  transition: all .35s ease;
}
.btn-secondary:hover {
  background: rgba(240, 201, 116, .08);
  box-shadow: 0 0 22px rgba(240, 201, 116, .14);
}

.btn-ghost {
  font-family: inherit;
  font-size: 14px;
  letter-spacing: .14em;
  color: var(--ink-dim);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px 20px;
  transition: color .3s ease, text-shadow .3s ease;
}
.btn-ghost:hover {
  color: var(--ink-soft);
  text-shadow: 0 0 14px rgba(200, 190, 255, .4);
}

.btn-caption {
  font-size: 12px;
  color: var(--ink-dim);
  letter-spacing: .06em;
  margin-top: -18px;
}

.letter-privacy {
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: .05em;
  opacity: .72;
  margin-top: -14px;
  margin-bottom: 0;
}

/* ─────────── 场景小星星（树洞开场 / 感谢页） ─────────── */
.scene-lonely-star { height: 70px; display: grid; place-items: end center; }
.lonely-star {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fdf6e3, var(--star-gold) 60%, rgba(242,201,125,0) 100%);
  box-shadow: 0 0 20px rgba(242, 201, 125, .55), 0 0 52px rgba(242, 201, 125, .22);
  animation: lonely-breathe 5s ease-in-out infinite;
}
@keyframes lonely-breathe {
  0%, 100% { box-shadow: 0 0 16px rgba(242,201,125,.45), 0 0 44px rgba(242,201,125,.16); transform: scale(1); }
  50%      { box-shadow: 0 0 26px rgba(242,201,125,.65), 0 0 68px rgba(242,201,125,.28); transform: scale(1.08); }
}

.scene-glow-star { height: 84px; display: grid; place-items: center; }
.glow-star {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fffbe9, var(--star-gold) 58%, rgba(242,201,125,0) 100%);
  box-shadow: 0 0 26px rgba(242, 201, 125, .6), 0 0 70px rgba(242, 201, 125, .25);
  animation: lonely-breathe 4.4s ease-in-out infinite;
}

/* ─────────── 擦亮星星仪式 ─────────── */
.ceremony-inner { gap: 20px; padding-top: 4vh; }

.ceremony-stage {
  position: relative;
  width: 240px; height: 240px;
  display: grid; place-items: center;
  margin: 8px auto;
}

.ceremony-star {
  position: relative;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 34%, #8b87a0, #5d5a72 62%, #454256 100%);
  filter: blur(.4px) saturate(.45);
  opacity: .85;
  box-shadow: 0 0 18px rgba(120, 115, 140, .3);
  transition: none;
}
/* 擦亮后：温润微光，不爆亮刺眼 */
.ceremony-stage.polished .ceremony-star {
  background: radial-gradient(circle at 40% 34%, #fffbe9, var(--star-gold) 55%, rgba(242, 201, 125, .35) 100%);
  filter: blur(0) saturate(1.15);
  opacity: 1;
  box-shadow: 0 0 28px rgba(242, 201, 125, .6), 0 0 80px rgba(242, 201, 125, .25);
  animation: star-settle 3.2s ease forwards;
}
@keyframes star-settle {
  from { box-shadow: 0 0 18px rgba(140,130,160,.35); }
  55%  { box-shadow: 0 0 34px rgba(242,201,125,.7), 0 0 96px rgba(242,201,125,.3); }
  to   { box-shadow: 0 0 28px rgba(242,201,125,.6), 0 0 80px rgba(242,201,125,.25); }
}

.ceremony-halo {
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 201, 125, .14), transparent 70%);
  opacity: 0;
  scale: .6;
}
.ceremony-stage.polished .ceremony-halo {
  animation: halo-bloom 3.6s ease forwards .2s;
}
@keyframes halo-bloom {
  from { opacity: 0; scale: .6; }
  55%  { opacity: 1; scale: 1.15; }
  to   { opacity: .9; scale: 1.05; }
}

/* 剥离的尘埃微粒 */
.dust-particle {
  position: absolute;
  left: 50%; top: 50%;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(168, 162, 186, .55);
  filter: blur(1px);
  pointer-events: none;
  animation: dust-drift var(--dur, 5s) ease-out var(--delay, 0s) forwards;
}
@keyframes dust-drift {
  0%   { opacity: .8; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx, 0px), var(--dy, -70px)) scale(.3); }
}

.ceremony-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  animation: page-in 1.4s ease both;
}
.ceremony-main {
  font-size: 18px;
  line-height: 2.2;
  color: var(--star-warm);
  text-shadow: 0 0 18px rgba(242, 201, 125, .18);
}
.ceremony-sub {
  font-size: 14.5px;
  color: var(--ink-soft);
}

.ceremony-tags {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  border-radius: 14px;
  border: 1px dashed var(--card-edge);
  background: rgba(24, 29, 66, .4);
}
.ceremony-tags-label { font-size: 12.5px; color: var(--ink-dim); }
.ceremony-tags-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ceremony-tags-list .tag-chip {
  font-size: 12.5px;
  padding: 5px 14px;
  border-radius: 999px;
  color: var(--star-gold);
  border: 1px solid rgba(240, 201, 116, .32);
  background: rgba(240, 201, 116, .06);
  letter-spacing: .05em;
}

.ceremony-bridge {
  font-size: 13.5px;
  color: var(--ink-dim);
  max-width: 26em;
}

/* ─────────── 共创提交 · 微光仪式 ─────────── */
.microglow-inner { gap: 18px; padding-top: 4vh; }

.microglow-stage {
  position: relative;
  width: 240px; height: 220px;
  display: grid; place-items: center;
  margin: 8px auto;
}
.microglow-star {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fffbe9, var(--star-gold) 58%, rgba(242,201,125,0) 100%);
  box-shadow: 0 0 26px rgba(242, 201, 125, .6), 0 0 70px rgba(242, 201, 125, .25);
  animation: lonely-breathe 4.6s ease-in-out infinite;
}

/* 一缕柔和微光从星星散出，缓缓上飘、融入夜空 */
.microglow-wisp {
  position: absolute;
  left: 50%; top: 50%;
  width: 46px; height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(250, 222, 160, .55), rgba(242, 201, 125, .18) 45%, transparent 72%);
  filter: blur(7px);
  opacity: 0;
  pointer-events: none;
}
.microglow-stage.emit .microglow-wisp {
  animation: wisp-rise 4.6s ease-out var(--wd, .3s) forwards;
}
@keyframes wisp-rise {
  0%   { opacity: 0; transform: translate(0, 0) scale(.35); }
  22%  { opacity: .8; }
  100% { opacity: 0; transform: translate(var(--wx, 20px), var(--wy, -120px)) scale(1.7); }
}

.microglow-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: page-in 1.2s ease both;
}
.microglow-body {
  font-size: 15px;
  color: var(--ink);
  line-height: 2.15;
  max-width: 30em;
}
.microglow-note {
  font-size: 12.5px;
  color: var(--ink-dim);
}

/* ─────────── 章节通用（心声 / 共创） ─────────── */
.section-header { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 10px; }
.section-title {
  font-size: clamp(26px, 6vw, 32px);
  font-weight: 600;
  letter-spacing: .3em;
  text-indent: .3em;
  color: var(--star-warm);
  text-shadow: 0 0 20px rgba(242, 201, 125, .28);
}
.section-lead {
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 2.1;
  max-width: 34em;
}
.section-note {
  font-size: 12.5px;
  color: var(--ink-dim);
  letter-spacing: .1em;
}

.cocreate-lead { text-align: center; gap: 10px; font-size: 14.5px; color: var(--ink-soft); }

/* ─────────── 共创主导航 · 两大入口卡片 ─────────── */
.cocreate-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
  max-width: 640px;
  margin-top: 6px;
}
@media (min-width: 640px) {
  .cocreate-nav { grid-template-columns: 1fr 1fr; max-width: 740px; }
}
.cocreate-nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 30px 26px 24px;
  border-radius: 20px;
  border: 1px solid var(--card-edge);
  background: linear-gradient(150deg, var(--card-bg), var(--card-bg-2));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  text-align: center;
  animation: card-float-in .9s ease both;
  transition: transform .4s ease, border-color .4s ease, box-shadow .4s ease;
}
.cocreate-nav-card:hover, .cocreate-nav-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(240, 201, 116, .35);
  box-shadow: 0 12px 36px rgba(8, 10, 34, .5), 0 0 22px rgba(240, 201, 116, .07);
}
.cocreate-nav-card:active { transform: translateY(-1px) scale(.99); }
.cocreate-nav-icon {
  font-size: 32px;
  width: 62px; height: 62px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: radial-gradient(circle at 34% 30%, rgba(240, 201, 116, .16), rgba(120, 110, 220, .10));
  border: 1px solid var(--card-edge);
}
.cocreate-nav-title {
  font-size: 18.5px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--star-warm);
  margin-top: 4px;
}
.cocreate-nav-desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.95;
}
.cocreate-nav-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--accent-soft);
  letter-spacing: .14em;
}

/* ─────────── 🌟 已经成型 · 可直接体验的共创成果 ─────────── */
.cocreate-results {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 22px 20px;
  border-radius: 20px;
  border: 1px solid rgba(150, 132, 230, .22);
  background: linear-gradient(160deg, rgba(38, 30, 74, .55), rgba(24, 29, 66, .45));
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  margin-bottom: 6px;
}
.results-title {
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--star-warm);
  text-shadow: 0 0 16px rgba(242, 201, 125, .22);
}
.results-lead {
  font-size: 13px;
  color: var(--ink-soft);
}

/* ── 成果区 · 场景引导条（痛点对号入座） ── */
.scene-nav-wrap {
  width: 100%;
  max-width: 640px;
  margin: 2px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.scene-nav-hint {
  font-size: 13px;
  color: var(--star-warm);
  letter-spacing: .08em;
  text-shadow: 0 0 14px rgba(242, 201, 125, .2);
}
.scene-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.scene-pill {
  font-family: inherit;
  font-size: 12px;
  line-height: 1.5;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(240, 201, 116, .28);
  background: rgba(240, 201, 116, .07);
  color: var(--ink-soft);
  cursor: pointer;
  letter-spacing: .04em;
  transition: all .3s ease;
}
.scene-pill:hover, .scene-pill:focus-visible {
  border-color: rgba(240, 201, 116, .55);
  background: rgba(240, 201, 116, .16);
  color: var(--star-warm);
  transform: translateY(-1px);
}
.scene-pill.active {
  border-color: rgba(240, 201, 116, .65);
  background: rgba(240, 201, 116, .22);
  color: var(--star-warm);
}
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 300px));
  gap: 14px;
  justify-content: center;
  width: 100%;
  margin-top: 8px;
}
.result-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 18px 16px;
  border-radius: 16px;
  border: 1px solid rgba(240, 201, 116, .28);
  background: linear-gradient(150deg, rgba(240, 201, 116, .07), rgba(120, 110, 220, .08));
  font-family: inherit;
  color: inherit;
  text-align: left;
  animation: card-float-in .9s ease both;
  transition: transform .4s ease, border-color .4s ease, box-shadow .4s ease;
}
.result-card:hover {
  transform: translateY(-3px);
  border-color: rgba(240, 201, 116, .5);
  box-shadow: 0 12px 34px rgba(8, 10, 34, .5), 0 0 22px rgba(240, 201, 116, .1);
}
.result-card-icon {
  font-size: 26px;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: radial-gradient(circle at 34% 30%, rgba(240, 201, 116, .18), rgba(120, 110, 220, .1));
  border: 1px solid var(--card-edge);
}
/* ── 成果卡片 · 场景句（第一眼对号入座，放在工具名前） ── */
.result-card-scene {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: .02em;
  color: var(--star-warm);
  text-shadow: 0 0 14px rgba(242, 201, 125, .22);
  margin-top: 2px;
}
/* ── 成果卡片 · 效果句（"能得到什么"） ── */
.result-card-effect {
  font-size: 12.5px;
  color: var(--accent-soft);
  line-height: 1.8;
  letter-spacing: .02em;
}
/* ── 成果卡片 · 点击引导条后的柔光闪烁 ── */
.result-card.flash {
  animation: card-flash 1.6s ease;
}
@keyframes card-flash {
  0%   { box-shadow: 0 0 0 rgba(240, 201, 116, 0); }
  30%  { box-shadow: 0 0 36px rgba(240, 201, 116, .5), 0 0 0 1px rgba(240, 201, 116, .6); }
  100% { box-shadow: 0 0 0 rgba(240, 201, 116, 0); }
}
.result-card-title {
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--ink-soft);
  margin-top: 1px;
}
/* ── 成果卡片 · 分类标签（统一格式的短徽章） ── */
.result-card-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .12em;
  line-height: 1.6;
  color: rgba(240, 201, 116, .92);
  background: rgba(240, 201, 116, .1);
  border: 1px solid rgba(240, 201, 116, .32);
  vertical-align: 2px;
  white-space: nowrap;
}
.result-card-desc {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.9;
  flex: 1;                                    /* 撑开中间区，让按钮组沉底对齐 */
}
.result-card-foot {
  font-size: 11px;
  color: var(--accent-soft);
  letter-spacing: .08em;
  margin-top: 4px;
}

/* ── 成果卡片 · 双层按钮（免费体验 / 完整可编辑版） ── */
.result-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;                 /* 沉底后与脚注保持固定间距 */
}
.result-free-btn,
.result-pro-btn {
  display: block;
  width: 100%;
  font-family: inherit;
  text-align: center;
  letter-spacing: .04em;
  cursor: pointer;
  border-radius: 10px;
  transition: all .3s ease;
}
.result-free-btn {
  padding: 9px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: #2a2344;
  background: linear-gradient(135deg, #f6cf7e, #f0b45a);
  border: 1px solid rgba(246, 207, 126, .7);
  box-shadow: 0 4px 16px rgba(240, 180, 90, .18);
}
.result-free-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(240, 180, 90, .32);
  background: linear-gradient(135deg, #ffd992, #f4bb63);
}
.result-pro-btn {
  padding: 7px 10px;
  font-size: 11.5px;
}
.result-pro-btn.has {
  color: var(--star-warm);
  border: 1px dashed rgba(240, 201, 116, .45);
  background: rgba(240, 201, 116, .08);
}
.result-pro-btn.has:hover {
  border-color: rgba(240, 201, 116, .8);
  background: rgba(240, 201, 116, .14);
  box-shadow: 0 0 16px rgba(240, 201, 116, .12);
}
.result-pro-btn.soon {
  cursor: default;
  color: rgba(200, 185, 255, .45);
  border: 1px dashed rgba(150, 132, 230, .3);
  background: transparent;
}

/* 成果区与投稿区之间的柔和星空渐变分隔（非实线） */
.star-sep {
  width: min(420px, 82%);
  height: 52px;
  margin: 8px auto 2px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, transparent, rgba(150, 132, 230, .14), transparent);
}
.star-sep i {
  font-style: normal;
  font-size: 12px;
  color: rgba(200, 185, 255, .5);
  text-shadow: 0 0 12px rgba(180, 160, 255, .4);
}

/* ─────────── 筛选标签 ─────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin: 14px 0 26px;
}
.filter-tag {
  font-family: inherit;
  font-size: 13px;
  letter-spacing: .06em;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--card-edge);
  background: rgba(22, 27, 62, .5);
  color: var(--ink-dim);
  cursor: pointer;
  transition: all .35s ease;
}
.filter-tag:hover { color: var(--ink-soft); border-color: rgba(200, 190, 255, .3); }
.filter-tag.active {
  color: var(--star-gold);
  border-color: rgba(240, 201, 116, .45);
  background: rgba(240, 201, 116, .09);
  box-shadow: 0 0 16px rgba(240, 201, 116, .1);
}

/* ─────────── 心声星光卡片 ─────────── */
.voices-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  width: 100%;
}
@media (min-width: 640px) {
  .voices-grid { grid-template-columns: 1fr 1fr; }
}

.star-card {
  position: relative;
  padding: 24px 24px 20px;
  border-radius: 18px;
  border: 1px solid var(--card-edge);
  background: linear-gradient(150deg, var(--card-bg), var(--card-bg-2));
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  text-align: left;
  animation: card-float-in .9s ease both;
  transition: transform .45s ease, border-color .45s ease, box-shadow .45s ease;
}
.star-card:hover {
  transform: translateY(-4px);
  border-color: rgba(200, 190, 255, .26);
  box-shadow: 0 14px 40px rgba(8, 10, 34, .55);
}
@keyframes card-float-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 卡片角上的小星光 */
.star-card::before {
  content: "✦";
  position: absolute;
  right: 16px; top: 14px;
  font-size: 11px;
  color: rgba(240, 201, 116, .4);
}

.star-card-category {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: .1em;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
  color: var(--star-pale);
  background: rgba(120, 130, 220, .13);
  border: 1px solid rgba(140, 150, 240, .2);
}
.star-card[data-cat="social"]    .star-card-category { color: #a8c8f0; background: rgba(90,140,230,.12); border-color: rgba(90,140,230,.25); }
.star-card[data-cat="parenting"] .star-card-category { color: #f0d8a8; background: rgba(230,180,90,.10); border-color: rgba(230,180,90,.22); }
.star-card[data-cat="marriage"]  .star-card-category { color: #f0b8c8; background: rgba(230,120,160,.10); border-color: rgba(230,120,160,.22); }
.star-card[data-cat="family"]    .star-card-category { color: #c8b8e8; background: rgba(160,110,230,.10); border-color: rgba(160,110,230,.22); }
.star-card[data-cat="self"]      .star-card-category { color: #a8e0d0; background: rgba(90,200,170,.10); border-color: rgba(90,200,170,.22); }
.star-card[data-cat="other"]     .star-card-category { color: #c0c0d8; background: rgba(150,150,180,.10); border-color: rgba(150,150,180,.22); }

.star-card-body {
  font-size: 14.5px;
  color: var(--ink);
  line-height: 2.05;
  letter-spacing: .02em;
}

.star-card-foot {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink-dim);
}
.star-card-foot .foot-dots { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }

/* 互助构想 A 类提示条 */
.mutual-aid-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.9;
  color: var(--ink-soft);
  background: rgba(240, 201, 116, .05);
  border: 1px dashed rgba(240, 201, 116, .25);
}
.mutual-aid-note strong { color: var(--star-gold); font-weight: 600; }

.voices-footnote, .cocreate-footnote {
  margin-top: 28px;
  font-size: 12px;
  color: var(--ink-dim);
  letter-spacing: .06em;
  text-align: center;
}

.back-home-row { margin-top: 6px; }

/* ─────────── 共创星群卡片 ─────────── */
.cocreate-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
}
@media (min-width: 640px) {
  .cocreate-grid { grid-template-columns: 1fr 1fr; }
}

.cluster-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 22px 18px;
  border-radius: 18px;
  border: 1px solid var(--card-edge);
  background: linear-gradient(150deg, var(--card-bg), var(--card-bg-2));
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  animation: card-float-in .9s ease both;
  transition: transform .4s ease, border-color .4s ease, box-shadow .4s ease;
  overflow: hidden;
}
.cluster-card::after {
  content: "前往贡献 ↗";
  position: absolute;
  right: 16px; bottom: 14px;
  font-size: 11px;
  color: var(--accent-soft);
  letter-spacing: .1em;
  opacity: .7;
  transition: opacity .3s ease, transform .3s ease;
}
.cluster-card:hover {
  transform: translateY(-4px);
  border-color: rgba(240, 201, 116, .35);
  box-shadow: 0 12px 36px rgba(8, 10, 34, .5), 0 0 20px rgba(240, 201, 116, .06);
}
.cluster-card:hover::after { opacity: 1; transform: translateX(2px); }

.cluster-card-icon {
  font-size: 28px;
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: radial-gradient(circle at 34% 30%, rgba(240, 201, 116, .14), rgba(120, 110, 220, .09));
  border: 1px solid var(--card-edge);
}
.cluster-card-title {
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--star-warm);
  margin-top: 4px;
  padding-right: 60px;
}
.cluster-card-desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.95;
}
.cluster-card-tag {
  margin-top: 6px;
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: .12em;
}

/* ─────────── 免责声明（全局） ─────────── */
.disclaimer-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 14px calc(8px + var(--safe-b));
  background: linear-gradient(180deg, transparent, rgba(10, 12, 38, .88) 30%);
  pointer-events: none;
}
.disclaimer-toggle {
  pointer-events: auto;
  font-family: inherit;
  font-size: 11.5px;
  letter-spacing: .22em;
  color: var(--ink-dim);
  background: rgba(18, 22, 56, .78);
  border: 1px solid var(--card-edge);
  border-radius: 999px;
  padding: 6px 18px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: color .3s ease, border-color .3s ease;
}
.disclaimer-toggle:hover { color: var(--ink-soft); border-color: rgba(200, 190, 255, .3); }

.disclaimer-text-box {
  pointer-events: auto;
  margin-top: 8px;
  max-width: 620px;
  width: calc(100% - 28px);
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(14, 17, 48, .94);
  border: 1px solid var(--card-edge);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: disclaimer-in .45s ease both;
}
@keyframes disclaimer-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.disclaimer-text-box p {
  font-size: 12px;
  line-height: 1.95;
  color: var(--ink-soft);
  text-align: justify;
}

/* ─────────── 小屏适配 ─────────── */
@media (max-width: 400px) {
  .page { padding-left: 14px; padding-right: 14px; }
  .module-card { padding: 16px 16px; }
  .prose-block { font-size: 15.5px; }
  .home-title { letter-spacing: .22em; text-indent: .22em; }
}

/* 大屏：整体内容居中收拢，保持包裹感（子页面维持滚动布局） */
@media (min-width: 900px) {
  .page-inner { gap: 34px; }
}

/* ── 桌面端首页：一屏完整展示全部内容，无需滚动 ──
   手机小屏自动恢复滚动布局（默认规则），防止文字挤压过小 */
@media (min-width: 1024px) {
  #page-home.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 40px 28px calc(64px + var(--safe-b));
  }
  #page-home .home-inner { gap: 11px; padding-top: 0; }
  .home-constellation { font-size: 11px; letter-spacing: .4em; }
  .home-title { font-size: 42px; letter-spacing: .28em; text-indent: .28em; line-height: 1.5; }
  .home-tagline { font-size: 13.5px; letter-spacing: .26em; }
  .home-divider { width: 200px; margin: 2px 0; }
  .home-intro { font-size: 13px; line-height: 2.1; }
  .home-modules {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    max-width: 700px;
    margin-top: 10px;
  }
  .module-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    justify-items: center;
    text-align: center;
    column-gap: 0;
    padding: 16px 14px 13px;
  }
  .module-icon { grid-row: auto; width: 44px; height: 44px; font-size: 24px; border-radius: 12px; }
  .module-name { font-size: 16px; margin-top: 8px; }
  .module-desc { font-size: 12px; margin-top: 2px; }
  .module-hint { grid-column: 1; font-size: 10.5px; margin-top: 5px; }
  .home-footer-note { margin-top: 6px; font-size: 11px; }

  /* 桌面端一屏页面（无垂直滚动）：#home / #cocreate 主导航 / #light-ritual / #contribute-ritual 仪式页 / #treehole
     其余子页面（#voice / #cocreate-result / #cocreate-submit）保持滚动布局 */
  #page-cocreate.active,
  #page-light-ritual.active,
  #page-contribute-ritual.active,
  #page-treehole.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 40px 28px calc(64px + var(--safe-b));
  }

  /* 树洞：固定高度文字容器 + 隐藏滚动条，按钮立即可见无需滚动 */
  #page-treehole .page-inner { gap: 18px; }
  #page-treehole .scene-lonely-star { height: 42px; }
  #page-treehole .treehole-scroll {
    width: min(560px, 92vw);
    height: clamp(220px, 42vh, 400px);
    overflow-y: auto;
    gap: 26px;
    padding: 14px 8px 10px;
    scrollbar-width: none;          /* Firefox 隐藏滚动条 */
    -ms-overflow-style: none;       /* 旧 Edge */
    /* 上下柔和渐隐，模拟文字从夜色中缓缓浮现 */
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
            mask-image: linear-gradient(180deg, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
  }
  #page-treehole .treehole-scroll::-webkit-scrollbar { display: none; } /* Chrome/Safari 隐藏滚动条 */
  #page-cocreate .page-inner { gap: 20px; }
  #page-cocreate .cocreate-lead { gap: 6px; font-size: 13.5px; }
  #page-cocreate .cocreate-nav-card { padding: 26px 24px 20px; }
  #page-cocreate .cocreate-nav-icon { width: 54px; height: 54px; font-size: 28px; }
  #page-cocreate .cocreate-nav-title { font-size: 17.5px; }
  #page-light-ritual .ceremony-inner,
  #page-contribute-ritual .microglow-inner { padding-top: 0; }
  #page-light-ritual .ceremony-stage { width: 200px; height: 200px; margin: 4px auto; }
  #page-contribute-ritual .microglow-stage { width: 220px; height: 190px; margin: 4px auto; }

  /* ── #letter 匿名信纸：桌面一屏，页面无滚动条，输入框内部滚动 ── */
  #page-letter.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px 28px calc(44px + var(--safe-b));
  }
  #page-letter .letter-inner { gap: 9px; padding-top: 0; }
  #page-letter .letter-title { font-size: 27px; }
  #page-letter .letter-tip { font-size: 12.5px; line-height: 1.75; }
  #page-letter .letter-paper { width: min(520px, 100%); padding: 12px 16px 11px; gap: 9px; }
  #page-letter .letter-toolbar { min-height: 32px; }
  #page-letter .mic-btn { width: 32px; height: 32px; font-size: 15px; }
  #page-letter .mic-hint { font-size: 11.5px; }
  /* 固定高度 + 内部滚动：文字再多也只滚输入框，不撑开页面 */
  #page-letter .letter-textarea {
    min-height: 0;
    height: clamp(140px, 24vh, 280px);
    max-height: none;
    resize: none;
    font-size: 15px;
    line-height: 2;
    padding: 12px 14px;
  }
  #page-letter .btn-primary { padding: 12px 38px; font-size: 15.5px; }
  #page-letter .btn-caption { font-size: 11px; margin-top: -4px; }
  #page-letter .letter-privacy { font-size: 10px; margin-top: -2px; }
  #page-letter .back-home-row { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01s !important; transition-duration: .01s !important; }
}

/* ═══════════════ 妈妈宝典融合版 · 新增 ═══════════════ */

/* 首页 Slogan 出处小注（字号小于脚注，间距收窄） */
.home-footer-note.src-note {
  margin-top: 22px;
  letter-spacing: .05em;
  font-size: 11.5px;
  opacity: .92;
}

/* 树洞页 · 纯安放弱入口 */
.treehole-quiet-entry {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.quiet-entry-text {
  font-size: 12.5px;
  color: var(--ink-dim);
  letter-spacing: .05em;
}
