/* ══════════════════════════════════════════════════
   NANBU —— 全站基础样式
   ══════════════════════════════════════════════════ */

:root {
  --bg-0: #07070e;
  --bg-1: #0d0c18;
  --bg-2: #15132a;
  --panel: rgba(21, 19, 42, 0.84);
  --panel-solid: #15132a;
  --line: rgba(230, 164, 192, 0.16);
  --line-2: rgba(230, 164, 192, 0.34);
  --pink: #e6a4c0;
  --pink-soft: #f5cadb;
  --pink-deep: #b96e91;
  --blue: #9cc4e8;
  --gold: #e8c07d;
  --text: #f2eef6;
  --text-dim: #aca4bf;
  --text-mute: #6e6889;
  --radius: 4px;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  --serif: "Songti SC", "SimSun", "Noto Serif SC", "Source Han Serif SC", serif;
  --sans: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav-h: 62px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background-image:
    radial-gradient(1100px 620px at 78% -8%, rgba(230, 164, 192, 0.13), transparent 62%),
    radial-gradient(900px 560px at 6% 12%, rgba(140, 170, 240, 0.10), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0) 72%);
  background-attachment: fixed;
}

img { max-width: 100%; display: block; }
a { color: var(--pink-soft); text-decoration: none; }
a:hover { color: #fff; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; }
::selection { background: rgba(230, 164, 192, 0.34); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0b0a15; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4a3a55, #2a2440);
  border-radius: 10px;
  border: 2px solid #0b0a15;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #6d5478, #3a3156); }

/* ══════════ 顶部导航 ══════════ */

.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 26px;
  background: linear-gradient(180deg, rgba(8, 7, 16, 0.94), rgba(8, 7, 16, 0.62) 70%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(230, 164, 192, 0.10);
  transition: background .3s;
}
.site-nav.solid {
  background: rgba(9, 8, 18, 0.96);
  border-bottom-color: var(--line);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--serif);
  letter-spacing: .22em;
  color: #fff;
  flex-shrink: 0;
}
.brand b {
  font-size: 22px;
  font-weight: 600;
  background: linear-gradient(100deg, #fff 10%, var(--pink-soft) 45%, var(--gold) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand small {
  font-size: 11px;
  letter-spacing: .34em;
  color: var(--text-mute);
  font-family: var(--sans);
}

.nav-links { display: flex; gap: 4px; margin-left: 12px; flex: 1; }
.nav-links a {
  position: relative;
  padding: 8px 18px;
  color: var(--text-dim);
  font-size: 14px;
  letter-spacing: .12em;
  border-radius: 3px;
  transition: color .22s, background .22s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 2px;
  width: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--pink), transparent);
  transform: translateX(-50%);
  transition: width .28s;
}
.nav-links a:hover { color: #fff; background: rgba(230, 164, 192, 0.06); }
.nav-links a:hover::after, .nav-links a.on::after { width: 62%; }
.nav-links a.on { color: var(--pink-soft); }

.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
  transition: all .2s;
}
.nav-btn:hover { color: #fff; border-color: var(--line-2); background: rgba(230, 164, 192, 0.12); }
.nav-btn.ghost { background: transparent; }

.nav-toggle { display: none; }

/* ══════════ 通用容器 / 标题 ══════════ */

.wrap { width: min(1340px, 100% - 52px); margin: 0 auto; }

.sec { padding: 78px 0; position: relative; }
.sec-head { margin-bottom: 34px; }
.sec-head .kicker {
  font-size: 11px;
  letter-spacing: .44em;
  color: var(--pink-deep);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.sec-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: .1em;
  color: #fff;
}
.sec-head h2 em {
  font-style: normal;
  color: var(--pink);
  margin-right: 8px;
}
.sec-head p { margin: 8px 0 0; color: var(--text-mute); font-size: 13.5px; letter-spacing: .06em; }
.sec-head .rule {
  width: 62px; height: 2px; margin-top: 16px;
  background: linear-gradient(90deg, var(--pink), transparent);
}

/* ══════════ 按钮 ══════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 26px;
  font-size: 14px;
  letter-spacing: .14em;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  cursor: pointer;
  transition: all .22s;
  white-space: nowrap;
}
.btn:hover { background: rgba(230, 164, 192, 0.16); border-color: var(--pink); color: #fff; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary {
  background: linear-gradient(100deg, rgba(230, 164, 192, .92), rgba(200, 130, 165, .92));
  border-color: transparent;
  color: #241321;
  font-weight: 600;
}
.btn.primary:hover { background: linear-gradient(100deg, #f3bdd3, #d991b0); box-shadow: 0 8px 26px rgba(230, 164, 192, .32); }
.btn.wide { width: 100%; }
.btn.sm { padding: 7px 14px; font-size: 12.5px; letter-spacing: .08em; }
.btn.danger { border-color: rgba(230, 120, 130, .5); color: #f0a0a8; }
.btn.danger:hover { background: rgba(200, 70, 90, .22); border-color: #e0788a; }
.btn:disabled { opacity: .42; cursor: not-allowed; transform: none; }

/* ══════════ 首页 Hero ══════════ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}
/* 未上传主视觉背景时的默认底：纯 CSS，不依赖任何文件 */
.hero-bg {
  position: absolute;
  inset: 0;
  background-color: #120f22;
  background-image:
    radial-gradient(1000px 700px at 74% 16%, rgba(230, 164, 192, 0.20), transparent 62%),
    radial-gradient(820px 640px at 12% 26%, rgba(120, 150, 230, 0.14), transparent 64%),
    radial-gradient(900px 520px at 52% 98%, rgba(232, 192, 125, 0.09), transparent 62%),
    linear-gradient(158deg, #1b1636 0%, #130f25 48%, #0a0813 100%);
  background-size: cover;
  background-position: center 32%;
  transform: scale(1.06);
  animation: heroDrift 26s ease-in-out infinite alternate;
  filter: saturate(1.06);
}
@keyframes heroDrift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.12) translate3d(-16px, -10px, 0); }
}
.hero-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(760px 520px at 20% 62%, rgba(10, 8, 20, .28), transparent 70%),
    linear-gradient(180deg, rgba(7, 6, 14, .78) 0%, rgba(7, 6, 14, .42) 34%, rgba(7, 6, 14, .88) 88%, var(--bg-0) 100%),
    linear-gradient(96deg, rgba(7, 6, 14, .94) 4%, rgba(7, 6, 14, .42) 52%, rgba(7, 6, 14, .74) 100%);
}
.hero-sprite {
  position: absolute;
  right: 3%;
  bottom: -3%;
  height: 88vh;
  max-height: 900px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(-26px 16px 60px rgba(0, 0, 0, .7));
  animation: spriteIn 1.5s cubic-bezier(.18, .9, .3, 1) both;
}
@keyframes spriteIn {
  from { opacity: 0; transform: translateY(38px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.hero-inner { position: relative; z-index: 3; width: min(1340px, 100% - 52px); margin: 0 auto; }
.hero-txt { max-width: 640px; animation: txtIn 1.1s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes txtIn {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: .5em;
  color: var(--pink);
  margin-bottom: 22px;
  text-transform: uppercase;
}
.hero-kicker::before {
  content: "";
  width: 40px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--pink));
}
.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(56px, 10vw, 132px);
  font-weight: 500;
  line-height: .96;
  letter-spacing: .08em;
  background: linear-gradient(102deg, #ffffff 6%, #f7d3e3 34%, var(--pink) 58%, var(--gold) 98%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 40px rgba(230, 164, 192, .26));
}
.hero-sub {
  margin: 16px 0 0;
  font-family: var(--serif);
  font-size: clamp(18px, 2.4vw, 27px);
  letter-spacing: .42em;
  color: var(--text-dim);
}
.hero-tag {
  margin: 26px 0 0;
  font-size: 15px;
  line-height: 2.1;
  color: #cfc8dd;
  max-width: 470px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .8);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.hero-meta {
  position: absolute;
  left: 0; right: 0; bottom: 26px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 11.5px;
  letter-spacing: .3em;
  color: var(--text-mute);
  width: min(1340px, 100% - 52px);
  margin: 0 auto;
}
.hero-scroll { display: flex; align-items: center; gap: 10px; }
.hero-scroll i {
  display: block; width: 1px; height: 42px;
  background: linear-gradient(180deg, var(--pink), transparent);
  animation: scrollPulse 2.4s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: .35; transform: scaleY(.7); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ══════════ 模式入口卡 ══════════ */

.modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 8px;
}
.mode-card {
  position: relative;
  display: block;
  min-height: 330px;
  padding: 34px 30px 30px;
  background: linear-gradient(168deg, rgba(38, 32, 62, .72), rgba(17, 15, 32, .9));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .38s cubic-bezier(.2, .9, .3, 1), border-color .3s, box-shadow .38s;
  color: inherit;
}
.mode-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 260px at 84% -12%, rgba(230, 164, 192, .22), transparent 68%);
  opacity: 0;
  transition: opacity .4s;
}
.mode-card::after {
  content: "";
  position: absolute;
  left: 30px; right: 30px; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--pink), transparent);
  transform: scaleX(0);
  transition: transform .45s;
}
.mode-card:hover {
  transform: translateY(-8px);
  border-color: var(--line-2);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .62);
}
.mode-card:hover::before { opacity: 1; }
.mode-card:hover::after { transform: scaleX(1); }

.mode-ico { position: relative; z-index: 2; height: 46px; margin-bottom: 22px; }
.mode-ico svg { height: 46px; width: auto; }
.mode-no {
  position: absolute;
  top: 22px; right: 26px;
  font-family: var(--serif);
  font-size: 52px;
  line-height: 1;
  color: rgba(230, 164, 192, .10);
  z-index: 1;
  letter-spacing: -.02em;
}
.mode-card h3 {
  position: relative; z-index: 2;
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: .14em;
  color: #fff;
}
.mode-card .mode-en {
  position: relative; z-index: 2;
  font-size: 10.5px;
  letter-spacing: .4em;
  color: var(--pink-deep);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.mode-card p {
  position: relative; z-index: 2;
  margin: 0;
  font-size: 13.5px;
  line-height: 2;
  color: var(--text-dim);
}
.mode-card .mode-go {
  position: relative; z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 12.5px;
  letter-spacing: .22em;
  color: var(--pink);
  transition: gap .3s;
}
.mode-card:hover .mode-go { gap: 15px; }

/* ══════════ 篇章列表（首页） ══════════ */

.chap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.chap-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .34s, border-color .3s, box-shadow .34s;
  cursor: pointer;
}
.chap-card:hover { transform: translateY(-6px); border-color: var(--line-2); box-shadow: var(--shadow); }
.chap-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(140deg, #241d3d, #100e1e);
  overflow: hidden;
}
.chap-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .9, .3, 1); }
.chap-card:hover .chap-thumb img { transform: scale(1.06); }
.chap-thumb .ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 46px; letter-spacing: .2em;
  color: rgba(230, 164, 192, .26);
}
.chap-body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.chap-body .no {
  font-size: 10.5px; letter-spacing: .34em; color: var(--pink-deep); text-transform: uppercase;
}
.chap-body h4 {
  margin: 6px 0 8px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: .1em;
  color: #fff;
}
.chap-body p { margin: 0; font-size: 13px; color: var(--text-mute); line-height: 1.9; flex: 1; }
.chap-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px; padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  font-size: 11.5px; letter-spacing: .12em; color: var(--text-mute);
}
.chap-badge {
  padding: 2px 9px; border-radius: 2px; font-size: 10.5px; letter-spacing: .14em;
  border: 1px solid var(--line-2); color: var(--pink);
}
.chap-badge.done { border-color: rgba(140, 210, 160, .44); color: #96d8ae; }

/* ══════════ 空状态 ══════════ */

.empty {
  padding: 70px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--text-mute);
  font-size: 13.5px;
  letter-spacing: .1em;
  background: rgba(255, 255, 255, .012);
}
.empty b { display: block; font-family: var(--serif); font-size: 19px; color: var(--text-dim); margin-bottom: 10px; letter-spacing: .18em; font-weight: 500; }

/* ══════════ 公告 ══════════ */

.notice {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px 22px;
  background: linear-gradient(96deg, rgba(230, 164, 192, .10), rgba(230, 164, 192, .02));
  border-left: 2px solid var(--pink);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 13.5px;
  color: #ddd6e8;
  white-space: pre-wrap;
}
.notice b { color: var(--pink); font-weight: 600; letter-spacing: .16em; flex-shrink: 0; }

/* ══════════ 页脚 ══════════ */

.site-foot {
  position: relative;
  margin-top: 40px;
  padding: 46px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .4));
}
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.site-foot .fbrand { font-family: var(--serif); letter-spacing: .3em; font-size: 17px; color: var(--text-dim); }
.site-foot .fcopy { font-size: 11.5px; letter-spacing: .18em; color: var(--text-mute); }
.site-foot .flinks { display: flex; gap: 22px; font-size: 12px; letter-spacing: .14em; }
.site-foot .flinks a { color: var(--text-mute); }
.site-foot .flinks a:hover { color: var(--pink); }

/* ══════════ 页面头（子页面） ══════════ */

.page-head {
  position: relative;
  padding: calc(var(--nav-h) + 74px) 0 52px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.page-head .bg {
  position: absolute; inset: 0;
  background-color: #161230;
  background-image:
    radial-gradient(900px 480px at 78% -10%, rgba(230, 164, 192, 0.28), transparent 64%),
    radial-gradient(700px 420px at 8% 40%, rgba(120, 150, 230, 0.20), transparent 62%),
    linear-gradient(150deg, #1d1838, #120f26);
  background-size: cover; background-position: center 30%;
  opacity: .3; filter: saturate(.9);
}
.page-head .veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7, 6, 14, .84), rgba(7, 6, 14, .72) 40%, var(--bg-0) 100%);
}
.page-head .wrap { position: relative; z-index: 2; }
.page-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 500;
  letter-spacing: .16em;
  color: #fff;
}
.page-head .ph-en {
  font-size: 11px; letter-spacing: .5em; color: var(--pink-deep); text-transform: uppercase;
  margin-bottom: 12px;
}
.page-head p { margin: 12px 0 0; color: var(--text-dim); font-size: 13.5px; letter-spacing: .08em; max-width: 620px; }

/* ══════════ 筛选条 ══════════ */

.filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 18px 0 22px;
}
.chip {
  padding: 6px 15px;
  font-size: 12.5px;
  letter-spacing: .12em;
  color: var(--text-dim);
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 20px;
  cursor: pointer;
  transition: all .2s;
}
.chip:hover { color: #fff; border-color: var(--line-2); }
.chip.on {
  background: linear-gradient(100deg, rgba(230, 164, 192, .9), rgba(200, 130, 165, .9));
  border-color: transparent;
  color: #241321;
  font-weight: 600;
}
.filters .spacer { flex: 1; }
.filters .count { font-size: 12px; letter-spacing: .12em; color: var(--text-mute); }

/* ══════════ 画廊 ══════════ */

.gal-grid {
  columns: 4;
  column-gap: 14px;
}
@media (max-width: 1200px) { .gal-grid { columns: 3; } }
@media (max-width: 820px) { .gal-grid { columns: 2; } }
@media (max-width: 520px) { .gal-grid { columns: 1; } }

.gal-item {
  position: relative;
  break-inside: avoid;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  background: #0f0d1c;
  transition: border-color .28s, transform .28s;
}
.gal-item:hover { border-color: var(--pink); transform: translateY(-3px); box-shadow: 0 16px 44px rgba(0, 0, 0, .6); }
.gal-item img { width: 100%; height: auto; display: block; transition: transform .6s cubic-bezier(.2, .9, .3, 1); }
.gal-item:hover img { transform: scale(1.03); }
.gal-cap {
  position: absolute; inset: auto 0 0 0;
  padding: 26px 14px 12px;
  background: linear-gradient(0deg, rgba(6, 5, 12, .92), transparent);
  opacity: 0;
  transition: opacity .3s;
}
.gal-item:hover .gal-cap { opacity: 1; }
.gal-cap .t { font-size: 13px; color: #fff; letter-spacing: .06em; }
.gal-cap .m { font-size: 10.5px; color: var(--text-mute); letter-spacing: .1em; margin-top: 3px; }
.gal-item .lock-tag {
  position: absolute; top: 10px; left: 10px;
  padding: 2px 9px; font-size: 10px; letter-spacing: .14em;
  background: rgba(10, 8, 18, .82); border: 1px solid var(--line-2); color: var(--pink); border-radius: 2px;
}
.gal-item.locked img { filter: blur(16px) brightness(.45) saturate(.5); }

/* 灯箱 */
.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(4, 3, 9, .965);
  display: none;
  flex-direction: column;
  backdrop-filter: blur(6px);
}
.lightbox.on { display: flex; }
.lb-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  flex-shrink: 0;
}
.lb-bar .lb-title { flex: 1; min-width: 0; }
.lb-bar .lb-title .t {
  font-family: var(--serif); font-size: 16px; color: #fff; letter-spacing: .1em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lb-bar .lb-title .m { font-size: 11px; color: var(--text-mute); letter-spacing: .12em; margin-top: 2px; }
.lb-bar .btn { padding: 6px 13px; font-size: 12px; }
.lb-stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  cursor: grab;
  display: flex; align-items: center; justify-content: center;
  touch-action: none;
}
.lb-stage.grabbing { cursor: grabbing; }
.lb-stage img {
  max-width: none; max-height: none;
  position: absolute;
  top: 0; left: 0;
  transform-origin: 0 0;
  will-change: transform;
  image-rendering: auto;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .8);
}
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 54px; height: 92px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(16, 13, 28, .62);
  border: 1px solid rgba(255, 255, 255, .1);
  color: #fff; font-size: 22px;
  cursor: pointer;
  border-radius: 3px;
  z-index: 5;
  transition: background .2s;
}
.lb-nav:hover { background: rgba(230, 164, 192, .28); }
.lb-nav.prev { left: 16px; }
.lb-nav.next { right: 16px; }
.lb-hint {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  font-size: 11px; letter-spacing: .16em; color: var(--text-mute);
  background: rgba(8, 7, 16, .7); padding: 6px 16px; border-radius: 20px;
  pointer-events: none; opacity: .8;
  white-space: nowrap;
}
.lb-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--text-mute); font-size: 12px; letter-spacing: .3em; pointer-events: none;
}

/* ══════════ 档案库 ══════════ */

.tabs {
  display: flex; gap: 2px; flex-wrap: wrap;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  margin-bottom: 32px;
}
.tab {
  position: relative;
  padding: 13px 26px;
  font-size: 14px; letter-spacing: .16em;
  color: var(--text-mute);
  background: none; border: none; cursor: pointer;
  transition: color .22s;
}
.tab:hover { color: var(--text-dim); }
.tab.on { color: var(--pink-soft); }
.tab.on::after {
  content: ""; position: absolute; left: 18%; right: 18%; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--pink), transparent);
}
.tab .n {
  display: inline-block; margin-left: 7px; padding: 0 6px;
  font-size: 10.5px; border-radius: 8px;
  background: rgba(255, 255, 255, .08); color: var(--text-mute);
}
.panel { display: none; animation: fadeUp .4s ease both; }
.panel.on { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* 角色卡 */
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 18px; }
.char-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .32s, border-color .3s, box-shadow .32s;
}
.char-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(360px 220px at 88% 0%, var(--cc, rgba(230,164,192,.3)), transparent 70%);
  opacity: .5; transition: opacity .35s;
}
.char-card:hover { transform: translateY(-6px); border-color: var(--line-2); box-shadow: var(--shadow); }
.char-card:hover::before { opacity: 1; }
.char-ava {
  position: relative; z-index: 2;
  width: 100%; aspect-ratio: 3 / 4;
  border-radius: 3px; overflow: hidden;
  background: linear-gradient(150deg, #241d3d, #100e1e);
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, .06);
}
.char-ava img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.char-ava .ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 54px; color: rgba(255, 255, 255, .14);
}
.char-card h4 {
  position: relative; z-index: 2;
  margin: 0; font-family: var(--serif); font-size: 21px; font-weight: 500;
  letter-spacing: .1em; color: #fff;
}
.char-card .kana { position: relative; z-index: 2; font-size: 11px; letter-spacing: .22em; color: var(--text-mute); margin-top: 4px; }
.char-card .role {
  position: relative; z-index: 2;
  display: inline-block; margin-top: 10px; padding: 2px 10px;
  font-size: 10.5px; letter-spacing: .16em;
  border: 1px solid var(--line-2); color: var(--pink); border-radius: 2px;
  align-self: flex-start;
}
.char-card .intro {
  position: relative; z-index: 2;
  margin: 12px 0 0; font-size: 12.5px; line-height: 1.9; color: var(--text-dim);
}
.char-card .tags { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.char-card .tags span {
  font-size: 10.5px; padding: 2px 8px; border-radius: 2px;
  background: rgba(255, 255, 255, .05); color: var(--text-mute); letter-spacing: .1em;
}

/* 角色详情抽屉 */
.drawer-mask {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(4, 3, 9, .72);
  backdrop-filter: blur(4px);
  display: none;
}
.drawer-mask.on { display: block; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(620px, 100%);
  z-index: 1600;
  background: linear-gradient(180deg, #14122a, #0a0913);
  border-left: 1px solid var(--line);
  box-shadow: -30px 0 90px rgba(0, 0, 0, .7);
  transform: translateX(100%);
  transition: transform .42s cubic-bezier(.2, .9, .3, 1);
  display: flex; flex-direction: column;
}
.drawer.on { transform: none; }
.drawer-head {
  position: relative;
  padding: 28px 30px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  overflow: hidden;
}
.drawer-head .glow { position: absolute; inset: 0; background: radial-gradient(420px 220px at 82% 0%, var(--cc, rgba(230,164,192,.3)), transparent 72%); opacity: .6; }
.drawer-head .x {
  position: absolute; top: 18px; right: 20px; z-index: 3;
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: 3px;
  color: var(--text-dim); cursor: pointer; font-size: 16px;
}
.drawer-head .x:hover { color: #fff; background: rgba(230, 164, 192, .2); }
.drawer-head .inner { position: relative; z-index: 2; display: flex; gap: 20px; align-items: flex-end; }
.drawer-head .ava {
  width: 110px; height: 146px; flex-shrink: 0;
  border-radius: 3px; overflow: hidden;
  background: linear-gradient(150deg, #241d3d, #100e1e);
  border: 1px solid rgba(255, 255, 255, .1);
}
.drawer-head .ava img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.drawer-head .ava .ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 42px; color: rgba(255,255,255,.16); }
.drawer-head h3 { margin: 0; font-family: var(--serif); font-size: 30px; font-weight: 500; letter-spacing: .1em; color: #fff; }
.drawer-head .kana { font-size: 11.5px; letter-spacing: .26em; color: var(--text-mute); margin-top: 6px; }
.drawer-head .role { display: inline-block; margin-top: 12px; padding: 2px 11px; font-size: 10.5px; letter-spacing: .18em; border: 1px solid var(--line-2); color: var(--pink); border-radius: 2px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 26px 30px 40px; }
.drawer-body .bio { font-size: 14px; line-height: 2.15; color: #d6cfe3; white-space: pre-wrap; }
.drawer-body .prof { margin-top: 26px; border-top: 1px solid rgba(255, 255, 255, .07); }
.drawer-body .prof .row {
  display: flex; gap: 18px; padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .045);
  font-size: 13px;
}
.drawer-body .prof .row b { flex: 0 0 92px; color: var(--pink-deep); font-weight: 500; letter-spacing: .14em; }
.drawer-body .prof .row span { color: var(--text-dim); }
.drawer-body h5 {
  margin: 30px 0 14px; font-size: 11.5px; letter-spacing: .34em; color: var(--pink-deep);
  text-transform: uppercase;
}

/* 设定条目 */
.lore-list { display: grid; gap: 14px; }
.lore-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 2px solid rgba(230, 164, 192, .5);
  border-radius: 0 var(--radius) var(--radius) 0;
  overflow: hidden;
}
.lore-item .h {
  display: flex; align-items: center; gap: 12px;
  padding: 17px 22px; cursor: pointer;
  transition: background .2s;
}
.lore-item .h:hover { background: rgba(230, 164, 192, .05); }
.lore-item .h .idx { font-size: 11px; letter-spacing: .2em; color: var(--pink-deep); flex-shrink: 0; }
.lore-item .h h4 { margin: 0; flex: 1; font-family: var(--serif); font-size: 17px; font-weight: 500; letter-spacing: .12em; color: #fff; }
.lore-item .h .ar { color: var(--text-mute); transition: transform .3s; font-size: 12px; }
.lore-item.on .h .ar { transform: rotate(90deg); }
.lore-item .b {
  display: none;
  padding: 0 22px 22px 22px;
  font-size: 13.5px; line-height: 2.15; color: var(--text-dim); white-space: pre-wrap;
}
.lore-item.on .b { display: block; animation: fadeUp .35s ease both; }

/* 音乐 */
.mus-list { display: grid; gap: 10px; }
.mus-item {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .25s, background .25s;
}
.mus-item:hover { border-color: var(--line-2); background: rgba(28, 24, 50, .88); }
.mus-item.on { border-color: var(--pink); background: rgba(230, 164, 192, .08); }
.mus-play {
  width: 42px; height: 42px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(230, 164, 192, .16);
  border: 1px solid var(--line-2);
  color: var(--pink);
  cursor: pointer;
  font-size: 14px;
  transition: all .22s;
}
.mus-play:hover { background: var(--pink); color: #241321; }
.mus-info { flex: 1; min-width: 0; }
.mus-info .t { font-size: 14.5px; color: #fff; letter-spacing: .06em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mus-info .s { font-size: 11.5px; color: var(--text-mute); letter-spacing: .1em; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mus-kind {
  font-size: 10.5px; padding: 2px 9px; border-radius: 2px; letter-spacing: .14em;
  background: rgba(255, 255, 255, .06); color: var(--text-mute); flex-shrink: 0;
}
.mus-eq { display: flex; align-items: flex-end; gap: 2px; height: 18px; flex-shrink: 0; }
.mus-eq i { width: 2px; background: var(--pink); border-radius: 1px; animation: eqBounce .9s ease-in-out infinite; }
.mus-eq i:nth-child(1) { height: 40%; animation-delay: 0s; }
.mus-eq i:nth-child(2) { height: 80%; animation-delay: .15s; }
.mus-eq i:nth-child(3) { height: 55%; animation-delay: .3s; }
.mus-eq i:nth-child(4) { height: 95%; animation-delay: .45s; }
@keyframes eqBounce { 0%, 100% { transform: scaleY(.4); } 50% { transform: scaleY(1); } }

/* ══════════ Toast / 载入 ══════════ */

.toast-host {
  position: fixed; top: 80px; left: 50%; transform: translateX(-50%);
  z-index: 5000; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  padding: 11px 22px;
  background: rgba(18, 15, 34, .96);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--text);
  box-shadow: 0 14px 44px rgba(0, 0, 0, .6);
  animation: toastIn .3s cubic-bezier(.2, .9, .3, 1) both;
  max-width: 76vw;
}
.toast.err { border-color: rgba(230, 120, 130, .55); color: #f4b0b6; }
.toast.ok { border-color: rgba(140, 210, 160, .5); color: #a8dfbc; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

.spinner {
  width: 30px; height: 30px; margin: 40px auto;
  border: 2px solid rgba(230, 164, 192, .18);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════ 滚动动效 ══════════ */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.9,.3,1), transform .8s cubic-bezier(.2,.9,.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* ══════════ 响应式 ══════════ */

@media (max-width: 1080px) {
  .modes { grid-template-columns: 1fr; }
  .hero-sprite { opacity: .5; right: -8%; height: 74vh; }
}
@media (max-width: 760px) {
  :root { --nav-h: 56px; }
  .wrap, .hero-inner, .hero-meta { width: calc(100% - 32px); }
  .site-nav { padding: 0 16px; gap: 12px; }
  .brand small { display: none; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(9, 8, 18, .985);
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
    display: none;
  }
  .nav-links.open { display: flex; animation: fadeUp .28s ease both; }
  .nav-links a { padding: 14px 22px; border-radius: 0; }
  .nav-links a::after { display: none; }
  .nav-toggle { display: inline-flex; }
  .hero-title { font-size: 62px; }
  .hero-sub { letter-spacing: .28em; }
  .hero-sprite { display: none; }
  .sec { padding: 54px 0; }
  .sec-head h2 { font-size: 23px; }
  .lb-nav { width: 42px; height: 68px; font-size: 17px; }
  .lb-nav.prev { left: 6px; }
  .lb-nav.next { right: 6px; }
  .drawer-head .inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .drawer-head .ava { width: 84px; height: 112px; }
  .drawer-head h3 { font-size: 24px; }
}
