/* =========================================
   1. VARIABLES & RESET (ROMANTIC WEDDING PALETTE)
   ========================================= */
:root {
    --bg-color: #fcfcfc;                    /* Pure pearl white */
    --cream: #f5f2f3;                       /* Whisper wine-white */
    --wedding-gold: #9b3a47;                /* Wine rose — light gradient end */
    --rose-deep: #5a1a20;                   /* Deep wine — dark gradient end */
    --rose-soft: #f5e8ea;                   /* Ice blush */
    --text-dark: #1c0c10;                   /* Wine-black */
    --glass: rgba(255, 255, 255, 0.94);
    --glass-border: rgba(255, 255, 255, 0.92);
    --font-main: 'Quicksand', sans-serif;
    --font-fancy: 'Cormorant Garamond', serif;
    --font-hand: 'Cormorant Garamond', serif;
    --danger: #b01030;                      /* Error accent */

    --ease-lux: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-float: cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

.signed-name { font-style: italic; }

html, body {
    width: 100%; height: 100%; overflow: hidden;
    overscroll-behavior: none;
}

body {
    background-color: var(--bg-color);
    font-family: var(--font-main);
    color: var(--text-dark);
    height: 100vh; height: 100dvh; width: 100vw;
    cursor: default; position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================================
   2. FIREFLIES
   ========================================= */
.firefly {
    position: fixed; left: 50%; top: 50%; width: 4px; height: 4px;
    background-color: #fff; border-radius: 50%;
    box-shadow: 0 0 10px #fff, 0 0 20px var(--wedding-gold);
    animation: fly 15s linear infinite; pointer-events: none; z-index: 0;
    opacity: 0;
    will-change: transform, opacity;
}
@keyframes fly {
    0%   { transform: translate(0, 0) scale(1); opacity: 0; }
    10%  { opacity: 0.8; }
    50%  { opacity: 0.5; }
    90%  { opacity: 0.8; }
    100% { transform: translate(var(--x), var(--y)) scale(0); opacity: 0; }
}

/* =========================================
   3. FINALE PARTICLES
   ========================================= */
.finale-particle {
    position: absolute;
    background: radial-gradient(circle, var(--rose-deep) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    animation: floatUpParticle 4s ease-in infinite;
    will-change: transform, opacity;
}
@keyframes floatUpParticle {
    0%   { transform: translateY(0) scale(0); opacity: 0; }
    20%  { opacity: 0.6; }
    100% { transform: translateY(-100vh) scale(1); opacity: 0; }
}

/* =========================================
   4. AMBIENT BACKGROUND
   ========================================= */
.ambient-background {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; overflow: hidden; pointer-events: none;
}

.orb {
    position: absolute; border-radius: 50%; filter: blur(90px);
    opacity: 0.45;
    animation: floatOrb 15s infinite alternate ease-in-out;
    will-change: transform;
}
.orb-1 { width: 80vw; height: 80vw; background: #f0e0e3; top: -20%; left: -20%; }
.orb-2 { width: 60vw; height: 60vw; background: #eeecf5; bottom: -10%; right: -10%; animation-delay: -7s; }

@keyframes floatOrb {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(40px, 60px) scale(1.1); }
    100% { transform: translate(-20px, 20px) scale(0.95); }
}

/* =========================================
   5. UI ELEMENTS
   ========================================= */
.cursor-trail {
    width: 25px; height: 25px; background: rgba(155, 58, 71, 0.15);
    border-radius: 50%; position: fixed; pointer-events: none; z-index: 9999;
    transition: transform 0.15s cubic-bezier(0.2, 0, 0.2, 1), left 0.1s linear, top 0.1s linear;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    box-shadow: 0 0 20px rgba(155, 58, 71, 0.35);
    border: 1px solid rgba(255,255,255,0.5);
    will-change: left, top, transform;
}
@media (hover: none) and (pointer: coarse) { .cursor-trail { display: none; } }

button, .gallery-item, .close-modal {
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

/* =========================================
   6. SCENES (LAYOUT)
   ========================================= */
.scene {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.23, 1, 0.32, 1), transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
    transform: scale(0.98) translateY(20px);
    filter: blur(10px);
    z-index: 1; pointer-events: none;
    overflow: hidden;
    display: flex; flex-direction: column;
    padding: 20px;
    will-change: opacity, transform, filter;
}
.scene.active {
    opacity: 1; transform: scale(1) translateY(0); filter: blur(0px); pointer-events: auto;
}
.hidden { display: none !important; }

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

/* =========================================
   7. LANDING SCENE
   ========================================= */
.landing-content {
    text-align: center; width: 100%; max-width: 640px;
    z-index: 10; margin: auto; flex: 0 0 auto;
}
.landing-content h1 {
    font-family: var(--font-hand); font-size: clamp(2.4rem, 7vw, 4rem);
    font-weight: 400; letter-spacing: 0.05em;
    color: var(--rose-deep); margin-bottom: 12px; line-height: 1.25;
    text-shadow: 2px 2px 0px rgba(255,255,255,0.6);
    animation: popIn 1.4s cubic-bezier(0.34, 1.56, 0.64, 1) backwards,
               softFloat 5s ease-in-out infinite 1.2s;
}
.landing-content .couple-names {
    font-family: var(--font-hand); font-size: clamp(1.8rem, 5.5vw, 3rem);
    font-weight: 400; letter-spacing: 0.08em;
    color: var(--wedding-gold); display: block; margin-bottom: 18px;
    animation: popIn 1.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s backwards;
}
.landing-content p {
    font-size: clamp(1rem, 3.5vw, 1.25rem); margin-bottom: 30px;
    color: var(--text-dark); opacity: 0.8;
    animation: popIn 1.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s backwards;
}

.no-message {
    font-family: var(--font-fancy); font-size: 1.15rem; font-style: italic;
    color: var(--rose-deep); margin-top: 18px;
    animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) backwards;
    opacity: 0.85;
}

.button-container {
    display: flex; gap: 24px; justify-content: center;
    flex-wrap: wrap; padding: 10px; min-height: 80px;
}

.main-btn {
    width: 160px; padding: 13px 0;
    min-height: 48px;
    display: inline-flex; justify-content: center; align-items: center;
    border-radius: 50px; border: none; font-size: 1.05rem;
    cursor: pointer; font-weight: 700; letter-spacing: 1.5px;
    background: linear-gradient(135deg, var(--wedding-gold), var(--rose-deep));
    color: white;
    box-shadow: 0 10px 28px rgba(90, 26, 32, 0.28);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1); transform-origin: center;
    animation: popIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.45s backwards;
    will-change: transform, box-shadow;
}
.main-btn:hover {
    transform: translateY(-5px) scale(1.04);
    box-shadow: 0 20px 45px rgba(90, 26, 32, 0.38);
    background: linear-gradient(135deg, #b04a58, #3d0f14);
}
.main-btn:active { transform: scale(0.97); }

/* NO / secondary button — ghost outlined style */
.main-btn.secondary {
    background: transparent;
    color: var(--rose-deep);
    border: 2px solid var(--wedding-gold);
    box-shadow: 0 6px 20px rgba(155, 58, 71, 0.2);
}
.main-btn.secondary:hover {
    background: var(--rose-soft);
    border-color: var(--rose-deep);
    color: var(--rose-deep);
    box-shadow: 0 15px 35px rgba(90, 26, 32, 0.2);
    transform: translateY(-5px) scale(1.04);
}

#play-trigger {
    margin: 20px auto;
    animation: fadeInUp 1.2s cubic-bezier(0.23, 1, 0.32, 1);
    text-align: center; z-index: 10; flex: 0 0 auto;
}
.arrow-down {
    font-size: 1.8rem; color: var(--wedding-gold);
    margin-bottom: 10px; animation: bounce 2s infinite ease-in-out;
}

.pulse-play-btn {
    width: 90px; height: 90px; border-radius: 50%;
    background: white; border: 3px solid var(--wedding-gold); color: var(--wedding-gold);
    font-size: 2.4rem; cursor: pointer;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex; justify-content: center; align-items: center; margin: 0 auto;
    box-shadow: 0 10px 28px rgba(155, 58, 71, 0.35); animation: heartbeat 2s infinite;
}
@keyframes heartbeat {
    0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(155, 58, 71, 0.5); }
    15%  { transform: scale(1.06); }
    30%  { transform: scale(1); box-shadow: 0 0 0 22px rgba(155, 58, 71, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(155, 58, 71, 0); }
}
.pulse-play-btn i { margin-left: 5px; }
.pulse-play-btn:hover {
    background: var(--wedding-gold); color: white;
    animation: none; transform: scale(1.12) rotate(360deg);
}

/* =========================================
   8. INVITATION REVEAL SCENE
   ========================================= */
#scene-candle { align-items: center; justify-content: center; }

.reveal-wrapper {
    text-align: center; margin: auto; flex: 0 0 auto;
    animation: softFloat 5s infinite ease-in-out; z-index: 10;
}

.reveal-card {
    width: 230px; height: 290px;
    background: var(--glass);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    cursor: pointer;
    box-shadow: 0 20px 60px rgba(155, 58, 71, 0.3),
                0 0 0 1px rgba(155, 58, 71, 0.2);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: cardGlow 3s infinite ease-in-out;
    margin: 0 auto 22px auto;
    padding: 20px;
}
.reveal-card:hover {
    transform: scale(1.06) translateY(-10px);
    box-shadow: 0 35px 90px rgba(155, 58, 71, 0.55),
                0 0 0 2px rgba(155, 58, 71, 0.4);
}
.reveal-card:active { transform: scale(0.97); }

@keyframes cardGlow {
    0%, 100% { box-shadow: 0 20px 60px rgba(155, 58, 71, 0.3), 0 0 0 1px rgba(155, 58, 71, 0.2); }
    50%       { box-shadow: 0 28px 75px rgba(155, 58, 71, 0.5), 0 0 40px rgba(90, 26, 32, 0.18); }
}

.wax-seal {
    width: 88px; height: 88px;
    background: linear-gradient(135deg, var(--wedding-gold), var(--rose-deep));
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    margin-bottom: 22px;
    box-shadow: 0 10px 30px rgba(155, 58, 71, 0.5);
    animation: sealPulse 2.5s infinite ease-in-out;
}
.wax-seal i { color: white; font-size: 2.4rem; }

@keyframes sealPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 10px 30px rgba(155, 58, 71, 0.5); }
    50%       { transform: scale(1.08); box-shadow: 0 14px 40px rgba(155, 58, 71, 0.7); }
}

.reveal-tagline {
    font-family: var(--font-hand); font-size: 1.35rem; font-weight: 400;
    color: var(--rose-deep); line-height: 1.55; letter-spacing: 0.04em;
    text-align: center;
}

.reveal-hint {
    font-family: var(--font-fancy); font-size: 1rem;
    color: var(--text-dark); opacity: 0.55;
    margin-top: 18px; font-style: italic;
    animation: fadeInUp 1.5s 0.5s backwards cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal-hashtag {
    font-family: var(--font-hand);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--rose-deep);
    letter-spacing: 2.5px;
    margin-top: 12px;
    opacity: 1;
    text-align: center;
}

.fog-layer {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(253, 240, 235, 0.5);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    z-index: 5; transition: opacity 2.5s ease-in-out; opacity: 1; pointer-events: none;
}
.fog-layer.cleared { opacity: 0; }

/* =========================================
   9. GALLERY SCENE
   ========================================= */
#scene-gallery {
    align-items: center; justify-content: flex-start;
    overflow-y: auto; overscroll-behavior-y: contain;
    padding-top: 30px; padding-bottom: 30px;
}

.scene-title {
    font-family: var(--font-hand); font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 400; letter-spacing: 0.04em;
    color: var(--rose-deep); margin: 0 0 18px 0; text-align: center;
    flex: 0 0 auto; animation: popIn 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

@keyframes fadeScaleUp {
    from { transform: translate3d(0, 48px, 0) scale(0.88); }
    to   { transform: translate3d(0, 0, 0) scale(1); }
}

/* Horizontal peek carousel: one photo centred, the next just visible at the
   edge so it reads as swipeable at a glance, with dots below confirming it.
   Native CSS scroll-snap does the work — touch swiping, momentum, and keyboard
   scrolling all come from the browser rather than a carousel library.

   scroll-padding matches the side peek so a snapped slide lands centred.
   Photos are contained rather than cropped: the couple asked to see them in
   full, and a fixed slide height keeps the carousel from jumping between
   portrait and landscape shots. */
.gallery-carousel {
    /* Card width is 80% of the SCREEN, set in viewport units so it means that
       literally. A percentage flex-basis would resolve against this track's
       content box (already reduced by the scene's padding and this element's
       own padding), which is how "86%" ended up measuring 68% of the screen.
       Capped at 400px so it does not become absurd on a desktop window. */
    --card-w: min(80vw, 400px);
    /* The track's real width: the scene pads 20px each side, and the track is
       capped at 480px. Stated explicitly because a percentage padding resolves
       against the containing block, not this element, so it would be wrong at
       the point the max-width kicks in. */
    --track-w: min(480px, 100vw - 40px);

    width: 100%; max-width: 480px; flex: 0 0 auto;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    /* Exactly half the leftover, so the first card sits dead centre at
       scrollLeft 0 instead of hugging the left edge. */
    scroll-padding-inline: calc((var(--track-w) - var(--card-w)) / 2);
    padding: 4px calc((var(--track-w) - var(--card-w)) / 2) 8px;
    margin-bottom: 4px;
    /* Keep the swipe horizontal — without this a diagonal drag scrolls the
       scene vertically and the carousel feels like it is fighting the page. */
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.gallery-carousel::-webkit-scrollbar { display: none; }

/* Each slide is one photo, full-bleed. 80% width leaves the neighbouring card
   peeking at the edge, which is the cue that the strip can be swiped.
   No white matte and no padding: the picture IS the card, edge to edge, the way
   app-switcher cards look. The card's aspect-ratio defines the shape and the
   image fills it. */
.gallery-frame {
    flex: 0 0 var(--card-w);
    /* 3/4 deliberately, not taller: the photos are 0.79, 0.66 and 0.75 wide-to-
       tall, so a taller card would crop the sides of the two wider ones and
       risk clipping an arm or a shoulder out of a couple shot. */
    aspect-ratio: 3 / 4;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    border-radius: 20px; overflow: hidden;
    background: none; padding: 0;
    box-shadow: 0 18px 50px rgba(90, 26, 32, 0.28);
    cursor: pointer; opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, opacity;
}

#scene-gallery.active .gallery-frame:nth-child(1) {
    animation: galleryIn 1.1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}
#scene-gallery.active .gallery-frame:nth-child(2) {
    animation: galleryIn 1.1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s both;
}
#scene-gallery.active .gallery-frame:nth-child(3) {
    animation: galleryIn 1.1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.65s both;
}

/* Lift only, no scale: growing a snapped slide on hover nudges the scroll
   position and the carousel drifts off-centre. */
.gallery-frame:hover {
    box-shadow: 0 28px 65px rgba(90, 26, 32, 0.26);
}

/* cover, so the picture fills the card completely with no empty space around
   it. contain was the mistake in the previous pass — it fitted the photo inside
   the card and left white bars, which is exactly what "it should be full" ruled
   out.
   The cards are 3/4 and the photos are 0.79, 0.66, and 0.75 wide-to-tall, so
   the crop is small: couple3 is exact, couple1 loses a sliver at the sides, and
   couple2 a little top and bottom. object-position keeps that trim off the
   faces. */
.gallery-frame img {
    width: 100%; height: 100%; display: block;
    object-fit: cover;
    object-position: center 30%;
    border-radius: inherit;
}

/* ── Swipe dots ───────────────────────────────────────────────────────────── */
/* Present so the carousel announces itself: without them a static-looking photo
   gives no hint there are two more behind it. */
.gallery-dots {
    display: flex; gap: 8px; justify-content: center;
    flex: 0 0 auto; margin-bottom: 14px;
}

.gallery-dot {
    width: 8px; height: 8px; padding: 0;
    border: none; border-radius: 50%;
    background: rgba(155, 58, 71, 0.28);
    cursor: pointer;
    transition: background 0.3s ease, width 0.3s ease;
}

.gallery-dot.is-active {
    width: 22px; border-radius: 4px;
    background: var(--rose-deep);
}

@keyframes galleryIn {
    from { transform: translate3d(0, 40px, 0) scale(0.9); opacity: 0; }
    to   { transform: translate3d(0, 0, 0) scale(1); opacity: 1; }
}

.next-btn {
    padding: 13px 38px; border-radius: 50px;
    min-height: 48px;
    background: linear-gradient(135deg, var(--wedding-gold), var(--rose-deep));
    color: white; border: none; font-size: 1.1rem; cursor: pointer;
    box-shadow: 0 10px 25px rgba(90, 26, 32, 0.3);
    flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
    margin-top: 10px; transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    font-weight: 700; letter-spacing: 0.5px;
}
.next-btn:hover {
    transform: translateX(5px) scale(1.05);
    background: linear-gradient(135deg, #b04a58, #3d0f14);
    box-shadow: 0 18px 40px rgba(90, 26, 32, 0.4);
}

/* =========================================
   10. LETTER / INVITATION SCENE
   ========================================= */
#scene-letter {
    justify-content: flex-start; align-items: center;
    padding-top: 50px; padding-bottom: 40px;
    overflow-y: auto;
}

.glass-envelope {
    background: var(--glass);
    -webkit-backdrop-filter: blur(25px);
    backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border); border-radius: 22px; padding: 28px 22px;
    max-width: 700px; width: 100%; height: 80vh; max-height: 750px; min-height: 400px;
    display: flex; flex-direction: column; justify-content: space-between;
    box-shadow: 0 20px 65px rgba(155, 58, 71, 0.22);
    margin: 0; animation: popIn 1.2s cubic-bezier(0.23, 1, 0.32, 1) backwards;
    transform-origin: center;
}

/* Order in the markup is: verse first, then the greeting. The spacing below
   reflects that — the verse opens the letter and the greeting follows it. */
.verse-subtitle {
    font-family: var(--font-fancy); font-size: 1.05rem; font-style: italic;
    color: var(--rose-deep); opacity: 0.85;
    text-align: center; margin-bottom: 10px; flex-shrink: 0; line-height: 1.5;
}

.dear-name {
    font-family: var(--font-hand); font-size: 2.2rem; font-weight: 400;
    letter-spacing: 0.05em; color: var(--rose-deep);
    margin-top: 0; margin-bottom: 12px; text-align: center; flex-shrink: 0;
    animation: softFloat 4s infinite ease-in-out;
}

.typewriter-container {
    font-family: var(--font-fancy); font-size: 1.3rem; line-height: 1.75;
    color: var(--text-dark); flex: 1; overflow-y: auto; min-height: 0;
    scroll-behavior: smooth; padding-right: 5px; text-align: center;
    border-bottom: 1px solid rgba(155, 58, 71, 0.18); margin-bottom: 10px;
}
.typewriter-container::-webkit-scrollbar { width: 0px; background: transparent; }

.heavy-names {
    font-weight: 900; font-size: 1.3em;
    color: var(--rose-deep); letter-spacing: 0.04em;
    display: inline-block;
}

.letter-footer {
    display: flex; flex-direction: row; justify-content: space-between;
    align-items: center; padding-top: 10px; flex-shrink: 0; width: 100%;
}
.signature-row { display: flex; flex-direction: column; align-items: flex-start; flex: 1; gap: 6px; }
.signed-name {
    font-family: var(--font-hand); font-size: 1.8rem; color: var(--rose-deep);
    white-space: nowrap; opacity: 0;
    transition: opacity 1.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* The voice-note player (mic badge + animated waveform) was removed along with
   the site's audio — its mp3 was never shipped, so the bars animated over
   silence. Styles deleted with the markup to avoid dead CSS. */

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

/* =========================================
   13. IMAGE MODAL
   ========================================= */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(20, 5, 10, 0.88);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    z-index: 2000; display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1); will-change: opacity;
}
.modal:not(.hidden) { opacity: 1; pointer-events: auto; }

.modal-card {
    position: relative; width: auto; max-width: 90%; max-height: 90vh;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.modal-content {
    max-width: 100%; max-height: 80vh; border-radius: 12px; object-fit: contain;
    box-shadow: 0 25px 70px rgba(0,0,0,0.6);
    transform: scale(0.8) translateY(30px); opacity: 0;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.6s ease;
    will-change: transform, opacity;
}
.modal:not(.hidden) .modal-content { transform: scale(1) translateY(0); opacity: 1; }

.close-modal {
    position: absolute; top: 0; right: -60px; font-size: 3.5rem;
    color: white; padding: 0; line-height: 1; cursor: pointer; z-index: 2001;
    animation: rotateIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) backwards 0.3s;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
@keyframes rotateIn {
    0%   { transform: scale(0) rotate(-180deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.close-modal:hover {
    transform: scale(1.2) rotate(90deg); color: var(--wedding-gold);
    text-shadow: 0 0 25px rgba(255,255,255,0.9);
}
@media (max-width: 600px) { .close-modal { right: 0; top: -50px; } }

/* =========================================
   14. FINALE / COUNTDOWN SCENE
   ========================================= */
#scene-finale { justify-content: center; align-items: center; }

.glass-card {
    background: var(--glass);
    -webkit-backdrop-filter: blur(25px);
    backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 36px 30px; max-width: 580px; width: 100%; margin: auto; flex: 0 0 auto;
    text-align: center;
    box-shadow: 0 22px 65px rgba(155, 58, 71, 0.22),
                0 0 0 1px rgba(155, 58, 71, 0.12);
    animation: popIn 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    position: relative; z-index: 2;
}
.glass-card .countdown-label {
    font-family: var(--font-hand); font-size: 1.8rem; font-weight: 400;
    letter-spacing: 0.04em; color: var(--rose-deep); margin-bottom: 8px;
}
.glass-card .countdown-sub {
    font-family: var(--font-fancy); font-size: 1rem; color: var(--text-dark);
    opacity: 0.6; margin-bottom: 4px; font-style: italic;
}
.countdown-wrapper {
    display: flex; gap: 12px; justify-content: center;
    margin: 28px 0; flex-wrap: wrap;
}
.time-block {
    background: white; padding: 12px 10px; border-radius: 14px; min-width: 68px;
    text-align: center;
    box-shadow: 0 5px 18px rgba(90, 26, 32, 0.12),
                0 0 0 1px rgba(155, 58, 71, 0.1);
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
.time-block:nth-child(1) { animation-delay: 0.1s; }
.time-block:nth-child(2) { animation-delay: 0.2s; }
.time-block:nth-child(3) { animation-delay: 0.3s; }
.time-block:nth-child(4) { animation-delay: 0.4s; }
.time-block span {
    display: block; font-size: 2rem; font-weight: 700;
    background: linear-gradient(135deg, var(--wedding-gold), var(--rose-deep));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.time-block label { font-size: 0.65rem; text-transform: uppercase; color: #999; letter-spacing: 1px; }
.glass-card .venue-details {
    font-family: var(--font-fancy); font-size: 1.1rem; color: var(--text-dark);
    margin-top: 18px; line-height: 1.6;
}
.glass-card .venue-details strong { color: var(--rose-deep); }

/* =========================================
   15. SHARED KEYFRAMES
   ========================================= */
@keyframes popIn {
    0%   { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(15px); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =========================================
   16. RSVP SCENE
   ========================================= */
#scene-rsvp {
    justify-content: flex-start;
    align-items: center;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    padding-top: 40px;
    padding-bottom: 40px;
}

.glass-card.rsvp-card {
    max-width: 520px;
    text-align: left;
    flex: 0 0 auto;
}

.rsvp-heading {
    font-family: var(--font-hand); font-size: 2.2rem; font-weight: 400;
    letter-spacing: 0.05em; color: var(--rose-deep);
    margin-bottom: 8px; text-align: center;
    animation: softFloat 4s ease-in-out infinite;
}

.rsvp-sub {
    font-family: var(--font-fancy); font-size: 1rem; color: var(--text-dark);
    opacity: 0.65; margin-bottom: 26px; text-align: center; font-style: italic;
}

.rsvp-choice-btns {
    display: flex; gap: 14px; justify-content: center;
    flex-wrap: wrap; margin-bottom: 6px;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.rsvp-choice-btns .main-btn {
    font-family: var(--font-fancy);
    font-weight: 600;
    font-style: italic;
    font-size: 1.1rem;
    letter-spacing: 0.4px;
}

/* Expandable form sections — animated via max-height */
.rsvp-section {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.9s cubic-bezier(0.23, 1, 0.32, 1),
                opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}
.rsvp-section.visible {
    max-height: 950px;
    opacity: 1;
    overflow: visible;
}

.rsvp-field {
    margin-bottom: 18px;
}

.rsvp-label {
    display: block; font-family: var(--font-fancy); font-size: 1rem;
    color: var(--rose-deep); margin-bottom: 8px; font-style: italic;
}

.rsvp-input,
.rsvp-textarea {
    width: 100%; padding: 12px 16px; border-radius: 12px;
    border: 1.5px solid rgba(155, 58, 71, 0.35);
    background: rgba(255, 255, 255, 0.85); color: var(--text-dark);
    font-family: var(--font-main); font-size: 0.95rem;
    transition: border-color 0.4s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    outline: none; -webkit-appearance: none; appearance: none;
    box-sizing: border-box;
}
.rsvp-input:focus,
.rsvp-textarea:focus {
    border-color: var(--wedding-gold);
    box-shadow: 0 0 0 3px rgba(155, 58, 71, 0.18);
    background: white;
}

.rsvp-textarea { resize: none; height: 110px; }

/* Validation shake — translate3d keeps animation on compositor */
@keyframes inputShake {
    0%, 100% { transform: translate3d(0, 0, 0); }
    20%, 60%  { transform: translate3d(-6px, 0, 0); }
    40%, 80%  { transform: translate3d(6px, 0, 0); }
}
.rsvp-input.invalid,
.custom-select-trigger.invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(176, 16, 48, 0.15);
    animation: inputShake 0.4s ease;
    will-change: transform;
}

.rsvp-submit-btn {
    width: 100%; padding: 14px; margin-top: 6px;
    min-height: 48px;
    background: linear-gradient(135deg, var(--wedding-gold), var(--rose-deep));
    color: white; border: none; border-radius: 50px;
    font-size: 1rem; font-weight: 700; letter-spacing: 1px; cursor: pointer;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 24px rgba(90, 26, 32, 0.28);
}
.rsvp-submit-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 16px 38px rgba(90, 26, 32, 0.38);
}
.rsvp-submit-btn:active { transform: scale(0.97); }

.rsvp-thanks { text-align: center; padding-top: 6px; }

.rsvp-thanks-icon {
    font-size: 3.2rem; margin-bottom: 14px; display: block;
    animation: popIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.rsvp-thanks-text {
    font-family: var(--font-fancy); font-size: 1.25rem;
    color: var(--rose-deep); font-style: italic; line-height: 1.7;
    white-space: pre-line;
}

.rsvp-next-btn {
    margin: 20px auto 0;
    width: fit-content;
}

/* =========================================
   17. CUSTOM GROUP SELECT DROPDOWN
   ========================================= */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    width: 100%; padding: 12px 16px; border-radius: 12px;
    border: 1.5px solid rgba(155, 58, 71, 0.35);
    background: rgba(255, 255, 255, 0.85); color: var(--text-dark);
    font-family: var(--font-main); font-size: 0.95rem;
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; box-sizing: border-box;
    transition: border-color 0.4s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.4s cubic-bezier(0.23, 1, 0.32, 1),
                background 0.3s ease,
                border-radius 0.2s ease;
    -webkit-user-select: none; user-select: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}
.custom-select-trigger:focus {
    border-color: var(--wedding-gold);
    box-shadow: 0 0 0 3px rgba(155, 58, 71, 0.18);
    background: white;
}
.custom-select-trigger.open {
    border-color: var(--wedding-gold);
    box-shadow: 0 0 0 3px rgba(155, 58, 71, 0.18);
    background: white;
    border-radius: 12px 12px 0 0;
}

.custom-select-display {
    flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.custom-select-display.placeholder { color: rgba(28, 12, 16, 0.4); }

.custom-select-chevron {
    color: var(--wedding-gold); font-size: 1.1rem;
    flex-shrink: 0; margin-left: 8px; display: inline-block;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.custom-select-trigger.open .custom-select-chevron { transform: rotate(180deg); }

.custom-select-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    border: 1.5px solid var(--wedding-gold); border-top: none;
    border-radius: 0 0 12px 12px;
    list-style: none; padding: 4px 0;
    max-height: 260px; overflow-y: auto;
    z-index: 500;
    box-shadow: 0 16px 40px rgba(90, 26, 32, 0.18);
    opacity: 0; transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.22s ease,
                transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.custom-select-menu::-webkit-scrollbar { width: 0; background: transparent; }
.custom-select-menu.open {
    opacity: 1; transform: translateY(0); pointer-events: auto;
}

.custom-select-item {
    padding: 11px 16px;
    font-family: var(--font-main); font-size: 0.95rem; color: var(--text-dark);
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}
.custom-select-item:hover  { background: var(--rose-soft); color: var(--rose-deep); }
.custom-select-item.selected {
    background: var(--rose-soft); color: var(--rose-deep); font-weight: 600;
}

/* =========================================
   18. VENUE GLASS CARD & DIRECTIONS
   ========================================= */
/* transform-only keyframe — opacity via transition to avoid compositor lint */
@keyframes dropIn {
    0%   { transform: translate3d(0, -36px, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

/* Venue card — a second glass card below the countdown */
.venue-glass-card {
    background: var(--glass);
    -webkit-backdrop-filter: blur(25px);
    backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px 28px;
    max-width: 580px; width: 100%;
    flex: 0 0 auto;
    text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    box-shadow: 0 18px 55px rgba(155, 58, 71, 0.2),
                0 0 0 1px rgba(155, 58, 71, 0.1);
    opacity: 0;
    animation: dropIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.35s both;
    transition: opacity 0.7s ease 0.35s;
    will-change: transform, opacity;
}
#scene-finale.active .venue-glass-card { opacity: 1; }

.venue-card-header {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; margin-bottom: 6px;
}
.venue-card-icon {
    font-size: 1.6rem;
    animation: softFloat 4s ease-in-out infinite;
    display: inline-block;
}
.venue-card-title {
    font-family: var(--font-hand); font-size: 1.65rem; font-weight: 400;
    letter-spacing: 0.04em; color: var(--rose-deep);
}

.venue-name-text {
    font-family: var(--font-fancy); font-size: 1.3rem; font-weight: 600;
    color: var(--rose-deep); letter-spacing: 0.3px;
}
.venue-address-text {
    font-family: var(--font-fancy); font-size: 1rem;
    color: var(--text-dark); opacity: 0.72;
    line-height: 1.65; font-style: italic;
}

/* Directions button — fades in with a slight stagger after the card */
.directions-btn {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 14px; padding: 13px 30px;
    min-height: 48px;
    background: white;
    border: 2px solid var(--wedding-gold); border-radius: 50px;
    color: var(--rose-deep); font-size: 0.95rem; font-weight: 700;
    letter-spacing: 0.4px; cursor: pointer;
    box-shadow: 0 6px 20px rgba(155, 58, 71, 0.22);
    opacity: 0;
    animation: dropIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.75s both;
    transition: opacity 0.6s ease 0.75s,
                background 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                color 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, opacity;
    font-family: var(--font-main);
}
#scene-finale.active .directions-btn { opacity: 1; }
.directions-btn:hover {
    background: linear-gradient(135deg, var(--wedding-gold), var(--rose-deep));
    color: white; border-color: transparent;
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 14px 34px rgba(90, 26, 32, 0.3);
}
.directions-btn:active { transform: scale(0.97); }

.calendar-btn {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 4px; padding: 13px 30px;
    min-height: 48px;
    background: linear-gradient(135deg, var(--wedding-gold), var(--rose-deep));
    border: none; border-radius: 50px;
    color: white; font-size: 0.95rem; font-weight: 700;
    letter-spacing: 0.4px; cursor: pointer;
    box-shadow: 0 6px 20px rgba(90, 26, 32, 0.25);
    opacity: 0;
    animation: dropIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 1.05s both;
    transition: opacity 0.6s ease 1.05s,
                background 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, opacity;
    font-family: var(--font-main);
}
#scene-finale.active .calendar-btn { opacity: 1; }
.calendar-btn:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 14px 34px rgba(90, 26, 32, 0.38);
    background: linear-gradient(135deg, #b04a58, #3d0f14);
}
.calendar-btn:active { transform: scale(0.97); }

/* Finale scene: scrollable column with gap between cards */
#scene-finale {
    overflow-y: auto;
    overscroll-behavior-y: contain;
    justify-content: flex-start;
    align-items: center;
    padding-top: 28px;
    padding-bottom: 32px;
    gap: 16px;
}
#scene-finale .glass-card { flex: 0 0 auto; }

/* =========================================
   18. HASHTAG ELEMENTS
   ========================================= */
/* — Letter scene — */
.hashtag-letter {
    font-family: var(--font-hand);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--rose-deep);
    text-align: left;
    letter-spacing: 1.5px;
    opacity: 0.85;
}

/* — Finale scene — */
.hashtag-finale-wrapper {
    flex: 0 0 auto;
    text-align: center;
    width: 100%;
}
.hashtag-finale {
    display: inline-block;
    font-family: var(--font-hand);
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--rose-deep);
    letter-spacing: 3.5px;
    padding: 9px 28px;
    border: 1.5px solid var(--rose-deep);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 0 28px rgba(90, 26, 32, 0.14),
                inset 0 0 14px rgba(255, 255, 255, 0.6);
    opacity: 0;
    transition: opacity 0.9s ease 0.15s;
    will-change: opacity;
}
#scene-finale.active .hashtag-finale { opacity: 1; }

/* =========================================
   20. RESPONSIVE — MOBILE (≤480px)
   ========================================= */
@media (max-width: 480px) {

    /* ----- Base scene ----- */
    .scene { padding: 16px 14px; }

    /* ----- Landing ----- */
    .landing-content h1          { font-size: 2.2rem; }
    .landing-content .couple-names { font-size: 1.7rem; }
    .landing-content p           { font-size: 1rem; margin-bottom: 24px; }
    .button-container            { flex-direction: column; width: 100%; align-items: center; gap: 14px; min-height: unset; }
    .main-btn                    { width: 100%; max-width: 280px; font-size: 1rem; }

    /* ----- Reveal card ----- */
    .reveal-card                 { width: 200px; height: 260px; }
    .wax-seal                    { width: 72px; height: 72px; }
    .wax-seal i                  { font-size: 2rem; }
    .reveal-tagline              { font-size: 1.2rem; }

    /* ----- Gallery ----- */
    .scene-title                 { font-size: 2rem; }
    .gallery-carousel            { max-width: 100%; gap: 10px; }
    .next-btn                    { font-size: 1rem; padding: 13px 28px; width: 100%; justify-content: center; }

    /* ----- Letter ----- */
    #scene-letter                { padding-top: 20px; padding-bottom: 24px; }
    .glass-envelope              { padding: 18px 14px; height: auto; max-height: calc(100dvh - 120px); min-height: unset; }
    .dear-name                   { font-size: 1.7rem; margin-bottom: 8px; }
    .typewriter-container        { font-size: 1.1rem; line-height: 1.65; }
    .signed-name                 { font-size: 1.45rem; }
    .letter-footer               { flex-wrap: wrap; justify-content: center; gap: 10px; }
    .signature-row               { align-items: center; }

    /* ----- Modal ----- */
    .close-modal                 { right: 0; top: -50px; font-size: 2.8rem; }
    .modal-card                  { max-width: 98%; }

    /* ----- Glass cards (general) ----- */
    .glass-card                  { padding: 22px 16px; }

    /* ----- RSVP scene ----- */
    #scene-rsvp                  { padding-top: 24px; padding-bottom: 24px; }
    .rsvp-card                   { padding: 22px 14px; }
    .rsvp-heading                { font-size: 1.9rem; }
    .rsvp-choice-btns            { gap: 10px; }
    /* Prevent iOS Safari auto-zoom on input focus — must be 16px */
    .rsvp-input,
    .rsvp-textarea               { font-size: 16px; padding: 11px 14px; }
    .custom-select-trigger       { font-size: 16px; }
    .custom-select-item          { font-size: 16px; }

    /* ----- Finale scene ----- */
    #scene-finale                { padding-top: 20px; padding-bottom: 24px; gap: 14px; }
    .glass-card .countdown-label { font-size: 1.55rem; }
    .countdown-wrapper           { gap: 8px; margin: 18px 0; }
    .time-block                  { min-width: 58px; padding: 10px 8px; border-radius: 10px; }
    .time-block span             { font-size: 1.75rem; }
    .glass-card .venue-details   { font-size: 1rem; }
    .venue-glass-card            { padding: 20px 14px; gap: 4px; }
    .venue-card-title            { font-size: 1.4rem; }
    .venue-name-text             { font-size: 1.15rem; }
    .venue-address-text          { font-size: 0.95rem; }
    .directions-btn              { padding: 12px 24px; font-size: 0.9rem; width: 100%; justify-content: center; margin-top: 10px; }
    .calendar-btn                { padding: 12px 24px; font-size: 0.9rem; width: 100%; justify-content: center; margin-top: 6px; }

    /* ----- Hashtag ----- */
    .hashtag-finale              { font-size: 1.4rem; padding: 8px 20px; letter-spacing: 2px; }
    .hashtag-letter              { font-size: 1.1rem; }
}

/* =========================================
   19. EXTRA-SMALL PHONES (≤380px)
       Covers iPhone SE, Galaxy A-series, etc.
   ========================================= */
@media (max-width: 380px) {
    .scene                       { padding: 12px 10px; }
    .landing-content h1          { font-size: 1.95rem; }
    .landing-content .couple-names { font-size: 1.5rem; }
    .reveal-card                 { width: 185px; height: 240px; }
    #scene-letter                { padding-top: 14px; }
    .glass-envelope              { padding: 14px 12px; }
    .dear-name                   { font-size: 1.5rem; }
    .typewriter-container        { font-size: 1rem; }
    .time-block                  { min-width: 52px; padding: 8px 6px; }
    .time-block span             { font-size: 1.5rem; }
    .rsvp-heading                { font-size: 1.7rem; }
    .glass-card                  { padding: 18px 12px; }
}

/* =========================================
   20. SAFE-AREA INSETS
       Padding for notched / Dynamic Island iPhones
       and Android phones with gesture bars.
   ========================================= */
@supports (padding: env(safe-area-inset-bottom)) {
    #scene-rsvp   { padding-bottom: max(40px, env(safe-area-inset-bottom)); }
    #scene-finale { padding-bottom: max(32px, env(safe-area-inset-bottom)); }
    #scene-letter { padding-bottom: max(40px, env(safe-area-inset-bottom)); }
}

/* =========================================
   21. POWERED-BY FOOTER LINK
   ========================================= */
.powered-by-link {
    display: block;
    text-align: center;
    color: var(--rose-deep);
    margin-top: 40px;
    font-family: var(--font-fancy);
    font-size: 1.2rem;
    text-decoration: none;
    font-style: italic;
    opacity: 0.8;
    padding-bottom: 20px;
}


/* ─── intl-tel-input — phone field theme overrides ──────────────────────── */
#rsvp-yes-form .iti {
    width: 100%;
}

#rsvp-yes-form .iti__selected-flag {
    background: transparent;
    padding: 0 10px 0 14px;
}

#rsvp-yes-form .iti__selected-flag:hover,
#rsvp-yes-form .iti__selected-flag:focus {
    background: rgba(255, 255, 255, 0.08);
}

#rsvp-yes-form .iti__dropdown-content {
    background: rgba(20, 12, 20, 0.97);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    color: #fff;
    min-width: 260px;
}

#rsvp-yes-form .iti__search-input {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 8px;
    padding: 6px 10px;
    font-family: var(--font-fancy), sans-serif;
    width: calc(100% - 20px);
    margin: 6px 10px;
    box-sizing: border-box;
}

#rsvp-yes-form .iti__search-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

#rsvp-yes-form .iti__country {
    color: #e8d8d8;
    font-family: var(--font-fancy), sans-serif;
    font-size: 0.9rem;
}

#rsvp-yes-form .iti__country:hover,
#rsvp-yes-form .iti__country.iti__highlight {
    background: rgba(255, 255, 255, 0.09);
}

.rsvp-phone-error,
.rsvp-submit-error {
    color: var(--danger, #e07070);
    font-size: 0.78rem;
    margin-top: 6px;
    font-family: var(--font-fancy), sans-serif;
    opacity: 0.9;
}

.rsvp-phone-error.hidden,
.rsvp-submit-error.hidden {
    display: none;
}



/* ── Entry ticket on the confirmation screen ─────────────────────────────── */
/* Deliberately high-contrast: this gets shown to a bouncer on a dim phone at
   night, so the QR sits on plain white and the code is large enough to read
   out loud if the scan will not take. */
.ticket-card {
    text-align: center;
    padding: 20px 18px 22px;
    flex: 0 0 auto;
    margin-bottom: 12px;
}
.ticket-card.hidden { display: none; }

.ticket-label {
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--rose-deep);
    margin: 0 0 12px;
    font-weight: 600;
}

.ticket-qr {
    width: 168px; height: 168px;
    display: block; margin: 0 auto;
    background: #fff;
    padding: 8px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(90, 26, 32, 0.16);
}

/* The code is the fallback when the QR image cannot load — offline, blocked,
   or a slow venue connection — so it is never smaller than the label above it. */
.ticket-code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 1.5rem;
    letter-spacing: 0.18em;
    font-weight: 700;
    color: var(--rose-deep);
    margin: 14px 0 6px;
}

.ticket-hint {
    font-size: 0.78rem;
    color: #8a6d72;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 480px) {
    .ticket-qr   { width: 150px; height: 150px; }
    .ticket-code { font-size: 1.35rem; }
}
