:root {
  --ink: #3a2418;
  --ink-soft: #6b5142;
  --cream: #f6ecd9;
  --page-bg: #e7dcc4;
  --gold: #b8863f;
  --gold-light: #f0d9a8;
  --invite-w: 560px;
  --app-height: 100vh;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}

@supports (height: 100dvh) {
  :root {
    --app-height: 100dvh;
  }
}

@media (min-width: 1100px) {
  :root { --invite-w: min(75vw, 900px); }
}

html.pre-open,
html.pre-open body {
  overflow: hidden;
  height: 100%;
}

html.pre-open #landing .section-bg {
  filter: saturate(0.95) brightness(1.02);
}

html { 
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

* { 
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--page-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-overflow-scrolling: touch;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

h1, h2, h3, .display {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  margin: 0;
}

.invite {
  position: relative;
  max-width: 540px;
  margin: 0 auto;
  background: var(--cream);
  padding: 0;
}

@media (min-width: 720px) {
  .invite {
    margin: 0 auto;
    box-shadow: 0 30px 90px rgba(58, 36, 24, 0.28);
  }
}

.section {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

#landing {
  min-height: 100vh;
  min-height: var(--app-height);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Every section's artwork lives in a box locked to the source art's own
   1080:1920 aspect ratio. Slides touch with 0px gap between them. */
.slide-frame {
  position: relative;
  width: 100%;
  max-width: 540px;
  aspect-ratio: 1080 / 1920;
  margin: 0 auto;
  overflow: hidden;
  background: var(--cream);
  display: block;
}

.section-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: 100% 100%;
  background-position: center;
  filter: saturate(0.85) sepia(0.12) brightness(1.03) contrast(0.97);
  transition: filter 1.1s ease, opacity 1s ease;
}

/* only sections without a scratch card get the extra scroll-parallax
   drift on their background -- event sections keep bg locked in place so
   the scratch rectangle never drifts out of alignment with the art */
.section-bg.parallax-bg {
  inset: -3%;
  width: 106%;
  height: 106%;
  will-change: transform;
}

.hang-wrap {
  position: absolute;
  top: -6.5%;
  left: 0;
  width: 100%;
  z-index: 2;
  pointer-events: none;
  will-change: transform;
}

.hang {
  display: block;
  width: 100%;
  transform-origin: top center;
  animation: sway 5s ease-in-out infinite;
}

@keyframes sway {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(1.5px) rotate(0.35deg);
  }
  50% {
    transform: translateY(3px) rotate(0deg);
  }
  75% {
    transform: translateY(1.5px) rotate(-0.35deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hang    { animation: none; }
  .peacock { animation: none; }
  .hang-wrap, .section-bg, .content { transform: none !important; }
}

.content {
  position: relative;
  z-index: 3;
  width: 100%;
  text-align: center;
  padding: 0 6%;
  will-change: transform, opacity;
}

/* ---------- Landing ---------- */

#landing { transition: opacity 0.9s ease 0.15s; }
#landing.exiting { opacity: 0; pointer-events: none; }

.peacock {
  position: absolute;
  bottom: 5%;
  width: 22%;
  max-width: 115px;
  z-index: 2;
  filter: drop-shadow(0 8px 18px rgba(58, 36, 24, 0.28));
  will-change: transform;
}
.peacock.left {
  left: 2%;
  /* peacock-1.png naturally faces right towards center */
  animation: peacock-left-approach 2s cubic-bezier(0.25, 1, 0.5, 1) infinite alternate;
}
.peacock.right {
  right: 2%;
  /* peacock-2.png naturally faces left towards center - no flip needed */
  animation: peacock-right-approach 2s cubic-bezier(0.25, 1, 0.5, 1) infinite alternate;
}

@keyframes peacock-left-approach {
  0% {
    transform: translateX(0) translateY(0);
  }
  50% {
    transform: translateX(15px) translateY(-3.5px);
  }
  100% {
    transform: translateX(32px) translateY(0);
  }
}

@keyframes peacock-right-approach {
  0% {
    transform: translateX(0) translateY(0);
  }
  50% {
    transform: translateX(-15px) translateY(-3.5px);
  }
  100% {
    transform: translateX(-32px) translateY(0);
  }
}

.envelope-wrap {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  cursor: pointer;
  width: 40%;
  transform-origin: center center;
}

.envelope-wrap img {
  width: 100%;
  display: block;
  filter: drop-shadow(0 18px 30px rgba(58, 36, 24, 0.35));
}

.envelope-wrap.opened {
  pointer-events: none;
  animation: envelope-zoom 1s cubic-bezier(.5,0,.75,0) forwards;
}

@keyframes envelope-zoom {
  0%   { transform: translate(-50%, -50%) scale(1);   opacity: 1; }
  55%  { transform: translate(-50%, -50%) scale(3.4); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(7.5); opacity: 0; }
}

.wax-seal-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 217, 168, 0.6) 0%, rgba(184, 134, 63, 0) 70%);
  animation: seal-pulse 2.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes seal-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.4; }
  50%      { transform: translate(-50%, -50%) scale(1.35); opacity: 0.9; }
}

.tap-label {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-family: "Jost", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #4A0E1A;
  background: rgba(254, 250, 242, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 6px 18px;
  border-radius: 24px;
  border: 1px solid rgba(184, 134, 63, 0.45);
  box-shadow: 0 6px 20px rgba(58, 36, 24, 0.14);
  white-space: nowrap;
  animation: pulse-luxury 2.5s ease-in-out infinite;
}

.tap-label.hide { opacity: 0 !important; animation: none; }

@keyframes pulse-luxury {
  0%, 100% { transform: translateX(-50%) translateY(0) scale(1); opacity: 0.88; }
  50%      { transform: translateX(-50%) translateY(-2px) scale(1.03); opacity: 1; box-shadow: 0 8px 24px rgba(184, 134, 63, 0.3); }
}

/* ---------- Event sections: Haldi / Sangeet / Wedding ---------- */
/* The cursive ceremony title is baked into the background art. Only the
   date/time/venue block is gated behind the scratch card, positioned to
   sit exactly where that text would otherwise appear in the artwork. */

.scratch-wrap {
  position: absolute;
  overflow: visible;
  background: transparent;
}

#haldi .scratch-wrap   { left: 26.7%; top: 27.2%; width: 46.5%; height: 18.5%; }
#sangeet .scratch-wrap { left: 22.8%; top: 31.3%; width: 54.8%; height: 19.3%; }
#wedding .scratch-wrap { left: 25.9%; top: 26.0%; width: 48.2%; height: 18.1%; }

.reveal-card {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.96);
  opacity: 1;
  transition: transform 0.5s cubic-bezier(.2,.8,.2,1);
}

.reveal-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
}

.reveal-card.revealed {
  transform: scale(1);
  opacity: 1;
}

.scratch-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
  border-radius: 6px;
  box-shadow: 0 4px 18px rgba(35, 15, 5, 0.22);
  transition: opacity 0.4s ease;
  z-index: 5;
}

.scratch-canvas:active {
  cursor: grabbing;
}

.scratch-canvas.done {
  opacity: 0;
  pointer-events: none;
  box-shadow: none;
}

.scratch-hint {
  display: none;
}

#names .section-bg {
  opacity: 1 !important;
  filter: saturate(0.85) sepia(0.12) brightness(1.03) contrast(0.97) !important;
}

/* ---------- Family RSVP / With Best Compliments Slide ---------- */
#compliments .slide-frame {
  position: relative;
  overflow: hidden;
}

.family-rsvp-wrap {
  position: absolute;
  top: 11.5%;
  left: 50%;
  transform: translateX(-50%);
  width: 76%;
  max-width: 410px;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.family-rsvp-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(58, 36, 24, 0.12));
}

/* ---------- RSVP & Venue (Shifted below florals, Advanced CSS Grid) ---------- */

#rsvp .slide-frame {
  position: relative;
  overflow: hidden;
}

#rsvp .rsvp-content {
  position: absolute;
  top: clamp(16.5%, 18%, 19%); /* Cleanly shifted down into open sky area */
  left: 0;
  right: 0;
  width: 100%;
  padding: 0 clamp(4%, 5%, 6%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 3;
}

.rsvp-header {
  text-align: center;
  margin-bottom: clamp(3px, 1vh, 7px);
}

.rsvp-shloka {
  font-family: "Cinzel", "Cormorant Garamond", serif;
  font-size: clamp(0.56rem, 1.6vw, 0.65rem);
  letter-spacing: 0.16em;
  color: #B8863F;
  margin: 0 0 2px;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.9);
}

.rsvp-eyebrow {
  font-family: "Jost", sans-serif;
  font-size: clamp(0.64rem, 1.8vw, 0.78rem);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #5A1523;
  margin: 0;
}

.rsvp-content .rsvp-names {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.55rem, 4.8vw, 2.35rem);
  color: #4A0E1A;
  line-height: 1.04;
  margin: 2px 0 4px;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

.rsvp-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 11px;
  background: rgba(254, 250, 242, 0.84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(184, 134, 63, 0.35);
  border-radius: 20px;
  font-family: "Jost", sans-serif;
  font-size: clamp(0.6rem, 1.7vw, 0.68rem);
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #3A2418;
  box-shadow: 0 2px 8px rgba(58, 36, 24, 0.06);
}

.badge-ornament {
  color: #B8863F;
  font-size: 0.56rem;
}

/* Advanced Modern CSS Grid for Venue & Framed Map */
.rsvp-grid {
  width: 100%;
  max-width: 360px;
  margin: clamp(4px, 1vh, 7px) auto 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(4px, 1vh, 7px);
}

.rsvp-card {
  background: rgba(255, 253, 249, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(184, 134, 63, 0.32);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(58, 36, 24, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  position: relative;
}

.venue-details-card {
  padding: clamp(6px, 1.2vh, 8px) clamp(8px, 2.5vw, 12px);
  text-align: center;
}

.card-pill {
  display: inline-block;
  font-family: "Jost", sans-serif;
  font-size: clamp(0.5rem, 1.4vw, 0.55rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #B8863F;
  margin-bottom: 2px;
}

.venue-title {
  font-family: "Cinzel", "Cormorant Garamond", serif;
  font-size: clamp(0.88rem, 2.5vw, 1.1rem);
  font-weight: 700;
  color: #4A0E1A;
  margin: 0;
  letter-spacing: 0.02em;
}

.venue-location {
  font-family: "Jost", sans-serif;
  font-size: clamp(0.6rem, 1.7vw, 0.68rem);
  color: #6B5142;
  margin: 1px 0 clamp(3px, 0.8vh, 6px);
}

.placeholder-note {
  font-family: "Jost", sans-serif;
  font-size: clamp(0.56rem, 1.5vw, 0.64rem);
  font-style: italic;
  color: #6B5142;
  opacity: 0.75;
  margin: 6px 0 0;
}

.timings-grid {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: clamp(2.5px, 0.6vh, 4px) 6px;
  background: rgba(246, 236, 217, 0.5);
  border-radius: 7px;
  margin-bottom: clamp(3px, 0.8vh, 6px);
}

.timing-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.time-label {
  font-family: "Jost", sans-serif;
  font-size: clamp(0.48rem, 1.3vw, 0.54rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7E5A2A;
}

.time-val {
  font-family: "Cinzel", serif;
  font-size: clamp(0.64rem, 1.8vw, 0.72rem);
  font-weight: 700;
  color: #3A2418;
}

.timing-sep {
  width: 1px;
  height: 14px;
  background: rgba(184, 134, 63, 0.28);
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: clamp(4px, 0.8vh, 5px) 8px;
  min-height: 30px;
  border-radius: 20px;
  font-family: "Jost", sans-serif;
  font-size: clamp(0.58rem, 1.6vw, 0.62rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.22s ease;
  border: 1px solid rgba(184, 134, 63, 0.35);
}

.action-map-btn {
  background: #4A0E1A;
  color: #FFFDF9;
  border-color: #4A0E1A;
}

.action-map-btn:hover {
  background: #631222;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74, 14, 26, 0.22);
}

.action-copy-btn {
  background: rgba(255, 255, 255, 0.85);
  color: #4A0E1A;
}

.action-copy-btn:hover {
  background: #FFF;
  border-color: #B8863F;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(184, 134, 63, 0.18);
}

/* Framed Minimal Map Card */
.map-frame-card {
  overflow: hidden;
  position: relative;
  height: clamp(82px, 12vh, 105px);
}

.map-tag {
  position: absolute;
  top: 4px;
  left: 6px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  background: rgba(254, 250, 242, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(184, 134, 63, 0.35);
  border-radius: 12px;
  font-family: "Jost", sans-serif;
  font-size: 0.52rem;
  font-weight: 600;
  color: #3A2418;
  pointer-events: none;
}

.tag-pulse {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2E7D32;
  box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.25);
}

.map-iframe-modern {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: contrast(1.04) saturate(0.92) sepia(0.06);
}

/* Sign-off */
.rsvp-signoff {
  margin-top: clamp(2px, 0.6vh, 6px);
  text-align: center;
}

.signoff-heading {
  font-family: "Jost", sans-serif;
  font-size: clamp(0.52rem, 1.4vw, 0.58rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7E5A2A;
  margin: 0;
}

.signoff-family {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(0.85rem, 2.4vw, 0.98rem);
  font-weight: 600;
  color: #4A0E1A;
  margin: 1px 0 0;
}

/* ---------- Fixed UI Chrome (Audio Pill, Fullscreen & Nav) ---------- */

#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  pointer-events: none;
}

/* Minimal Luxury Fullscreen Toggle Button */
.fullscreen-btn {
  position: fixed;
  top: max(18px, calc(14px + var(--sat)));
  right: max(18px, calc(14px + var(--sar)));
  z-index: 55;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(184, 134, 63, 0.45);
  background: rgba(254, 250, 242, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #4A0E1A;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(58, 36, 24, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  padding: 0;
}

.fullscreen-btn:hover {
  transform: translateY(-2px) scale(1.05);
  border-color: #B8863F;
  box-shadow: 0 6px 20px rgba(184, 134, 63, 0.24);
  background: #FFFDF9;
}

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

.fullscreen-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Minimal Luxury Audio Toggle Pill */
.mute-btn {
  position: fixed;
  bottom: max(20px, calc(16px + var(--sab)));
  right: max(20px, calc(16px + var(--sar)));
  z-index: 55;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(184, 134, 63, 0.45);
  background: rgba(254, 250, 242, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(58, 36, 24, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  padding: 0;
}

.mute-btn:hover {
  transform: translateY(-2px) scale(1.05);
  border-color: #B8863F;
  box-shadow: 0 8px 24px rgba(184, 134, 63, 0.25);
  background: #FFFDF9;
}

.audio-bars {
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 14px;
}

.audio-bars .bar {
  width: 2.5px;
  background: #4A0E1A;
  border-radius: 2px;
  transition: height 0.2s ease;
}

.audio-bars .bar-1 { height: 7px; }
.audio-bars .bar-2 { height: 13px; }
.audio-bars .bar-3 { height: 9px; }

/* Playing animation */
body.music-playing .audio-bars .bar-1 {
  animation: sound-bar-1 0.8s ease-in-out infinite alternate;
}
body.music-playing .audio-bars .bar-2 {
  animation: sound-bar-2 0.65s ease-in-out infinite alternate 0.15s;
}
body.music-playing .audio-bars .bar-3 {
  animation: sound-bar-3 0.9s ease-in-out infinite alternate 0.3s;
}

@keyframes sound-bar-1 { 0% { height: 4px; } 100% { height: 12px; } }
@keyframes sound-bar-2 { 0% { height: 13px; } 100% { height: 5px; } }
@keyframes sound-bar-3 { 0% { height: 6px; } 100% { height: 14px; } }

.audio-tooltip {
  display: none;
}

/* Modern Minimal Progress Nav */
.progress-nav {
  display: none;
}

@media (min-width: 720px) {
  .progress-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: fixed;
    right: max(22px, calc(16px + var(--sar)));
    top: 50%;
    transform: translateY(-50%);
    z-index: 55;
  }
  
  .progress-nav button {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid var(--gold);
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  
  .progress-nav button::after {
    content: attr(data-name);
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%) translateX(4px);
    font-family: "Jost", sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #4A0E1A;
    background: rgba(254, 250, 242, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 3px 8px;
    border-radius: 10px;
    border: 1px solid rgba(184, 134, 63, 0.35);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(58, 36, 24, 0.1);
  }

  .progress-nav button:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }

  .progress-nav button.active {
    background: var(--gold);
    transform: scale(1.35);
    box-shadow: 0 0 8px rgba(184, 134, 63, 0.6);
  }
}

/* Modern Minimal Toast Notification */
.modern-toast {
  position: fixed;
  bottom: max(24px, calc(18px + var(--sab)));
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  z-index: 99;
  background: rgba(46, 14, 26, 0.94);
  color: #FFFDF9;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(184, 134, 63, 0.5);
  border-radius: 30px;
  padding: 8px 22px;
  font-family: "Jost", sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modern-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   ADDITIONS — Accessibility, Particles, Focus styles
   (everything below here is new; nothing above was modified)
   ============================================================ */

/* ---------- Keyboard focus styles ---------- */

/* Envelope: visible gold outline when focused via keyboard */
.envelope-wrap:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 8px;
  border-radius: 4px;
}

/* Progress nav dots */
.progress-nav button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 50%;
}

/* Mute button */
.mute-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- Accessible scratch-reveal button ---------- */
/* Sits as a sibling of .scratch-wrap, absolutely positioned inside
   .slide-frame just below each section's scratch area */

.scratch-reveal-btn {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  padding: 6px 18px;
  background: rgba(254, 250, 242, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(184, 134, 63, 0.5);
  border-radius: 20px;
  font-family: "Jost", sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4A0E1A;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(58, 36, 24, 0.12);
  transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.scratch-reveal-btn:hover {
  background: #FFFDF9;
  border-color: #B8863F;
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 6px 18px rgba(184, 134, 63, 0.25);
  color: #631222;
}

.scratch-reveal-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Hide once the card is revealed */
.scratch-reveal-btn.done {
  display: none;
}

/* Position each button ~1% below the bottom edge of its scratch-wrap.
   Calculation: scratch-wrap top% + scratch-wrap height% + 1% gap */
#haldi   .scratch-reveal-btn { top: 47.0%; } /* 27.2 + 18.5 + 1.3 */
#sangeet .scratch-reveal-btn { top: 52.0%; } /* 31.3 + 19.3 + 1.4 */
#wedding .scratch-reveal-btn { top: 45.5%; } /* 26.0 + 18.1 + 1.4 */

/* ---------- CSS Wedding Particles ---------- */
/* Pure CSS animation; JS only sets inline custom properties for
   per-particle variation. pointer-events:none ensures they never
   block any interaction. z-index:1 keeps them above the bg but
   well below all interactive content. */

.particle {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  width:  var(--p-size,  5px);
  height: var(--p-size,  5px);
  left:   var(--p-x,    50%);
  top:    var(--p-y,    70%);
  border-radius: var(--p-radius, 50%);
  background: var(--p-color, rgba(184, 134, 63, 0.35));
  opacity: 0;
  animation: float-particle var(--p-dur, 8s) ease-in-out var(--p-delay, 0s) infinite;
}

@keyframes float-particle {
  0%   { transform: translateY(0) translateX(0) rotate(0deg);
         opacity: 0; }
  12%  { opacity: var(--p-opacity, 0.45); }
  88%  { opacity: var(--p-opacity, 0.45); }
  100% { transform: translateY(-72px) translateX(var(--p-drift, 12px)) rotate(var(--p-spin, 200deg));
         opacity: 0; }
}

/* ---------- Reduced motion overrides ---------- */
@media (prefers-reduced-motion: reduce) {
  /* Particles: freeze completely (already handled by existing
     animation:none on .hang/.peacock above, this covers particles) */
  .particle { animation: none; opacity: 0; }
}

/* ============================================================
   RESPONSIVE DESIGN & CROSS-DEVICE ENHANCEMENTS
   Optimized for: Mac, Windows, iOS (iPhone/iPad), Android
   ============================================================ */

/* Small Phones (iPhone SE, Galaxy S, narrow viewports <= 480px) */
@media (max-width: 480px) {
  .slide-frame {
    width: 100%;
    border-radius: 0;
  }
  
  .tap-label {
    font-size: 0.64rem;
    padding: 5px 14px;
    letter-spacing: 0.12em;
  }
  
  .envelope-wrap {
    width: 45%;
  }

  .card-actions {
    gap: 4px;
  }

  .action-btn {
    font-size: 0.58rem;
    padding: 4px 6px;
  }
}

/* Short viewports (mobile browsers with dynamic URL bars, laptops <= 700px) */
@media (max-height: 700px) {
  .section {
    padding: 0;
    margin: 0;
  }

  #rsvp .rsvp-content {
    top: 17%;
  }

  .map-frame-card {
    height: 86px;
  }

  .rsvp-names {
    margin: 1px 0 3px !important;
  }

  .rsvp-grid {
    margin-top: 4px;
    gap: 4px;
  }
  
  .venue-details-card {
    padding: 5px 10px;
  }
}

/* Mobile Landscape Orientation (phones held horizontally) */
@media (max-height: 520px) and (orientation: landscape) {
  .section {
    min-height: 100vh;
    height: auto;
    padding: 0;
    margin: 0;
    overflow-y: visible;
  }

  .slide-frame {
    width: min(88vw, calc(var(--app-height) * 0.9 * 1080 / 1920));
    max-width: 440px;
  }

  .mute-btn {
    width: 38px;
    height: 38px;
    bottom: 12px;
    right: 12px;
  }
  
  .progress-nav {
    display: none;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .scratch-canvas {
    cursor: default;
  }
  
  .action-btn:active,
  .scratch-reveal-btn:active,
  .mute-btn:active {
    transform: scale(0.96);
  }
}

/* High-DPI / Retina Crisp Display Overrides */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .section-bg {
    image-rendering: -webkit-optimize-contrast;
  }
}

