/* ==========================================================================
   DREAD HUNGER · ARCTIC EXPEDITION & PARCHMENT LOGBOOK
   Cinematic Ocean Immersion + iOS Liquid Glass UI + Antique Vellum Scroll
   ========================================================================== */

:root {
  /* Ocean & Sky Palette */
  --ocean-ink: #0B2136;
  --ocean-ink-soft: rgba(11, 33, 54, 0.72);
  --ocean-deep: #04131E;
  --ocean-abyss: #030D16;
  --ice-cyan: #7FD4E6;
  --sunset-gold: #F3B562;

  /* Antique Parchment Logbook Palette */
  --vellum-base: #EDE1C9;
  --vellum-light: #F5ECD8;
  --vellum-edge: #D7C29E;
  --vellum-shadow: #B99D72;
  --ink-sepia: #261B12;
  --ink-sepia-soft: #544132;
  --ink-sepia-muted: #7C6550;
  --brass-gold: #9A7437;
  --brass-line: rgba(122, 88, 39, 0.28);
  --wax-crimson: #8B2228;

  /* iOS 26 Liquid Glass Tokens */
  --glass-bg: rgba(255, 255, 255, 0.22);
  --glass-bg-strong: rgba(255, 255, 255, 0.36);
  --glass-border: rgba(255, 255, 255, 0.48);
  --glass-border-bottom: rgba(255, 255, 255, 0.18);
  --glass-shadow:
    0 10px 32px rgba(6, 20, 35, 0.14),
    inset 0 1px 0.5px rgba(255, 255, 255, 0.65),
    inset 0 -1px 0.5px rgba(255, 255, 255, 0.16);

  --glass-dark-bg: rgba(8, 25, 40, 0.34);
  --glass-dark-border: rgba(180, 228, 245, 0.26);
  --glass-dark-shadow:
    0 12px 36px rgba(0, 8, 18, 0.36),
    inset 0 1px 0.5px rgba(210, 242, 255, 0.28),
    inset 0 -1px 0.5px rgba(255, 255, 255, 0.08);

  --glass-parchment-bg: rgba(252, 246, 234, 0.54);
  --glass-parchment-border: rgba(255, 252, 244, 0.78);
  --glass-parchment-shadow:
    0 14px 36px rgba(48, 30, 12, 0.14),
    0 1px 2px rgba(48, 30, 12, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.85),
    inset 0 -1px 1px rgba(154, 116, 55, 0.18);

  /* Typography */
  --font-serif-en: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --font-serif-cn: "Noto Serif SC", "Songti SC", "STSong", serif;
  --font-sans: "Plus Jakarta Sans", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease-ios: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--ocean-abyss);
  color: var(--ocean-ink);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--ocean-abyss);
  overflow-x: clip;
  line-height: 1.65;
}

/* 桌面端启用自定义钢笔头光标时隐藏系统默认光标 */
@media (hover: hover) and (pointer: fine) {
  body.custom-nib-active,
  body.custom-nib-active a,
  body.custom-nib-active button,
  body.custom-nib-active [role="button"],
  body.custom-nib-active input {
    cursor: none !important;
  }
}

::selection {
  background: rgba(139, 34, 40, 0.85);
  color: #FAF3E6;
}

/* ==========================================================================
   CUSTOM FOUNTAIN PEN NIB CURSOR (钢笔头鼠标光标)
   ========================================================================== */
.nib-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate3d(-100px, -100px, 0);
  transition: opacity 0.25s ease;
  will-change: transform;
  filter: drop-shadow(0 3px 6px rgba(10, 18, 28, 0.34));
}

.nib-cursor.visible {
  opacity: 1;
}

.nib-cursor svg {
  width: 100%;
  height: 100%;
  display: block;
  transform-origin: 2px 2px;
  transition: transform 0.22s var(--ease-ios), filter 0.25s ease;
}

/* 悬停可交互元素时钢笔微微抬起倾斜 */
.nib-cursor.is-hover svg {
  transform: rotate(-10deg) scale(1.1);
}

/* 按下点击时钢笔落墨下压 */
.nib-cursor.is-down svg {
  transform: rotate(5deg) scale(0.92) translate(1px, 2px);
}

/* 海洋深水段自动提亮金属反光 */
.nib-cursor.is-light-mode {
  filter: drop-shadow(0 2px 10px rgba(160, 226, 255, 0.45));
}

/* 羊皮纸区域落墨水波点 */
.ink-bloom {
  position: fixed;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9990;
  transform: translate(-50%, -50%) scale(0.2);
  background: radial-gradient(circle, rgba(42, 26, 16, 0.42) 0%, rgba(139, 34, 40, 0.22) 55%, rgba(42, 26, 16, 0) 100%);
  animation: inkBloomAnim 0.65s var(--ease-ios) forwards;
}

.ink-bloom.is-water {
  background: radial-gradient(circle, rgba(190, 240, 255, 0.45) 0%, rgba(127, 212, 230, 0.16) 60%, transparent 100%);
}

@keyframes inkBloomAnim {
  0% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.25);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(3.1);
  }
}

/* ==========================================================================
   FIXED REAL-TIME CINEMA OCEAN CANVAS STAGE
   ========================================================================== */
.ocean-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 1;
  overflow: hidden;
  background: linear-gradient(180deg, #1E669C 0%, #6FA7C7 52%, #0B2C3E 100%);
  pointer-events: none;
}

.ocean-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.08);
  will-change: transform, opacity;
  z-index: 1;
}

.ocean-video.is-active {
  opacity: 1;
  z-index: 1;
}

.ocean-video.is-crossfade-top {
  z-index: 2;
}

.ocean-dusk-veil {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: rgba(3, 18, 28, 0);
  pointer-events: none;
}

/* 极细腻的电影胶片边缘微暗角（轻柔和缓，绝不抢实拍质感） */
.cinema-vignette {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(12, 34, 58, 0.16) 0%, transparent 24%, transparent 78%, rgba(4, 18, 30, 0.32) 100%);
}

/* ==========================================================================
   IOS LIQUID GLASS TOP NAVIGATION BAR
   ========================================================================== */
.top-chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  transition: transform 0.45s var(--ease-ios);
}

/* 顶部极细通告条（还原参考视频顶部的优雅细栏） */
.announce-strip {
  width: 100%;
  padding: 7px 16px;
  text-align: center;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(14, 42, 68, 0.22);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  transition: max-height 0.4s var(--ease-ios), opacity 0.35s ease, padding 0.4s var(--ease-ios);
  max-height: 36px;
  overflow: hidden;
}

.announce-strip a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body.is-scrolled .announce-strip {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom-color: transparent;
}

/* 主导航条容器 */
.nav-wrap {
  max-width: 1320px;
  margin: 18px auto 0;
  padding: 0 28px;
  transition: margin-top 0.4s var(--ease-ios);
}

body.is-scrolled .nav-wrap {
  margin-top: 12px;
}

/* iOS 26 Liquid Glass Pill Navigation */
.liquid-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 14px 10px 22px;
  border-radius: 999px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid var(--glass-border);
  border-bottom-color: var(--glass-border-bottom);
  box-shadow: var(--glass-shadow);
  transition:
    background 0.45s var(--ease-ios),
    border-color 0.45s var(--ease-ios),
    box-shadow 0.45s var(--ease-ios),
    color 0.45s var(--ease-ios);
}

/* 水下深海态毛玻璃 */
body[data-theme="underwater"] .liquid-nav {
  background: var(--glass-dark-bg);
  border-color: var(--glass-dark-border);
  box-shadow: var(--glass-dark-shadow);
}

/* 羊皮纸日志态暖毛玻璃 */
body[data-theme="parchment"] .liquid-nav {
  background: var(--glass-parchment-bg);
  border-color: var(--glass-parchment-border);
  box-shadow: var(--glass-parchment-shadow);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ocean-ink);
  transition: color 0.35s ease;
}

body[data-theme="underwater"] .brand-mark {
  color: rgba(235, 248, 255, 0.96);
}

body[data-theme="parchment"] .brand-mark {
  color: var(--ink-sepia);
}

.brand-wave-icon {
  width: 28px;
  height: 20px;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-links a {
  display: inline-block;
  padding: 7px 15px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ocean-ink);
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.34);
}

body[data-theme="underwater"] .nav-links a {
  color: rgba(226, 244, 255, 0.88);
}

body[data-theme="underwater"] .nav-links a:hover {
  background: rgba(160, 224, 248, 0.16);
  color: #FFFFFF;
}

body[data-theme="parchment"] .nav-links a {
  color: var(--ink-sepia-soft);
}

body[data-theme="parchment"] .nav-links a:hover,
body[data-theme="parchment"] .nav-links a.active {
  background: rgba(154, 116, 55, 0.14);
  color: var(--ink-sepia);
}

/* 右侧玻璃胶囊 CTA */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ocean-ink);
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(11, 33, 54, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: all 0.28s var(--ease-ios);
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--ocean-ink);
  color: #FFFFFF;
  border-color: var(--ocean-ink);
  transform: translateY(-1px);
}

body[data-theme="underwater"] .nav-cta {
  color: #EAF8FF;
  background: rgba(127, 212, 230, 0.16);
  border-color: rgba(180, 232, 248, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

body[data-theme="underwater"] .nav-cta:hover {
  background: rgba(220, 246, 255, 0.92);
  color: #062134;
}

body[data-theme="parchment"] .nav-cta {
  color: var(--ink-sepia);
  background: rgba(255, 250, 240, 0.7);
  border-color: rgba(122, 88, 39, 0.34);
}

body[data-theme="parchment"] .nav-cta:hover {
  background: var(--ink-sepia);
  color: #F7EEDB;
  border-color: var(--ink-sepia);
}

/* ==========================================================================
   SCROLL-DRIVEN OCEAN CINEMA TRACK (220vh 沉浸式浏览轨道，视频持续流畅播放)
   ========================================================================== */
.dive-track {
  position: relative;
  z-index: 10;
  height: 220vh;
  pointer-events: none;
}

/* 第一屏 Hero UI（大字下移落入视觉焦点，小字与按钮保持原位与远征船和谐并列） */
.hero-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(235px, 29.5vh, 320px) 5.5vw 30px;
  pointer-events: none;
  will-change: transform, opacity;
}

.hero-content {
  max-width: 680px;
  margin-top: 0;
  pointer-events: auto;
}

.hero-headline {
  font-family: var(--font-serif-en);
  font-size: clamp(2.8rem, 5.2vw, 4.65rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: #07192C;
  margin-bottom: clamp(40px, 6.5vh, 75px);
  text-shadow: 0 2px 26px rgba(255, 255, 255, 0.44);
  transition: color 0.32s ease, text-shadow 0.32s ease;
}

.hero-sub {
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.78;
  color: rgba(7, 25, 44, 0.92);
  text-shadow: 0 1px 18px rgba(255, 252, 244, 0.58);
  margin-bottom: 28px;
  max-width: 500px;
  transition: color 0.32s ease, text-shadow 0.32s ease;
}

/* 当持续播放的视频自动潜入深蓝水下段时，首屏文字与按钮丝滑自适应为冰白高光，始终清晰高级 */
.hero-overlay.is-video-underwater .hero-headline {
  color: rgba(242, 250, 255, 0.96);
  text-shadow: 0 4px 28px rgba(0, 18, 34, 0.48);
}

.hero-overlay.is-video-underwater .hero-headline-cn {
  color: rgba(214, 242, 255, 0.92);
}

.hero-overlay.is-video-underwater .hero-sub {
  color: rgba(206, 236, 250, 0.88);
  text-shadow: 0 2px 16px rgba(0, 16, 30, 0.5);
}

.hero-overlay.is-video-underwater .btn-ocean-primary {
  background: rgba(240, 250, 255, 0.92);
  color: #072236;
  border-color: rgba(255, 255, 255, 0.8);
}

.hero-overlay.is-video-underwater .btn-ocean-glass {
  background: rgba(10, 38, 58, 0.36);
  color: #EAF8FF;
  border-color: rgba(168, 228, 248, 0.42);
}

.hero-overlay.is-video-underwater .btn-glass-circle {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.36);
  color: #FFFFFF;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.btn-ocean-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 29, 48, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #FFFFFF;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(7, 22, 38, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.28s var(--ease-ios), background 0.28s ease;
}

.btn-ocean-primary:hover {
  transform: translateY(-2px);
  background: rgba(15, 45, 72, 0.96);
}

.btn-ocean-glass {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 18px 7px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  color: var(--ocean-ink);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 20px rgba(8, 26, 44, 0.1);
  transition: all 0.28s var(--ease-ios);
}

.btn-ocean-glass:hover {
  background: rgba(255, 255, 255, 0.46);
  transform: translateY(-1px);
}

.btn-glass-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 33, 54, 0.1);
  border: 1px solid rgba(11, 33, 54, 0.22);
  font-size: 0.72rem;
}

/* 底部 LIVE AT SEA & SCROLL TO EXPLORE */
.hero-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  pointer-events: auto;
}

.live-control {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px 6px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(8, 24, 38, 0.28);
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: background 0.25s ease;
}

.live-control:hover {
  background: rgba(8, 24, 38, 0.44);
}

.live-pause-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(8, 24, 38, 0.24);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.scroll-arrow {
  display: inline-block;
  animation: gentleBounce 1.9s ease-in-out infinite;
}

@keyframes gentleBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ==========================================================================
   UNDERWATER FLOATING HUD & SUBMERGED STORY BEAT
   ========================================================================== */
.underwater-hud {
  position: fixed;
  inset: 0;
  z-index: 18;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 24px 24px 16vh;
  pointer-events: none;
  opacity: 0;
  will-change: opacity, transform;
}

.depth-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 18px;
  border-radius: 999px;
  background: rgba(7, 28, 44, 0.38);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(155, 224, 246, 0.34);
  box-shadow: var(--glass-dark-shadow);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  color: #BEEBFF;
  margin-bottom: 22px;
}

.depth-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7CE3F8;
  box-shadow: 0 0 12px #7CE3F8;
}

.underwater-quote {
  max-width: 840px;
  text-align: center;
  color: rgba(236, 248, 255, 0.94);
  text-shadow: 0 6px 32px rgba(0, 12, 24, 0.58);
}

.underwater-quote h2 {
  font-family: var(--font-serif-cn);
  font-size: clamp(1.55rem, 3vw, 2.55rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-wrap: balance;
  margin-bottom: 14px;
}

.underwater-quote p {
  font-size: 0.98rem;
  color: rgba(198, 232, 246, 0.84);
  letter-spacing: 0.06em;
}

/* 右侧极简下潜深度标尺 */
.depth-rail {
  position: fixed;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.depth-rail-track {
  width: 3px;
  height: 132px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.depth-rail-fill {
  width: 100%;
  height: 0%;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFE1A6 0%, #7CE3F8 55%, #D9B77B 100%);
}

.depth-rail-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.82);
  writing-mode: vertical-rl;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

body[data-theme="parchment"] .depth-rail {
  opacity: 0;
}

/* ==========================================================================
   ANTIQUE PARCHMENT CAPTAIN'S LOGBOOK SECTION (羊皮纸卷航海日志)
   ========================================================================== */
.parchment-transition-veil {
  position: relative;
  z-index: 25;
  height: 220px;
  margin-top: -220px;
  background: linear-gradient(
    180deg,
    rgba(4, 24, 38, 0) 0%,
    rgba(4, 22, 34, 0.72) 48%,
    rgba(24, 19, 14, 0.96) 80%,
    #231A12 100%
  );
  pointer-events: none;
}

.logbook-wrapper {
  position: relative;
  z-index: 30;
  background: #231A12;
  padding: 28px 0 64px;
  scroll-margin-top: 76px;
  overflow-x: clip;
}

/* 羊皮纸上下卷轴圆柱装饰 */
.scroll-roller {
  width: calc(100% - 28px);
  max-width: 1240px;
  height: 26px;
  margin: 0 auto;
  border-radius: 14px;
  background:
    linear-gradient(180deg,
      #5E452A 0%,
      #B8925C 18%,
      #E3C899 38%,
      #A47E49 72%,
      #4A351E 100%
    );
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.55),
    inset 0 1px 2px rgba(255, 244, 220, 0.55);
  position: relative;
  z-index: 4;
}

.scroll-roller::before,
.scroll-roller::after {
  content: "";
  position: absolute;
  top: -5px;
  width: 28px;
  height: 36px;
  border-radius: 6px;
  background: linear-gradient(180deg, #3D2B18 0%, #8E6A39 40%, #312112 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.scroll-roller::before { left: -12px; }
.scroll-roller::after { right: -12px; }

/* 羊皮纸主体画卷 */
.parchment-sheet {
  max-width: 1188px;
  margin: -10px auto -10px;
  position: relative;
  z-index: 3;
  color: var(--ink-sepia);
  background-color: var(--vellum-base);
  background-image:
    /* 外围岁月泛黄晕染 */
    radial-gradient(ellipse at 50% 45%, rgba(250, 242, 224, 0.62) 0%, rgba(227, 208, 174, 0.36) 62%, rgba(154, 121, 78, 0.54) 100%),
    /* 纸张局部自然色差与陈化纹理 */
    radial-gradient(circle at 14% 18%, rgba(160, 122, 74, 0.14) 0%, transparent 42%),
    radial-gradient(circle at 86% 76%, rgba(140, 102, 58, 0.16) 0%, transparent 46%),
    /* 高清羊皮纸底图（若存在） */
    var(--parchment-url, none);
  background-size: cover, cover, cover, 100% auto;
  background-position: center;
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.68),
    inset 0 28px 34px -18px rgba(56, 36, 16, 0.42),
    inset 0 -28px 34px -18px rgba(56, 36, 16, 0.42),
    inset 26px 0 40px -20px rgba(102, 72, 36, 0.35),
    inset -26px 0 40px -20px rgba(102, 72, 36, 0.35);
  padding: 64px 56px 76px;
  overflow: clip;
}

/* 复古纤维噪点与极淡海图罗盘水印 */
.parchment-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.26'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  z-index: 0;
}

.parchment-compass-watermark {
  position: absolute;
  right: -90px;
  top: 90px;
  width: 520px;
  height: 520px;
  opacity: 0.085;
  pointer-events: none;
  z-index: 0;
  color: #4A321A;
}

/* 内框维多利亚双线装饰框 */
.parchment-frame {
  position: relative;
  z-index: 2;
  border: 1px solid rgba(114, 82, 42, 0.38);
  padding: 44px 42px 48px;
}

.parchment-frame::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(114, 82, 42, 0.18);
  pointer-events: none;
}

/* 羊皮纸头部：船长日志题头 + 火漆印章 */
.logbook-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
  padding-bottom: 30px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--brass-line);
  position: relative;
}

.logbook-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass-gold);
  margin-bottom: 12px;
}

.logbook-title {
  font-family: var(--font-serif-cn);
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 700;
  color: var(--ink-sepia);
  line-height: 1.2;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.logbook-title-en {
  font-family: var(--font-serif-en);
  font-style: italic;
  font-size: 1.18rem;
  color: var(--ink-sepia-soft);
  letter-spacing: 0.04em;
}

/* 复古暗红火漆印章 */
.wax-seal {
  width: 82px;
  height: 82px;
  flex-shrink: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #B83A40 0%, #8B2228 52%, #591216 100%);
  box-shadow:
    0 8px 20px rgba(70, 16, 20, 0.36),
    inset 0 2px 5px rgba(255, 196, 196, 0.3),
    inset 0 -3px 8px rgba(34, 4, 6, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(245, 224, 190, 0.34);
  transform: rotate(-8deg);
  color: #F4DEC0;
  text-align: center;
}

.wax-seal-year {
  font-family: var(--font-serif-en);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
}

.wax-seal-sub {
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.14em;
  opacity: 0.85;
  margin-top: 3px;
}

/* ==========================================================================
   IOS LIQUID GLASS LOGBOOK NAVIGATION TABS (导页标签栏)
   ========================================================================== */
.logbook-tabs-wrap {
  position: relative;
  z-index: 40;
  margin-bottom: 38px;
  display: flex;
  justify-content: center;
}

.liquid-tab-dock {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: var(--glass-parchment-bg);
  backdrop-filter: blur(26px) saturate(190%);
  -webkit-backdrop-filter: blur(26px) saturate(190%);
  border: 1px solid var(--glass-parchment-border);
  box-shadow: var(--glass-parchment-shadow);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.liquid-tab-dock::-webkit-scrollbar {
  display: none;
}

/* 丝滑滑动的 iOS 液体玻璃高亮胶囊 */
.tab-indicator {
  position: absolute;
  top: 6px;
  left: 6px;
  height: calc(100% - 12px);
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(255, 253, 248, 0.92) 0%,
    rgba(244, 232, 208, 0.78) 100%
  );
  border: 1px solid rgba(154, 116, 55, 0.34);
  box-shadow:
    0 4px 14px rgba(56, 36, 16, 0.12),
    inset 0 1px 1px rgba(255, 255, 255, 0.95);
  transition: transform 0.38s var(--ease-ios), width 0.38s var(--ease-ios);
  z-index: 0;
  pointer-events: none;
}

.logbook-tab {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  padding: 10px 20px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-sepia-soft);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: color 0.25s ease;
}

.logbook-tab:hover {
  color: var(--ink-sepia);
}

.logbook-tab.active {
  color: var(--ink-sepia);
  font-weight: 600;
}

.tab-roman {
  font-family: var(--font-serif-en);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--brass-gold);
}

/* ==========================================================================
   LOGBOOK TAB PANELS · 3D ANTIQUE PARCHMENT PAGE-TURN ENGINE (高级羊皮纸翻页)
   ========================================================================== */
.logbook-stage {
  position: relative;
  perspective: 2200px;
  perspective-origin: 50% 240px;
  transform-style: preserve-3d;
  transition: height 0.56s var(--ease-ios);
}

.logbook-stage.is-turning {
  overflow: clip;
}

/* 翻页时扫过画面的羊皮纸折痕光影层 */
.page-turn-veil {
  position: absolute;
  inset: -10px -18px;
  pointer-events: none;
  z-index: 12;
  opacity: 0;
  will-change: transform, opacity;
  border-radius: 16px;
}

.page-turn-veil.sweep-next {
  background: linear-gradient(
    90deg,
    rgba(34, 20, 10, 0) 0%,
    rgba(34, 20, 10, 0.22) 28%,
    rgba(255, 249, 234, 0.78) 46%,
    rgba(235, 215, 178, 0.44) 55%,
    rgba(46, 28, 12, 0.28) 66%,
    rgba(34, 20, 10, 0) 100%
  );
  animation: vellumLeafNext 0.66s cubic-bezier(0.24, 0.88, 0.3, 1) forwards;
}

.page-turn-veil.sweep-prev {
  background: linear-gradient(
    90deg,
    rgba(34, 20, 10, 0) 0%,
    rgba(46, 28, 12, 0.28) 34%,
    rgba(235, 215, 178, 0.44) 45%,
    rgba(255, 249, 234, 0.78) 54%,
    rgba(34, 20, 10, 0.22) 72%,
    rgba(34, 20, 10, 0) 100%
  );
  animation: vellumLeafPrev 0.66s cubic-bezier(0.24, 0.88, 0.3, 1) forwards;
}

@keyframes vellumLeafNext {
  0% {
    opacity: 0;
    transform: translate3d(60%, 0, 48px) skewX(-7deg);
  }
  20% {
    opacity: 1;
  }
  74% {
    opacity: 0.76;
  }
  100% {
    opacity: 0;
    transform: translate3d(-64%, 0, 48px) skewX(5deg);
  }
}

@keyframes vellumLeafPrev {
  0% {
    opacity: 0;
    transform: translate3d(-60%, 0, 48px) skewX(7deg);
  }
  20% {
    opacity: 1;
  }
  74% {
    opacity: 0.76;
  }
  100% {
    opacity: 0;
    transform: translate3d(64%, 0, 48px) skewX(-5deg);
  }
}

.tab-panel {
  display: none;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform, opacity;
}

.tab-panel.active {
  display: block;
  position: relative;
  z-index: 2;
}

.tab-panel.is-leaving {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  pointer-events: none;
}

/* 向前翻页（右往左翻，以左书脊为轴：先掀旧页、再由折痕光影过渡铺开新页，杜绝文字重影） */
.tab-panel.is-leaving-next {
  transform-origin: left center;
  animation: pageFlipOutNext 0.36s cubic-bezier(0.36, 0.04, 0.62, 0.96) forwards;
}

.tab-panel.is-entering-next {
  transform-origin: left center;
  animation: pageFlipInNext 0.66s var(--ease-ios) forwards;
}

/* 向后翻页（左往右翻，以右边缘为轴） */
.tab-panel.is-leaving-prev {
  transform-origin: right center;
  animation: pageFlipOutPrev 0.36s cubic-bezier(0.36, 0.04, 0.62, 0.96) forwards;
}

.tab-panel.is-entering-prev {
  transform-origin: right center;
  animation: pageFlipInPrev 0.66s var(--ease-ios) forwards;
}

@keyframes pageFlipOutNext {
  0% {
    opacity: 1;
    transform: rotateY(0deg) translate3d(0, 0, 0) scale(1);
    filter: brightness(1);
  }
  45% {
    opacity: 0.72;
    transform: rotateY(-14deg) translate3d(-18px, 0, 26px) scale(0.99);
    filter: brightness(0.93);
  }
  100% {
    opacity: 0;
    transform: rotateY(-34deg) translate3d(-52px, 0, 12px) scale(0.968);
    filter: brightness(0.84);
  }
}

@keyframes pageFlipInNext {
  0%, 24% {
    opacity: 0;
    transform: rotateY(15deg) translate3d(38px, 6px, -18px) scale(0.982);
    filter: brightness(0.93);
  }
  58% {
    opacity: 0.94;
  }
  100% {
    opacity: 1;
    transform: rotateY(0deg) translate3d(0, 0, 0) scale(1);
    filter: brightness(1);
  }
}

@keyframes pageFlipOutPrev {
  0% {
    opacity: 1;
    transform: rotateY(0deg) translate3d(0, 0, 0) scale(1);
    filter: brightness(1);
  }
  45% {
    opacity: 0.72;
    transform: rotateY(14deg) translate3d(18px, 0, 26px) scale(0.99);
    filter: brightness(0.93);
  }
  100% {
    opacity: 0;
    transform: rotateY(34deg) translate3d(52px, 0, 12px) scale(0.968);
    filter: brightness(0.84);
  }
}

@keyframes pageFlipInPrev {
  0%, 24% {
    opacity: 0;
    transform: rotateY(-15deg) translate3d(-38px, 6px, -18px) scale(0.982);
    filter: brightness(0.93);
  }
  58% {
    opacity: 0.94;
  }
  100% {
    opacity: 1;
    transform: rotateY(0deg) translate3d(0, 0, 0) scale(1);
    filter: brightness(1);
  }
}

.chapter-lead {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 32px;
  align-items: stretch;
  margin-bottom: 34px;
}

.chapter-intro-box {
  padding: 28px 30px;
  border-radius: 18px;
  background: rgba(255, 250, 240, 0.42);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(255, 252, 245, 0.65);
  box-shadow:
    0 10px 28px rgba(58, 38, 16, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.chapter-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wax-crimson);
  margin-bottom: 10px;
}

.chapter-heading {
  font-family: var(--font-serif-cn);
  font-size: 1.72rem;
  font-weight: 700;
  color: var(--ink-sepia);
  margin-bottom: 12px;
}

.chapter-text {
  font-size: 0.94rem;
  color: var(--ink-sepia-soft);
  line-height: 1.85;
}

/* 实装游戏截图装裱框（复古黄铜细边框 + 玻璃高光） */
.chapter-media-frame {
  border-radius: 18px;
  overflow: hidden;
  padding: 8px;
  background: rgba(255, 250, 240, 0.56);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(154, 116, 55, 0.36);
  box-shadow:
    0 12px 30px rgba(48, 30, 12, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
}

.chapter-media-frame img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

/* 可点击外链卡片（TSG 下载 & 海克斯维基） */
.overview-links-row {
  margin-bottom: 4px;
}

.resource-link-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.resource-link-card .link-arrow {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--brass-gold);
  transition: transform 0.25s var(--ease-ios), color 0.25s ease;
}

.resource-link-card:hover .link-arrow {
  transform: translate(2px, -2px);
  color: var(--wax-crimson);
}

.resource-url {
  font-family: var(--font-mono);
  font-size: 0.82rem !important;
  color: var(--ink-sepia-muted) !important;
  word-break: break-all;
}

/* 预留图文插画装裱框 */
.illustration-slot {
  position: relative;
  border-radius: 18px;
  border: 1px dashed rgba(122, 88, 39, 0.46);
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.36) 0%, rgba(215, 194, 158, 0.24) 100%);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.illustration-slot-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-gold);
  margin-bottom: 6px;
}

.illustration-slot-desc {
  font-family: var(--font-serif-cn);
  font-size: 0.92rem;
  color: var(--ink-sepia-muted);
}

/* ==========================================================================
   ROLE DOSSIER BLOCKS (八大职业独立板块布局)
   ========================================================================== */
.roles-mechanic-bar {
  padding: 20px 24px;
  border-radius: 18px;
  background: rgba(255, 250, 240, 0.48);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(255, 252, 245, 0.7);
  box-shadow:
    0 8px 22px rgba(58, 38, 16, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  margin-bottom: 24px;
}

.roles-mechanic-bar p {
  font-size: 0.9rem;
  color: var(--ink-sepia-soft);
  line-height: 1.75;
  margin-bottom: 14px;
}

.roles-mechanic-bar strong {
  color: var(--ink-sepia);
}

.role-anchor-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-anchor-bar a {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-sepia);
  background: rgba(255, 252, 244, 0.72);
  border: 1px solid rgba(154, 116, 55, 0.28);
  transition: all 0.22s var(--ease-ios);
}

.role-anchor-bar a:hover {
  background: var(--ink-sepia);
  color: #F7EEDB;
  border-color: var(--ink-sepia);
  transform: translateY(-1px);
}

.role-blocks-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.role-block {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  padding: 26px 28px;
  border-radius: 20px;
  background: rgba(255, 251, 243, 0.52);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 252, 245, 0.74);
  box-shadow:
    0 12px 30px rgba(58, 38, 16, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
  scroll-margin-top: 162px;
  transition: border-color 0.28s ease, box-shadow 0.28s ease;
}

.role-block:hover {
  border-color: rgba(154, 116, 55, 0.48);
  box-shadow:
    0 16px 36px rgba(58, 38, 16, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.role-block-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 24px;
  border-right: 1px solid rgba(122, 88, 39, 0.22);
}

.role-portrait-slot {
  position: relative;
  width: 196px;
  max-width: 100%;
  margin: 0 auto 2px;
  aspect-ratio: 1 / 1;
  padding: 5px;
  border-radius: 50%;
  border: 1.5px solid rgba(154, 116, 55, 0.52);
  background: linear-gradient(145deg, rgba(255, 252, 245, 0.86) 0%, rgba(214, 190, 146, 0.48) 100%);
  box-shadow:
    0 12px 26px rgba(42, 26, 12, 0.18),
    0 2px 6px rgba(42, 26, 12, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.role-portrait-slot::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  box-shadow:
    inset 0 0 16px rgba(18, 12, 6, 0.28),
    inset 0 0 0 1px rgba(154, 116, 55, 0.32);
  pointer-events: none;
}

.role-portrait-slot img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center center;
  display: block;
  filter: sepia(0.06) contrast(1.04);
  transition: transform 0.45s var(--ease-ios), filter 0.35s ease;
}

.role-block:hover .role-portrait-slot img {
  transform: scale(1.04);
  filter: sepia(0.02) contrast(1.06);
}

.role-identity {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px 10px;
}

.role-identity h3 {
  font-family: var(--font-serif-cn);
  font-size: 1.44rem;
  font-weight: 700;
  color: var(--ink-sepia);
  line-height: 1.25;
  white-space: nowrap;
}

.role-en {
  font-family: var(--font-serif-en);
  font-style: italic;
  font-size: 0.94rem;
  color: var(--brass-gold);
  white-space: nowrap;
}

.role-look {
  font-size: 0.82rem;
  color: var(--ink-sepia-soft);
  line-height: 1.65;
}

.role-block-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}

.role-field-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--brass-gold);
  margin-bottom: 8px;
}

.role-passive-box {
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 253, 247, 0.66);
  border: 1px solid rgba(154, 116, 55, 0.24);
}

.role-passive-main {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}

.role-stat-num {
  font-family: var(--font-serif-en);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  color: var(--wax-crimson);
}

.role-stat-desc {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink-sepia);
}

.role-items-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-item-pill {
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 500;
  color: #154566;
  background: rgba(22, 72, 107, 0.09);
  border: 1px solid rgba(22, 72, 107, 0.18);
}

.role-specs {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.role-specs li {
  position: relative;
  padding-left: 14px;
  font-size: 0.88rem;
  color: var(--ink-sepia-soft);
  line-height: 1.7;
}

.role-specs li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brass-gold);
}

.role-specs strong {
  color: var(--ink-sepia);
}

/* ==========================================================================
   THRALL SPELLS & TOTEM MECHANICS (狼人法术与图腾充能板块)
   ========================================================================== */
.keycap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.45em;
  padding: 0 6px;
  margin: 0 2px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.78em;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink-sepia);
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.96) 0%, rgba(235, 220, 192, 0.9) 100%);
  border: 1px solid rgba(122, 88, 39, 0.42);
  box-shadow: 0 1.5px 0 rgba(88, 60, 24, 0.28);
  vertical-align: baseline;
}

.thrall-warning-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  margin-bottom: 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(139, 34, 40, 0.12) 0%, rgba(255, 248, 238, 0.68) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(139, 34, 40, 0.34);
  box-shadow:
    0 8px 22px rgba(72, 20, 22, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.thrall-warning-badge {
  flex-shrink: 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--wax-crimson);
  color: #FAF2E4;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.thrall-warning-banner p {
  font-size: 0.94rem;
  color: var(--ink-sepia);
  line-height: 1.6;
}

.thrall-warning-banner strong {
  color: #74191F;
}

.thrall-mechanics-grid {
  margin-bottom: 22px;
}

.thrall-mech-card {
  display: flex;
  flex-direction: column;
}

.thrall-mech-card p,
.spell-card p {
  margin-bottom: 14px;
}

.thrall-key-hint {
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--ink-sepia-muted);
  letter-spacing: 0.02em;
}

.thrall-callout {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed rgba(122, 88, 39, 0.24);
  font-size: 0.82rem;
  color: var(--ink-sepia-soft);
  line-height: 1.6;
}

.thrall-callout strong {
  color: var(--wax-crimson);
}

.thrall-recipe-row {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed rgba(122, 88, 39, 0.24);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.thrall-recipe-note {
  font-size: 0.78rem;
  color: var(--ink-sepia-muted);
}

.thrall-charge-box {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 24px;
  align-items: center;
  padding: 22px 26px;
  margin-bottom: 30px;
  border-radius: 18px;
  background: rgba(255, 251, 243, 0.56);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(154, 116, 55, 0.34);
  box-shadow:
    0 10px 26px rgba(58, 38, 16, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.thrall-charge-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 14px;
}

.thrall-charge-head .role-field-label {
  margin-bottom: 0;
}

.totem-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #74191F;
  background: rgba(139, 34, 40, 0.1);
  border: 1px solid rgba(139, 34, 40, 0.24);
}

.charge-tier-track {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.charge-tier-step {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 22px 12px 13px;
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid rgba(154, 116, 55, 0.26);
}

.charge-tier-step.is-max {
  background: linear-gradient(160deg, rgba(139, 34, 40, 0.1) 0%, rgba(255, 251, 242, 0.88) 100%);
  border-color: rgba(139, 34, 40, 0.36);
}

.charge-tier-media {
  position: relative;
  width: 104px;
  height: 132px;
  flex-shrink: 0;
  padding: 5px;
  border-radius: 12px;
  background: #0D0B0A;
  border: 1px solid rgba(154, 116, 55, 0.45);
  box-shadow:
    0 8px 18px rgba(32, 18, 8, 0.22),
    inset 0 0 0 1px rgba(255, 232, 188, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.charge-tier-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 7px;
  display: block;
}

.totem-pointer-tag {
  position: absolute;
  top: -15px;
  right: -6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--wax-crimson);
  color: #FAF2E4;
  font-size: 0.64rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(70, 16, 20, 0.32);
  border: 1px solid rgba(255, 235, 205, 0.45);
  z-index: 2;
}

.charge-tier-meta strong {
  display: block;
  font-size: 0.86rem;
  color: var(--ink-sepia);
  line-height: 1.3;
}

.charge-tier-desc {
  display: block;
  margin-top: 2px;
  font-size: 0.74rem;
  color: var(--ink-sepia-muted);
}

.tier-arrow {
  align-self: center;
  color: var(--brass-gold);
  font-weight: 600;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.thrall-cd-note {
  padding-left: 22px;
  border-left: 1px solid rgba(122, 88, 39, 0.24);
}

.thrall-cd-note p {
  margin-top: 8px;
  font-size: 0.86rem;
  color: var(--ink-sepia-soft);
  line-height: 1.7;
}

.thrall-cd-note strong {
  color: var(--ink-sepia);
}

.totem-corner-tip {
  margin-top: 12px !important;
  padding-top: 10px;
  border-top: 1px dashed rgba(122, 88, 39, 0.24);
  font-size: 0.82rem !important;
}

.totem-corner-tip strong {
  color: var(--wax-crimson);
}

.spells-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--brass-line);
}

.spells-section-title {
  font-family: var(--font-serif-cn);
  font-size: 1.48rem;
  font-weight: 700;
  color: var(--ink-sepia);
}

.spells-section-sub {
  font-family: var(--font-serif-en);
  font-style: italic;
  font-size: 1rem;
  color: var(--brass-gold);
}

.spell-card {
  display: flex;
  flex-direction: column;
}

.spell-card.is-wide {
  grid-column: 1 / -1;
}

.spell-en {
  font-family: var(--font-serif-en);
  font-style: italic;
  font-size: 0.94rem;
  letter-spacing: 0.02em;
  color: var(--brass-gold);
}

.spell-tier-line {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed rgba(122, 88, 39, 0.24);
  font-size: 0.82rem;
  color: var(--ink-sepia-soft);
  line-height: 1.6;
}

.spell-tier-line span {
  font-weight: 600;
  color: var(--wax-crimson);
}

/* ==========================================================================
   GAME OBJECTIVES TWIN-FACTION CARDS (游戏目标：好人 vs 狼人)
   ========================================================================== */
.goals-head {
  margin-bottom: 22px;
}

.goals-faction-grid {
  gap: 24px;
  align-items: stretch;
}

.faction-goal-card {
  display: flex;
  flex-direction: column;
  padding: 28px 30px;
}

.faction-goal-card.is-explorer-card {
  background: linear-gradient(165deg, rgba(22, 72, 107, 0.07) 0%, rgba(255, 251, 243, 0.56) 55%);
  border-color: rgba(22, 72, 107, 0.24);
}

.faction-goal-card.is-thrall-card {
  background: linear-gradient(165deg, rgba(139, 34, 40, 0.08) 0%, rgba(255, 251, 243, 0.56) 55%);
  border-color: rgba(139, 34, 40, 0.26);
}

.faction-goal-card h3 {
  font-size: 1.44rem;
  margin-bottom: 16px;
}

.faction-story {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-bottom: 22px;
}

.faction-story p {
  font-size: 0.93rem;
  line-height: 1.85;
  color: var(--ink-sepia-soft);
}

.faction-story strong {
  color: var(--ink-sepia);
}

.faction-goal-card.is-thrall-card .faction-story strong {
  color: #74191F;
}

.faction-win-bar {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed rgba(122, 88, 39, 0.28);
}

.faction-win-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #16486B;
  margin-bottom: 10px;
}

.faction-win-label.is-crimson {
  color: var(--wax-crimson);
}

.faction-win-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.faction-pill-crimson {
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 500;
  color: #7A1D23;
  background: rgba(139, 34, 40, 0.09);
  border: 1px solid rgba(139, 34, 40, 0.22);
}

/* ==========================================================================
   CRAFTING ENCYCLOPEDIA (物品大全 · 配方维基百科全书)
   ========================================================================== */
.wiki-head {
  margin-bottom: 20px;
}

.wiki-stations-strip {
  margin-bottom: 22px;
  gap: 16px;
}

.wiki-station-card {
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 251, 243, 0.48);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 252, 245, 0.72);
  box-shadow:
    0 6px 18px rgba(58, 38, 16, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.wiki-station-card p {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--ink-sepia-soft);
  line-height: 1.65;
}

.wiki-station-card strong {
  color: var(--ink-sepia);
}

.station-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.station-badge.is-workbench {
  background: rgba(22, 72, 107, 0.11);
  color: #16486B;
  border: 1px solid rgba(22, 72, 107, 0.2);
}

.station-badge.is-stove {
  background: rgba(168, 102, 28, 0.13);
  color: #824B0E;
  border: 1px solid rgba(168, 102, 28, 0.26);
}

.station-badge.is-build {
  background: rgba(74, 58, 38, 0.12);
  color: #463420;
  border: 1px solid rgba(98, 74, 46, 0.25);
}

.wiki-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 18px;
  padding: 14px 18px;
  margin-bottom: 26px;
  border-radius: 18px;
  background: rgba(255, 251, 243, 0.62);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(154, 116, 55, 0.34);
  box-shadow:
    0 10px 26px rgba(58, 38, 16, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.wiki-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wiki-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(154, 116, 55, 0.3);
  background: rgba(255, 253, 248, 0.78);
  color: var(--ink-sepia-soft);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.22s var(--ease-ios);
}

.wiki-filter-btn span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  opacity: 0.75;
}

.wiki-filter-btn:hover {
  border-color: rgba(122, 88, 39, 0.56);
  color: var(--ink-sepia);
}

.wiki-filter-btn.active {
  background: var(--ink-sepia);
  color: #F7EEDB;
  border-color: var(--ink-sepia);
}

.wiki-filter-btn.is-thrall-filter.active {
  background: var(--wax-crimson);
  border-color: var(--wax-crimson);
  color: #FAF2E4;
}

.wiki-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 250px;
  max-width: 360px;
}

.wiki-search-input {
  width: 100%;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(154, 116, 55, 0.36);
  background: rgba(255, 253, 248, 0.86);
  color: var(--ink-sepia);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.wiki-search-input::placeholder {
  color: var(--ink-sepia-muted);
}

.wiki-search-input:focus {
  border-color: var(--brass-gold);
  box-shadow: 0 0 0 3px rgba(154, 116, 55, 0.16);
}

.wiki-count-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-sepia-muted);
  white-space: nowrap;
}

.wiki-group {
  margin-bottom: 28px;
}

.wiki-group[hidden] {
  display: none;
}

.wiki-group-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(122, 88, 39, 0.22);
}

.wiki-group-title h4 {
  font-family: var(--font-serif-cn);
  font-size: 1.16rem;
  font-weight: 700;
  color: var(--ink-sepia);
}

.wiki-group-title span {
  font-size: 0.76rem;
  color: var(--brass-gold);
  font-weight: 500;
}

.wiki-items-grid {
  gap: 16px;
}

.item-wiki-card {
  display: flex;
  flex-direction: column;
  padding: 20px 22px;
}

.item-wiki-card[hidden] {
  display: none;
}

.item-wiki-card.is-thrall-item {
  background: linear-gradient(160deg, rgba(139, 34, 40, 0.065) 0%, rgba(255, 251, 243, 0.54) 60%);
  border-color: rgba(139, 34, 40, 0.26);
}

.item-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.item-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.item-wiki-card h5 {
  font-family: var(--font-serif-cn);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink-sepia);
  margin-bottom: 11px;
}

.item-recipe-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: rgba(255, 253, 247, 0.76);
  border: 1px solid rgba(154, 116, 55, 0.22);
}

.recipe-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brass-gold);
  padding-right: 6px;
  border-right: 1px solid rgba(154, 116, 55, 0.28);
}

.recipe-ingredients {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.ingredient-chip {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-sepia);
  background: rgba(154, 116, 55, 0.12);
  border: 1px solid rgba(154, 116, 55, 0.24);
}

.ingredient-chip.is-output {
  color: #74191F;
  background: rgba(139, 34, 40, 0.1);
  border-color: rgba(139, 34, 40, 0.26);
}

.recipe-plus,
.recipe-arrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brass-gold);
}

.item-desc {
  font-size: 0.84rem !important;
  color: var(--ink-sepia-soft);
  line-height: 1.68;
}

.item-desc strong {
  color: var(--ink-sepia);
}

.wiki-empty-state {
  padding: 36px 24px;
  margin-bottom: 24px;
  text-align: center;
  border-radius: 18px;
  border: 1px dashed rgba(122, 88, 39, 0.36);
  background: rgba(255, 251, 243, 0.44);
}

.wiki-empty-state[hidden] {
  display: none;
}

.wiki-empty-state p {
  font-size: 0.9rem;
  color: var(--ink-sepia-soft);
  margin-bottom: 14px;
}

.wiki-reset-btn {
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid var(--ink-sepia);
  background: var(--ink-sepia);
  color: #F7EEDB;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.wiki-reset-btn:hover {
  opacity: 0.88;
}

.wiki-uncraftable-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 16px;
  background: rgba(22, 72, 107, 0.06);
  border: 1px solid rgba(22, 72, 107, 0.2);
}

.wiki-uncraftable-note .card-tag {
  flex-shrink: 0;
  margin-top: 2px;
}

.wiki-uncraftable-note p {
  font-size: 0.84rem;
  color: var(--ink-sepia-soft);
  line-height: 1.7;
}

.wiki-uncraftable-note strong {
  color: var(--ink-sepia);
}

/* ==========================================================================
   GROUP CHARTER RULES (开黑群规板块)
   ========================================================================== */
.charter-head {
  margin-bottom: 20px;
}

.charter-penalty-banner {
  margin-bottom: 24px;
}

.charter-rules-grid {
  gap: 20px;
  margin-bottom: 26px;
}

.charter-rule-card p strong {
  color: var(--wax-crimson);
}

.charter-blessing-bar {
  padding: 20px 24px;
  border-radius: 16px;
  text-align: center;
  background: linear-gradient(135deg, rgba(255, 252, 245, 0.64) 0%, rgba(235, 220, 190, 0.36) 100%);
  border: 1px solid rgba(154, 116, 55, 0.34);
  box-shadow:
    0 8px 22px rgba(58, 38, 16, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.charter-blessing-text {
  font-family: var(--font-serif-cn);
  font-size: 1.26rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink-sepia);
}

/* 羊皮纸上的 iOS 毛玻璃模块卡片网格 */
.parchment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.parchment-grid > * {
  min-width: 0;
}

.parchment-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.parchment-grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.glass-vellum-card {
  position: relative;
  border-radius: 18px;
  padding: 24px;
  background: rgba(255, 251, 243, 0.48);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 252, 245, 0.72);
  box-shadow:
    0 10px 26px rgba(58, 38, 16, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: transform 0.3s var(--ease-ios), box-shadow 0.3s var(--ease-ios), border-color 0.3s ease;
}

.glass-vellum-card:hover {
  transform: translateY(-4px);
  border-color: rgba(154, 116, 55, 0.52);
  box-shadow:
    0 18px 36px rgba(58, 38, 16, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.card-index {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--brass-gold);
  margin-bottom: 12px;
}

.card-tag {
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(139, 34, 40, 0.1);
  color: var(--wax-crimson);
  font-size: 0.68rem;
  font-weight: 500;
}

.card-tag.is-explorer {
  background: rgba(20, 68, 102, 0.1);
  color: #16486B;
}

.glass-vellum-card h3 {
  font-family: var(--font-serif-cn);
  font-size: 1.24rem;
  font-weight: 700;
  color: var(--ink-sepia);
  margin-bottom: 8px;
}

.glass-vellum-card p {
  font-size: 0.88rem;
  color: var(--ink-sepia-soft);
  line-height: 1.7;
}

.slot-badge {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(122, 88, 39, 0.25);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-sepia-muted);
}

/* 页脚签名栏 */
.logbook-footer {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--brass-line);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--ink-sepia-muted);
}

.captain-sign {
  font-family: var(--font-serif-en);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink-sepia);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1080px) {
  .liquid-nav {
    gap: 10px;
    padding: 8px 10px 8px 16px;
  }
  .brand-name {
    font-size: 0.82rem;
    letter-spacing: 0.14em;
  }
  .nav-links {
    gap: 2px;
  }
  .nav-links a {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
  .nav-cta {
    padding: 7px 13px;
    font-size: 0.78rem;
  }
}

@media (max-width: 1024px) {
  .parchment-sheet {
    padding: 44px 28px 54px;
  }
  .parchment-frame {
    padding: 30px 24px;
  }
  .chapter-lead {
    grid-template-columns: 1fr;
  }
  .thrall-charge-box {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .thrall-cd-note {
    padding-left: 0;
    padding-top: 16px;
    border-left: none;
    border-top: 1px solid rgba(122, 88, 39, 0.24);
  }
  .role-block {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .role-block-side {
    padding-right: 0;
    padding-bottom: 16px;
    border-right: none;
    border-bottom: 1px solid rgba(122, 88, 39, 0.22);
  }
  .role-portrait-slot {
    max-width: 196px;
  }
  .parchment-grid,
  .parchment-grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .thrall-mechanics-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
  }
  .logbook-tabs-wrap {
    position: sticky;
    top: 74px;
  }
  .logbook-tab {
    padding: 8px 12px;
    font-size: 0.8rem;
    gap: 5px;
  }
  .wiki-stations-strip {
    grid-template-columns: 1fr;
  }
  .wiki-search-box {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .nav-wrap {
    padding: 0 14px;
  }
  .thrall-warning-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .tier-arrow {
    display: none;
  }
  .charge-tier-track {
    flex-wrap: wrap;
    justify-content: center;
  }
  .charge-tier-step {
    flex: 1 1 130px;
  }
  .dive-track {
    height: 155vh;
  }
  .ocean-video {
    object-position: center center;
    transform: none;
    will-change: auto;
  }
  .hero-overlay {
    padding: 92px 20px 18px;
  }
  .hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: none;
  }
  .hero-headline {
    font-size: clamp(2.35rem, 10.5vw, 3.1rem);
    margin-bottom: 10px;
  }
  .hero-sub {
    font-size: 0.92rem;
    line-height: 1.62;
    margin-bottom: 0;
    max-width: 100%;
  }
  .hero-actions {
    margin-top: auto;
    padding-bottom: 14px;
    gap: 10px;
  }
  .btn-ocean-primary {
    padding: 11px 20px;
    font-size: 0.88rem;
    background: rgba(244, 250, 255, 0.94);
    color: #072236;
    border-color: rgba(255, 255, 255, 0.86);
  }
  .btn-ocean-glass {
    padding: 10px 16px;
    font-size: 0.86rem;
    background: rgba(8, 28, 44, 0.48);
    color: #F2FAFF;
    border-color: rgba(255, 255, 255, 0.42);
  }
  .btn-glass-circle {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.38);
    color: #FFFFFF;
  }
  .hero-bottom-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .depth-rail {
    right: 12px;
  }
  .scroll-roller::before,
  .scroll-roller::after {
    display: none;
  }
  .parchment-sheet {
    padding: 28px 16px 40px;
  }
  .parchment-frame {
    padding: 22px 16px;
  }
  .logbook-header {
    flex-direction: column;
  }
  .wax-seal {
    width: 66px;
    height: 66px;
  }
  .parchment-grid,
  .parchment-grid.cols-2,
  .parchment-grid.cols-4 {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   TRUE 3D HARDCOVER CAPTAIN'S LOGBOOK (《航海日志》真实 3D 翻书精装本)
   ========================================================================== */
.book-desk {
  position: relative;
  z-index: 30;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% 24%, rgba(72, 48, 28, 0.52) 0%, rgba(30, 20, 13, 0.94) 62%, #130D09 100%),
    #1A120C;
  padding: 76px 12px 16px;
  scroll-margin-top: 0;
  overflow-x: clip;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-desk-inner {
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 顶部实体探出式复古书签栏（自然插在书页上沿后方，文字完整外露且翻页不穿模） */
.book-bookmarks-bar {
  position: relative;
  z-index: 25;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: -2px;
  padding: 0 12px;
}

.book-bookmark {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 16px 19px;
  border: 1px solid rgba(235, 206, 152, 0.36);
  border-bottom: none;
  border-radius: 11px 11px 0 0;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #F7ECDA;
  box-shadow:
    0 -4px 14px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 244, 220, 0.34);
  transform: translateY(1px);
  transition:
    transform 0.3s var(--ease-ios),
    filter 0.25s ease,
    box-shadow 0.3s ease;
  white-space: nowrap;
}

.book-bookmark::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 6px;
  right: 6px;
  height: 1px;
  background: rgba(255, 238, 202, 0.28);
  pointer-events: none;
}

.book-bookmark:hover {
  transform: translateY(-3px);
  filter: brightness(1.1);
}

.book-bookmark.active {
  transform: translateY(-6px);
  border-color: rgba(246, 218, 158, 0.78);
  box-shadow:
    0 -8px 22px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(246, 218, 158, 0.28),
    inset 0 1px 1px rgba(255, 248, 230, 0.55);
}

.bm-roman {
  font-family: var(--font-serif-en);
  font-weight: 700;
  font-size: 0.92rem;
  color: #F2D28E;
}

/* 七枚不同复古染织色调书签 */
.bm-navy    { background: linear-gradient(180deg, #214B6B 0%, #143249 100%); }
.bm-brass   { background: linear-gradient(180deg, #8B652E 0%, #61441C 100%); }
.bm-crimson { background: linear-gradient(180deg, #8B262C 0%, #5F171C 100%); }
.bm-amber   { background: linear-gradient(180deg, #7A4E27 0%, #523318 100%); }
.bm-pine    { background: linear-gradient(180deg, #2C5B4D 0%, #1C3D34 100%); }
.bm-teal    { background: linear-gradient(180deg, #1E6070 0%, #123D48 100%); }
.bm-plum    { background: linear-gradient(180deg, #5C3449 0%, #3D2030 100%); }

/* 3D 翻书主舞台行（含左右悬浮翻页箭头） */
.book-stage-row {
  position: relative;
  z-index: 40;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.book-side-arrow {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(235, 206, 152, 0.36);
  background: rgba(28, 20, 14, 0.68);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #F4E4C4;
  font-size: 1.65rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.42);
  transition: all 0.25s var(--ease-ios);
  z-index: 70;
}

.book-side-arrow:hover:not(:disabled) {
  background: rgba(154, 116, 55, 0.36);
  border-color: rgba(246, 218, 158, 0.72);
  transform: scale(1.08);
}

.book-side-arrow:disabled {
  opacity: 0.26;
  pointer-events: none;
}

/* 3D 透视视口与大开本精装书容器 */
.book-viewport {
  width: min(1420px, calc(100vw - 124px));
  height: clamp(690px, calc(100vh - 178px), 860px);
  perspective: 2800px;
  perspective-origin: 50% 48%;
  position: relative;
  user-select: none;
}

.logbook-book {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.82s var(--ease-ios);
}

/* 封面闭合居中 → 摊开双页居中 → 封底闭合居中 */
.logbook-book[data-state="cover"] {
  transform: translateX(-25%);
}

.logbook-book[data-state="open"] {
  transform: translateX(0%);
}

.logbook-book[data-state="back"] {
  transform: translateX(25%);
}

/* 展开态的硬皮封面托底与书页厚度层 */
.book-hardboard-under {
  position: absolute;
  inset: -8px -12px;
  border-radius: 14px;
  background: linear-gradient(180deg, #3A2516 0%, #24160D 50%, #1B1009 100%);
  border: 1px solid rgba(196, 154, 88, 0.32);
  box-shadow:
    0 34px 80px rgba(0, 0, 0, 0.74),
    0 10px 24px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 228, 178, 0.22);
  opacity: 0;
  transform: translateZ(-6px);
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.logbook-book[data-state="open"] .book-hardboard-under {
  opacity: 1;
}

/* 书页厚度叠边（左右外缘纸叠纹理） */
.book-hardboard-under::before,
.book-hardboard-under::after {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  width: 9px;
  background: repeating-linear-gradient(
    90deg,
    #DDD0B4 0px,
    #DDD0B4 1px,
    #BFA982 1px,
    #BFA982 2.2px
  );
}

.book-hardboard-under::before {
  left: 3px;
  border-radius: 4px 0 0 4px;
  box-shadow: inset -2px 0 4px rgba(48, 30, 12, 0.35);
}

.book-hardboard-under::after {
  right: 3px;
  border-radius: 0 4px 4px 0;
  box-shadow: inset 2px 0 4px rgba(48, 30, 12, 0.35);
}

/* 摊开时的中缝书脊阴影凹槽 */
.book-spine-center {
  position: absolute;
  top: -8px;
  bottom: -8px;
  left: 50%;
  width: 24px;
  transform: translateX(-50%) translateZ(2px);
  background: linear-gradient(
    90deg,
    rgba(28, 16, 8, 0) 0%,
    rgba(24, 14, 6, 0.32) 38%,
    rgba(14, 8, 4, 0.56) 50%,
    rgba(24, 14, 6, 0.32) 62%,
    rgba(28, 16, 8, 0) 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 35;
}

.logbook-book[data-state="open"] .book-spine-center {
  opacity: 1;
}

/* ==========================================================================
   SINGLE DOUBLE-SIDED 3D SHEET (真正绕中缝 180° 翻转的双面书页)
   ========================================================================== */
.book-sheet {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  transform-origin: left center;
  transform-style: preserve-3d;
  transform: rotateY(0deg);
  transition: transform 0.76s cubic-bezier(0.36, 0.05, 0.2, 1);
  will-change: transform;
}

.book-sheet.is-flipped {
  transform: rotateY(-180deg);
}

.sheet-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

.sheet-front {
  border-radius: 2px 10px 10px 2px;
}

.sheet-back {
  transform: rotateY(180deg);
  border-radius: 10px 2px 2px 10px;
}

/* 翻页动态立体折光与阴影罩层 */
.sheet-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: 0;
}

.book-sheet.is-turning-next .sheet-front .sheet-shade {
  background: linear-gradient(90deg, rgba(20, 10, 4, 0.38) 0%, rgba(255, 248, 232, 0.24) 45%, rgba(20, 10, 4, 0.48) 100%);
  animation: sheetShadeFrontOut 0.76s ease forwards;
}

.book-sheet.is-turning-next .sheet-back .sheet-shade {
  background: linear-gradient(270deg, rgba(20, 10, 4, 0.38) 0%, rgba(255, 248, 232, 0.26) 45%, rgba(20, 10, 4, 0.42) 100%);
  animation: sheetShadeBackIn 0.76s ease forwards;
}

.book-sheet.is-turning-prev .sheet-back .sheet-shade {
  background: linear-gradient(270deg, rgba(20, 10, 4, 0.38) 0%, rgba(255, 248, 232, 0.24) 45%, rgba(20, 10, 4, 0.48) 100%);
  animation: sheetShadeFrontOut 0.76s ease forwards;
}

.book-sheet.is-turning-prev .sheet-front .sheet-shade {
  background: linear-gradient(90deg, rgba(20, 10, 4, 0.38) 0%, rgba(255, 248, 232, 0.26) 45%, rgba(20, 10, 4, 0.42) 100%);
  animation: sheetShadeBackIn 0.76s ease forwards;
}

@keyframes sheetShadeFrontOut {
  0%   { opacity: 0; }
  45%  { opacity: 0.9; }
  100% { opacity: 0; }
}

@keyframes sheetShadeBackIn {
  0%   { opacity: 0; }
  52%  { opacity: 0.85; }
  100% { opacity: 0; }
}

/* ==========================================================================
   EMBOSSED LEATHER HARDCOVER (1847 复古皮革烫金封面 & 封底)
   ========================================================================== */
.is-cover-face {
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.72),
    0 6px 18px rgba(0, 0, 0, 0.5);
}

.cover-leather {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 26px 26px 26px 40px;
  background:
    radial-gradient(ellipse at 55% 36%, rgba(114, 72, 42, 0.32) 0%, rgba(46, 28, 17, 0.82) 60%, #1F120A 100%),
    repeating-linear-gradient(45deg, rgba(255, 224, 172, 0.015) 0px, rgba(255, 224, 172, 0.015) 2px, transparent 2px, transparent 6px),
    #2A1A10;
  border: 1px solid rgba(204, 162, 92, 0.38);
  border-radius: inherit;
  display: flex;
  align-items: stretch;
  justify-content: center;
  box-shadow:
    inset 14px 0 24px rgba(0, 0, 0, 0.52),
    inset -4px 0 12px rgba(255, 224, 168, 0.14),
    inset 0 2px 4px rgba(255, 232, 188, 0.18);
}

.cover-leather.is-back {
  padding: 26px 40px 26px 26px;
  box-shadow:
    inset -14px 0 24px rgba(0, 0, 0, 0.52),
    inset 4px 0 12px rgba(255, 224, 168, 0.14);
}

/* 皮革装订书脊凹凸楞线 */
.cover-spine-ribs {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 24px;
  background:
    linear-gradient(90deg, #170D07 0%, #3F2717 48%, #1C1009 100%);
  border-right: 1px solid rgba(214, 172, 102, 0.28);
}

.cover-spine-ribs.is-right {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 1px solid rgba(214, 172, 102, 0.28);
}

/* 四角复古黄铜护角 */
.brass-corner {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(220, 179, 104, 0.62);
  pointer-events: none;
}
.brass-corner.tl { top: 14px; left: 32px; border-right: none; border-bottom: none; border-radius: 4px 0 0 0; }
.brass-corner.tr { top: 14px; right: 14px; border-left: none; border-bottom: none; border-radius: 0 4px 0 0; }
.brass-corner.bl { bottom: 14px; left: 32px; border-right: none; border-top: none; border-radius: 0 0 0 4px; }
.brass-corner.br { bottom: 14px; right: 14px; border-left: none; border-top: none; border-radius: 0 0 4px 0; }

.cover-inner-frame {
  position: relative;
  flex: 1;
  border: 1.5px solid rgba(216, 176, 104, 0.46);
  border-radius: 6px;
  padding: 36px 28px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 5px rgba(216, 176, 104, 0.1);
}

.cover-compass-bg {
  position: absolute;
  width: 340px;
  height: 340px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #E2BE78;
  opacity: 0.09;
  pointer-events: none;
}

.cover-top-badge {
  position: relative;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  color: rgba(232, 198, 134, 0.78);
  padding: 6px 16px;
  border-top: 1px solid rgba(216, 176, 104, 0.34);
  border-bottom: 1px solid rgba(216, 176, 104, 0.34);
}

.cover-title-plate {
  position: relative;
  z-index: 2;
}

.cover-title-cn {
  font-family: var(--font-serif-cn);
  font-size: clamp(2.8rem, 4.4vw, 3.85rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  padding-left: 0.18em;
  background: linear-gradient(180deg, #FFF2CC 0%, #DFB468 52%, #9F7434 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.65));
  line-height: 1.2;
}

.cover-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 16px auto 14px;
  width: 220px;
}

.cover-divider span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226, 190, 120, 0.7), transparent);
}

.cover-divider i {
  font-style: normal;
  color: #E4BD74;
  font-size: 0.85rem;
}

.cover-title-en {
  font-family: var(--font-serif-en);
  font-style: italic;
  font-size: 1.65rem;
  letter-spacing: 0.08em;
  color: #E9CCA0;
  margin-bottom: 8px;
}

.cover-subtitle {
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  color: rgba(238, 218, 184, 0.74);
}

.cover-seal-wrap {
  position: relative;
  z-index: 2;
}

.cover-wax-seal {
  width: 78px;
  height: 78px;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.58),
    inset 0 2px 5px rgba(255, 196, 196, 0.34),
    inset 0 -3px 8px rgba(34, 4, 6, 0.65);
}

.cover-open-hint {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid rgba(232, 196, 128, 0.46);
  background: rgba(232, 196, 128, 0.12);
  color: #F4DFB4;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  transition: background 0.25s ease, transform 0.25s var(--ease-ios);
}

.cover-leather:hover .cover-open-hint {
  background: rgba(232, 196, 128, 0.24);
  transform: translateY(-2px);
}

.cover-hint-arrow {
  display: inline-block;
  animation: coverArrowPulse 1.6s ease-in-out infinite;
}

@keyframes coverArrowPulse {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

.is-back-frame {
  justify-content: center;
  gap: 20px;
}

.back-cover-quote {
  font-family: var(--font-serif-cn);
  font-size: 1.06rem;
  letter-spacing: 0.08em;
  color: #EED9B4;
}

.back-cover-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.back-cover-btn {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid rgba(236, 200, 132, 0.65);
  background: linear-gradient(180deg, #D9B066 0%, #9E7434 100%);
  color: #1F120A;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  transition: transform 0.22s var(--ease-ios), filter 0.22s ease;
}

.back-cover-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.back-cover-btn.is-ghost {
  background: rgba(255, 240, 210, 0.1);
  color: #F2DFB8;
}

/* ==========================================================================
   AGED PARCHMENT BOOK PAGES (左右双页纸面 + 中缝弧影 + 可点击卷角)
   ========================================================================== */
.book-page {
  color: var(--ink-sepia);
  background-color: var(--vellum-base);
  background-image:
    radial-gradient(ellipse at 50% 45%, rgba(252, 245, 228, 0.65) 0%, rgba(228, 210, 176, 0.38) 65%, rgba(164, 130, 86, 0.45) 100%),
    var(--parchment-url, none);
  background-size: cover, cover;
  background-position: center;
  display: flex;
  flex-direction: column;
}

/* 左页右侧装订中缝阴影 */
.book-page.is-left-page {
  border-left: 1px solid rgba(116, 84, 44, 0.34);
  border-top: 1px solid rgba(116, 84, 44, 0.28);
  border-bottom: 1px solid rgba(116, 84, 44, 0.34);
  box-shadow:
    inset -28px 0 36px -18px rgba(48, 30, 12, 0.36),
    inset 14px 0 22px -14px rgba(102, 72, 36, 0.28);
}

/* 右页左侧装订中缝阴影 */
.book-page.is-right-page {
  border-right: 1px solid rgba(116, 84, 44, 0.34);
  border-top: 1px solid rgba(116, 84, 44, 0.28);
  border-bottom: 1px solid rgba(116, 84, 44, 0.34);
  box-shadow:
    inset 28px 0 36px -18px rgba(48, 30, 12, 0.36),
    inset -14px 0 22px -14px rgba(102, 72, 36, 0.28);
}

/* 内页滚动内容区 */
.book-page-inner {
  flex: 1;
  min-height: 0;
  padding: 20px 28px 12px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(154, 116, 55, 0.38) transparent;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.book-page.is-left-page .book-page-inner {
  padding-right: 32px;
}

.book-page.is-right-page .book-page-inner {
  padding-left: 32px;
}

.book-page-inner::-webkit-scrollbar {
  width: 6px;
}

.book-page-inner::-webkit-scrollbar-thumb {
  background: rgba(154, 116, 55, 0.36);
  border-radius: 999px;
}

/* 页眉与页脚页码 */
.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(122, 88, 39, 0.3);
  flex-shrink: 0;
}

.page-chapter-tag {
  font-family: var(--font-serif-cn);
  font-size: 1.24rem;
  font-weight: 700;
  color: var(--ink-sepia);
  letter-spacing: 0.04em;
}

.page-en-kicker {
  font-family: var(--font-serif-en);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--brass-gold);
}

.page-folio {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 28px 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: #5E4936;
  border-top: 1px dashed rgba(122, 88, 39, 0.22);
  flex-shrink: 0;
}

/* 真实可点击书页折角（悬停自动微微卷起提示翻页） */
.page-corner {
  position: absolute;
  bottom: 0;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  z-index: 15;
  padding: 0;
  transition: width 0.28s var(--ease-ios), height 0.28s var(--ease-ios);
}

.page-corner.is-next {
  right: 0;
  background: linear-gradient(315deg, rgba(168, 134, 86, 0.38) 0%, rgba(248, 238, 214, 0.92) 48%, transparent 51%);
  border-radius: 0 0 10px 0;
  box-shadow: -3px -3px 8px rgba(56, 36, 16, 0.14);
}

.page-corner.is-prev {
  left: 0;
  background: linear-gradient(45deg, rgba(168, 134, 86, 0.38) 0%, rgba(248, 238, 214, 0.92) 48%, transparent 51%);
  border-radius: 0 0 0 10px;
  box-shadow: 3px -3px 8px rgba(56, 36, 16, 0.14);
}

.page-corner:hover {
  width: 58px;
  height: 58px;
}

/* ==========================================================================
   IN-BOOK CARDS & TYPOGRAPHY (书页内部大字号高清晰排版组件)
   ========================================================================== */
.bp-card {
  padding: 18px 20px;
  border-radius: 15px;
  background: rgba(255, 252, 245, 0.66);
  border: 1px solid rgba(255, 252, 245, 0.84);
  box-shadow:
    0 6px 16px rgba(58, 38, 16, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.bp-card h4 {
  font-family: var(--font-serif-cn);
  font-size: 1.24rem;
  font-weight: 700;
  color: var(--ink-sepia);
  margin-bottom: 8px;
}

.bp-headline {
  font-family: var(--font-serif-cn);
  font-size: 1.48rem;
  font-weight: 700;
  color: var(--ink-sepia);
  line-height: 1.38;
  margin-bottom: 10px;
}

.bp-text {
  font-size: 0.98rem;
  color: #36271A;
  line-height: 1.76;
}

.bp-text strong {
  color: #1E140B;
}

.text-crimson {
  color: var(--wax-crimson) !important;
}

.bp-media-frame {
  border-radius: 14px;
  padding: 6px;
  background: rgba(255, 250, 240, 0.65);
  border: 1px solid rgba(154, 116, 55, 0.36);
  box-shadow: 0 8px 20px rgba(48, 30, 12, 0.12);
}

.bp-media-frame img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}

.bp-link-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s var(--ease-ios), border-color 0.25s ease;
}

.bp-link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(154, 116, 55, 0.55);
}

.bp-link-card .link-arrow {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--brass-gold);
}

.bp-turn-tip {
  margin-top: auto;
  padding: 12px 16px;
  border-radius: 11px;
  border: 1px dashed rgba(122, 88, 39, 0.36);
  font-size: 0.88rem;
  color: #5B4633;
  text-align: center;
}

.bp-mechanic-strip {
  padding: 8px 13px;
  border-radius: 11px;
  background: rgba(255, 252, 246, 0.74);
  border: 1px solid rgba(154, 116, 55, 0.28);
  font-size: 0.89rem;
  color: #3B2B1D;
  line-height: 1.54;
  flex-shrink: 0;
}

.bp-mechanic-strip strong {
  color: #1E140B;
}

/* 书页内八大职业卡（配放大圆形黄铜徽章头像） */
.bp-role-card {
  padding: 13px 16px;
  border-radius: 15px;
  background: rgba(255, 252, 245, 0.66);
  border: 1px solid rgba(255, 252, 245, 0.86);
  box-shadow: 0 6px 16px rgba(58, 38, 16, 0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bp-role-head {
  display: flex;
  align-items: center;
  gap: 15px;
}

.bp-role-medallion {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  padding: 3.5px;
  border-radius: 50%;
  border: 1.5px solid rgba(154, 116, 55, 0.58);
  background: linear-gradient(145deg, rgba(255, 252, 245, 0.92) 0%, rgba(214, 190, 146, 0.54) 100%);
  box-shadow: 0 6px 14px rgba(42, 26, 12, 0.18);
  overflow: hidden;
}

.bp-role-medallion img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  filter: sepia(0.04) contrast(1.04);
}

.bp-role-title-col {
  flex: 1;
  min-width: 0;
}

.bp-role-name-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.bp-role-name-row h4 {
  font-family: var(--font-serif-cn);
  font-size: 1.36rem;
  font-weight: 700;
  color: var(--ink-sepia);
  line-height: 1.2;
}

.bp-role-look {
  font-size: 0.86rem;
  color: #54402E;
  line-height: 1.55;
  margin: 4px 0 8px;
}

.bp-role-passive {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.86);
  border: 1px solid rgba(154, 116, 55, 0.24);
}

.bp-role-passive strong {
  font-family: var(--font-serif-en);
  font-size: 1.46rem;
  font-weight: 700;
  line-height: 1;
  color: var(--wax-crimson);
  flex-shrink: 0;
}

.bp-role-passive span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-sepia);
  line-height: 1.45;
}

.bp-role-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.bp-role-pills .role-item-pill {
  padding: 4px 12px;
  font-size: 0.86rem;
}

.bp-role-specs {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bp-role-specs li {
  position: relative;
  padding-left: 13px;
  font-size: 0.91rem;
  color: #36271A;
  line-height: 1.65;
}

.bp-role-specs li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brass-gold);
}

.bp-role-specs strong {
  color: #1E140B;
}

/* 书页内狼人法术与三档充能图 */
.bp-warning-compact {
  padding: 13px 16px;
  margin-bottom: 0;
  gap: 12px;
}

.bp-warning-compact p {
  font-size: 0.95rem;
}

.bp-tier-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bp-tier-item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 20px 8px 12px;
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.84);
  border: 1px solid rgba(154, 116, 55, 0.26);
}

.bp-tier-item.is-max {
  background: linear-gradient(160deg, rgba(139, 34, 40, 0.1) 0%, rgba(255, 251, 242, 0.92) 100%);
  border-color: rgba(139, 34, 40, 0.36);
}

.bp-tier-media {
  width: 104px;
  height: 130px;
}

.bp-tier-item strong {
  font-size: 0.94rem;
  color: var(--ink-sepia);
}

.bp-tier-item > span {
  font-size: 0.8rem;
  color: #5B4633;
}

.bp-spell-card .spell-tier-line {
  padding-top: 10px;
  margin-top: 10px;
  font-size: 0.9rem;
}

.bp-quote-card {
  background: rgba(139, 34, 40, 0.06);
  border-color: rgba(139, 34, 40, 0.22);
}

/* 书页内双阵营目标卡 */
.bp-faction-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 24px;
}

.bp-faction-card.is-explorer-card {
  background: linear-gradient(165deg, rgba(22, 72, 107, 0.08) 0%, rgba(255, 251, 243, 0.68) 55%);
  border-color: rgba(22, 72, 107, 0.26);
}

.bp-faction-card.is-thrall-card {
  background: linear-gradient(165deg, rgba(139, 34, 40, 0.09) 0%, rgba(255, 251, 243, 0.68) 55%);
  border-color: rgba(139, 34, 40, 0.28);
}

.bp-story {
  gap: 14px;
  margin-bottom: 20px;
}

.bp-story p {
  font-size: 1rem;
  line-height: 1.85;
  color: #332418;
}

/* 书页内物品大全配方双列网格（大幅提升可读字号并收紧留白确保整页一览） */
.bp-recipe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}

.bp-recipe-item {
  padding: 9px 12px;
  border-radius: 11px;
  background: rgba(255, 252, 245, 0.72);
  border: 1px solid rgba(154, 116, 55, 0.26);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bp-recipe-item.is-thrall-ri {
  background: linear-gradient(155deg, rgba(139, 34, 40, 0.08) 0%, rgba(255, 252, 245, 0.7) 65%);
  border-color: rgba(139, 34, 40, 0.28);
}

.bp-recipe-item.is-span-2 {
  grid-column: 1 / -1;
}

.bp-ri-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.bp-ri-top-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bp-ri-top strong {
  font-family: var(--font-serif-cn);
  font-size: 1.04rem;
  color: var(--ink-sepia);
}

.bp-ri-top > span:not(.card-tag) {
  font-family: var(--font-serif-en);
  font-style: italic;
  font-size: 0.84rem;
  color: var(--brass-gold);
}

.bp-ri-mat {
  font-size: 0.86rem;
  font-weight: 600;
  color: #144162;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(22, 72, 107, 0.09);
  align-self: flex-start;
}

.bp-recipe-item.is-thrall-ri .bp-ri-mat {
  color: #7A1D23;
  background: rgba(139, 34, 40, 0.1);
}

.bp-recipe-item p {
  font-size: 0.86rem;
  color: #3B2B1D;
  line-height: 1.56;
}

/* P.16 交互速查检索区 */
.bp-search-page-inner {
  gap: 12px;
}

.book-search-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 14px;
  background: rgba(255, 252, 246, 0.8);
  border: 1px solid rgba(154, 116, 55, 0.32);
  flex-shrink: 0;
}

.book-search-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.book-search-input-row .wiki-search-input {
  font-size: 0.92rem;
  padding: 9px 15px;
}

.book-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.book-filter-pill {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(154, 116, 55, 0.34);
  background: rgba(255, 253, 248, 0.88);
  color: #463424;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.book-filter-pill.active {
  background: var(--ink-sepia);
  border-color: var(--ink-sepia);
  color: #F7EEDB;
}

.book-filter-pill.is-thrall-pill.active {
  background: var(--wax-crimson);
  border-color: var(--wax-crimson);
  color: #FAF2E4;
}

.book-search-results {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(154, 116, 55, 0.38) transparent;
}

.book-search-row {
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(255, 252, 246, 0.78);
  border: 1px solid rgba(154, 116, 55, 0.24);
}

.book-search-row.is-thrall-row {
  background: rgba(139, 34, 40, 0.06);
  border-color: rgba(139, 34, 40, 0.26);
}

.book-search-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.book-search-row-top strong {
  font-family: var(--font-serif-cn);
  font-size: 1.02rem;
  color: var(--ink-sepia);
}

.book-search-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.book-search-recipe {
  font-size: 0.88rem;
  font-weight: 600;
  color: #144162;
  margin-bottom: 3px;
}

.book-search-row.is-thrall-row .book-search-recipe {
  color: #7A1D23;
}

.book-search-note {
  font-size: 0.85rem;
  color: #3D2D1F;
  line-height: 1.5;
}

.book-search-empty {
  padding: 28px 14px;
  text-align: center;
  font-size: 0.92rem;
  color: #5B4633;
}

.bp-uncraftable-mini {
  padding: 11px 14px;
  border-radius: 11px;
  background: rgba(22, 72, 107, 0.08);
  border: 1px solid rgba(22, 72, 107, 0.22);
  font-size: 0.86rem;
  color: #36271A;
  line-height: 1.6;
  flex-shrink: 0;
}

.bp-uncraftable-mini strong {
  color: #1E140B;
}

/* 开船规则与单抢梯队组件 */
.bp-sailing-card {
  padding: 11px 15px;
}

.bp-sailing-card h4 {
  font-size: 1.15rem;
  margin-bottom: 5px;
}

.bp-sailing-card .bp-text {
  font-size: 0.91rem;
  line-height: 1.58;
}

.bp-sailing-list {
  list-style: none;
  margin-top: 7px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bp-sailing-list li {
  position: relative;
  padding: 5px 10px 5px 18px;
  border-radius: 9px;
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid rgba(154, 116, 55, 0.2);
  font-size: 0.88rem;
  line-height: 1.48;
  color: #36271A;
}

.bp-sailing-list li::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0.78em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brass-gold);
}

.bp-sailing-list strong {
  color: #1E140B;
}

.bp-sailing-qa {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bp-qa-row {
  padding: 7px 11px;
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid rgba(154, 116, 55, 0.22);
}

.bp-qa-row.is-penalty {
  background: linear-gradient(155deg, rgba(139, 34, 40, 0.08) 0%, rgba(255, 252, 246, 0.82) 70%);
  border-color: rgba(139, 34, 40, 0.32);
}

.bp-qa-row strong:first-child {
  display: block;
  font-family: var(--font-serif-cn);
  font-size: 0.96rem;
  color: var(--ink-sepia);
  margin-bottom: 2px;
}

.bp-qa-row p {
  font-size: 0.88rem;
  line-height: 1.52;
  color: #36271A;
}

.bp-tier-rank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.bp-rank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.84);
  border: 1px solid rgba(154, 116, 55, 0.24);
}

.bp-rank-item strong {
  font-family: var(--font-serif-cn);
  font-size: 1rem;
  color: #1E140B;
}

.bp-rank-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.bp-rank-item.is-t1 {
  background: linear-gradient(145deg, rgba(139, 34, 40, 0.1) 0%, rgba(255, 252, 245, 0.88) 70%);
  border-color: rgba(139, 34, 40, 0.36);
}
.bp-rank-item.is-t1 .bp-rank-badge {
  background: var(--wax-crimson);
  color: #FFF6E8;
}

.bp-rank-item.is-t2 .bp-rank-badge {
  background: #8B652E;
  color: #FFF8EA;
}

.bp-rank-item.is-t3 .bp-rank-badge {
  background: #1F5472;
  color: #F2FAFF;
}

.bp-rank-item.is-t4 .bp-rank-badge {
  background: rgba(92, 74, 54, 0.18);
  color: #4A3828;
}

.bp-charter-card {
  padding: 18px 18px;
}

.bp-blessing {
  margin-top: auto;
  padding: 18px 20px;
}

.bp-blessing-sign {
  display: block;
  margin-top: 6px;
  font-family: var(--font-serif-en);
  font-style: italic;
  font-size: 0.94rem;
  color: var(--brass-gold);
}

/* ==========================================================================
   BOTTOM BOOK CONTROL DOCK (底部翻页控制栏)
   ========================================================================== */
.book-control-dock {
  margin-top: 11px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(34, 24, 16, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(226, 192, 132, 0.3);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  color: #F4E6CC;
  z-index: 60;
}

.dock-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(226, 192, 132, 0.28);
  background: rgba(255, 240, 212, 0.08);
  color: #F4E6CC;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  transition: all 0.22s ease;
  white-space: nowrap;
}

.dock-btn:hover {
  background: rgba(226, 192, 132, 0.22);
  border-color: rgba(246, 218, 158, 0.62);
}

.dock-nav-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dock-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(226, 192, 132, 0.3);
  background: rgba(255, 240, 212, 0.08);
  color: #F4E6CC;
  font-size: 1.2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.dock-icon-btn:hover:not(:disabled) {
  background: rgba(226, 192, 132, 0.25);
}

.dock-icon-btn:disabled {
  opacity: 0.28;
  pointer-events: none;
}

.dock-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 132px;
  line-height: 1.25;
}

.dock-page-num {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: #F3D190;
  letter-spacing: 0.08em;
}

.dock-chapter-name {
  font-size: 0.72rem;
  color: rgba(244, 230, 204, 0.76);
}

/* ==========================================================================
   FLIPBOOK RESPONSIVE ADAPTATION (窄分屏 & 手机端适配)
   ========================================================================== */
@media (max-width: 1120px) {
  .book-viewport {
    width: calc(100vw - 88px);
    height: clamp(660px, calc(100vh - 178px), 800px);
  }
  .book-side-arrow {
    width: 34px;
    height: 34px;
    font-size: 1.3rem;
  }
  .book-stage-row {
    gap: 6px;
  }
  .book-bookmark {
    padding: 8px 10px 17px;
    font-size: 0.79rem;
  }
  .book-page-inner {
    padding: 20px 20px 14px;
  }
  .bp-role-medallion {
    width: 78px;
    height: 78px;
  }
  .bp-tier-media {
    width: 82px;
    height: 104px;
  }
  .bp-recipe-grid,
  .bp-tier-rank-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes mobilePageTurnNext {
  0% {
    opacity: 0.35;
    transform: translateX(22px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes mobilePageTurnPrev {
  0% {
    opacity: 0.35;
    transform: translateX(-22px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 768px) {
  .book-desk {
    min-height: auto;
    padding: 84px 10px 44px;
    display: block;
  }
  .book-bookmarks-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-bottom: 10px;
    padding: 0;
    z-index: 5;
  }
  .book-bookmark {
    flex: 1 1 22%;
    min-width: 82px;
    justify-content: center;
    padding: 8px 6px;
    border-radius: 10px;
    border-bottom: 1px solid rgba(235, 206, 152, 0.36);
    font-size: 0.74rem;
    gap: 3px;
    transform: none !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
  }
  .book-bookmark:hover,
  .book-bookmark.active {
    transform: none !important;
  }
  .book-bookmark.active {
    box-shadow:
      0 0 0 1.5px rgba(246, 218, 158, 0.88),
      0 6px 14px rgba(0, 0, 0, 0.38);
    filter: brightness(1.14);
  }
  .bm-roman {
    font-size: 0.78rem;
  }
  .book-stage-row {
    display: block;
    width: 100%;
  }
  .book-side-arrow,
  .book-hardboard-under,
  .book-spine-center {
    display: none !important;
  }
  /* 移动端彻底扁平化 3D 容器，杜绝微信/安卓 WebView GPU 裁切与丢页 */
  .book-viewport {
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    perspective: none !important;
    user-select: text;
  }
  .logbook-book,
  .logbook-book[data-state="cover"],
  .logbook-book[data-state="open"],
  .logbook-book[data-state="back"] {
    height: auto !important;
    transform: none !important;
    transform-style: flat !important;
    transition: none !important;
  }
  .book-sheet {
    display: none !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    transform: none !important;
    transform-style: flat !important;
    transition: none !important;
    will-change: auto !important;
  }
  .book-sheet.is-mobile-sheet-active {
    display: block !important;
  }
  .sheet-face {
    display: none !important;
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;
    overflow: visible !important;
    border-radius: 14px !important;
  }
  .sheet-face.is-mobile-face-active {
    display: flex !important;
    flex-direction: column;
    min-height: 440px;
  }
  .sheet-face.is-cover-face.is-mobile-face-active {
    min-height: 540px;
  }
  .sheet-face.is-mobile-face-active.is-mobile-turn-next {
    animation: mobilePageTurnNext 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .sheet-face.is-mobile-face-active.is-mobile-turn-prev {
    animation: mobilePageTurnPrev 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .sheet-shade {
    display: none !important;
  }
  .cover-leather,
  .cover-leather.is-back {
    padding: 20px 18px 20px 28px;
    min-height: 540px;
  }
  .cover-inner-frame {
    padding: 28px 18px 24px;
    gap: 18px;
  }
  .book-page.is-left-page,
  .book-page.is-right-page {
    border: 1px solid rgba(196, 154, 88, 0.44);
    box-shadow:
      inset 0 0 26px rgba(102, 72, 36, 0.16),
      0 16px 36px rgba(0, 0, 0, 0.52);
  }
  .book-page-inner,
  .book-page.is-left-page .book-page-inner,
  .book-page.is-right-page .book-page-inner {
    padding: 18px 15px 16px;
    overflow: visible !important;
    gap: 12px;
  }
  .page-head {
    flex-wrap: wrap;
    gap: 4px 10px;
    padding-bottom: 8px;
  }
  .page-chapter-tag {
    font-size: 1.14rem;
  }
  .page-en-kicker {
    font-size: 0.88rem;
  }
  .page-folio {
    padding: 10px 42px 12px;
  }
  .page-corner {
    width: 32px;
    height: 32px;
  }
  .bp-card {
    padding: 15px 14px;
  }
  .bp-headline {
    font-size: 1.3rem;
  }
  .bp-text {
    font-size: 0.95rem;
    line-height: 1.72;
  }
  .bp-role-card {
    padding: 14px 13px;
  }
  .bp-role-head {
    align-items: flex-start;
    gap: 12px;
  }
  .bp-role-medallion {
    width: 72px;
    height: 72px;
  }
  .bp-role-name-row h4 {
    font-size: 1.24rem;
  }
  .bp-role-passive {
    padding: 6px 10px;
    gap: 8px;
  }
  .bp-role-passive strong {
    font-size: 1.24rem;
  }
  .bp-tier-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .bp-tier-row .tier-arrow {
    display: none;
  }
  .bp-tier-item {
    padding: 18px 4px 10px;
  }
  .bp-tier-media {
    width: 74px;
    height: 92px;
  }
  .bp-tier-item strong {
    font-size: 0.82rem;
  }
  .bp-tier-item > span {
    font-size: 0.72rem;
  }
  .bp-faction-card {
    padding: 18px 15px;
  }
  .bp-recipe-grid,
  .bp-tier-rank-grid {
    grid-template-columns: 1fr;
  }
  .book-search-results {
    max-height: 460px;
    overflow-y: auto;
  }
  .book-control-dock {
    width: 100%;
    margin-top: 14px;
    padding: 9px 10px;
    border-radius: 16px;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: nowrap;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(32, 22, 15, 0.96);
  }
  .dock-btn {
    padding: 7px 10px;
    font-size: 0.75rem;
  }
  .dock-nav-group {
    gap: 8px;
  }
  .dock-status {
    min-width: 88px;
  }
  .dock-page-num {
    font-size: 0.74rem;
  }
  .dock-chapter-name {
    font-size: 0.68rem;
  }
  #dockSoundText {
    display: none;
  }
}

/* ==========================================================================
   SECRET EASTER EGG: INVERTED PENTAGRAM ENVELOPE, GHOSTS & 《规则怪谈》
   ========================================================================== */
body.ritual-lock {
  overflow: hidden;
}

.ritual-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.ritual-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ritual-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(74, 12, 18, 0.56) 0%, rgba(12, 5, 8, 0.94) 64%, #050204 100%);
  transition: background 0.8s ease;
}

.ritual-overlay.is-opened .ritual-backdrop {
  background:
    radial-gradient(ellipse at 50% 48%, rgba(92, 10, 18, 0.42) 0%, rgba(8, 3, 6, 0.96) 62%, #030103 100%);
}

.ritual-fog {
  position: absolute;
  inset: -12%;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 22% 35%, rgba(152, 24, 34, 0.24) 0%, transparent 44%),
    radial-gradient(circle at 80% 62%, rgba(130, 160, 185, 0.16) 0%, transparent 46%),
    radial-gradient(circle at 50% 85%, rgba(110, 14, 22, 0.28) 0%, transparent 50%);
  transition: opacity 1.1s ease;
}

.ritual-overlay.is-opened .ritual-fog {
  opacity: 1;
  animation: ritualFogDrift 9s ease-in-out infinite alternate;
}

@keyframes ritualFogDrift {
  0%   { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  100% { transform: translate3d(1.5%, 1.5%, 0) scale(1.06); }
}

/* 拆封后浮现的背景鬼影群 */
.ritual-ghosts {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 1.15s ease;
}

.ritual-overlay.is-opened .ritual-ghosts {
  opacity: 1;
}

.ritual-ghost {
  position: absolute;
  filter: drop-shadow(0 0 22px rgba(205, 38, 52, 0.32)) blur(0.4px);
  opacity: 0;
}

.ritual-overlay.is-opened .ghost-1 {
  left: 4%;
  top: 10%;
  width: clamp(130px, 16vw, 230px);
  animation: ghostFloatA 7.4s ease-in-out infinite, ghostFlicker 5.2s ease-in-out infinite;
}

.ritual-overlay.is-opened .ghost-2 {
  right: 4%;
  top: 14%;
  width: clamp(140px, 17vw, 245px);
  animation: ghostFloatB 8.2s ease-in-out 0.35s infinite, ghostFlicker 6.1s ease-in-out 0.7s infinite;
}

.ritual-overlay.is-opened .ghost-3 {
  left: 14%;
  bottom: 4%;
  width: clamp(105px, 12vw, 175px);
  animation: ghostFloatB 9.2s ease-in-out 0.8s infinite, ghostFlicker 4.8s ease-in-out 1.1s infinite;
}

.ritual-overlay.is-opened .ghost-4 {
  right: 14%;
  bottom: 5%;
  width: clamp(110px, 12.5vw, 180px);
  animation: ghostFloatA 8.6s ease-in-out 1.2s infinite, ghostFlicker 5.7s ease-in-out 0.4s infinite;
}

@keyframes ghostFloatA {
  0%, 100% { transform: translate3d(0, 14px, 0) rotate(-3deg) scale(0.96); }
  50%      { transform: translate3d(14px, -22px, 0) rotate(3deg) scale(1.04); }
}

@keyframes ghostFloatB {
  0%, 100% { transform: translate3d(0, -10px, 0) rotate(2.5deg) scale(1.02); }
  50%      { transform: translate3d(-16px, 20px, 0) rotate(-3deg) scale(0.95); }
}

@keyframes ghostFlicker {
  0%, 100% { opacity: 0.48; }
  22%      { opacity: 0.86; }
  38%      { opacity: 0.32; }
  55%      { opacity: 0.92; }
  76%      { opacity: 0.42; }
}

.ritual-close-x {
  position: absolute;
  top: 20px;
  right: 22px;
  z-index: 20;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(235, 188, 162, 0.36);
  background: rgba(24, 9, 12, 0.78);
  color: #F4DFCE;
  font-size: 1.55rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.22s ease;
}

.ritual-close-x:hover {
  background: rgba(139, 28, 36, 0.85);
  border-color: rgba(255, 198, 178, 0.72);
  transform: scale(1.08);
}

.ritual-stage {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 阶段一：暗黑血漆倒五芒星信封 */
.pentagram-envelope {
  position: relative;
  width: min(440px, 88vw);
  height: min(296px, 60vw);
  min-height: 228px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  transform: scale(0.92) translateY(14px);
  opacity: 0;
  transition: transform 0.55s var(--ease-ios), opacity 0.45s ease;
}

.ritual-overlay.is-visible .pentagram-envelope {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.ritual-overlay.is-visible:not(.is-opening) .pentagram-envelope:hover {
  transform: translateY(-6px) scale(1.02);
}

.ritual-overlay.is-opened .pentagram-envelope {
  display: none;
}

.env-back-body {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 50% 45%, #3A1F1C 0%, #231111 65%, #160A0B 100%);
  border: 1.5px solid rgba(196, 134, 92, 0.42);
  box-shadow:
    0 32px 72px rgba(0, 0, 0, 0.82),
    0 0 42px rgba(154, 24, 34, 0.32),
    inset 0 0 34px rgba(0, 0, 0, 0.52);
}

.env-left-fold,
.env-right-fold,
.env-bottom-fold {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  pointer-events: none;
}

.env-left-fold {
  background: linear-gradient(135deg, rgba(64, 34, 28, 0.92) 0%, rgba(34, 16, 16, 0.95) 100%);
  clip-path: polygon(0 0, 52% 52%, 0 100%);
}

.env-right-fold {
  background: linear-gradient(225deg, rgba(60, 31, 26, 0.92) 0%, rgba(30, 14, 14, 0.95) 100%);
  clip-path: polygon(100% 0, 48% 52%, 100% 100%);
}

.env-bottom-fold {
  background: linear-gradient(0deg, #2D1615 0%, #3F211D 100%);
  clip-path: polygon(0 100%, 50% 46%, 100% 100%);
  border-bottom: 1px solid rgba(206, 148, 102, 0.35);
}

.env-top-flap {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #47241F 0%, #2C1414 100%);
  clip-path: polygon(0 0, 100% 0, 50% 56%);
  transform-origin: top center;
  transition: transform 0.45s cubic-bezier(0.32, 0.08, 0.24, 1), opacity 0.38s ease;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.56));
}

.ritual-overlay.is-opening .env-top-flap {
  transform: scaleY(-0.55);
  opacity: 0.45;
}

.env-seal-medallion {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 96px;
  height: 96px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 32%, #B5262E 0%, #7C141B 58%, #47080D 100%);
  border: 2px solid rgba(246, 198, 162, 0.55);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.68),
    0 0 28px rgba(206, 36, 48, 0.62),
    inset 0 2px 6px rgba(255, 206, 186, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  animation: pentagramPulse 2.4s ease-in-out infinite;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.ritual-overlay.is-opening .env-seal-medallion {
  transform: translate(-50%, -50%) scale(1.26) rotate(18deg);
  opacity: 0;
}

@keyframes pentagramPulse {
  0%, 100% { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.68), 0 0 24px rgba(206, 36, 48, 0.52); }
  50%      { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.72), 0 0 40px rgba(240, 56, 68, 0.85); }
}

.pentagram-svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 5px rgba(255, 212, 184, 0.45));
}

.env-click-hint {
  position: absolute;
  left: 50%;
  bottom: -44px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-serif-cn);
  font-size: 0.96rem;
  letter-spacing: 0.16em;
  color: #F0CBB8;
  text-shadow: 0 2px 12px rgba(180, 26, 38, 0.75);
  animation: envHintBlink 2.2s ease-in-out infinite;
}

@keyframes envHintBlink {
  0%, 100% { opacity: 0.65; }
  50%      { opacity: 1; }
}

/* 阶段二：拆封后展开的《规则怪谈》泛黄秘信 */
.haunted-letter {
  display: none;
  position: relative;
  width: 100%;
  max-height: min(86vh, 720px);
  overflow-y: auto;
  padding: 30px 30px 26px;
  border-radius: 14px;
  color: #24150E;
  background:
    radial-gradient(circle at 86% 14%, rgba(138, 18, 24, 0.18) 0%, transparent 28%),
    radial-gradient(circle at 12% 88%, rgba(118, 14, 22, 0.16) 0%, transparent 32%),
    radial-gradient(ellipse at 50% 45%, #F2E4C8 0%, #DFCA9F 72%, #BFA072 100%);
  border: 1.5px solid rgba(139, 34, 40, 0.48);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.86),
    0 0 60px rgba(154, 22, 32, 0.34),
    inset 0 0 42px rgba(68, 36, 16, 0.32);
}

.ritual-overlay.is-opened .haunted-letter {
  display: block;
  animation: letterUnfold 0.56s cubic-bezier(0.2, 0.9, 0.25, 1) forwards;
}

@keyframes letterUnfold {
  0% {
    opacity: 0;
    transform: translateY(34px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.haunted-letter-watermark {
  position: absolute;
  right: 16px;
  top: 12px;
  width: 112px;
  height: 112px;
  color: #8B1C24;
  opacity: 0.13;
  pointer-events: none;
}

.haunted-letter-head {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1.5px dashed rgba(139, 28, 36, 0.36);
}

.haunted-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  color: #7E242A;
  margin-bottom: 6px;
}

.haunted-title {
  font-family: var(--font-serif-cn);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  padding-left: 0.22em;
  color: #7E1118;
  text-shadow: 0 2px 14px rgba(154, 22, 32, 0.28);
}

.haunted-rules-list {
  position: relative;
  z-index: 2;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 22px;
}

.haunted-rules-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 10px;
  background: rgba(255, 249, 236, 0.62);
  border: 1px solid rgba(114, 72, 38, 0.24);
  font-size: 0.98rem;
  line-height: 1.68;
  color: #26160E;
}

.haunted-rules-list li.is-curse-rule {
  background: rgba(139, 24, 32, 0.11);
  border-color: rgba(139, 24, 32, 0.42);
  color: #5E0E14;
}

.hr-num {
  font-family: var(--font-serif-en);
  font-size: 1.15rem;
  font-weight: 700;
  color: #8B1C24;
  flex-shrink: 0;
  line-height: 1.45;
}

.haunted-rules-list strong {
  color: #6B0E14;
}

.haunted-letter-foot {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(139, 28, 36, 0.34);
}

.haunted-laugh {
  font-family: var(--font-serif-cn);
  font-size: 1.38rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: #8B1119;
  text-shadow: 0 0 12px rgba(185, 22, 34, 0.32);
  animation: laughShiver 2.8s ease-in-out infinite;
}

@keyframes laughShiver {
  0%, 100% { transform: translateX(0); opacity: 0.92; }
  48%      { transform: translateX(0); opacity: 1; }
  50%      { transform: translateX(-2px) rotate(-0.8deg); opacity: 0.78; }
  52%      { transform: translateX(2px) rotate(0.8deg); opacity: 1; }
  54%      { transform: translateX(0); }
}

.haunted-exit-btn {
  padding: 9px 22px;
  border-radius: 999px;
  border: 1px solid rgba(110, 22, 28, 0.45);
  background: #2C1414;
  color: #F6E5CE;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  transition: all 0.22s ease;
}

.haunted-exit-btn:hover {
  background: #7A141C;
  border-color: rgba(255, 206, 186, 0.65);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .ritual-overlay {
    padding: 14px;
  }
  .haunted-letter {
    padding: 22px 16px 20px;
    max-height: 84vh;
  }
  .haunted-rules-list li {
    padding: 9px 11px;
    font-size: 0.92rem;
    line-height: 1.62;
  }
  .env-seal-medallion {
    width: 82px;
    height: 82px;
  }
  .ritual-overlay.is-opened .ghost-1 { left: -4%; top: 4%; width: 125px; }
  .ritual-overlay.is-opened .ghost-2 { right: -4%; top: 6%; width: 130px; }
  .ritual-overlay.is-opened .ghost-3 { left: -2%; bottom: 2%; width: 105px; }
  .ritual-overlay.is-opened .ghost-4 { right: -2%; bottom: 2%; width: 105px; }
}
