@font-face {
  font-family: "LXGWWenKaiTC";
  src: url("fonts/LXGWWenKaiTC-Medium.subset.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-deep: #151311;
  --bg-lacquer: #1f1b18;
  --paper-warm: #faf6ee;
  --paper-ivory: #fffdf9;
  --paper-edge: #e4dac8;
  --ink-primary: #1a1816;
  --ink-secondary: #4e473f;
  --ink-muted: #786f63;
  --cinnabar: #9e2a22;
  --cinnabar-bright: #c2382e;
  --gold: #b88a44;
  --gold-soft: #d9be8b;
  --jade: #3c6e63;
  --font-zh: "LXGWWenKaiTC", "Songti TC", "Kaiti TC", "Noto Serif CJK TC", serif;
  --font-serif: "Baskerville", "Palatino Linotype", "Book Antiqua", "Georgia", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --shadow-elevated: 0 22px 60px rgba(10, 8, 6, 0.35), 0 4px 16px rgba(10, 8, 6, 0.18);
  --shadow-paper: 0 14px 42px rgba(24, 18, 12, 0.14), 0 2px 8px rgba(24, 18, 12, 0.08);
}

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

[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 18%, #2a241e 0%, #171411 65%, #100e0c 100%);
  color: var(--ink-primary);
  font-family: var(--font-serif);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  padding-bottom: 24px;
}

/* ==========================================================================
   WELCOME / CEREMONIAL PORTAL OVERLAY
   ========================================================================== */
.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(14, 12, 10, 0.88);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.welcome-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.welcome-card {
  max-width: 1020px;
  width: 100%;
  background: linear-gradient(135deg, #fbf7ef 0%, #f4ede0 100%);
  border: 1px solid var(--gold-soft);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65);
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 38px;
  padding: 36px;
  position: relative;
  overflow: hidden;
}

.welcome-cover-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cover-frame {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(25, 18, 10, 0.32);
  border: 1px solid rgba(184, 138, 68, 0.45);
  background: #eee5d5;
  max-width: 290px;
}

.cover-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.welcome-text-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.seal-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.red-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--cinnabar);
  color: #fff8f0;
  font-family: var(--font-zh);
  font-size: 12px;
  line-height: 1.1;
  border-radius: 4px;
  border: 1.5px solid #f7d9d4;
  outline: 2px solid var(--cinnabar);
  text-align: center;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.welcome-kicker {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cinnabar);
}

.zh-calligraphy {
  font-family: var(--font-zh);
  font-size: clamp(2.1rem, 3.5vw, 3rem);
  font-weight: 500;
  margin: 4px 0 6px;
  color: var(--ink-primary);
  letter-spacing: 0.08em;
}

.welcome-text-col h2 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 400;
  color: var(--ink-secondary);
  margin: 0 0 16px;
}

.welcome-desc {
  font-size: 1.04rem;
  line-height: 1.65;
  color: var(--ink-secondary);
  margin: 0 0 18px;
}

.welcome-quote {
  background: rgba(184, 138, 68, 0.09);
  border-left: 3px solid var(--cinnabar);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 24px;
}

.welcome-quote .zh-quote {
  font-family: var(--font-zh);
  font-size: 1.12rem;
  margin: 0 0 4px;
  color: var(--ink-primary);
}

.welcome-quote .de-quote {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin: 0;
  font-style: italic;
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn-primary-gold {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--cinnabar) 0%, #7d1e17 100%);
  color: #fffaf2;
  border: 1px solid rgba(255, 225, 180, 0.4);
  padding: 14px 24px;
  border-radius: 999px;
  font-family: var(--font-serif);
  font-size: 1.03rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(158, 42, 34, 0.38);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(158, 42, 34, 0.5);
}

.btn-secondary-ink {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--ink-primary);
  border: 1px solid rgba(26, 24, 22, 0.28);
  padding: 13px 22px;
  border-radius: 999px;
  font-family: var(--font-serif);
  font-size: 0.98rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-secondary-ink:hover {
  background: rgba(26, 24, 22, 0.06);
}

/* ==========================================================================
   TOP MASTHEAD
   ========================================================================== */
.masthead {
  position: sticky;
  top: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 24px;
  background: rgba(24, 20, 17, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(217, 190, 139, 0.2);
  color: #f5efe6;
}

.masthead-left, .masthead-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 248, 236, 0.08);
  color: #f5efe6;
  border: 1px solid rgba(217, 190, 139, 0.28);
  border-radius: 999px;
  padding: 6px 13px;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.nav-pill-btn:hover {
  background: rgba(255, 248, 236, 0.16);
  border-color: var(--gold);
}

.zh-badge {
  font-family: var(--font-zh);
  color: var(--gold-soft);
  font-size: 0.95rem;
}

.brand-wordmark {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: #f9f4eb;
}

.seal-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--cinnabar);
  color: #fff;
  font-family: var(--font-zh);
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid rgba(255, 230, 220, 0.6);
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-titles strong {
  font-family: var(--font-zh);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.brand-titles span {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--gold-soft);
  letter-spacing: 0.04em;
}

.segmented-control {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(217, 190, 139, 0.24);
  border-radius: 999px;
  padding: 2px;
}

.seg-btn {
  background: transparent;
  color: #d8cfc2;
  border: none;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.seg-btn.active {
  background: var(--gold);
  color: #161310;
  font-weight: 600;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.07);
  color: #f5efe6;
  border: 1px solid rgba(217, 190, 139, 0.25);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* ==========================================================================
   STAGE CONTAINER & CONTEXT BAR
   ========================================================================== */
.stage-container {
  position: relative;
  z-index: 10;
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 24px 28px;
}

.context-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 18px;
  background: rgba(33, 28, 24, 0.85);
  border: 1px solid rgba(217, 190, 139, 0.22);
  border-radius: 12px 12px 0 0;
  color: #efe7da;
}

.context-left, .context-center, .context-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.genre-tag {
  font-family: var(--font-zh);
  font-size: 0.94rem;
  color: var(--gold-soft);
  letter-spacing: 0.04em;
}

.part-pills {
  display: inline-flex;
  gap: 5px;
  flex-wrap: wrap;
}

.part-pill {
  background: rgba(255, 255, 255, 0.08);
  color: #e5dccf;
  border: 1px solid rgba(217, 190, 139, 0.3);
  border-radius: 999px;
  padding: 3px 9px;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  cursor: pointer;
}

.part-pill.active {
  background: var(--cinnabar);
  color: #fff;
  border-color: var(--cinnabar-bright);
}

.slideshow-main-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--cinnabar) 0%, #822019 100%);
  color: #fff9f2;
  border: 1px solid rgba(255, 220, 180, 0.45);
  border-radius: 999px;
  padding: 7px 18px;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(158, 42, 34, 0.35);
  transition: transform 0.15s ease, background 0.2s ease;
}

.slideshow-main-btn.playing {
  background: linear-gradient(135deg, var(--jade) 0%, #274c44 100%);
  box-shadow: 0 4px 16px rgba(60, 110, 99, 0.45);
}

.slideshow-speed, .auto-voice-toggle {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: #d4c9b8;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.auto-voice-toggle input {
  accent-color: var(--cinnabar);
}

.shuffle-toggle {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(217, 190, 139, 0.28);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.2s ease;
}

.shuffle-toggle.active {
  border-color: var(--gold);
  background: rgba(217, 190, 139, 0.18);
  color: #fff6e0;
  box-shadow: 0 0 12px rgba(217, 190, 139, 0.22);
}

.shuffle-icon {
  font-size: 0.86rem;
  line-height: 1;
}

.slideshow-speed select {
  background: rgba(255, 255, 255, 0.09);
  color: #f5efe6;
  border: 1px solid rgba(217, 190, 139, 0.3);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 0.78rem;
}

.counter-badge {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: #cfc4b4;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.counter-badge.gold {
  border-color: rgba(184, 138, 68, 0.45);
  color: var(--gold-soft);
}

.slideshow-timer-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 14px;
  border-radius: 0 0 4px 4px;
}

.slideshow-timer-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cinnabar), var(--gold));
  transition: width 0.1s linear;
}

/* ==========================================================================
   POEM & COLORED GRAPHIC STAGE (CINEMA MODE & BOOK SPREAD MODE)
   ========================================================================== */
.poem-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.stage-arrow {
  background: rgba(33, 28, 24, 0.78);
  color: var(--gold-soft);
  border: 1px solid rgba(217, 190, 139, 0.3);
  width: 46px;
  height: 76px;
  border-radius: 12px;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage-arrow:hover:not(:disabled) {
  background: var(--cinnabar);
  color: #fff;
  transform: scale(1.04);
}

.stage-arrow:disabled {
  opacity: 0.25;
  cursor: default;
}

/* Xuan Paper Scroll / Spread Container */
.spread-canvas {
  width: 100%;
  background:
    radial-gradient(ellipse at 18% 14%, rgba(255, 252, 245, 0.94) 0%, transparent 55%),
    radial-gradient(ellipse at 82% 86%, rgba(235, 220, 194, 0.72) 0%, transparent 60%),
    radial-gradient(circle at 65% 32%, rgba(212, 172, 96, 0.08) 0%, transparent 40%),
    linear-gradient(180deg, #fcf9f2 0%, #f6efe0 52%, #f2e8d5 100%);
  border: 1px solid #dccbb0;
  border-radius: 16px;
  box-shadow: var(--shadow-elevated);
  overflow: hidden;
  position: relative;
  transition:
    opacity 1.08s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.08s cubic-bezier(0.22, 1, 0.36, 1),
    filter 1.08s ease;
}

.spread-canvas.fade-transition {
  opacity: 0.06;
  transform: translateY(10px) scale(0.99);
  filter: blur(2.5px);
}

/* Traditional Silk-Brocade Scroll Rollers (天頭地腳綾錦與檀木軸頭) */
.scroll-roller {
  display: flex;
  align-items: center;
  width: 100%;
  height: 14px;
  background: linear-gradient(90deg, #3a2418 0%, #5c3a24 4%, #efe4cc 4%, #e5d5b5 96%, #5c3a24 96%, #3a2418 100%);
  border-bottom: 1.5px solid rgba(158, 42, 34, 0.42);
  position: relative;
  z-index: 6;
}

.scroll-roller.bottom-roller {
  border-bottom: none;
  border-top: 1.5px solid rgba(158, 42, 34, 0.42);
}

.roller-brocade {
  flex: 1;
  height: 100%;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(184, 138, 68, 0.22) 0px,
      rgba(184, 138, 68, 0.22) 12px,
      rgba(158, 42, 34, 0.14) 12px,
      rgba(158, 42, 34, 0.14) 24px
    ),
    linear-gradient(180deg, #f3ead8 0%, #e6d6b8 100%);
}

.roller-knob {
  width: 22px;
  height: 100%;
  background: linear-gradient(180deg, #5a3422 0%, #2d180e 55%, #4a291a 100%);
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.6);
}

.roller-knob.left {
  border-right: 2px solid var(--gold);
}

.roller-knob.right {
  border-left: 2px solid var(--gold);
}

body.view-spread .scroll-roller {
  display: none;
}

/* --- VIEW 1: CINEMA FOCUS (Large Colored Graphic Showcase + Paired Bilingual Columns) --- */
body.view-cinema .spread-canvas {
  display: flex;
  flex-direction: column;
}

body.view-cinema .artwork-showcase {
  margin: 0;
  padding: 20px 28px 12px;
  background: linear-gradient(180deg, #fffdf9 0%, #faf3e6 100%);
  border-bottom: 1px solid rgba(158, 42, 34, 0.24);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

body.view-cinema .artwork-inner {
  width: 100%;
  max-width: 1120px;
  min-height: 195px;
  max-height: 285px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
}

body.view-cinema .artwork-inner img {
  max-width: 100%;
  max-height: 275px;
  width: auto;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 26s ease-in-out;
  transform-origin: center center;
}

body.slideshow-running.view-cinema .artwork-inner img {
  transform: scale(1.07);
}

.artwork-caption {
  width: 100%;
  max-width: 1120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(184, 138, 68, 0.28);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.caption-seal {
  font-family: var(--font-zh);
  background: rgba(158, 42, 34, 0.1);
  color: var(--cinnabar);
  border: 1px solid rgba(158, 42, 34, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.76rem;
}

.lightbox-btn {
  background: transparent;
  color: var(--ink-secondary);
  border: 1px solid rgba(26, 24, 22, 0.2);
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 0.75rem;
  cursor: pointer;
}

.lightbox-btn:hover {
  background: rgba(26, 24, 22, 0.06);
}

/* Poetry Columns */
.poetry-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
}

.poetry-columns::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(184, 138, 68, 0.38), transparent);
}

body.view-cinema.lang-zh-only .poetry-columns {
  grid-template-columns: minmax(0, 860px);
  justify-content: center;
}

body.view-cinema.lang-zh-only .poetry-columns::before {
  display: none;
}

body.lang-zh-only .preface-grid,
body.lang-zh-only .lightbox-poem-bar {
  grid-template-columns: 1fr !important;
}

.poem-col {
  padding: 24px 40px 30px;
}

/* Authentic Xuan-Paper Calligraphy Sheet (宣紙朱絲欄書法作品裝裱) */
body.view-cinema .calligraphy-scroll-sheet {
  position: relative;
  background:
    radial-gradient(circle at 15% 22%, rgba(218, 176, 98, 0.1) 0%, transparent 28%),
    radial-gradient(circle at 82% 74%, rgba(218, 176, 98, 0.09) 0%, transparent 32%),
    repeating-linear-gradient(
      0deg,
      transparent 0px,
      transparent 3px,
      rgba(160, 128, 80, 0.03) 3px,
      rgba(160, 128, 80, 0.03) 4px
    ),
    linear-gradient(180deg, #fdfaf2 0%, #f8f1e1 100%);
  border: 2px solid rgba(158, 42, 34, 0.42);
  outline: 1px solid rgba(158, 42, 34, 0.22);
  outline-offset: -6px;
  border-radius: 8px;
  padding: 28px 34px 26px;
  box-shadow:
    inset 0 0 28px rgba(184, 138, 68, 0.12),
    0 6px 22px rgba(30, 20, 10, 0.06);
}

.zh-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.calligraphy-title-block {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 6px;
}

body.view-cinema.lang-zh-only:not(.calligraphy-vertical) .calligraphy-title-block {
  justify-content: center;
  text-align: center;
}

body.view-cinema.lang-zh-only:not(.calligraphy-vertical) .ink-divider {
  margin-left: auto;
  margin-right: auto;
  width: 88px;
}

body.view-cinema.lang-zh-only:not(.calligraphy-vertical) #zh-verse .verse-line {
  justify-content: center;
}

body.view-cinema.lang-zh-only:not(.calligraphy-vertical) #zh-verse .line-text-wrap {
  flex: 0 1 auto;
  text-align: center;
}

body.view-cinema.lang-zh-only:not(.calligraphy-vertical) #zh-verse .line-timing-badge {
  margin-left: 8px;
}

/* Carved Cinnabar Leisure Seal (引首章：詩畫清賞) */
.yinshou-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 52px;
  padding: 3px 2px;
  font-family: var(--font-zh);
  font-size: 0.78rem;
  line-height: 1.12;
  color: #a4241b;
  background: rgba(255, 248, 240, 0.92);
  border: 2px solid #a4241b;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(164, 36, 27, 0.35);
  text-align: center;
  letter-spacing: 1px;
  flex-shrink: 0;
  transform: rotate(-1.5deg);
  user-select: none;
}

/* Colophon & Artist Cinnabar Stone Seals (落款與篆刻姓名章/閒章) */
.calligraphy-colophon {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(158, 42, 34, 0.24);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.calligraphy-seals {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.stone-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-family: var(--font-zh);
  font-size: 0.84rem;
  line-height: 1.08;
  text-align: center;
  letter-spacing: 1px;
  border-radius: 4px;
  user-select: none;
  flex-shrink: 0;
}

.stone-seal.seal-baiwen {
  background: linear-gradient(135deg, #ab261c 0%, #8f1d14 100%);
  color: #fdf6ec;
  border: 1.5px solid #f4dfd5;
  outline: 2px solid #9e2219;
  box-shadow: 0 2px 6px rgba(158, 34, 25, 0.28);
  transform: rotate(-2deg);
}

.stone-seal.seal-zhuwen {
  background: #fcf5ea;
  color: #a2231a;
  border: 2.2px solid #a2231a;
  box-shadow:
    inset 0 0 0 1px rgba(162, 35, 26, 0.35),
    0 2px 6px rgba(158, 34, 25, 0.18);
  transform: rotate(1.8deg);
}

body.view-spread .yinshou-seal,
body.view-spread .calligraphy-seals,
body.view-spread .calligraphy-dir-btn {
  display: none;
}

/* --- VIEW 2: ORIGINAL BOOK SPREAD (Exact 882:666 Book Proportions with Positioned Art) --- */
body.view-spread .spread-canvas {
  aspect-ratio: 882 / 666;
  max-width: 900px;
  margin: 0 auto;
  display: block;
  background: #fffefb;
}

body.view-spread .artwork-showcase {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
  z-index: 1;
}

body.view-spread .artwork-inner {
  position: absolute;
  /* Dynamically positioned via JS from clip_pt [x0, y0, x1, y1] on 882x666 */
}

body.view-spread .artwork-inner img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  mix-blend-mode: multiply;
}

body.view-spread .artwork-caption {
  position: absolute;
  bottom: 10px;
  right: 20px;
  width: auto;
  border: none;
  background: rgba(255, 252, 245, 0.85);
  padding: 4px 10px;
  border-radius: 999px;
  pointer-events: auto;
  z-index: 5;
}

body.view-spread .caption-seal,
body.view-spread #artwork-caption-text {
  display: none;
}

body.view-spread .poetry-columns {
  position: relative;
  z-index: 2;
  height: 100%;
}

body.view-spread .poem-col {
  padding: 24px 36px;
  /* Subtle paper halo around text just like the 4pt white outline in the KDP book */
  text-shadow:
    0 0 6px rgba(255, 254, 250, 0.98),
    0 0 12px rgba(255, 254, 250, 0.95),
    0 1px 2px rgba(255, 254, 250, 0.98);
}

body.view-spread .poem-title-zh {
  font-size: 1.32rem;
}

body.view-spread .poem-title-tr {
  font-size: 1.2rem;
}

body.view-spread .poem-sub-zh,
body.view-spread .poem-sub-tr {
  font-size: 0.78rem;
  margin-bottom: 6px;
}

body.view-spread .ink-divider {
  margin: 6px 0 10px;
}

body.view-spread .zh-verse-body {
  font-size: 1.08rem;
  line-height: 1.48;
}

body.view-spread .tr-verse-body {
  font-size: 0.94rem;
  line-height: 1.42;
}

body.view-spread .verse-line {
  margin-bottom: 2px;
}

body.view-spread .poem-note {
  margin-top: 10px;
  padding-top: 6px;
  font-size: 0.74rem;
}

/* Typography inside Poetry Columns */
.col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.lang-kicker {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--cinnabar);
  text-transform: uppercase;
}

.recite-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(184, 138, 68, 0.12);
  color: var(--ink-primary);
  border: 1px solid rgba(184, 138, 68, 0.38);
  padding: 4px 11px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  cursor: pointer;
  transition: all 0.2s;
}

.recite-mini-btn:hover, .recite-mini-btn.speaking {
  background: var(--cinnabar);
  color: #fff;
  border-color: var(--cinnabar);
}

.poem-title-zh {
  font-family: var(--font-zh);
  font-size: clamp(2.05rem, 3.5vw, 3.05rem);
  font-weight: 500;
  margin: 0 0 4px;
  color: #14100c;
  letter-spacing: 0.14em;
  text-shadow:
    0 1px 2px rgba(20, 14, 8, 0.14),
    0 0 18px rgba(184, 138, 68, 0.12);
}

.poem-title-tr {
  font-family: var(--font-serif);
  font-size: clamp(1.38rem, 2.1vw, 1.78rem);
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--ink-primary);
}

.poem-sub-zh {
  font-family: var(--font-zh);
  font-size: 1.05rem;
  color: var(--cinnabar);
  letter-spacing: 0.1em;
  margin: 0 0 4px;
}

.poem-sub-tr {
  font-family: var(--font-serif);
  font-size: 0.94rem;
  font-style: italic;
  color: var(--ink-muted);
  margin: 0 0 10px;
}

.ink-divider {
  width: 68px;
  height: 2px;
  background: linear-gradient(90deg, var(--cinnabar), var(--gold-soft));
  margin: 12px 0 20px;
}

/* Large, Authentic Brush Calligraphy Verse Characters (大字行楷書法) */
.zh-verse-body {
  font-family: var(--font-zh);
  font-size: clamp(1.56rem, 2.35vw, 2.12rem);
  line-height: 2.02;
  color: #14100c;
  letter-spacing: 0.13em;
  text-shadow: 0 1px 1px rgba(20, 14, 8, 0.1);
}

body.view-cinema.lang-zh-only .zh-verse-body {
  font-size: clamp(1.85rem, 2.95vw, 2.58rem);
  line-height: 2.08;
  letter-spacing: 0.15em;
}

.tr-verse-body {
  font-family: var(--font-serif);
  font-size: clamp(1.06rem, 1.35vw, 1.22rem);
  line-height: 1.56;
  color: var(--ink-primary);
}

.verse-line {
  margin: 0 0 8px;
  padding: 6px 10px;
  margin-left: -8px;
  border-radius: 8px;
  border-bottom: 1px dashed rgba(158, 42, 34, 0.16);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Traditional Vertical Classical Scroll Mode (直排古卷朱絲欄模式) */
body.view-cinema.calligraphy-vertical .calligraphy-scroll-sheet {
  writing-mode: vertical-rl;
  text-orientation: upright;
  width: 100%;
  min-height: 430px;
  max-height: 620px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin: 0 auto;
}

body.view-cinema.calligraphy-vertical .calligraphy-title-block {
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 0 24px;
  padding-left: 16px;
  border-left: 1.5px solid rgba(158, 42, 34, 0.35);
}

body.view-cinema.calligraphy-vertical .yinshou-seal {
  writing-mode: horizontal-tb;
  margin-bottom: 10px;
}

body.view-cinema.calligraphy-vertical .ink-divider {
  display: none;
}

body.view-cinema.calligraphy-vertical .verse-line {
  margin: 0 0 0 14px;
  padding: 8px 10px;
  border-bottom: none;
  border-left: 1px dashed rgba(158, 42, 34, 0.28);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

body.view-cinema.calligraphy-vertical .line-timing-badge {
  display: none;
}

body.view-cinema.calligraphy-vertical .calligraphy-colophon {
  margin-top: 0;
  margin-right: 24px;
  padding-top: 0;
  padding-right: 16px;
  border-top: none;
  border-right: 1px solid rgba(158, 42, 34, 0.28);
  flex-direction: row;
  justify-content: flex-end;
}

body.view-cinema.calligraphy-vertical .calligraphy-seals {
  writing-mode: horizontal-tb;
  flex-direction: column;
  margin-left: 0;
  margin-top: 16px;
}

.verse-line.speaking-line {
  background: rgba(158, 42, 34, 0.11);
  box-shadow: inset 3px 0 0 var(--cinnabar);
}

.line-play-btn {
  background: rgba(184, 138, 68, 0.14);
  color: var(--cinnabar);
  border: 1px solid rgba(184, 138, 68, 0.38);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.62rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.72;
  transition: all 0.18s ease;
  transform: translateY(-2px);
}

.verse-line:hover .line-play-btn,
.verse-line.speaking-line .line-play-btn {
  opacity: 1;
  background: var(--cinnabar);
  color: #fff;
  border-color: var(--cinnabar);
}

.line-text-wrap {
  flex: 1;
}

.line-timing-badge {
  font-family: var(--font-sans);
  font-size: 0.66rem;
  color: var(--ink-muted);
  opacity: 0;
  transition: opacity 0.2s ease;
  white-space: nowrap;
  margin-left: auto;
  padding-left: 6px;
}

.verse-line:hover .line-timing-badge,
.verse-line.speaking-line .line-timing-badge {
  opacity: 0.85;
}

.zi {
  display: inline-block;
  padding: 0 1px;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: background 0.04s linear, color 0.04s linear, transform 0.07s ease-out;
}

.zi:hover {
  background: rgba(184, 138, 68, 0.22);
  color: var(--cinnabar);
}

.zi.zi-run {
  background: var(--cinnabar);
  color: #fffdf8 !important;
  text-shadow: none !important;
  transform: scale(1.12);
  box-shadow: 0 2px 8px rgba(158, 42, 34, 0.45);
  z-index: 2;
}

.zi.word-tok {
  display: inline;
  padding: 1px 2px;
  margin: 0 -1px;
  border-radius: 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.zi.word-tok.zi-run {
  display: inline-block;
  transform: scale(1.04);
  padding: 0 4px;
  margin: 0 -2px;
}

.char-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 350;
  background: rgba(24, 20, 17, 0.95);
  color: #fff8ed;
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 6px 18px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.char-toast strong {
  font-family: var(--font-zh);
  font-size: 1.2rem;
  color: var(--gold-soft);
}

.verse-stanza-break {
  height: 14px;
}

.poem-note {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid rgba(184, 138, 68, 0.22);
  font-size: 0.84rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.zh-note {
  font-family: var(--font-zh);
}

/* ==========================================================================
   BOTTOM SCRUBBER NAVIGATION
   ========================================================================== */
.bottom-poem-nav {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(33, 28, 24, 0.85);
  border: 1px solid rgba(217, 190, 139, 0.22);
  padding: 12px 20px;
  border-radius: 12px;
  color: #efe7da;
}

.nav-step-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f5efe6;
  border: 1px solid rgba(217, 190, 139, 0.3);
  padding: 8px 16px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  cursor: pointer;
  transition: background 0.2s;
}

.nav-step-btn:hover:not(:disabled) {
  background: var(--gold);
  color: #181410;
}

.nav-step-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.scrubber-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.scrubber-wrap input[type="range"] {
  width: 100%;
  accent-color: var(--cinnabar);
  cursor: pointer;
}

.scrubber-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  color: var(--gold-soft);
}

/* ==========================================================================
   MODE 3: GALLERY OF ALL 236 COLORED ILLUSTRATIONS
   ========================================================================== */
.gallery-stage {
  background: rgba(27, 23, 19, 0.9);
  border: 1px solid rgba(217, 190, 139, 0.24);
  border-radius: 16px;
  padding: 28px;
  color: #f5efe6;
}

.gallery-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(217, 190, 139, 0.2);
}

.gallery-header h2 {
  margin: 4px 0 0;
  font-weight: 400;
  font-size: 1.6rem;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  background: rgba(255, 255, 255, 0.07);
  color: #dfd5c6;
  border: 1px solid rgba(217, 190, 139, 0.28);
  padding: 6px 13px;
  border-radius: 999px;
  font-family: var(--font-zh);
  font-size: 0.85rem;
  cursor: pointer;
}

.filter-chip.active {
  background: var(--cinnabar);
  color: #fff;
  border-color: var(--cinnabar-bright);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.gallery-card {
  background: var(--paper-warm);
  color: var(--ink-primary);
  border: 1px solid var(--paper-edge);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
  border-color: var(--gold);
}

.gallery-thumb {
  height: 148px;
  background: #fffdf9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-bottom: 1px solid rgba(184, 138, 68, 0.2);
}

.gallery-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.gallery-card-body {
  padding: 12px 15px;
}

.gallery-card-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--cinnabar);
  font-weight: 600;
  margin-bottom: 4px;
}

.gallery-card-zh {
  font-family: var(--font-zh);
  font-size: 1.1rem;
  margin: 0 0 3px;
  color: var(--ink-primary);
}

.gallery-card-tr {
  font-size: 0.88rem;
  color: var(--ink-secondary);
  margin: 0 0 6px;
}

.gallery-card-snippet {
  font-family: var(--font-zh);
  font-size: 0.86rem;
  color: var(--ink-muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   AUDIO CONTROL SUITE (MODE, MASTER VOL, MIX BALANCE, VOICE & PLAYLIST)
   ========================================================================== */
.audio-control-suite,
.bg-music-mini {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(217, 190, 139, 0.25);
  border-radius: 999px;
  padding: 2px 7px 2px 4px;
}

.mini-mode-select,
.mini-voice-select {
  background: rgba(0, 0, 0, 0.35);
  color: #f3ece1;
  border: 1px solid rgba(217, 190, 139, 0.28);
  border-radius: 999px;
  font-family: var(--font-zh), var(--font-sans);
  font-size: 0.74rem;
  padding: 3px 8px;
  cursor: pointer;
  outline: none;
}

.mini-mode-select:hover,
.mini-mode-select:focus,
.mini-voice-select:hover,
.mini-voice-select:focus {
  border-color: var(--gold);
  background: rgba(0, 0, 0, 0.5);
}

.mini-mode-select option,
.mini-voice-select option {
  background: #1d1916;
  color: #f3ece1;
}

.audio-mix-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(217, 190, 139, 0.22);
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 0.72rem;
  color: #f3ece1;
}

.audio-mix-pill .mix-icon {
  font-size: 0.75rem;
  opacity: 0.9;
  user-select: none;
}

.mini-mix-slider {
  width: 52px;
  height: 4px;
  accent-color: #d4a373;
  cursor: pointer;
}

.mix-ratio-badge {
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.88;
  min-width: 36px;
  text-align: center;
  color: var(--gold-light, #e8d7b8);
}

.erhu-mute-btn,
.erhu-next-btn {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  font-size: 0.86rem;
  color: #f3ece1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.erhu-mute-btn.muted {
  opacity: 0.5;
}

.erhu-next-btn:hover {
  color: var(--gold);
}

.mini-volume-slider {
  width: 58px;
  height: 4px;
  accent-color: var(--gold);
  cursor: pointer;
}

.mini-track-select {
  background: rgba(0, 0, 0, 0.28);
  color: #f3ece1;
  border: 1px solid rgba(217, 190, 139, 0.22);
  border-radius: 999px;
  font-family: var(--font-zh), var(--font-sans);
  font-size: 0.74rem;
  padding: 3px 8px;
  cursor: pointer;
  outline: none;
  max-width: 126px;
}

.mini-track-select:hover,
.mini-track-select:focus {
  border-color: var(--gold);
}

.mini-track-select option {
  background: #1d1916;
  color: #f3ece1;
}

.stop-speech-btn {
  background: var(--cinnabar);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  cursor: pointer;
}

/* ==========================================================================
   CATALOGUE DRAWER & MODALS
   ========================================================================== */
.drawer-backdrop, .modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(12, 10, 8, 0.78);
  backdrop-filter: blur(8px);
}

.drawer-backdrop {
  display: none;
  justify-content: flex-start;
}

.drawer-backdrop.open {
  display: flex;
}

.drawer-panel {
  width: min(560px, 94vw);
  height: 100%;
  background: #1d1916;
  color: #f5efe6;
  border-right: 1px solid rgba(217, 190, 139, 0.3);
  display: flex;
  flex-direction: column;
  box-shadow: 20px 0 60px rgba(0, 0, 0, 0.6);
}

.drawer-head, .modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(217, 190, 139, 0.2);
}

.drawer-head h2, .modal-head h2 {
  margin: 4px 0 0;
  font-weight: 400;
  font-size: 1.35rem;
}

.close-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #f5efe6;
  border: 1px solid rgba(217, 190, 139, 0.28);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
}

.drawer-controls {
  padding: 14px 24px;
  border-bottom: 1px solid rgba(217, 190, 139, 0.16);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(217, 190, 139, 0.3);
  border-radius: 10px;
  padding: 8px 12px;
}

.search-box input {
  width: 100%;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.92rem;
  outline: none;
}

.drawer-genre-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.catalogue-count {
  margin: 10px 0 0;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  color: var(--gold-soft);
}

.catalogue-list {
  list-style: none;
  margin: 0;
  padding: 12px 16px;
  overflow-y: auto;
  flex: 1;
}

.catalogue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.18s;
}

.catalogue-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.catalogue-item.active {
  background: rgba(158, 42, 34, 0.28);
  border: 1px solid rgba(184, 138, 68, 0.45);
}

.cat-thumb {
  width: 72px;
  height: 46px;
  background: #faf6ee;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cat-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.cat-info {
  flex: 1;
  min-width: 0;
}

.cat-info-top {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--gold-soft);
}

.cat-zh {
  font-family: var(--font-zh);
  font-size: 1.02rem;
  color: #fff;
  display: block;
}

.cat-tr {
  font-size: 0.84rem;
  color: #c9bfb0;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Modal Card */
.modal-backdrop:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  max-width: 960px;
  width: 100%;
  max-height: 86vh;
  background: var(--paper-warm);
  color: var(--ink-primary);
  border-radius: 16px;
  border: 1px solid var(--gold);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65);
}

.modal-card .close-btn {
  color: var(--ink-primary);
  border-color: rgba(0, 0, 0, 0.2);
}

.preface-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 28px;
  overflow-y: auto;
  line-height: 1.8;
}

.preface-zh {
  font-family: var(--font-zh);
  font-size: 1.15rem;
}

/* Statutory Legal Footer & Welcome Legal Link */
.welcome-legal-row {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(158, 42, 34, 0.2);
}

.welcome-legal-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.welcome-legal-link:hover {
  color: var(--cinnabar);
}

.site-legal-footer {
  max-width: 1440px;
  margin: 18px auto 6px;
  padding: 12px 20px;
  border-top: 1px solid rgba(217, 190, 139, 0.16);
  color: rgba(244, 236, 220, 0.72);
  font-family: var(--font-sans);
  font-size: 0.78rem;
}

.site-legal-footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  text-align: center;
}

.footer-legal-link {
  background: none;
  border: none;
  padding: 0;
  color: #e8cfa0;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.footer-legal-link:hover {
  color: #fff;
}

.footer-sep {
  opacity: 0.45;
}

/* Impressum Modal (法律聲明與出版聯絡資訊 · Impressum) */
.impressum-modal-card {
  max-width: 1080px;
}

.impressum-body {
  padding: 24px 28px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  line-height: 1.72;
}

.impressum-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.impressum-card-box {
  background: rgba(255, 253, 248, 0.92);
  border: 1.5px solid rgba(158, 42, 34, 0.35);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 6px 20px rgba(20, 14, 8, 0.06);
}

.impressum-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--cinnabar);
  background: rgba(158, 42, 34, 0.1);
  border: 1px solid rgba(158, 42, 34, 0.26);
  border-radius: 6px;
  padding: 3px 9px;
  margin-bottom: 10px;
}

.impressum-card-box h3 {
  margin: 0 0 12px;
  font-family: var(--font-zh);
  font-size: 1.24rem;
  color: #14100c;
}

.impressum-dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.92rem;
}

.impressum-dl > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  align-items: baseline;
}

.impressum-dl dt {
  font-weight: 700;
  color: var(--ink-muted);
  font-size: 0.84rem;
}

.impressum-dl dd {
  margin: 0;
  color: var(--ink-primary);
}

.impressum-dl a,
.impressum-sec a {
  color: var(--cinnabar);
  font-weight: 600;
  text-decoration: underline;
}

.impressum-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(158, 42, 34, 0.22);
}

.impressum-sec h4 {
  margin: 0 0 8px;
  font-family: var(--font-zh);
  font-size: 1.08rem;
  color: var(--cinnabar);
}

.impressum-sec h4:not(:first-child) {
  margin-top: 16px;
}

.impressum-sec p {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--ink-primary);
}

.impressum-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.impressum-footer-bar {
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px dashed rgba(158, 42, 34, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.84rem;
  color: var(--ink-muted);
}

.impressum-standalone-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(158, 42, 34, 0.1);
  color: var(--cinnabar);
  border: 1px solid rgba(158, 42, 34, 0.35);
  border-radius: 999px;
  padding: 5px 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.impressum-standalone-btn:hover {
  background: var(--cinnabar);
  color: #fff;
}

/* Lightbox Modal */
.lightbox-card {
  max-width: 1280px;
  width: 95vw;
  background: var(--paper-ivory);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.75);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--ink-primary);
  color: #fff;
}

.lightbox-img-wrap {
  max-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 58vh;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.lightbox-poem-bar {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--paper-edge);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  color: var(--ink-primary);
}

.lightbox-zh {
  font-family: var(--font-zh);
  font-size: 1.12rem;
}

@media (max-width: 960px) {
  .welcome-card {
    grid-template-columns: 1fr;
    max-height: 92vh;
    overflow-y: auto;
    padding: 24px 20px;
    gap: 20px;
  }
  .cover-frame {
    max-width: 200px;
  }
  .poetry-columns, .preface-grid, .lightbox-poem-bar, .impressum-hero-grid, .impressum-section-grid {
    grid-template-columns: 1fr;
  }
  .poetry-columns::before {
    display: none;
  }
  body.view-spread .spread-canvas {
    aspect-ratio: auto;
  }
  body.view-spread .artwork-showcase {
    position: relative;
    padding: 16px;
  }
  body.view-spread .artwork-inner {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
  }
}

/* ==========================================================================
   MOBILE & SMARTPHONE OPTIMIZATION (HANDHELD XUAN-PAPER CALLIGRAPHY SCROLL)
   ========================================================================== */
@media (max-width: 768px) {
  .masthead {
    position: relative;
    padding: 6px 8px;
    gap: 5px;
    flex-direction: column;
    align-items: stretch;
  }

  .brand-wordmark {
    order: -1;
    justify-content: center;
    padding-bottom: 3px;
    border-bottom: 1px solid rgba(217, 190, 139, 0.14);
  }

  .brand-titles strong {
    font-size: 1.05rem;
  }

  .brand-titles span {
    display: none;
  }

  .masthead-left,
  .masthead-right {
    justify-content: center;
    gap: 5px;
  }

  .nav-pill-btn {
    padding: 4px 9px;
    font-size: 0.72rem;
  }

  .seg-btn {
    padding: 4px 9px;
    font-size: 0.72rem;
  }

  #mode-spread,
  #toggle-fullscreen {
    display: none;
  }

  .stage-container {
    padding: 6px 6px 18px;
  }

  .context-bar {
    padding: 6px 10px;
    gap: 6px;
    justify-content: center;
  }

  .context-left,
  .context-center,
  .context-right {
    gap: 6px;
    justify-content: center;
  }

  .stage-arrow {
    display: none;
  }

  body.view-cinema .artwork-showcase {
    padding: 8px 8px 6px;
  }

  body.view-cinema .artwork-inner {
    min-height: 120px;
    max-height: 175px;
  }

  body.view-cinema .artwork-inner img {
    max-height: 168px;
  }

  .artwork-caption {
    font-size: 0.72rem;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    gap: 6px;
  }

  .poem-col {
    padding: 14px 10px 18px;
  }

  body.view-cinema .calligraphy-scroll-sheet {
    padding: 18px 12px 18px;
    outline-offset: -4px;
  }

  .col-header {
    flex-wrap: wrap;
    gap: 6px;
  }

  .poem-title-zh {
    font-size: clamp(1.72rem, 6.4vw, 2.25rem);
    letter-spacing: 0.1em;
  }

  .zh-verse-body,
  body.view-cinema.lang-zh-only .zh-verse-body {
    font-size: clamp(1.48rem, 5.7vw, 1.92rem);
    line-height: 1.95;
    letter-spacing: 0.08em;
  }

  .verse-line {
    padding: 5px 4px;
    margin-left: 0;
    gap: 6px;
  }

  .line-timing-badge {
    display: none;
  }

  .calligraphy-colophon {
    margin-top: 16px;
    padding-top: 12px;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .calligraphy-seals {
    margin-left: 0;
  }

  .bottom-poem-nav {
    padding: 10px 12px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .nav-step-btn {
    padding: 7px 13px;
    font-size: 0.78rem;
  }

  .scrubber-labels {
    font-size: 0.7rem;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .zh-verse-body,
  body.view-cinema.lang-zh-only .zh-verse-body {
    font-size: clamp(1.42rem, 5.6vw, 1.75rem);
    letter-spacing: 0.06em;
  }
  .yinshou-seal {
    width: 26px;
    height: 46px;
    font-size: 0.7rem;
  }
}
