﻿/* ==========================================================================
   Wedding Album - Ultra-Premium Royal Gold & 3D Editorial Styling
   ========================================================================== */

:root {
  --bg-primary: #FAF7F2;
  --bg-card: #FDFBF8;
  --bg-secondary: #EFE9DE;
  --text-main: #1D1815;
  --text-muted: #645C52;
  --text-light: #948A7D;
  --accent: #D4AF37;
  /* Radiant 24K Imperial Gold */
  --accent-light: #FFDF73;
  --accent-dark: #996515;
  --accent-soft: rgba(212, 175, 55, 0.2);
  --heart-active: #D94B60;

  /* Real Metallic 24K Gold Leaf Palettes */
  --gold-primary: #D4AF37;
  --gold-highlight: #FFE58F;
  --gold-light: #FFDF73;
  --gold-bronze: #996515;
  --gold-gradient: linear-gradient(135deg, #FFE58F 0%, #D4AF37 50%, #996515 100%);
  --gold-glow: 0 0 14px rgba(212, 175, 55, 0.45);

  /* Liquid Glass & Gold Leaf variables */
  --glass-bg: rgba(255, 255, 255, 0.78);
  --glass-bg-hover: rgba(255, 255, 255, 0.94);
  --glass-border: rgba(255, 255, 255, 0.88);
  --glass-shadow: 0 14px 40px rgba(35, 25, 15, 0.12), inset 0 1px 2px rgba(255, 255, 255, 0.95);
  --border-card: rgba(212, 175, 55, 0.45);

  --shadow-book: 0 28px 70px rgba(25, 18, 10, 0.28), 0 10px 25px rgba(0, 0, 0, 0.08);
  --shadow-cover: 0 25px 65px rgba(212, 175, 55, 0.35), 0 15px 35px rgba(25, 18, 10, 0.18);

  --font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --header-height: 0px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #C29A6B;
  background-image: url('table_bg.jpg') !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-attachment: fixed !important;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  user-select: none;
  -webkit-user-select: none;
}

/* Wood Table subtle gold rim edge */
body::after {
  content: '';
  position: fixed;
  inset: 10px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 4px;
  pointer-events: none;
  z-index: 1;
}

/* ==========================================================================
   Cinematic Dreamy Intro Splash (Blur to Clear)
   ========================================================================== */
.intro-splash {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(30, 16, 9, 0.95) 0%, rgba(18, 9, 4, 0.98) 65%, rgba(10, 5, 2, 0.99) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), filter 0.85s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.85s;
}

.intro-splash.is-hidden {
  opacity: 0;
  filter: blur(12px);
  visibility: hidden;
  pointer-events: none;
}

.intro-lux-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 460px;
  width: 90%;
  animation: introPop 1s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes introPop {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
    filter: blur(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

.intro-ornament {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  letter-spacing: 0.3em;
  color: #D4AF37;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.intro-title {
  font-family: var(--font-serif);
  font-size: 3.4rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #FFE58F 0%, #D4AF37 50%, #996515 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.28));
  text-transform: uppercase;
  line-height: 1;
}

.intro-divider {
  width: 52px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, #D4AF37, transparent);
  margin: 1.1rem auto 0.9rem;
}

.intro-subtitle {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  color: #7A6F62;
  text-transform: uppercase;
  margin-bottom: 1.8rem;
  font-weight: 500;
}

/* Intro Loading Track with Romantic Hearts Progress */
.intro-loading-wrapper {
  width: 100%;
  max-width: 250px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.intro-hearts-track {
  position: relative;
  width: 100%;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.intro-hearts-bg,
.intro-hearts-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 13.5px;
  letter-spacing: 0.35em;
  user-select: none;
}

.intro-hearts-bg {
  color: rgba(197, 160, 89, 0.38);
}

.intro-hearts-fill {
  color: #D94B60;
  text-shadow: 0 0 10px rgba(217, 75, 96, 0.7), 0 0 4px rgba(197, 160, 89, 0.5);
  width: 100%;
  clip-path: inset(0 100% 0 0);
  animation: heartsClipFill 1.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes heartsClipFill {
  0% {
    clip-path: inset(0 100% 0 0);
  }

  100% {
    clip-path: inset(0 0% 0 0);
  }
}

.intro-loading-line {
  width: 100%;
  height: 2.5px;
  background: rgba(197, 160, 89, 0.2);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.intro-loading-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #C5A059 0%, #D94B60 55%, #C5A059 100%);
  border-radius: 3px;
  transform: translateX(-100%);
  animation: barProgress 1.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes barProgress {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(0%);
  }
}

/* ==========================================================================
   App Container & Liquid Glass Header
   ========================================================================== */
.app-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Zen / Immersive Mode */
.app-container.zen-mode .site-header {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.site-header {
  display: none !important;
}

.brand-section {
  display: none !important;
}

.center-indicator {
  display: none !important;
}

.header-actions {
  display: none !important;
}

.autoplay-progress-container {
  display: none !important;
}

/* ==========================================================================
   Main Stage & 3D Album Canvas
   ========================================================================== */
.album-stage {
  flex: 1;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: -webkit-fill-available;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 1.8rem 1.4rem;
  perspective: 3200px;
  background-image: url('table_bg.jpg') !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}

.book-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  opacity: 0;
  transform-style: preserve-3d;
  filter: drop-shadow(0 20px 25px rgba(0, 0, 0, 0.55)) drop-shadow(0 45px 85px rgba(0, 0, 0, 0.7));
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.book-wrapper.is-ready {
  opacity: 1;
}

/* 3D Physical Tabletop Perspective Tilt when book is closed on the wooden table */
.book-wrapper.at-cover,
.book-wrapper.at-back-cover {
  transform: perspective(1600px) rotateX(8.5deg) rotateY(-2deg) scale(0.86);
}

.book-wrapper:not(.at-cover):not(.at-back-cover) {
  transform: perspective(2800px) rotateX(0deg) rotateY(0deg) scale(1.0) translateY(0);
}

/* Grounded Deep 3D Contact Shadows on Polished Wooden Table */
.book-wrapper::before {
  content: '';
  position: absolute;
  bottom: -28px;
  left: 4%;
  width: 94%;
  height: 55px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.92) 0%, rgba(15, 8, 3, 0.6) 45%, transparent 75%);
  filter: blur(18px);
  z-index: -1;
  transform: scaleY(0.45);
  pointer-events: none;
}

.book-wrapper::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 7%;
  width: 90%;
  height: 20px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.7) 45%, transparent 80%);
  filter: blur(6px);
  z-index: -1;
  transform: scaleY(0.28);
  pointer-events: none;
}

/* 3D Physical Book Turnover Revolution (Back Cover Closing to Front Cover) */
@keyframes bookTurnoverToFront {
  0% {
    transform: perspective(2800px) rotateY(0deg) scale(0.80);
    filter: drop-shadow(0 15px 20px rgba(0, 0, 0, 0.6));
  }

  48% {
    transform: perspective(2800px) rotateY(-90deg) scale(0.92) translateY(-25px);
    filter: drop-shadow(0 40px 65px rgba(0, 0, 0, 0.85));
  }

  52% {
    transform: perspective(2800px) rotateY(90deg) scale(0.92) translateY(-25px);
    filter: drop-shadow(0 40px 65px rgba(0, 0, 0, 0.85));
  }

  100% {
    transform: perspective(2800px) rotateY(0deg) scale(0.80);
    filter: drop-shadow(0 15px 20px rgba(0, 0, 0, 0.6));
  }
}

.book-wrapper.book-turning-to-front {
  animation: bookTurnoverToFront 0.82s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
  pointer-events: none !important;
}

#flipbook-container {
  display: block;
  margin: 0 auto;
  background: transparent;
  border-radius: 4px;
  transition: transform 0.85s cubic-bezier(0.2, 0.9, 0.3, 1);
  transform-style: preserve-3d;
}

/* Centered Front & Back Covers in Double-Spread Mode */
@media (min-width: 769px) {
  .book-wrapper.at-cover #flipbook-container {
    transform: translateX(-25%) scale(0.90);
  }

  .book-wrapper.at-back-cover #flipbook-container {
    transform: translateX(25%) scale(0.90);
  }

  .book-wrapper:not(.at-cover):not(.at-back-cover) #flipbook-container {
    transform: translateX(0) scale(1);
  }
}

.stf__parent {
  background: transparent !important;
}

.stf__block {
  perspective: 3200px !important;
}

.stf__item,
.page {
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
  transform-style: preserve-3d;
}

.nav-arrow {
  display: none !important;
}

/* ==========================================================================
   Album Pages Architecture (3D Realistic Depth & Paper Edges)
   ========================================================================== */
.page {
  background-color: #FFFFFF;
  overflow: hidden;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Left Page: 3D Stacked Pages Thickness + Center Spine Crease Shadow */
.page.--left,
.stf__item.--left .page {
  box-shadow:
    -1px 0 0 -1px #FFE89E,
    -3px 0 0 -2px #E5C158,
    -6px 0 0 -3px #D4AF37,
    -9px 1px 0 -4px #B88E28,
    -14px 2px 10px -4px rgba(25, 18, 10, 0.28),
    inset -28px 0 35px -12px rgba(20, 14, 8, 0.28),
    inset -6px 0 10px rgba(20, 14, 8, 0.14),
    inset -38px 0 18px -15px rgba(255, 255, 255, 0.95);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

/* Right Page: 3D Stacked Pages Thickness + Center Spine Crease Shadow */
.page.--right,
.stf__item.--right .page {
  box-shadow:
    1px 0 0 -1px #FFE89E,
    3px 0 0 -2px #E5C158,
    6px 0 0 -3px #D4AF37,
    9px 1px 0 -4px #B88E28,
    14px 2px 10px -4px rgba(25, 18, 10, 0.28),
    inset 28px 0 35px -12px rgba(20, 14, 8, 0.28),
    inset 6px 0 10px rgba(20, 14, 8, 0.14),
    inset 38px 0 18px -15px rgba(255, 255, 255, 0.95);
  border-left: 1px solid rgba(0, 0, 0, 0.08);
}

/* 3D Spine Gutter Gradient Overlay */
.page::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 48px;
  pointer-events: none;
  z-index: 8;
}

.page.--left::before,
.stf__item.--left .page::before {
  right: 0;
  background: linear-gradient(to right,
      transparent 0%,
      rgba(20, 14, 8, 0.02) 50%,
      rgba(20, 14, 8, 0.08) 80%,
      rgba(20, 14, 8, 0.24) 100%);
}

.page.--right::before,
.stf__item.--right .page::before {
  left: 0;
  background: linear-gradient(to left,
      transparent 0%,
      rgba(20, 14, 8, 0.02) 50%,
      rgba(20, 14, 8, 0.08) 80%,
      rgba(20, 14, 8, 0.24) 100%);
}

/* ==========================================================================
   Luxury Cover (Front & Back) with 3D Hardcover & 152-page Stack
   ========================================================================== */
.page-cover {
  background: #FAF7F2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.page-cover-front {
  position: relative;
  border-left: 14px solid #22140B !important;
  box-shadow:
    inset 1px 1px 1px rgba(255, 255, 255, 0.8),
    inset -2px -2px 3px rgba(0, 0, 0, 0.15),
    /* 152 stacked gilded paper edge */
    2px 1px 0 #D4AF37,
    4px 2px 0 #FAF6EF,
    6px 3px 0 #D4AF37,
    8px 4px 0 #FAF6EF,
    11px 6px 0 #C49826,
    14px 8px 0 #FAF6EF,
    17px 10px 0 #A87D1A,
    21px 13px 0 #7A530C,
    28px 18px 35px rgba(20, 12, 5, 0.65),
    38px 26px 65px rgba(10, 5, 2, 0.5) !important;
}

/* Realistic 3D spine hinge groove & gold line */
.page-cover-front::after {
  content: '';
  position: absolute;
  top: 0;
  left: 2px;
  bottom: 0;
  width: 14px;
  background: linear-gradient(to right,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(255, 220, 120, 0.28) 32%,
    rgba(40, 20, 10, 0.65) 68%,
    transparent 100%);
  border-right: 1px solid rgba(212, 175, 55, 0.45);
  pointer-events: none;
  z-index: 25;
}

.page-cover-back {
  box-shadow:
    inset 1px 1px 1px rgba(255, 255, 255, 1),
    inset -2px -2px 3px rgba(0, 0, 0, 0.15),
    -1px 0 0 #FFE89E,
    -3px 1px 0 #E5C158,
    -6px 2px 0 #D4AF37,
    -10px 3px 0 #B88E28,
    -14px 4px 0 #9E7419,
    -18px 5px 0 #855F11,
    -22px 6px 0 #6C4C09,
    -28px 10px 30px rgba(25, 18, 10, 0.42) !important;
}

/* ==========================================================================
   External Closed Back Cover (Rich Brown Leather & 24K Royal Gold Naqsh)
   "vu voroqham yopilsin orqasi jigarrang tusda oltin naqshlar da buladi"
   ========================================================================== */
.page-cover-back-closed {
  background: #1B0E07 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.4rem;
  border: 1px solid rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

/* Authentic Russian/Italian Wedding Photobook Leather Texture */
.cover-back-leather-inner {
  width: 100%;
  height: 100%;
  border: 2px solid #D4AF37;
  outline: 1px dashed rgba(255, 229, 143, 0.55);
  outline-offset: -9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 1.2rem 1.2rem;
  box-sizing: border-box;
  text-align: center;
  position: relative;
  overflow: hidden;
  /* Rich deep royal cognac / chocolate brown leather gradient with subtle grain */
  background-color: #241209;
  background-image:
    radial-gradient(ellipse at 50% 42%, rgba(76, 42, 26, 0.9) 0%, rgba(40, 20, 11, 0.96) 55%, #150904 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
  box-shadow:
    inset 0 0 70px rgba(10, 4, 1, 0.9),
    inset 0 1px 2px rgba(255, 235, 175, 0.3),
    inset 0 -2px 5px rgba(0, 0, 0, 0.85);
}

.back-cover-top-ornament {
  color: #FFE58F !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 0 8px rgba(212, 175, 55, 0.5);
  letter-spacing: 0.28em;
}

/* Yoyilgan Nejniy Oltin Naqsh (Delicate Spread Gold Naqsh on Back Cover) */
.cover-back-spread-naqsh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  opacity: 0.58;
}

.cover-back-spread-naqsh svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.cover-back-gold-medallion {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 4;
  margin: 0.5rem 0;
}

.back-cover-seal {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 0.8rem 0.5rem;
}

.back-cover-seal .couple-names-gold {
  font-size: 3.1rem;
  line-height: 1.15;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 18px rgba(255, 223, 115, 0.65));
}

.back-cover-divider {
  width: 54px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, #FFE58F, transparent);
  margin: 0.8rem auto 0.6rem auto;
}

.back-cover-date {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  letter-spacing: 0.26em;
  color: #FFE58F;
  margin-top: 0.35rem;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85), 0 0 12px rgba(212, 175, 55, 0.6);
}

.back-cover-tagline {
  font-family: 'Great Vibes', cursive;
  font-size: 1.5rem;
  color: #D4AF37;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.back-cover-open-btn {
  background: linear-gradient(135deg, #FFFCEB 0%, #FFE89E 25%, #D4AF37 55%, #B88E28 85%, #8C6415 100%) !important;
  color: #1A0D05 !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), 0 0 15px rgba(212, 175, 55, 0.4) !important;
  border: 1px solid #FFEAA0 !important;
}

.back-cover-open-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.7), 0 0 25px rgba(255, 223, 115, 0.65) !important;
}

@keyframes medallionGleam {

  0%,
  100% {
    opacity: 0.85;
    transform: scale(1) rotate(0deg);
  }

  50% {
    opacity: 1;
    transform: scale(1.025) rotate(1deg);
    filter: drop-shadow(0 0 14px rgba(255, 223, 115, 0.5));
  }
}

.cover-inner {
  width: 100%;
  height: 100%;
  border: 2px solid #C89C32;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.4rem 1rem;
  box-sizing: border-box;
  text-align: center;
  position: relative;
  background: radial-gradient(circle at 50% 36%, #FAF6EE 0%, #F5EDE0 60%, #EBE0CE 100%);
  outline: 6px solid rgba(255, 255, 255, 0.95);
  outline-offset: -8px;
  overflow: hidden;
  box-shadow:
    inset 0 0 60px rgba(180, 140, 60, 0.14),
    inset 0 1px 2px rgba(255, 255, 255, 1),
    inset 0 -1px 2px rgba(0, 0, 0, 0.08);
}

.cover-top-ornament {
  font-family: var(--font-serif);
  font-size: 0.82rem;
  color: #7D530C;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
  margin-bottom: 0.2rem;
}

/* Handwritten 24K Liquid Gold Calligraphy for Couple Names */
.cover-names-calligraphy,
.intro-names-calligraphy {
  margin: 0.2rem 0;
  text-align: center;
  z-index: 5;
}

.couple-names-gold {
  font-family: 'Great Vibes', 'Pinyon Script', cursive;
  font-size: 3.5rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.03em;
  background: linear-gradient(120deg,
    #6E4405 0%,
    #A67817 18%,
    #FFE89E 32%,
    #D4AF37 45%,
    #5A3602 60%,
    #C49826 78%,
    #4E2D01 100%);
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.9)) drop-shadow(0 2px 5px rgba(50, 28, 5, 0.5));
  animation: goldGleamSweep 7s ease-in-out infinite;
  display: inline-block;
  padding: 0.1rem 0.6rem;
}

.couple-names-gold .names-amp {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 2.6rem;
  margin: 0 0.3rem;
  color: #8C5B0D;
  -webkit-text-fill-color: #8C5B0D;
  filter: none;
}

@keyframes goldGleamSweep {
  0% {
    background-position: 200% 50%;
  }

  100% {
    background-position: -200% 50%;
  }
}

.cover-title-group {
  margin: 0;
}

.cover-subtitle {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #7D530C;
  margin-bottom: 0.2rem;
  font-weight: 600;
}

.cover-main-title {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: 0.14em;
  background: linear-gradient(135deg, #7A4E08 0%, #B8861B 35%, #563001 70%, #996515 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.9)) drop-shadow(0 2px 4px rgba(45, 25, 5, 0.38));
  text-transform: uppercase;
}

.cover-divider {
  width: 48px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, #B8861B, transparent);
  margin: 0.3rem auto;
}

.cover-date-text {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  color: #633B02;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Cover Featured Photo Frame with Crystal Glass & Gilded 24K Gold Border */
.cover-photo-window {
  width: 100%;
  max-width: 290px;
  height: 35%;
  max-height: 230px;
  min-height: 130px;
  border-radius: 6px;
  border: 2px solid #C89C32;
  background: #1A130D;
  padding: 4px;
  box-shadow:
    0 8px 24px rgba(45, 28, 12, 0.28),
    inset 0 0 0 1px rgba(255, 235, 175, 0.7),
    0 0 0 1px rgba(180, 135, 40, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0.1rem 0 0.3rem;
  position: relative;
  transition: transform 0.3s ease;
}

.cover-photo-window:hover {
  transform: scale(1.02);
}

.glass-reflection-shine {
  display: none !important;
}

.cover-photo-window img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
  display: block;
  filter: contrast(1.04) saturate(1.06);
}

.cover-bottom-cta {
  width: 100%;
}

.cover-open-btn {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1D1815;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 11px 26px;
  border: 1.5px solid #D4AF37;
  border-radius: 25px;
  background: linear-gradient(135deg, #FFFFFF 0%, #FAF6EE 100%);
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.25);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cover-open-btn:hover {
  background: linear-gradient(135deg, #FFE89E 0%, #D4AF37 100%);
  color: #FFFFFF;
  border-color: #D4AF37;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.45);
}

.cover-open-btn:active,
.back-cover-open-btn:active {
  transform: scale(0.96) !important;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.3) !important;
}

.cover-open-btn svg {
  width: 15px;
  height: 15px;
  animation: nudgeRight 1.5s ease-in-out infinite;
}

@keyframes nudgeRight {

  0%,
  100% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(5px);
  }
}

/* ==========================================================================
   Liquid Crystal Glass Bevel (Crisp, Clear, No Milky Fog or Blinding Glare)
   ========================================================================== */
.page-glass-gloss {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  background: transparent !important;
  border-radius: 4px;
  box-shadow:
    inset 0 1px 1.5px rgba(255, 255, 255, 0.4),
    inset 1px 0 1.5px rgba(255, 255, 255, 0.3),
    inset -1px -1px 1.5px rgba(0, 0, 0, 0.06);
}

.page-glass-gloss::after {
  display: none !important;
}

/* Glare completely removed so text and photos remain 100% crisp and readable */
.page-glass-glare {
  display: none !important;
}

/* ==========================================================================
   Single Photo Page Layout (Bittalik) with Nejniy (Delicate) Royal Gold Naqsh
   ========================================================================== */
.photo-page {
  padding: 1.15rem 1rem 0.65rem;
  display: flex;
  flex-direction: column;
  background-color: #FAF7F2;
  background-image:
    radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.95) 0%, rgba(250, 244, 235, 0.9) 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paperNoise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paperNoise)' opacity='0.035'/%3E%3C/svg%3E");
  background-position: center center;
  position: relative;
  overflow: hidden;
}

.photo-page-content {
  flex: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background-color: #FDFBF7;
  border: 2px solid #D4AF37;
  outline: 1.5px dashed rgba(255, 223, 115, 0.7);
  outline-offset: -7px;
  box-shadow:
    inset 0 0 35px rgba(212, 175, 55, 0.15),
    0 4px 18px rgba(30, 20, 10, 0.1);
}

/* Real Gilded 24K Royal Gold Filigree Corner Brackets */
.gold-corner-bracket {
  position: absolute;
  width: 38px;
  height: 38px;
  pointer-events: none;
  z-index: 10;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M2 30 V6 C2 3.8 3.8 2 6 2 H30' fill='none' stroke='%23D4AF37' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M6 30 V10 C6 7.8 7.8 6 10 6 H30' fill='none' stroke='%23FFDF73' stroke-width='1.2' stroke-linecap='round'/%3E%3Cpath d='M2 14 C6 14 14 6 14 2' fill='none' stroke='%23D4AF37' stroke-width='1.2'/%3E%3Ccircle cx='10' cy='10' r='2.8' fill='%23D4AF37' stroke='%23FFE58F' stroke-width='0.6'/%3E%3Cpolygon points='6,6 8,4 10,6 8,8' fill='%23FFDF73'/%3E%3Ccircle cx='20' cy='4' r='1.5' fill='%23D4AF37'/%3E%3Ccircle cx='4' cy='20' r='1.5' fill='%23D4AF37'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  filter: drop-shadow(0 2px 4px rgba(138, 92, 16, 0.65));
}

.gold-corner-bracket.top-left {
  top: 5px;
  left: 5px;
}

.gold-corner-bracket.top-right {
  top: 5px;
  right: 5px;
  transform: scaleX(-1);
}

.gold-corner-bracket.bottom-left {
  bottom: 5px;
  left: 5px;
  transform: scaleY(-1);
}

.gold-corner-bracket.bottom-right {
  bottom: 5px;
  right: 5px;
  transform: scale(-1);
}

/* Outer Passe-Partout Gold Border */
.photo-page-content::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1.5px solid rgba(212, 175, 55, 0.55);
  border-radius: 2px;
  pointer-events: none;
  z-index: 2;
}

/* Inner Fine Gold Dashed Inlay */
.photo-page-content::after {
  content: '';
  position: absolute;
  inset: 11px;
  border: 1px dashed rgba(255, 223, 115, 0.45);
  border-radius: 1px;
  pointer-events: none;
  z-index: 2;
}

.photo-page-content img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: grab;
  position: relative;
  z-index: 1;
}

.photo-page-content img:active {
  cursor: grabbing;
}

.photo-grid-wrapper {
  flex: 1;
  width: 100%;
  height: 100%;
  display: flex;
  position: relative;
}

/* Individual Photo Card with Liquid Glass Framing */
.photo-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: #FCFCFA;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: grab;
}

.photo-item img:active {
  cursor: grabbing;
}

@keyframes photoReveal {
  0% {
    opacity: 0.86;
    transform: scale(0.985);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Liquid Glass Quick Action Buttons */
.page-heart-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  pointer-events: auto;
  transition: all 0.25s ease;
}

.page-heart-btn svg {
  width: 15px;
  height: 15px;
  transition: all 0.2s ease;
}

.page-heart-btn:hover {
  background: #FFF;
  transform: scale(1.1);
  color: var(--heart-active);
  box-shadow: 0 4px 14px rgba(217, 75, 96, 0.25);
}

.page-heart-btn.is-active {
  color: var(--heart-active);
  background: #FFF;
}

.page-heart-btn.is-active svg {
  fill: var(--heart-active);
}

/* Explicit Zoom Button */
.page-zoom-trigger {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 4px 9px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  z-index: 10;
  pointer-events: auto;
  transition: all 0.25s ease;
}

.page-zoom-trigger:hover {
  background: #FFFFFF;
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(178, 145, 88, 0.2);
}

.page-zoom-trigger:active {
  transform: scale(0.95);
}

/* Page Footer with Elegant Gold Foil Typography */
.photo-page-footer {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.6rem;
  border-top: 1px solid rgba(197, 160, 89, 0.24);
  margin-top: 0.6rem;
  position: relative;
  z-index: 5;
}

.photo-page-caption {
  font-family: var(--font-serif);
  letter-spacing: 0.16em;
  font-style: italic;
  color: #9A7737;
  font-size: 0.92rem;
  font-weight: 500;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.photo-page-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.page-fav-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 3px 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #B89650;
  transition: transform 0.25s ease, color 0.25s ease;
  border-radius: 4px;
}

.page-fav-btn:hover {
  transform: scale(1.2);
  color: #E53935;
}

.page-fav-btn.is-active {
  color: #E53935;
  filter: drop-shadow(0 0 4px rgba(229, 57, 53, 0.4));
}

.page-fav-btn.is-active svg {
  fill: #E53935;
}

.photo-page-number {
  font-family: var(--font-serif);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #8C7B67;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
  transition: background 0.2s ease, color 0.2s ease;
}

.photo-page-number:hover {
  background: rgba(212, 175, 55, 0.15);
  color: #694C1B;
}

/* ==========================================================================
   Full Gallery Grid Modal (Liquid Glass Style)
   ========================================================================== */
.gallery-modal {
  position: fixed;
  inset: 0;
  background: rgba(250, 248, 245, 0.94);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-header {
  height: var(--header-height);
  padding: 0 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
  background: var(--glass-bg);
}

.modal-title-area {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.05);
  padding: 3px;
  border-radius: 20px;
}

.filter-tab {
  border: none;
  background: transparent;
  padding: 4px 12px;
  border-radius: 16px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tab.active {
  background: #FFF;
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1.1rem;
  max-width: 1440px;
  margin: 0 auto;
}

.grid-photo-card {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: 6px;
  overflow: hidden;
  background: #EAE6DF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.grid-photo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

.grid-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.grid-photo-card:hover img {
  transform: scale(1.05);
}

.grid-card-num {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  color: #FFF;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.grid-card-heart {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.grid-card-heart.is-active {
  color: var(--heart-active);
}

.grid-card-heart.is-active svg {
  fill: var(--heart-active);
}

/* ==========================================================================
   HD Lightbox Modal (Zoom, Pan, Heart, Download)
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(14, 13, 12, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 120;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.lightbox-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-header {
  height: 60px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #FFF;
  z-index: 2;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox-title {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.04em;
}

.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.lightbox-actions .icon-btn {
  color: #FFF;
  border-color: rgba(255, 255, 255, 0.15);
}

.lightbox-actions .icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.lightbox-actions .icon-btn.is-active {
  color: var(--heart-active);
  background: rgba(217, 75, 96, 0.2);
  border-color: var(--heart-active);
}

.lightbox-actions .icon-btn.is-active svg {
  fill: var(--heart-active);
}

.lightbox-viewport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
}

.lightbox-viewport img {
  max-width: 95%;
  max-height: 92%;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.6);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: zoom-in;
}

.lightbox-viewport.is-zoomed img {
  cursor: grab;
  max-width: none;
  max-height: none;
}

.lightbox-viewport.is-zoomed img:active {
  cursor: grabbing;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 5;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.08);
}

.lightbox-prev {
  left: 1.5rem;
}

.lightbox-next {
  right: 1.5rem;
}

/* ==========================================================================
   Mobile Responsive Adjustments (Physical Luxury Album Feel on Phones)
   ========================================================================== */
/* Tactile corner gleam indicating physical turnable album page */
.page-corner-curl {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 13px;
  color: #D4AF37;
  pointer-events: none;
  z-index: 10;
  animation: cornerGleam 2.2s ease-in-out infinite;
}

/* ==========================================================================
   Mobile Responsive Adjustments (Physical Luxury Album Feel on Phones)
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --header-height: 0px;
  }

  .nav-arrow {
    display: none !important;
  }

  .album-stage {
    padding: max(10px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    perspective: 2800px;
    height: 100vh;
    height: 100dvh;
    min-height: -webkit-fill-available;
    box-sizing: border-box;
  }

  /* Compact 3D Tabletop Perspective Tilt on Mobile ("tepaga yuqoriga qilgan xolatda") */
  .book-wrapper.at-cover,
  .book-wrapper.at-back-cover {
    transform: perspective(1400px) rotateX(8.5deg) rotateY(-1.5deg) scale(0.98) translateY(0);
    transform-style: preserve-3d;
  }

  /* Expands smoothly to fill phone screen comfortably when open ("sal sal joy qolsa bo'ldi") */
  .book-wrapper:not(.at-cover):not(.at-back-cover) {
    transform: perspective(2400px) rotateX(0deg) rotateY(0deg) scale(1.0) translateY(0);
  }

  .book-wrapper {
    filter: drop-shadow(0 18px 25px rgba(0, 0, 0, 0.65)) drop-shadow(0 40px 80px rgba(0, 0, 0, 0.8));
    transition: opacity 0.5s ease, transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
  }

  /* Luxury Silk-Touch Paper Pages with Natural Page Curl on Mobile ("Varoqday") */
  .page {
    border-left: none !important;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12) !important;
    border-radius: 2px;
  }

  .page-cover-front {
    border-left: 12px solid #2B1C12 !important;
  }

  .page-cover-back-closed {
    border-right: 12px solid #2B1C12 !important;
  }

  .photo-page {
    padding: 0.8rem 0.75rem 0.4rem;
  }

  .photo-page-footer {
    height: 24px;
    padding: 0 0.3rem;
    margin-top: 0.25rem;
  }

  .photo-page-caption {
    font-size: 0.74rem;
  }

  .page-fav-btn svg {
    width: 13px;
    height: 13px;
  }

  .photo-page-number {
    font-size: 0.70rem;
    padding: 1px 4px;
  }

  /* Cover Inner: Clean proportional layout, zero clipping or overlap */
  .cover-inner {
    padding: 0.85rem 0.8rem 0.7rem;
    justify-content: space-between;
    gap: 0;
  }

  .cover-top-ornament {
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    margin-bottom: 0.1rem;
  }

  .couple-names-gold {
    font-size: 2.1rem;
    line-height: 1.1;
    padding: 0 0.2rem;
  }

  .couple-names-gold .names-amp {
    font-size: 1.6rem;
    margin: 0 0.15rem;
  }

  .cover-photo-window {
    flex: 1;
    min-height: 0;
    max-height: 180px;
    width: 86%;
    max-width: 240px;
    margin: 0.2rem auto;
    padding: 3px;
  }

  .cover-main-title {
    font-size: 1.45rem;
    line-height: 1;
  }

  .cover-divider {
    margin: 0.2rem auto;
    width: 32px;
  }

  .cover-date-text {
    font-size: 0.76rem;
    letter-spacing: 0.18em;
  }

  .cover-bottom-cta {
    margin-top: 0.2rem;
  }

  .cover-open-btn {
    padding: 6px 18px;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
  }

  /* Back Cover Mobile Sizing */
  .cover-back-leather-inner {
    padding: 0.85rem 0.8rem 0.7rem;
    justify-content: space-between;
  }

  .cover-back-leather-inner .couple-names-gold {
    font-size: 2.1rem;
    line-height: 1.1;
  }

  .back-cover-date {
    font-size: 0.78rem;
    letter-spacing: 0.18em;
  }

  .back-cover-tagline {
    font-size: 1.2rem;
  }

  .grid-container {
    grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
    gap: 0.7rem;
  }

  .modal-title-area {
    gap: 0.6rem;
  }

  .modal-title {
    font-size: 1.1rem;
  }

  .lightbox-nav {
    display: none;
  }
}

@keyframes cornerGleam {

  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.9);
  }

  50% {
    opacity: 1;
    transform: scale(1.25);
    color: #D4AF37;
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.85));
  }
}


/* ==========================================================================
   LUXURY SECURITY LOCK GATE & AUTHENTICATION MODAL
   ========================================================================== */
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(30, 20, 12, 0.88) 0%, rgba(10, 6, 3, 0.96) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 1.2rem;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.5s ease;
}

.auth-gate.is-visible {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.auth-gate.is-unlocking {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: linear-gradient(145deg, rgba(38, 26, 17, 0.94) 0%, rgba(20, 13, 8, 0.97) 100%);
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  border-radius: 18px;
  padding: 2.2rem 2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(212, 175, 55, 0.15);
  text-align: center;
  color: #F8F5F0;
  box-sizing: border-box;
}

.auth-card .gold-corner-bracket {
  width: 18px;
  height: 18px;
  border-color: #D4AF37;
}

.auth-ornament {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: #D4AF37;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.auth-names {
  font-family: 'Great Vibes', 'Pinyon Script', cursive;
  font-size: 2.6rem;
  line-height: 1.15;
  background: linear-gradient(135deg, #FFF1CA 0%, #D4AF37 45%, #AA771C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.3));
}

.auth-names .names-amp {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 2rem;
  margin: 0 0.2rem;
}

.auth-date {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: #D6C2A5;
  margin-top: 0.25rem;
}

.auth-divider {
  width: 50px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, #D4AF37, transparent);
  margin: 1rem auto 1.1rem;
}

.auth-desc {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-style: italic;
  color: #E6D7C3;
  line-height: 1.45;
  margin-bottom: 1.4rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #D6C2A5;
  text-transform: uppercase;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 12px;
  width: 17px;
  height: 17px;
  color: rgba(212, 175, 55, 0.7);
  pointer-events: none;
}

.auth-input {
  width: 100%;
  height: 44px;
  background: rgba(12, 8, 5, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 9px;
  padding: 0 40px 0 38px;
  color: #FFF6E5;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.92rem;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.auth-input:focus {
  outline: none;
  border-color: #D4AF37;
  background: rgba(18, 12, 8, 0.9);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
}

.auth-input::placeholder {
  color: rgba(214, 194, 165, 0.4);
}

.auth-eye-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: rgba(212, 175, 55, 0.75);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.auth-eye-btn:hover {
  color: #FFF1CA;
}

.auth-error {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(180, 30, 30, 0.2);
  border: 1px solid rgba(230, 60, 60, 0.4);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  color: #FF8585;
  font-size: 0.82rem;
  font-family: 'Montserrat', sans-serif;
}

.auth-submit-btn {
  height: 46px;
  background: linear-gradient(135deg, #F9E7B9 0%, #D4AF37 50%, #A87618 100%);
  border: none;
  border-radius: 9px;
  color: #1A1108;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4), 0 0 15px rgba(212, 175, 55, 0.3);
  transition: all 0.25s ease;
  margin-top: 0.4rem;
}

.auth-submit-btn:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 24px rgba(212, 175, 55, 0.55);
  background: linear-gradient(135deg, #FFF1CA 0%, #E6C258 50%, #BF8822 100%);
}

.auth-submit-btn:active {
  transform: translateY(1px);
}

.auth-hint {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  color: rgba(214, 194, 165, 0.6);
  margin-top: 1.2rem;
  line-height: 1.4;
}

@keyframes authShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.auth-card.auth-shake {
  animation: authShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Floating Stage Lock Button */
.stage-lock-btn {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 1000;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(30, 18, 10, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: #E6D7C3;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
}

.stage-lock-btn:hover {
  background: rgba(50, 30, 15, 0.9);
  color: #D4AF37;
  border-color: #D4AF37;
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 12px rgba(212, 175, 55, 0.35);
}

@media (max-width: 480px) {
  .auth-card {
    padding: 1.8rem 1.3rem;
  }
  .auth-names {
    font-size: 2.2rem;
  }
  .stage-lock-btn {
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
  }
}

/* ==========================================================================
   PRO ADMIN STUDIO & CMS MODAL
   ========================================================================== */
.btn-admin-studio {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(22, 18, 15, 0.88);
  border: 1px solid rgba(212, 175, 55, 0.6);
  color: #F9E498;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 10px rgba(212, 175, 55, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-admin-studio:hover {
  background: rgba(36, 28, 22, 0.95);
  border-color: #D4AF37;
  color: #FFF;
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 18px rgba(212, 175, 55, 0.45);
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 110000;
  background: rgba(8, 6, 5, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
}

.admin-modal.is-open {
  display: flex;
  animation: adminModalFadeIn 0.28s ease-out;
}

@keyframes adminModalFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.admin-modal-card {
  width: 100%;
  max-width: 960px;
  height: 86vh;
  max-height: 820px;
  background: #181310;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85), 0 0 40px rgba(212, 175, 55, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #F4EAD4;
}

.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.6rem;
  background: rgba(26, 20, 16, 0.95);
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
}

.admin-title-area {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #110e0a;
  background: linear-gradient(135deg, #ECC876, #C59A30);
  padding: 2px 7px;
  border-radius: 4px;
}

.admin-title {
  margin: 3px 0 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #F7E7B4;
  letter-spacing: 0.5px;
}

.admin-subtitle {
  font-size: 0.82rem;
  color: rgba(244, 234, 212, 0.65);
}

.admin-nav-tabs {
  display: flex;
  background: #130f0c;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  overflow-x: auto;
  scrollbar-width: thin;
}

.admin-nav-tab {
  flex: 1;
  min-width: 140px;
  padding: 12px 14px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(244, 234, 212, 0.65);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-align: center;
}

.admin-nav-tab:hover {
  color: #F7E7B4;
  background: rgba(212, 175, 55, 0.05);
}

.admin-nav-tab.active {
  color: #F9E498;
  border-bottom-color: #D4AF37;
  background: rgba(212, 175, 55, 0.1);
}

.admin-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.4rem 1.6rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.3) transparent;
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
  animation: adminTabFade 0.22s ease-out;
}

@keyframes adminTabFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Toolbar & Action Buttons */
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1.2rem;
  padding: 10px 14px;
  background: rgba(30, 24, 20, 0.6);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
}

.admin-toolbar-info {
  font-size: 0.84rem;
  color: rgba(244, 234, 212, 0.8);
}

.btn-gold-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
  color: #120e09;
  border: none;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: all 0.2s ease;
}

.btn-gold-action:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(212, 175, 55, 0.35);
}

.btn-danger-action {
  background: rgba(180, 40, 40, 0.85);
  color: #FFF;
  border: 1px solid rgba(255, 80, 80, 0.4);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger-action:hover {
  background: rgb(210, 45, 45);
  border-color: #ff5555;
}

/* Photo Reorder Grid */
.admin-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.admin-photo-card {
  position: relative;
  background: #201a15;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-photo-card:hover {
  border-color: #D4AF37;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 10px rgba(212, 175, 55, 0.2);
}

.admin-photo-thumb-wrap {
  position: relative;
  width: 100%;
  padding-top: 130%; /* portrait aspect */
  background: #0e0b09;
}

.admin-photo-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-photo-index {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #F7E7B4;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.admin-photo-ctrls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px;
  background: rgba(24, 18, 14, 0.95);
  border-top: 1px solid rgba(212, 175, 55, 0.15);
}

.admin-ctrl-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #F7E7B4;
  font-size: 0.8rem;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-ctrl-btn:hover:not(:disabled) {
  background: #D4AF37;
  color: #120e09;
  border-color: #D4AF37;
}

.admin-ctrl-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.admin-ctrl-btn.btn-del:hover {
  background: #dc3545;
  color: #fff;
  border-color: #dc3545;
}

/* Upload Zone */
.admin-upload-zone {
  border: 2px dashed rgba(212, 175, 55, 0.45);
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: rgba(28, 22, 18, 0.5);
  transition: all 0.25s ease;
  cursor: pointer;
}

.admin-upload-zone:hover,
.admin-upload-zone.dragover {
  border-color: #D4AF37;
  background: rgba(212, 175, 55, 0.08);
}

.upload-icon {
  stroke: #D4AF37;
  margin-bottom: 0.8rem;
}

.upload-title {
  margin: 0 0 0.4rem 0;
  font-size: 1.15rem;
  color: #F7E7B4;
}

.upload-desc {
  margin: 0 0 1.2rem 0;
  font-size: 0.85rem;
  color: rgba(244, 234, 212, 0.65);
}

.upload-progress-area {
  margin-top: 1.2rem;
  padding: 12px;
  background: rgba(26, 20, 16, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 8px;
}

.upload-status-text {
  font-size: 0.85rem;
  margin-bottom: 8px;
  color: #F7E7B4;
}

.upload-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  overflow: hidden;
}

.upload-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #D4AF37, #F9E498);
  transition: width 0.2s ease;
}

.upload-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-top: 1.2rem;
}

/* Sections & Form Styling */
.admin-section-box {
  background: rgba(26, 20, 16, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
}

.section-title {
  margin: 0 0 0.3rem 0;
  font-size: 1.05rem;
  color: #F7E7B4;
}

.section-desc {
  margin: 0 0 0.9rem 0;
  font-size: 0.82rem;
  color: rgba(244, 234, 212, 0.65);
}

.admin-input {
  background: rgba(14, 11, 9, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: #FFF;
  font-family: inherit;
  font-size: 0.88rem;
  padding: 8px 12px;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-input:focus {
  border-color: #D4AF37;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}

.admin-inline-form {
  display: flex;
  gap: 10px;
  max-width: 450px;
}

.admin-inline-form .admin-input {
  flex: 1;
}

.form-add-guest {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) auto;
  gap: 10px;
  margin-bottom: 1.2rem;
}

.form-change-pwd {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-row label {
  font-size: 0.8rem;
  color: rgba(244, 234, 212, 0.8);
}

/* Guest Cards List */
.admin-guest-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.guest-card {
  background: #1f1814;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.guest-card:hover {
  border-color: rgba(212, 175, 55, 0.45);
  background: #251e18;
}

.guest-card-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.guest-card-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #F7E7B4;
}

.guest-card-creds {
  font-size: 0.78rem;
  color: rgba(244, 234, 212, 0.7);
  display: flex;
  gap: 10px;
}

.guest-card-creds code {
  color: #ECC876;
  background: rgba(0, 0, 0, 0.4);
  padding: 1px 5px;
  border-radius: 3px;
}

.guest-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-mini-action {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: #F7E7B4;
  font-family: inherit;
  font-size: 0.75rem;
  padding: 5px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-mini-action:hover {
  background: #D4AF37;
  color: #120e09;
}

.btn-mini-danger {
  background: rgba(220, 53, 69, 0.15);
  border: 1px solid rgba(220, 53, 69, 0.4);
  color: #ff7b88;
  font-size: 0.75rem;
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-mini-danger:hover {
  background: #dc3545;
  color: #FFF;
}

@media (max-width: 640px) {
  .admin-modal {
    padding: 0.5rem;
  }
  .admin-modal-card {
    height: 96vh;
    border-radius: 12px;
  }
  .admin-modal-header {
    padding: 0.9rem 1rem;
  }
  .admin-modal-body {
    padding: 1rem;
  }
  .admin-photos-grid {
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 8px;
  }
  .form-add-guest {
    grid-template-columns: 1fr;
  }
  .btn-admin-studio {
    top: 10px;
    left: 10px;
    padding: 6px 10px;
    font-size: 0.75rem;
  }
}
