/* ============================================================
   WEBZIN 2026 — Premium Aurora Book Viewer
   2026 Design Trends: Glassmorphism · Aurora Mesh · Minimal
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=DM+Mono:wght@300;400&display=swap');

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }

/* ── Design Tokens ── */
:root {
  --bg:           #07070f;
  --surface:      rgba(255,255,255,0.04);
  --surface-md:   rgba(255,255,255,0.07);
  --surface-hi:   rgba(255,255,255,0.11);
  --border:       rgba(255,255,255,0.08);
  --border-hi:    rgba(255,255,255,0.18);
  --text-primary: #f0f0f8;
  --text-muted:   rgba(240,240,248,0.45);
  --text-subtle:  rgba(240,240,248,0.25);
  --accent-1:     #a78bfa;   /* violet */
  --accent-2:     #67e8f9;   /* cyan */
  --accent-3:     #f472b6;   /* pink */
  --accent-glow:  rgba(167,139,250,0.35);
  --header-h:     60px;
  --ctrl-h:       54px;
  --flip-ms:      680ms;
  --ease-flip:    cubic-bezier(0.77, 0, 0.18, 1);
  --radius-pill:  50px;
  --radius-md:    12px;
  --font-sans:    'Inter', system-ui, sans-serif;
  --font-serif:   'Playfair Display', Georgia, serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;
}

/* ── Base ── */
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

/* ============================================================
   AURORA BACKGROUND
   ============================================================ */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.aurora-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  animation: orbDrift linear infinite;
}
.aurora-orb-1 {
  width: 640px; height: 640px;
  top: -160px; left: -120px;
  background: radial-gradient(circle, #6d28d9 0%, transparent 65%);
  animation-duration: 28s;
  animation-delay: 0s;
}
.aurora-orb-2 {
  width: 500px; height: 500px;
  top: -80px; right: -100px;
  background: radial-gradient(circle, #0891b2 0%, transparent 65%);
  animation-duration: 22s;
  animation-delay: -6s;
}
.aurora-orb-3 {
  width: 420px; height: 420px;
  bottom: -100px; left: 30%;
  background: radial-gradient(circle, #be185d 0%, transparent 65%);
  animation-duration: 32s;
  animation-delay: -12s;
}
.aurora-orb-4 {
  width: 360px; height: 360px;
  bottom: 10%; right: 10%;
  background: radial-gradient(circle, #1d4ed8 0%, transparent 65%);
  animation-duration: 18s;
  animation-delay: -4s;
}
@keyframes orbDrift {
  0%   { transform: translate(0, 0)   scale(1);   }
  25%  { transform: translate(30px,-20px) scale(1.05); }
  50%  { transform: translate(-15px,25px) scale(0.97); }
  75%  { transform: translate(20px,10px)  scale(1.03); }
  100% { transform: translate(0, 0)   scale(1);   }
}

.noise-overlay {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.03;
  mix-blend-mode: overlay;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 80%);
}

/* ============================================================
   FLOATING HEADER
   ============================================================ */
.float-header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  pointer-events: auto;
}

.header-pill {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 22px;
  height: 50px;
  background: rgba(10, 10, 20, 0.65);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-pill);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 8px 32px rgba(0,0,0,0.5),
    0 0 60px rgba(107,33,168,0.12);
  white-space: nowrap;
}

/* Archive Selector */
.archive-selector {
  position: relative;
  display: flex;
  align-items: center;
}

.archive-trigger {
  background: none;
  border: none;
  color: var(--text-1);
  font-family: inherit;
  font-size: 15px; /* Standardized to 15px */
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
  opacity: 0.9;
}

.archive-trigger:hover {
  background: rgba(255, 255, 255, 0.05);
  opacity: 1;
}

.archive-trigger svg {
  opacity: 0.5;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.archive-selector.active .archive-trigger svg {
  transform: rotate(180deg);
}

.archive-dropdown {
  position: absolute;
  top: calc(100% + 16px);
  left: -12px;
  min-width: 260px;
  background: rgba(15, 15, 25, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-lo);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.95);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 300;
}

.archive-selector.active .archive-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.archive-item {
  padding: 10px 18px;
  font-size: 15px;
  color: var(--text-2);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.archive-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-1);
}

.archive-item[data-issue-active="true"] {
  color: var(--accent-1);
  font-weight: 600;
  background: rgba(99, 102, 241, 0.08);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-icon {
  font-size: 1.1rem;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text-primary);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.brand-name:hover {
  opacity: 0.8;
}

.brand-sep {
  color: var(--text-subtle);
  font-size: 15px;
}

.brand-vol {
  font-family: inherit;
  font-size: 15px;
  color: var(--text-1);
  letter-spacing: 0.08em;
  font-weight: 500;
}

.header-divider {
  width: 1px;
  height: 18px;
  background: var(--border-hi);
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.icon-btn:hover {
  background: var(--surface-hi);
  border-color: var(--border-hi);
  color: var(--text-primary);
}

.zoom-val {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  min-width: 36px;
  text-align: center;
  letter-spacing: 0.04em;
}

.inline-sep {
  width: 1px;
  height: 14px;
  background: var(--border);
  margin: 0 2px;
}

/* ============================================================
   BOOK STAGE
   ============================================================ */
.book-stage {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Loading Screen ── */
.loading-screen {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.loading-screen.hidden { display: none; }

.loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loading-rings {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid transparent;
  animation: ringRot linear infinite;
}
.ring-1 {
  width: 80px; height: 80px;
  border-top-color: var(--accent-1);
  border-right-color: transparent;
  animation-duration: 2s;
}
.ring-2 {
  width: 58px; height: 58px;
  border-top-color: var(--accent-2);
  border-left-color: transparent;
  animation-duration: 1.4s;
  animation-direction: reverse;
}
.ring-3 {
  width: 38px; height: 38px;
  border-top-color: var(--accent-3);
  animation-duration: 0.9s;
}
.ring-label {
  font-size: 0.9rem;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  z-index: 1;
}

@keyframes ringRot {
  to { transform: rotate(360deg); }
}

.loading-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: var(--text-primary);
  font-family: var(--font-sans);
}

.loading-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  font-family: var(--font-sans);
  margin-top: -12px;
}

.loading-bar {
  width: 160px;
  height: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.loading-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ── Book Wrap (book + side nav zones) ── */
.book-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
}

/* ── Nav Zones ── */
.nav-zone {
  width: 64px;
  align-self: stretch;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 20;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.nav-arrow-inner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(10,10,20,0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-hi);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.nav-arrow-inner svg { width: 16px; height: 16px; }

.nav-zone:hover .nav-arrow-inner {
  background: var(--surface-hi);
  border-color: rgba(167,139,250,0.4);
  color: var(--accent-1);
  box-shadow: 0 0 20px rgba(167,139,250,0.25), 0 4px 20px rgba(0,0,0,0.4);
  transform: scale(1.1);
}
.nav-zone:disabled { opacity: 0; pointer-events: none; }

/* ── Book Frame ── */
.book-frame {
  position: relative;
  /* size set by JS */
  border-radius: 3px;
  transform-style: preserve-3d;
  perspective: 3000px;
}

/* Subtle floating shadow beneath book */
.book-frame::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: 5%;
  right: 5%;
  height: 50px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.75) 0%, transparent 70%);
  filter: blur(16px);
  pointer-events: none;
  z-index: -1;
}

/* ── Flip Zone ── */
.flip-zone {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

/* ── Page glow bloom ── */
.book-glow {
  position: absolute;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 100px;
  background: radial-gradient(ellipse, rgba(107,33,168,0.2) 0%, transparent 70%);
  filter: blur(30px);
  pointer-events: none;
  z-index: -1;
  animation: glowPulse 4s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scaleX(1); }
  50%       { opacity: 0.8; transform: translateX(-50%) scaleX(1.1); }
}

/* ============================================================
   BOOK COVERS
   ============================================================ */
.book-cover {
  position: absolute;
  inset: 0;
  border-radius: 3px;
  overflow: hidden;
}

.cover-inner {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg,
      #0d0d1a 0%,
      #12102b 35%,
      #0f1020 65%,
      #0a0a16 100%
    );
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(167,139,250,0.18);
}

/* Animated gradient border shimmer */
.cover-inner::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(167,139,250,0.6) 60deg,
    rgba(103,232,249,0.4) 120deg,
    transparent 180deg,
    rgba(244,114,182,0.4) 240deg,
    transparent 300deg,
    rgba(167,139,250,0.6) 360deg
  );
  border-radius: 4px;
  animation: borderSpin 6s linear infinite;
  z-index: -1;
}
@keyframes borderSpin {
  to { transform: rotate(360deg); }
}
.cover-inner::after {
  content: '';
  position: absolute;
  inset: 1px;
  background:
    linear-gradient(135deg, #0d0d1a, #12102b, #0a0a16);
  border-radius: 2px;
  z-index: 0;
}

.cover-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(107,33,168,0.22) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 70% 70%, rgba(8,145,178,0.15) 0%, transparent 50%);
  z-index: 1;
  pointer-events: none;
}

.cover-content {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 40px;
}

.cover-kicker {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  letter-spacing: 0.3em;
  color: var(--accent-2);
  text-transform: uppercase;
  opacity: 0.8;
}

.cover-title {
  font-family: var(--font-serif);
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 700;
  background: linear-gradient(135deg, #e0d7ff 30%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  letter-spacing: -0.02em;
}

.cover-number {
  display: inline-block;
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 15px; /* Standardized to 15px */
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.12em;
  padding: 10px 24px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 2rem;
  text-transform: uppercase;
}

.cover-line {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(167,139,250,0.6), transparent);
}

.cover-tagline {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--text-subtle);
  text-transform: uppercase;
  margin-bottom: 30px;
}

.cover-footer-info {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 300;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.cover-footer-info p {
  margin-bottom: 12px;
  word-break: keep-all;
}

.footer-row {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
}

.footer-account {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.3);
  margin: 20px 0;
  font-weight: 500;
}

.footer-account .label-highlight {
  color: rgba(255, 255, 255, 0.6);
}

/* Corner accents */
.cover-corner-tl, .cover-corner-br {
  position: absolute;
  width: 28px;
  height: 28px;
  z-index: 3;
  opacity: 0.5;
}
.cover-corner-tl {
  top: 16px; left: 16px;
  border-top: 1px solid var(--accent-1);
  border-left: 1px solid var(--accent-1);
}
.cover-corner-br {
  bottom: 16px; right: 16px;
  border-bottom: 1px solid var(--accent-2);
  border-right: 1px solid var(--accent-2);
}

/* Back cover */
.cover-inner-back {
  background: linear-gradient(135deg, #080810, #0d0d1a, #080810);
}
.cover-back-content {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.cover-back-mark {
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.4;
}
.cover-back-text {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--text-subtle);
}

/* ============================================================
   PAGES (Static + Flip)
   ============================================================ */
.page-static-el {
  position: absolute;
  top: 0;
  background: #faf8f4;
  overflow: hidden;
}
.page-static-el canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.page-num-label {
  position: absolute;
  bottom: 10px;
  left: 0; right: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: rgba(80,60,40,0.45);
  letter-spacing: 0.12em;
  pointer-events: none;
}

.book-spine-el {
  position: absolute;
  top: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0,0,0,0.05) 20%,
    rgba(0,0,0,0.15) 50%,
    rgba(0,0,0,0.05) 80%,
    transparent 100%
  );
  z-index: 5;
  pointer-events: none;
}

/* ── Flip leaf ── */
.flip-leaf {
  position: absolute;
  top: 0;
  transform-style: preserve-3d;
  transform-origin: left center;
  z-index: 10;
}
.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  background: #faf8f4;
}
.flip-face canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.flip-face-back {
  transform: rotateY(180deg);
}

/* Page shadow gradients */
.flip-face::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.1) 0%, transparent 10%, transparent 90%, rgba(0,0,0,0.06) 100%);
  pointer-events: none;
}

/* ============================================================
   FLOATING BOTTOM CONTROLS
   ============================================================ */
.float-controls {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
}

.controls-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 48px;
  background: rgba(10, 10, 20, 0.65);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-pill);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 12px 40px rgba(0,0,0,0.6),
    0 0 60px rgba(107,33,168,0.1);
}

.ctrl-pill-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.ctrl-pill-btn:hover {
  background: var(--surface-hi);
  border-color: var(--border-hi);
  color: var(--text-primary);
}
.ctrl-pill-btn:disabled { opacity: 0.2; pointer-events: none; }

/* Progress slider */
.progress-track-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.progress-track {
  -webkit-appearance: none;
  appearance: none;
  width: 200px;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
.progress-track::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  cursor: pointer;
  box-shadow: 0 0 8px rgba(167,139,250,0.6);
  transition: transform 0.2s ease;
}
.progress-track::-webkit-slider-thumb:hover { transform: scale(1.25); }
.progress-track::-moz-range-thumb {
  width: 13px; height: 13px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  border: none;
  cursor: pointer;
}

/* Track fill effect via background-size */
.progress-track {
  background-image: linear-gradient(var(--accent-1), var(--accent-1));
  background-size: 0% 100%;
  background-repeat: no-repeat;
}

.page-readout {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  min-width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.04em;
  padding: 0 12px;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.auto-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
  text-transform: uppercase;
}

.auto-btn:hover {
  background: var(--surface-hi);
  color: var(--text-primary);
  border-color: var(--border-hi);
}

.auto-btn.active {
  background: rgba(167, 139, 250, 0.12);
  border-color: var(--accent-1);
  color: var(--accent-2);
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.25);
  animation: autoPulse 2s ease-in-out infinite;
}

@keyframes autoPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(0.98); }
}

/* ============================================================
   FULLSCREEN MODE
   ============================================================ */
body.fullscreen .float-header,
body.fullscreen .float-controls { opacity: 0; pointer-events: none; transition: opacity 0.4s; }
body.fullscreen .float-header:hover,
body.fullscreen .float-controls:hover { opacity: 1; pointer-events: auto; }

/* ============================================================
   FOCUS / A11Y
   ============================================================ */
button:focus-visible {
  outline: 2px solid var(--accent-1);
  outline-offset: 2px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .float-header { top: 12px; }
  .brand-vol { display: none; }
  .brand-sep { display: none; }
  .header-divider { display: none; }
  .header-actions { gap: 4px; }
  .float-controls { bottom: 14px; width: 95%; max-width: 440px; }
  .controls-pill { gap: 4px; padding: 0 8px; }
  .progress-track { width: 80px; }
  .page-readout { min-width: 60px; gap: 4px; padding: 0 4px; }
  .auto-btn { padding: 2px 4px; font-size: 11px; }
  .nav-zone { width: 40px; }
  .nav-arrow-inner { width: 32px; height: 32px; }

  /* Cover text responsive */
  .cover-content { padding: 20px; gap: 12px; }
  .cover-kicker { font-size: 1.1rem; letter-spacing: 0.2em; }
  .cover-title { font-size: clamp(2rem, 15vw, 3.8rem); }
  .cover-number { margin-top: 1rem; margin-bottom: 1rem; padding: 6px 16px; font-size: 13px; }
  .cover-tagline { margin-bottom: 15px; font-size: 9px; }
  .cover-footer-info { font-size: 10px; padding-top: 15px; }
  .cover-footer-info { font-size: 10px; padding-top: 15px; }
  .footer-account { font-size: 13px; margin: 12px 0; }
  .book-frame { overflow: hidden; } /* Clip any flipping page remnants on mobile */
}

/* ============================================================
   FIXED BRANDING
   ============================================================ */
.fixed-branding {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  padding: 30px;
}

.brand-logo-tl {
  position: absolute;
  top: 30px;
  left: 30px;
  width: 100px;
  opacity: 0.15;
  filter: grayscale(1);
  transition: opacity 0.3s ease;
}

.brand-logo-br {
  position: absolute;
  bottom: 30px;
  right: 30px;
  width: 100px;
  opacity: 0.15;
  transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
  .fixed-branding { display: none; }
}

@media (max-width: 480px) {
  .nav-zone { width: 30px; }
  .nav-arrow-inner { width: 28px; height: 28px; }
  .nav-arrow-inner svg { width: 13px; height: 13px; }
  .progress-track { width: 90px; }
}
