/* ============================================================
   沉浸式游戏页（参考：夜回3 / 日本一）
   纸容器 + 暗场景 + 暖光
   ============================================================ */

.immersive {
  --g-paper: #f4eee0;
  --g-ink: #23261f;
  --g-ink-2: #5c6053;
  --g-line: rgba(35, 38, 31, 0.13);
  --g-accent: #b8552f;
  --g-blue: #4a6fa5;
  --g-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --g-dur: 620ms;

  background: #0b1012;
  color: var(--g-ink);
}

.immersive .site-header,
.immersive .site-footer {
  display: none;
}

/* ---------- 背景层 ---------- */

.g-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(130% 90% at 50% -10%, #1e2f2a 0%, #121c1d 45%, #080c0e 100%);
}

.g-light {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    540px circle at var(--lx, 50%) var(--ly, 34%),
    rgba(255, 208, 146, 0.17),
    rgba(255, 208, 146, 0.05) 45%,
    transparent 66%
  );
}

.g-grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

.immersive main {
  position: relative;
  z-index: 3;
}

/* ---------- 首屏 ---------- */

.g-hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  position: relative;
  padding: 80px 24px 120px;
}

.g-hero-inner {
  text-align: center;
  position: relative;
  max-width: 720px;
}

.g-title {
  writing-mode: vertical-rl;
  text-orientation: upright;
  margin: 0 auto;
  font-size: clamp(46px, 8.5vw, 92px);
  line-height: 1.15;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: #f3ecdb;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.55);
}

.g-title em {
  font-style: normal;
  color: #e8b07a;
}

.g-hero-meta {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: rgba(243, 236, 219, 0.72);
  font-size: 13.5px;
  letter-spacing: 0.16em;
}

.g-hero-meta .status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #e8b07a;
}

.g-hero-meta .status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e8b07a;
  box-shadow: 0 0 12px #e8b07a;
}

.g-scroll {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: rgba(243, 236, 219, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.g-scroll::after {
  content: "";
  width: 1px;
  height: 40px;
  background: linear-gradient(rgba(243, 236, 219, 0.5), transparent);
  animation: g-scroll-line 2.2s ease-in-out infinite;
}

@keyframes g-scroll-line {
  0%, 100% { transform: scaleY(0.4); opacity: 0.3; transform-origin: top; }
  50% { transform: scaleY(1); opacity: 1; transform-origin: top; }
}

/* ---------- 纸容器 ---------- */

.g-paper {
  position: relative;
  z-index: 3;
  max-width: 980px;
  margin: -70px auto 0;
  background-color: var(--g-paper);
  background-image:
    linear-gradient(rgba(35, 38, 31, 0.042) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 38, 31, 0.042) 1px, transparent 1px);
  background-size: 26px 26px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 50px 120px rgba(0, 0, 0, 0.62);
  color: var(--g-ink);
}

.g-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  gap: 2px;
  padding: 12px 18px;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(244, 238, 224, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--g-line);
}

.g-nav::-webkit-scrollbar { display: none; }

.g-nav a {
  flex: none;
  padding: 7px 13px;
  font-size: 13.5px;
  color: var(--g-ink-2);
  border-radius: 3px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.g-nav a:hover {
  color: var(--g-accent);
  background: rgba(184, 85, 47, 0.07);
}

.g-nav a.home {
  color: var(--g-ink);
  font-weight: 600;
  margin-right: 8px;
}

/* ---------- 章节 ---------- */

.g-section {
  padding: 76px 58px;
  border-bottom: 1px solid var(--g-line);
}

.g-section:last-of-type { border-bottom: 0; }

.g-h2 {
  margin: 0 0 46px;
  text-align: center;
  font-size: 25px;
  letter-spacing: 0.08em;
  font-weight: 700;
  position: relative;
  padding-bottom: 18px;
}

.g-h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 132px;
  height: 3px;
  border-radius: 2px;
  background: var(--g-blue);
  opacity: 0.5;
}

.g-h2 small {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--g-ink-2);
  font-weight: 400;
  text-transform: uppercase;
}

.g-lead {
  max-width: 60ch;
  margin: 0 auto 44px;
  text-align: center;
  color: var(--g-ink-2);
  font-size: 15px;
  line-height: 1.95;
}

/* ---------- 占位图 ---------- */

.ph {
  position: relative;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(35, 38, 31, 0.26);
  background:
    repeating-linear-gradient(
      45deg,
      rgba(35, 38, 31, 0.035) 0 9px,
      transparent 9px 18px
    ),
    rgba(255, 255, 255, 0.35);
  color: rgba(35, 38, 31, 0.38);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-align: center;
  overflow: hidden;
}

.ph.dark {
  border-color: rgba(243, 236, 219, 0.22);
  background:
    repeating-linear-gradient(
      45deg,
      rgba(243, 236, 219, 0.05) 0 9px,
      transparent 9px 18px
    ),
    rgba(0, 0, 0, 0.25);
  color: rgba(243, 236, 219, 0.4);
}

/* ---------- 概览 ---------- */

.g-overview {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
}

.g-cover {
  aspect-ratio: 3 / 4;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.g-spec {
  margin: 0;
  display: grid;
  gap: 0;
}

.g-spec > div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--g-line);
}

.g-spec > div:first-child { padding-top: 0; }

.g-spec dt {
  font-size: 13px;
  color: var(--g-ink-2);
  letter-spacing: 0.06em;
}

.g-spec dt::before {
  content: "◆";
  color: var(--g-blue);
  font-size: 9px;
  margin-right: 7px;
  vertical-align: 2px;
}

.g-spec dd {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.7;
}

/* ---------- 角色 ---------- */

.g-char {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 44px;
  align-items: center;
  padding: 32px 0;
}

.g-char + .g-char {
  border-top: 1px dashed var(--g-line);
}

.g-char.flip {
  grid-template-columns: 1fr 240px;
}

.g-char.flip .g-char-art { order: 2; }

.g-char-art {
  aspect-ratio: 1 / 1;
}

.g-char-name {
  display: inline-block;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  margin: 0 0 16px;
  border: 2px solid var(--g-accent);
  color: var(--g-accent);
  transform: rotate(-1.2deg);
}

.g-char p {
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--g-ink-2);
}

.g-char p strong {
  color: var(--g-ink);
  font-weight: 600;
}

.g-char .hl {
  color: var(--g-blue);
  font-weight: 600;
}

/* ---------- 玩法 ---------- */

.g-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 34px;
}

.g-duo .ph { aspect-ratio: 16 / 10; }

.g-cap {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--g-ink-2);
  text-align: center;
  letter-spacing: 0.02em;
}

/* ---------- 影像 ---------- */

.g-player {
  aspect-ratio: 16 / 9;
  position: relative;
  background: #0d1113;
  border: 1px solid rgba(35, 38, 31, 0.2);
  display: grid;
  place-items: center;
  color: rgba(243, 236, 219, 0.45);
  font-size: 12px;
  letter-spacing: 0.22em;
}

.g-player .play {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(243, 236, 219, 0.5);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.g-player .play::after {
  content: "";
  border-left: 13px solid rgba(243, 236, 219, 0.75);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-left: 4px;
}

/* ---------- 设定热区 ---------- */

.g-hotspot {
  aspect-ratio: 16 / 9;
  position: relative;
}

.g-dot {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(184, 85, 47, 0.8);
  background: rgba(184, 85, 47, 0.16);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  color: var(--g-accent);
  font-size: 10px;
  animation: g-pulse 2.6s ease-in-out infinite;
}

@keyframes g-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184, 85, 47, 0.35); }
  50% { box-shadow: 0 0 0 9px rgba(184, 85, 47, 0); }
}

/* ---------- 日志 ---------- */

.g-logs {
  display: grid;
  gap: 0;
}

.g-log {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 16px 4px;
  border-bottom: 1px dashed var(--g-line);
  transition: background var(--g-dur) var(--g-ease), padding-left var(--g-dur) var(--g-ease);
}

.g-log:hover {
  background: rgba(184, 85, 47, 0.05);
  padding-left: 12px;
}

.g-log time {
  flex: none;
  font-size: 12px;
  color: var(--g-ink-2);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.g-log span {
  font-size: 14.5px;
}

.g-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  font-size: 13.5px;
  color: var(--g-accent);
  border-bottom: 1px solid rgba(184, 85, 47, 0.35);
  padding-bottom: 3px;
}

/* ---------- 纸内页脚 ---------- */

.g-foot {
  padding: 34px 58px 46px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--g-ink-2);
  letter-spacing: 0.04em;
}

.g-foot a { color: var(--g-ink-2); }
.g-foot a:hover { color: var(--g-accent); }

/* ---------- 入场动效 ---------- */

.g-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity var(--g-dur) var(--g-ease),
    transform var(--g-dur) var(--g-ease);
}

.g-reveal.in {
  opacity: 1;
  transform: none;
}

.g-reveal[data-delay="1"] { transition-delay: 80ms; }
.g-reveal[data-delay="2"] { transition-delay: 160ms; }
.g-reveal[data-delay="3"] { transition-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
  .g-reveal { opacity: 1; transform: none; transition: none; }
  .g-scroll::after, .g-dot { animation: none; }
}

/* ---------- 响应式 ---------- */

@media (max-width: 820px) {
  .g-paper { margin-top: -40px; }
  .g-section { padding: 52px 24px; }
  .g-title { writing-mode: horizontal-tb; letter-spacing: 0.18em; font-size: clamp(40px, 12vw, 64px); }
  .g-hero { padding-bottom: 90px; }
  .g-overview { grid-template-columns: 1fr; gap: 30px; }
  .g-cover { max-width: 220px; margin: 0 auto; }
  .g-char, .g-char.flip { grid-template-columns: 1fr; gap: 24px; }
  .g-char.flip .g-char-art { order: 0; }
  .g-char-art { max-width: 220px; margin: 0 auto; }
  .g-duo { grid-template-columns: 1fr; }
  .g-foot { padding: 28px 24px 40px; flex-direction: column; }
  .g-spec > div { grid-template-columns: 82px 1fr; }
  .g-log { flex-direction: column; gap: 4px; }
}
