/* ==========================================================================
   《老人与海》20页中英双语写实动画连环漫画 — 样式表
   Aesthetic: Salt-Washed Literary Folio & Animated Graphic Novel Theater
   ========================================================================== */

:root {
  --bg-deep: #0b1117;
  --bg-panel: rgba(15, 22, 30, 0.86);
  --bg-card: rgba(20, 29, 39, 0.92);
  --parchment: #f3ecdc;
  --parchment-muted: #d5cbb4;
  --ink-dark: #1d1a16;
  --ink-sepia: #4a3a2a;
  --accent-gold: #c9a26b;
  --accent-sea: #6fa0bf;
  --accent-crimson: #b84a42;
  --border-subtle: rgba(213, 203, 180, 0.16);
  --border-warm: rgba(201, 162, 107, 0.35);
  --shadow-deep: 0 24px 64px rgba(0, 0, 0, 0.65);
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", Georgia, "Times New Roman", serif;
  --font-sans: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", ui-monospace, monospace;
}

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

html, body {
  min-height: 100%;
  background: var(--bg-deep);
  color: var(--parchment);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Dynamic Atmospheric Mood Backdrops */
.ambient-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transition: background 1.4s ease;
  background: radial-gradient(ellipse at 50% 25%, #1d2c3a 0%, #0b1117 75%);
}
body[data-mood="dusk-silver"] .ambient-backdrop {
  background: radial-gradient(ellipse at 50% 20%, #2a3642 0%, #111820 75%);
}
body[data-mood="warm-dusk"] .ambient-backdrop {
  background: radial-gradient(ellipse at 65% 22%, #3d2e20 0%, #121418 75%);
}
body[data-mood="starlight"] .ambient-backdrop {
  background: radial-gradient(ellipse at 50% 18%, #142238 0%, #070b12 80%);
}
body[data-mood="dawn-cobalt"] .ambient-backdrop {
  background: radial-gradient(ellipse at 50% 20%, #1a3852 0%, #0b141e 78%);
}
body[data-mood="midday-glare"] .ambient-backdrop {
  background: radial-gradient(ellipse at 50% 15%, #1e4666 0%, #0a1521 80%);
}
body[data-mood="dawn-blood"] .ambient-backdrop {
  background: radial-gradient(ellipse at 45% 25%, #3b2429 0%, #0e131a 78%);
}
body[data-mood="crimson-action"] .ambient-backdrop {
  background: radial-gradient(ellipse at 50% 25%, #471d1d 0%, #0d1219 78%);
}
body[data-mood="sunset-tragic"] .ambient-backdrop {
  background: radial-gradient(ellipse at 50% 22%, #4e241b 0%, #101014 78%);
}
body[data-mood="midnight-fire"] .ambient-backdrop {
  background: radial-gradient(ellipse at 50% 25%, #0e2830 0%, #05080d 80%);
}
body[data-mood="predawn-harbor"] .ambient-backdrop {
  background: radial-gradient(ellipse at 60% 20%, #222a36 0%, #0a0e14 80%);
}
body[data-mood="dawn-silver"] .ambient-backdrop {
  background: radial-gradient(ellipse at 50% 20%, #2d3740 0%, #11161c 78%);
}
body[data-mood="golden-finale"] .ambient-backdrop {
  background: radial-gradient(ellipse at 65% 20%, #4a3822 0%, #12151a 78%);
}

/* Subtle paper grain overlay */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Opening Cover Curtain
   ========================================================================== */
.cover-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #080d13;
  overflow: hidden;
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.9s ease;
}
.cover-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.cover-bg-img {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  object-fit: cover;
  opacity: 0.42;
  filter: saturate(0.85) contrast(1.06);
  animation: coverFloat 22s ease-in-out infinite alternate;
}
@keyframes coverFloat {
  from { transform: scale(1.0) translate(0, 0); }
  to { transform: scale(1.08) translate(-1.5%, -1%); }
}
.cover-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(11, 17, 23, 0.25) 0%, rgba(7, 11, 16, 0.88) 72%, #06090e 100%),
    linear-gradient(180deg, rgba(7, 11, 16, 0.72) 0%, transparent 30%, rgba(7, 11, 16, 0.92) 100%);
}
.cover-waves {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 110px;
  opacity: 0.16;
  pointer-events: none;
  animation: waveDrift 16s linear infinite;
}
@keyframes waveDrift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.cover-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  padding: 22px 28px;
  text-align: center;
  animation: fadeUpIn 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes fadeUpIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.cover-kicker {
  display: inline-block;
  font-size: 0.76rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-gold);
  border: 1px solid var(--border-warm);
  background: rgba(15, 22, 30, 0.65);
  padding: 5px 15px;
  border-radius: 999px;
  margin-bottom: 14px;
  backdrop-filter: blur(8px);
}
.cover-title-zh {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4.3rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--parchment);
  text-shadow: 0 8px 36px rgba(0, 0, 0, 0.75);
  margin-bottom: 4px;
}
.cover-title-en {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.08rem, 2.1vw, 1.5rem);
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  margin-bottom: 16px;
}
.cover-subtitle {
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--parchment-muted);
  max-width: 620px;
  margin: 0 auto 22px;
}
.cover-meta-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}
.cover-pill {
  font-size: 0.78rem;
  padding: 5px 13px;
  border-radius: 6px;
  background: rgba(243, 236, 220, 0.08);
  border: 1px solid rgba(243, 236, 220, 0.16);
  color: var(--parchment);
}
.cover-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  font-family: var(--font-serif);
  font-size: 1.04rem;
  letter-spacing: 0.08em;
  color: #16120d;
  background: linear-gradient(135deg, #e0bd85 0%, #b98d4e 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(201, 162, 107, 0.32);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(201, 162, 107, 0.45);
  filter: brightness(1.06);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  font-size: 0.94rem;
  color: var(--parchment);
  background: rgba(20, 29, 39, 0.75);
  border: 1px solid var(--border-warm);
  border-radius: 8px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.btn-secondary:hover {
  background: rgba(34, 48, 63, 0.9);
  border-color: var(--accent-gold);
  transform: translateY(-2px);
}
.cover-footnote {
  margin-top: 28px;
  font-size: 0.74rem;
  color: rgba(213, 203, 180, 0.58);
  line-height: 1.6;
}

/* ==========================================================================
   Top Navigation Header
   ========================================================================== */
.app-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 22px;
  background: rgba(11, 17, 23, 0.84);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(14px);
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.brand-zh {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--parchment);
}
.brand-en {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.84rem;
  color: var(--accent-gold);
}

.act-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}
.act-tab {
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--parchment-muted);
  cursor: pointer;
  transition: all 0.22s ease;
  white-space: nowrap;
}
.act-tab:hover {
  color: var(--parchment);
  background: rgba(255, 255, 255, 0.06);
}
.act-tab.active {
  color: #17130e;
  background: var(--accent-gold);
  font-weight: 600;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  font-size: 0.78rem;
  color: var(--parchment);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.tool-btn:hover {
  background: rgba(201, 162, 107, 0.18);
  border-color: var(--border-warm);
}
.tool-btn.active {
  background: rgba(201, 162, 107, 0.28);
  border-color: var(--accent-gold);
  color: #f8e5c2;
}
.tool-btn.species-btn {
  border-color: rgba(111, 160, 191, 0.45);
  color: #b7daf0;
}
.tool-btn.species-btn:hover {
  background: rgba(111, 160, 191, 0.22);
}

/* ==========================================================================
   Theater Reading Mode (Animated Single-Page Stage)
   ========================================================================== */
.theater-view {
  flex: 1;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.theater-view.hidden {
  display: none;
}

/* Stage Container */
.stage-wrapper {
  position: relative;
  width: min(100%, calc(66vh * 16 / 9));
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: #080d12;
  border: 1px solid var(--border-warm);
  box-shadow: var(--shadow-deep), 0 0 0 1px rgba(0, 0, 0, 0.8) inset;
  perspective: 1200px;
}

.stage-art-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.28s ease-out;
}

.stage-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  will-change: transform, opacity;
  filter: contrast(1.03) saturate(0.98);
}

/* Page Transition States */
.stage-art-layer.page-enter-next {
  animation: pageEnterNext 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.stage-art-layer.page-enter-prev {
  animation: pageEnterPrev 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes pageEnterNext {
  0% { opacity: 0; transform: translateX(3.5%) scale(1.03); filter: brightness(0.72); }
  100% { opacity: 1; transform: translateX(0) scale(1); filter: brightness(1); }
}
@keyframes pageEnterPrev {
  0% { opacity: 0; transform: translateX(-3.5%) scale(1.03); filter: brightness(0.72); }
  100% { opacity: 1; transform: translateX(0) scale(1); filter: brightness(1); }
}

/* Ken Burns Camera Choreography */
.kb-zoom-in-right { animation: kbZoomInRight 16s ease-in-out infinite alternate; }
.kb-zoom-in-left { animation: kbZoomInLeft 16s ease-in-out infinite alternate; }
.kb-zoom-in-center { animation: kbZoomInCenter 15s ease-in-out infinite alternate; }
.kb-zoom-out-slow { animation: kbZoomOutSlow 17s ease-in-out infinite alternate; }
.kb-pan-left { animation: kbPanLeft 16s ease-in-out infinite alternate; }
.kb-pan-right { animation: kbPanRight 16s ease-in-out infinite alternate; }
.kb-epic-rise { animation: kbEpicRise 15s ease-in-out infinite alternate; }

@keyframes kbZoomInRight {
  from { transform: scale(1.0) translate(0, 0); }
  to { transform: scale(1.08) translate(-1.8%, -0.8%); }
}
@keyframes kbZoomInLeft {
  from { transform: scale(1.0) translate(0, 0); }
  to { transform: scale(1.08) translate(1.8%, -0.6%); }
}
@keyframes kbZoomInCenter {
  from { transform: scale(1.0) translate(0, 0); }
  to { transform: scale(1.075) translate(0, -1%); }
}
@keyframes kbZoomOutSlow {
  from { transform: scale(1.085) translate(0, -0.8%); }
  to { transform: scale(1.0) translate(0, 0); }
}
@keyframes kbPanLeft {
  from { transform: scale(1.06) translate(1.8%, 0); }
  to { transform: scale(1.06) translate(-1.8%, 0); }
}
@keyframes kbPanRight {
  from { transform: scale(1.06) translate(-1.8%, 0); }
  to { transform: scale(1.06) translate(1.8%, 0); }
}
@keyframes kbEpicRise {
  from { transform: scale(1.07) translate(0, 1.8%); }
  to { transform: scale(1.02) translate(-0.8%, -1.6%); }
}

body.reduce-motion .stage-img {
  animation: none !important;
}

/* Particle FX Canvas on Stage */
#fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
}

/* Subtle Vignette for Legibility */
.stage-vignette {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.45);
  background: linear-gradient(180deg, rgba(6, 10, 14, 0.26) 0%, transparent 24%, transparent 74%, rgba(6, 10, 14, 0.56) 100%);
}

/* Floating Page Badge inside Stage */
.stage-page-badge {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(11, 17, 23, 0.72);
  border: 1px solid rgba(201, 162, 107, 0.35);
  backdrop-filter: blur(8px);
  font-size: 0.76rem;
  color: var(--parchment);
  letter-spacing: 0.06em;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.stage-page-badge strong {
  color: var(--accent-gold);
  font-family: var(--font-mono);
}

/* Animated Comic Speech Bubbles & Captions */
.bubbles-layer {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  padding: 20px 26px;
  transition: opacity 0.35s ease;
}
body.clean-art .bubbles-layer,
body.clean-art .stage-page-badge {
  opacity: 0;
}

.comic-bubble {
  position: absolute;
  max-width: min(370px, 42%);
  padding: 11px 16px;
  border-radius: 12px;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  animation: bubbleReveal 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
}
@keyframes bubbleReveal {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.comic-bubble.type-speech {
  background: rgba(247, 241, 227, 0.94);
  color: var(--ink-dark);
  border: 2px solid #2b231b;
  border-radius: 18px;
}
.comic-bubble.type-thought {
  background: rgba(235, 242, 248, 0.92);
  color: #1a2430;
  border: 2px dashed #466178;
  border-radius: 22px;
}
.comic-bubble.type-caption {
  background: rgba(238, 226, 198, 0.93);
  color: #261e16;
  border: 1.5px solid #59442b;
  border-left: 4px solid #8a6435;
  border-radius: 4px;
}

.comic-bubble.pos-top-left { top: 20px; left: 22px; }
.comic-bubble.pos-top-right { top: 20px; right: 22px; }
.comic-bubble.pos-bottom-left { bottom: 24px; left: 22px; }
.comic-bubble.pos-bottom-right { bottom: 24px; right: 22px; }

.bubble-speaker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7c5628;
  margin-bottom: 4px;
}
.bubble-zh {
  font-family: var(--font-serif);
  font-size: 0.94rem;
  line-height: 1.5;
  font-weight: 600;
}
.bubble-en {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #4b3e30;
  margin-top: 4px;
}

/* Language Visibility Rules */
body[data-lang="zh"] .lang-en { display: none !important; }
body[data-lang="en"] .lang-zh { display: none !important; }

/* Stage Side Prev / Next Arrows */
.stage-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9;
  width: 46px;
  height: 76px;
  border: 1px solid rgba(243, 236, 220, 0.22);
  border-radius: 10px;
  background: rgba(11, 17, 23, 0.56);
  color: var(--parchment);
  font-size: 1.5rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
  transition: all 0.24s ease;
}
.stage-wrapper:hover .stage-nav-btn {
  opacity: 0.95;
}
.stage-nav-btn:hover {
  background: rgba(201, 162, 107, 0.88);
  color: #16120d;
  border-color: var(--accent-gold);
}
.stage-nav-btn.prev { left: 14px; }
.stage-nav-btn.next { right: 14px; }
.stage-nav-btn:disabled {
  opacity: 0.18;
  cursor: not-allowed;
}

/* Auto-play Progress Bar */
.autoplay-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 10;
  background: linear-gradient(90deg, var(--accent-sea), var(--accent-gold));
  box-shadow: 0 0 10px rgba(201, 162, 107, 0.7);
}

/* ==========================================================================
   Editorial Storyboard & Bilingual Quote Panel Below Stage
   ========================================================================== */
.story-panel {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px 24px;
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.38);
}

.story-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.meta-chip {
  font-size: 0.74rem;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(201, 162, 107, 0.14);
  border: 1px solid rgba(201, 162, 107, 0.3);
  color: var(--accent-gold);
}
.meta-chip.shot {
  background: rgba(111, 160, 191, 0.14);
  border-color: rgba(111, 160, 191, 0.32);
  color: #a9d0e8;
}

.story-title-zh {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--parchment);
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}
.story-title-en {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--parchment-muted);
  margin-bottom: 14px;
}

.quote-box {
  position: relative;
  padding: 14px 18px 14px 20px;
  border-left: 3px solid var(--accent-gold);
  background: rgba(243, 236, 220, 0.045);
  border-radius: 0 8px 8px 0;
}
.quote-en {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.65;
  color: #f6ead4;
  margin-bottom: 8px;
}
.quote-zh {
  font-family: var(--font-serif);
  font-size: 0.96rem;
  line-height: 1.72;
  color: var(--parchment-muted);
}

.story-right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  border-left: 1px solid var(--border-subtle);
  padding-left: 20px;
}
.narration-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-sea);
  margin-bottom: 6px;
}
.narration-zh {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--parchment);
  margin-bottom: 6px;
}
.narration-en {
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(213, 203, 180, 0.74);
  font-style: italic;
}

.species-badges-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.species-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  background: rgba(78, 127, 168, 0.18);
  border: 1px solid rgba(111, 160, 191, 0.4);
  color: #cde6f7;
  cursor: pointer;
  transition: all 0.2s ease;
}
.species-pill:hover {
  background: rgba(111, 160, 191, 0.34);
  border-color: #9ed0ee;
  transform: translateY(-1px);
}
.species-pill em {
  font-family: var(--font-serif);
  color: var(--accent-gold);
}

/* ==========================================================================
   20-Page Filmstrip Thumbnail Scrubber
   ========================================================================== */
.filmstrip-section {
  background: rgba(11, 17, 23, 0.78);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 14px;
}
.filmstrip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.76rem;
  color: var(--parchment-muted);
}
.filmstrip-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 162, 107, 0.4) transparent;
}
.thumb-card {
  position: relative;
  flex: 0 0 112px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.62;
  transition: all 0.22s ease;
  background: #0c1218;
}
.thumb-card:hover {
  opacity: 0.95;
  transform: translateY(-2px);
}
.thumb-card.active {
  opacity: 1;
  border-color: var(--accent-gold);
  box-shadow: 0 0 14px rgba(201, 162, 107, 0.45);
}
.thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb-num {
  position: absolute;
  bottom: 3px;
  right: 5px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(8, 12, 17, 0.8);
  color: var(--parchment);
}
.thumb-act-dot {
  position: absolute;
  top: 4px;
  left: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

/* ==========================================================================
   Vertical Bilingual Comic Strip Mode (长卷模式)
   ========================================================================== */
.scroll-view {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 44px;
}
.scroll-view.hidden {
  display: none;
}

.scroll-act-banner {
  text-align: center;
  padding: 24px 16px 6px;
}
.scroll-act-banner .act-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 6px;
}
.scroll-act-banner h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  letter-spacing: 0.12em;
  color: var(--parchment);
}
.scroll-act-banner .act-divider {
  width: 90px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  margin: 14px auto 0;
}

.scroll-page-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-deep);
  opacity: 0.94;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.scroll-page-card.in-view {
  opacity: 1;
  transform: translateY(0);
}
.scroll-art-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #090e14;
}
.scroll-art-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 8s ease-out;
}
.scroll-page-card.in-view .scroll-art-wrap img {
  transform: scale(1.035);
}
.scroll-body {
  padding: 22px 26px 26px;
}
.scroll-header-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}
.scroll-page-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-gold);
  letter-spacing: 0.1em;
}
.scroll-title {
  font-family: var(--font-serif);
  font-size: 1.38rem;
  color: var(--parchment);
  margin-bottom: 4px;
}
.scroll-title-en {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--parchment-muted);
  margin-bottom: 14px;
}

/* ==========================================================================
   Marine Biology Field Guide Drawer
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(5, 9, 14, 0.72);
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}
.drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.species-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  width: min(560px, 94vw);
  background: #0f1720;
  border-left: 1px solid var(--border-warm);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.7);
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
}
.species-drawer.open {
  transform: translateX(0);
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(11, 17, 23, 0.9);
}
.drawer-header h3 {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  color: var(--parchment);
}
.drawer-header small {
  display: block;
  font-size: 0.75rem;
  color: var(--accent-gold);
  margin-top: 2px;
}
.drawer-close {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.06);
  color: var(--parchment);
  font-size: 1.15rem;
  cursor: pointer;
}
.drawer-close:hover {
  background: rgba(184, 74, 66, 0.35);
  border-color: var(--accent-crimson);
}
.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.species-card {
  background: rgba(20, 30, 41, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 16px 18px;
  transition: border-color 0.25s ease;
}
.species-card.highlighted {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 1px rgba(201, 162, 107, 0.35), 0 8px 28px rgba(0, 0, 0, 0.35);
}
.species-card-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}
.species-name-zh {
  font-family: var(--font-serif);
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--parchment);
}
.species-latin {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--accent-gold);
}
.species-sub {
  font-size: 0.76rem;
  color: #9bc4df;
  margin-bottom: 10px;
}
.species-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.species-features li {
  font-size: 0.83rem;
  line-height: 1.6;
  color: var(--parchment-muted);
}
.species-features strong {
  color: var(--parchment);
}
.species-jump-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}
.jump-page-btn {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(201, 162, 107, 0.14);
  border: 1px solid rgba(201, 162, 107, 0.35);
  color: var(--accent-gold);
  cursor: pointer;
}
.jump-page-btn:hover {
  background: var(--accent-gold);
  color: #16120d;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 980px) {
  .act-tabs { display: none; }
  .story-panel {
    grid-template-columns: 1fr;
    padding: 16px 18px;
  }
  .story-right {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
    padding-left: 0;
    padding-top: 14px;
  }
  .comic-bubble {
    max-width: 60%;
    padding: 8px 12px;
  }
  .bubble-zh { font-size: 0.84rem; }
  .bubble-en { font-size: 0.72rem; }
}

@media (max-width: 640px) {
  .topbar { padding: 8px 12px; }
  .brand-en { display: none; }
  .theater-view { padding: 10px 12px 20px; }
  .stage-nav-btn { width: 34px; height: 54px; font-size: 1.15rem; }
  .comic-bubble { max-width: 78%; padding: 7px 10px; }
  .stage-page-badge { font-size: 0.68rem; padding: 3px 10px; }
}
