/* ==========================================================================
   TEB Innovations — The Journey
   Design Theme: Modern Red & Cinematic Media Gallery
   Shared Stylesheet & Gallery System
   ========================================================================== */

/* 1. Typography Fonts: Clash Display & Plus Jakarta Sans */
@import url('https://api.fontshare.com/v2/css?f[]=clash-display@200,300,400,500,600,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* 2. Brand Tokens */
:root {
  --c-dark: #212529;
  --c-brand: #9a0101;
  --c-brand-light: #c62020;
  --c-brand-rgb: 154, 1, 1;
  --c-body: #727272;
  --c-accent: #ff4444;
  --font-base: "ClashDisplay", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --box-shadow: 0px 15px 25px rgba(0, 0, 0, 0.08);
  --box-shadow-lg: 0px 20px 40px rgba(154, 1, 1, 0.15);
  --glow: 0 0 20px rgba(154, 1, 1, 0.3);
  --glow-lg: 0 0 30px rgba(154, 1, 1, 0.5);
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --gradient-primary: linear-gradient(135deg, #9a0101 0%, #c62020 100%);
  --gradient-light: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  --gradient-radial: radial-gradient( circle at center, rgba(154, 1, 1, 0.1) 0%, transparent 70% );

  /* Cinematic Gallery Specific Tokens */
  --c-cinema-bg: #090a0c;
  --c-cinema-surface: rgba(18, 20, 24, 0.85);
  --c-cinema-border: rgba(255, 255, 255, 0.08);
  --c-cinema-text: #e6e8ec;
  --c-cinema-muted: #8b92a0;
}

/* 3. Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  font-family: var(--font-base);
  color: var(--c-dark);
  background: var(--gradient-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.gallery-mode {
  background: var(--c-cinema-bg);
  color: var(--c-cinema-text);
  overflow: hidden;
}

/* Subtle tech grid background for non-gallery cards */
.tech-grid-bg {
  position: fixed;
  inset: 0;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.015) 1px, transparent 1px);
  pointer-events: none;
  z-index: 0;
}

/* Selection Color */
::selection {
  background: var(--c-brand);
  color: #ffffff;
}

/* 4. Page Shell (Shared Structure) */
.journey-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

.journey-content {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem;
}

.journey-header {
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
}

.brand-monogram {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--c-dark);
  transition: var(--transition);
}

.brand-monogram:hover {
  color: var(--c-brand);
}

.brand-monogram img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.brand-monogram-text {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  text-transform: uppercase;
}

.journey-footer {
  flex-shrink: 0;
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.8125rem;
  color: var(--c-body);
  letter-spacing: 0.04em;
  position: relative;
  z-index: 10;
}

.journey-footer strong {
  color: var(--c-dark);
  font-weight: 600;
}

/* 5. Coming Soon (index.html) */
.coming-soon-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  box-shadow: var(--box-shadow-lg);
  padding: 3.5rem 2.5rem;
  max-width: 620px;
  width: 100%;
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.coming-soon-card::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
  opacity: 0.85;
}

.coming-soon-logo {
  max-width: 135px;
  width: 100%;
  height: auto;
  margin-bottom: 2rem;
  filter: drop-shadow(0 8px 16px rgba(154, 1, 1, 0.12));
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.coming-soon-logo:hover {
  transform: scale(1.03);
}

.brand-title {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--c-dark);
  margin-bottom: 0.25rem;
  line-height: 1.15;
}

.brand-subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--c-brand);
  margin-bottom: 1.5rem;
  display: block;
}

.brand-message {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--c-body);
  max-width: 480px;
  margin: 0 auto 2.25rem auto;
  font-weight: 400;
}

.badge-coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.55rem 1.35rem;
  border-radius: 50px;
  background: rgba(154, 1, 1, 0.05);
  border: 1px solid rgba(154, 1, 1, 0.2);
  color: var(--c-brand);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.badge-coming-soon:hover {
  border-color: rgba(154, 1, 1, 0.4);
  box-shadow: 0 0 16px rgba(154, 1, 1, 0.15);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-brand);
  box-shadow: 0 0 8px var(--c-brand);
  animation: pulse-beacon 2s infinite ease-in-out;
}

@keyframes pulse-beacon {
  0%, 100% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.35); opacity: 1; box-shadow: 0 0 14px var(--c-accent); }
}

.brand-accent-line {
  width: 50px;
  height: 2px;
  background: var(--gradient-primary);
  margin: 0 auto;
  border-radius: 2px;
  animation: accent-breathe 3.5s infinite ease-in-out;
}

@keyframes accent-breathe {
  0%, 100% { width: 40px; opacity: 0.4; }
  50% { width: 85px; opacity: 0.95; box-shadow: var(--glow); }
}

/* 6. Memory-Inspired Logo Loading Animation Overlay */
.memory-loader-overlay {
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 2rem;
}

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

.memory-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 420px;
  width: 100%;
}

.memory-logo-box {
  position: relative;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.memory-logo-img {
  max-width: 105px;
  max-height: 105px;
  width: auto;
  height: auto;
  object-fit: contain;
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: scale(0.94);
  animation: logo-emerge 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes logo-emerge {
  0% { opacity: 0; transform: scale(0.92); filter: blur(4px); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

.memory-scan-beam {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
  pointer-events: none;
  z-index: 3;
}

.memory-scan-beam::after {
  content: "";
  position: absolute;
  top: -100%;
  left: -20%;
  width: 140%;
  height: 60%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(154, 1, 1, 0.35) 90%,
    transparent 100%
  );
  transform: rotate(-25deg);
  animation: scan-sweep 2.6s infinite ease-in-out;
}

@keyframes scan-sweep {
  0% { top: -120%; opacity: 0; }
  20% { opacity: 0.9; }
  60% { opacity: 0.7; }
  80%, 100% { top: 140%; opacity: 0; }
}

.mem-fragment {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  pointer-events: none;
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
}

.mem-fragment.corner-tl {
  top: 4px; left: 4px;
  border-top-color: var(--c-brand); border-left-color: var(--c-brand);
  animation: connect-tl 2.4s infinite alternate ease-in-out;
}
.mem-fragment.corner-tr {
  top: 4px; right: 4px;
  border-top-color: var(--c-brand); border-right-color: var(--c-brand);
  animation: connect-tr 2.4s infinite alternate ease-in-out;
}
.mem-fragment.corner-bl {
  bottom: 4px; left: 4px;
  border-bottom-color: var(--c-brand); border-left-color: var(--c-brand);
  animation: connect-bl 2.4s infinite alternate ease-in-out;
}
.mem-fragment.corner-br {
  bottom: 4px; right: 4px;
  border-bottom-color: var(--c-brand); border-right-color: var(--c-brand);
  animation: connect-br 2.4s infinite alternate ease-in-out;
}

@keyframes connect-tl {
  0% { transform: translate(-6px, -6px); opacity: 0.3; }
  100% { transform: translate(0, 0); opacity: 1; box-shadow: -2px -2px 10px rgba(154, 1, 1, 0.4); }
}
@keyframes connect-tr {
  0% { transform: translate(6px, -6px); opacity: 0.3; }
  100% { transform: translate(0, 0); opacity: 1; box-shadow: 2px -2px 10px rgba(154, 1, 1, 0.4); }
}
@keyframes connect-bl {
  0% { transform: translate(-6px, 6px); opacity: 0.3; }
  100% { transform: translate(0, 0); opacity: 1; box-shadow: -2px 2px 10px rgba(154, 1, 1, 0.4); }
}
@keyframes connect-br {
  0% { transform: translate(6px, 6px); opacity: 0.3; }
  100% { transform: translate(0, 0); opacity: 1; box-shadow: 2px 2px 10px rgba(154, 1, 1, 0.4); }
}

.mem-timeline-bar {
  position: absolute;
  background: rgba(154, 1, 1, 0.2);
}
.mem-timeline-bar.h-top { top: 4px; left: 24px; right: 24px; height: 1px; }
.mem-timeline-bar.h-bottom { bottom: 4px; left: 24px; right: 24px; height: 1px; }
.mem-timeline-bar.v-left { left: 4px; top: 24px; bottom: 24px; width: 1px; }
.mem-timeline-bar.v-right { right: 4px; top: 24px; bottom: 24px; width: 1px; }

.memory-progress-track {
  width: 200px;
  height: 2px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  margin-bottom: 1.25rem;
}

.memory-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-primary);
  border-radius: 2px;
  box-shadow: var(--glow);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.memory-status-text {
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-body);
  font-weight: 500;
  text-align: center;
  min-height: 1.4rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.memory-status-text.fade-in { opacity: 1; transform: translateY(0); }
.memory-status-text.fade-out { opacity: 0; transform: translateY(-4px); }


/* ==========================================================================
   7. IMMERSIVE FULL-SCREEN MEDIA GALLERY
   ========================================================================== */
.gallery-viewport {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: var(--c-cinema-bg);
  background-image: 
    radial-gradient(circle at center, rgba(154, 1, 1, 0.08) 0%, transparent 65%),
    radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.02) 0%, transparent 40%);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
  user-select: none;
}

/* Gallery Top Toolbar */
.gallery-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  background: linear-gradient(to bottom, rgba(9, 10, 12, 0.88) 0%, transparent 100%);
  z-index: 20;
  pointer-events: auto;
}

.gallery-brand-box {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.gallery-logo {
  height: 36px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

.gallery-page-tag {
  display: flex;
  flex-direction: column;
}

.gallery-album-title {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
  line-height: 1.2;
}

.gallery-chapter-crumb {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-accent);
  font-weight: 600;
}

/* Top Right Toolbar Controls */
.gallery-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.gallery-tool-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-decoration: none;
  position: relative;
}

.gallery-tool-btn:hover {
  background: rgba(154, 1, 1, 0.35);
  border-color: var(--c-brand-light);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(154, 1, 1, 0.4);
  transform: translateY(-1px);
}

.gallery-tool-btn:active {
  transform: scale(0.96);
}

.gallery-tool-btn.active {
  background: var(--gradient-primary);
  border-color: var(--c-brand-light);
  color: #ffffff;
  box-shadow: var(--glow);
}

/* Dedicated Google Drive Button in Top Right */
.btn-drive-gateway {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50px;
  width: auto;
  height: 40px;
  padding: 0 1.1rem;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.btn-drive-gateway:hover {
  background: var(--gradient-primary);
  border-color: transparent;
  box-shadow: 0 0 20px rgba(154, 1, 1, 0.5);
  color: #ffffff;
}

/* Background Music Floating Flyout */
.music-flyout {
  position: absolute;
  top: 76px;
  right: 1.75rem;
  background: rgba(20, 22, 28, 0.95);
  border: 1px solid var(--c-cinema-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  width: 260px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 30;
  animation: flyout-in 0.25s ease-out;
}

.music-flyout.show {
  display: flex;
}

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

.music-flyout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--c-cinema-muted);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.music-track-title {
  font-size: 0.875rem;
  color: #ffffff;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-controls-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.music-vol-slider {
  flex: 1;
  accent-color: var(--c-brand-light);
  height: 4px;
}

/* Media Stage (Center Viewport) */
.gallery-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 80px 70px 90px 70px;
}

.gallery-media-wrapper {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.gallery-media-wrapper.fade-out {
  opacity: 0;
  transform: scale(0.98);
}

.gallery-media-wrapper.fade-in {
  opacity: 1;
  transform: scale(1);
}

.gallery-image-element {
  max-width: 100%;
  max-height: calc(100vh - 170px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.65);
  pointer-events: auto;
}

/* Video Player in Gallery */
.gallery-video-container {
  width: 860px;
  max-width: 90vw;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.8);
  position: relative;
}

.gallery-video-element {
  width: 100%;
  height: 100%;
  border: none;
  background: #000000;
}

/* Media Stage Loading Spinner */
.gallery-stage-loader {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(9, 10, 12, 0.5);
  backdrop-filter: blur(4px);
  z-index: 10;
}

.gallery-stage-loader.show {
  display: flex;
}

.gallery-spinner-red {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--c-brand-light);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

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

/* Left & Right Responsive Navigation Arrows */
.gallery-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(18, 20, 24, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  cursor: pointer;
  z-index: 25;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition);
}

.gallery-nav-arrow.nav-prev {
  left: 1.5rem;
}

.gallery-nav-arrow.nav-next {
  right: 1.5rem;
}

.gallery-nav-arrow:hover {
  background: var(--gradient-primary);
  border-color: var(--c-brand-light);
  box-shadow: var(--glow-lg);
  transform: translateY(-50%) scale(1.06);
}

.gallery-nav-arrow:active {
  transform: translateY(-50%) scale(0.96);
}

/* Gallery Bottom Toolbar */
.gallery-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: linear-gradient(to top, rgba(9, 10, 12, 0.92) 0%, transparent 100%);
  z-index: 20;
}

/* Slideshow Timer Indicator (Thin 2px line at very top of bottom bar) */
.slideshow-progress-line {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--gradient-primary);
  box-shadow: var(--glow);
  transition: width 0.1s linear;
  opacity: 0;
}

.slideshow-progress-line.active {
  opacity: 1;
}

/* Caption on bottom left */
.gallery-caption-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 40%;
}

.gallery-media-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-cinema-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.02em;
}

/* Counter & Album Progress on bottom center */
.gallery-counter-box {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.gallery-counter-text {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #ffffff;
}

.gallery-album-track {
  width: 140px;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

.gallery-album-fill {
  height: 100%;
  width: 0%;
  background: var(--c-brand-light);
  box-shadow: var(--glow);
  transition: width 0.3s ease;
}

/* Bottom Right: Thumbnail Strip Toggle */
.gallery-bottom-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Optional Thumbnail Strip Drawer */
.gallery-thumbnail-strip {
  position: absolute;
  bottom: 74px;
  left: 0;
  right: 0;
  background: rgba(14, 16, 20, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--c-cinema-border);
  padding: 0.75rem 1.5rem;
  display: none;
  gap: 0.75rem;
  overflow-x: auto;
  z-index: 22;
}

.gallery-thumbnail-strip.show {
  display: flex;
}

.gallery-thumb-item {
  width: 80px;
  height: 54px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: var(--transition);
  position: relative;
  background: #000000;
}

.gallery-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb-item.active {
  border-color: var(--c-brand-light);
  opacity: 1;
  box-shadow: 0 0 12px rgba(154, 1, 1, 0.6);
}

.gallery-thumb-item:hover {
  opacity: 0.95;
}

.thumb-video-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 0.65rem;
  padding: 1px 4px;
  border-radius: 4px;
}


/* ==========================================================================
   8. CHAPTER PAGE VIEWS (UNASSIGNED, EMPTY & ERROR)
   ========================================================================== */
.chapter-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  box-shadow: var(--box-shadow-lg);
  padding: 3rem 2.25rem;
  max-width: 600px;
  width: 100%;
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.chapter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--c-brand);
  background: rgba(154, 1, 1, 0.06);
  border: 1px solid rgba(154, 1, 1, 0.18);
  padding: 0.45rem 1.15rem;
  border-radius: 50px;
  margin-bottom: 1.75rem;
}

.chapter-title {
  font-size: 1.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--c-dark);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.chapter-desc {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--c-body);
  max-width: 480px;
  margin: 0 auto 2rem auto;
}

.timeline-milestone-nodes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem auto 2.25rem auto;
}

.milestone-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.node-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.15);
  transition: var(--transition);
}

.milestone-node.active .node-dot {
  background: var(--c-brand);
  box-shadow: 0 0 10px rgba(154, 1, 1, 0.5);
  animation: pulse-beacon 2s infinite ease-in-out;
}

.node-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-body);
}

.milestone-connector {
  width: 36px;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}

.btn-group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  justify-content: center;
  align-items: center;
}

.btn-brand-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--gradient-primary);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  padding: 0.8rem 1.6rem;
  border-radius: 50px;
  border: none;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(154, 1, 1, 0.28);
  transition: var(--transition);
  cursor: pointer;
}

.btn-brand-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(154, 1, 1, 0.4);
}

.btn-brand-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #ffffff;
  color: var(--c-dark) !important;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  padding: 0.8rem 1.6rem;
  border-radius: 50px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  text-decoration: none;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  cursor: pointer;
}

.btn-brand-secondary:hover {
  border-color: var(--c-brand);
  color: var(--c-brand) !important;
  transform: translateY(-2px);
}

.btn-brand-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #25d366;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  padding: 0.8rem 1.6rem;
  border-radius: 50px;
  border: none;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.28);
  transition: var(--transition);
  cursor: pointer;
}

.btn-brand-whatsapp:hover {
  background: #20ba5a;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(37, 211, 102, 0.4);
}


/* ==========================================================================
   9. DEVELOPMENT NOTICE MODAL (DARK CINEMATIC THEME)
   ========================================================================== */
.custom-modal .modal-content {
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(18, 20, 26, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  padding: 0.75rem;
  color: #e2e8f0;
}

.custom-modal .modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 1.5rem 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-header-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(154, 1, 1, 0.18);
  color: var(--c-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.custom-modal .modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin: 0;
}

.custom-modal .modal-body {
  padding: 1.5rem;
  color: var(--c-cinema-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.modal-notice-banner {
  background: rgba(154, 1, 1, 0.12);
  border-left: 3px solid var(--c-brand-light);
  padding: 1rem 1.15rem;
  border-radius: 0 12px 12px 0;
  margin-bottom: 1.5rem;
  color: #f1f5f9;
}

.modal-admin-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 1.25rem;
  text-align: center;
}

.modal-admin-box p {
  margin-bottom: 0.875rem;
  font-size: 0.875rem;
  color: var(--c-cinema-muted);
}

.custom-modal .modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.custom-modal .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}


/* ==========================================================================
   10. ACCESSIBILITY & RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .memory-scan-beam::after { display: none; }
}

@media (max-width: 768px) {
  .gallery-stage {
    padding: 70px 15px 80px 15px;
  }

  .gallery-image-element {
    max-height: calc(100vh - 180px);
  }

  .gallery-nav-arrow {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }

  .gallery-nav-arrow.nav-prev { left: 0.5rem; }
  .gallery-nav-arrow.nav-next { right: 0.5rem; }

  .gallery-top-bar {
    padding: 0 1rem;
    height: 64px;
  }

  .gallery-album-title {
    font-size: 0.8125rem;
  }

  .gallery-bottom-bar {
    padding: 0 1rem;
    height: 64px;
  }

  .gallery-caption-box {
    display: none;
  }

  .gallery-thumbnail-strip {
    bottom: 64px;
  }

  .btn-drive-gateway span {
    display: none;
  }

  .btn-drive-gateway {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
  }
}
