/* ==========================================================================
   MARIUS MARIAN ȘOLEA — Arhivă Literară, Audio & Memorial
   Design editorial de muzeu: Obsidian (#0a090d), Aur Antic (#d4aa54),
   Pergament Cald (#f3ebda), Purpuriu Nistru (#99242b).
   100% responsive (desktop, tabletă, telefon), animații GPU 60fps.
   ========================================================================== */

:root {
  --bg: #0a090d;
  --bg-elev: #121017;
  --bg-card: #16141d;
  --bg-glass: rgba(14, 12, 19, 0.78);
  --border: rgba(212, 170, 84, 0.18);
  --border-strong: rgba(212, 170, 84, 0.42);
  --text: #efe9dc;
  --text-muted: #b3aa99;
  --text-dim: #7f7769;
  --gold: #d4aa54;
  --gold-bright: #f2cf82;
  --gold-soft: rgba(212, 170, 84, 0.14);
  --crimson: #b02a33;
  --crimson-soft: rgba(176, 42, 51, 0.18);

  --font-display: "Cinzel", "Cormorant Garamond", Georgia, serif;
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.62);
  --shadow-gold: 0 12px 40px rgba(212, 170, 84, 0.16);
  --max-w: 1240px;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button, input, select {
  font-family: inherit;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  color: var(--gold-bright);
  background: rgba(212, 170, 84, 0.1);
  padding: 2px 6px;
  border-radius: 5px;
}

.container {
  width: min(100% - 2.4rem, var(--max-w));
  margin-inline: auto;
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--crimson), var(--gold), var(--gold-bright));
  z-index: 2000;
  transition: width 80ms linear;
  box-shadow: 0 0 14px rgba(212, 170, 84, 0.7);
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(10, 9, 13, 0.72);
  border-bottom: 1px solid rgba(212, 170, 84, 0.12);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.site-header.scrolled {
  background: rgba(10, 9, 13, 0.92);
  border-bottom-color: rgba(212, 170, 84, 0.25);
}

.nav-inner {
  width: min(100% - 2.4rem, var(--max-w));
  margin-inline: auto;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.brand-monogram {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: #141008;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 55%, #9d7529);
  box-shadow: 0 6px 20px rgba(212, 170, 84, 0.32);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 0.98rem;
  letter-spacing: 0.04em;
  color: var(--text);
}

.brand-text small {
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding-block: 6px;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.25s ease;
}

.nav-links a:hover {
  color: var(--gold-bright);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 7px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.active {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #161107;
}

.lang-sep {
  color: rgba(212, 170, 84, 0.35);
  font-size: 0.7rem;
  user-select: none;
}

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.86rem;
  transition: all 0.22s ease;
}

.search-trigger:hover {
  border-color: var(--gold);
  color: var(--text);
  background: rgba(212, 170, 84, 0.1);
}

.search-trigger kbd {
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--gold-bright);
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  place-items: center;
  cursor: pointer;
}

.mobile-pages-bar {
  display: none;
}

.mobile-drawer {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.4rem 1.4rem;
  gap: 0.65rem;
  background: rgba(12, 11, 16, 0.98);
  border-top: 1px solid var(--border);
}

.mobile-drawer[hidden] {
  display: none;
}

.drawer-link {
  padding: 0.75rem 0.4rem;
  font-size: 1rem;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.drawer-search-btn {
  margin-top: 0.5rem;
  justify-content: center;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.45rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.93rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 60%, #a97c2b);
  color: #151007;
  box-shadow: 0 10px 30px rgba(212, 170, 84, 0.3);
}

.btn-gold:hover {
  box-shadow: 0 14px 38px rgba(212, 170, 84, 0.48);
}

.btn-outline {
  background: rgba(212, 170, 84, 0.08);
  border-color: var(--border-strong);
  color: var(--gold-bright);
}

.btn-outline:hover {
  background: rgba(212, 170, 84, 0.18);
  border-color: var(--gold-bright);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-sm {
  padding: 0.62rem 1.15rem;
  font-size: 0.85rem;
}

.brand-crest {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(212, 170, 84, 0.35));
  transition: transform 0.25s ease;
}

.brand:hover .brand-crest {
  transform: scale(1.06);
}

.footer-crest {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.endpaper-crest {
  width: 126px;
  height: 126px;
  object-fit: contain;
  margin-bottom: 0.4rem;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.22));
}

.hero-secondary {
  flex-direction: column;
  gap: 3.5rem;
}

.heraldry-panel {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2.6rem;
  align-items: center;
  padding: 2.2rem;
  border-radius: 24px;
  background: linear-gradient(155deg, rgba(22, 19, 28, 0.94), rgba(11, 10, 15, 0.98));
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(212, 170, 84, 0.1);
}

.heraldry-artwork {
  display: grid;
  place-items: center;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(212, 170, 84, 0.25);
  background: #07070b;
}

.heraldry-artwork img {
  width: 100%;
  max-width: 390px;
  height: auto;
}

.heraldry-info h3 {
  margin: 0 0 0.8rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.3vw, 1.95rem);
  color: #fcf7eb;
}

.heraldry-info p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.heraldry-symbols {
  margin: 0 0 1.4rem;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  color: #ddd5c5;
  font-size: 0.92rem;
}

.heraldry-symbols strong {
  color: var(--gold-bright);
}

@media (max-width: 900px) {
  .heraldry-panel {
    grid-template-columns: 1fr;
    padding: 1.4rem;
    gap: 1.6rem;
  }
}

/* ==========================================================================
   ISOLATED MULTI-PAGE VIEW ROUTING (Fiecare meniu afișează EXCLUSIV pagina lui)
   ========================================================================== */
[data-page] {
  display: none !important;
}

[data-page].page-active {
  display: block !important;
  animation: pageFadeIn 0.32s ease;
}

.cinema-landing[data-page].page-active,
.hero[data-page].page-active {
  display: flex !important;
}

.section[data-page].page-active {
  padding-top: 112px;
  min-height: calc(100vh - 150px);
}

.page-active .reveal {
  opacity: 1 !important;
  transform: none !important;
}

.nav-links a.nav-active-doc {
  color: var(--gold-bright);
  font-weight: 600;
}

.nav-links a.nav-active-doc::after {
  width: 100%;
}

.drawer-link.nav-active-doc {
  color: var(--gold-bright);
  font-weight: 600;
}

.book-card {
  cursor: pointer;
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   PAGINA DE PORNIRE: FEREASTRA CINEMA CU FILMUL DOCUMENTAR (3:00)
   ========================================================================== */

.cinema-landing {
  position: relative;
  min-height: 100svh;
  padding: 90px 0 38px;
  display: flex;
  align-items: center;
  background: #060509;
  overflow: hidden;
  border-bottom: 1px solid rgba(212, 170, 84, 0.22);
}

.cinema-bg-fx {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.cinema-radial {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(212, 170, 84, 0.14), transparent 56%),
    radial-gradient(circle at 18% 82%, rgba(176, 42, 51, 0.12), transparent 46%),
    linear-gradient(180deg, rgba(6, 5, 9, 0.55) 0%, rgba(6, 5, 9, 0.25) 50%, #0a090d 100%);
}

.cinema-shell {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.cinema-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cinema-badge-row {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.cinema-kicker {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  color: var(--gold-bright);
}

.cinema-mini-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.cinema-mini-link:hover {
  color: var(--gold-bright);
}

/* Player wrapper: video viewport ABOVE, controls bar BELOW (zero overlap!) */
.cinema-player-wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  border-radius: 18px;
  overflow: hidden;
  background: #040307;
  border: 1px solid rgba(212, 170, 84, 0.42);
  box-shadow:
    0 28px 85px rgba(0, 0, 0, 0.85),
    0 0 70px rgba(212, 170, 84, 0.12);
}

.cinema-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 66vh;
  background: #000;
  overflow: hidden;
}

.cinema-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

.cinema-sound-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: radial-gradient(circle at center, rgba(8, 7, 12, 0.45) 0%, rgba(5, 4, 8, 0.82) 100%);
  backdrop-filter: blur(2px);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

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

.cinema-overlay-inner {
  text-align: center;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.overlay-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--gold-bright);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 170, 84, 0.4);
  background: rgba(10, 9, 13, 0.74);
  margin-bottom: 0.75rem;
}

.cinema-overlay-title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4.2vw, 3.6rem);
  line-height: 1.06;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.9);
}

.cinema-overlay-sub {
  margin: 0 0 1.25rem;
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.7vw, 1.32rem);
  color: #e6dfd0;
  max-width: 580px;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.95);
}

.cinema-start-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 1.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 236, 179, 0.65);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 58%, #9c6e21);
  color: #150f06;
  font-weight: 700;
  font-size: 0.96rem;
  cursor: pointer;
  box-shadow: 0 12px 40px rgba(212, 170, 84, 0.42);
  transition: transform 0.22s ease, box-shadow 0.25s ease;
}

.cinema-start-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 18px 54px rgba(212, 170, 84, 0.62);
}

/* Dedicated Control Bar BELOW the video frame (never obstructs the picture!) */
.cinema-controls {
  position: relative;
  z-index: 6;
  padding: 0.6rem 1rem 0.78rem;
  background: #100e16;
  border-top: 1px solid rgba(212, 170, 84, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cinema-seek-wrap input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
  cursor: pointer;
  height: 5px;
}

.cinema-ctrl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.cinema-ctrl-left,
.cinema-ctrl-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.c-btn {
  height: 36px;
  padding: 0 0.72rem;
  border-radius: 9px;
  border: 1px solid rgba(212, 170, 84, 0.3);
  background: rgba(14, 12, 19, 0.78);
  color: #f4eee1;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.c-btn:hover {
  background: rgba(212, 170, 84, 0.22);
  border-color: var(--gold-bright);
}

.c-btn.c-play {
  width: 40px;
  padding: 0;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #140f06;
  border: none;
}

.c-btn.c-mute.unmuted {
  border-color: rgba(212, 170, 84, 0.55);
  color: var(--gold-bright);
}

.cinema-timecode {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-left: 0.2rem;
}

.cinema-now-chapter {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-bright);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(212, 170, 84, 0.14);
  border: 1px solid rgba(212, 170, 84, 0.28);
}

/* Interactive Chapters Strip */
.cinema-chapters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.55rem;
}

.chap-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.6rem 0.78rem;
  border-radius: 12px;
  border: 1px solid rgba(212, 170, 84, 0.16);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-muted);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chap-btn:hover {
  border-color: rgba(212, 170, 84, 0.45);
  background: rgba(212, 170, 84, 0.08);
  color: var(--text);
}

.chap-btn.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(212, 170, 84, 0.18), rgba(176, 42, 51, 0.1));
  color: #fcf7eb;
}

.chap-time {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.chap-btn strong {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
}

.cinema-bottom-cue {
  display: flex;
  justify-content: center;
  margin-top: 0.2rem;
}

.cinema-explore-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s ease;
}

.cinema-explore-link:hover {
  color: var(--gold-bright);
  border-color: var(--border-strong);
}

.hero-secondary {
  min-height: auto;
  padding: 84px 0 64px;
}

@media (max-width: 1040px) {
  .cinema-chapters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mobile-pages-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.8rem 0.55rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-top: 1px solid rgba(212, 170, 84, 0.14);
    background: rgba(10, 9, 14, 0.94);
  }

  .mobile-pages-bar::-webkit-scrollbar {
    display: none;
  }

  .mob-tab {
    flex-shrink: 0;
    padding: 0.36rem 0.78rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(212, 170, 84, 0.18);
    white-space: nowrap;
  }

  .mob-tab.nav-active-doc {
    background: linear-gradient(135deg, var(--gold-bright), var(--gold));
    color: #161006;
    border-color: transparent;
  }
}

@media (max-width: 760px) {
  .nav-inner {
    width: 100%;
    padding-inline: 0.65rem;
    height: 56px;
    gap: 0.4rem;
  }

  .brand {
    gap: 0.45rem;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  .brand-crest {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
  }

  .brand-text {
    min-width: 0;
    overflow: hidden;
  }

  .brand-text strong {
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-actions {
    gap: 0.32rem;
    flex-shrink: 0;
  }

  .lang-switch {
    padding: 2px 4px;
  }

  .lang-btn {
    font-size: 0.68rem;
    padding: 3px 5px;
  }

  .search-trigger {
    width: 34px;
    height: 34px;
  }

  .mobile-menu-btn {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }

  .cinema-landing {
    min-height: auto;
    padding: 110px 0 26px;
  }

  .cinema-shell {
    width: calc(100% - 1rem);
    gap: 0.7rem;
  }

  .cinema-top-bar {
    padding-inline: 0.2rem;
  }

  .cinema-kicker {
    font-size: 0.66rem;
    letter-spacing: 0.08em;
  }

  .cinema-mini-link {
    font-size: 0.76rem;
  }

  .cinema-player-wrap {
    border-radius: 12px;
  }

  .cinema-viewport {
    max-height: none;
  }

  .cinema-sound-overlay {
    padding: 0.65rem;
  }

  .overlay-tag {
    display: none;
  }

  .cinema-overlay-title {
    font-size: 1.38rem;
    margin-bottom: 0.55rem;
  }

  .cinema-overlay-sub {
    display: none;
  }

  .cinema-start-btn {
    padding: 0.58rem 1.05rem;
    font-size: 0.82rem;
    gap: 0.45rem;
  }

  .cinema-controls {
    padding: 0.45rem 0.65rem 0.6rem;
  }

  .c-btn {
    height: 32px;
    padding: 0 0.55rem;
    font-size: 0.78rem;
  }

  .c-btn.c-play {
    width: 34px;
  }

  .cinema-timecode {
    font-size: 0.74rem;
  }

  .cinema-now-chapter {
    display: none;
  }

  .cinema-chapters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .chap-btn {
    padding: 0.48rem 0.62rem;
  }

  .chap-btn strong {
    font-size: 0.73rem;
  }

  .section[data-page].page-active {
    padding-top: 118px;
  }

  .fb-topbar {
    flex-direction: column;
    align-items: stretch;
    padding: max(0.5rem, env(safe-area-inset-top)) 0.65rem 0.5rem;
    gap: 0.45rem;
  }

  .fb-top-left {
    width: 100%;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .fb-top-tools {
    width: 100%;
    justify-content: space-between;
    gap: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(212, 170, 84, 0.14);
  }

  .reader-book-meta {
    flex: 1;
    min-width: 0;
    text-align: center;
  }

  .reader-book-meta strong {
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .fb-bottombar {
    padding: 0.5rem 0.7rem max(0.55rem, env(safe-area-inset-bottom));
  }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 112px 0 84px;
  overflow: hidden;
}

.hero-media-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: saturate(1.15) contrast(1.08);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 38%, rgba(212, 170, 84, 0.12), transparent 46%),
    radial-gradient(circle at 18% 72%, rgba(176, 42, 51, 0.13), transparent 44%),
    linear-gradient(180deg, rgba(10, 9, 13, 0.45) 0%, rgba(10, 9, 13, 0.72) 65%, var(--bg) 100%);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.4rem;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(212, 170, 84, 0.08);
  color: var(--gold-bright);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 0 0 rgba(242, 207, 130, 0.7);
  animation: pulseDot 2.1s infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(242, 207, 130, 0.75); }
  70% { box-shadow: 0 0 0 10px rgba(242, 207, 130, 0); }
  100% { box-shadow: 0 0 0 0 rgba(242, 207, 130, 0); }
}

.hero-title {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.2vw, 4.7rem);
  line-height: 1.04;
  letter-spacing: 0.02em;
  font-weight: 600;
}

.title-line {
  display: block;
}

.gold-shimmer {
  background: linear-gradient(105deg, #b88b35 0%, #f5d88f 32%, #fff1c9 50%, #d4aa54 68%, #9a7024 100%);
  background-size: 240% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6.5s linear infinite;
}

@keyframes shimmer {
  to { background-position: 240% center; }
}

.hero-lead {
  font-family: var(--font-serif);
  font-size: clamp(1.22rem, 1.9vw, 1.52rem);
  line-height: 1.5;
  color: #dfd7c7;
  max-width: 620px;
  margin: 0 0 1.5rem;
}

.hero-lead strong {
  color: #fffaf0;
  font-weight: 600;
}

.hero-pillars-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.9rem;
}

.pillar-pill {
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gold-bright);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 170, 84, 0.26);
  transition: all 0.2s ease;
}

.pillar-pill:hover {
  background: rgba(212, 170, 84, 0.16);
  border-color: var(--gold-bright);
  transform: translateY(-2px);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2.3rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(212, 170, 84, 0.2);
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-num {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--gold-bright);
  line-height: 1.1;
}

.metric-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Portrait Frame with 3D tilt */
.hero-portrait-wrap {
  perspective: 1100px;
}

.portrait-frame {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: #100e14;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(212, 170, 84, 0.14);
  transform-style: preserve-3d;
  transition: transform 0.22s ease-out;
}

.portrait-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 15%;
}

.portrait-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 9, 13, 0.94) 100%);
  pointer-events: none;
  z-index: 1;
}

.portrait-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.4rem 1.5rem 1.5rem;
  z-index: 2;
}

.caption-badge {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-bright);
  margin-bottom: 0.45rem;
}

.portrait-caption p {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.4;
  color: #f6efe0;
}

.scroll-cue {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px;
  height: 30px;
  background: linear-gradient(180deg, var(--gold), transparent);
  animation: scrollLine 1.8s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { transform: scaleY(0.5); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ==========================================================================
   SECTIONS COMMON
   ========================================================================== */
.section {
  padding: 88px 0;
  position: relative;
}

.section-head {
  max-width: 780px;
  margin: 0 auto 3.2rem;
  text-align: center;
}

.section-kicker {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 0.65rem;
}

.section-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.8rem);
  line-height: 1.18;
  font-weight: 600;
  color: #fbf7ee;
}

.section-title-sm {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.22;
}

.section-desc {
  margin: 0;
  font-size: 1.02rem;
  color: var(--text-muted);
}

/* Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1), transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   AUDIO STUDIO SHOWCASE
   ========================================================================== */
.audio-studio-section {
  padding-top: 32px;
  padding-bottom: 64px;
}

.studio-shell {
  background: linear-gradient(145deg, #16131c 0%, #100e15 100%);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(242, 207, 130, 0.14);
}

.studio-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 1.6rem;
  flex-wrap: wrap;
}

.studio-note {
  margin: 0;
  max-width: 470px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.studio-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1.5rem;
  align-items: stretch;
}

.studio-tracks {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.track-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: all 0.22s ease;
}

.track-card:hover {
  border-color: rgba(212, 170, 84, 0.42);
  background: rgba(212, 170, 84, 0.07);
}

.track-card.active {
  border-color: var(--gold);
  background: linear-gradient(120deg, rgba(212, 170, 84, 0.16), rgba(176, 42, 51, 0.08));
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
}

.track-num {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold);
  min-width: 28px;
}

.track-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.track-meta strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: #faf5e8;
}

.track-meta small {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.track-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(212, 170, 84, 0.14);
  color: var(--gold-bright);
  flex-shrink: 0;
}

.studio-player-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #0b0a0f;
  border: 1px solid rgba(212, 170, 84, 0.22);
  border-radius: 18px;
  padding: 1.25rem;
  gap: 1rem;
}

.visualizer-box {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 0%, rgba(212, 170, 84, 0.14), rgba(10, 9, 13, 0.95) 75%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-height: 158px;
  display: flex;
  align-items: flex-end;
}

#audioVisualizer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.85;
}

.now-playing-overlay {
  position: relative;
  z-index: 2;
  padding: 1.1rem 1.25rem;
  width: 100%;
  background: linear-gradient(180deg, transparent, rgba(10, 9, 13, 0.88));
}

.np-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.now-playing-overlay h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  line-height: 1.2;
}

.now-playing-overlay p {
  margin: 0.2rem 0 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.studio-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.play-circle-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #140f06;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(212, 170, 84, 0.35);
  transition: transform 0.18s ease;
}

.play-circle-btn:hover {
  transform: scale(1.06);
}

.studio-progress-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

#studioSeek {
  width: 100%;
  accent-color: var(--gold);
  cursor: pointer;
}

.studio-time {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.studio-speed {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--gold-bright);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  font-size: 0.82rem;
  cursor: pointer;
}

/* ==========================================================================
   4 DIMENSIONS (EDITORIAL SPREADS)
   ========================================================================== */
.dimensions-section {
  background: linear-gradient(180deg, var(--bg) 0%, #0f0d14 50%, var(--bg) 100%);
}

.pillar-spread {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4.5rem;
  padding: 2rem;
  border-radius: 24px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.025), rgba(212, 170, 84, 0.03));
  border: 1px solid rgba(212, 170, 84, 0.14);
}

.pillar-spread:last-child {
  margin-bottom: 0;
}

.pillar-spread.reverse .pillar-media {
  order: 2;
}

.pillar-media {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
}

.pillar-media img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.pillar-spread:hover .pillar-media img {
  transform: scale(1.045);
}

.pillar-index {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(10, 9, 13, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--gold-bright);
}

.pillar-tag {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--gold);
  margin-bottom: 0.65rem;
}

.pillar-tag.crimson {
  color: #e2676f;
}

.pillar-body h3 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.24;
  color: #fbf7ee;
}

.pillar-body p {
  margin: 0 0 1rem;
  color: #d6cec0;
  font-size: 0.98rem;
}

.pillar-quote {
  margin: 1.25rem 0 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--gold);
  background: rgba(212, 170, 84, 0.07);
  border-radius: 0 12px 12px 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.18rem;
  line-height: 1.45;
  color: #f7f0e2;
}

.pillar-quote.crimson {
  border-left-color: var(--crimson);
  background: rgba(176, 42, 51, 0.12);
}

.pillar-quote footer {
  margin-top: 0.45rem;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 0.78rem;
  color: var(--gold);
}

.pillar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ==========================================================================
   DIGITAL LIBRARY & BOOK SHELF
   ========================================================================== */
.library-controls {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 2rem;
}

.inline-search-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 0.65rem 0.85rem 0.65rem 1.15rem;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
}

.inline-search-box svg {
  color: var(--gold);
  flex-shrink: 0;
}

.inline-search-box input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.98rem;
  outline: none;
}

.inline-search-box input::placeholder {
  color: var(--text-dim);
}

.inline-search-adv {
  padding: 0.5rem 0.95rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(212, 170, 84, 0.12);
  color: var(--gold-bright);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.inline-search-adv:hover {
  background: rgba(212, 170, 84, 0.24);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.filter-pill {
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  border-color: var(--gold);
  color: var(--text);
}

.filter-pill.active {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #161107;
  border-color: transparent;
  font-weight: 700;
}

.inline-results {
  margin-bottom: 2rem;
  padding: 1.25rem;
  border-radius: 18px;
  background: #14121b;
  border: 1px solid var(--border-strong);
}

.inline-results[hidden] {
  display: none;
}

.inline-results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.86rem;
  color: var(--gold-bright);
}

.inline-hits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 0.85rem;
}

.hit-card {
  padding: 0.95rem 1.05rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: all 0.2s ease;
}

.hit-card:hover {
  border-color: var(--gold);
  background: rgba(212, 170, 84, 0.09);
  transform: translateY(-2px);
}

.hit-book {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.hit-title {
  margin: 0.2rem 0 0.35rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.hit-snippet {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

mark {
  background: rgba(242, 207, 130, 0.3);
  color: #fff6dc;
  padding: 0 3px;
  border-radius: 3px;
}

/* Books Shelf Grid */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 1.5rem;
}

.book-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #171520, #110f17);
  border: 1px solid rgba(212, 170, 84, 0.16);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.book-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55), 0 0 30px rgba(212, 170, 84, 0.12);
}

.book-cover-stage {
  position: relative;
  padding: 1.35rem 1.35rem 0.9rem;
  background: radial-gradient(circle at 50% 35%, rgba(212, 170, 84, 0.14), rgba(10, 9, 13, 0.6) 76%);
  display: grid;
  place-items: center;
  perspective: 800px;
}

.book-cover-img {
  height: 215px;
  width: auto;
  max-width: 156px;
  object-fit: cover;
  border-radius: 6px 10px 10px 6px;
  box-shadow: -8px 14px 28px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(212, 170, 84, 0.3);
  transition: transform 0.35s ease;
}

.book-card:hover .book-cover-img {
  transform: rotateY(-10deg) scale(1.04);
}

.book-cat-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(10, 9, 13, 0.8);
  border: 1px solid var(--border);
  color: var(--gold-bright);
}

.book-info {
  padding: 1.05rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.book-year {
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.book-info h3 {
  margin: 0.3rem 0 0.45rem;
  font-family: var(--font-serif);
  font-size: 1.32rem;
  line-height: 1.22;
  color: #fcf7eb;
}

.book-info p {
  margin: 0 0 1rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  flex: 1;
}

.book-card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
}

.book-open-btn {
  padding: 0.62rem 0.9rem;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #161107;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.book-open-btn:hover {
  filter: brightness(1.08);
}

.book-audio-btn {
  padding: 0.62rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(212, 170, 84, 0.1);
  color: var(--gold-bright);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.book-audio-btn:hover {
  background: rgba(212, 170, 84, 0.22);
}

/* Bookmarks Bar */
.bookmarks-bar {
  margin-top: 2rem;
  padding: 1.2rem 1.4rem;
  border-radius: 16px;
  background: rgba(212, 170, 84, 0.07);
  border: 1px solid var(--border-strong);
}

.bookmarks-bar[hidden] {
  display: none;
}

.bookmarks-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  font-weight: 600;
  color: var(--gold-bright);
}

.text-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.82rem;
  text-decoration: underline;
}

.bookmarks-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.bm-chip {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(10, 9, 13, 0.7);
  color: var(--text);
  font-size: 0.82rem;
  cursor: pointer;
}

.bm-chip:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

/* ==========================================================================
   TIMELINE (1974 - 2026)
   ========================================================================== */
.timeline-section {
  background: linear-gradient(180deg, var(--bg), #110e17 50%, var(--bg));
}

.timeline {
  position: relative;
  max-width: 860px;
  margin-inline: auto;
  padding-left: 34px;
}

.timeline-line {
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: rgba(212, 170, 84, 0.16);
}

.timeline-line-fill {
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--gold-bright), var(--crimson), var(--gold));
  box-shadow: 0 0 12px rgba(212, 170, 84, 0.65);
  transition: height 0.15s linear;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.7rem;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.25rem;
  align-items: start;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -29px;
  top: 10px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--gold);
  box-shadow: 0 0 14px rgba(212, 170, 84, 0.6);
}

.tl-year {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--gold-bright);
  padding-top: 0.45rem;
}

.tl-year.crimson {
  color: #ee6c74;
}

.tl-card {
  padding: 1.25rem 1.45rem;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid rgba(212, 170, 84, 0.16);
}

.tl-card h4 {
  margin: 0 0 0.4rem;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: #fbf7ee;
}

.tl-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* ==========================================================================
   GALLERY & VIDEO ARCHIVE
   ========================================================================== */
.gallery-filters {
  margin-bottom: 2rem;
}

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

.gallery-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(212, 170, 84, 0.18);
  background: #14121a;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card:hover img {
  transform: scale(1.07);
}

.gallery-cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2rem 0.95rem 0.85rem;
  background: linear-gradient(180deg, transparent, rgba(10, 9, 13, 0.94));
  color: #f4eee1;
}

.gallery-cap span {
  display: inline-block;
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
}

.gallery-cap p {
  margin: 0.15rem 0 0;
  font-size: 0.83rem;
  line-height: 1.3;
}

.video-subsection {
  margin-top: 4.5rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
}

.video-card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid rgba(212, 170, 84, 0.16);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.video-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0d0c11;
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.video-card:hover .video-thumb img {
  transform: scale(1.05);
  opacity: 1;
}

.video-play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(10, 9, 13, 0.82);
  border: 2px solid var(--gold-bright);
  color: var(--gold-bright);
  display: grid;
  place-items: center;
}

.video-title {
  padding: 0.9rem 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.38;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid rgba(212, 170, 84, 0.18);
  padding: 2.8rem 0 3.2rem;
  background: #070609;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  max-width: 660px;
}

.footer-brand strong {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gold-bright);
}

.footer-brand p {
  margin: 0.3rem 0 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.4rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--gold-bright);
}

/* ==========================================================================
   GLOBAL SEARCH MODAL (Cmd+K)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: rgba(5, 4, 8, 0.84);
  backdrop-filter: blur(12px);
  display: grid;
  place-items: start center;
  padding: 7vh 1rem 2rem;
}

.modal-backdrop[hidden] {
  display: none;
}

.search-dialog {
  width: min(100%, 780px);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  background: #14121b;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.78);
}

.search-dialog-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.05rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.search-dialog-head svg {
  color: var(--gold);
  flex-shrink: 0;
}

.search-dialog-head input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.05rem;
  outline: none;
}

.close-modal-btn {
  padding: 0.35rem 0.65rem;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
}

.search-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.sug-chip {
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(212, 170, 84, 0.08);
  color: var(--gold-bright);
  font-size: 0.78rem;
  cursor: pointer;
}

.sug-chip:hover {
  background: rgba(212, 170, 84, 0.22);
}

.search-stats {
  padding: 0.65rem 1.2rem;
  font-size: 0.8rem;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.2);
}

.search-results-list {
  overflow-y: auto;
  padding: 0.8rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.search-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.18s ease;
}

.search-result-row:hover {
  border-color: var(--gold);
  background: rgba(212, 170, 84, 0.08);
}

.sr-main {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.sr-actions {
  display: flex;
  gap: 0.45rem;
  flex-shrink: 0;
}

.sr-btn {
  padding: 0.42rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(212, 170, 84, 0.12);
  color: var(--gold-bright);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.sr-btn:hover {
  background: var(--gold);
  color: #140f06;
}

/* ==========================================================================
   REALISTIC 3D FLIPBOOK READER (Carte reală răsfoibilă pagină cu pagină)
   ========================================================================== */
.reader-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(6, 5, 9, 0.96);
  display: flex;
}

.reader-backdrop[hidden] {
  display: none;
}

.flipbook-app {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at center, #1b171f 0%, #0b090f 75%);
  color: #efe9dc;
  --paper-bg: #f8f3e6;
  --paper-bg-edge: #ece3cc;
  --paper-ink: #1e1810;
  --paper-muted: #6c5d47;
  --paper-accent: #8f631b;
  --paper-border: rgba(120, 94, 48, 0.22);
  --r-surface: #15121b;
  --r-border: rgba(212, 170, 84, 0.22);
  --r-text: #efe9dc;
  --r-muted: #a69c8b;
  --r-accent: #d4aa54;
  --r-highlight: rgba(212, 170, 84, 0.16);
  --fb-font-size: 1.06rem;
}

.flipbook-app[data-paper="sepia"] {
  --paper-bg: #efe2c6;
  --paper-bg-edge: #dfcca5;
  --paper-ink: #2a1f12;
  --paper-muted: #69543a;
  --paper-accent: #835412;
}

.flipbook-app[data-paper="obsidian"] {
  --paper-bg: #17151f;
  --paper-bg-edge: #100e16;
  --paper-ink: #ebe3d2;
  --paper-muted: #988e7c;
  --paper-accent: #d4aa54;
  --paper-border: rgba(212, 170, 84, 0.2);
}

.fb-topbar {
  min-height: 60px;
  padding: max(0.45rem, env(safe-area-inset-top)) 1.1rem 0.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  background: rgba(14, 12, 19, 0.96);
  border-bottom: 1px solid var(--r-border);
  flex-shrink: 0;
}

.fb-top-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.fb-top-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.fb-back-btn {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold)) !important;
  color: #161006 !important;
  border: none !important;
  font-weight: 700 !important;
  padding: 0.46rem 0.9rem !important;
  border-radius: 999px !important;
  white-space: nowrap;
  flex-shrink: 0;
}

.fb-close-mob {
  flex-shrink: 0;
}

.theme-dot[data-rtheme="cream"] { background: #f8f3e6; border-color: #c5b694; }

.fb-workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  position: relative;
  overflow: hidden;
}

.fb-sidebar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 310px;
  z-index: 30;
  background: rgba(18, 15, 24, 0.98);
  border-right: 1px solid var(--r-border);
  display: flex;
  flex-direction: column;
  box-shadow: 20px 0 60px rgba(0, 0, 0, 0.72);
  transform: translateX(0);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.fb-sidebar.collapsed {
  transform: translateX(-102%);
}

.fb-desk {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 66px;
  position: relative;
  overflow: hidden;
}

.fb-side-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 76px;
  border-radius: 14px;
  border: 1px solid rgba(212, 170, 84, 0.32);
  background: rgba(14, 12, 19, 0.78);
  color: var(--gold-bright);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 20;
  transition: all 0.2s ease;
}

.fb-side-arrow:hover:not(:disabled) {
  background: rgba(212, 170, 84, 0.22);
  border-color: var(--gold-bright);
  transform: translateY(-50%) scale(1.06);
}

.fb-side-arrow:disabled {
  opacity: 0.22;
  cursor: not-allowed;
}

.fb-side-arrow.prev { left: 14px; }
.fb-side-arrow.next { right: 14px; }

/* 3D Open Book Stage */
.book-stage {
  width: min(100%, 1060px);
  height: min(100%, 740px);
  aspect-ratio: 1.44 / 1;
  max-height: calc(100vh - 165px);
  perspective: 2500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-3d {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  transform-style: preserve-3d;
  border-radius: 8px;
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.82),
    0 10px 26px rgba(0, 0, 0, 0.65),
    0 0 0 6px #2a2016,
    0 0 0 8px rgba(212, 170, 84, 0.35);
}

/* Realistic stacked pages thickness on outer edges */
.book-edge-left, .book-edge-right {
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 10px;
  z-index: 5;
  pointer-events: none;
  background: repeating-linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.16) 0px,
    rgba(255, 255, 255, 0.35) 1px,
    rgba(0, 0, 0, 0.08) 2px
  );
}

.book-edge-left { left: -9px; border-radius: 3px 0 0 3px; }
.book-edge-right { right: -9px; border-radius: 0 3px 3px 0; }

/* Central binding crease shadow */
.book-spine-shadow {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 58px;
  transform: translateX(-50%);
  z-index: 12;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.14) 36%,
    rgba(0, 0, 0, 0.36) 50%,
    rgba(0, 0, 0, 0.14) 64%,
    rgba(0, 0, 0, 0) 100%
  );
}

.book-sheet {
  position: relative;
  width: 50%;
  height: 100%;
  overflow: hidden;
  background: var(--paper-bg);
  color: var(--paper-ink);
  cursor: pointer;
  user-select: none;
}

.sheet-left {
  border-radius: 6px 0 0 6px;
  background-image: linear-gradient(90deg, var(--paper-bg-edge) 0%, var(--paper-bg) 7%, var(--paper-bg) 92%, var(--paper-bg-edge) 100%);
}

.sheet-right {
  border-radius: 0 6px 6px 0;
  background-image: linear-gradient(90deg, var(--paper-bg-edge) 0%, var(--paper-bg) 8%, var(--paper-bg) 93%, var(--paper-bg-edge) 100%);
}

/* Interactive subtle page-curl corner on hover */
.page-curl-corner {
  position: absolute;
  bottom: 0;
  width: 44px;
  height: 44px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease, width 0.25s ease, height 0.25s ease;
  z-index: 9;
}

.curl-right {
  right: 0;
  background: linear-gradient(315deg, rgba(0, 0, 0, 0.22) 0%, rgba(255, 255, 255, 0.65) 45%, rgba(0, 0, 0, 0.14) 50%, transparent 54%);
}

.curl-left {
  left: 0;
  background: linear-gradient(45deg, rgba(0, 0, 0, 0.22) 0%, rgba(255, 255, 255, 0.65) 45%, rgba(0, 0, 0, 0.14) 50%, transparent 54%);
}

.sheet-right:hover .curl-right,
.sheet-left:hover .curl-left {
  opacity: 1;
  width: 56px;
  height: 56px;
}

/* 3D Turning Page Leaf */
.turn-leaf {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  transform-origin: left center;
  transform-style: preserve-3d;
  z-index: 25;
  display: none;
  pointer-events: none;
}

.turn-leaf.turning-next,
.turn-leaf.turning-prev {
  display: block;
}

.turn-leaf.turning-next {
  animation: flipPageNext 0.68s cubic-bezier(0.645, 0.045, 0.355, 1) forwards;
}

.turn-leaf.turning-prev {
  animation: flipPagePrev 0.68s cubic-bezier(0.645, 0.045, 0.355, 1) forwards;
}

@keyframes flipPageNext {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(-180deg); }
}

@keyframes flipPagePrev {
  0% { transform: rotateY(-180deg); }
  100% { transform: rotateY(0deg); }
}

.turn-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  background: var(--paper-bg);
  color: var(--paper-ink);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.28);
}

.turn-front {
  border-radius: 0 6px 6px 0;
  background-image: linear-gradient(90deg, var(--paper-bg-edge) 0%, var(--paper-bg) 8%, var(--paper-bg) 93%, var(--paper-bg-edge) 100%);
}

.turn-back {
  border-radius: 6px 0 0 6px;
  transform: rotateY(180deg);
  background-image: linear-gradient(90deg, var(--paper-bg-edge) 0%, var(--paper-bg) 7%, var(--paper-bg) 92%, var(--paper-bg-edge) 100%);
}

.turn-shade-front,
.turn-shade-back {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.turn-leaf.turning-next .turn-shade-front {
  animation: shadeGrow 0.68s ease-in-out forwards;
}

.turn-leaf.turning-next .turn-shade-back {
  animation: shadeFade 0.68s ease-in-out forwards;
}

.turn-leaf.turning-prev .turn-shade-back {
  animation: shadeGrow 0.68s ease-in-out forwards;
}

.turn-leaf.turning-prev .turn-shade-front {
  animation: shadeFade 0.68s ease-in-out forwards;
}

@keyframes shadeGrow {
  0% { background: rgba(0, 0, 0, 0); }
  50% { background: rgba(0, 0, 0, 0.24); }
  100% { background: rgba(0, 0, 0, 0.35); }
}

@keyframes shadeFade {
  0% { background: rgba(0, 0, 0, 0.35); }
  50% { background: rgba(0, 0, 0, 0.18); }
  100% { background: rgba(0, 0, 0, 0); }
}

/* Printed Book Page Interior Layout */
.page-surface {
  width: 100%;
  height: 100%;
  padding: 2.1rem 2.3rem 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
}

.page-surface.pdf-page-mode {
  padding: 0.65rem;
  background: var(--paper-bg);
  align-items: center;
  justify-content: center;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.page-surface.pdf-page-mode.pdf-zoomed {
  align-items: flex-start;
  justify-content: flex-start;
}

.page-surface.pdf-page-mode img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  transition: width 0.2s ease;
}

.page-surface.pdf-page-mode.pdf-zoomed img {
  max-width: none;
  max-height: none;
  width: calc(100% * var(--pdf-zoom, 1));
  height: auto;
}

.page-running-head {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--paper-muted);
  border-bottom: 1px solid var(--paper-border);
  padding-bottom: 0.45rem;
  margin-bottom: 1.05rem;
  display: flex;
  justify-content: space-between;
  flex-shrink: 0;
}

.page-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-family: var(--font-serif);
  font-size: var(--fb-font-size);
  line-height: 1.62;
  color: var(--paper-ink);
  padding-right: 4px;
}

.fb-mob-turn {
  display: none;
}

.page-piece-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.24rem;
  line-height: 1.26;
  color: var(--paper-ink);
  border-bottom: 1px solid var(--paper-border);
  padding-bottom: 0.45rem;
}

.page-text-block {
  white-space: pre-line;
  margin: 0 0 0.8rem;
}

.page-footer-num {
  margin-top: auto;
  padding-top: 0.6rem;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 0.88rem;
  color: var(--paper-muted);
  flex-shrink: 0;
}

/* Realistic Front Cover / Half-Title Inside the Book */
.page-cover-spread {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
}

.page-cover-spread img {
  max-height: 68%;
  width: auto;
  border-radius: 6px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(143, 99, 27, 0.35);
}

.page-cover-spread h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--paper-ink);
}

.page-cover-spread p {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--paper-muted);
  max-width: 86%;
}

.page-endpaper {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.8rem;
  opacity: 0.82;
}

.endpaper-emblem {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--paper-accent);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--paper-accent);
}

/* Bottom Page Scrubber Bar */
.fb-bottombar {
  padding: 0.65rem 1.25rem;
  background: rgba(14, 12, 19, 0.96);
  border-top: 1px solid var(--r-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.fb-hint {
  font-size: 0.78rem;
  color: var(--r-muted);
}

.fb-scrubber-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
  max-width: 460px;
}

#fbPageSlider {
  flex: 1;
  accent-color: var(--gold);
  cursor: pointer;
}

.fb-page-counter {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold-bright);
  min-width: 88px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Mobile Single-Page Realistic Mode (Full usability + zoom + scroll + zero overlap) */
@media (max-width: 860px) {
  .fb-desk {
    padding: 8px 10px;
  }

  .book-stage {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    max-height: none;
  }

  .book-3d {
    box-shadow:
      0 18px 46px rgba(0, 0, 0, 0.75),
      0 0 0 3px #2a2016,
      0 0 0 4px rgba(212, 170, 84, 0.35);
  }

  .sheet-left, .book-spine-shadow, .book-edge-left, .book-edge-right, .fb-side-arrow {
    display: none;
  }

  .sheet-right {
    width: 100%;
    border-radius: 6px;
    cursor: default;
  }

  .turn-leaf {
    width: 100%;
  }

  .fb-mob-turn {
    display: inline-flex;
    font-size: 1.15rem;
    padding: 0.35rem 0.72rem;
    background: rgba(212, 170, 84, 0.14);
    border-color: rgba(212, 170, 84, 0.42);
    color: var(--gold-bright);
  }

  .page-surface {
    padding: 1rem 1.05rem 0.9rem;
  }

  .page-running-head {
    font-size: 0.62rem;
    margin-bottom: 0.7rem;
  }

  .page-piece-title {
    font-size: 1.12rem;
  }

  .fb-scrubber-wrap {
    max-width: none;
    width: 100%;
    gap: 0.45rem;
  }

  .fb-page-counter {
    min-width: 64px;
    font-size: 0.76rem;
  }

  .fb-hint {
    display: none;
  }

  /* Responsive polish across all pages on mobile */
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .video-grid,
  .books-grid {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .yt-dialog {
    width: 96vw;
    border-radius: 14px;
  }

  .yt-dialog-head {
    padding: 0.75rem 0.9rem;
  }

  .yt-head-meta h3 {
    font-size: 1rem;
  }
}

/* Keep book-card single clean CTA */
.book-card-actions {
  display: flex;
}

.book-open-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

/* ==========================================================================
   YOUTUBE INTEGRATED MODAL PLAYER
   ========================================================================== */
.yt-backdrop {
  place-items: center;
  padding: 1.5rem;
}

.yt-dialog {
  width: min(100%, 980px);
  background: #121018;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 36px 96px rgba(0, 0, 0, 0.85);
}

.yt-dialog-head {
  padding: 0.95rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(212, 170, 84, 0.2);
}

.yt-head-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.yt-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
}

.yt-head-meta h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: #faf5e8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yt-head-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.yt-frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.yt-frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================================
   LIGHTBOX & TOAST
   ========================================================================== */
.lightbox-backdrop {
  place-items: center;
  padding: 1.5rem;
}

.lightbox-figure {
  margin: 0;
  max-width: min(92vw, 1020px);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-figure img {
  max-height: 76vh;
  width: auto;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
}

.lightbox-figure figcaption {
  margin-top: 0.9rem;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: #f4eee1;
  text-align: center;
}

.lightbox-close, .lightbox-nav {
  position: fixed;
  background: rgba(15, 14, 20, 0.85);
  border: 1px solid var(--border-strong);
  color: var(--gold-bright);
  border-radius: 50%;
  width: 46px;
  height: 46px;
  font-size: 1.4rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.lightbox-close { top: 20px; right: 20px; font-size: 1.1rem; }
.lightbox-nav.prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-nav.next { right: 20px; top: 50%; transform: translateY(-50%); }

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 4000;
  padding: 0.8rem 1.25rem;
  border-radius: 12px;
  background: #1a1723;
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6);
}

.toast[hidden] {
  display: none;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1040px) {
  .hero-grid,
  .studio-grid,
  .pillar-spread {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .pillar-spread.reverse .pillar-media {
    order: 0;
  }

  .hero-portrait-wrap {
    max-width: 480px;
    margin-inline: auto;
  }

  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: grid;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 1.6rem, var(--max-w));
  }

  .hero {
    padding-top: 98px;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-trigger span, .search-trigger kbd {
    display: none;
  }

  .search-trigger {
    width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
  }

  .studio-shell,
  .pillar-spread {
    padding: 1.25rem;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .inline-search-adv {
    display: none;
  }

  /* Reader mobile overlay sidebar */
  .reader-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 20;
    box-shadow: 16px 0 40px rgba(0, 0, 0, 0.65);
  }

  .reader-article {
    padding: 1.6rem 1.15rem 3.5rem;
  }

  .hide-sm {
    display: none;
  }

  .voice-wrap {
    width: 100%;
  }

  .voice-wrap select {
    flex: 1;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
