:root {
    --cream: #fff8f1;
    --soft-white: #fffdf9;
    --gold: #c8a96a;
    --light-gold: #ead9ad;
    --rose: #d9a6a1;
    --blush: #f6d9d5;
    --brown: #3b2f2f;
    --muted: #8a6f5a;
    --deep-rose: #8f4f5b;
    --shadow: rgba(80, 50, 30, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 10% 10%, rgba(246, 217, 213, 0.55), transparent 28%),
        radial-gradient(circle at 90% 20%, rgba(234, 217, 173, 0.55), transparent 25%),
        linear-gradient(180deg, var(--cream), #fffaf5);
    color: var(--brown);
    font-family: Georgia, "Times New Roman", serif;
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    font-size: clamp(3rem, 10vw, 7rem);
    line-height: 0.95;
    margin-bottom: 18px;
    font-weight: 400;
}

h2 {
    font-size: clamp(2rem, 6vw, 4rem);
    line-height: 1.05;
    font-weight: 400;
    margin-bottom: 20px;
}

h3 {
    margin-bottom: 8px;
}

p {
    font-size: clamp(1rem, 2.6vw, 1.22rem);
    line-height: 1.75;
}

.section {
    padding: clamp(54px, 8vw, 92px) 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.section.hero {
    min-height: 100vh;
    padding: 80px 20px;
}

.section-inner {
    width: min(980px, 100%);
    margin: 0 auto;
}

.card {
    background: rgba(255, 253, 249, 0.88);
    border: 1px solid var(--light-gold);
    border-radius: 32px;
    box-shadow: 0 24px 70px var(--shadow);
    padding: clamp(28px, 6vw, 64px);
    backdrop-filter: blur(10px);
}

.kicker {
    color: var(--gold);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.78rem;
    margin-bottom: 12px;
}

.muted {
    color: var(--muted);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
    justify-content: center;
}

.btn {
    border: 1px solid var(--gold);
    background: var(--gold);
    color: #fff;
    border-radius: 999px;
    padding: 13px 22px;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        background 180ms ease,
        border-color 180ms ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(150, 110, 55, 0.22);
}

.btn-outline {
    background: transparent;
    color: var(--brown);
}

.btn-soft {
    background: var(--blush);
    color: var(--brown);
    border-color: var(--rose);
}

/* =========================================================
   Envelope screen
   ========================================================= */

.envelope-screen {
    position: fixed;
    inset: 0;
    z-index: 9990;
    background:
        radial-gradient(circle at center, rgba(255, 255, 255, 0.9), rgba(255, 248, 241, 0.96)),
        linear-gradient(180deg, var(--cream), #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        opacity 720ms ease,
        visibility 720ms ease;
}

.envelope-screen.opened {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.envelope-wrap {
    width: min(560px, 94vw);
    margin: 0 auto;
    text-align: center;
}

.envelope-wrap > .kicker,
.envelope-wrap > h2,
.envelope-wrap > p,
.open-invite {
    transition: opacity 420ms ease;
}

.envelope-screen.morphing .envelope-wrap > .kicker,
.envelope-screen.morphing .envelope-wrap > h2,
.envelope-screen.morphing .envelope-wrap > p,
.envelope-screen.morphing .open-invite {
    opacity: 0;
}

.open-invite {
    margin-top: 10px;
}

/* =========================================================
   Envelope shell
   Layer order:
   back layer > letter > front layer > flap
   ========================================================= */

.envelope-v2 {
    --env-w: min(501px, 90vw);
    --env-h: 342px;
    --pocket-top: 112px;
    --pocket-h: 230px;
    --radius: 26px;
    --letter-scale: 0.52;

    width: var(--env-w);
    height: var(--env-h);
    position: relative;
    margin: 0 auto 30px;
    cursor: pointer;
    perspective: 1400px;
    transform-style: preserve-3d;
    background: transparent;
    border: 0;
    box-shadow: none;

    /*
       Important trick:
       allow letter to go above envelope,
       but clip anything that leaks below the envelope.
    */
    clip-path: inset(-400px 0 0 0);
}

.envelope-v2 .envelope-back {
    position: absolute;
    left: 0;
    top: var(--pocket-top);
    width: 100%;
    height: var(--pocket-h);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 251, 251, 0.98), rgba(249, 220, 220, 0.98));
    border: 1px solid rgba(143, 79, 91, 0.18);
    z-index: 1;
}

.envelope-v2 .envelope-body {
    position: absolute;
    left: 0;
    top: var(--pocket-top);
    width: 100%;
    height: var(--pocket-h);
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
    z-index: 8;
    border: 1px solid rgba(143, 79, 91, 0.18);
    border-top: 0;
    pointer-events: none;
    background:
        linear-gradient(35deg, transparent 49.5%, rgba(214, 151, 151, 0.42) 50%, transparent 50.5%),
        linear-gradient(-35deg, transparent 49.5%, rgba(214, 151, 151, 0.42) 50%, transparent 50.5%),
        linear-gradient(180deg, rgba(255, 246, 246, 0.98), rgba(241, 198, 198, 0.98));
    background-size: 50% 100%, 50% 100%, 100% 100%;
    background-position: left top, right top, center;
    background-repeat: no-repeat;
    clip-path: polygon(0 0, 50% 44%, 100% 0, 100% 100%, 0 100%);
}

.envelope-v2 .envelope-flap {
    position: absolute;
    left: 0;
    top: var(--pocket-top);
    width: 100%;
    height: var(--pocket-h);
    clip-path: polygon(0 0, 100% 0, 50% 63%);
    border: 1px solid rgba(143, 79, 91, 0.16);
    background:
        linear-gradient(160deg, rgba(255, 242, 242, 1), rgba(232, 180, 180, 1));
    transform-origin: 50% 0%;
    transform: rotateX(0deg);
    backface-visibility: visible;
    z-index: 10;
    box-shadow: 0 10px 28px rgba(80, 45, 45, 0.08);
    transition:
        transform 1150ms cubic-bezier(.16, .82, .18, 1),
        box-shadow 1150ms ease,
        z-index 0ms linear 1150ms;
}

.envelope-v2 .envelope-flap::after {
    content: "";
    position: absolute;
    inset: 0;
    clip-path: inherit;
    background:
        linear-gradient(160deg, rgba(255, 250, 250, 1), rgba(246, 211, 211, 1));
    opacity: 0.72;
    transform: translateZ(-1px);
}

.envelope-v2.open .envelope-flap {
    transform: rotateX(178deg) translateY(-2px);
    box-shadow: none;
    z-index: 2;
}

/* Hide all old letter systems */
.envelope-letter-clone,
.envelope-v2 .envelope-card,
.envelope-v2 .envelope-mini-hero,
.envelope-v2 .mini-letter-photo,
.envelope-v2 .mini-hero-photo,
.envelope-v2 .mini-hero-content {
    display: none !important;
}

/* The real letter: cloned hero card inside envelope, between back/front */
.envelope-v2 .envelope-live-letter {
    position: absolute;
    left: 50%;
    top: calc(var(--pocket-top) + 10px);
    transform-origin: top center;
    z-index: 4;
    opacity: 0;
    pointer-events: none;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 22px 70px rgba(80, 45, 45, 0.22);
    transition:
        transform 2550ms cubic-bezier(.16, .9, .18, 1),
        opacity 360ms ease;
}

.envelope-v2.reveal-letter .envelope-live-letter {
    opacity: 1;
}

/* Fixed card takes over after the letter comes out */
.envelope-fixed-letter {
    position: fixed;
    margin: 0;
    pointer-events: none;
    transform-origin: center center;
    z-index: 99999;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 26px 80px rgba(80, 45, 45, 0.24);
    transition:
        transform 2200ms cubic-bezier(.16, .9, .18, 1),
        opacity 260ms ease;
}

.envelope-fixed-letter .button-row,
.envelope-v2 .envelope-live-letter .button-row {
    pointer-events: none;
}

/* Real hero stays hidden until overlay disappears */
.envelope-screen:not(.opened) ~ main [data-real-hero-card] {
    visibility: hidden;
}

.envelope-screen.opened ~ main [data-real-hero-card] {
    visibility: visible;
}

/* =========================================================
   Hero and photo cards
   ========================================================= */

.hero {
    min-height: 100vh;
    background:
        linear-gradient(rgba(255, 248, 241, 0.42), rgba(255, 248, 241, 0.74)),
        url("/static/images/hero-placeholder.jpg");
    background-size: cover;
    background-position: center;
    text-align: center;
}

.hero-card {
    max-width: 760px;
    margin: 0 auto;
}

.initials-logo {
    display: none !important;
}

.date-line {
    color: var(--muted);
    font-size: clamp(1.1rem, 3vw, 1.55rem);
}

.photo-card {
    padding: 0 !important;
    overflow: hidden;
    background: var(--soft-white);
}

.photo-card-media {
    position: relative;
    width: 100%;
    height: clamp(250px, 42vw, 440px);
    overflow: hidden;
    border-radius: 32px 32px 0 0;
    background: var(--soft-white);
}

.photo-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.photo-card-media::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 48%;
    background: linear-gradient(
        to bottom,
        rgba(255, 253, 249, 0) 0%,
        rgba(255, 253, 249, 0.75) 55%,
        var(--soft-white) 100%
    );
    pointer-events: none;
}

.photo-card-content {
    position: relative;
    z-index: 2;
    margin-top: clamp(-86px, -8vw, -48px);
    padding: clamp(34px, 6vw, 64px);
    padding-top: clamp(76px, 10vw, 125px);
    text-align: center;
}

.photo-card--compact .photo-card-media {
    height: clamp(210px, 34vw, 330px);
}

.photo-card--compact .photo-card-content {
    margin-top: -64px;
    padding-top: 86px;
}

.photo-card--venue .photo-card-media img {
    object-position: center center;
}

.photo-card--rsvp .photo-card-media {
    height: clamp(220px, 36vw, 360px);
}

/* =========================================================
   Countdown
   ========================================================= */

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 28px;
}

.countdown-box {
    border: 1px solid var(--light-gold);
    border-radius: 22px;
    padding: 20px 10px;
    background: rgba(255, 255, 255, 0.52);
}

.countdown-number {
    display: block;
    font-size: clamp(2rem, 8vw, 4rem);
    color: var(--gold);
}

.countdown-label {
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

/* =========================================================
   Timeline
   ========================================================= */

.timeline {
    display: grid;
    gap: 16px;
    margin-top: 28px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 18px;
    align-items: start;
    padding: 18px;
    border: 1px solid rgba(200, 169, 106, 0.45);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.45);
    cursor: default;
    transition:
        transform 180ms ease,
        background-color 180ms ease,
        box-shadow 180ms ease,
        border-color 180ms ease;
}

.timeline-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 247, 247, 0.82);
    box-shadow: 0 14px 34px rgba(80, 45, 45, 0.10);
    border-color: rgba(143, 79, 91, 0.18);
}

.timeline-time {
    color: var(--gold);
    font-weight: bold;
    transition: transform 180ms ease, color 180ms ease;
}

.timeline-item:hover .timeline-time {
    transform: scale(1.04);
    color: var(--rose);
}

/* =========================================================
   Dress code
   ========================================================= */

.palette {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
    justify-content: center;
}

.swatch {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 1px solid var(--light-gold);
    box-shadow: 0 10px 20px rgba(80, 50, 30, 0.08);
}

.swatch.cream { background: #fff8f1; }
.swatch.gold { background: #c8a96a; }
.swatch.rose { background: #d9a6a1; }
.swatch.blush { background: #f6d9d5; }
.swatch.brown { background: #3b2f2f; }

/* =========================================================
   Guestbook
   ========================================================= */

.message-grid {
    display: grid;
    gap: 16px;
    margin-top: 26px;
}

.message-bubble {
    background: #fff;
    border: 1px solid rgba(200, 169, 106, 0.45);
    border-radius: 26px 26px 26px 8px;
    padding: 18px 20px;
    box-shadow: 0 10px 24px rgba(80, 50, 30, 0.08);
}

.message-name {
    color: var(--gold);
    font-weight: bold;
    margin-bottom: 6px;
}

.message-empty {
    text-align: center;
    border-radius: 24px;
}

/* =========================================================
   Media wall
   ========================================================= */

.media-wall {
    column-count: 3;
    column-gap: 18px;
    margin-top: 22px;
}

.media-card {
    display: inline-block;
    width: 100%;
    margin: 0 0 18px;
    break-inside: avoid;
    border-radius: 24px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(140, 95, 95, 0.14);
    box-shadow: 0 18px 45px rgba(80, 45, 45, 0.10);
}

.media-frame {
    width: 100%;
    background: rgba(255, 247, 247, 0.75);
}

.media-frame img,
.media-frame video {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    display: block;
    border-radius: 0;
}

.video-wrap {
    width: 100%;
}

.video-wrap video {
    width: 100% !important;
    height: auto !important;
    max-height: 75vh !important;
    object-fit: contain !important;
    display: block;
    background: #111;
}

.media-card-text {
    padding: 13px 15px 15px;
}

.media-card-text p {
    margin: 0 0 5px;
    line-height: 1.45;
}

.media-card-text small {
    opacity: 0.7;
}

.media-wall > .muted,
#memories .media-wall > .muted {
    display: block;
    width: 100%;
    column-span: all;
    text-align: center;
    margin: 18px auto 0;
    opacity: 0.75;
}

.media-lightbox,
.media-open-link,
.media-open-button,
.media-lightbox-backdrop,
.media-lightbox-panel {
    display: none !important;
}

/* =========================================================
   Petals and sparkles
   ========================================================= */

.petal-layer,
.sparkle-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 3;
}

.petal {
    position: absolute;
    top: -30px;
    width: 16px;
    height: 10px;
    background: rgba(217, 166, 161, 0.75);
    border-radius: 60% 10% 60% 10%;
    animation: fall linear infinite;
}

.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(200, 169, 106, 0.75);
    animation: twinkle ease-in-out infinite;
}

@keyframes fall {
    to {
        transform: translateY(110vh) rotate(280deg);
    }
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.15;
        transform: scale(0.8);
    }

    50% {
        opacity: 0.9;
        transform: scale(1.5);
    }
}

/* =========================================================
   Placeholder / footer
   ========================================================= */

.placeholder-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    text-align: center;
}

.site-footer {
    padding: 34px 18px 46px;
    text-align: center;
    color: var(--muted);
    font-size: 0.98rem;
    background: rgba(255, 248, 241, 0.76);
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {
    .media-wall {
        column-count: 2;
    }
}

@media (max-width: 720px) {
    .section {
        padding: 48px 16px;
    }

    .section.hero {
        min-height: 100vh;
        padding: 64px 16px;
    }

    h1 {
        font-size: clamp(2.7rem, 14vw, 5rem);
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .countdown-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .button-row {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .photo-card-media {
        height: 285px;
    }

    .photo-card-content {
        margin-top: -64px;
        padding: 28px 22px 36px;
        padding-top: 88px;
    }

    .photo-card--compact .photo-card-media,
    .photo-card--rsvp .photo-card-media {
        height: 250px;
    }
}

@media (max-width: 600px) {
    .media-wall {
        column-count: 1;
    }
}

@media (max-width: 560px) {
    .envelope-v2 {
        --env-w: min(405px, 89vw) !important;
        --env-h: 294px !important;
        --pocket-top: 98px !important;
        --pocket-h: 195px !important;
        --radius: 22px !important;
        --letter-scale: 0.68 !important;
        clip-path: inset(-400px 0 0 0) !important;
    }

    .envelope-wrap {
        width: min(430px, 94vw);
    }
}

/* Final envelope back layer corner fix */
.envelope-v2 .envelope-back {
    border-radius: 0 0 var(--radius) var(--radius) !important;
}

/* Hide side scrollbar but keep scrolling */
html {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

html,
body {
    overflow-x: hidden;
}

/* Schedule break between afternoon ceremony and evening celebration */
.schedule-break {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 4px 0;
    color: var(--muted);
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.72;
}

.schedule-break::before,
.schedule-break::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(200, 169, 106, 0.7),
        transparent
    );
}

.schedule-break span {
    white-space: nowrap;
}

/* Upload button disabled state */
button.is-uploading,
input.is-uploading {
    opacity: 0.72;
    cursor: wait !important;
    pointer-events: none;
}

/* Upload submitting state */
button.is-uploading,
input.is-uploading {
    opacity: 0.72;
    cursor: wait !important;
    pointer-events: none;
}

.uploading-note {
    margin-top: 14px;
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Wedding livestream page */
.live-page {
    min-height: 100vh;
}

.live-section {
    padding-top: 48px;
}

.live-video-wrap {
    position: relative;
    width: min(100%, 980px);
    margin: 28px auto 0;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(70, 35, 45, 0.18);
    background: #111;
}

.live-video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.live-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.live-placeholder-card {
    width: min(100%, 720px);
    margin: 28px auto 0;
    padding: 34px 24px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 20px 60px rgba(70, 35, 45, 0.12);
    text-align: center;
}

.live-placeholder-card h2 {
    margin-bottom: 10px;
}

/* Wedding-day livestream promo card */
.live-promo-section {
    padding-top: 18px;
    padding-bottom: 18px;
}

.live-wedding-card {
    width: min(100%, 760px);
    margin: 0 auto;
    padding: 30px 24px;
    border-radius: 30px;
    text-align: center;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 22px 65px rgba(70, 35, 45, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.72);
}

.live-wedding-card h2 {
    margin: 6px 0 10px;
}

.live-wedding-card p:not(.eyebrow) {
    max-width: 560px;
    margin: 0 auto 20px;
}

/* Final wedding-day livestream card */
.live-promo-section {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
}

.live-wedding-card {
    width: min(100%, 760px) !important;
    margin: 0 auto !important;
    padding: 34px 26px !important;
    border-radius: 30px !important;
    text-align: center !important;
}

.live-wedding-card-inner {
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.live-wedding-card h2 {
    margin: 6px 0 12px !important;
}

.live-wedding-card p:not(.eyebrow) {
    margin: 0 auto 22px !important;
    text-align: center !important;
}

.live-card-button-row {
    justify-content: center !important;
    width: 100%;
    margin-top: 4px;
}

/* Final livestream card button/title sizing */
.live-wedding-card .eyebrow {
    font-size: 0.72rem !important;
    letter-spacing: 0.14em !important;
}

.live-wedding-card h2 {
    font-size: clamp(1.35rem, 4vw, 2rem) !important;
    line-height: 1.15 !important;
    margin-bottom: 10px !important;
}

.live-wedding-card p:not(.eyebrow) {
    font-size: 0.98rem !important;
}

.live-wedding-card .btn,
.live-wedding-card .btn.primary {
    background: #b91c1c !important;
    color: #fff !important;
    border-color: #b91c1c !important;
    font-size: 1.12rem !important;
    padding: 15px 34px !important;
    min-width: 190px !important;
    border-radius: 999px !important;
    box-shadow: 0 14px 32px rgba(185, 28, 28, 0.28) !important;
}

.live-wedding-card .btn:hover,
.live-wedding-card .btn.primary:hover {
    background: #991b1b !important;
    border-color: #991b1b !important;
    transform: translateY(-1px);
}

/* Final livestream card button/title sizing */
.live-wedding-card .eyebrow {
    font-size: 0.72rem !important;
    letter-spacing: 0.14em !important;
}

.live-wedding-card h2 {
    font-size: clamp(1.35rem, 4vw, 2rem) !important;
    line-height: 1.15 !important;
    margin-bottom: 10px !important;
}

.live-wedding-card p:not(.eyebrow) {
    font-size: 0.98rem !important;
}

.live-wedding-card .btn,
.live-wedding-card .btn.primary {
    background: #b91c1c !important;
    color: #fff !important;
    border-color: #b91c1c !important;
    font-size: 1.12rem !important;
    padding: 15px 34px !important;
    min-width: 190px !important;
    border-radius: 999px !important;
    box-shadow: 0 14px 32px rgba(185, 28, 28, 0.28) !important;
}

.live-wedding-card .btn:hover,
.live-wedding-card .btn.primary:hover {
    background: #991b1b !important;
    border-color: #991b1b !important;
    transform: translateY(-1px);
}

/* =========================================================
   Wedding HLS livestream player
   ========================================================= */

.live-stream-body {
    min-height: 100vh;
}

.live-section {
    padding-top: 30px;
    padding-bottom: 40px;
}

.wedding-live-card {
    width: min(100%, 1050px);
    margin: 0 auto;
    padding: clamp(20px, 4vw, 38px);
}

.wedding-live-heading {
    max-width: 700px;
    margin: 0 auto 24px;
    text-align: center;
}

.wedding-live-heading h1 {
    margin: 5px 0 10px;
    font-size: clamp(1.8rem, 5vw, 3rem);
}

.wedding-live-heading p:not(.eyebrow) {
    margin: 0;
}

.live-player-toolbar {
    width: min(100%, 920px);
    margin: 0 auto 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.live-status {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 0.92rem;
}

.live-status-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 50%;
    background: #999;
}

.live-status-dot.is-live {
    background: #c8192e;
    box-shadow: 0 0 0 5px rgba(200, 25, 46, 0.13);
}

.live-status-dot.is-waiting {
    background: #d29a28;
    box-shadow: 0 0 0 5px rgba(210, 154, 40, 0.13);
}

.live-status-dot.is-error {
    background: #8e8e8e;
}

.live-quality-control {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    white-space: nowrap;
}

.live-quality-control select {
    min-height: 38px;
    padding: 6px 30px 6px 12px;
    border: 1px solid rgba(84, 58, 66, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: inherit;
    font: inherit;
}

.live-quality-control select:disabled {
    opacity: 0.65;
}

.live-video-wrap {
    position: relative;
    width: min(100%, 920px);
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 24px;
    background: #101010;
    box-shadow: 0 20px 55px rgba(43, 24, 31, 0.2);
}

.live-video-wrap video {
    display: block;
    width: 100%;
    height: 100%;
    background: #101010;
    object-fit: contain;
}

.live-player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-align: center;
    color: #fff;
    background:
        linear-gradient(
            rgba(24, 14, 18, 0.68),
            rgba(24, 14, 18, 0.74)
        );
}

.live-player-overlay[hidden] {
    display: none;
}

.live-player-overlay strong {
    font-size: clamp(1.1rem, 4vw, 1.55rem);
}

.live-player-overlay p {
    max-width: 520px;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.5;
}

.live-loading-spinner {
    width: 34px;
    height: 34px;
    margin-bottom: 4px;
    border: 3px solid rgba(255, 255, 255, 0.28);
    border-top-color: #fff;
    border-radius: 50%;
    animation: live-player-spin 0.9s linear infinite;
}

.live-loading-spinner[hidden] {
    display: none;
}

@keyframes live-player-spin {
    to {
        transform: rotate(360deg);
    }
}

.live-player-help {
    width: min(100%, 920px);
    margin: 12px auto 0;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.78;
}

.wedding-live-card .live-actions {
    margin-top: 22px;
}

@media (max-width: 620px) {
    .live-section {
        padding-top: 16px;
    }

    .wedding-live-card {
        padding: 18px 14px 24px;
        border-radius: 24px;
    }

    .live-player-toolbar {
        align-items: flex-start;
    }

    .live-status {
        max-width: 65%;
        line-height: 1.35;
    }

    .live-quality-control > span {
        display: none;
    }

    .live-video-wrap {
        border-radius: 17px;
    }

    .live-player-overlay {
        padding: 18px;
    }
}
