/* ==========================================================================
   VIRTUAL WEDDING PHOTOBOOTH - LUXURY EDITORIAL STYLE
   Optimized for Guests using their own Smartphones via QR Code
   Aesthetics: Warm Ivory, Champagne Gold, Refined Typography, Decluttered UI
   ========================================================================== */

:root {
  /* Editorial Palette: Champagne & Ivory (Default) */
  --bg-page: #FBF9F5;
  --bg-gradient: linear-gradient(160deg, #FBF9F5 0%, #F5EFE6 55%, #ECE4D8 100%);
  --accent-gold: #B8860B;
  --accent-gold-hover: #9E7208;
  --accent-champagne: #F4E8CF;
  --accent-glow: rgba(184, 134, 11, 0.22);
  --text-primary: #2C2621;
  --text-muted: #797167;
  --card-bg: rgba(255, 255, 255, 0.92);
  --card-border: rgba(226, 216, 203, 0.65);
  --card-shadow: 0 16px 40px -10px rgba(110, 85, 45, 0.08), 0 4px 16px rgba(0, 0, 0, 0.03);
  
  /* Typography */
  --font-serif: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --font-script: 'Dancing Script', cursive;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Layout & Sizing */
  --mobile-max-width: 480px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* THEMES */
body.theme-champagne {
  --bg-gradient: linear-gradient(160deg, #FAF7F2 0%, #F4ECE1 55%, #E8DCCB 100%);
  --accent-gold: #B8860B;
  --accent-champagne: #F5E8C8;
  --text-primary: #322A23;
}

body.theme-sage {
  --bg-gradient: linear-gradient(160deg, #F4F7F3 0%, #E7EFE6 55%, #D6E4D4 100%);
  --accent-gold: #4C7254;
  --accent-champagne: #DDE9DC;
  --text-primary: #253328;
}

body.theme-rose {
  --bg-gradient: linear-gradient(160deg, #FAF3F4 0%, #F8E6E8 55%, #EED1D6 100%);
  --accent-gold: #B45869;
  --accent-champagne: #FBDCE1;
  --text-primary: #3B2329;
}

body.theme-midnight {
  --bg-gradient: linear-gradient(160deg, #131720 0%, #1A212E 55%, #222B3B 100%);
  --accent-gold: #E5B558;
  --accent-champagne: #3E3421;
  --text-primary: #F3F5F8;
  --text-muted: #9BA8BA;
  --card-bg: rgba(28, 36, 50, 0.88);
  --card-border: rgba(255, 255, 255, 0.12);
  --card-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.5);
}

/* RESET & BASE */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-gradient);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background 0.4s ease;
  padding: 0;
}

/* Ambient Floating Petals Background */
.petals-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.petal {
  position: absolute;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(245, 230, 210, 0.35) 100%);
  border-radius: 50% 0 50% 50%;
  animation: softDrift linear infinite;
  opacity: 0.55;
}

/* APP SHELL (Mobile-first container) */
.app-container {
  max-width: var(--mobile-max-width);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  padding: 10px 16px 36px;
}

/* TOP HEADER: Clean & Minimalist */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 4px 16px;
}

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

.ring-icon {
  font-size: 1.15rem;
}

.header-couple {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--accent-gold);
}

.header-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: var(--transition);
}

.icon-btn:hover, .icon-btn:active {
  background: var(--accent-champagne);
  color: var(--accent-gold);
  transform: translateY(-1px);
}

/* GLASS CARD */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-lg);
  padding: 26px 20px;
}

/* ==========================================================================
   STEP 1: WELCOME SCREEN (Perfect Vertical & Horizontal Centering)
   ========================================================================== */
#screen-welcome.active {
  flex: 1;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: calc(100vh - 48px);
  margin: auto 0;
  padding: 16px 0;
}

.welcome-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  text-align: center;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(212, 175, 55, 0.38);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06), 0 0 28px rgba(212, 175, 55, 0.12);
  padding: 30px 22px 26px;
  box-sizing: border-box;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Inset luxury dashed hairline frame */
.welcome-card::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(184, 134, 11, 0.25);
  border-radius: calc(var(--radius-lg) - 6px);
  pointer-events: none;
}

/* Luxury Corner Filigree Accents */
.card-corner {
  position: absolute;
  color: var(--accent-gold);
  font-size: 0.75rem;
  opacity: 0.55;
  pointer-events: none;
  line-height: 1;
}
.corner-tl { top: 13px; left: 13px; }
.corner-tr { top: 13px; right: 13px; }
.corner-bl { bottom: 13px; left: 13px; }
.corner-br { bottom: 13px; right: 13px; }

/* Royal Monogram Emblem Badge */
.welcome-emblem {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.emblem-ring {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(247, 243, 235, 0.75) 100%);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--radius-full);
  box-shadow: 0 4px 12px rgba(184, 134, 11, 0.1);
}

.emblem-crest {
  font-size: 0.95rem;
  filter: drop-shadow(0 1px 2px rgba(184, 134, 11, 0.3));
}

.emblem-initials {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent-gold);
}

.wedding-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-gold);
  background: rgba(184, 134, 11, 0.08);
  border: 1px solid rgba(184, 134, 11, 0.2);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
}

.couple-title {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.wedding-date-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 4px;
}

.date-bullet {
  color: var(--accent-gold);
  font-size: 0.65rem;
  opacity: 0.65;
}

.wedding-date {
  font-size: 0.92rem;
  color: var(--accent-gold);
  font-weight: 600;
  letter-spacing: 2px;
  margin: 0;
}

.divider-ornament {
  margin: 14px 0;
  color: var(--accent-gold);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.divider-ornament::before,
.divider-ornament::after {
  content: '';
  height: 1px;
  width: 44px;
  background: var(--accent-gold);
  opacity: 0.4;
}

.welcome-intro {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 360px;
  margin: 0 auto 18px;
}

/* Luxury 3-Step Micro Highlights */
.welcome-micro-features {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  margin: 0 auto 22px;
  max-width: fit-content;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.micro-feat-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-primary);
}

.micro-feat-icon {
  font-size: 0.95rem;
}

.micro-feat-dot {
  color: var(--accent-gold);
  font-size: 0.55rem;
  opacity: 0.6;
}

/* Primary Start Button with Gold Shimmer Sweep */
.welcome-cta-btn {
  width: 100%;
  max-width: 320px;
  position: relative;
  overflow: hidden;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  padding: 15px 22px;
  border-radius: var(--radius-full);
  box-shadow: 0 10px 24px -4px var(--accent-glow);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto;
}

.welcome-cta-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 50%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  transform: rotate(25deg);
  animation: btnGoldSweep 3.6s infinite;
}

@keyframes btnGoldSweep {
  0% { left: -60%; }
  30% { left: 130%; }
  100% { left: 130%; }
}

.btn-camera-icon {
  font-size: 1.1rem;
}

.btn-arrow {
  transition: transform 0.2s ease;
}

.welcome-cta-btn:hover .btn-arrow {
  transform: translateX(3px);
}

.welcome-footer-info {
  margin-top: 18px;
  display: flex;
  justify-content: center;
}

.welcome-hashtag-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(184, 134, 11, 0.08);
  border: 1px solid rgba(184, 134, 11, 0.22);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.8px;
}

/* BUTTONS */
.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gold);
  color: #FFFFFF;
  padding: 15px 24px;
  font-size: 1rem;
}

.btn-primary:hover, .btn-primary:active {
  background: var(--accent-gold-hover);
  transform: translateY(-1px);
}

.btn-glow {
  box-shadow: 0 10px 24px -4px var(--accent-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 10px 18px;
  font-size: 0.88rem;
}

.btn-secondary:hover, .btn-secondary:active {
  background: var(--accent-champagne);
  color: var(--accent-gold);
}

.btn-outline {
  background: transparent;
  border: 1px dashed var(--accent-gold);
  color: var(--accent-gold);
  padding: 12px 20px;
  font-size: 0.9rem;
}

.btn-outline:hover {
  background: var(--accent-champagne);
}

.btn-instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #FFFFFF;
  padding: 15px 24px;
  font-size: 1rem;
  box-shadow: 0 10px 24px -4px rgba(220, 39, 67, 0.35);
}

.btn-instagram:hover, .btn-instagram:active {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn-large {
  width: 100%;
  padding: 16px 20px;
  font-size: 1.05rem;
}

.btn-full {
  width: 100%;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.8rem;
}

.btn-back {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-back:hover, .btn-back:active {
  background: var(--accent-champagne);
  color: var(--accent-gold);
}

/* SCREEN HEADERS */
.screen-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.screen-header h2 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
}

.screen-header .subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* SCREEN 2: LAYOUT SELECTION */
.layout-selection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.layout-card {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.layout-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-champagne);
}

.layout-card.active {
  border-color: var(--accent-gold);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.layout-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.62rem;
  font-weight: 700;
  background: var(--accent-gold);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
}

.layout-preview-box {
  background: #ECE5DC;
  border-radius: var(--radius-sm);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  margin-bottom: 10px;
  min-height: 130px;
  justify-content: center;
}

.photo-placeholder {
  background: #FFFFFF;
  border-radius: 3px;
  width: 80%;
  aspect-ratio: 4/3;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.strip-mini-caption {
  font-family: var(--font-serif);
  font-size: 0.55rem;
  color: #797167;
  letter-spacing: 1px;
}

/* 4-pose grid preview */
.grid-preview-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 8px;
  gap: 4px;
}
.grid-preview-4 .photo-placeholder {
  width: 100%;
  aspect-ratio: 1/1;
}

/* Polaroid preview */
.polaroid-preview {
  padding: 8px 8px 18px 8px;
}
.polaroid-photo {
  width: 90%;
  aspect-ratio: 1/1;
}
.polaroid-mini-note {
  font-family: var(--font-script);
  font-size: 0.65rem;
  color: #555;
  margin-top: 4px;
}

.layout-info h3 {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.layout-info p {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.frame-customizer-box {
  margin-bottom: 18px;
}

.config-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.frame-color-options {
  display: flex;
  gap: 10px;
}

.color-opt-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.12);
  cursor: pointer;
  transition: var(--transition);
}

.color-opt-btn.active {
  transform: scale(1.15);
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent-gold);
}

.ornament-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.ornament-opt-btn {
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.ornament-opt-btn.active {
  background: var(--accent-champagne);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.action-bar-bottom {
  margin-top: 10px;
}

/* SCREEN 3: CAMERA */
.camera-screen-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.shot-progress-pill {
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--accent-champagne);
  color: var(--accent-gold);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.cam-top-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}



#btnToggleFlash.active {
  background: var(--accent-champagne);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

#btnToggleFlash.active-torch {
  background: #FFF8E1;
  border-color: #FFB300;
  color: #D68100;
  box-shadow: 0 0 14px rgba(255, 179, 0, 0.6);
  animation: torchPulse 1.8s infinite ease-in-out;
}

@keyframes torchPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 179, 0, 0.4); }
  50% { box-shadow: 0 0 18px rgba(255, 179, 0, 0.85); }
}

.camera-viewport-wrap {
  position: relative;
  width: 100%;
}

.camera-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.22);
}

#cameraVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* Front camera mirror by default */
}

#cameraVideo.rear-camera {
  transform: scaleX(1);
}

/* ==========================================================================
   PHOTOBOOTH STUDIO VIEWFINDER (Replaces Biometric Face Scan Oval)
   Clean, aesthetic, open Korean photobooth studio style
   ========================================================================== */
.photobooth-viewfinder-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  box-sizing: border-box;
  z-index: 4;
}

/* 4 Camera Corner Framing Brackets */
.vf-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: rgba(255, 255, 255, 0.8);
  border-style: solid;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.vf-tl {
  top: 14px;
  left: 14px;
  border-width: 2.5px 0 0 2.5px;
  border-top-left-radius: 6px;
}

.vf-tr {
  top: 14px;
  right: 14px;
  border-width: 2.5px 2.5px 0 0;
  border-top-right-radius: 6px;
}

.vf-bl {
  bottom: 14px;
  left: 14px;
  border-width: 0 0 2.5px 2.5px;
  border-bottom-left-radius: 6px;
}

.vf-br {
  bottom: 14px;
  right: 14px;
  border-width: 0 2.5px 2.5px 0;
  border-bottom-right-radius: 6px;
}

/* Subtle Studio Center Focus Reticle */
.vf-center-focus {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  pointer-events: none;
  opacity: 0.5;
}

.vf-center-focus::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(255, 255, 255, 0.7);
  border-radius: 50%;
}

.vf-reticle-cross {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
}

.vf-reticle-cross::before,
.vf-reticle-cross::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
}

.vf-reticle-cross::before {
  top: 50%;
  left: -4px;
  right: -4px;
  height: 1px;
  transform: translateY(-50%);
}

.vf-reticle-cross::after {
  left: 50%;
  top: -4px;
  bottom: -4px;
  width: 1px;
  transform: translateX(-50%);
}

/* Top Viewfinder HUD Badges */
.vf-hud-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.vf-hud-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 15, 15, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.vf-rec-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FF3B30;
  box-shadow: 0 0 6px #FF3B30;
  animation: pulseRec 1.6s infinite ease-in-out;
}

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

.vf-edition {
  color: var(--accent-gold);
  border-color: rgba(212, 175, 55, 0.35);
  font-size: 0.65rem;
}

/* Bottom Floating Pose Tip Pill */
.vf-pose-pill {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(20, 20, 20, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, opacity 0.25s ease;
  margin-bottom: 2px;
}

.vf-pose-icon {
  font-size: 0.95rem;
}

/* Countdown */
.countdown-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  z-index: 9;
  transition: opacity 0.2s;
}

.countdown-overlay.active {
  opacity: 1;
}

.countdown-number {
  font-family: var(--font-serif);
  font-size: 6rem;
  font-weight: 700;
  color: #FFFFFF;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.65);
}

/* Mini shots tray */
.mini-shots-tray {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 8;
}

.mini-shot-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 2px solid #FFFFFF;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.pose-instruction-box {
  margin-top: 10px;
  text-align: center;
}

#poseInstructionText {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* CAMERA ACTION DOCK */
.camera-action-dock {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-top: 16px;
  padding: 0 10px;
}

.shutter-trigger {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: transparent;
  border: 4px solid var(--accent-gold);
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.shutter-trigger:hover, .shutter-trigger:active {
  transform: scale(1.05);
}

.shutter-inner {
  width: 100%;
  height: 100%;
  background: var(--accent-gold);
  border-radius: 50%;
  transition: var(--transition);
}

.gallery-upload-btn, .timer-badge-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-full);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.timer-badge-btn {
  flex-direction: row;
  font-size: 0.8rem;
  padding: 10px 16px;
}

/* SCREEN 4: EDITOR */
.editor-preview-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
}

.canvas-wrapper {
  position: relative;
  background: #EAE3D9;
  padding: 10px;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  max-width: 280px;
  display: flex;
  justify-content: center;
}

#mainRenderCanvas {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
}

/* DRAGGABLE STICKERS OVERLAY */
.stickers-interactive-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  pointer-events: auto;
  overflow: hidden;
  border-radius: 4px;
}

.draggable-sticker {
  position: absolute;
  transform: translate(-50%, -50%);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.draggable-sticker.is-dragging {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.15);
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.35));
}

.sticker-emoji-view {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.25));
  pointer-events: none;
}

.sticker-remove-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #E53935;
  color: #FFFFFF;
  border: 1.5px solid #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  padding: 0;
  line-height: 1;
}

.sticker-hint-text {
  font-size: 0.72rem;
  color: var(--accent-gold);
  text-align: center;
  margin-bottom: 8px;
  background: var(--accent-champagne);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* EDITOR TABS */
.editor-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-full);
  padding: 4px;
  gap: 4px;
  margin-bottom: 14px;
}

.editor-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.editor-tab-btn.active {
  background: var(--card-bg);
  color: var(--accent-gold);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.tab-panel {
  display: none;
  margin-bottom: 16px;
}

.tab-panel.active {
  display: block;
}

/* ==========================================================================
   PHOTOBOOTH STUDIO FILTER GALLERY (Korean Studio Style)
   ========================================================================== */
.filter-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 0 4px;
}

.filter-header-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #797167;
  text-transform: uppercase;
}

.filter-header-hint {
  font-size: 0.68rem;
  color: #B38F4D;
  font-weight: 600;
}

.filter-gallery-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 4px 12px 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(197, 160, 89, 0.4) transparent;
}

.filter-gallery-carousel::-webkit-scrollbar {
  height: 4px;
}

.filter-gallery-carousel::-webkit-scrollbar-thumb {
  background: rgba(197, 160, 89, 0.35);
  border-radius: 4px;
}

.filter-card {
  flex: 0 0 92px;
  scroll-snap-align: start;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(197, 160, 89, 0.22);
  border-radius: 14px;
  padding: 7px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  outline: none;
}

.filter-card:hover {
  transform: translateY(-2px);
  border-color: rgba(197, 160, 89, 0.5);
  box-shadow: 0 6px 16px rgba(197, 160, 89, 0.15);
}

.filter-card.active {
  background: #FFFFFF;
  border: 2px solid #B38F4D;
  box-shadow: 0 8px 22px rgba(197, 160, 89, 0.32);
  transform: translateY(-3px);
}

.filter-card-preview-swatch {
  width: 100%;
  height: 64px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* Sample portrait silhouette icon inside swatch */
.swatch-portrait-inner {
  width: 28px;
  height: 28px;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Gradient swatches reflecting true color grading tones */
.swatch-none {
  background: linear-gradient(135deg, #e0e4e8 0%, #c4cbd4 100%);
}
.swatch-warm {
  background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}
.swatch-vintage {
  background: linear-gradient(135deg, #e6b980 0%, #b88648 100%);
}
.swatch-bw {
  background: linear-gradient(135deg, #1f2022 0%, #4a4d52 100%);
}
.swatch-soft {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}
.swatch-rose {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}
.swatch-cinematic {
  background: linear-gradient(135deg, #0b3c49 0%, #1e5f74 50%, #c97b63 100%);
}
.swatch-glamour {
  background: linear-gradient(135deg, #BF953F 0%, #FCF6BA 35%, #B38728 70%, #AA771C 100%);
}

.filter-badge-active {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #B38F4D;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.filter-card.active .filter-badge-active {
  display: flex;
  animation: popIn 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.filter-card-info {
  margin-top: 6px;
  text-align: center;
  width: 100%;
}

.filter-card-name {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #1E232A;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-card.active .filter-card-name {
  color: #9A7B38;
}

.filter-card-desc {
  font-size: 0.58rem;
  color: #8C8275;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* Stickers */
.sticker-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 150px;
  overflow-y: auto;
  padding: 2px;
}

.sticker-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.sticker-item:hover, .sticker-item:active {
  background: var(--accent-champagne);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: translateY(-1px);
}

.input-field {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.input-field:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-champagne);
}

/* SCREEN 5: RESULT & SHARE */
.result-display-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.final-render-img {
  max-width: 270px;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.15);
  border: 2px solid #FFFFFF;
}

.result-action-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ig-tips-card {
  margin-top: 10px;
  padding: 14px 16px;
  font-size: 0.8rem;
}

.ig-tips-header {
  margin-bottom: 6px;
  color: var(--accent-gold);
}

.ig-tips-list {
  padding-left: 18px;
  line-height: 1.5;
  color: var(--text-muted);
}

.session-history-container {
  margin-top: 24px;
}

.history-title {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.history-thumbnails-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.history-thumb-img {
  width: 60px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--card-border);
  cursor: pointer;
  flex-shrink: 0;
}

/* MODALS */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal-backdrop.active {
  display: flex;
}

.modal-dialog {
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalPop 0.25s ease-out;
}

@keyframes modalPop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.modal-header h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}

.modal-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-muted);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* QR DIALOG */
.qr-dialog {
  text-align: center;
}

.qr-canvas-wrap {
  display: flex;
  justify-content: center;
  padding: 16px;
  background: #FFF;
  border-radius: var(--radius-md);
  margin: 14px auto;
  width: fit-content;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.qr-url-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  word-break: break-all;
  margin-bottom: 12px;
}

.qr-print-card {
  border: 1px dashed var(--accent-gold);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 16px;
}

.qr-card-couple {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.qr-card-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* TOAST NOTIFICATION */
.toast-bubble {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: rgba(30, 30, 30, 0.92);
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 200;
  white-space: nowrap;
}

.toast-bubble.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* RESPONSIVE TWEAKS */
@media (max-width: 360px) {
  .couple-title { font-size: 1.95rem; }
  .features-grid { grid-template-columns: 1fr; }
  .theme-chips { grid-template-columns: 1fr; }
  .layout-selection-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   LUXURY WEDDING ENVELOPE OPENING OVERLAY
   ========================================================================== */
.envelope-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-gradient);
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
  transition: opacity 0.5s ease;
}

.envelope-intro-text {
  text-align: center;
  margin-bottom: 24px;
}

.envelope-micro-tag {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--accent-gold);
  background: var(--accent-champagne);
  padding: 3px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.envelope-couple-names {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
}

.envelope-invitation-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Envelope Wrapper - Realistic Linen Textured Card */
.envelope-container {
  perspective: 1400px;
  width: 324px;
  height: 220px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 28px auto;
}

.envelope-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  background: #EAE1D2;
  border-radius: 12px;
  box-shadow: 0 22px 50px -8px rgba(80, 55, 20, 0.28), 0 6px 18px rgba(0, 0, 0, 0.08);
  border: 1.5px solid #D4AF37;
  overflow: visible;
}

/* 3D Top Flap with Gold Trim */
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 122px;
  background: linear-gradient(180deg, #FAF6EE 0%, #E8DCBE 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  z-index: 6;
  transition: transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  filter: drop-shadow(0 4px 6px rgba(70, 50, 20, 0.18));
  transform-style: preserve-3d;
  backface-visibility: visible;
}

.flap-gold-trim {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-bottom: 2.5px solid #D4AF37;
  pointer-events: none;
}

/* Royal Letter inside - hidden while closed to prevent any text bleed */
.envelope-letter {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  height: 250px;
  background: #FFFDF9;
  border-radius: 8px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.14);
  z-index: 3;
  padding: 8px;
  opacity: 0;
  transform: translateY(12px);
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
  overflow: hidden;
  pointer-events: none;
}

.letter-gold-border {
  width: 100%;
  height: 100%;
  border: 2px solid #D4AF37;
  border-radius: 6px;
  padding: 16px 14px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  position: relative;
  background: radial-gradient(circle at 50% 20%, #FFFFFF 0%, #FAF6EE 100%);
  box-sizing: border-box;
}

.letter-gold-border::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px dashed rgba(184, 134, 11, 0.45);
  border-radius: 4px;
  pointer-events: none;
}

.letter-crest {
  font-size: 1.1rem;
  color: var(--accent-gold);
  margin-bottom: 2px;
  line-height: 1;
}

.letter-badge {
  font-size: 0.58rem;
  letter-spacing: 2.2px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 2px;
}

.letter-couple-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.15;
  color: #2C2621;
  margin-bottom: 2px;
}

.letter-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: #8C6A1F;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.letter-gold-divider {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #D4AF37, transparent);
  margin: 2px 0 6px;
}

.letter-msg {
  font-size: 0.72rem;
  color: #6E665D;
  line-height: 1.35;
  margin-bottom: 12px;
  max-width: 250px;
}

.btn-letter-cta {
  padding: 7px 24px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
  box-shadow: 0 4px 14px rgba(184, 134, 11, 0.3);
  cursor: pointer;
  z-index: 12;
}

/* Realistic Envelope Front Pocket */
.envelope-pocket {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #F8F4EA 0%, #ECE1D0 100%);
  clip-path: polygon(0 0, 50% 48%, 100% 0, 100% 100%, 0 100%);
  border-radius: 12px;
  z-index: 4;
  border-bottom: 2px solid #D4AF37;
  filter: drop-shadow(0 -2px 6px rgba(70, 50, 20, 0.08));
}

.pocket-gold-filigree {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 50% 48%, 100% 0, 100% 100%, 0 100%);
  border-top: 1.5px solid rgba(212, 175, 55, 0.65);
  pointer-events: none;
}

/* Ultra-Luxurious Pure CSS Embossed Gold Wax Seal (0kb image, 100% centered) */
.envelope-wax-seal {
  position: absolute;
  top: 118px;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 62px;
  height: 62px;
  z-index: 8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.25s ease, opacity 0.4s ease;
  user-select: none;
}

.wax-seal-body {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #FFEAA7 0%, #D4AF37 36%, #A67C1E 72%, #68490C 100%);
  box-shadow: 
    0 8px 22px rgba(80, 50, 10, 0.48),
    0 2px 6px rgba(0, 0, 0, 0.25),
    inset 0 2px 3px rgba(255, 255, 255, 0.75),
    inset 0 -3px 5px rgba(60, 40, 5, 0.6);
  border: 1px solid #E8C15A;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.wax-seal-outer-bead {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 245, 200, 0.65);
  pointer-events: none;
}

.wax-seal-inner-disc {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #F4D068 0%, #C99726 55%, #8B6214 100%);
  box-shadow: inset 0 2px 4px rgba(70, 45, 8, 0.55), 0 1px 2px rgba(255, 255, 255, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}

.wax-seal-crest {
  font-size: 11px;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.4));
}

.wax-seal-monogram {
  font-family: var(--font-serif);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #3D2905;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5), 0 -1px 0 rgba(0, 0, 0, 0.25);
  line-height: 1;
}

.envelope-status-badge {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-gold);
  letter-spacing: 0.5px;
}

/* Tap Hint */
.envelope-tap-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-gold);
  text-align: center;
}

.tap-finger-icon {
  font-size: 1.4rem;
  animation: bounceFinger 1.5s infinite;
}

@keyframes bounceFinger {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.btn-skip-envelope {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  cursor: pointer;
  text-decoration: underline;
  margin-top: 6px;
}

/* ==========================================================================
   STEP 2: GUEST NAME ENTRY (Dari Siapa Kenangan Ini?)
   ========================================================================== */
#screen-name.active {
  flex: 1;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: calc(100vh - 48px);
  margin: auto 0;
  padding: 16px 0;
}

.name-entry-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  text-align: center;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(212, 175, 55, 0.38);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06), 0 0 28px rgba(212, 175, 55, 0.12);
  padding: 36px 24px 30px;
  box-sizing: border-box;
}

.name-entry-card::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(184, 134, 11, 0.25);
  border-radius: calc(var(--radius-lg) - 6px);
  pointer-events: none;
}

.name-entry-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 6px;
  margin-bottom: 6px;
  line-height: 1.2;
}

.name-entry-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.name-input-wrap {
  margin-bottom: 22px;
}

.name-input-field {
  width: 100%;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--radius-full);
  padding: 14px 20px;
  font-size: 1.05rem;
  font-family: var(--font-sans);
  text-align: center;
  color: var(--text-primary);
  font-weight: 600;
  box-sizing: border-box;
  outline: none;
  transition: all 0.25s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
}

.name-input-field:focus {
  border-color: var(--accent-gold);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.18);
}

/* ==========================================================================
   STEP 5: PHOTOBOOTH RESULT & STREAMLINED DISPENSER
   Matches the elegant vertical card & clean buttons in Lamankisah reference
   ========================================================================== */
#screen-result {
  text-align: center;
}

.result-screen-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 12px;
  width: 100%;
}

.result-screen-header .wedding-badge {
  font-size: 0.65rem;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--accent-gold);
  background: var(--accent-champagne);
  padding: 3px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 4px;
  display: inline-block;
}

.result-screen-header .result-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  margin: 2px 0;
}

.result-screen-header .subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.photobooth-printer-kiosk {
  position: relative;
  width: 100%;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto 10px;
}

/* Minimalist luxury slot lip */
.printer-metal-slot {
  position: relative;
  width: 180px;
  height: 5px;
  background: #2C2621;
  border-radius: 3px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2), inset 0 1px 3px rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(212, 175, 55, 0.45);
  z-index: 5;
  margin-bottom: -3px;
}

/* Output Paper Chute */
.printer-output-chute {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 2px 0 6px;
}

.dispensed-photostrip {
  max-height: 45vh;
  width: auto;
  max-width: 210px;
  border-radius: 8px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.08);
  transform-origin: top center;
  transition: transform 0.3s ease;
}

/* Print Dispensing Slide-Out Animation */
.print-slide-down {
  animation: printerEject 2.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes printerEject {
  0% {
    transform: translateY(-85%);
    opacity: 0;
    clip-path: inset(0 0 90% 0);
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: translateY(0);
    clip-path: inset(0 0 0 0);
  }
}

.result-action-panel {
  width: 100%;
  max-width: 310px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Rekam Harapan Button - Styled after Reference Step 5 */
.btn-record-hope {
  background: #FFFFFF;
  border: 1.5px solid rgba(212, 175, 55, 0.6);
  color: #332B25;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-record-hope:hover, .btn-record-hope:active {
  background: var(--accent-champagne);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: translateY(-1px);
}

.result-sub-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 2px;
}

.btn-sub-action {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-md);
  padding: 9px 4px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.btn-sub-action:hover, .btn-sub-action:active {
  background: #FFFFFF;
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: translateY(-1px);
}

.btn-record-hope:hover {
  background: var(--accent-champagne);
  transform: translateY(-1px);
}

.mic-icon-pulse {
  font-size: 1.15rem;
}

.voice-recorder-container {
  background: rgba(0, 0, 0, 0.03);
  border: 1px dashed rgba(212, 175, 55, 0.35);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  margin-top: 14px;
}

.voice-timer {
  font-size: 1.25rem;
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}

.btn-voice-mic {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FAF7F2 0%, #EFE8DA 100%);
  border: 3px solid var(--accent-gold);
  color: #333;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(184, 134, 11, 0.25);
  transition: all 0.3s ease;
}

.btn-voice-mic.recording {
  background: #FF3B30;
  border-color: #FF3B30;
  color: #FFFFFF;
  box-shadow: 0 0 0 10px rgba(255, 59, 48, 0.2);
  animation: micPulse 1.2s infinite;
}

@keyframes micPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 59, 48, 0.25); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 14px rgba(255, 59, 48, 0.1); }
}

.voice-mic-status {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Audio Waveform Bars */
.voice-wave-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 24px;
  margin-bottom: 8px;
  opacity: 0.4;
}

.voice-wave-bars.active {
  opacity: 1;
}

.voice-wave-bars .bar {
  width: 3.5px;
  height: 8px;
  background: var(--accent-gold);
  border-radius: 3px;
  transition: height 0.15s ease;
}

.voice-wave-bars.active .bar {
  animation: wavePulse 0.8s infinite ease-in-out;
}
.voice-wave-bars.active .bar:nth-child(1) { animation-delay: 0.1s; }
.voice-wave-bars.active .bar:nth-child(2) { animation-delay: 0.3s; }
.voice-wave-bars.active .bar:nth-child(3) { animation-delay: 0.2s; }
.voice-wave-bars.active .bar:nth-child(4) { animation-delay: 0.5s; }
.voice-wave-bars.active .bar:nth-child(5) { animation-delay: 0.25s; }
.voice-wave-bars.active .bar:nth-child(6) { animation-delay: 0.4s; }
.voice-wave-bars.active .bar:nth-child(7) { animation-delay: 0.15s; }
.voice-wave-bars.active .bar:nth-child(8) { animation-delay: 0.35s; }

@keyframes wavePulse {
  0%, 100% { height: 6px; }
  50% { height: 22px; }
}

.custom-audio-player {
  width: 100%;
  height: 38px;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   CAMERA FLASH & SCREEN FILL-LIGHT (RING LIGHT)
   ========================================================================== */
#btnToggleFlash {
  transition: all 0.25s ease;
}

#btnToggleFlash.active {
  background: rgba(255, 215, 0, 0.22);
  border-color: #FFD700;
  color: #FFD700;
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.5);
  transform: scale(1.05);
}

#btnToggleFlash.active #flashIcon {
  filter: drop-shadow(0 0 6px #FFD700);
}

/* Screen Ring Light / Fill Light (Softbox border around camera viewport) */
.camera-ring-light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 10px solid rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 0 60px rgba(255, 255, 255, 0.85), 0 0 35px rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 5;
}

.camera-ring-light.active {
  opacity: 1;
  animation: ringLightShimmer 3s infinite ease-in-out;
}

body[style*="--screen-flash-active"] .camera-viewport {
  box-shadow: 0 0 80px 30px rgba(255, 255, 255, 0.95), 0 16px 40px rgba(0,0,0,0.22);
}

body[style*="--screen-flash-active"] #photoboothViewfinder {
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.1s ease;
}

@keyframes ringLightShimmer {
  0%, 100% {
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: inset 0 0 50px rgba(255, 255, 255, 0.8), 0 0 30px rgba(255, 255, 255, 0.85);
  }
  50% {
    border-color: rgba(255, 250, 235, 1);
    box-shadow: inset 0 0 75px rgba(255, 245, 220, 0.95), 0 0 45px rgba(255, 245, 220, 0.95);
  }
}

/* Welcome Screen Guestbook Button */
.welcome-guestbook-btn {
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.7);
  border: 1.5px solid rgba(197, 160, 89, 0.4);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 13px 20px;
  border-radius: var(--radius-full);
}

.welcome-guestbook-btn:hover,
.welcome-guestbook-btn:active {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(197, 160, 89, 0.25);
}

/* Result Screen Guestbook Button */
.guestbook-result-btn {
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.75);
  border: 1.5px solid rgba(197, 160, 89, 0.35);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: 11px 16px;
}

.guestbook-result-btn:hover,
.guestbook-result-btn:active {
  background: #ffffff;
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

/* ==========================================================================
   MODAL: GALERI BUKU TAMU & HARAPAN SUARA
   ========================================================================== */
.guestbook-modal-dialog {
  max-width: 480px;
  width: 92%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.guestbook-modal-dialog .modal-body {
  overflow-y: auto;
  max-height: calc(85vh - 75px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guestbook-header-banner {
  background: linear-gradient(135deg, rgba(253, 251, 247, 0.9), rgba(244, 237, 226, 0.85));
  border: 1px solid rgba(197, 160, 89, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.guestbook-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.guestbook-counter-pill {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-gold);
  background: rgba(197, 160, 89, 0.15);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
}

.guestbook-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.guestbook-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(197, 160, 89, 0.25);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.guestbook-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(197, 160, 89, 0.15);
  border-color: rgba(197, 160, 89, 0.45);
}

.guestbook-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.guestbook-author-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.guestbook-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-champagne);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border: 1.5px solid var(--accent-gold);
  flex-shrink: 0;
}

.guestbook-author-info {
  display: flex;
  flex-direction: column;
}

.guestbook-author-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.2;
}

.guestbook-author-relation {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.guestbook-date {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.guestbook-message-text {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
  font-style: italic;
  margin: 6px 0;
  padding-left: 10px;
  border-left: 2.5px solid var(--accent-gold);
}

.guestbook-audio-block {
  margin-top: 10px;
  background: rgba(244, 237, 226, 0.5);
  border: 1px dashed rgba(197, 160, 89, 0.35);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.guestbook-audio-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.guestbook-audio-player {
  width: 100%;
  height: 32px;
}

.guestbook-empty-state {
  text-align: center;
  padding: 30px 16px;
  color: var(--text-muted);
}

.guestbook-empty-icon {
  font-size: 2.4rem;
  margin-bottom: 8px;
  display: block;
}

