/* ============================================================
   narcissu 3rd — 7F  展示站样式
   设计语言取自游戏本体: 白色淡入 / 明朝体 / 细线 / 章节字卡
   ============================================================ */

:root {
  --paper: #f6f5f1;
  --paper-2: #efeee8;
  --ink: #26262a;
  --ink-2: #4c4c52;
  --dim: #85858c;
  --line: rgba(38, 38, 42, .14);
  --narcissus: #c9b23a;
  --narcissus-soft: #e4d98b;
  --leaf: #9db89a;
  --dark: #121216;
  --dark-2: #1a1a20;
  --dark-line: rgba(255, 255, 255, .16);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN",
           "Yu Mincho", "Hiragino Mincho ProN", "SimSun", "STSong", serif;
  --sans: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 2.15;
  letter-spacing: .04em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--narcissus-soft); color: var(--ink); }

img { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------- 通用布局 ---------- */
.wrap { width: min(880px, 92vw); margin: 0 auto; }
.wrap-wide { width: min(1080px, 94vw); margin: 0 auto; }

section { position: relative; }

.en {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 400;
}

.dark .en { color: rgba(255,255,255,.42); }

/* ---------- 页首小导航 ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
  font-size: 12.5px; letter-spacing: .18em;
  color: var(--ink-2);
  background: linear-gradient(to bottom, rgba(246,245,241,.92), rgba(246,245,241,0));
  pointer-events: none;
  transition: opacity .6s;
}
.topbar a { pointer-events: auto; text-decoration: none; }
.topbar .logo {
  display: flex; align-items: baseline; gap: 12px;
}
.topbar .logo b { font-weight: 600; letter-spacing: .3em; }
.topbar .logo i { font-style: normal; color: var(--dim); font-size: 11px; }
.topbar .crumbs { display: flex; gap: 18px; }
.topbar .crumbs a { opacity: .72; transition: opacity .3s; }
.topbar .crumbs a:hover { opacity: 1; }
.topbar.on-dark {
  color: rgba(255,255,255,.82);
  background: linear-gradient(to bottom, rgba(18,18,22,.7), rgba(18,18,22,0));
}

/* ---------- 右侧章节圆点 ---------- */
.dots {
  position: fixed; right: 18px; top: 50%; transform: translateY(-50%);
  z-index: 55; display: flex; flex-direction: column; gap: 14px;
}
.dots a {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(38,38,42,.22);
  position: relative; transition: background .3s, transform .3s;
}
.dots a:hover { transform: scale(1.4); }
.dots a.act { background: var(--narcissus); transform: scale(1.4); }
.dots a span {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  white-space: nowrap; font-size: 11px; letter-spacing: .2em;
  color: var(--ink-2); background: rgba(246,245,241,.9);
  padding: 2px 10px; border: 1px solid var(--line);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.dots a:hover span, .dots a.act span { opacity: 1; }
.dots.on-dark a { background: rgba(255,255,255,.25); }
.dots.on-dark a.act { background: var(--narcissus-soft); }
.dots.on-dark a span {
  color: rgba(255,255,255,.85);
  background: rgba(18,18,22,.88); border-color: var(--dark-line);
}

/* ---------- 启动画面 ---------- */
#boot {
  position: fixed; inset: 0; z-index: 100;
  background: #060608;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: opacity 1.4s ease;
}
#boot.gone { opacity: 0; pointer-events: none; }
#boot .boot-inner { text-align: center; }
#boot .boot-type {
  color: rgba(255,255,255,.66);
  font-size: 13px; letter-spacing: .5em;
  min-height: 1.6em;
  margin-bottom: 46px;
}
#boot .boot-type::after {
  content: "▌"; margin-left: 2px; animation: caret 1s steps(1) infinite;
  color: rgba(255,255,255,.4);
}
@keyframes caret { 50% { opacity: 0; } }
#boot .boot-card {
  opacity: 0; transform: scale(.985);
  transition: opacity 1.6s ease, transform 1.6s ease;
  margin: 0 auto; width: min(420px, 74vw);
  box-shadow: 0 18px 70px rgba(0,0,0,.55);
}
#boot .boot-card.show { opacity: 1; transform: none; }
#boot .boot-start {
  margin-top: 46px;
  color: rgba(255,255,255,.5);
  font-size: 12px; letter-spacing: .4em;
  opacity: 0; transition: opacity 1.2s;
  animation: breathe 2.6s ease-in-out infinite;
}
#boot .boot-start.show { opacity: 1; }
@keyframes breathe { 50% { opacity: .35; } }
#boot .boot-note {
  position: absolute; bottom: 22px; left: 0; right: 0;
  text-align: center; color: rgba(255,255,255,.24);
  font-size: 10.5px; letter-spacing: .3em;
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  background:
    radial-gradient(1200px 600px at 50% 30%, #ffffff 0%, var(--paper) 70%);
  padding: 90px 20px 150px;
}
.hero .hero-img {
  width: min(560px, 82vw);
  box-shadow: 0 24px 80px rgba(38,38,42,.14);
}
.hero .hero-title {
  margin-top: 44px;
  font-size: clamp(26px, 4.4vw, 40px);
  letter-spacing: .5em; text-indent: .5em;
  font-weight: 500;
}
.hero .hero-sub { margin-top: 14px; color: var(--ink-2); font-size: 14px; letter-spacing: .3em; }
.hero .hero-meta { margin-top: 34px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.hero .hero-scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: var(--dim); font-size: 11px; letter-spacing: .4em;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hero .hero-scroll::after {
  content: ""; width: 1px; height: 44px;
  background: linear-gradient(to bottom, var(--dim), transparent);
  animation: drip 2.2s ease-in-out infinite;
}
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; }
                  55% { transform: scaleY(1); transform-origin: top; }
                  100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- 章节字卡(横向窄条) ---------- */
.cardstrip {
  display: block; width: 100%;
  max-height: 46vh; object-fit: cover;
}
.cardstrip-box { position: relative; background: var(--dark); }
.cardstrip-box.light { background: #fff; }
.cardstrip-box .strip-cap {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  color: rgba(255,255,255,.55); font-size: 10.5px; letter-spacing: .4em;
  font-family: var(--sans);
  white-space: nowrap;
}
.cardstrip-box.light .strip-cap { color: rgba(0,0,0,.45); }

/* ---------- 章节标题 ---------- */
.chap-head { text-align: center; padding: 110px 20px 30px; }
.chap-head .no { color: var(--narcissus); letter-spacing: .5em; font-size: 12px; text-indent: .5em; }
.chap-head h2 {
  margin-top: 18px;
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 500; letter-spacing: .3em; text-indent: .3em;
}
.chap-head .rule {
  width: 340px; max-width: 60vw; height: 1px;
  background: var(--line); margin: 30px auto 0; position: relative;
}
.chap-head .rule::after {
  content: ""; position: absolute; left: 50%; top: -2.5px;
  width: 6px; height: 6px; transform: translateX(-50%) rotate(45deg);
  background: var(--narcissus);
}
.chap-head .chap-note { margin-top: 26px; color: var(--dim); font-size: 13px; letter-spacing: .18em; }

/* ---------- 正文段落 ---------- */
.prose { padding: 34px 0 10px; }
.prose p { margin: 0 0 1.6em; text-align: justify; }
.prose p.indent { text-indent: 2em; }
.prose .lead {
  font-size: 17px; line-height: 2.3; color: var(--ink-2);
}

/* 逐行淡入 (VN 演出) */
.lines .ln { opacity: 0; transform: translateY(10px); transition: opacity 1.1s ease, transform 1.1s ease; }
.lines.in .ln { opacity: 1; transform: none; }

/* ---------- 引文块 ---------- */
.quote {
  margin: 56px auto; padding: 0 24px;
  text-align: center;
}
.quote q {
  quotes: none;
  display: inline; font-size: clamp(17px, 2.4vw, 21px);
  line-height: 2.4; color: var(--ink-2);
}
.quote .who {
  display: block; margin-top: 14px;
  color: var(--dim); font-size: 12px; letter-spacing: .34em;
}
.quote .who::before { content: "――"; }
.dark .quote q { color: rgba(255,255,255,.78); }
.dark .quote .who { color: rgba(255,255,255,.4); }

/* ---------- 暗色幕间 ---------- */
.dark {
  background: var(--dark); color: rgba(255,255,255,.88);
}
.dark .chap-head h2 { color: #fff; }
.dark .chap-head .rule { background: var(--dark-line); }
.dark .prose p { color: rgba(255,255,255,.78); }

/* ---------- 场景块 (图+文) ---------- */
.scene {
  display: grid; grid-template-columns: 1fr; gap: 34px;
  align-items: center;
  padding: 44px 0;
}
@media (min-width: 960px) {
  .scene { grid-template-columns: 7fr 5fr; }
  .scene.rev { grid-template-columns: 5fr 7fr; }
  .scene.rev .scene-fig { order: 2; }
  .scene.rev .scene-txt { order: 1; }
}
.scene-fig { position: relative; }
.scene-fig img { width: 100%; box-shadow: 0 14px 44px rgba(38,38,42,.16); }
.scene-fig .tag {
  position: absolute; top: 10px; left: 10px;
  font-family: var(--sans); font-size: 10px; letter-spacing: .3em;
  color: rgba(255,255,255,.85); background: rgba(18,18,22,.55);
  padding: 4px 12px; backdrop-filter: blur(2px);
}
.scene-txt h3 {
  font-size: 17px; font-weight: 600; letter-spacing: .2em;
  margin-bottom: 16px;
}
.scene-txt h3 small {
  display: block; font-weight: 400; font-size: 11px;
  color: var(--dim); letter-spacing: .32em; margin-bottom: 6px;
}
.scene-txt p { color: var(--ink-2); font-size: 14.5px; }
.dark .scene-txt h3 { color: #fff; }
.dark .scene-txt p { color: rgba(255,255,255,.7); }

/* ---------- CG 画廊 ---------- */
.gallery {
  display: grid; gap: 26px 22px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  padding: 30px 0 20px;
}
.gallery figure { cursor: zoom-in; }
.gallery img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  box-shadow: 0 8px 26px rgba(38,38,42,.13);
  transition: transform .5s ease, box-shadow .5s ease;
}
.gallery figure:hover img { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(38,38,42,.2); }
.gallery figcaption {
  margin-top: 9px; font-size: 12px; color: var(--dim);
  letter-spacing: .12em; display: flex; justify-content: space-between; gap: 10px;
}
.gallery figcaption .no { font-family: var(--sans); font-size: 10px; letter-spacing: .22em; color: rgba(38,38,42,.4); flex: none; }

/* ---------- 拍立得 ---------- */
.polaroid-zone {
  display: flex; flex-wrap: wrap; gap: 40px; justify-content: center;
  align-items: center; padding: 50px 0;
}
.polaroid {
  background: #fff; padding: 12px 12px 46px;
  box-shadow: 0 16px 44px rgba(38,38,42,.22);
  transform: rotate(-2.4deg);
  width: min(360px, 78vw);
  transition: transform .6s ease;
  cursor: zoom-in; position: relative;
}
.polaroid:nth-child(2) { transform: rotate(1.8deg); }
.polaroid:hover { transform: rotate(0) scale(1.02); z-index: 2; }
.polaroid img { width: 100%; }
.polaroid .memo {
  position: absolute; left: 14px; bottom: 8px; right: 14px;
  font-size: 11px; color: #6a6a66; letter-spacing: .12em;
  font-family: var(--sans); line-height: 1.5; text-align: center;
}
.gallery figure.wide img { aspect-ratio: auto; object-fit: contain; background: #101014; }
.polaroid .tape {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%) rotate(-3deg);
  width: 96px; height: 22px; background: rgba(233,226,196,.75);
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}

/* ---------- 全幅图卡 ---------- */
.bleed { position: relative; overflow: hidden; }
.bleed > img {
  width: 100%; height: min(72vh, 620px); object-fit: cover;
}
.bleed .bleed-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 20px;
  background: linear-gradient(to bottom, rgba(18,18,22,.08), rgba(18,18,22,.4));
}
.bleed .bleed-text h3 {
  color: #fff; font-weight: 500;
  font-size: clamp(18px, 2.8vw, 26px);
  letter-spacing: .34em; text-indent: .34em;
  text-shadow: 0 2px 24px rgba(0,0,0,.5);
}
.bleed .bleed-text .en { color: rgba(255,255,255,.6); margin-top: 16px; }

/* ---------- 章节索引卡 ( narb_t0x 风格 ) ---------- */
.indexcards {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  padding: 26px 0;
}
.indexcards a {
  display: flex; align-items: center; justify-content: center;
  min-height: 88px;
  background: var(--dark-2); color: rgba(255,255,255,.72);
  text-decoration: none; font-size: 13px; letter-spacing: .22em;
  border: 1px solid rgba(255,255,255,.05);
  transition: background .4s, color .4s, letter-spacing .4s;
}
.indexcards a:hover {
  background: #232329; color: #fff; letter-spacing: .3em;
}
.indexcards a b { font-weight: 400; }

/* ---------- 页脚 ---------- */
footer {
  background: var(--dark); color: rgba(255,255,255,.5);
  padding: 70px 20px 90px; text-align: center;
}
footer .fin { letter-spacing: .6em; text-indent: .6em; color: #fff; font-size: 15px; }
footer .fin-en { margin-top: 12px; }
footer .foot-links { margin-top: 40px; display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; font-size: 12px; }
footer .foot-links a { color: rgba(255,255,255,.55); text-decoration: none; border-bottom: 1px solid transparent; }
footer .foot-links a:hover { color: #fff; border-color: rgba(255,255,255,.4); }
footer .foot-note { margin-top: 34px; font-size: 11px; letter-spacing: .16em; color: rgba(255,255,255,.3); line-height: 2.2; }

/* ---------- 音频控件 ---------- */
.audio-widget {
  position: fixed; right: 20px; bottom: 20px; z-index: 70;
  display: flex; align-items: center; gap: 12px;
  background: rgba(18,18,22,.82); color: rgba(255,255,255,.8);
  padding: 10px 16px; border: 1px solid rgba(255,255,255,.09);
  backdrop-filter: blur(6px);
  font-family: var(--sans); font-size: 11px; letter-spacing: .18em;
  cursor: pointer; user-select: none;
  transition: opacity .4s;
  opacity: 0;
}
.audio-widget.ready { opacity: 1; }
.audio-widget .aw-icon { width: 14px; display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.audio-widget .aw-icon i {
  width: 2px; background: var(--narcissus-soft); height: 30%;
  animation: eq 1s ease-in-out infinite; animation-play-state: paused;
}
.audio-widget .aw-icon i:nth-child(2) { animation-delay: .2s; }
.audio-widget .aw-icon i:nth-child(3) { animation-delay: .4s; }
.audio-widget .aw-icon i:nth-child(4) { animation-delay: .1s; }
.audio-widget.playing .aw-icon i { animation-play-state: running; }
@keyframes eq { 0%,100% { height: 25%; } 50% { height: 100%; } }
.audio-widget .aw-track { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }
.audio-widget.muted .aw-icon i { animation: none; height: 20%; background: rgba(255,255,255,.35); }

/* ---------- 灯箱 ---------- */
#lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(8,8,10,.94);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .4s;
}
#lightbox.open { opacity: 1; pointer-events: auto; }
#lightbox figure {
  max-width: min(920px, 92vw); max-height: 88vh;
  display: flex; flex-direction: column; gap: 14px;
}
#lightbox img {
  max-width: 100%; max-height: 78vh; object-fit: contain;
  box-shadow: 0 30px 90px rgba(0,0,0,.6);
}
#lightbox figcaption {
  text-align: center; color: rgba(255,255,255,.66);
  font-size: 12.5px; letter-spacing: .2em;
}
#lightbox .lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-family: var(--sans); color: rgba(255,255,255,.6);
  font-size: 26px; padding: 30px 24px; cursor: pointer; user-select: none;
  transition: color .3s;
}
#lightbox .lb-nav:hover { color: #fff; }
#lightbox .lb-prev { left: 6px; }
#lightbox .lb-next { right: 6px; }
#lightbox .lb-close {
  position: absolute; top: 18px; right: 26px;
  color: rgba(255,255,255,.55); font-size: 22px; cursor: pointer;
  font-family: var(--sans);
}
#lightbox .lb-close:hover { color: #fff; }

/* ---------- 花瓣画布 ---------- */
#petals { position: fixed; inset: 0; z-index: 40; pointer-events: none; }

/* ---------- 滚动浮现 ---------- */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 1.2s ease, transform 1.2s ease; }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- 子页页头 ---------- */
.subhero {
  padding: 150px 20px 70px; text-align: center;
  background:
    linear-gradient(rgba(246,245,241,.55), var(--paper) 90%),
    var(--paper-2);
}
.subhero .en { margin-bottom: 20px; }
.subhero h1 {
  font-size: clamp(24px, 4vw, 36px);
  letter-spacing: .34em; text-indent: .34em; font-weight: 500;
}
.subhero .sub-jp { margin-top: 16px; color: var(--ink-2); letter-spacing: .26em; font-size: 14px; }
.subhero .rule { width: 300px; max-width: 55vw; height: 1px; background: var(--line); margin: 34px auto 0; position: relative; }
.subhero .rule::after {
  content: ""; position: absolute; left: 50%; top: -2.5px;
  width: 6px; height: 6px; transform: translateX(-50%) rotate(45deg);
  background: var(--narcissus);
}

/* 上一章 / 下一章 */
.pn-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line); border-top: 1px solid var(--line);
}
.pn-nav a {
  background: var(--paper); padding: 34px 20px; text-decoration: none;
  display: flex; flex-direction: column; gap: 8px;
  transition: background .4s;
}
.pn-nav a:hover { background: #fff; }
.pn-nav a .pn-label { font-size: 10.5px; letter-spacing: .34em; color: var(--dim); font-family: var(--sans); }
.pn-nav a .pn-title { font-size: 14.5px; letter-spacing: .2em; color: var(--ink-2); }
.pn-nav a.next { text-align: right; }

/* ---------- 图鉴筛选 ---------- */
.gal-filter {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  padding: 10px 0 30px;
}
.gal-filter button {
  font-family: var(--serif); font-size: 12.5px; letter-spacing: .24em;
  padding: 8px 20px; background: transparent; color: var(--ink-2);
  border: 1px solid var(--line); cursor: pointer; transition: all .35s;
}
.gal-filter button:hover { border-color: var(--ink-2); }
.gal-filter button.act { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- 资料页表格 ---------- */
.spec-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 13.5px; }
.spec-table th, .spec-table td {
  border-bottom: 1px solid var(--line); padding: 12px 10px;
  text-align: left; vertical-align: top;
}
.spec-table th {
  font-weight: 500; color: var(--ink); white-space: nowrap;
  letter-spacing: .14em; width: 9em;
}
.spec-table td { color: var(--ink-2); }
.spec-table tr:hover td { background: rgba(255,255,255,.5); }
.dark .spec-table th, .dark .spec-table td { border-color: var(--dark-line); }
.dark .spec-table td { color: rgba(255,255,255,.66); }

/* staff 卡 */
.staffcards {
  display: flex; flex-direction: column; gap: 34px; align-items: center;
  padding: 40px 0;
}
.staffcards .st {
  text-align: center;
}
.staffcards .st .role {
  font-size: 12px; letter-spacing: .4em; text-indent: .4em;
  color: rgba(255,255,255,.5); padding-bottom: 10px;
  border-bottom: 1px solid var(--dark-line); margin-bottom: 12px;
}
.staffcards .st .name { font-size: 16px; letter-spacing: .3em; color: #fff; }
.staffcards .st .name small { display: block; font-size: 11px; color: rgba(255,255,255,.45); margin-top: 6px; letter-spacing: .2em; }

/* 代码/路径样式 */
code, .mono {
  font-family: Consolas, "Courier New", monospace;
  font-size: .92em; letter-spacing: 0;
  background: rgba(38,38,42,.06); padding: 1px 6px;
}
.dark code { background: rgba(255,255,255,.08); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  [data-reveal], .lines .ln { opacity: 1 !important; transform: none !important; }
}
