/* ==========================================================================
   Happy Dashain - Sacred Tika & Jamara Blessing Design System
   Rich Festive Nepali Aesthetics: Auspicious Crimson, Regal Gold, Jamara Green
   Seamless Mobile & Desktop Responsive Layout
   ========================================================================== */

:root {
  --crimson-950: #3b020a;
  --crimson-900: #5f0312;
  --crimson-800: #88081a;
  --crimson-700: #a91225;
  --crimson-600: #cb1e34;
  --crimson-500: #e52840;

  --gold-600: #b45309;
  --gold-500: #d97706;
  --gold-400: #f59e0b;
  --gold-300: #fbbf24;
  --gold-200: #fde68a;
  --gold-100: #fef3c7;

  --jamara-green: #65a30d;
  --jamara-dark: #3f6212;

  --surface-cream: #faf7f2;
  --surface-card: rgba(255, 255, 255, 0.95);
  --border-festive: rgba(217, 119, 6, 0.25);
  --border-gold-glow: rgba(245, 158, 11, 0.4);

  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-festive: 'Rozha One', 'Cinzel', serif;
  --font-devanagari: 'Yatra One', 'Rozha One', serif;

  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-full: 9999px;

  --shadow-festive: 0 20px 45px -10px rgba(136, 8, 26, 0.16), 0 8px 16px -6px rgba(0, 0, 0, 0.06);
  --shadow-glow: 0 0 25px rgba(245, 158, 11, 0.28);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background: radial-gradient(circle at 50% 0%, #fff7ed 0%, #fee2e2 50%, #fef2f2 100%);
  color: #292524;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Background Festive Petals Canvas */
#petalsCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Page Layout */
.app-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.75rem) clamp(0.85rem, 3vw, 1.5rem) 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
}

/* Header */
.festive-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
}

.header-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
  gap: 0.6rem;
}

@media (max-width: 520px) {
  .header-top-row {
    justify-content: center;
  }
}

.lang-switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-festive);
  border-radius: var(--radius-full);
  padding: 0.2rem 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.lang-btn {
  background: none;
  border: none;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 600;
  color: #78716c;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn.active {
  background: var(--crimson-700);
  color: #ffffff;
}

.lang-divider {
  color: #d6d3d1;
  font-size: 0.8rem;
}

.festive-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #fff1f2, #fef3c7);
  border: 1px solid var(--border-festive);
  color: var(--crimson-800);
  font-size: clamp(0.78rem, 2.5vw, 0.85rem);
  font-weight: 700;
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(169, 18, 37, 0.08);
}

.badge-complete {
  background: linear-gradient(135deg, #fef2f2, #ecfdf5);
  border-color: #86efac;
  color: #166534;
}

.festive-title {
  font-family: var(--font-festive);
  font-size: clamp(1.85rem, 5.5vw, 2.85rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--crimson-900) 0%, var(--crimson-600) 50%, var(--gold-600) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.festive-subtitle {
  color: #78716c;
  font-size: clamp(0.92rem, 2.6vw, 1.05rem);
  max-width: 580px;
  line-height: 1.5;
}

/* Main Card */
.main-card {
  background: var(--surface-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: clamp(1.25rem, 4vw, 2rem);
  box-shadow: var(--shadow-festive);
  padding: clamp(1.25rem, 4vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  width: 100%;
}

/* Multi-Stage View Flow */
.stage {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  animation: stageEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  width: 100%;
}

@keyframes stageEnter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Stage 1: Greeting Hero */
.greeting-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
  padding: 0.5rem 0;
  width: 100%;
}

.greeting-emblem-wrap {
  position: relative;
  width: clamp(110px, 24vw, 140px);
  height: clamp(110px, 24vw, 140px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.greeting-emblem-glow {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.38) 0%, rgba(203, 30, 52, 0) 70%);
  animation: emblemPulse 3s ease-in-out infinite;
}

.greeting-emblem-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #ffffff;
  box-shadow: 0 10px 25px rgba(136, 8, 26, 0.22);
  position: relative;
  z-index: 2;
}

@keyframes emblemPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 0.9; }
}

.greeting-headline {
  font-family: var(--font-festive);
  font-size: clamp(1.6rem, 4.8vw, 2.3rem);
  color: var(--crimson-900);
  line-height: 1.25;
}

.greeting-message {
  font-size: clamp(0.92rem, 2.7vw, 1.05rem);
  color: #57534e;
  max-width: 540px;
  line-height: 1.6;
}

/* Traditional Verse Box */
.tradition-box {
  background: linear-gradient(135deg, #fff7ed 0%, #fff1f2 100%);
  border: 1px solid #fecdd3;
  border-radius: 1.15rem;
  padding: 1.15rem 1.25rem;
  max-width: 560px;
  width: 100%;
  text-align: center;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.05);
}

.tradition-quote {
  font-family: var(--font-festive);
  font-size: clamp(0.95rem, 2.8vw, 1.15rem);
  color: var(--crimson-950);
  line-height: 1.65;
  letter-spacing: 0.01em;
}

.tradition-meaning {
  margin-top: 0.65rem;
  font-size: clamp(0.8rem, 2.3vw, 0.88rem);
  color: var(--gold-600);
  font-weight: 600;
  line-height: 1.45;
}

/* Stage Heading */
.stage-heading {
  text-align: center;
  width: 100%;
}

.stage-title {
  font-size: clamp(1.4rem, 4vw, 1.85rem) !important;
  margin-bottom: 0.35rem;
}

.stage-subtitle {
  font-size: clamp(0.88rem, 2.5vw, 0.95rem) !important;
  margin: 0 auto;
}

/* Upload & Input Section */
.upload-zone {
  border: 2px dashed #f87171;
  background: linear-gradient(180deg, #fff5f5 0%, #fffbf5 100%);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 4vw, 2.25rem) 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--crimson-600);
  background: #fef2f2;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(229, 40, 64, 0.15);
}

.upload-icon-wrapper {
  width: clamp(54px, 14vw, 68px);
  height: clamp(54px, 14vw, 68px);
  border-radius: 50%;
  background: linear-gradient(135deg, #fee2e2, #fef3c7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  box-shadow: 0 4px 12px rgba(203, 30, 52, 0.12);
}

.upload-title {
  font-size: clamp(1rem, 3vw, 1.15rem);
  font-weight: 700;
  color: var(--crimson-900);
}

.upload-hint {
  font-size: clamp(0.78rem, 2.3vw, 0.85rem);
  color: #78716c;
  max-width: 440px;
}

.upload-btn {
  max-width: 240px;
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  cursor: pointer;
}

/* Action Buttons Grid */
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  width: 100%;
}

@media (max-width: 480px) {
  .action-grid {
    grid-template-columns: 1fr;
  }
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  min-height: 48px;
  border-radius: 1rem;
  background: #ffffff;
  border: 1px solid #e7e5e4;
  color: #44403c;
  font-size: clamp(0.88rem, 2.6vw, 0.95rem);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  touch-action: manipulation;
}

.btn-secondary:hover {
  background: #f5f5f4;
  border-color: #d6d3d1;
  transform: translateY(-1px);
}

.btn-mini {
  padding: 0.45rem 0.75rem !important;
  font-size: 0.82rem !important;
  min-height: 38px !important;
}

.btn-sample {
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  border-color: #fde68a;
  color: var(--gold-600);
}

.btn-sample:hover {
  background: linear-gradient(135deg, #ffedd5, #fde047);
  border-color: var(--gold-400);
}

/* Stage 3: Dedicated Loading Screen */
.loading-stage-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(2.5rem, 6vw, 3.75rem) 1rem;
  gap: 1.35rem;
  width: 100%;
}

.tika-loading-ritual {
  position: relative;
  width: clamp(90px, 22vw, 110px);
  height: clamp(90px, 22vw, 110px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ritual-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px dashed var(--gold-400);
  border-top-color: var(--crimson-600);
  border-right-color: var(--jamara-green);
  animation: ritualSpin 3.5s linear infinite;
}

.ritual-tika-center {
  width: clamp(52px, 13vw, 64px);
  height: clamp(52px, 13vw, 64px);
  border-radius: 50%;
  background: radial-gradient(circle, #e11d48 0%, #9f1239 60%, #4c0519 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.4rem, 3.8vw, 1.8rem);
  box-shadow: 0 0 25px rgba(225, 29, 72, 0.45);
  animation: ritualHeartbeat 1.5s ease-in-out infinite;
}

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

@keyframes ritualHeartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.loading-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: center;
  width: 100%;
}

.loading-title {
  font-family: var(--font-festive);
  font-size: clamp(1.35rem, 4vw, 1.7rem);
  color: var(--crimson-900);
}

.loading-subtext {
  font-size: clamp(0.85rem, 2.5vw, 0.95rem);
  color: #78716c;
  max-width: 440px;
  line-height: 1.5;
}

.loading-progress-bar-wrap {
  width: 100%;
  max-width: 280px;
  height: 8px;
  border-radius: 4px;
  background: #f5f5f4;
  overflow: hidden;
  border: 1px solid #e7e5e4;
  margin-top: 0.35rem;
}

.loading-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--crimson-600), var(--gold-400), var(--jamara-green));
  border-radius: 4px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-back {
  align-self: flex-start;
  background: none;
  border: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: #78716c;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  min-height: 40px;
}

.btn-back:hover {
  color: var(--crimson-700);
  background: #f5f4f0;
}

/* Status Indicator */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.65rem 1.15rem;
  background: #fbfaf8;
  border: 1px solid #e7e5e4;
  border-radius: var(--radius-full);
  font-size: clamp(0.82rem, 2.4vw, 0.9rem);
  font-weight: 500;
  color: #57534e;
  transition: all 0.3s ease;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
  animation: pulse-dot 2s infinite;
  flex-shrink: 0;
}

.status-bar.ready .status-dot {
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.7; }
}

/* Stage 4: Result Layout */
.result-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}

.preview-wrapper {
  position: relative;
  background: #1c1917;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4), 0 12px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.blessed-img-view {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  -webkit-touch-callout: default !important; /* Allows native iOS 'Save to Photos' long-press menu */
  -webkit-user-select: auto !important;
  user-select: auto !important;
  pointer-events: auto !important;
  touch-action: manipulation;
  cursor: pointer;
}

.touch-save-banner {
  background: linear-gradient(135deg, #fff1f2 0%, #fef3c7 100%);
  border: 1px solid #fecdd3;
  color: var(--crimson-900);
  font-size: clamp(0.8rem, 2.4vw, 0.88rem);
  padding: 0.65rem 0.95rem;
  border-radius: 0.85rem;
  text-align: center;
  line-height: 1.45;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.06);
}

#canvas {
  display: none; /* Canvas renders in background, output is mirrored to high-res img for native iPhone saving */
}

/* Canvas Floating Overlay Controls */
.canvas-floating-bar {
  position: absolute;
  top: clamp(0.5rem, 2vw, 1rem);
  right: clamp(0.5rem, 2vw, 1rem);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
  pointer-events: none;
}

.btn-pill {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: clamp(0.72rem, 2.2vw, 0.8rem);
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  pointer-events: auto;
}

.btn-pill:hover, .btn-pill:active {
  background: rgba(0, 0, 0, 0.88);
  border-color: var(--gold-400);
  color: var(--gold-200);
}

.face-count-badge {
  position: absolute;
  top: clamp(0.5rem, 2vw, 1rem);
  left: clamp(0.5rem, 2vw, 1rem);
  background: rgba(22, 101, 52, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: clamp(0.72rem, 2.2vw, 0.78rem);
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(74, 222, 128, 0.3);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  z-index: 10;
  pointer-events: none;
}

/* Tuning / Adjustments Accordion */
.accordion {
  border: 1px solid #f0eeeb;
  border-radius: 1rem;
  background: #fdfcfb;
  overflow: hidden;
  transition: all 0.25s ease;
  width: 100%;
}

.accordion-header {
  width: 100%;
  padding: 0.9rem 1.25rem;
  min-height: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  font-size: clamp(0.88rem, 2.5vw, 0.95rem);
  font-weight: 600;
  color: #44403c;
  cursor: pointer;
}

.accordion-header:hover {
  background: #f5f4f0;
}

.accordion-body {
  padding: 1.15rem 1.25rem;
  border-top: 1px solid #f0eeeb;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
  width: 100%;
}

@media (max-width: 600px) {
  .accordion-body {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem 0.9rem;
  }
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.control-right {
  justify-content: flex-end;
}

.control-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #57534e;
  display: flex;
  justify-content: space-between;
}

.control-label span:last-child {
  color: var(--crimson-700);
}

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e7e5e4;
  outline: none;
  cursor: pointer;
  padding: 0;
  margin: 0.4rem 0;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--crimson-600);
  border: 2px solid #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.jamara-options {
  display: flex;
  gap: 0.35rem;
  width: 100%;
}

.btn-option {
  flex: 1;
  padding: 0.55rem 0.2rem;
  min-height: 40px;
  font-size: clamp(0.72rem, 2vw, 0.78rem);
  font-weight: 600;
  background: #f5f5f4;
  border: 1px solid #e7e5e4;
  border-radius: 0.5rem;
  color: #57534e;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  touch-action: manipulation;
}

.btn-option.active {
  background: var(--crimson-700);
  border-color: var(--crimson-800);
  color: #ffffff;
}

/* Output Actions */
.output-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 1.05rem 1.75rem;
  min-height: 52px;
  border-radius: 1.15rem;
  background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-600) 100%);
  color: #ffffff;
  font-size: clamp(0.95rem, 2.8vw, 1.05rem);
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 8px 20px -4px rgba(217, 119, 6, 0.35);
  touch-action: manipulation;
  text-decoration: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-500) 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -4px rgba(217, 119, 6, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-large {
  padding: 1.15rem 2.25rem !important;
  font-size: clamp(1.05rem, 3.2vw, 1.25rem) !important;
  border-radius: 1.25rem !important;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 28px -5px rgba(217, 119, 6, 0.45) !important;
}

.secondary-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  width: 100%;
}

@media (max-width: 500px) {
  .secondary-actions {
    grid-template-columns: 1fr;
  }
}

.nav-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  width: 100%;
  margin-top: 0.25rem;
}

@media (max-width: 480px) {
  .nav-bottom-row {
    grid-template-columns: 1fr;
  }
}

.btn-subtle {
  background: #fafaf9;
  border-color: #e7e5e4;
  color: #57534e;
  font-size: 0.88rem;
}

.btn-subtle:hover {
  background: #f5f5f4;
  color: var(--crimson-700);
}

/* Traditional Cultural Significance Card */
.tradition-info-card {
  background: var(--surface-card);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: clamp(1.25rem, 4vw, 1.75rem);
  box-shadow: 0 10px 30px -10px rgba(136, 8, 26, 0.08);
  padding: clamp(1.25rem, 3.5vw, 1.75rem);
  width: 100%;
}

.tradition-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  width: 100%;
}

@media (max-width: 600px) {
  .tradition-info-grid {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }
}

.tradition-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.tradition-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.tradition-title {
  font-family: var(--font-festive);
  font-size: 1.1rem;
  color: var(--crimson-900);
  margin-bottom: 0.25rem;
}

.tradition-desc {
  font-size: 0.86rem;
  color: #66605c;
  line-height: 1.5;
}

/* Footer Blessing */
.festive-footer {
  text-align: center;
  color: #78716c;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
}

.footer-blessing {
  font-family: var(--font-festive);
  font-size: clamp(0.95rem, 2.8vw, 1.1rem);
  color: var(--crimson-900);
  font-style: italic;
}

.footer-sub {
  font-size: clamp(0.8rem, 2.3vw, 0.88rem);
}

/* Camera Modal Viewfinder */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.modal-content {
  background: #1c1917;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  max-width: 480px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.camera-header {
  padding: 0.9rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.camera-viewfinder {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #000000;
  overflow: hidden;
}

#cameraVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.camera-guide-oval {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 58%;
  height: 72%;
  border: 2px dashed rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  pointer-events: none;
}

.camera-footer {
  padding: 1.15rem;
  display: flex;
  justify-content: center;
  background: #141210;
}

.btn-snap {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #ffffff;
  border: 4px solid var(--crimson-600);
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35);
  transition: transform 0.15s ease;
  touch-action: manipulation;
}

.btn-snap:active {
  transform: scale(0.92);
}

/* Toast Message */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1c1917;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: clamp(0.85rem, 2.5vw, 0.92rem);
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}

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

.hidden {
  display: none !important;
}
