.christmas-page {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    min-height: 100vh;
    min-height: 100svh;
}

.christmas-backdrop {
    position: absolute;
    z-index: -2;
    inset: 0 0 auto;
    height: 43rem;
    pointer-events: none;
    background:
        linear-gradient(180deg, #0b110f20 0%, transparent 48%, #0b110f27 74%, var(--paper) 100%),
        radial-gradient(ellipse at 50% 58%, #6b481b46, transparent 51%),
        url("winter-scene.webp") center bottom / cover no-repeat;
}

.snowfall {
    position: fixed;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.christmas-page .main { padding-bottom: 2rem; }
.christmas-page .footer { margin-top: auto; }
.christmas-page .navigation a { color: #f5d9ac; }
.christmas-page .navigation a:hover { background: #8e673027; }
.christmas-page .entry {
    background: #101914e8;
    border-color: var(--line);
    box-shadow: 0 1.2rem 4rem #0005;
}

.gift-scene {
    --gold: #ecc893;
    --light-gold: #ffe7b6;
    max-width: 51rem;
    margin-inline: auto;
    padding-top: .5rem;
    text-align: center;
}

.scene-edition {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .72rem;
    color: var(--gold);
    font-size: .84rem;
    letter-spacing: .21em;
    text-transform: uppercase;
    font-weight: 650;
}

.scene-edition::before, .scene-edition::after {
    content: "";
    width: 1.45rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c59c60b8);
}

.scene-edition::after { transform: rotate(180deg); }

.scene-title {
    margin: .67rem auto 0;
    color: var(--cream);
    font-size: clamp(2.9rem, 7vw, 5.65rem);
    letter-spacing: -.055em;
    line-height: .98;
    text-wrap: balance;
    text-shadow: 0 .16em .38em #0009;
}

.scene-intro {
    margin-top: .85rem;
    color: #e3d5bb;
    font-size: clamp(1rem, 2.3vw, 1.22rem);
    text-wrap: balance;
}

.present-stage {
    display: block;
    width: min(21rem, 74%);
    margin: 1.85rem auto 1.4rem;
}

.present-stage.present-form { margin-top: clamp(3.9rem, 6vw, 4.85rem); }

.present-art {
    --lid-lift: translate(13%, -28%) rotate(11deg);
    position: relative;
    isolation: isolate;
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    pointer-events: none;
    transition: transform .24s ease-out;
}

.present-shadow {
    position: absolute;
    z-index: -2;
    inset: 87% -4% -11%;
    background: radial-gradient(ellipse, #000b 12%, #0007 42%, transparent 70%);
}

.present-art::before {
    content: "";
    position: absolute;
    z-index: -3;
    inset: -25% -15% -22%;
    background: radial-gradient(ellipse 50% 50% at 50% 50%, #bb782578, #9c581628 35%, transparent);
}

.present-box, .present-lid {
    position: absolute;
    inset: 0;
    background: url("winter-present.webp") center / contain no-repeat;
}

.present-box { clip-path: inset(46.8% 0 0); }
.present-lid { clip-path: inset(0 0 53%); transform-origin: 57% 40%; }

.present-rim {
    position: absolute;
    inset: 38% 4.8% 52.8%;
    clip-path: polygon(6% 1%, 94% 1%, 100% 100%, 0 100%);
    background: radial-gradient(ellipse at 50% 85%, #fff0be, #d08b31 46%, #6b2925 88%);
    border: 1px solid #ffca7d;
    opacity: 0;
}

.present-glow {
    position: absolute;
    inset: -25% -15% 7%;
    background: radial-gradient(ellipse 50% 50% at 50% 50%, #ffdb8cae, #e8a14665 29%, transparent);
    opacity: 0;
}

.present-sparks { position: absolute; inset: -23% -13% 35%; opacity: 0; }
.present-sparks i { position: absolute; color: #ffe5a8; font: normal 1.1rem/1 var(--serif); text-shadow: 0 0 .8rem #ffc163; }
.present-sparks i:nth-child(1) { left: 17%; top: 41%; font-size: 1.55rem; }
.present-sparks i:nth-child(2) { left: 32%; top: 17%; }
.present-sparks i:nth-child(3) { left: 59%; top: 34%; font-size: .9rem; }
.present-sparks i:nth-child(4) { right: 17%; top: 49%; font-size: .78rem; }

.present-button {
    display: block;
    width: 100%;
    border: 0;
    border-radius: .85rem;
    padding: 0;
    color: inherit;
    font: inherit;
    background: none;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.scene-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: .63rem 1.38rem;
    border: 1px solid #fae1ad;
    border-radius: 2rem;
    color: #2c1c11;
    font-size: 1rem;
    font-weight: 720;
    background: linear-gradient(155deg, #ffe5b2, #dba963 94%);
    box-shadow: 0 .25rem 1.35rem #e4aa5140, inset 0 1px #ffedc3;
}

.present-button .scene-button { margin-top: 1.25rem; }
.present-button[aria-disabled="true"] { cursor: progress; }
.present-button[aria-disabled="true"] .scene-button { opacity: .75; }
.present-button:hover .scene-button { background: #ffe6bb; }
@media (hover: hover) {
    .present-form:not(.is-opening) .present-button:hover .present-art { transform: translateY(-.22rem); }
}

.present-open .present-lid { transform: var(--lid-lift); }
.present-open :is(.present-glow, .present-rim, .present-sparks) { opacity: 1; }
.is-opening .present-lid { animation: lift-lid 1020ms cubic-bezier(.22,.64,.28,1) both; }
.is-opening :is(.present-glow, .present-rim) { animation: spill-light 800ms 140ms ease-out both; }
.is-opening .present-sparks { animation: rise-sparks 850ms 165ms ease-out both; }

@keyframes lift-lid {
    0% { transform: none; }
    17% { transform: translateY(1.3%) rotate(-1.8deg); }
    52% { transform: translate(6%, -33%) rotate(6deg); }
    100% { transform: var(--lid-lift); }
}

@keyframes spill-light {
    0% { opacity: 0; }
    50% { opacity: .94; }
    100% { opacity: 1; }
}

@keyframes rise-sparks {
    0% { opacity: 0; transform: translateY(20%) scale(.77); }
    54% { opacity: 1; }
    100% { opacity: 1; transform: none; }
}

.scene-revealed .scene-title {
    color: var(--light-gold);
    text-shadow: 0 0 .5em #e9a73e4d, 0 .1em .5em #0009;
    animation: show-name .6s ease-out both;
}

.scene-revealed .present-stage { margin-top: clamp(4.65rem, 7vw, 5.2rem); }

@keyframes show-name {
    from { opacity: .75; transform: translateY(.22rem); }
    to { opacity: 1; transform: none; }
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(100%, 29rem);
    margin: 1.55rem auto 0;
}

.time-block { padding: .08rem .25rem .15rem; }
.time-block + .time-block { border-inline-start: 1px solid #d7a65a55; }
.time-block span {
    display: block;
    color: var(--light-gold);
    font: 400 clamp(1.85rem, 6vw, 3.25rem)/1 var(--serif);
    font-variant-numeric: tabular-nums lining-nums;
}
.time-block small { display: block; margin-top: .43rem; color: #e7d3ae; font-size: .86rem; }

.scene-details {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .72rem 1.95rem;
    max-width: 42rem;
    margin: 1.65rem auto 0;
    border-top: 1px solid var(--line);
    padding-top: .9rem;
    color: #eadbc0;
    font-size: .93rem;
}

.scene-details div { display: grid; gap: .18rem; }
.scene-details dt { color: var(--muted); }
.scene-details dd { font-weight: 650; }
.exchange-countdown { display: block; color: var(--gold); font-weight: 500; }
.scene-access { margin-top: 1rem; color: var(--muted); }
.family-choices { display: flex; justify-content: center; flex-wrap: wrap; gap: .75rem; }
.scene-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    color: var(--gold);
    text-underline-offset: .28rem;
}

.recipient-section { max-width: 42rem; margin: 1.8rem auto 0; text-align: center; }
.recipient-section h2 { margin-bottom: 1rem; }
.recipient-section .empty { border-top: 1px solid var(--line); }
.christmas-page .gift-card {
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    padding: 1rem 0;
    text-align: left;
    background: transparent;
}
.christmas-page .gift-list { gap: 0; }
.christmas-page .content-panel { background: #141e18e8; }

@media (max-width: 680px) {
    .christmas-backdrop {
        height: 37rem;
        background: radial-gradient(ellipse at 50% 61%, #73502143, transparent 62%);
    }

    .christmas-backdrop::before, .christmas-backdrop::after {
        content: "";
        position: absolute;
        inset: 0 auto 0 0;
        width: 51%;
        background: url("winter-scene.webp") left bottom / auto 100% no-repeat;
        mask-image: linear-gradient(90deg, #000 0%, transparent 99%);
        opacity: .55;
    }

    .christmas-backdrop::after {
        inset: 0 0 0 auto;
        background-position: right bottom;
        mask-image: linear-gradient(270deg, #000 0%, transparent 99%);
    }

    .gift-scene { padding-top: .65rem; }
    .scene-title { font-size: clamp(2.75rem, 11.9vw, 4.75rem); }
    .scene-edition { gap: .48rem; letter-spacing: .135em; }
    .scene-edition::before, .scene-edition::after { width: .85rem; }
    .present-stage { margin-block: 1.7rem 1rem; }
    .scene-details { column-gap: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
    .present-art { transition: none; }
    .scene-revealed .scene-title { animation: none; }
}
