/* ==========================================================================
   Kaito Invites — Tema 25 "Rosé Journal"
   Sibling of tema 22 (same type, palette & stickers), re-composed layouts.
   Mobile-first, max 480px column on desktop.
   ========================================================================== */

@font-face {
    font-family: 'The Silver';
    src: url('../assets/fonts/TheSilverEditorial-Regular.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Retro Signature';
    src: url('../assets/fonts/RetroSignature.otf') format('opentype');
    font-display: swap;
}

:root {
    --cream: #FEF8F0;
    --sand: #F7EEE3;
    --coral: #FF6565;
    --rose: #EC8888;
    --dusty: #DA7A7A;
    --deep: #C94545;
    --ink: #333333;
    --soft: #4D443E;
    --col: 480px;
    --gut: 24px;

    --f-display: 'The Silver', 'Times New Roman', serif;
    --f-script: 'Retro Signature', cursive;
    --f-hand: 'Beth Ellen', cursive;
    --f-mono: 'Roboto Mono', ui-monospace, monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--sand);
    color: var(--ink);
    font-family: var(--f-mono);
    font-size: 12px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

body.is-locked {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

h1,
h2,
h3,
h4,
p,
figure {
    margin: 0;
}

[hidden] {
    display: none !important;
}

.page {
    position: relative;
    max-width: var(--col);
    margin: 0 auto;
    overflow: hidden;
    background: var(--cream);
}

.page > section {
    position: relative;
    padding: 80px var(--gut);
}

/* ---------- shared type ---------- */
.display {
    font-family: var(--f-display);
    font-weight: 400;
    font-size: 64px;
    line-height: .92;
    color: var(--coral);
}

.display--md {
    font-size: 50px;
}

.display--sm {
    font-size: 34px;
    line-height: 1;
    color: var(--ink);
}

.display--xs {
    font-size: 26px;
    line-height: 1;
}

.script {
    font-family: var(--f-script);
    font-weight: 400;
    line-height: 1.1;
    color: var(--coral);
}

.hand {
    font-family: var(--f-hand);
}

.mono-sm {
    font-size: 12px;
    letter-spacing: .08em;
}

.mono-xs {
    font-size: 11px;
    color: var(--soft);
}

.label {
    font-size: 11px;
    letter-spacing: .14em;
    color: var(--deep);
}

.oval {
    border-radius: 50%;
    object-fit: cover;
}

.polaroid {
    padding: 8px 8px 30px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(120, 70, 60, .16);
}

.polaroid img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.polaroid--l {
    transform: rotate(-4deg);
}

.polaroid--r {
    transform: rotate(4deg);
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--coral);
    border-radius: 999px;
    background: transparent;
    color: var(--deep);
    font-family: var(--f-mono);
    font-size: 11px;
    text-decoration: none;
    cursor: pointer;
    transition: background .25s, color .25s;
}

.pill:hover,
.pill:focus-visible,
.pill--solid {
    background: var(--coral);
    color: var(--cream);
}

.btn-coral {
    min-height: 44px;
    padding: 0 28px;
    border: 1px solid var(--coral);
    border-radius: 999px;
    background: var(--coral);
    color: var(--cream);
    font-family: var(--f-mono);
    font-size: 12px;
    letter-spacing: .14em;
    cursor: pointer;
    transition: background .25s;
}

.btn-coral:hover,
.btn-coral:focus-visible {
    background: var(--deep);
}

.tape {
    position: absolute;
    top: -12px;
    left: 50%;
    width: 88px;
    height: 24px;
    margin-left: -44px;
    background: rgba(236, 136, 136, .45);
    transform: rotate(3deg);
}

/* ---------- reveal on scroll ---------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .9s ease, transform .9s ease;
}

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

@media (prefers-reduced-motion: reduce) {
    [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ==========================================================================
   COVER — oval photo, stacked names
   ========================================================================== */
.cover {
    position: fixed;
    inset: 0;
    z-index: 200;
    overflow-y: auto;
    background: var(--cream);
    transition: opacity 1s ease, visibility 1s;
}

.cover.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.cover__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100%;
    max-width: var(--col);
    margin: 0 auto;
    padding: max(30px, 5vh) var(--gut) 30px;
    text-align: center;
}

.cover__eyebrow {
    color: var(--deep);
}

.cover__photo-wrap {
    position: relative;
    width: min(270px, 70vw);
    margin-top: 18px;
}

.cover__photo {
    width: 100%;
    aspect-ratio: 3 / 4;
    height: auto;
    animation: popIn 1.2s ease both;
}

.cover__stars {
    position: absolute;
    top: 0;
    left: -30px;
    width: 54px;
    animation: twinkle 3s ease-in-out infinite;
}

.cover__flower {
    position: absolute;
    top: 12px;
    right: -34px;
    width: 98px;
    transform: rotate(14deg);
    animation: sway 5s ease-in-out infinite;
}

.cover__names {
    position: relative;
    margin-top: -22px;
    animation: rise 1.1s .4s ease both;
}

.cover__names .display {
    font-size: clamp(60px, 19vw, 78px);
}

.cover__amp {
    margin: -4px 0 -6px;
    font-family: var(--f-script);
    font-size: 34px;
    line-height: 1;
    color: var(--dusty);
}

.cover__date {
    margin-top: 12px;
    color: var(--ink);
}

.cover__guest {
    margin-top: auto;
    padding-top: 22px;
    animation: rise 1.1s .8s ease both;
}

.cover__dear {
    font-family: var(--f-hand);
    font-size: 15px;
    color: var(--deep);
}

.cover__guest-name {
    margin-top: 6px;
    font-family: var(--f-display);
    font-weight: 400;
    font-size: 32px;
    line-height: 1;
}

.cover__note {
    margin: 6px 0 14px;
    font-size: 10.5px;
    color: var(--soft);
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(.92);
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
}

@keyframes twinkle {
    50% {
        opacity: .55;
        transform: scale(.92) rotate(-6deg);
    }
}

@keyframes sway {
    50% {
        transform: rotate(4deg);
    }
}

/* ==========================================================================
   FLOATING CONTROLS
   ========================================================================== */
.menu-btn {
    position: fixed;
    top: 18px;
    right: max(18px, calc(50% - var(--col) / 2 + 18px));
    z-index: 99;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--coral);
    border-radius: 999px;
    background: rgba(254, 248, 240, .92);
    color: var(--deep);
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: .12em;
    cursor: pointer;
}

.menu {
    position: fixed;
    inset: 12px max(9px, calc(50% - var(--col) / 2 + 9px)) auto;
    z-index: 150;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 64px 32px 36px;
    border-radius: 20px;
    background: rgba(254, 248, 240, .98);
    box-shadow: 0 12px 30px rgba(120, 70, 60, .18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .35s, visibility .35s, transform .35s;
}

.menu.open {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.menu a {
    font-family: var(--f-display);
    font-size: 34px;
    line-height: 1.3;
    color: var(--coral);
    text-decoration: none;
}

.menu__close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 44px;
    height: 44px;
    border: 0;
    background: none;
    color: var(--deep);
    font-size: 18px;
    cursor: pointer;
}

.menu__hint {
    margin-top: 16px;
    font-size: 10px;
    color: var(--soft);
}

.music-btn {
    position: fixed;
    bottom: 20px;
    left: max(20px, calc(50% - var(--col) / 2 + 20px));
    z-index: 99;
    width: 44px;
    height: 44px;
    border: 1px solid var(--coral);
    border-radius: 50%;
    background: rgba(254, 248, 240, .92);
    color: var(--coral);
    font-size: 14px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s;
}

.music-btn.show {
    opacity: 1;
    pointer-events: auto;
}

.music-btn.playing i {
    animation: spin 4s linear infinite;
}

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

.yt-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ==========================================================================
   HOME — script headline + taped note
   ========================================================================== */
.page > .home {
    padding-top: 70px;
    text-align: center;
}

.home__script {
    font-size: 46px;
}

.home__date {
    margin-top: 10px;
    color: var(--deep);
}

.note {
    position: relative;
    margin: 34px 16px 0;
    padding: 30px 22px 22px;
    background: #fff;
    text-align: left;
    box-shadow: 0 8px 18px rgba(120, 70, 60, .12);
}

.note.is-visible {
    transform: rotate(-1.8deg);
}

.note__text {
    font-family: var(--f-hand);
    font-size: 14px;
    line-height: 1.9;
}

.note__src {
    margin-top: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--deep);
}

.note__stars {
    position: absolute;
    right: -14px;
    bottom: -26px;
    width: 44px;
}

/* ==========================================================================
   COUPLE — side-by-side polaroids
   ========================================================================== */
.page > .couple {
    padding: 60px 18px 80px;
    text-align: center;
}

.couple__grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    margin-top: 34px;
}

.person {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.person .polaroid {
    width: 100%;
    max-width: 170px;
}

.person .label {
    margin-top: 24px;
}

.person__name {
    margin-top: 4px;
    font-family: var(--f-display);
    font-weight: 400;
    font-size: 32px;
    line-height: 1;
    color: var(--coral);
    word-break: break-word;
}

.person__parents {
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.6;
    color: var(--soft);
}

.person .pill {
    margin-top: 12px;
}

.couple__heart {
    position: absolute;
    top: 130px;
    left: 50%;
    width: 56px;
    margin-left: -28px;
    transform: rotate(-8deg);
    animation: beat 2.4s ease-in-out infinite;
}

@keyframes beat {
    50% {
        transform: rotate(-8deg) scale(1.08);
    }
}

/* ==========================================================================
   LOVE STORY — zig-zag timeline with oval photos
   ========================================================================== */
.story__head {
    position: relative;
}

.story__head .display {
    font-size: 58px;
    white-space: nowrap;
}

.story__sub {
    margin: 2px 0 0 4px;
    font-size: 30px;
    color: var(--dusty);
}

.story__stars {
    position: absolute;
    top: 0;
    right: 6px;
    width: 58px;
}

.story__line {
    position: relative;
    margin-top: 34px;
}

.story__line::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 50%;
    border-left: 1.5px dashed rgba(255, 101, 101, .55);
}

.story__item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}

.story__item + .story__item {
    margin-top: 44px;
}

.story__item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    background: var(--coral);
}

.story__photo {
    width: 100%;
    aspect-ratio: 3 / 4;
    height: auto;
}

.story__item--rev .story__photo {
    order: 2;
}

.story__item--rev .story__text {
    text-align: right;
}

.story__date {
    font-size: 26px;
}

.story__text p {
    margin-top: 6px;
    font-size: 11.5px;
    color: var(--soft);
}

.story__end {
    margin-top: 40px;
    text-align: center;
    font-size: 16px;
    color: var(--deep);
}

/* ==========================================================================
   EVENT — save-the-date polaroid, countdown, twin arches
   ========================================================================== */
.page > .event {
    padding-top: 60px;
    text-align: center;
}

.event__hero {
    position: relative;
    width: 250px;
    margin: 0 auto;
}

.polaroid--big {
    padding: 10px 10px 44px;
    transform: rotate(3deg);
}

.event__flower {
    position: absolute;
    top: -24px;
    left: -48px;
    z-index: 2;
    width: 90px;
    transform: rotate(-16deg);
    animation: sway 5s ease-in-out infinite;
}

.event__save {
    position: relative;
    margin-top: -36px;
    font-size: 52px;
    line-height: 1;
}

.event__date {
    margin-top: 22px;
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 22px;
}

.countdown div {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0 8px;
    border: 1px solid var(--coral);
    border-radius: 14px;
}

.countdown span {
    font-family: var(--f-display);
    font-size: 34px;
    line-height: 1;
    color: var(--coral);
}

.countdown small {
    margin-top: 2px;
    font-size: 10px;
    color: var(--deep);
}

.arches {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    margin: 34px -6px 0;
}

.arch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 44px 12px 18px;
    border-radius: 90px 90px 12px 12px;
    background: var(--sand);
}

.arch:only-child {
    grid-column: 1 / -1;
}

.arch__title {
    font-family: var(--f-display);
    font-weight: 400;
    font-size: 34px;
    line-height: 1;
    color: var(--coral);
}

.arch__time {
    margin-top: 6px;
    font-size: 11px;
}

.arch__venue {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--deep);
}

.arch__addr {
    flex: 1;
    font-size: 10.5px;
    line-height: 1.5;
    color: var(--soft);
}

.arch .pill {
    margin-top: 12px;
    padding: 0 14px;
}

.save-date {
    margin-top: 24px;
}

.stream {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 34px;
    padding: 16px 0;
    border-top: 1px dashed rgba(255, 101, 101, .6);
    border-bottom: 1px dashed rgba(255, 101, 101, .6);
    text-align: left;
}

.stream .display--xs {
    color: var(--coral);
}

.dresscode {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
}

.dresscode__title {
    font-size: 42px;
}

.swatches {
    display: flex;
    gap: 10px;
}

.swatches i {
    width: 34px;
    height: 34px;
    border-radius: 50%;
}

.swatches i:nth-child(1) {
    background: #8F8F8F;
}

.swatches i:nth-child(2) {
    background: #5D5D5D;
}

.swatches i:nth-child(3) {
    background: #45434F;
}

.swatches i:nth-child(4) {
    background: #3B0B0B;
}

/* ==========================================================================
   RSVP — white card, letter peeking behind
   ========================================================================== */
.rsvp__letter {
    position: absolute;
    top: 270px;
    left: -36px;
    width: 150px;
    transform: rotate(-8deg);
    opacity: .9;
}

.rsvp__flower {
    position: absolute;
    top: 64px;
    right: 18px;
    width: 92px;
    transform: rotate(10deg);
    animation: sway 5s ease-in-out infinite;
}

.rsvp__title {
    max-width: 250px;
    font-size: 44px;
    line-height: .95;
}

.rsvp__card {
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 30px 0 0 10px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 10px 22px rgba(120, 70, 60, .12);
}

.rsvp__card label,
.rsvp__label {
    margin: 14px 0 4px;
    font-size: 10.5px;
    letter-spacing: .1em;
    color: var(--deep);
}

.rsvp__card > label:first-child {
    margin-top: 0;
}

.rsvp__card input[type="text"],
.rsvp__card textarea {
    width: 100%;
    padding: 6px 0;
    border: 0;
    border-bottom: 1px solid var(--rose);
    border-radius: 0;
    background: transparent;
    color: var(--ink);
}

.rsvp__card input[type="text"] {
    font-family: var(--f-display);
    font-size: 24px;
}

.rsvp__card textarea {
    font-family: var(--f-hand);
    font-size: 13px;
    line-height: 1.8;
    resize: vertical;
}

.rsvp__card input:focus,
.rsvp__card textarea:focus {
    outline: 0;
    border-bottom-color: var(--coral);
}

.rsvp__choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.rsvp__choice label {
    margin: 0;
}

.rsvp__choice input {
    position: absolute;
    opacity: 0;
}

.rsvp__choice span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid var(--rose);
    border-radius: 999px;
    color: var(--deep);
    font-size: 11px;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.rsvp__choice input:checked + span {
    border-color: var(--coral);
    background: var(--coral);
    color: var(--cream);
}

.rsvp__choice input:focus-visible + span {
    outline: 2px solid var(--coral);
    outline-offset: 2px;
}

.rsvp__guests {
    display: flex;
    flex-direction: column;
}

.rsvp__guests.is-hidden {
    display: none;
}

.stepper {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    border-bottom: 1px solid var(--rose);
}

.stepper button {
    height: 44px;
    border: 0;
    background: none;
    color: var(--coral);
    font-size: 18px;
    cursor: pointer;
}

.stepper input {
    width: 100%;
    border: 0;
    background: none;
    color: var(--ink);
    font: 24px var(--f-display);
    text-align: center;
    -moz-appearance: textfield;
}

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

.rsvp__send {
    align-self: flex-end;
    margin-top: 18px;
}

.rsvp__status {
    min-height: 1.4em;
    margin-top: 8px;
    text-align: center;
    font-size: 11px;
    color: var(--deep);
}

.wishes {
    margin-top: 18px;
}

.wish {
    padding: 14px 0;
    border-bottom: 1px dashed rgba(255, 101, 101, .45);
}

.wish__name {
    font-family: var(--f-display);
    font-size: 22px;
    line-height: 1.1;
    color: var(--coral);
}

.wish__msg {
    margin-top: 4px;
    font-size: 11.5px;
    word-break: break-word;
}

.wish__date {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    color: var(--soft);
}

.wishes__empty {
    margin-top: 16px;
    text-align: center;
    font-family: var(--f-hand);
    font-size: 13px;
    color: var(--deep);
}

.wishes__pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    font-size: 11px;
}

.wishes__pager button {
    min-height: 44px;
    border: 0;
    background: none;
    color: var(--deep);
    font: 11px var(--f-mono);
    cursor: pointer;
}

.wishes__pager button:disabled {
    opacity: .35;
    cursor: default;
}

/* ==========================================================================
   WEDDING GIFT — bank cards
   ========================================================================== */
.page > .gift {
    padding-top: 30px;
    text-align: center;
}

.gift__title {
    font-size: 58px;
}

.gift__lead {
    margin: 8px 12px 20px;
}

.gift__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    text-align: left;
}

.gift__row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px;
    border-radius: 14px;
    background: var(--sand);
}

.gift__row--wide,
.gift__row:only-child {
    grid-column: 1 / -1;
}

.gift__bank {
    font-family: var(--f-display);
    font-size: 26px;
    line-height: 1;
    color: var(--coral);
}

.gift__no {
    margin-top: 6px;
    font-size: 13px;
    letter-spacing: .04em;
    word-break: break-all;
}

.gift__holder,
.gift__addr {
    font-size: 10.5px;
    color: var(--soft);
}

.gift__addr {
    margin-top: 6px;
    font-size: 11.5px;
    color: var(--ink);
}

.gift__copy {
    align-self: flex-start;
    min-height: 44px;
    margin-top: 8px;
    padding: 0 14px;
    border: 1px solid var(--coral);
    border-radius: 999px;
    background: transparent;
    color: var(--deep);
    font: 10.5px var(--f-mono);
    cursor: pointer;
}

/* ==========================================================================
   VIDEO + GALLERY — fanned polaroids
   ========================================================================== */
.page > .gallery {
    padding-top: 40px;
}

.film {
    margin-bottom: 40px;
}

.film__label {
    letter-spacing: .1em;
}

.film__video {
    position: relative;
    margin-top: 10px;
    padding: 8px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(120, 70, 60, .14);
}

.film__video iframe,
.film__poster {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}

.film__poster {
    position: relative;
    display: grid;
    place-items: center;
}

.film__poster img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.film__poster i {
    position: relative;
    font-size: 46px;
    color: rgba(255, 255, 255, .85);
}

.gallery__source {
    display: none;
}

.gallery__title {
    text-align: center;
    font-size: 48px;
}

.gallery__hint {
    margin-top: 4px;
    text-align: center;
}

.gallery__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px 16px;
    margin-top: 26px;
    padding: 0 6px;
}

.gallery__item {
    display: block;
    padding: 7px 7px 26px;
    border: 0;
    background: #fff;
    box-shadow: 0 8px 16px rgba(120, 70, 60, .16);
    cursor: zoom-in;
    transform: rotate(-3deg);
    transition: transform .3s ease;
}

.gallery__item:nth-child(even) {
    margin-top: 18px;
    transform: rotate(3deg);
}

.gallery__item:nth-child(3n) {
    transform: rotate(-1.5deg);
}

.gallery__item:hover,
.gallery__item:focus-visible {
    transform: rotate(0) scale(1.03);
}

.gallery__item img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.gallery__item.is-extra {
    display: none;
}

.gallery__grid.is-open .gallery__item.is-extra {
    display: block;
    animation: rise .6s ease both;
}

.gallery__more {
    display: flex;
    margin: 30px auto 0;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(51, 36, 32, .94);
}

.lightbox img {
    max-height: 86vh;
    object-fit: contain;
}

.lightbox button {
    position: absolute;
    min-width: 44px;
    min-height: 44px;
    border: 0;
    background: none;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
}

.lightbox__close {
    top: 14px;
    right: 18px;
}

.lightbox__prev {
    left: 10px;
    top: 50%;
}

.lightbox__next {
    right: 10px;
    top: 50%;
}

/* ==========================================================================
   CLOSING — oval photo + thank you
   ========================================================================== */
.page > .closing {
    padding: 60px var(--gut) 40px;
    text-align: center;
}

.closing__photo-wrap {
    position: relative;
    width: 200px;
    margin: 0 auto;
}

.closing__photo {
    width: 100%;
    aspect-ratio: 4 / 5;
    height: auto;
}

.closing__stars {
    position: absolute;
    top: -4px;
    right: -30px;
    width: 44px;
}

.closing__title {
    position: relative;
    margin-top: -30px;
    font-size: 54px;
}

.closing__msg {
    margin-top: 12px;
}

.closing__names {
    margin-top: 12px;
    font-size: 30px;
}

.credit {
    margin-top: 26px;
    font-size: 10px;
    color: var(--soft);
}

/* ---------- toast ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 76px;
    z-index: 400;
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--coral);
    color: var(--cream);
    font-size: 12px;
    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s, transform .3s;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ==========================================================================
   INTRO — loader with fast photo flicker and 0-100% counter
   ========================================================================== */
.intro {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: var(--intro-bg);
    color: var(--intro-fg);
    transition: opacity .7s ease, visibility .7s;
    /* failsafe: never block the invitation if the script fails */
    animation: intro-failsafe .01s 9s forwards;
}

.intro.is-done {
    opacity: 0;
    visibility: hidden;
}

@keyframes intro-failsafe {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.intro__photo {
    width: 124px;
    height: 124px;
    margin-bottom: 14px;
    overflow: hidden;
    background: var(--intro-tile);
}

.intro__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.intro__photo img:not([src]) {
    visibility: hidden;
}

.intro__label {
    margin: 0;
    font-size: 10px;
    letter-spacing: .42em;
    text-indent: .42em;
}

.intro__names {
    margin: 0;
    padding: 0 24px;
    text-align: center;
    line-height: 1.1;
}

.intro__pct {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18vh;
    margin: 0;
    text-align: center;
    font-size: 15px;
    letter-spacing: .3em;
    text-indent: .3em;
    font-variant-numeric: tabular-nums;
}

.intro {
    --intro-bg: var(--cream);
    --intro-fg: var(--ink);
    --intro-tile: var(--sand);
}

.intro__photo {
    padding: 6px 6px 18px;
    background: #FFFFFF;
    box-shadow: 0 8px 18px rgba(120, 70, 60, .16);
    transform: rotate(-3deg);
}

.intro__label {
    font-family: var(--f-mono);
    color: var(--soft);
}

.intro__names {
    font-family: var(--f-display);
    font-size: 40px;
    color: var(--coral);
}

.intro__pct {
    font-family: var(--f-mono);
    color: var(--deep);
}

/* Cover fits one screen: sizes follow the screen height */
.cover__inner {
    padding-top: max(18px, 3.5vh);
    padding-bottom: max(18px, 3vh);
}

.cover__photo-wrap {
    width: min(270px, 70vw, 28vh);
    width: min(270px, 70vw, 28svh);
}

.cover__stars {
    left: -11%;
    width: 20%;
}

.cover__flower {
    right: -12.5%;
    width: 36%;
}

.cover__names .display {
    font-size: clamp(46px, min(19vw, 9.6vh), 78px);
    font-size: clamp(46px, min(19vw, 9.6svh), 78px);
}

.cover__amp {
    font-size: clamp(24px, 4.2svh, 34px);
}

.cover__guest {
    padding-top: max(12px, 2.4svh);
}

.cover__guest-name {
    font-size: clamp(26px, 4.4svh, 32px);
}

/* Very short screens (small phones with browser bars) */
@media (max-height: 620px) {
    .cover__photo-wrap {
        width: min(270px, 70vw, 25svh);
        margin-top: 10px;
    }

    .cover__names .display {
        font-size: clamp(42px, 8.6svh, 78px);
    }

    .cover__date {
        margin-top: 6px;
    }

    .cover__note {
        margin: 4px 0 10px;
    }
}
