#invitation-app {
    width: 100%;
    max-width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 2s ease-in-out, visibility 0s linear 2s;
}

#invitation-app.is-visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 2s ease-in-out;
}

#invitation-app.is-visible.is-instant {
    transition: none;
}

.page-wrap {
    padding-inline: max(var(--space-page), var(--safe-inline));
}

.hero-bg {
    min-height: 100dvh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding:
        calc(1.25rem + var(--safe-top))
        max(var(--space-page), var(--safe-inline))
        calc(1.25rem + var(--safe-bottom));
    background-color: var(--page-bg);
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.9) 100%),
        url('https://images.unsplash.com/photo-1519225421980-715cb0215aed?auto=format&fit=crop&w=800&q=75');
    background-size: cover;
    background-position: center 25%;
}

.hero-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
}

.glass-card {
    width: 100%;
    text-align: center;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 0.875rem;
    box-shadow: 0 4px 20px rgba(61, 45, 30, 0.06);
}

@supports (backdrop-filter: blur(8px)) {
    .glass-card {
        background: rgba(255, 255, 255, 0.55);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

#hero-verse { padding: 1rem 0.85rem; }
#hero-verse p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--ink-muted);
}

#hero-names {
    padding: 1rem 0.5rem;
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(189, 154, 95, 0.3);
}
#hero-names h1 {
    margin: 0;
    font-size: 2.75rem;
    line-height: 1.1;
    color: var(--gold);
    font-weight: 700;
    word-break: keep-all;
}

.hero-invite {
    padding: 1rem 1rem 1.1rem;
}

.hero-invite-lead {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.55;
}

.hero-invite-body {
    margin: 0 0 0.65rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--ink-muted);
    line-height: 1.5;
}

.hero-invite-date {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1.5;
}

.gold-divider {
    width: 3rem;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 0.15rem auto;
    flex-shrink: 0;
}

.section-countdown {
    padding-block: var(--space-section);
    padding-inline: max(var(--space-page), var(--safe-inline));
    background: #fff;
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
}

.section-title {
    margin: 0 0 1.5rem;
    font-family: 'Amiri', serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--gold);
}

/* Countdown: single-row glass strip (RTL-friendly); flex splits width on narrow screens */
#countdown.timer-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: stretch;
    gap: clamp(0.12rem, 1.5vw, 0.65rem);
    width: 100%;
    max-width: min(100%, 26rem);
    margin-inline: auto;
    padding: 1rem clamp(0.15rem, 1.5vw, 0.5rem);
    box-sizing: border-box;
}

.timer-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    max-width: 5rem;
    min-height: clamp(3.5rem, 14vw, 5.15rem);
    padding: 0.35rem clamp(0.12rem, 1.2vw, 0.28rem);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(189, 154, 95, 0.38);
    border-radius: 0.95rem;
    box-shadow:
        0 4px 18px rgba(45, 45, 45, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    font-variant-numeric: tabular-nums;
}

@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
    .timer-unit {
        background: rgba(255, 255, 255, 0.58);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

.timer-number {
    font-family: 'Cairo', sans-serif;
    font-size: clamp(0.78rem, 2.4vw + 0.55rem, 1.65rem);
    font-weight: 800;
    color: var(--ink);
    line-height: 1.1;
}

.timer-label {
    font-family: 'Amiri', serif;
    font-size: clamp(0.58rem, 1.8vw + 0.32rem, 0.88rem);
    font-weight: 700;
    color: var(--gold);
    margin-top: 0.12rem;
    opacity: 0.92;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.timer-sep {
    flex: 0 0 auto;
    align-self: center;
    margin-block: 0;
    padding-block: 0;
    font-family: 'Cairo', sans-serif;
    font-size: clamp(0.7rem, 2vw + 0.45rem, 1.35rem);
    font-weight: 800;
    line-height: 1;
    color: var(--gold);
    opacity: 0.55;
    transform: translateY(-0.35em);
}

.section-details {
    padding-block: var(--space-section);
    padding-inline: max(var(--space-page), var(--safe-inline));
    padding-bottom: calc(var(--space-section) + var(--safe-bottom));
    background: var(--page-bg);
    max-width: 100%;
    box-sizing: border-box;
}


/* ── Events timeline ── */
.events-timeline {
    position: relative;
    width: 100%;
    max-width: min(26rem, 100%);
    margin-inline: auto;
    padding-inline-end: min(2.85rem, 12vw);
    box-sizing: border-box;
    --timeline-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

.timeline-rail {
    position: absolute;
    inset-inline-end: 0.55rem;
    top: 0.85rem;
    bottom: 0.85rem;
    width: 2.25rem;
    pointer-events: none;
    z-index: 0;
}

.timeline-line {
    position: absolute;
    inset-inline: 0;
    margin-inline: auto;
    width: 4px;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(
        180deg,
        rgba(189, 154, 95, 0.12) 0%,
        rgba(189, 154, 95, 0.35) 48%,
        rgba(189, 154, 95, 0.12) 100%
    );
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.timeline-line-progress {
    position: absolute;
    inset-inline: 0;
    margin-inline: auto;
    top: 0;
    width: 4px;
    height: 0;
    border-radius: 999px;
    overflow: visible;
    background: linear-gradient(
        165deg,
        #dfc48a 0%,
        var(--gold) 38%,
        var(--gold-dark) 100%
    );
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.45),
        0 0 18px rgba(189, 154, 95, 0.55),
        0 0 32px rgba(189, 154, 95, 0.2);
}

.timeline-line-progress::after {
    content: "";
    position: absolute;
    inset-inline-start: -2px;
    width: calc(100% + 4px);
    height: min(42%, 5.5rem);
    top: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 248, 230, 0.85) 0%, transparent 92%);
    opacity: 0;
    pointer-events: none;
}

.events-timeline.is-active .timeline-line-progress,
.events-timeline.is-complete .timeline-line-progress {
    height: 100%;
}

.events-timeline.is-active .timeline-line-progress {
    transition: height 2.1s var(--timeline-ease-out);
}

.events-timeline.is-active .timeline-line-progress::after {
    animation: timeline-shimmer-slide 2s var(--timeline-ease-out) 0.1s forwards;
}

@keyframes timeline-shimmer-slide {
    0% {
        opacity: 0;
        transform: translateY(-20%);
    }
    18% {
        opacity: 0.95;
    }
    100% {
        opacity: 0;
        transform: translateY(min(520%, 42rem));
    }
}

.timeline-node {
    position: absolute;
    inset-inline: 0;
    margin-inline: auto;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff8e8, var(--gold) 52%, var(--gold-dark));
    border: 3px solid #fff;
    box-shadow:
        0 0 0 2px rgba(189, 154, 95, 0.45),
        0 6px 14px rgba(61, 45, 30, 0.18);
    opacity: 0;
    transform: scale(0.35);
    z-index: 1;
}

.timeline-node--first {
    top: 0;
}

.timeline-node--second {
    bottom: 0;
}

.events-timeline.is-active .timeline-node--first,
.events-timeline.is-complete .timeline-node--first {
    animation: timeline-node-pop 0.65s var(--timeline-ease-out) 0.08s forwards;
}

.events-timeline.is-active .timeline-node--second,
.events-timeline.is-complete .timeline-node--second {
    animation: timeline-node-pop 0.65s var(--timeline-ease-out) 1.45s forwards;
}

.events-timeline.is-active .timeline-node--first::before,
.events-timeline.is-complete .timeline-node--first::before,
.events-timeline.is-active .timeline-node--second::before,
.events-timeline.is-complete .timeline-node--second::before {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid rgba(189, 154, 95, 0.25);
    opacity: 0;
    animation: timeline-node-ring 1.1s var(--timeline-ease-out) 2.05s forwards;
}

.events-timeline.is-active .timeline-node--second::before,
.events-timeline.is-complete .timeline-node--second::before {
    animation-delay: 2.15s;
}

@keyframes timeline-node-pop {
    0% {
        opacity: 0;
        transform: scale(0.35);
    }
    70% {
        opacity: 1;
        transform: scale(1.12);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes timeline-node-ring {
    0% {
        opacity: 0.8;
        transform: scale(0.75);
    }
    100% {
        opacity: 0;
        transform: scale(1.85);
    }
}

.timeline-gap {
    position: absolute;
    top: 50%;
    inset-inline-start: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    min-width: 8rem;
    max-width: 11rem;
    padding: 0.42rem 0.75rem;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    letter-spacing: 0.02em;
    color: var(--gold-dark);
    background: linear-gradient(145deg, #fffefb 0%, #fff 100%);
    border: 1px solid rgba(189, 154, 95, 0.5);
    border-radius: 999px;
    box-shadow:
        0 2px 0 rgba(189, 154, 95, 0.12),
        0 8px 22px rgba(189, 154, 95, 0.16);
    white-space: normal;
    opacity: 0;
    z-index: 2;
}

.events-timeline.is-active .timeline-gap,
.events-timeline.is-complete .timeline-gap {
    animation:
        timeline-gap-in 0.75s var(--timeline-ease-out) 0.92s forwards,
        timeline-gap-breathe 2.8s ease-in-out 1.95s infinite;
}

@keyframes timeline-gap-in {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.88);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes timeline-gap-breathe {
    0%, 100% {
        box-shadow:
            0 2px 0 rgba(189, 154, 95, 0.12),
            0 8px 22px rgba(189, 154, 95, 0.16);
    }
    50% {
        box-shadow:
            0 2px 0 rgba(189, 154, 95, 0.18),
            0 12px 28px rgba(189, 154, 95, 0.28);
    }
}

.timeline-event {
    position: relative;
    z-index: 1;
    margin-bottom: 2.15rem;
}

.timeline-event:last-child {
    margin-bottom: 0;
}

.timeline-event__inner {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    opacity: 0;
    transform: translate3d(0, 1.35rem, 0);
}

.events-timeline.is-active .timeline-event:nth-child(2) .timeline-event__inner,
.events-timeline.is-complete .timeline-event:nth-child(2) .timeline-event__inner {
    animation: timeline-stack-in 0.85s var(--timeline-ease-out) 0.12s forwards;
}

.events-timeline.is-active .timeline-event:nth-child(3) .timeline-event__inner,
.events-timeline.is-complete .timeline-event:nth-child(3) .timeline-event__inner {
    animation: timeline-stack-in 0.92s var(--timeline-ease-out) 0.55s forwards;
}

@keyframes timeline-stack-in {
    0% {
        opacity: 0;
        transform: translate3d(0, 1.5rem, 0);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
        filter: blur(0);
    }
}

.timeline-top {
    display: flex;
    align-items: stretch;
    gap: 0.55rem;
}

.timeline-step {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 2.15rem;
    min-height: 3.05rem;
    align-self: stretch;
    font-family: "Amiri", "Noto Naskh Arabic", serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gold-dark);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 251, 240, 0.88) 100%);
    border: 1px solid rgba(189, 154, 95, 0.4);
    border-radius: 0.75rem;
    box-shadow: 0 4px 14px rgba(61, 45, 30, 0.07);
}

.timeline-event--wedding .timeline-step {
    color: var(--ink);
    background: linear-gradient(165deg, rgba(189, 154, 95, 0.12) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.timeline-date-card {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: auto auto auto 1fr;
    grid-template-rows: auto auto;
    align-items: end;
    gap: 0 0.15rem;
    padding: 0.82rem 0.92rem;
    background: linear-gradient(135deg, rgba(189, 154, 95, 0.16) 0%, rgba(255, 255, 255, 0.92) 62%);
    border-radius: 0.95rem;
    border: 1px solid rgba(189, 154, 95, 0.38);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.75) inset,
        0 8px 24px rgba(61, 45, 30, 0.08);
    transition: transform 0.35s var(--timeline-ease-out), box-shadow 0.35s ease;
}

.timeline-date-card--wedding {
    background: linear-gradient(135deg, rgba(189, 154, 95, 0.1) 0%, rgba(255, 255, 255, 0.9) 45%, rgba(189, 154, 95, 0.14) 100%);
}

@media (hover: hover) and (pointer: fine) {
    .timeline-event__inner:hover .timeline-date-card {
        transform: translateY(-2px);
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.85) inset,
            0 12px 32px rgba(61, 45, 30, 0.1);
    }
}

.date-day {
    grid-row: 1 / 3;
    font-size: 2.75rem;
    line-height: 1;
    color: var(--gold);
    font-weight: 700;
    margin-inline-end: 0.25rem;
}

.date-sep {
    grid-row: 1;
    font-size: 1.5rem;
    color: var(--gold-dark);
    opacity: 0.7;
    align-self: center;
}

.date-month-num {
    grid-row: 1;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1;
}

.date-month-name {
    grid-column: 3;
    grid-row: 2;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gold-dark);
}

.date-year {
    grid-column: 4;
    grid-row: 2;
    justify-self: end;
    font-size: 0.8rem;
    color: var(--ink-muted);
}

.detail-card {
    position: relative;
    background: linear-gradient(178deg, #fffefc 0%, #fff 45%, #faf8f6 100%);
    border-radius: 1rem;
    padding: 1.35rem 1.15rem;
    text-align: center;
    border: 1px solid rgba(189, 154, 95, 0.22);
    border-block-start-width: 3px;
    border-block-start-color: var(--gold);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 10px 36px rgba(61, 45, 30, 0.08);
    overflow: hidden;
    transition:
        transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.38s ease;
}

.events-timeline .detail-card::before {
    content: "";
    position: absolute;
    inset-inline-start: -40%;
    top: -50%;
    width: 55%;
    height: 120%;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.5) 50%, transparent 65%);
    transform: skewX(-12deg);
    opacity: 0;
    pointer-events: none;
}

.events-timeline.is-active .timeline-event:nth-child(2) .detail-card::before,
.events-timeline.is-complete .timeline-event:nth-child(2) .detail-card::before {
    animation: timeline-card-shine 0.9s ease-out 1.15s forwards;
}

.events-timeline.is-active .timeline-event:nth-child(3) .detail-card::before,
.events-timeline.is-complete .timeline-event:nth-child(3) .detail-card::before {
    animation: timeline-card-shine 0.9s ease-out 1.65s forwards;
}

@keyframes timeline-card-shine {
    0% {
        opacity: 0;
        transform: skewX(-12deg) translateX(-18%);
    }
    35% {
        opacity: 0.7;
    }
    100% {
        opacity: 0;
        transform: skewX(-12deg) translateX(220%);
    }
}

.detail-card .badge {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.04em;
}

.detail-card h3 {
    margin: 0 0 0.65rem;
    font-size: 1.35rem;
    font-weight: 700;
}

.detail-card .meta {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    color: var(--ink-muted);
}

.detail-card .place {
    margin: 0 0 1.15rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.55;
}

.detail-card .place-note {
    display: block;
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--ink-muted);
    margin-top: 0.25rem;
}

.btn-map {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: var(--touch-min);
    padding: 0.75rem 1.25rem;
    background: var(--gold);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 9999px;
    box-shadow: 0 4px 12px rgba(189, 154, 95, 0.3);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-map:active {
    background: var(--gold-dark);
    transform: scale(0.98);
}

.btn-map svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.btn-calendar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: var(--touch-min);
    margin-top: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--ink);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(45, 45, 45, 0.25);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-calendar:active {
    background: #2a2a2a;
    transform: scale(0.98);
}

.btn-calendar svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.site-footer {
    background: #2d2d2d;
    color: #fff;
    text-align: center;
    padding:
        2rem max(var(--space-page), var(--safe-inline))
        calc(2rem + var(--safe-bottom));
}

.site-footer .line-main {
    margin: 0 0 0.65rem;
    font-family: 'Amiri', serif;
    font-size: 1.35rem;
    line-height: 1.5;
}

.site-footer .line-sub {
    margin: 0;
    font-size: 0.95rem;
    color: #a3a3a3;
}

.site-footer .line-sign {
    margin: 1.25rem 0 0;
    font-family: 'Amiri', serif;
    font-size: 0.9rem;
    color: rgba(189, 154, 95, 0.9);
}

/* When countdown finishes, #countdown loses .timer-container */
.countdown-done {
    margin: 0;
    font-family: 'Amiri', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    padding: 1rem 0;
    text-align: center;
    width: 100%;
}

.calendar-cta {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(189, 154, 95, 0.2);
    text-align: center;
}

.calendar-cta p {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    color: var(--ink-muted);
}

.btn-calendar-day {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 22rem;
    min-height: var(--touch-min);
    margin-inline: auto;
    padding: 0.85rem 1.5rem;
    background: var(--ink);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(45, 45, 45, 0.22);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-calendar-day:active {
    background: #2a2a2a;
    transform: scale(0.98);
}

/* Narrow phones: timeline + date card stay inside viewport (RTL rail padding) */
@media (max-width: 639px) {
    .events-timeline {
        padding-inline-end: 2.15rem;
    }

    .timeline-top {
        gap: 0.4rem;
        min-width: 0;
    }

    .timeline-step {
        width: 1.85rem;
        min-height: 2.65rem;
        font-size: 0.95rem;
    }

    .timeline-date-card {
        padding: 0.62rem 0.55rem;
        min-width: 0;
    }

    .date-day {
        font-size: clamp(1.65rem, 8vw, 2.35rem);
        margin-inline-end: 0.15rem;
    }

    .date-sep {
        font-size: 1.15rem;
    }

    .date-month-num {
        font-size: 1.2rem;
    }

    .date-month-name {
        font-size: 0.82rem;
    }

    .date-year {
        font-size: 0.72rem;
    }
}

@media (min-width: 640px) {
    :root {
        --space-page: 1.25rem;
        --space-section: 3.25rem;
    }

    .hero-bg {
        background-image:
            linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.88) 100%),
            url('https://images.unsplash.com/photo-1519225421980-715cb0215aed?auto=format&fit=crop&w=1200&q=80');
    }

    .hero-stack {
        gap: 0.9rem;
        max-width: 36rem;
        align-items: center;
    }

    .glass-card { border-radius: 1rem; }

    #hero-verse { padding: 1.2rem 1.25rem; }
    #hero-verse p { font-size: 1.2rem; }

    #hero-names { padding: 1.25rem 1rem; }
    #hero-names h1 { font-size: 3.5rem; }

    .hero-invite-lead { font-size: 1.12rem; }
    .hero-invite-date { font-size: 1.1rem; }

    .section-title { font-size: 1.85rem; margin-bottom: 1.75rem; }

    #countdown.timer-container {
        max-width: 28rem;
        gap: 0.55rem;
        padding: 1.15rem 0.5rem;
    }

    .timer-unit {
        max-width: 5.5rem;
        min-height: 5rem;
        border-radius: 1rem;
    }

    .timer-number { font-size: 1.65rem; }
    .timer-label { font-size: 0.82rem; }
    .timer-sep { font-size: 1.25rem; }

    .detail-card { padding: 1.5rem 1.35rem; }
    .detail-card h3 { font-size: 1.5rem; }

    .btn-map,
    .btn-calendar { width: auto; min-width: 12rem; margin-inline: auto; }

    .site-footer .line-main { font-size: 1.65rem; }
}

@media (min-width: 768px) {
    :root {
        --space-page: 1.5rem;
        --space-section: 4rem;
    }

    .hero-bg {
        background-image:
            linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(252, 251, 249, 0.92) 100%),
            url('https://images.unsplash.com/photo-1519225421980-715cb0215aed?auto=format&fit=crop&w=1920&q=80');
        background-attachment: fixed;
    }

    .hero-stack {
        gap: 1rem;
        max-width: 52rem;
    }

    @supports (backdrop-filter: blur(12px)) {
        .glass-card {
            background: rgba(255, 255, 255, 0.52);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
        }
    }

    #hero-verse { padding: 1.5rem 2rem; }
    #hero-verse p { font-size: 1.45rem; line-height: 1.85; }

    #hero-names {
        padding: 1.5rem 2rem;
        box-shadow: 0 12px 40px rgba(189, 154, 95, 0.12);
    }
    #hero-names h1 { font-size: 5.5rem; }

    .hero-invite { max-width: 38rem; padding: 1.15rem 2rem; }
    .hero-invite-lead { font-size: 1.35rem; }
    .hero-invite-body { font-size: 1.15rem; }
    .hero-invite-date { font-size: 1.25rem; }

    .gold-divider { width: 4rem; }

    .section-title { font-size: 2.25rem; }

    #countdown.timer-container {
        max-width: 34rem;
        gap: 0.75rem;
        padding: 1.25rem 0.65rem;
    }

    .timer-unit {
        max-width: 6rem;
        min-height: 5.35rem;
    }

    .timer-number { font-size: 1.85rem; }
    .timer-label { font-size: 0.88rem; }
    .timer-sep { font-size: 1.4rem; }

    .events-timeline {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        grid-template-rows: auto;
        gap: 1.5rem 0;
        max-width: 56rem;
        padding-inline-end: 0;
        align-items: stretch;
    }

    .timeline-rail {
        position: relative;
        grid-column: 2;
        grid-row: 1;
        inset: auto;
        top: auto;
        bottom: auto;
        width: 3rem;
        min-height: 100%;
        margin-block: 1rem;
    }

    .timeline-gap {
        min-width: 8.5rem;
        font-size: 0.75rem;
    }

    .timeline-event {
        margin-bottom: 0;
    }

    .timeline-event:first-of-type {
        grid-column: 1;
        grid-row: 1;
    }

    .timeline-event:last-of-type {
        grid-column: 3;
        grid-row: 1;
    }

    .detail-card {
        padding: 2rem 1.75rem;
        border-block-start-width: 4px;
        transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

    .detail-card h3 { font-size: 1.75rem; }

    .site-footer .line-main { font-size: 2rem; }
    .site-footer .line-sub { font-size: 1.05rem; }
}

@media (min-width: 1024px) {
    #hero-names h1 { font-size: 7rem; }
    .section-title { font-size: 2.5rem; }

    .timer-number { font-size: 2rem; }
    .timer-unit {
        max-width: 6.25rem;
        min-height: 5.5rem;
    }
}

@media (hover: hover) and (pointer: fine) {
    .btn-map:hover {
        background: var(--gold-dark);
        transform: scale(1.02);
    }
    .btn-calendar:hover {
        background: #2a2a2a;
        transform: scale(1.02);
    }
    .btn-calendar-day:hover {
        background: #2a2a2a;
        transform: scale(1.02);
    }
    .detail-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 14px 40px rgba(61, 45, 30, 0.1);
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .detail-card { transition: none; }
    #invitation-app {
        transition: none;
    }

    .timeline-line-progress {
        transition: none;
        height: 100%;
    }

    .timeline-line-progress::after {
        animation: none !important;
        opacity: 0;
    }

    .timeline-node,
    .timeline-gap {
        animation: none !important;
        opacity: 1;
        transform: none;
    }

    .timeline-node {
        transform: scale(1);
    }

    .timeline-node::before {
        animation: none !important;
        opacity: 0;
    }

    .timeline-gap {
        transform: translate(-50%, -50%) scale(1);
    }

    .timeline-event .timeline-event__inner {
        animation: none !important;
        opacity: 1;
        transform: none;
        filter: none;
    }

    .events-timeline .detail-card::before {
        animation: none !important;
    }
}
