/* ==========================================================================
   秽翼的尤斯蒂娅 · 粉丝展示站 — 全站样式
   设计基调：浮游都市的夜空 / 大圣堂的金 / 羽化病患的羽白
   ========================================================================== */

:root {
  --bg-0: #0a0d13;
  --bg-1: #0f131c;
  --bg-2: #151a26;
  --bg-3: #1c2231;
  --line: rgba(201, 171, 114, 0.18);
  --line-soft: rgba(201, 171, 114, 0.10);
  --gold: #c9ab72;
  --gold-bright: #e8d3a4;
  --gold-dim: #8a774f;
  --ink: #ece6d6;
  --ink-dim: #b3ae9f;
  --ink-faint: #7d7a6e;
  --accent: #c9ab72;              /* 各页可覆盖 */
  --accent-soft: rgba(201, 171, 114, 0.14);
  --shadow-deep: 0 18px 50px rgba(0, 0, 0, 0.55);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN",
           "STZhongsong", "SimSun", serif;
  --sans: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --header-h: 64px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.6, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-1);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.02em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 页面载入淡入（配合 main.js 的离场淡出 = 页面间转场） */
body.page-enter { animation: pageIn 0.9s var(--ease-out) both; }
body.page-leave { animation: pageOut 0.45s ease both; }
@keyframes pageIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes pageOut { from { opacity: 1; } to { opacity: 0; } }

img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--gold-bright); }

::selection { background: rgba(201, 171, 114, 0.35); color: #fff; }

/* 细金线分隔装饰 -------------------------------------------- */
.ornament {
  display: flex; align-items: center; gap: 14px;
  color: var(--gold);
  justify-content: center;
}
.ornament::before, .ornament::after {
  content: ""; height: 1px; width: 72px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.ornament::after { background: linear-gradient(270deg, transparent, var(--gold)); }
.ornament svg { width: 26px; height: 26px; opacity: 0.9; }

/* ==========================================================================
   顶部导航
   ========================================================================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  height: var(--header-h);
  display: flex; align-items: center;
  padding: 0 clamp(16px, 4vw, 48px);
  background: linear-gradient(180deg, rgba(8, 10, 16, 0.85), rgba(8, 10, 16, 0.45) 70%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.4s;
}
.site-header.scrolled {
  background: linear-gradient(180deg, rgba(8, 10, 16, 0.96), rgba(8, 10, 16, 0.88));
  border-bottom: 1px solid var(--line-soft);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); font-size: 17px; letter-spacing: 0.14em; font-weight: 600;
}
.brand svg { width: 22px; height: 22px; color: var(--gold); }
.brand em { font-style: normal; color: var(--gold); }

.main-nav { margin-left: auto; display: flex; align-items: center; gap: clamp(10px, 2.4vw, 30px); }
.main-nav a {
  color: var(--ink-dim); font-size: 15px; letter-spacing: 0.2em;
  padding: 6px 2px; position: relative; white-space: nowrap;
}
.main-nav a::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  width: 0; height: 1px; background: var(--gold);
  transition: width 0.35s var(--ease-out), left 0.35s var(--ease-out);
}
.main-nav a:hover, .main-nav a.active { color: var(--gold-bright); }
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; left: 0; }

/* 移动端汉堡 */
.nav-toggle {
  display: none; margin-left: auto;
  width: 42px; height: 42px; border: 1px solid var(--line);
  background: rgba(10, 13, 19, 0.6); border-radius: 4px;
  cursor: pointer; position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 18px; height: 1.5px; background: var(--gold);
  transform: translate(-50%, -50%); transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle span::before { transform: translate(-50%, -6px); }
.nav-toggle span::after  { transform: translate(-50%, 5px); }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translate(-50%, -50%) rotate(45deg); }
.nav-open .nav-toggle span::after  { transform: translate(-50%, -50%) rotate(-45deg); }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; gap: 0;
    background: rgba(9, 12, 18, 0.97);
    border-bottom: 1px solid var(--line-soft);
    max-height: 0; overflow: hidden; transition: max-height 0.45s var(--ease-out);
    backdrop-filter: blur(14px);
  }
  .nav-open .main-nav { max-height: 320px; }
  .main-nav a { padding: 15px 0; width: 100%; text-align: center; }
}

/* ==========================================================================
   Hero（首页主视觉）
   ========================================================================== */
.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
  isolation: isolate;
}
.hero-parallax {
  position: absolute; inset: -8% 0; z-index: -3;
  will-change: transform;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 38%;
  animation: heroZoom 26s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.07); } }
.hero-veil {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, transparent 20%, rgba(8, 10, 16, 0.55) 78%),
    linear-gradient(180deg, rgba(8, 10, 16, 0.6) 0%, rgba(10, 13, 19, 0.25) 34%, rgba(10, 13, 19, 0.82) 88%, var(--bg-1) 100%);
}
.hero-rays {
  position: absolute; inset: -20%; z-index: -1; pointer-events: none;
  background:
    conic-gradient(from 178deg at 50% -10%, transparent 46%, rgba(232, 211, 164, 0.055) 49%, transparent 52%),
    conic-gradient(from 184deg at 50% -10%, transparent 44%, rgba(232, 211, 164, 0.045) 48%, transparent 51%),
    conic-gradient(from 172deg at 50% -10%, transparent 45%, rgba(232, 211, 164, 0.035) 49%, transparent 53%);
  filter: blur(2px);
  animation: raysDrift 14s ease-in-out infinite alternate;
}
@keyframes raysDrift { from { opacity: 0.7; transform: translateX(-1.5%); } to { opacity: 1; transform: translateX(1.5%); } }

.hero-kicker {
  color: var(--gold); font-size: clamp(12px, 1.4vw, 15px);
  letter-spacing: 0.55em; text-indent: 0.55em; margin-bottom: 26px;
  opacity: 0; animation: riseIn 1.2s var(--ease-out) 0.25s forwards;
}
.hero-title {
  font-size: clamp(40px, 8.6vw, 96px);
  font-weight: 700; letter-spacing: 0.16em; text-indent: 0.16em; line-height: 1.25;
  color: #f2ecdc;
  text-shadow: 0 0 28px rgba(201, 171, 114, 0.45), 0 4px 26px rgba(0, 0, 0, 0.8);
  opacity: 0; animation: riseIn 1.4s var(--ease-out) 0.5s forwards;
}
.hero-sub {
  margin-top: 10px;
  font-size: clamp(13px, 1.8vw, 18px); color: var(--ink-dim);
  letter-spacing: 0.5em; text-indent: 0.5em;
  opacity: 0; animation: riseIn 1.4s var(--ease-out) 0.85s forwards;
}
.hero-quote {
  margin-top: clamp(30px, 6vh, 58px);
  max-width: 640px; padding: 0 24px;
  color: var(--ink-dim); font-size: clamp(14px, 1.7vw, 17px);
  font-style: normal; line-height: 2.3;
  opacity: 0; animation: riseIn 1.4s var(--ease-out) 1.15s forwards;
}
.hero-quote strong { color: var(--gold-bright); font-weight: 600; }
.hero-actions { margin-top: clamp(30px, 5vh, 52px); display: flex; gap: 18px; flex-wrap: wrap; justify-content: center;
  opacity: 0; animation: riseIn 1.4s var(--ease-out) 1.4s forwards; }

@keyframes riseIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* 按钮 ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 34px; font-size: 15px; letter-spacing: 0.3em; text-indent: 0.3em;
  color: var(--ink); border: 1px solid var(--gold-dim); border-radius: 2px;
  background: linear-gradient(180deg, rgba(201, 171, 114, 0.14), rgba(201, 171, 114, 0.04));
  transition: all 0.35s var(--ease-out); cursor: pointer; font-family: var(--serif);
}
.btn:hover {
  color: #16130b; background: linear-gradient(180deg, #e8d3a4, #c9ab72);
  border-color: var(--gold-bright);
  box-shadow: 0 6px 26px rgba(201, 171, 114, 0.35); transform: translateY(-2px);
}
.btn.ghost { background: transparent; border-color: rgba(236, 230, 214, 0.28); color: var(--ink-dim); }
.btn.ghost:hover { color: var(--gold-bright); border-color: var(--gold); background: rgba(201, 171, 114, 0.08); box-shadow: none; }

/* 下滑指示 --------------------------------------------------- */
.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: var(--ink-faint); font-size: 12px; letter-spacing: 0.4em; text-indent: 0.4em;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.scroll-hint::after {
  content: ""; width: 1px; height: 44px;
  background: linear-gradient(180deg, var(--gold), transparent);
  animation: hintDrop 2s ease-in-out infinite;
}
@keyframes hintDrop { 0% { transform: scaleY(0); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: top; } 56% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ==========================================================================
   通用 Section
   ========================================================================== */
.section { position: relative; padding: clamp(72px, 11vh, 128px) clamp(20px, 6vw, 72px); }
.section-head { text-align: center; margin-bottom: clamp(40px, 7vh, 72px); }
.section-head .ornament { margin-bottom: 22px; }
.section-head h2 {
  font-size: clamp(26px, 4vw, 40px); letter-spacing: 0.28em; text-indent: 0.28em;
  color: #f0e9d8; font-weight: 600;
}
.section-head .en {
  display: block; margin-top: 10px;
  font-family: Georgia, "Times New Roman", serif; font-style: italic;
  font-size: 13px; color: var(--ink-faint); letter-spacing: 0.32em;
}
.section-head p.lead {
  max-width: 720px; margin: 22px auto 0; color: var(--ink-dim);
  font-size: clamp(14px, 1.6vw, 16px);
}

/* 滚动显现 --------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.reveal.visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.12s; } .reveal.d2 { transition-delay: 0.24s; }
.reveal.d3 { transition-delay: 0.36s; } .reveal.d4 { transition-delay: 0.48s; }
.reveal.d5 { transition-delay: 0.6s; }

/* ==========================================================================
   世界观（首页）：上层 / 牢狱 对照
   ========================================================================== */
.world-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 3vw, 36px);
  max-width: 1200px; margin: 0 auto;
}
.world-card {
  position: relative; min-height: 460px; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--line-soft); box-shadow: var(--shadow-deep);
  display: flex; align-items: flex-end;
}
.world-card .bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  transition: transform 1.4s var(--ease-soft), filter 1.4s;
  filter: saturate(0.82) brightness(0.9);
}
.world-card:hover .bg { transform: scale(1.06); filter: saturate(1) brightness(1); }
.world-card .veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,10,16,0.05) 30%, rgba(8,10,16,0.92) 92%); }
.world-card .txt { position: relative; padding: clamp(22px, 3.4vw, 40px); }
.world-card h3 { font-size: clamp(20px, 2.4vw, 27px); letter-spacing: 0.18em; color: #f2ecdc; margin-bottom: 4px; }
.world-card .tag { color: var(--gold); font-size: 12.5px; letter-spacing: 0.34em; margin-bottom: 12px; }
.world-card p { color: var(--ink-dim); font-size: 14.5px; line-height: 2.05; }
@media (max-width: 760px) { .world-grid { grid-template-columns: 1fr; } .world-card { min-height: 380px; } }

/* 名词卡 ----------------------------------------------------- */
.lore-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; max-width: 1200px; margin: clamp(40px, 7vh, 72px) auto 0;
}
.lore-card {
  padding: 26px 24px; border: 1px solid var(--line-soft); border-radius: 4px;
  background: linear-gradient(180deg, rgba(28, 34, 49, 0.5), rgba(15, 19, 28, 0.35));
  transition: border-color 0.4s, transform 0.4s var(--ease-out), box-shadow 0.4s;
  position: relative; overflow: hidden;
}
.lore-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, var(--gold), transparent); opacity: 0.55;
}
.lore-card:hover { transform: translateY(-5px); border-color: var(--line); box-shadow: 0 14px 34px rgba(0,0,0,0.45); }
.lore-card h4 { color: var(--gold-bright); font-size: 17px; letter-spacing: 0.2em; margin-bottom: 10px; }
.lore-card h4 small { color: var(--ink-faint); font-size: 11px; letter-spacing: 0.18em; margin-left: 8px; font-family: Georgia, serif; }
.lore-card p { color: var(--ink-dim); font-size: 13.8px; line-height: 1.95; }

/* ==========================================================================
   剧情章节卡（首页）& 时间轴
   ========================================================================== */
.chapter-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 24px);
  max-width: 1240px; margin: 0 auto;
}
.chapter-card {
  position: relative; border-radius: 5px; overflow: hidden; cursor: pointer;
  aspect-ratio: 16 / 10.5; border: 1px solid var(--line-soft);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.chapter-card .bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  transition: transform 1.2s var(--ease-soft);
  filter: saturate(0.85) brightness(0.86);
}
.chapter-card:hover .bg { transform: scale(1.08) rotate(0.4deg); filter: saturate(1) brightness(1); }
.chapter-card .veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,10,16,0.1) 35%, rgba(8,10,16,0.9) 96%);
  transition: opacity 0.6s;
}
.chapter-card .no {
  position: absolute; top: 14px; left: 18px;
  font-family: Georgia, serif; font-style: italic; font-size: 13px;
  color: var(--gold); letter-spacing: 0.22em;
}
.chapter-card .txt { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 22px; }
.chapter-card h3 { font-size: 19px; letter-spacing: 0.14em; color: #f2ecdc; }
.chapter-card p { font-size: 13px; color: var(--ink-dim); margin-top: 6px; line-height: 1.8;
  max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.55s var(--ease-out), opacity 0.55s; }
.chapter-card:hover p { max-height: 120px; opacity: 1; }
@media (max-width: 960px) { .chapter-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .chapter-grid { grid-template-columns: 1fr; } .chapter-card { aspect-ratio: 16/9; } }

/* ==========================================================================
   角色卡（首页预告）
   ========================================================================== */
.cast-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(12px, 1.6vw, 20px); max-width: 1240px; margin: 0 auto;
}
.cast-card {
  position: relative; border-radius: 5px; overflow: hidden;
  aspect-ratio: 3 / 4.3; border: 1px solid var(--line-soft);
  background: radial-gradient(ellipse 120% 80% at 50% 10%, var(--bg-3), var(--bg-0));
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s, border-color 0.5s;
  cursor: pointer;
}
.cast-card:hover { transform: translateY(-8px); border-color: var(--line); box-shadow: 0 18px 40px rgba(0,0,0,0.55); }
.cast-card img {
  position: absolute; left: 50%; bottom: -4%; width: 132%; max-width: none;
  transform: translateX(-50%);
  transition: transform 0.6s var(--ease-out); filter: drop-shadow(0 14px 18px rgba(0,0,0,0.55));
}
.cast-card:hover img { transform: translateX(-50%) scale(1.045); }
.cast-card .name {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 34px 12px 12px; text-align: center;
  background: linear-gradient(180deg, transparent, rgba(6, 8, 13, 0.94));
  color: #f0e9d8; font-size: 16px; letter-spacing: 0.3em; text-indent: 0.3em;
}
.cast-card::before, .rail-item::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 58px; z-index: 1;
  background: linear-gradient(180deg, rgba(5, 7, 11, 0.82), transparent);
  pointer-events: none;
}
.cast-card .role {
  position: absolute; top: 10px; left: 0; right: 0; text-align: center; z-index: 2;
  font-size: 11px; color: var(--gold-bright); letter-spacing: 0.3em; text-indent: 0.3em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9); opacity: 0.95;
}

/* ==========================================================================
   VN 风格台词窗
   ========================================================================== */
.vn-box {
  position: relative; max-width: 860px; margin: 0 auto;
  padding: clamp(22px, 3.4vw, 34px) clamp(24px, 4vw, 44px) clamp(24px, 3.4vw, 34px);
  background: linear-gradient(180deg, rgba(14, 17, 25, 0.92), rgba(10, 13, 19, 0.88));
  border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(232, 211, 164, 0.12);
}
.vn-box::before {
  content: ""; position: absolute; inset: 6px; pointer-events: none;
  border: 1px solid rgba(201, 171, 114, 0.12); border-radius: 4px;
}
.vn-name {
  display: inline-block; position: relative; top: -34px; margin-bottom: -22px;
  padding: 6px 26px; margin-left: -12px;
  background: linear-gradient(180deg, #e8d3a4, #b2925a);
  color: #221c10; font-weight: 700; font-size: 15px; letter-spacing: 0.22em;
  border-radius: 2px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}
.vn-text { color: var(--ink); font-size: clamp(15px, 1.9vw, 18px); line-height: 2.2; }
.vn-text .dim { color: var(--ink-dim); }
.vn-next {
  position: absolute; right: 18px; bottom: 12px; width: 16px; height: 12px;
  background: var(--gold); clip-path: polygon(0 0, 100% 0, 50% 100%);
  animation: nextBlink 1.5s ease-in-out infinite;
}
@keyframes nextBlink { 0%, 100% { opacity: 0.25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(3px); } }

/* ==========================================================================
   剧情页：滚动场景演出
   ========================================================================== */
.story-intro { min-height: 92vh; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 120px 24px 80px; position: relative; }

/* 场景：粘性背景 + 内容滚动 */
.scene { position: relative; }
.scene-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; z-index: 0; }
.scene-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.12);
  transition: opacity 1.6s ease, transform 7s ease-out;
  filter: brightness(0.62) saturate(0.85);
  will-change: opacity, transform;
}
.scene-bg.active { opacity: 1; transform: scale(1.0); }
.scene-tint {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,10,16,0.72), rgba(8,10,16,0.28) 40%, rgba(8,10,16,0.86));
}
.scene-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 75% 65% at 50% 46%, transparent 30%, rgba(5, 7, 11, 0.75) 100%);
}
.scene-body { position: relative; z-index: 2; padding: 14vh 24px 18vh; max-width: 980px; margin: 0 auto; }
.scene-chapter {
  color: var(--gold); font-size: 13px; letter-spacing: 0.5em; text-indent: 0.5em;
  margin-bottom: 14px; display: flex; align-items: center; gap: 16px;
}
.scene-chapter::before { content: ""; width: 40px; height: 1px; background: var(--gold); }
.scene-title {
  font-size: clamp(26px, 4.6vw, 46px); letter-spacing: 0.2em; color: #f2ecdc;
  text-shadow: 0 2px 20px rgba(0,0,0,0.75); margin-bottom: 8px; font-weight: 600;
}
.scene-sub { color: var(--ink-dim); font-size: 13px; letter-spacing: 0.3em; margin-bottom: 30px; font-family: Georgia, serif; font-style: italic; }
.scene-para {
  max-width: 760px; color: var(--ink-dim); font-size: clamp(14.5px, 1.75vw, 16.5px);
  line-height: 2.3; margin-bottom: 22px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.8);
}
.scene .vn-box { margin: 34px 0 0; }
.scene .cg {
  margin: 44px auto 0; max-width: 860px; border: 1px solid var(--line); border-radius: 4px;
  overflow: hidden; box-shadow: var(--shadow-deep);
  transform: translateY(40px); opacity: 0; transition: all 1.2s var(--ease-out);
}
.scene .cg.visible { transform: none; opacity: 1; }
.scene .cg img { width: 100%; }
.scene .cg figcaption {
  padding: 12px 18px; font-size: 12.5px; color: var(--ink-faint);
  letter-spacing: 0.16em; background: rgba(10, 13, 19, 0.85); text-align: right;
}

/* 台词逐字浮现 */
.typed .ch { opacity: 0; display: inline; animation: chIn 0.04s linear forwards; }
@keyframes chIn { to { opacity: 1; } }

/* 剧情页路线选择 */
.routes { max-width: 1240px; margin: 0 auto; display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.route-card {
  position: relative; padding: 30px 28px; border: 1px solid var(--line-soft); border-radius: 5px;
  background: linear-gradient(180deg, rgba(28,34,49,0.55), rgba(15,19,28,0.4));
  overflow: hidden; transition: transform 0.5s var(--ease-out), border-color 0.5s, box-shadow 0.5s;
}
.route-card:hover { transform: translateY(-6px); border-color: var(--line); box-shadow: 0 16px 40px rgba(0,0,0,0.5); }
.route-card .rno { font-family: Georgia, serif; font-style: italic; color: var(--gold-dim); font-size: 13px; letter-spacing: 0.2em; }
.route-card h3 { margin: 8px 0 10px; font-size: 21px; letter-spacing: 0.16em; color: #f0e9d8; }
.route-card h3 small { display: block; font-size: 11.5px; color: var(--ink-faint); letter-spacing: 0.28em; margin-top: 4px; }
.route-card p { color: var(--ink-dim); font-size: 13.8px; line-height: 2; }
.route-card::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px;
  background: radial-gradient(circle, var(--rc, rgba(201,171,114,0.16)), transparent 70%);
}

/* ==========================================================================
   角色页
   ========================================================================== */
.char-stage {
  position: relative; min-height: 100vh; overflow: hidden;
  display: grid; grid-template-columns: minmax(320px, 44%) 1fr;
  align-items: stretch;
  background: var(--bg-0);
}
.char-stage .aura {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse 60% 52% at 26% 42%, var(--char-glow, rgba(201,171,114,0.14)), transparent 70%);
  transition: background 1.2s ease;
}
.char-stage .stage-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0.14; filter: saturate(0.7) brightness(0.8); z-index: 0;
}
.char-figure {
  position: relative; z-index: 2; display: flex; align-items: flex-end; justify-content: center;
  padding-top: var(--header-h);
}
.char-figure img {
  width: min(88%, 560px); max-height: calc(100vh - var(--header-h) - 20px); object-fit: contain; object-position: bottom;
  filter: drop-shadow(0 22px 34px rgba(0,0,0,0.6));
}
.char-figure .sprite-in { animation: spriteIn 0.9s var(--ease-out) both; }
@keyframes spriteIn {
  from { opacity: 0; transform: translateX(-36px) scale(0.985); filter: blur(6px) drop-shadow(0 22px 34px rgba(0,0,0,0.6)); }
  to   { opacity: 1; transform: none; filter: drop-shadow(0 22px 34px rgba(0,0,0,0.6)); }
}
.char-panel {
  position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--header-h) + 30px) clamp(24px, 5vw, 76px) 60px;
  background: linear-gradient(90deg, rgba(10,13,19,0) 0%, rgba(10,13,19,0.72) 22%, rgba(10,13,19,0.94) 60%);
}
.char-panel .crole { color: var(--gold); font-size: 12.5px; letter-spacing: 0.42em; text-indent: 0.42em; }
.char-panel h2 {
  font-size: clamp(34px, 4.6vw, 56px); letter-spacing: 0.14em; color: #f4eede;
  margin: 10px 0 2px; font-weight: 700; text-shadow: 0 0 24px var(--char-glow, transparent);
}
.char-panel .cv { color: var(--ink-faint); font-size: 12.5px; letter-spacing: 0.24em; margin-bottom: 22px; font-family: Georgia, serif; }
.char-panel .cquote {
  border-left: 2px solid var(--gold); padding: 4px 0 4px 18px; margin-bottom: 24px;
  color: var(--ink-dim); font-size: 15.5px; line-height: 2.1; font-style: normal;
}
.char-panel .cdesc { color: var(--ink-dim); font-size: 14.6px; line-height: 2.2; max-width: 560px; }
.char-panel .cfacts { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.char-panel .cfacts span {
  font-size: 12.5px; color: var(--gold-bright); border: 1px solid var(--line);
  padding: 5px 14px; border-radius: 999px; letter-spacing: 0.14em;
  background: rgba(201, 171, 114, 0.06);
}
.char-switch { position: absolute; right: clamp(14px, 3vw, 40px); bottom: 26px; z-index: 5; display: flex; gap: 10px; }
.char-switch button {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(10, 13, 19, 0.7); color: var(--gold); font-size: 18px; cursor: pointer;
  transition: all 0.3s; font-family: Georgia, serif;
}
.char-switch button:hover { background: var(--gold); color: #16130b; border-color: var(--gold); }

/* 角色选择列 */
.char-rail-wrap { padding: clamp(56px, 9vh, 100px) clamp(20px, 6vw, 72px); background: var(--bg-1); }
.char-rail {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 14px; max-width: 1240px; margin: 0 auto;
}
.rail-item {
  position: relative; aspect-ratio: 3/4; border-radius: 4px; overflow: hidden;
  border: 1px solid var(--line-soft); cursor: pointer;
  background: radial-gradient(ellipse 130% 90% at 50% 0%, var(--bg-3), var(--bg-0));
  transition: transform 0.4s var(--ease-out), border-color 0.4s, box-shadow 0.4s;
}
.rail-item:hover { transform: translateY(-5px); border-color: var(--line); }
.rail-item.current { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 10px 26px rgba(0,0,0,0.5); }
.rail-item img { position: absolute; left: 50%; bottom: -6%; width: 150%; max-width: none; transform: translateX(-50%); }
.rail-item .nm {
  position: absolute; inset: auto 0 0 0; padding: 30px 6px 9px; text-align: center;
  font-size: 13px; letter-spacing: 0.2em; color: #eee7d4;
  background: linear-gradient(180deg, transparent, rgba(5,7,11,0.95));
}
.rail-item .rl { position: absolute; top: 7px; left: 0; right: 0; text-align: center; font-size: 10.5px; color: var(--gold-bright); letter-spacing: 0.16em; text-shadow: 0 1px 5px rgba(0, 0, 0, 0.9); z-index: 2; }

@media (max-width: 920px) {
  .char-stage { grid-template-columns: 1fr; min-height: auto; }
  .char-figure { min-height: 54vh; }
  .char-figure img { max-height: 54vh; width: auto; max-width: 92%; }
  .char-panel { background: linear-gradient(180deg, rgba(10,13,19,0) 0%, rgba(10,13,19,0.9) 30%, var(--bg-0) 100%); margin-top: -60px; }
}

/* ==========================================================================
   画廊
   ========================================================================== */
.gal-grid { columns: 3 260px; column-gap: 18px; max-width: 1280px; margin: 0 auto; }
.gal-item {
  position: relative; margin-bottom: 18px; border-radius: 4px; overflow: hidden;
  border: 1px solid var(--line-soft); cursor: zoom-in; break-inside: avoid;
  box-shadow: 0 8px 26px rgba(0,0,0,0.4);
}
.gal-item img { width: 100%; transition: transform 0.9s var(--ease-soft), filter 0.9s; filter: saturate(0.9); }
.gal-item:hover img { transform: scale(1.05); filter: saturate(1.05); }
.gal-item figcaption {
  position: absolute; inset: auto 0 0 0; padding: 40px 16px 12px;
  background: linear-gradient(180deg, transparent, rgba(5,7,11,0.92));
  font-size: 13px; color: var(--ink-dim); letter-spacing: 0.1em;
  transform: translateY(30%); opacity: 0; transition: all 0.5s var(--ease-out);
}
.gal-item:hover figcaption { transform: none; opacity: 1; }
.gal-item figcaption b { display: block; color: var(--gold-bright); font-weight: 600; letter-spacing: 0.18em; margin-bottom: 2px; }

/* 灯箱 */
.lightbox {
  position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center;
  background: rgba(5, 7, 11, 0.92); backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none; transition: opacity 0.4s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 92vw; max-height: 88vh; border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.8);
  transform: scale(0.96); transition: transform 0.4s var(--ease-out);
}
.lightbox.open img { transform: scale(1); }
.lightbox .lb-cap {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: var(--ink-dim); font-size: 14px; letter-spacing: 0.2em; text-align: center;
}
.lightbox .lb-close, .lightbox .lb-prev, .lightbox .lb-next {
  position: absolute; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(10,13,19,0.7); color: var(--ink);
  font-size: 20px; cursor: pointer; transition: all 0.3s; line-height: 1;
}
.lightbox .lb-close:hover, .lightbox .lb-prev:hover, .lightbox .lb-next:hover { background: var(--gold); color: #16130b; }
.lightbox .lb-close { top: 24px; right: 24px; }
.lightbox .lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ==========================================================================
   页脚 / BGM / 羽毛画布
   ========================================================================== */
.site-footer {
  margin-top: clamp(60px, 10vh, 110px);
  border-top: 1px solid var(--line-soft);
  padding: 52px 24px 40px; text-align: center; color: var(--ink-faint);
  background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
}
.site-footer .fbrand { color: var(--ink-dim); letter-spacing: 0.3em; font-size: 15px; margin-bottom: 14px; }
.site-footer p { font-size: 12.5px; line-height: 2.1; max-width: 760px; margin: 0 auto; }
.site-footer .fnav { margin: 18px 0 20px; display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; }
.site-footer .fnav a { color: var(--ink-faint); font-size: 13px; letter-spacing: 0.2em; }
.site-footer .fnav a:hover { color: var(--gold-bright); }
.site-footer .august { height: 26px; margin: 16px auto 0; opacity: 0.55; }

.feather-canvas { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.85; }
main, .site-footer { position: relative; z-index: 2; }

/* BGM 按钮 */
.bgm-btn {
  position: fixed; right: 22px; bottom: 22px; z-index: 95;
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line); cursor: pointer;
  background: rgba(12, 15, 22, 0.82); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; gap: 2.5px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.bgm-btn:hover { border-color: var(--gold); box-shadow: 0 0 18px rgba(201, 171, 114, 0.25); }
.bgm-btn i {
  width: 2.5px; border-radius: 2px; background: var(--gold); height: 8px;
  transition: height 0.3s;
}
.bgm-btn.playing i:nth-child(1) { animation: eq 0.9s ease-in-out infinite; }
.bgm-btn.playing i:nth-child(2) { animation: eq 0.9s ease-in-out 0.25s infinite; }
.bgm-btn.playing i:nth-child(3) { animation: eq 0.9s ease-in-out 0.5s infinite; }
.bgm-btn.playing i:nth-child(4) { animation: eq 0.9s ease-in-out 0.12s infinite; }
@keyframes eq { 0%, 100% { height: 6px; } 50% { height: 16px; } }
.bgm-tip {
  position: fixed; right: 84px; bottom: 34px; z-index: 95;
  font-size: 12px; color: var(--ink-faint); letter-spacing: 0.16em;
  background: rgba(12,15,22,0.85); border: 1px solid var(--line-soft);
  padding: 5px 12px; border-radius: 3px; pointer-events: none;
  opacity: 0; transition: opacity 0.4s;
}
.bgm-tip.show { opacity: 1; }

/* 页内小标题导航（剧情页） */
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px; }
.chips a {
  font-size: 12.5px; letter-spacing: 0.16em; color: var(--ink-dim);
  border: 1px solid var(--line-soft); border-radius: 999px; padding: 7px 18px;
  transition: all 0.3s; background: rgba(10,13,19,0.5);
}
.chips a:hover, .chips a.active { color: #16130b; background: var(--gold); border-color: var(--gold); }

/* 子页 hero */
.page-hero {
  position: relative; min-height: 56vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; overflow: hidden;
  isolation: isolate;
}
.page-hero .ph-bg { position: absolute; inset: -6% 0; z-index: -2; background-size: cover; background-position: center 30%; filter: brightness(0.55) saturate(0.8); animation: heroZoom 24s ease-in-out infinite alternate; }
.page-hero .ph-veil { position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(8,10,16,0.55), rgba(10,13,19,0.35) 45%, var(--bg-1) 98%); }
.page-hero h1 {
  font-size: clamp(32px, 6vw, 60px); letter-spacing: 0.3em; text-indent: 0.3em;
  color: #f2ecdc; text-shadow: 0 0 30px rgba(201,171,114,0.4), 0 4px 20px rgba(0,0,0,0.8);
}
.page-hero .en { margin-top: 12px; color: var(--ink-dim); font-family: Georgia, serif; font-style: italic; font-size: 14px; letter-spacing: 0.4em; }
.page-hero .ph-quote { margin-top: 26px; color: var(--ink-dim); font-size: clamp(13.5px, 1.6vw, 15.5px); max-width: 620px; padding: 0 22px; }

/* 局部工具 */
.maxw { max-width: 1240px; margin-left: auto; margin-right: auto; }
.dim-note { color: var(--ink-faint); font-size: 12.5px; text-align: center; letter-spacing: 0.12em; margin-top: 26px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
