:root {
    --purple-950: #241433;
    --purple-900: #38204e;
    --purple-800: #513272;
    --purple-700: #6b46a0;
    --purple-600: #7b56bd;
    --purple-500: #956dce;
    --lavender: #dcc9f5;
    --lavender-soft: #f3ebff;
    --pink: #ef8ec3;
    --pink-soft: #fde8f3;
    --blue: #8dc9f1;
    --green: #8bc8a7;
    --red: #e77c82;
    --gold: #d6a64a;
    --gold-dark: #a87424;
    --gold-light: #fff0b0;
    --cream: #fffaf2;
    --white: #ffffff;
    --ink: #3c3045;
    --muted: #796f7e;
    --shadow: 0 22px 60px rgba(72, 43, 101, .16);
    --shadow-soft: 0 12px 32px rgba(72, 43, 101, .1);
    --radius-lg: 32px;
    --radius-md: 22px;
    --font-display: 'Cinzel Decorative', Georgia, serif;
    --font-script: 'Parisienne', 'Brush Script MT', cursive;
    --font-elegant: 'Italiana', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    overflow-x: hidden;
    font-family: var(--font-body);
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 10%, rgba(239, 142, 195, .12), transparent 28%),
        radial-gradient(circle at 90% 30%, rgba(141, 201, 241, .14), transparent 32%),
        var(--cream);
}

body.invitation-open {
    overflow-y: auto;
}

button,
input,
textarea {
    font: inherit;
}

button,
a {
    -webkit-user-select: none;
    user-select: none;
}

a {
    color: inherit;
}

/* INTRO */
.intro-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 24px;
    background:
        radial-gradient(circle at 50% 28%, rgba(255, 244, 186, .48), transparent 26%),
        linear-gradient(160deg, #3b225b 0%, #7552ad 42%, #cf8cc6 73%, #f7c9de 100%);
    transition: opacity .8s ease, visibility .8s ease;
}

.intro-screen::before,
.intro-screen::after {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
}

.intro-screen::before {
    top: -230px;
    left: -170px;
}

.intro-screen::after {
    right: -240px;
    bottom: -180px;
    width: 560px;
    height: 560px;
}

.intro-stars,
.intro-stars::before,
.intro-stars::after {
    position: absolute;
    inset: 0;
    content: '';
    pointer-events: none;
    background-image:
        radial-gradient(circle, #fff9c9 0 2px, transparent 2.5px),
        radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 1.5px);
    background-position: 14% 18%, 84% 28%;
    background-size: 150px 170px, 110px 130px;
    animation: starDrift 8s linear infinite;
}

.intro-stars::before {
    transform: rotate(31deg) scale(.8);
    opacity: .6;
}

.intro-stars::after {
    transform: rotate(-22deg) scale(1.2);
    opacity: .35;
}

@keyframes starDrift {
    50% { transform: translateY(-12px); }
}

.royal-envelope {
    position: relative;
    width: min(420px, 92vw);
    animation: introFloat 4.5s ease-in-out infinite;
}

@keyframes introFloat {
    50% { transform: translateY(-10px); }
}

.envelope-glow {
    position: absolute;
    inset: 8% 10%;
    background: rgba(255, 236, 161, .4);
    filter: blur(40px);
    border-radius: 50%;
}

.envelope-card {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 510px;
    padding: 38px 28px 32px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 36px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.97), rgba(255,248,240,.94)),
        var(--white);
    box-shadow: 0 35px 100px rgba(35, 19, 52, .45);
    overflow: hidden;
}

.envelope-card::before,
.envelope-card::after {
    content: '✦';
    position: absolute;
    color: var(--gold);
    font-size: 28px;
    opacity: .6;
}

.envelope-card::before { top: 30px; left: 28px; }
.envelope-card::after { right: 28px; bottom: 98px; }

.mini-label {
    margin-bottom: 12px;
    color: var(--purple-700);
    font-family: var(--font-elegant);
    font-size: 1rem;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.intro-emblem {
    width: 194px;
    height: 194px;
    filter: drop-shadow(0 16px 22px rgba(95, 57, 136, .2));
}

.intro-name {
    margin-top: 4px;
    color: var(--purple-700);
    font-family: var(--font-script);
    font-size: clamp(3.4rem, 12vw, 4.7rem);
    line-height: .95;
}

.intro-date {
    margin: 10px 0 26px;
    color: var(--gold-dark);
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: .24em;
    text-transform: uppercase;
}

.seal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 56px;
    padding: 14px 24px;
    color: #fff;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--purple-700), var(--pink));
    box-shadow: 0 12px 30px rgba(113, 67, 153, .35), inset 0 1px 0 rgba(255,255,255,.35);
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
    animation: sealPulse 1.8s ease-in-out infinite;
}

.seal-btn span { color: var(--gold-light); font-size: 1.3rem; }

@keyframes sealPulse {
    50% { transform: scale(1.035); box-shadow: 0 16px 38px rgba(113, 67, 153, .42), 0 0 0 9px rgba(255,255,255,.09); }
}

.tap-hint {
    position: absolute;
    bottom: 28px;
    color: rgba(255,255,255,.78);
    font-size: .76rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.intro-screen.opening {
    opacity: 0;
    visibility: hidden;
}

.intro-screen.opening .royal-envelope {
    transform: translateY(-40px) scale(1.08);
    transition: transform .8s ease;
}

/* MAIN / HERO */
#main-content {
    opacity: 0;
    visibility: hidden;
    transition: opacity .8s ease;
}

#main-content.visible {
    opacity: 1;
    visibility: visible;
}

.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(26px, 5vh, 56px) 20px 22px;
    color: #fff;
    text-align: center;
    background: #6b4aa1;
}

.hero-art {
    position: absolute;
    inset: 0;
    background-image: url('../img/princess-hero.svg');
    background-size: cover;
    background-position: center 46%;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(35, 19, 52, .56) 0%, rgba(58, 31, 82, .16) 42%, rgba(31, 19, 43, .38) 70%, rgba(28, 16, 40, .84) 100%),
        radial-gradient(circle at 50% 22%, rgba(255,246,191,.25), transparent 28%);
}

.floating-sparkles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.floating-sparkles span {
    position: absolute;
    color: #fff3a9;
    text-shadow: 0 0 12px rgba(255, 242, 163, .75);
    animation: sparkleFloat 7s ease-in-out infinite;
}

@keyframes sparkleFloat {
    0%, 100% { transform: translateY(0) scale(.8); opacity: .3; }
    50% { transform: translateY(-20px) scale(1.2); opacity: 1; }
}

.hero-content,
.hero-bottom {
    position: relative;
    z-index: 2;
    width: min(760px, 100%);
}

.hero-content {
    margin-top: 0;
}

.royal-kicker {
    display: inline-block;
    padding: 9px 18px;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 999px;
    background: rgba(49, 25, 70, .34);
    backdrop-filter: blur(10px);
    font-family: var(--font-elegant);
    font-size: clamp(.84rem, 2.8vw, 1.05rem);
    letter-spacing: .1em;
}

.hero-emblem {
    display: block;
    width: clamp(112px, 24vw, 164px);
    margin: 16px auto 6px;
    filter: drop-shadow(0 12px 24px rgba(40, 18, 59, .32));
}

.hero-invite {
    max-width: 620px;
    margin: 6px auto 0;
    color: #fff7d1;
    font-family: var(--font-elegant);
    font-size: clamp(1.05rem, 3.6vw, 1.45rem);
    letter-spacing: .06em;
}

.hero h1 {
    margin: 6px 0 -2px;
    color: #fff;
    font-family: var(--font-script);
    font-size: clamp(5rem, 18vw, 9rem);
    font-weight: 400;
    line-height: .82;
    text-shadow: 0 10px 30px rgba(32, 15, 47, .42);
}

.hero-fullname {
    color: #fff4b6;
    font-family: var(--font-display);
    font-size: clamp(.84rem, 3.6vw, 1.25rem);
    letter-spacing: .14em;
    text-transform: uppercase;
    text-shadow: 0 5px 15px rgba(32, 15, 47, .45);
}

.hero-ribbon {
    display: inline-block;
    margin-top: 18px;
    padding: 10px 25px;
    color: var(--purple-900);
    border: 1px solid #fff4bd;
    border-radius: 999px;
    background: linear-gradient(135deg, #fffbe4, #f1c966);
    box-shadow: 0 12px 28px rgba(32, 15, 47, .25);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.hero-bottom {
    margin-top: 34px;
}

.countdown-title {
    margin-bottom: 10px;
    color: rgba(255,255,255,.9);
    font-family: var(--font-elegant);
    font-size: 1rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(66px, 104px));
    justify-content: center;
    gap: 8px;
}

.countdown-box {
    min-width: 0;
    padding: 12px 5px 10px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 18px;
    background: rgba(36, 20, 51, .42);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 9px 28px rgba(23, 12, 34, .18);
    backdrop-filter: blur(11px);
}

.countdown-box span {
    display: block;
    color: #fff6c1;
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 5vw, 2.1rem);
    line-height: 1;
}

.countdown-box small {
    display: block;
    margin-top: 5px;
    color: rgba(255,255,255,.84);
    font-size: clamp(.58rem, 2.1vw, .72rem);
    letter-spacing: .04em;
    text-transform: uppercase;
}

.event-started {
    grid-column: 1 / -1;
    padding: 15px 28px;
    border-radius: 999px;
    background: rgba(255,255,255,.9);
    color: var(--purple-800);
    font-family: var(--font-display);
}

.scroll-cue {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-top: 14px;
    color: rgba(255,255,255,.82);
    font-size: .65rem;
    letter-spacing: .09em;
    text-decoration: none;
    text-transform: uppercase;
}

.scroll-cue b {
    font-size: 1.8rem;
    line-height: .8;
    animation: cueBounce 1.4s ease-in-out infinite;
}

@keyframes cueBounce {
    50% { transform: translateY(5px); }
}

/* COMMON SECTIONS */
.page-shell {
    width: min(1160px, 100%);
    margin: 0 auto;
    padding: 0 18px;
}

section {
    scroll-margin-top: 30px;
}

.section-block,
.blessing-section,
.rsvp-section {
    position: relative;
    margin: 74px auto;
}

.blessing-section {
    max-width: 790px;
    padding: 54px clamp(22px, 6vw, 64px);
    text-align: center;
    border: 1px solid rgba(214, 166, 74, .4);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(145deg, rgba(255,255,255,.96), rgba(249,239,255,.92));
    box-shadow: var(--shadow);
}

.blessing-section::before,
.blessing-section::after {
    content: '✦';
    position: absolute;
    color: var(--gold);
    font-size: 28px;
    opacity: .5;
}

.blessing-section::before { top: 26px; left: 30px; }
.blessing-section::after { right: 30px; bottom: 24px; }

.section-crown {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin: -86px auto 20px;
    color: var(--gold-dark);
    border: 1px solid rgba(214, 166, 74, .45);
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--shadow-soft);
    font-size: 2rem;
}

.eyebrow {
    color: var(--gold-dark);
    font-size: .77rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.blessing-section h2,
.section-heading h2,
.rsvp-section h2 {
    margin: 8px 0 12px;
    color: var(--purple-800);
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 3.4rem);
    font-weight: 400;
    line-height: 1.14;
}

.blessing-copy {
    max-width: 600px;
    margin: 0 auto;
    color: var(--muted);
    line-height: 1.7;
}

.family-name {
    margin-top: 18px;
    color: var(--purple-700);
    font-family: var(--font-script);
    font-size: clamp(2.6rem, 8vw, 4.3rem);
    line-height: 1.1;
}

.section-heading {
    max-width: 730px;
    margin: 0 auto 38px;
    text-align: center;
}

.section-heading > p:last-child {
    max-width: 630px;
    margin: 0 auto;
    color: var(--muted);
    line-height: 1.65;
}

.heading-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 14px;
    color: var(--gold-dark);
    border: 1px solid rgba(214, 166, 74, .4);
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--shadow-soft);
    font-size: 1.35rem;
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
}

.event-card {
    overflow: hidden;
    border: 1px solid rgba(112, 76, 151, .12);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow);
}

.card-image-wrap {
    position: relative;
    aspect-ratio: 12 / 7;
    overflow: hidden;
    cursor: zoom-in;
}

.card-image-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .55s ease;
}

.card-image-wrap:hover img {
    transform: scale(1.035);
}

.zoom-pill {
    position: absolute;
    right: 15px;
    bottom: 15px;
    padding: 7px 12px;
    color: #fff;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 999px;
    background: rgba(38, 22, 52, .54);
    backdrop-filter: blur(8px);
    font-size: .7rem;
    font-weight: 600;
}

.card-body {
    padding: 30px clamp(20px, 4vw, 34px) 34px;
    text-align: center;
}

.event-type {
    color: var(--gold-dark);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.card-body h3 {
    margin: 10px 0;
    color: var(--purple-800);
    font-family: var(--font-elegant);
    font-size: clamp(1.75rem, 4vw, 2.3rem);
    font-weight: 400;
    line-height: 1.1;
}

.event-time {
    display: inline-block;
    margin: 6px 0 14px;
    padding: 8px 16px;
    color: var(--purple-800);
    border: 1px solid rgba(123, 86, 189, .2);
    border-radius: 999px;
    background: var(--lavender-soft);
    font-family: var(--font-display);
    font-size: 1.25rem;
}

.card-body p {
    min-height: 52px;
    color: var(--muted);
    line-height: 1.6;
}

.royal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    padding: 13px 24px;
    border: 1px solid transparent;
    border-radius: 999px;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

.royal-button:hover {
    transform: translateY(-3px);
}

.royal-button.outline {
    margin-top: 22px;
    color: var(--purple-700);
    border-color: rgba(123, 86, 189, .32);
    background: #fff;
    box-shadow: 0 8px 20px rgba(87, 52, 120, .08);
}

.royal-button.outline:hover {
    color: #fff;
    background: var(--purple-700);
    box-shadow: 0 12px 28px rgba(87, 52, 120, .22);
}

.calendar-button {
    display: flex;
    width: fit-content;
    margin: 30px auto 0;
    color: #fff;
    background: linear-gradient(135deg, var(--purple-700), var(--pink));
    box-shadow: 0 14px 32px rgba(103, 65, 142, .27);
}

.calendar-button span {
    color: var(--gold-light);
}

.map-note {
    max-width: 690px;
    margin: 14px auto 0;
    color: #a096a4;
    font-size: .75rem;
    line-height: 1.5;
    text-align: center;
}

/* KINGDOM */
.kingdom-section,
.gift-section {
    position: relative;
    left: 50%;
    width: 100vw;
    margin: 88px 0;
    padding: 76px max(18px, calc((100vw - 1124px) / 2));
    transform: translateX(-50%);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 220, 242, .22), transparent 30%),
        radial-gradient(circle at 88% 82%, rgba(255, 240, 169, .16), transparent 26%),
        linear-gradient(145deg, #3b225b, #7450a7 50%, #9b69b3);
}

.kingdom-section::before,
.gift-section::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: .16;
    background-image: radial-gradient(circle, #fff 0 1px, transparent 1.5px);
    background-size: 42px 42px;
}

.kingdom-section > *,
.gift-section > * {
    position: relative;
    z-index: 1;
}

.light-heading .heading-icon {
    color: var(--gold-light);
    border-color: rgba(255,255,255,.28);
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(10px);
}

.light-heading .eyebrow { color: #ffe7a0; }
.light-heading h2 { color: #fff; }
.light-heading > p:last-child { color: rgba(255,255,255,.76); }

.princess-palette {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 13px;
    width: min(1060px, 100%);
    margin: 0 auto;
}

.dress-card {
    position: relative;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    overflow: hidden;
    padding: 20px 10px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 28px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 16px 36px rgba(27, 15, 39, .2);
    isolation: isolate;
}

.dress-card::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 31px;
    width: 52px;
    height: 72px;
    border-radius: 26px 26px 8px 8px;
    background: rgba(255,255,255,.84);
    box-shadow: 0 7px 18px rgba(44, 20, 61, .14);
}

.dress-card::after {
    content: '';
    position: absolute;
    z-index: -1;
    top: 84px;
    width: 118px;
    height: 98px;
    clip-path: polygon(35% 0, 65% 0, 100% 100%, 0 100%);
    background: rgba(255,255,255,.68);
    filter: drop-shadow(0 8px 10px rgba(44, 20, 61, .12));
}

.dress-card span {
    color: rgba(255,255,255,.92);
    font-size: 1.2rem;
}

.dress-card b {
    color: #fff;
    font-family: var(--font-elegant);
    font-size: 1.08rem;
    letter-spacing: .04em;
}

.dress-blue { background: linear-gradient(160deg, #a3dcff, #568bc9); }
.dress-yellow { background: linear-gradient(160deg, #ffe79b, #d99e3f); }
.dress-pink { background: linear-gradient(160deg, #ffb5dc, #c05d9d); }
.dress-green { background: linear-gradient(160deg, #9cddba, #459076); }
.dress-purple { background: linear-gradient(160deg, #d0a7ff, #7650ba); }
.dress-red { background: linear-gradient(160deg, #ff9b9e, #bb4c5f); }

/* TIMELINE */
.timeline {
    position: relative;
    max-width: 850px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 26px;
    bottom: 26px;
    left: 153px;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--gold) 8%, var(--gold) 92%, transparent);
}

.timeline-event {
    display: grid;
    grid-template-columns: 120px 66px minmax(0, 1fr);
    align-items: center;
    gap: 0;
    margin: 22px 0;
}

.timeline-time {
    color: var(--purple-700);
    font-family: var(--font-display);
    font-size: .92rem;
    text-align: right;
}

.timeline-marker {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 0 auto;
    border: 2px solid #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff7c8, #e2b651);
    box-shadow: 0 0 0 5px var(--cream), 0 8px 22px rgba(107, 70, 160, .16);
    font-size: 1.35rem;
}

.timeline-content {
    padding: 22px 25px;
    border: 1px solid rgba(123, 86, 189, .13);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.timeline-content h3 {
    margin-bottom: 5px;
    color: var(--purple-800);
    font-family: var(--font-elegant);
    font-size: 1.5rem;
    font-weight: 400;
}

.timeline-content p {
    color: var(--muted);
    line-height: 1.55;
}

/* GIFTS */
.gift-section {
    background:
        radial-gradient(circle at 10% 20%, rgba(255, 236, 167, .18), transparent 28%),
        radial-gradient(circle at 90% 70%, rgba(255, 213, 235, .18), transparent 30%),
        linear-gradient(145deg, #6c3e76, #9c5f9a 52%, #bc759c);
}

.gift-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: min(850px, 100%);
    margin: 0 auto;
}

.gift-details article {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 185px;
    padding: 25px 18px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 26px;
    background: rgba(255,255,255,.11);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 16px 32px rgba(45, 20, 49, .16);
    backdrop-filter: blur(9px);
    text-align: center;
}

.gift-details article > span {
    font-size: 2.7rem;
}

.gift-details small {
    margin: 12px 0 6px;
    color: rgba(255,255,255,.7);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.gift-details strong {
    color: #fff;
    font-family: var(--font-elegant);
    font-size: 1.55rem;
    font-weight: 400;
}

/* RSVP */
.rsvp-section {
    max-width: 850px;
    padding: clamp(30px, 7vw, 64px);
    border: 1px solid rgba(214, 166, 74, .36);
    border-radius: 36px;
    background:
        linear-gradient(145deg, rgba(255,255,255,.98), rgba(248,238,255,.96));
    box-shadow: var(--shadow);
}

.rsvp-section::before {
    content: '';
    position: absolute;
    inset: 12px;
    pointer-events: none;
    border: 1px dashed rgba(214, 166, 74, .34);
    border-radius: 28px;
}

.rsvp-section > * {
    position: relative;
    z-index: 1;
}

.rsvp-ornament {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    margin: -100px auto 22px;
    color: var(--gold-dark);
    border: 1px solid rgba(214, 166, 74, .38);
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--shadow-soft);
    font-size: 2.1rem;
}

.form-label,
.guest-label {
    display: block;
    margin: 22px 0 9px;
    color: var(--purple-800);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .05em;
}

.form-label span {
    color: var(--muted);
    font-weight: 400;
}

.royal-input {
    width: 100%;
    padding: 15px 17px;
    color: var(--ink);
    border: 1px solid rgba(123, 86, 189, .2);
    border-radius: 16px;
    outline: none;
    background: rgba(255,255,255,.86);
    box-shadow: inset 0 1px 3px rgba(64, 39, 84, .04);
    transition: border .2s ease, box-shadow .2s ease;
}

.royal-input:focus {
    border-color: var(--purple-500);
    box-shadow: 0 0 0 4px rgba(149, 109, 206, .12);
}

textarea.royal-input {
    resize: vertical;
    min-height: 100px;
}

.guest-counters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
}

.counter-card {
    padding: 19px 10px;
    border: 1px solid rgba(123, 86, 189, .12);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 9px 22px rgba(76, 47, 101, .08);
    text-align: center;
}

.adult-counter { background: #fffaf3; }
.boy-counter { background: #eef8ff; }
.girl-counter { background: #fff0f8; }

.counter-emoji {
    display: block;
    margin-bottom: 5px;
    font-size: 2rem;
}

.counter-card b {
    color: var(--purple-800);
    font-size: .84rem;
}

.stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.stepper button {
    width: 33px;
    height: 33px;
    color: #fff;
    border: 0;
    border-radius: 50%;
    background: var(--purple-600);
    box-shadow: 0 5px 12px rgba(89, 54, 124, .22);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}

.stepper input {
    width: 32px;
    color: var(--purple-800);
    border: 0;
    outline: none;
    background: transparent;
    font-family: var(--font-display);
    font-size: 1.25rem;
    text-align: center;
    -moz-appearance: textfield;
}

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.submit-button {
    width: 100%;
    margin-top: 25px;
    color: #fff;
    border: 0;
    background: linear-gradient(135deg, var(--purple-700), var(--pink));
    box-shadow: 0 14px 30px rgba(103, 65, 142, .25);
    text-transform: uppercase;
}

.deny-button,
.edit-response {
    width: 100%;
    margin-top: 12px;
    padding: 12px 18px;
    color: #877d8c;
    border: 1px solid #d9d0dd;
    border-radius: 999px;
    background: transparent;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
}

.status-card {
    max-width: 650px;
    margin: 0 auto;
    padding: 34px 24px;
    border: 1px solid rgba(123, 86, 189, .16);
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.status-icon {
    width: 66px;
    height: 66px;
    display: grid;
    place-items: center;
    margin: 0 auto 15px;
    color: #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-600), var(--pink));
    font-size: 2rem;
}

.status-card h3 {
    margin: 8px 0;
    color: var(--purple-800);
    font-family: var(--font-elegant);
    font-size: 2rem;
    font-weight: 400;
}

.status-card > p:not(.eyebrow):not(.status-total) {
    color: var(--muted);
}

.status-counts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 22px 0 12px;
}

.status-counts span {
    padding: 13px 6px;
    color: var(--muted);
    border-radius: 14px;
    background: var(--lavender-soft);
    font-size: .75rem;
}

.status-counts b {
    display: block;
    color: var(--purple-800);
    font-family: var(--font-display);
    font-size: 1.25rem;
}

.status-total {
    color: var(--muted);
    font-size: .85rem;
}

.edit-response {
    width: auto;
    min-width: 180px;
    margin-top: 20px;
    color: var(--purple-700);
    border-color: rgba(123, 86, 189, .3);
}

/* FOOTER */
.royal-footer {
    position: relative;
    margin-top: 130px;
    padding: 105px 20px 40px;
    overflow: hidden;
    color: rgba(255,255,255,.82);
    text-align: center;
    background:
        radial-gradient(circle at 50% 0, rgba(255, 236, 163, .18), transparent 25%),
        linear-gradient(150deg, #27163a, #55316f 55%, #74457a);
}

.royal-footer::before {
    content: '';
    position: absolute;
    top: -55px;
    left: -5%;
    width: 110%;
    height: 90px;
    border-radius: 50%;
    background: var(--cream);
}

.footer-emblem {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 112px;
    transform: translateX(-50%);
    filter: drop-shadow(0 12px 20px rgba(23, 12, 34, .28));
}

.royal-footer > p {
    font-family: var(--font-elegant);
    letter-spacing: .08em;
}

.footer-name {
    margin: 8px 0 -5px;
    color: #fff;
    font-family: var(--font-script);
    font-size: clamp(4rem, 13vw, 6.5rem);
}

.royal-footer > span {
    color: #ffe9a3;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .22em;
}

.footer-credits {
    margin-top: 45px;
    color: rgba(255,255,255,.52);
    font-size: .75rem;
}

.footer-credits a {
    color: #fff1bb;
    text-decoration: none;
}

.footer-credits small {
    display: block;
    margin-top: 5px;
}

.music-fab {
    position: fixed;
    z-index: 500;
    right: 18px;
    bottom: 18px;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    color: #fff;
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-700), var(--pink));
    box-shadow: 0 12px 28px rgba(47, 25, 65, .32);
    font-family: Georgia, serif;
    font-size: 1.5rem;
    cursor: pointer;
}

.music-fab.playing {
    animation: musicSpin 4s linear infinite;
}

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

.place-popup {
    border-radius: 25px !important;
}

/* REVEAL */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s ease, transform .8s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

.hero .reveal {
    opacity: 1;
    transform: none;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .princess-palette {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dress-card {
        min-height: 205px;
    }
}

@media (max-width: 720px) {
    .hero {
        min-height: 100svh;
        padding-inline: 13px;
    }

    .hero-art {
        background-position: center 50%;
    }

    .hero-content {
        margin-top: 2vh;
    }

    .hero-emblem {
        width: 108px;
        margin-top: 10px;
    }

    .hero h1 {
        font-size: clamp(4.7rem, 22vw, 7rem);
    }

    .hero-ribbon {
        margin-top: 13px;
    }

    .hero-bottom {
        margin-top: 20px;
    }

    .countdown {
        grid-template-columns: repeat(4, minmax(58px, 1fr));
        gap: 5px;
    }

    .countdown-box {
        padding: 10px 3px 8px;
        border-radius: 14px;
    }

    .page-shell {
        padding-inline: 13px;
    }

    .section-block,
    .blessing-section,
    .rsvp-section {
        margin: 64px auto;
    }

    .event-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .card-body p {
        min-height: auto;
    }

    .kingdom-section,
    .gift-section {
        margin: 70px 0;
        padding-top: 62px;
        padding-bottom: 62px;
    }

    .timeline::before {
        left: 26px;
    }

    .timeline-event {
        grid-template-columns: 54px minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        margin: 19px 0;
    }

    .timeline-time {
        grid-column: 2;
        grid-row: 1;
        margin: 1px 0 8px;
        text-align: left;
    }

    .timeline-marker {
        grid-column: 1;
        grid-row: 1 / span 2;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .timeline-content {
        grid-column: 2;
        grid-row: 2;
        padding: 18px;
    }

    .gift-details {
        grid-template-columns: 1fr;
    }

    .gift-details article {
        min-height: 0;
    }

    .guest-counters {
        grid-template-columns: 1fr;
    }

    .counter-card {
        display: grid;
        grid-template-columns: 50px 1fr auto;
        align-items: center;
        gap: 8px;
        padding: 13px 15px;
        text-align: left;
    }

    .counter-emoji {
        margin: 0;
        text-align: center;
    }

    .stepper {
        margin: 0;
    }

    .status-counts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .intro-screen {
        padding: 16px;
    }

    .envelope-card {
        min-height: 0;
        padding: 30px 20px 25px;
        border-radius: 29px;
    }

    .intro-emblem {
        width: 155px;
        height: 155px;
    }

    .tap-hint {
        bottom: 14px;
        font-size: .62rem;
    }

    .royal-kicker {
        padding: 7px 12px;
        font-size: .72rem;
    }

    .hero-invite {
        font-size: .96rem;
    }

    .hero-fullname {
        font-size: .75rem;
    }

    .countdown-title {
        font-size: .75rem;
    }

    .scroll-cue {
        margin-top: 9px;
    }

    .blessing-section {
        padding: 48px 20px 40px;
        border-radius: 26px;
    }

    .section-heading h2,
    .blessing-section h2,
    .rsvp-section h2 {
        font-size: 2rem;
    }

    .family-name {
        font-size: 2.7rem;
    }

    .event-card {
        border-radius: 25px;
    }

    .card-body {
        padding: 25px 18px 28px;
    }

    .princess-palette {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .dress-card {
        min-height: 185px;
    }

    .rsvp-section {
        padding: 42px 18px 28px;
        border-radius: 28px;
    }

    .rsvp-section::before {
        inset: 8px;
        border-radius: 22px;
    }

    .rsvp-ornament {
        margin-top: -78px;
    }

    .music-fab {
        right: 13px;
        bottom: 13px;
        width: 48px;
        height: 48px;
    }
}

@media (max-height: 740px) and (max-width: 520px) {
    .hero {
        min-height: 780px;
    }

    .hero-content {
        margin-top: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
