/* Cinematic birthday slideshow — recovered original (celebration.css).
   All selectors scoped to .cine-* to avoid collisions with the invitation site.
   Integration tweaks: fixed overlay, hidden state, visible fullscreen errors,
   replay button and standalone-page body styles retained for reference. */

.cine-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    background: #170b12;
    color: #fff7f3;
    font-family: 'Montserrat', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.cine *,
.cine *::before,
.cine *::after { box-sizing: border-box; }

.cine [hidden],
.cine-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.cine [hidden] { display: none !important; }

.cine {
    --cine-blush: #f7dce4;
    --cine-champagne: #f3e4c8;
    --cine-rose: var(--rosegold);
    --cine-rose-deep: var(--rosegold-dark);
    --cine-amber: #d9965c;
    --cine-green: #6f7a52;
    --cine-plum: #1d0e16;
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 68vh;
    min-height: 340px;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(184, 143, 99, .4);
    border-radius: 24px;
    box-shadow: 0 24px 60px -34px rgba(126, 61, 79, .5);
    background:
        radial-gradient(120% 90% at 15% 0%, rgba(183, 110, 121, .30), transparent 60%),
        radial-gradient(110% 90% at 90% 10%, rgba(243, 228, 200, .16), transparent 55%),
        radial-gradient(90% 80% at 88% 86%, rgba(111, 122, 82, .14), transparent 62%),
        radial-gradient(120% 100% at 50% 120%, rgba(140, 75, 84, .34), transparent 60%),
        linear-gradient(160deg, #241019 0%, #170b12 55%, #10070c 100%);
}

.cine[hidden] { display: none !important; }

.cine.is-fullscreen,
.cine:fullscreen {
    position: fixed !important;
    inset: 0 !important;
    /* Longhands for iOS versions that ignore the inset shorthand. */
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 200;
    width: 100%;
    /* 100vh first, then the iOS safe fallback, then dynamic viewport units
       where supported. No safe-area inset is added to the outer height. */
    height: 100vh;
    height: -webkit-fill-available;
    height: 100svh;
    height: 100dvh;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

/* The fallback expands inside the tab, so the page must not scroll behind it. */
html.cine-fullscreen-active,
html.cine-fullscreen-active body {
    overflow: hidden;
    overscroll-behavior: none;
}

/* ---------- Back / close ---------- */
.cine-back {
    position: absolute;
    z-index: 40;
    top: clamp(14px, 3vw, 26px);
    left: clamp(14px, 3vw, 26px);
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 44px;
    padding: .5rem .95rem;
    border: 1px solid rgba(247, 220, 228, .28);
    border-radius: 999px;
    background: rgba(29, 14, 22, .34);
    backdrop-filter: blur(10px);
    color: var(--cine-blush);
    font-family: inherit;
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .09em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background .25s ease, border-color .25s ease, color .25s ease;
}
.cine-back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cine-back:hover,
.cine-back:focus-visible { background: rgba(183, 110, 121, .35); border-color: rgba(247, 220, 228, .55); color: #fff; }
.cine-back:focus-visible { outline: 2px solid var(--cine-champagne); outline-offset: 3px; }

/* ---------- Ambient light and particles ---------- */
.cine-ambient { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.cine.is-started .cine-ambient { display: none; }
.cine-orb {
    position: absolute;
    display: block;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .5;
    animation: cineOrb 18s ease-in-out infinite alternate;
}
.cine-orb-a { width: 42vw; height: 42vw; left: -12vw; top: -10vw; background: rgba(183, 110, 121, .55); }
.cine-orb-b { width: 34vw; height: 34vw; right: -8vw; top: 18%; background: rgba(243, 228, 200, .30); animation-delay: -6s; }
.cine-orb-c { width: 46vw; height: 46vw; left: 30%; bottom: -22vw; background: rgba(140, 75, 84, .5); animation-delay: -11s; }
@keyframes cineOrb {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(3vw, -2vw, 0) scale(1.08); }
}

.cine-particles { position: absolute; inset: 0; pointer-events: none; z-index: 18; overflow: hidden; }
.cine-particle {
    position: absolute;
    bottom: -12px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff6ea 0%, rgba(243, 228, 200, .8) 40%, rgba(183, 110, 121, 0) 70%);
    opacity: 0;
    animation: cineFloat linear infinite;
}
@keyframes cineFloat {
    0%   { opacity: 0; transform: translate3d(0, 0, 0) scale(.6); }
    12%  { opacity: .9; }
    85%  { opacity: .55; }
    100% { opacity: 0; transform: translate3d(var(--cine-drift, 30px), -105vh, 0) scale(1.15); }
}

/* ---------- Opening screen ---------- */
.cine-intro {
    position: absolute;
    z-index: 20;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 5vw, 4rem);
    text-align: center;
    transition: opacity .9s ease, visibility .9s ease;
}
.cine-intro.is-leaving { opacity: 0; visibility: hidden; pointer-events: none; }

.cine-kicker {
    margin: 0 0 .4rem;
    color: var(--cine-champagne);
    font-size: clamp(.62rem, 1.2vw, .78rem);
    font-weight: 500;
    letter-spacing: .42em;
    text-transform: uppercase;
    opacity: 0;
    animation: cineRise 1.1s ease .15s forwards;
}

.cine-18 {
    margin: 0;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(4.5rem, 15vw, 10rem);
    font-weight: 600;
    line-height: .82;
    letter-spacing: -.03em;
    background: linear-gradient(180deg, #fff8ef 0%, #f3e4c8 38%, #d9a7a0 72%, #b76e79 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 18px 45px rgba(183, 110, 121, .35));
    opacity: 0;
    transform: scale(.9);
    animation: cineNumber 1.8s cubic-bezier(.2, .7, .2, 1) .1s forwards;
}
@keyframes cineNumber {
    0%   { opacity: 0; transform: scale(.86); filter: blur(10px) drop-shadow(0 18px 45px rgba(183, 110, 121, .2)); }
    60%  { opacity: 1; }
    100% { opacity: 1; transform: scale(1); filter: blur(0) drop-shadow(0 18px 45px rgba(183, 110, 121, .35)); }
}

.cine-title {
    margin: .6rem 0 0;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.2rem, 3.2vw, 2.4rem);
    font-weight: 600;
    letter-spacing: .02em;
    color: #fff9f2;
    opacity: 0;
    animation: cineRise 1.2s ease .7s forwards;
}

.cine-subtitle {
    margin: .35rem 0 0;
    font-family: 'Great Vibes', cursive;
    font-size: clamp(1.3rem, 3.2vw, 2.2rem);
    color: var(--cine-blush);
    opacity: 0;
    animation: cineRise 1.2s ease 1s forwards;
}

@keyframes cineRise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Film-reel stage ---------- */
.cine-stage {
    position: absolute;
    inset: 0;
    z-index: 10;
    overflow: hidden;
    background: #120a0f;
    contain: paint;
}

/* Warm light leaks are carried by the backdrop layer so no full-screen
   blended layer sits above the moving film strips. */
.cine-stage::before { content: none; }

/* Fine film grain and dust over the whole reel. */
.cine-stage::after {
    position: absolute;
    inset: 0;
    z-index: 7;
    content: "";
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
    background-size: 180px 180px;
    mix-blend-mode: normal;
    opacity: .05;
}

.cine-backdrops {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.cine-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0;
    transition: opacity 1.25s ease;
    contain: paint;
}
.cine-backdrop.is-active { opacity: 1; z-index: 2; }
.cine-backdrop.is-previous { opacity: 1; transition: none; z-index: 1; }
.cine-backdrop img {
    position: absolute;
    inset: -6%;
    width: 112%;
    height: 112%;
    object-fit: cover;
    filter: blur(12px) saturate(1.15) brightness(.6) sepia(.1);
    transform: scale(1.04);
}
.cine-backdrop::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(112deg, rgba(255, 174, 108, .16) 0%, transparent 26%, transparent 68%, rgba(122, 150, 82, .18) 100%),
        radial-gradient(40% 50% at 3% 16%, rgba(255, 164, 96, .48), transparent 70%),
        radial-gradient(34% 42% at 94% 6%, rgba(255, 218, 158, .38), transparent 70%),
        radial-gradient(46% 58% at 96% 84%, rgba(112, 140, 74, .42), transparent 72%),
        radial-gradient(50% 62% at 4% 94%, rgba(226, 112, 142, .38), transparent 72%),
        linear-gradient(180deg, rgba(18, 10, 15, .38) 0%, rgba(18, 10, 15, .06) 34%, rgba(18, 10, 15, .22) 70%, rgba(18, 10, 15, .72) 100%),
        radial-gradient(110% 95% at 50% 45%, transparent 36%, rgba(18, 10, 15, .58) 100%);
}

/* Decorative vertical and diagonal film strips. */
.cine-reel {
    position: absolute;
    inset: -16%;
    z-index: 3;
    overflow: hidden;
    pointer-events: none;
}

.cine-reel-strip {
    position: absolute;
    width: clamp(124px, 16vw, 230px);
    padding: 24px clamp(24px, 3vw, 32px);
    background: linear-gradient(90deg, #110a06 0%, #2a1a10 9%, #1a100a 50%, #2a1a10 91%, #110a06 100%);
    border-radius: 4px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
    opacity: .5;
    contain: paint;
}

.cine-reel-strip::before,
.cine-reel-strip::after {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    width: clamp(16px, 2vw, 22px);
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='30'%3E%3Crect x='4' y='6' width='14' height='18' rx='3' fill='%23f6e5c4'/%3E%3C/svg%3E");
    background-repeat: repeat-y;
    background-size: 100% 30px;
    opacity: .9;
}
.cine-reel-strip::before { left: 4px; }
.cine-reel-strip::after { right: 4px; }

.cine-reel-strip--left {
    left: 3%;
    top: 50%;
    transform: translateY(-50%) rotate(-12deg);
    opacity: .55;
}
.cine-reel-strip--right {
    right: 3%;
    top: 50%;
    transform: translateY(-50%) rotate(12deg);
    opacity: .48;
}
.cine-reel-strip--center {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-3deg);
    opacity: .28;
}

.cine-reel-track {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0;
    animation: cineReelScroll var(--reel-speed, 100s) linear infinite;
    will-change: transform;
}
.cine-reel-track::after {
    position: absolute;
    inset: 0;
    z-index: 3;
    content: "";
    pointer-events: none;
    background: rgba(78, 42, 24, .14);
}
.cine-reel-strip.is-reverse .cine-reel-track { animation-direction: reverse; }
.cine-reel-run { display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }

.cine-reel-frame {
    display: flex;
    gap: 4px;
    height: clamp(78px, 12vh, 150px);
    padding: 4px;
    overflow: hidden;
    border: 1px solid rgba(247, 228, 194, .16);
    background: #0b0704;
}
.cine-reel-frame.is-tall { height: clamp(110px, 17vh, 220px); }
.cine-reel-frame.is-short { height: clamp(64px, 9vh, 115px); }
.cine-reel-frame img {
    flex: 1 1 0;
    width: 100%;
    height: 100%;
    min-width: 0;
    object-fit: cover;
}

@keyframes cineReelScroll {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(0, -50%, 0); }
}

.cine-slides { position: absolute; inset: 0; z-index: 4; }

/* ---------- Part 1: full-photo film montage ---------- */
.cine-montage {
    position: absolute;
    inset: 0;
    z-index: 6;
    overflow: hidden;
    pointer-events: none;
    opacity: 1;
    transition: opacity 1s ease;
    background:
        radial-gradient(38% 50% at 4% 20%, rgba(255, 170, 108, .30), transparent 70%),
        radial-gradient(42% 52% at 96% 78%, rgba(112, 144, 78, .32), transparent 72%),
        radial-gradient(36% 44% at 86% 8%, rgba(255, 214, 154, .22), transparent 72%),
        radial-gradient(55% 62% at 12% 10%, rgba(255, 166, 104, .24), transparent 70%),
        radial-gradient(52% 62% at 88% 86%, rgba(110, 140, 78, .30), transparent 70%),
        linear-gradient(160deg, rgba(34, 17, 22, .99) 0%, rgba(16, 9, 13, .995) 100%);
}
.cine-montage[hidden] { display: none !important; }
.cine-montage.is-leaving { opacity: 0; }

.cine-montage::after {
    position: absolute;
    inset: 0;
    z-index: 5;
    content: "";
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(18, 10, 15, .32) 0%, transparent 24%, transparent 62%, rgba(18, 10, 15, .78) 100%),
        radial-gradient(120% 100% at 50% 45%, transparent 45%, rgba(18, 10, 15, .36) 100%);
}

.cine-montage-strips {
    position: absolute;
    inset: -10%;
    z-index: 1;
}

.cine-montage-strip {
    position: absolute;
    left: -4%;
    width: 108%;
    padding: 16px 26px;
    overflow: hidden;
    border-radius: 3px;
    background: linear-gradient(180deg, #110a06 0%, #2a1a10 8%, #1a100a 50%, #2a1a10 92%, #110a06 100%);
    box-shadow: 0 20px 55px rgba(0, 0, 0, .5);
    contain: paint;
}
.cine-montage-strip::before,
.cine-montage-strip::after {
    position: absolute;
    right: 0;
    left: 0;
    z-index: 2;
    height: 18px;
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='22'%3E%3Crect x='6' y='4' width='18' height='14' rx='3' fill='%23f6e5c4'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: 30px 100%;
    opacity: .9;
}
.cine-montage-strip::before { top: 0; }
.cine-montage-strip::after { bottom: 0; }

.cine-montage-strip--a { top: 3%; z-index: 2; transform: rotate(-7deg); }
.cine-montage-strip--b { top: 26%; z-index: 3; transform: rotate(5deg); }
.cine-montage-strip--c { top: 49%; z-index: 4; transform: rotate(-4deg); }
.cine-montage-strip--d { top: 72%; z-index: 1; transform: rotate(7deg); opacity: .82; }

.cine-montage-track {
    position: relative;
    display: flex;
    width: max-content;
    padding: 0;
    animation: cineMontageScroll var(--montage-speed, 50s) linear infinite;
    will-change: transform;
}
.cine-montage-track::after {
    position: absolute;
    inset: 0;
    z-index: 3;
    content: "";
    pointer-events: none;
    background: rgba(78, 42, 24, .10);
}
.cine-montage-strip.is-reverse .cine-montage-track { animation-direction: reverse; }
.cine.is-montage:not(.is-playing) .cine-montage-track { animation-play-state: paused; }
.cine-montage-run { display: flex; gap: 8px; padding-right: 8px; }

.cine-montage-frame {
    flex: 0 0 clamp(130px, 16vw, 360px);
    width: clamp(130px, 16vw, 360px);
    aspect-ratio: 4 / 3;
    padding: 4px;
    overflow: hidden;
    border: 1px solid rgba(247, 228, 194, .18);
    background: #0b0704;
}
.cine-montage-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes cineMontageScroll {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-50%, 0, 0); }
}

.cine-montage-copy {
    position: absolute;
    right: 0;
    bottom: clamp(5.8rem, 11.5vh, 7.4rem);
    left: 0;
    z-index: 6;
    padding-inline: 1rem;
    text-align: center;
    text-shadow: 0 4px 24px rgba(18, 10, 15, .8);
}
.cine-montage-kicker {
    margin: 0 0 .2rem;
    color: var(--cine-champagne);
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: clamp(.55rem, 1.1vw, .7rem);
    font-weight: 600;
    letter-spacing: .38em;
    text-transform: uppercase;
}
.cine-montage-title {
    margin: 0;
    color: #fff8f0;
    font-family: 'Great Vibes', cursive;
    font-size: clamp(2rem, 4.3vw, 3.7rem);
    font-weight: 400;
    line-height: 1;
}

.cine.is-montage .cine-hud {
    opacity: 0;
    visibility: hidden;
}

.cine-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.25s ease, visibility 0s linear 1.25s;
}
.cine-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    transition: opacity 1.25s ease, visibility 0s;
}

/* Main solo photo, mounted on its own strip of film and never cropped. */
.cine-hero {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(.55rem, 1.5vh, .95rem);
    padding: clamp(1.6rem, 3.5vh, 2.6rem) clamp(1rem, 4.5vw, 3rem) clamp(6rem, 12vh, 8rem);
}

.cine-hero-reel {
    position: relative;
    display: flex;
    max-width: 100%;
    padding: clamp(13px, 2vh, 19px) clamp(22px, 3vw, 31px);
    border-radius: 3px;
    background: linear-gradient(90deg, #110a06 0%, #2a1a10 7%, #1a100a 50%, #2a1a10 93%, #110a06 100%);
    box-shadow: 0 28px 65px rgba(0, 0, 0, .55), 0 0 0 1px rgba(243, 228, 200, .12);
    transform: rotate(-1.2deg);
    transform-origin: 50% 50%;
}

.cine-hero-reel::before,
.cine-hero-reel::after {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 0;
    width: clamp(16px, 2vw, 22px);
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='30'%3E%3Crect x='4' y='6' width='14' height='18' rx='3' fill='%23f6e5c4'/%3E%3C/svg%3E");
    background-repeat: repeat-y;
    background-size: 100% 30px;
    opacity: .92;
}
.cine-hero-reel::before { left: 4px; }
.cine-hero-reel::after { right: 4px; }

.cine-hero-edge {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 6px;
    color: rgba(231, 184, 112, .68);
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: .38rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
}

.cine-hero-card {
    position: relative;
    z-index: 1;
    display: block;
    max-width: 100%;
    margin: 0;
    padding: clamp(5px, .8vw, 10px);
    background: linear-gradient(150deg, #fcf4e6 0%, #efe1c7 55%, #dcc6a5 100%);
    box-shadow: 0 16px 38px rgba(0, 0, 0, .46), inset 0 0 0 1px rgba(84, 48, 28, .18);
}
.cine-hero-card img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #1a0f0a;
    filter: saturate(.98) contrast(1.02) sepia(.04);
}

.cine-slide.is-active .cine-hero-reel {
    animation: cineHeroIn 1.35s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes cineHeroIn {
    from { transform: translateY(16px) rotate(-2.4deg) scale(.975); }
    to   { transform: translateY(0) rotate(-1.2deg) scale(1); }
}

/* Handwritten paper memory labels, placed below the photo so no face is covered. */
.cine-caption {
    position: relative;
    z-index: 6;
    align-self: center;
    max-width: min(30rem, 82%);
    margin: 0;
    padding: clamp(.5rem, .9vw, .7rem) clamp(.8rem, 1.5vw, 1.1rem) clamp(.45rem, .8vw, .6rem);
    background: linear-gradient(155deg, #fdf7e9 0%, #efe1c6 70%, #e3cfad 100%);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .38), inset 0 0 0 1px rgba(120, 82, 48, .12);
    color: #38231a;
    font-family: 'Caveat', 'Segoe Script', 'Bradley Hand', cursive;
    font-size: clamp(1.15rem, 1.75vw, 1.6rem);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: .01em;
    text-wrap: balance;
    transform: rotate(-2deg);
}
.cine-caption::before {
    position: absolute;
    top: -8px;
    left: 50%;
    width: 58px;
    height: 16px;
    content: "";
    background: rgba(243, 228, 200, .62);
    box-shadow: 0 2px 6px rgba(60, 34, 20, .15);
    transform: translateX(-50%) rotate(1.5deg);
}
.cine-slide.is-active .cine-caption {
    animation: cineCaptionIn .9s ease .45s both;
}
@keyframes cineCaptionIn {
    from { opacity: 0; transform: translateY(8px) rotate(-2.8deg); }
    to   { opacity: 1; transform: translateY(0) rotate(-2deg); }
}

.cine-vignette {
    position: absolute;
    inset: 0;
    z-index: 8;
    pointer-events: none;
    box-shadow: inset 0 0 16vmin rgba(18, 10, 15, .76);
}

/* Graceful image failure */
.cine-slide.is-missing .cine-hero-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: min(58vw, 380px);
    min-height: min(36vh, 260px);
    background:
        radial-gradient(80% 70% at 30% 25%, rgba(243, 228, 200, .22), transparent 60%),
        radial-gradient(90% 80% at 75% 80%, rgba(183, 110, 121, .38), transparent 62%),
        linear-gradient(150deg, #2a1520, #140a10);
}
.cine-slide.is-missing .cine-hero-card img { display: none; }
.cine-slide.is-missing .cine-hero-card::before {
    color: rgba(247, 220, 228, .7);
    font-family: 'Great Vibes', cursive;
    font-size: clamp(1.5rem, 4vw, 2.7rem);
    content: "A cherished memory";
    text-align: center;
}

/* Closing slide */
.cine-slide--closing { display: flex; align-items: center; justify-content: center; text-align: center; }
.cine-slide--closing::after { background: radial-gradient(90% 80% at 50% 45%, rgba(140, 75, 84, .45), transparent 70%); }
.cine-closing-inner { position: relative; z-index: 5; padding: 2rem; max-width: 46rem; }
.cine-closing-kicker {
    margin: 0 0 .7rem;
    color: var(--cine-champagne);
    font-size: clamp(.6rem, 1.2vw, .75rem);
    font-weight: 500;
    letter-spacing: .4em;
    text-transform: uppercase;
}
.cine-closing-title {
    margin: 0;
    font-family: 'Great Vibes', cursive;
    font-size: clamp(1.8rem, 5vw, 3.6rem);
    font-weight: 400;
    line-height: 1.1;
    color: #fff8f0;
    text-shadow: 0 10px 40px rgba(140, 75, 84, .6);
}
.cine-closing-sub {
    margin: 1rem 0 0;
    color: var(--cine-blush);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1rem, 2.2vw, 1.3rem);
    letter-spacing: .16em;
    text-transform: uppercase;
}
/* ---------- HUD ---------- */
.cine-hud {
    position: absolute;
    z-index: 30;
    top: clamp(16px, 3vw, 28px);
    left: 50%;
    width: min(70%, 480px);
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .55rem;
    pointer-events: none;
    transition: opacity .35s ease, visibility .35s ease;
}
.cine-counter {
    color: var(--cine-champagne);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(.85rem, 1.8vw, 1.05rem);
    letter-spacing: .28em;
}
.cine-counter-sep { margin: 0 .35rem; opacity: .45; }
.cine-progress {
    width: 100%;
    height: 2px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(247, 220, 228, .22);
}
.cine-progress-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--cine-rose), var(--cine-champagne));
    transition: width .5s ease;
}

/* ---------- Controls ---------- */
.cine-controls {
    position: absolute;
    z-index: 35;
    right: 0;
    bottom: .65rem;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .45rem;
    width: fit-content;
    max-width: calc(100% - 1.5rem);
    margin-inline: auto;
    padding: .5rem .65rem;
    border: 1px solid rgba(247, 220, 228, .22);
    border-radius: 999px;
    background: rgba(24, 12, 19, .55);
    backdrop-filter: blur(14px);
    box-shadow: 0 14px 44px rgba(0, 0, 0, .35);
    transform: none;
}

.cine-btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 50%;
    background: transparent;
    color: #f7e9ee;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .2s ease, border-color .2s ease;
}
.cine-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cine-btn:hover { background: rgba(247, 220, 228, .14); }
.cine-btn:focus-visible { outline: 2px solid var(--cine-champagne); outline-offset: 2px; }
.cine-btn-main {
    background: linear-gradient(130deg, rgba(183, 110, 121, .95), rgba(140, 75, 84, .95));
    border-color: rgba(243, 228, 200, .35);
}
.cine-btn-main:hover { background: linear-gradient(130deg, #c07b86, #9a5560); }
.cine-controls-divider { width: 1px; height: 26px; margin: 0 .2rem; background: rgba(247, 220, 228, .22); }

.cine-i-play, .cine-i-music-on, .cine-i-collapse { display: none; }
.cine.is-playing #cine-play .cine-i-pause { display: none; }
.cine.is-playing #cine-play .cine-i-play { display: block; }
.cine.is-music-on #cine-music .cine-i-music-off { display: none; }
.cine.is-music-on #cine-music .cine-i-music-on { display: block; }
.cine.is-fullscreen #cine-full .cine-i-expand { display: none; }
.cine.is-fullscreen #cine-full .cine-i-collapse { display: block; }

/* Visible fullscreen diagnostic (status is otherwise screen-reader-only). */
.cine-status-visible {
    position: absolute !important;
    z-index: 50;
    left: 50% !important;
    bottom: clamp(6.5rem, 15vh, 9rem) !important;
    width: min(92vw, 40rem) !important;
    height: auto !important;
    margin: 0 !important;
    padding: .7rem 1rem !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    border: 1px solid rgba(247, 220, 228, .35) !important;
    border-radius: 10px;
    background: rgba(24, 12, 19, .85);
    color: #f7dce4;
    font-size: .72rem;
    line-height: 1.45;
    text-align: center;
    transform: translateX(-50%);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .cine { aspect-ratio: 4 / 5; max-height: 74vh; min-height: 400px; border-radius: 18px; }
    .cine-controls { gap: .25rem; padding: .4rem .45rem; }
    .cine-btn { width: 44px; height: 44px; }
    .cine-controls-divider { margin: 0 .1rem; }
    .cine-hud { width: 82%; }

    .cine-hero { padding: 1.6rem 1rem 5.9rem; gap: .55rem; }
    .cine-hero-reel { padding: 13px 18px; }
    .cine-hero-reel::before,
    .cine-hero-reel::after { width: 16px; background-size: 100% 22px; }
    .cine-hero-reel::before { left: 2px; }
    .cine-hero-reel::after { right: 2px; }
    .cine-hero-edge { right: 2px; font-size: .28rem; }
    .cine-hero-card { padding: 6px; }

    .cine-caption {
        align-self: center;
        max-width: 86%;
        margin-left: 0;
        padding: .5rem .75rem .45rem;
        font-size: 1.08rem;
    }

    .cine-backdrop img { filter: blur(14px) saturate(1.18) brightness(.58) sepia(.1); }
    .cine-reel { inset: -10%; }
    .cine-reel-strip { filter: blur(2px); }
    .cine-reel-strip--left { left: 0; width: 33vw; opacity: .36; }
    .cine-reel-strip--right { right: 0; width: 33vw; opacity: .31; }
    .cine-reel-strip--center { display: none; }

    .cine-montage-frame { flex-basis: clamp(110px, 32vw, 150px); width: clamp(110px, 32vw, 150px); }
    .cine-montage-track { padding: 14px 20px; }
    .cine-montage-strip::before,
    .cine-montage-strip::after { height: 14px; }
    .cine-montage-strip--a { top: 2%; }
    .cine-montage-strip--b { top: 26%; }
    .cine-montage-strip--c { top: 50%; }
    .cine-montage-strip--d { top: 74%; }
    .cine-montage-copy { bottom: 5.6rem; }
    .cine-montage-title { font-size: clamp(1.7rem, 7vw, 2.4rem); }
    .cine-montage-kicker { font-size: .52rem; }

    .cine-18 { font-size: clamp(4rem, 28vw, 8rem); }
    .cine-closing-title { font-size: clamp(1.6rem, 7vw, 2.6rem); }
}

@media (max-height: 560px) {
    .cine-hero { padding: 1.2rem 1rem 4.9rem; gap: .4rem; }
    .cine-caption { max-width: 72%; font-size: .98rem; padding: .4rem .65rem .35rem; }
    .cine-reel-strip--center { display: none; }
    .cine-controls { bottom: .55rem; }
    .cine-btn { width: 40px; height: 40px; }
    .cine-hud { top: 10px; }
    .cine-18 { font-size: clamp(3.5rem, 18vh, 7rem); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .cine *,
    .cine *::before,
    .cine *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    .cine-orb, .cine-particle { display: none; }
    .cine-stage::before { animation: none !important; opacity: .8; }
    .cine-reel-track { animation: none !important; transform: translate3d(0, -6%, 0); }
    .cine-montage { transition: none; }
    .cine-montage-track { animation: none !important; transform: none; }
    .cine-slide.is-active .cine-hero-reel { animation: none !important; opacity: 1; transform: rotate(-1.2deg); }
    .cine-slide.is-active .cine-caption { animation: none !important; opacity: 1; transform: rotate(-2deg); }
    .cine-intro { transition: none; }
}

/* ---------- Fullscreen scaling ---------- */
.cine.is-fullscreen .cine-18 { font-size: clamp(8rem, 34vw, 22rem); }
.cine.is-fullscreen .cine-title { font-size: clamp(1.7rem, 4.6vw, 3.4rem); }
.cine.is-fullscreen .cine-subtitle { font-size: clamp(1.6rem, 4vw, 2.6rem); }
.cine.is-fullscreen .cine-hud { width: min(78vw, 620px); }
.cine.is-fullscreen .cine-hero { padding: 3rem clamp(1.5rem, 5vw, 4rem) 6rem; gap: 1rem; }
.cine.is-fullscreen .cine-caption { max-width: min(38rem, 70%); font-size: clamp(1.4rem, 1.8vw, 2.1rem); }
.cine.is-fullscreen .cine-reel-strip { width: clamp(180px, 12vw, 320px); }
.cine.is-fullscreen .cine-reel-frame { height: clamp(110px, 10vh, 260px); }
.cine.is-fullscreen .cine-reel-frame.is-tall { height: clamp(150px, 14vh, 340px); }
.cine.is-fullscreen .cine-reel-frame.is-short { height: clamp(90px, 8vh, 210px); }
.cine.is-fullscreen .cine-montage-frame { flex-basis: clamp(180px, 13vw, 480px); width: clamp(180px, 13vw, 480px); }
.cine.is-fullscreen .cine-montage-title { font-size: clamp(3rem, 5vw, 5rem); }
.cine.is-fullscreen .cine-montage-copy { bottom: 6rem; }
.cine.is-fullscreen .cine-closing-title { font-size: clamp(2.4rem, 7vw, 5rem); }

/* While requesting or in fullscreen, neutralise the retained transform that the
   stepReveal animation leaves on the invitation step (a containing block). */
html.cine-fullscreen-pending #step-invitation,
html.cine-fullscreen-active #step-invitation,
html.cine-fullscreen-pending .site-main,
html.cine-fullscreen-active .site-main,
html.cine-fullscreen-pending body,
html.cine-fullscreen-active body {
    transform: none !important;
    animation: none !important;
    filter: none !important;
    will-change: auto !important;
}

/* Keep full-screen controls inside the iPhone notch/home-indicator insets. */
.cine.is-fullscreen .cine-back {
    top: calc(clamp(14px, 3vw, 26px) + env(safe-area-inset-top, 0px));
    left: calc(clamp(14px, 3vw, 26px) + env(safe-area-inset-left, 0px));
}

.cine.is-fullscreen .cine-hud {
    top: calc(clamp(16px, 3vw, 28px) + env(safe-area-inset-top, 0px));
}

.cine.is-fullscreen .cine-controls {
    bottom: calc(.65rem + env(safe-area-inset-bottom, 0px));
    max-width: calc(100% - 1.5rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
}

.cine.is-fullscreen .cine-hero {
    padding-top: calc(3rem + env(safe-area-inset-top, 0px));
    padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px));
}

.cine.is-fullscreen .cine-montage-copy {
    bottom: calc(6rem + env(safe-area-inset-bottom, 0px));
}

.cine.is-fullscreen .cine-status-visible {
    bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px));
}
