/* 01. FONTS & TOKENS */
@font-face {
    font-family: Playfair;
    src: url('../fonts/PlayfairDisplay.ttf') format('truetype');
    font-weight: 400 900;
    font-display: swap;
}

@font-face {
    font-family: Vietnam;
    src: url('../fonts/BeVietnamPro-Regular.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

:root {
    --paper: #fff9fa;
    --surface: #fff;
    --ink: #315e91;
    --text: #3c4f67;
    --muted: #657389;
    --blue: #d5e9f1;
    --blue-soft: #f0f7fa;
    --pink: #f5e5e9;
    --border: #e9e2e5;
    --serif: Playfair, Georgia, serif;
    --body: Vietnam, Arial, sans-serif;
    --shadow: 0 14px 45px #315e910d;
}

/* 02. BASE & ACCESSIBILITY */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body,
.opening,
#main {
    touch-action: manipulation;
}

html {
    overscroll-behavior-x: none;
    color-scheme: light;
    scroll-behavior: auto;
    scroll-padding-top: 32px;
    overflow-x: clip;
}

@media (hover: hover) and (pointer: fine) {
    html,
    .opening,
    .modal-body,
    textarea {
        scrollbar-width: thin;
        scrollbar-color: #8ba7c8 var(--paper);
    }

    ::-webkit-scrollbar {
        width: 10px;
        height: 10px;
    }

    ::-webkit-scrollbar-track {
        background: var(--paper);
    }

    ::-webkit-scrollbar-thumb {
        background: #8ba7c8;
        border: 2px solid var(--paper);
        border-radius: 10px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: var(--ink);
    }
}

main {
    overflow-x: clip;
}

body {
    margin: 0;
    overflow-x: clip;
    background: var(--paper);
    color: var(--text);
    font: 14px/1.85 var(--body);
    -webkit-tap-highlight-color: transparent;
}

body:has(.opening:not([hidden])) {
    overflow: hidden;
}

body[data-modal-open] {
    position: fixed;
    width: 100%;
    overflow: hidden;
}

body[data-modal-open] .music-button,
body[data-modal-open] .stream-pill,
body[data-keyboard] .music-button,
body[data-keyboard] .stream-pill {
    visibility: hidden;
}

[hidden] {
    display: none !important;
}

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

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

p+p {
    margin-top: 16px;
}

h1,
h2,
h3 {
    font-family: var(--serif);
    color: var(--ink);
    font-weight: 400;
    line-height: 1.25;
}

h2 {
    font-size: clamp(30px, 3.5vw, 46px);
}

h3 {
    font-size: 25px;
}

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

button,
input,
textarea {
    font: inherit;
}

button,
a,
input,
textarea {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
    color: inherit;
}

button:disabled {
    cursor: default;
    opacity: 0.55;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 5px;
}

html[data-pointer-input] button:focus,
html[data-pointer-input] button:focus-visible,
html[data-pointer-input] a:focus,
html[data-pointer-input] a:focus-visible {
    outline: none;
}

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}

fieldset:disabled {
    cursor: progress;
}

::selection {
    background: var(--pink);
}

.sr-only,
.skip-link:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link:focus {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 30;
    background: white;
    padding: 12px;
}

/* 03. SHARED LAYOUT & CONTROLS */

.container {
    width: min(1120px, calc(100% - 80px));
    margin-inline: auto;
}

.section {
    padding-block: 64px;
}

.section+.section,
.hero+.section {
    padding-top: 0;
}

.eyebrow {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.22em;
    color: var(--ink);
    line-height: 1.8;
}

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

.section-heading h2 {
    margin: 12px 0 20px;
    letter-spacing: -0.018em;
}

.section-heading p:not(.eyebrow) {
    color: var(--muted);
    text-wrap: balance;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    min-height: 48px;
    padding: 12px 23px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--surface);
    color: var(--ink);
    font-size: 13px;
    transition:
        background 0.2s,
        transform 0.2s;
}

.button-primary {
    background: var(--blue);
    border-color: var(--blue);
}

.button-secondary {
    background: var(--pink);
    border-color: #d2aeb9;
    color: var(--ink);
    font-weight: 600;
}

form[data-busy='true'] .button[type='submit'] {
    opacity: 0.82;
    cursor: wait;
}

.button-wide {
    width: 100%;
    margin-top: 22px;
}

.text-button {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: none;
    border: 0;
    border-bottom: 1px solid #315e9155;
    padding: 6px 0;
    color: var(--ink);
    font-size: 12px;
}

.icon-button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    font: 28px/1 var(--serif);
}

.icon-button:focus:not(:focus-visible),
html[data-pointer-input] .icon-button:focus,
html[data-pointer-input] .icon-button:focus-visible {
    outline: none;
}

.icon-button svg {
    display: block;
    width: 16px;
    height: 16px;
}

.actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* 04. OPENING & ENVELOPE */
.opening {
    --opening-unseal-ms: 2400;
    --opening-exit-ms: 700;
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: 100%;
    z-index: 20;
    background: #faf8f4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 24px;
    min-height: 100svh;
    overflow: auto;
    overflow-x: hidden;
    transition: opacity calc(var(--opening-exit-ms) * 1ms) cubic-bezier(.4, 0, 1, 1);
}

.opening[data-leaving] {
    opacity: 0;
    pointer-events: none;
}

.opening-title {
    max-width: 100%;
    margin: 0;
    font: 28px/1.4 var(--serif);
    color: var(--ink);
    text-align: center;
    text-wrap: balance;
}

.opening>.signature {
    margin: -14px 0 0;
    max-width: min(440px, 100%);
    text-align: center;
    overflow-wrap: anywhere;
    font-size: clamp(24px, 4vw, 32px);
    transition: opacity .2s;
}

.opening[data-unsealed]>.signature {
    opacity: 0;
}

.opening-note {
    font-size: 13px;
    text-align: center;
    color: var(--ink);
    max-width: 360px;
    transition: opacity 0.12s;
}

.envelope {
    container-type: inline-size;
    position: relative;
    perspective: 1000px;
    isolation: isolate;
    flex-shrink: 0;
    width: min(480px, 100%);
    aspect-ratio: 440 / 285;
    margin: 14px 0 10px;
    background: #f5f0e7;
    outline: 1px solid #ded4c5;
    border-radius: 3px;
    box-shadow: 0 16px 30px -20px #70515c40, 0 2px 5px #70515c12;
}



.envelope-letter {
    position: absolute;
    z-index: 1;
    inset: 0 5% 9%;
    background: #fff;
    text-align: center;
    border: 1px solid #e9e2e5;
    padding: 6% 2%;
    font-size: 2.9167cqw;
    line-height: 1.8;
    transition: transform .8s .65s cubic-bezier(.16, 1, .3, 1);
}

.script-names {
    font: 6.0417cqw/1.3 var(--serif);
    color: var(--ink);
    margin: 2.0833cqw 0;
}

.script-names span {
    display: block;
}

.script-names i {
    font-size: 4.375cqw;
    color: #b497a1;
}

.date-line {
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--muted);
}

.envelope-pocket {
    position: absolute;
    z-index: 2;
    inset: 0;
    width: 100%;
    height: 100%;
    fill: #f5f0e7;
    border-radius: 3px;
}

.envelope-flap {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    fill: #f5f0e7;
    filter: drop-shadow(0 2px 2px #76665526);
    transform-origin: top;
    transition: transform .75s .2s cubic-bezier(.4, 0, .2, 1), z-index 0s .57s;
}

.seal {
    position: absolute;
    z-index: 4;
    left: 50%;
    top: 60%;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    width: clamp(52px, 19%, 82px);
    aspect-ratio: 1;
    padding: 0;
    border: 2px solid #cbbb9f;
    border-radius: 48% 52% 49% 51% / 51% 49% 52% 48%;
    background: linear-gradient(145deg, #fff8e9, #eee1c9 70%, #e0cfb1);
    color: #76634c;
    font: 20px/1 var(--serif);
    box-shadow: 0 2px 3px #79674c25, inset 1px 1px 1px #ffffff70, inset -1px -1px 2px #a38c6725;
    touch-action: manipulation;
    transition: opacity .15s, transform .12s;
}

.seal:disabled {
    cursor: wait;
    opacity: .88;
}

.seal:enabled:active {
    transform: translate(-50%, -50%) scale(.94);
}

@media (hover: hover) and (pointer: fine) {
    .seal:enabled:hover {
        transform: translate(-50%, -50%) scale(1.04);
    }
}

.seal svg {
    width: 82%;
    height: 60%;
    overflow: hidden;
}

.seal::after {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px solid #ad967380;
    border-radius: 50%;
    box-shadow: 0 1px 0 #fff8e970, inset 0 1px 1px #95806125;
    pointer-events: none;
}

.seal:enabled::before {
    content: '';
    position: absolute;
    inset: -5px;
    border: 1px solid #b29b78;
    border-radius: 50%;
    pointer-events: none;
    animation: seal-invitation 1.8s ease-out infinite;
}

@keyframes seal-invitation {
    0% { opacity: 0; transform: scale(1); }
    10% { opacity: .65; transform: scale(1); }
    90%, 100% { opacity: 0; transform: scale(1.48); }
}

.seal .seal-ornament {
    position: absolute;
    inset: 5%;
    width: 90%;
    height: 90%;
    fill: none;
    stroke: #927a59;
    stroke-width: 1.15;
    stroke-linecap: round;
    filter: drop-shadow(0 1px 0 #fff9ec80);
    pointer-events: none;
}

.seal-sheen {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    pointer-events: none;
}

.seal-sheen::after {
    content: '';
    position: absolute;
    inset: -60%;
    background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.6) 48%, rgba(255, 255, 255, 0.95) 52%, rgba(255, 255, 255, 0.6) 56%, transparent 68%);
    transform: translateX(-130%) rotate(25deg);
}

.seal:enabled .seal-sheen::after {
    animation: seal-shimmer 2s ease-in-out infinite;
}

@keyframes seal-shimmer {
    0%, 20% { transform: translateX(-130%) rotate(25deg); opacity: 0; }
    30% { opacity: 1; }
    70% { transform: translateX(130%) rotate(25deg); opacity: 1; }
    75%, 100% { transform: translateX(130%) rotate(25deg); opacity: 0; }
}

.opening[data-unsealed] .envelope-flap {
    transform: rotateX(180deg);
    z-index: 0;
}

.opening[data-unsealed] .envelope-letter {
    transform: translateY(-52%);
}

.opening[data-unsealed] .seal {
    opacity: 0;
    animation: seal-release .4s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes seal-release {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(.94); }
    35% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, calc(-50% - 18px)) rotate(-8deg) scale(1.06); }
}

.opening[data-unsealed]>.opening-title {
    visibility: hidden;
}

.opening[data-unsealed] .opening-note {
    opacity: 0;
    pointer-events: none;
}

/* 05. MASTHEAD & HERO */
.masthead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 25px;
    border-bottom: 1px solid var(--border);
}

.monogram {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.monogram svg {
    display: block;
    width: 88px;
    height: 48px;
}

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 80px;
    padding-block: 56px 80px;
}

.hero-copy {
    text-align: center;
}


.hero h1 {
    font-size: clamp(45px, 5.6vw, 78px);
    line-height: 1.16;
    margin: 30px 0 26px;
    letter-spacing: -0.025em;
}

.hero h1 span {
    display: block;
}

.hero h1 em {
    display: block;
    font-style: italic;
    font-size: 0.4em;
    color: #957b85;
    margin: 14px 0;
}

.hero-intro {
    max-width: 100%;
    margin-inline: auto;
    color: var(--muted);
    font-size: 13px;
    text-wrap: balance;
}

.date-stamp {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin: 28px 0;
    font: 27px/1.2 var(--serif);
    font-variant-numeric: lining-nums tabular-nums;
    color: var(--ink);
}

.date-stamp span[aria-hidden] {
    font-size: 16px;
}

.hero-photo {
    width: min(100%, 410px);
    margin-inline: auto;
    position: relative;
    background: var(--surface);
    box-shadow: none;
    padding: 8px;
    border: 1px solid #cfdde3;
    border-radius: 240px 240px 8px 8px;
}

.hero-photo img {
    aspect-ratio: 2/3;
    border-radius: 230px 230px 3px 3px;
}

.hero-photo figcaption {
    position: absolute;
    bottom: 30px;
    left: -25px;
    background: var(--paper);
    padding: 10px 20px;
    letter-spacing: 0.22em;
    font-size: 9px;
    color: var(--ink);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
}

/* 06. INVITATION & COUPLE */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 85px;
    align-items: center;
}

.photo-frame {
    position: relative;
    padding: 12px 12px 24px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 3px;
    box-shadow:
        0 4px 12px rgba(49, 94, 145, 0.07),
        0 16px 36px rgba(49, 94, 145, 0.12);
    transform: rotate(-3deg);
    margin: 18px 25px 12px;
    text-align: center;
}

.photo-frame::before {
    content: '';
    position: absolute;
    top: -24px;
    right: -6px;
    width: 58px;
    height: 68px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 80' width='70' height='80' fill='none'%3E%3Cpath d='M10 74 C 22 58, 36 38, 56 10' stroke='%234a6d80' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M56 10 C 53 4, 62 3, 65 7 C 65 12, 59 13, 56 10 Z' fill='%2389a7b7' fill-opacity='0.75' stroke='%234a6d80' stroke-width='0.8'/%3E%3Cpath d='M50 20 C 58 17, 66 21, 64 26 C 59 29, 52 25, 50 20 Z' fill='%239bb6c4' fill-opacity='0.8' stroke='%234a6d80' stroke-width='0.8'/%3E%3Cpath d='M46 24 C 38 19, 31 22, 31 28 C 36 31, 43 28, 46 24 Z' fill='%23b2c9d4' fill-opacity='0.7' stroke='%234a6d80' stroke-width='0.8'/%3E%3Cpath d='M39 36 C 49 33, 58 38, 55 45 C 48 47, 41 42, 39 36 Z' fill='%2389a7b7' fill-opacity='0.8' stroke='%234a6d80' stroke-width='0.8'/%3E%3Cpath d='M34 41 C 24 35, 17 40, 18 47 C 23 51, 31 46, 34 41 Z' fill='%23a2bcc9' fill-opacity='0.75' stroke='%234a6d80' stroke-width='0.8'/%3E%3Cpath d='M26 53 C 34 52, 42 58, 39 65 C 32 67, 27 60, 26 53 Z' fill='%239bb6c4' fill-opacity='0.8' stroke='%234a6d80' stroke-width='0.8'/%3E%3Cpath d='M20 58 C 12 55, 6 61, 8 67 C 14 70, 19 64, 20 58 Z' fill='%23b2c9d4' fill-opacity='0.7' stroke='%234a6d80' stroke-width='0.8'/%3E%3Ccircle cx='48' cy='31' r='2.8' fill='%23d6a8b6' fill-opacity='0.85'/%3E%3Ccircle cx='30' cy='48' r='2.8' fill='%23d6a8b6' fill-opacity='0.85'/%3E%3C/svg%3E") no-repeat center / contain;
    transform: rotate(18deg);
    transform-origin: 15% 85%;
    animation: olive-sway 5.5s ease-in-out infinite;
    z-index: 3;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(49, 94, 145, 0.12));
}

.photo-frame img {
    display: block;
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
}

.photo-frame figcaption {
    margin-top: 12px;
    font: italic 16px/1.2 var(--serif);
    color: var(--ink);
    letter-spacing: 0.03em;
    opacity: 0.88;
}

.invitation-copy h2 {
    margin: 16px 0 24px;
}

.invitation-copy>p:not(.eyebrow):not(.signature) {
    color: var(--muted);
}

.recipient {
    padding: 22px 0;
    margin: 10px 0 22px;
    border-block: 1px solid var(--border);
}

.recipient p {
    font-size: 11px;
    color: var(--muted);
}

.recipient strong {
    display: block;
    margin-top: 6px;
    font: 27px/1.4 var(--serif);
    color: var(--ink);
    overflow-wrap: anywhere;
}

.signature {
    font: italic 22px/1.5 var(--serif);
    color: var(--ink);
    margin-top: 26px;
}

.portraits {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
    grid-template-rows: auto auto auto auto auto;
    align-items: start;
    row-gap: 12px;
    max-width: 780px;
    margin: auto;
}

.portraits figure {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: 3 / span 3;
    min-width: 0;
}
.portraits figure:first-of-type { grid-column: 1; }
.portraits figure:last-child { grid-column: 3; }
.portraits > p {
    grid-row: 1;
    margin: 0;
    text-align: center;
    font-size: 13px;
    line-height: 1.8;
}
.portraits > p:first-child { grid-column: 1; }
.portraits > p:nth-child(2) { grid-column: 3; }
.portraits > p > .eyebrow { display: block; margin-bottom: 8px; }
.portraits > p.eyebrow {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 18px 0 22px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 10px;
    line-height: 2;
}
.portraits figure img {
    aspect-ratio: 4/5;
    border-radius: 180px 180px 4px 4px;
}

.portraits figcaption {
    display: contents;
    text-align: center;
}

.portraits h3 {
    margin-top: 0;
    font-size: 23px;
}


/* 07. EVENT, COUNTDOWN & CALENDAR */
.event-section {
    background: linear-gradient(180deg, var(--blue-soft), #e9f2f6 55%, var(--blue-soft));
    padding: 75px 0;
    border-block: 1px solid #e0ebef;
    overflow: hidden;
}

.event-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.event-layout .section-heading {
    margin-bottom: 0;
}
.event-layout > .section-heading { grid-column: 1 / -1; }
.event-layout > .schedule { grid-column: auto; }

.countdown {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 30px 0 8px;
}

.countdown > div {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(49, 94, 145, 0.12);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(49, 94, 145, 0.05);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s;
}

.countdown strong {
    display: block;
    min-width: 44px;
    font: 38px var(--serif);
    font-variant-numeric: lining-nums tabular-nums;
    color: var(--ink);
}

.countdown span {
    font-size: 11px;
    color: var(--muted);
}

.event-card {
    position: relative;
    text-align: center;
    padding: 42px 30px;
    background: white;
    border: 1px solid #dce6ea;
    border-radius: 140px 140px 5px 5px;
}

.event-card::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid #dce6ea;
    border-radius: 132px 132px 2px 2px;
    pointer-events: none;
}

.event-card .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 24px;
}
.event-card .actions:has(> [hidden]),
.event-card .actions[data-single] {
    grid-template-columns: 1fr;
}
.event-card .actions .button {
    min-width: 0;
    padding: 12px 8px;
    font-size: 12px;
    line-height: 1.5;
    justify-content: center;
}

.month-calendar {
    width: 100%;
    max-width: 350px;
    margin: 28px auto 0;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    padding: 12px 14px 18px;
    background: var(--surface);
    border: 1px solid #c4d9e2;
    border-radius: 0 0 14px 14px;
    box-shadow: var(--shadow);
    text-align: center;
    font-variant-numeric: lining-nums tabular-nums;
}

.month-calendar caption {
    padding: 20px 12px 16px;
    background: var(--surface);
    border: 1px solid #c4d9e2;
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    font: 25px var(--serif);
    font-variant-numeric: lining-nums tabular-nums;
    color: var(--ink);
}

.month-calendar th {
    padding-bottom: 8px;
    font-size: 11px;
    font-weight: 500;
    color: var(--ink);
}

.month-calendar td {
    height: 40px;
    padding: 2px;
    font: 18px/1 var(--serif);
    font-variant-numeric: lining-nums tabular-nums;
    vertical-align: middle;
}

.month-calendar td span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-inline: auto;
    border: 1px solid transparent;
    line-height: 1;
    font-variant-numeric: lining-nums tabular-nums;
}

.month-calendar .marked-date {
    position: relative;
    isolation: isolate;
    border: 0;
    padding-bottom: 3px;
    color: var(--ink);
    font-weight: 700;
    text-shadow: 0 1px 2px #ffffffb3;
}

.marked-date svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    fill: #ffafd0;
    stroke: #ee8ab5;
    filter: drop-shadow(0 2px 5px #ff9bc580);
    stroke-width: 0.8;
    transform-origin: center;
    overflow: visible;
    pointer-events: none;
    animation: heart-beat 1.8s ease-in-out infinite;
}

.marked-date svg[data-heart-halo] {
    animation-name: heart-halo;
    opacity: 0;
    z-index: -2;
}

.marked-date[data-heart-motion='false'] svg {
    animation-play-state: paused;
}

body[data-modal-open] .marked-date svg {
    animation-play-state: paused;
}

.event-time {
    font: 45px var(--serif);
    font-variant-numeric: lining-nums tabular-nums;
    color: var(--ink);
    margin-top: 18px;
}

.event-date {
    color: var(--ink);
    font: 20px/1.4 var(--serif);
    font-variant-numeric: lining-nums tabular-nums;
    margin-top: 12px;
}

.event-lunar {
    color: var(--muted);
    font-size: 13px;
    font-style: italic;
    margin-top: 5px;
    line-height: 1.5;
}

.rule {
    width: 55px;
    height: 1px;
    background: #c4d9e2;
    margin: 24px auto;
}

.event-card>p:not(.eyebrow):not(.event-time):not(.event-date):not(.event-lunar) {
    max-width: 290px;
    margin: 14px auto 25px;
    font-size: 12px;
    color: var(--muted);
    text-wrap: balance;
}
.event-card:has(.actions[hidden]) > p:not(.eyebrow):not(.event-time):not(.event-date):not(.event-lunar):last-of-type {
    margin-bottom: 0;
}

/* 08. GALLERY & INTERLUDE */
.gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    max-width: 900px;
    margin: auto;
    gap: 14px;
}
.gallery button {
    display: block;
    min-width: 0;
    width: 100%;
    aspect-ratio: var(--photo-ratio);
    position: relative;
    border: 1px solid rgba(49, 94, 145, 0.09);
    padding: 0;
    background: var(--surface);
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 18px rgba(49, 94, 145, 0.08);
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.gallery button[data-landscape='true'] { grid-column: 1 / -1; }
.gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.schedule { grid-column: 1 / -1; max-width: 760px; width: 100%; margin: auto; position: relative; padding: 44px 24px; background: linear-gradient(145deg, #fffdfd 0%, #fff7f9 100%); border: 1px solid #e9dde2; border-radius: 2px; box-shadow: 6px 7px 0 #d7eaf1, 0 15px 35px #315e910d; }
.schedule::before { content: ''; position: absolute; inset: 8px; border: 1px solid #ede2e6; border-radius: 0; pointer-events: none; }
.sprig { position: absolute; width: 48px; height: 96px; right: 0; top: -28px; fill: #e7dce280; stroke: #b397a3; stroke-width: 1.2; transform: rotate(18deg); pointer-events: none; }
.schedule ol { list-style: none; padding: 0; margin: 36px auto 0; max-width: 580px; }
.schedule li { display: grid; grid-template-columns: 54px 32px minmax(0, 1fr); gap: 12px; padding: 0 0 28px; position: relative; align-items: center; }
.schedule li::before {
    content: '';
    position: absolute;
    left: 81px;
    top: 34px;
    bottom: -2px;
    width: 2px;
    background: repeating-linear-gradient(to bottom, #d5c3cb 0, #d5c3cb 4px, transparent 4px, transparent 8px);
}
.schedule li > span { background: #fffafb; z-index: 1; }
.schedule li svg { width: 32px; height: 32px; fill: none; stroke: #a58794; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.schedule li:last-child { padding-bottom: 0; }
.schedule li:last-child::before { display: none; }
.schedule time { font: 23px/32px var(--serif); font-variant-numeric: lining-nums tabular-nums; text-align: right; color: var(--ink); align-self: start; }
.schedule time { display: flex; justify-content: flex-end; }
.schedule time span { flex: 0 0 12px; text-align: center; }
.schedule time span:nth-child(3) { flex-basis: 6px; }
.schedule li > div { padding-top: 3px; }
.schedule li > span { align-self: start; }
.schedule li > span svg { display: block; }
.schedule h3 { margin: 0; font: 18px/1.4 var(--serif); color: var(--ink); }
.schedule .section-heading { margin-bottom: 24px; }
.schedule small { color: var(--muted); font-size: 11px; }


.gallery-caption {
    text-align: center;
    margin-bottom: 20px;
    font-size: 11px;
    color: var(--muted);
}

.interlude {
    position: relative;
    isolation: isolate;
    max-width: 960px;
    height: clamp(420px, 52vw, 580px);
    overflow: hidden;
}

.interlude img {
    height: 100%;
    object-position: 50% 22%;
    transform: none;
}

.ribbon {
    display: block;
    width: 160px;
    height: 30px;
    margin-top: 20px;
    fill: none;
    stroke: #b497a1;
    stroke-width: 1.3;
    stroke-linecap: round;
}


.interlude::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #fff9faed, #fff9fa80 55%, #fff9fa26);
    pointer-events: none;
}

.interlude>div:not(.media-frame) {
    position: absolute;
    z-index: 1;
    left: 7%;
    top: 50%;
    transform: translateY(-50%);
    max-width: 85%;
}

.interlude>div:not(.media-frame)>p+p {
    font: italic 48px/1.25 var(--serif);
    color: var(--ink);
}

.interlude>div:not(.media-frame)>p>span {
    display: inline-block;
    white-space: nowrap;
}

/* 09. FORMS, RSVP & WISHES */
.form-section {
    max-width: 760px;
    margin-inline: auto;
}

.form-section .card,
.card.form-section {
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: none;
}

.form-section > .card > .section-heading {
    margin-bottom: 26px;
}

.form-section > .card > .section-heading h2 {
    font-size: clamp(28px, 3.5vw, 40px);
}

.response-summary {
    text-align: center;
}

.response-summary .button {
    margin-top: 20px;
}

.card {
    background: white;
    border: 1px solid var(--border);
    padding: 32px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

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

.full {
    grid-column: 1/-1;
}

.form-grid label,
.field-label {
    display: block;
    font-size: 14px;
    color: var(--ink);
}

input:not([type='radio']),
textarea {
    display: block;
    width: 100%;
    border: 1px solid #b8c8d0;
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
    color: var(--text);
    font-size: 16px;
}

textarea {
    resize: vertical;
    min-height: 84px;
    transition: opacity 0.22s ease;
}

textarea[data-fading] {
    opacity: 0.15;
}

.form-grid small {
    font-size: 11px;
    color: var(--muted);
}

.choice-row {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.choice-row label {
    flex: 1;
    min-width: 0;
    position: relative;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.choice-row input {
    position: absolute;
    opacity: 0;
}

.choice-row span {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 56px;
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 12px 8px;
    font-size: 13px;
    color: var(--ink);
    background: var(--blue-soft);
    touch-action: manipulation;
    transition: background-color 0.12s ease, border-color 0.12s ease, transform 0.08s ease;
}

.choice-row label:active span {
    transform: scale(0.98);
}

.choice-row input:checked+span {
    background: var(--blue);
    border-color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--ink);
    font-weight: 600;
}

.choice-row input:focus-visible+span {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

.status {
    font-size: 14px;
    color: var(--muted);
    margin-top: 16px;
    overflow-wrap: anywhere;
}

.status:empty {
    display: none;
}

.status[data-error] {
    color: #a53b43;
}

.message-section {
    background: #faf3f5;
    padding: 80px 0;
}

.message-list {
    display: grid;
    gap: 16px;
}

.message-card {
    padding: 24px 8px;
    background: var(--surface);
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
}

.message-card p {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font: 18px/1.7 var(--serif);
    color: var(--ink);
}

.message-card strong {
    display: block;
    margin-top: 14px;
    font-size: 12px;
    color: var(--muted);
    text-align: right;
    font-weight: 500;
}

.message-card:last-child {
    border-bottom: 0;
    padding-bottom: 8px;
}

/* 10. GIFT */
.gift-section {
    padding: 42px 0 46px;
    background: var(--paper);
}

.gift-insert {
    max-width: 640px;
    text-align: center;
}

.gift-divider {
    display: block;
    width: 136px;
    height: auto;
    margin: 0 auto 14px;
    color: #b894a3;
    opacity: .72;
    overflow: visible;
}

.gift-divider path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.35;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gift-section .section-heading {
    margin-bottom: 14px;
}

.gift-section .section-heading h2 {
    margin: 0 0 8px;
    font-size: 38px;
}

.gift-section .section-heading p:not(.eyebrow) {
    max-width: 480px;
    margin-inline: auto;
    color: var(--muted);
}

.gift-cue {
    display: block;
    width: 88px;
    height: auto;
    margin: 0 auto -43px;
    color: #b894a3;
    opacity: .8;
    overflow: visible;
    transform: translateX(64px);
}

.gift-cue path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gift-box {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    margin: 0 auto;
    padding: 4px 16px 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    transition: transform .2s ease;
}

.gift-box>svg {
    display: block;
    width: 148px;
    height: auto;
    overflow: visible;
    filter: drop-shadow(0 5px 8px #93bbd055);
    animation: gift-float 1.8s ease-in-out infinite;
    animation-play-state: paused;
}

.gift-box>span {
    color: var(--ink);
    font-size: 15px;
    letter-spacing: .01em;
}

.gift-lid {
    transform-origin: 100px 76px;
    animation: gift-lid-invite 1.8s ease-in-out infinite;
    animation-play-state: paused;
}

.gift-box::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 2px;
    width: 150px;
    height: 150px;
    border: 1px solid #b2d6e6;
    border-radius: 50%;
    background: radial-gradient(circle, #d5e9f1bb, #d5e9f100 70%);
    pointer-events: none;
    animation: gift-glow 1.8s ease-out infinite;
    animation-play-state: paused;
}

.gift-box[data-gift-motion='true']::before,
.gift-box[data-gift-motion='true']>svg,
.gift-box[data-gift-motion='true'] .gift-lid {
    animation-play-state: running;
}

body[data-modal-open] .gift-box::before,
body[data-modal-open] .gift-box>svg,
body[data-modal-open] .gift-box .gift-lid {
    animation-play-state: paused;
}

.gift-box:focus-visible {
    transform: translateY(-2px);
    outline: 2px solid var(--ink);
    outline-offset: 6px;
}

.gift-box:active {
    transform: translateY(0) scale(.98);
}

html[data-pointer-input] .gift-box:focus {
    outline: none;
    transform: none;
}

.gift-popup {
    display: grid;
    gap: 12px;
    line-height: 1.5;
}

.gift-popup-intro {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.gift-tabs {
    display: none;
}

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

.gift-panel {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fffdfd;
    text-align: center;
    overflow-wrap: anywhere;
}

.gift-panel h3 {
    margin: 4px 0 8px;
    font-size: 23px;
}

.gift-panel .notice {
    margin: 0 0 16px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--blue-soft);
    font-size: 12px;
}

.gift-qr-frame {
    /* Keep the rounded outline without padding: the PNG includes its quiet zone. */
    width: min(192px, 100%);
    margin: 4px auto;
    border: 1px solid #eadfe3;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.gift-qr-frame img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.gift-bank {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.gift-account-number {
    display: block;
    margin: 8px 0 6px;
    color: var(--ink);
    font-size: 17px;
    font-variant-numeric: tabular-nums;
    user-select: all;
}

.gift-account-name {
    font-size: 13px;
}

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

.gift-panel .actions {
    margin-top: 10px;
    flex-direction: column;
    gap: 6px;
}

.gift-panel .actions .button {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 12px;
}

.modal:has(.gift-popup) {
    width: min(680px, calc(100% - 24px));
}

.modal-body:has(.gift-popup) {
    padding: 14px;
}

/* 11. CLOSING & FLOATING CONTROLS */
.closing,
.footer {
    --closing-paper: #e1eff5;
}

.closing {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 90px;
    align-items: center;
    max-width: 980px;
}

.closing::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 50% 0 0;
    background: var(--closing-paper);
    box-shadow: 0 0 0 100vmax var(--closing-paper);
    clip-path: inset(0 -100vmax);
    pointer-events: none;
}

.closing img {
    aspect-ratio: 3/4;
    border-radius: 160px 160px 5px 5px;
    border: 5px solid var(--surface);
    box-shadow: 0 18px 38px #315e9126, 0 3px 10px #315e9114;
}

.closing h2 {
    margin: 16px 0 22px;
}

.closing>div>p:not(.signature):not(.eyebrow) {
    color: var(--muted);
}

.footer {
    background: var(--closing-paper);
    box-shadow: 0 0 0 100vmax var(--closing-paper);
    clip-path: inset(0 -100vmax);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding-block: 32px 48px;
    text-align: center;
    font-size: 11px;
    letter-spacing: .14em;
    color: var(--ink);
}

.music-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 5;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    font-size: 23px;
    color: var(--ink);
    box-shadow: var(--shadow);
    transition: transform 0.25s, box-shadow 0.25s;
}

.music-button[aria-pressed='true'] {
    border-color: #8aafc2;
    box-shadow: 0 4px 16px rgba(49, 94, 145, 0.25);
    animation: music-spin 8s linear infinite;
}

.music-button[aria-pressed='true']::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px dashed rgba(49, 94, 145, 0.35);
    animation: music-ripple 2.4s ease-out infinite;
    pointer-events: none;
}

.stream-pill {
    position: fixed;
    bottom: calc(24px + env(safe-area-inset-bottom));
    left: 24px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 6px;
    width: calc(100% - 96px);
    max-width: 380px;
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    font-family: var(--body);
    text-align: left;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    opacity: 0;
    transition: opacity 0.22s ease-out, transform 0.22s ease, box-shadow 0.22s, border-color 0.22s;
    pointer-events: none;
}

.stream-pill[data-active] {
    opacity: 1;
    pointer-events: auto;
}

.stream-pill[data-flip='a'] .stream-sender,
.stream-pill[data-flip='a'] .stream-text {
    animation: stream-fade-a 0.5s ease-out;
}

.stream-pill[data-flip='b'] .stream-sender,
.stream-pill[data-flip='b'] .stream-text {
    animation: stream-fade-b 0.5s ease-out;
}

@keyframes stream-fade-a {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes stream-fade-b {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.stream-sender {
    flex: 0 1 auto;
    max-width: 44%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 0.01em;
}

.stream-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--text);
}

/* 12. DIALOG, LIGHTBOX & TOAST */
.invitation-popup {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(16px + env(safe-area-inset-top)) 12px calc(16px + env(safe-area-inset-bottom));
    background: #263742b8;
}

.invitation-modal {
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    width: min(760px, calc(100% - 24px));
    max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: appear-up 0.28s ease-out backwards;
}

.invitation-popup[data-popup-state="closing"] .invitation-modal {
    animation: modal-exit 0.35s ease-in both;
    pointer-events: none;
}

.invitation-popup[data-popup-state="closing"] {
    animation: backdrop-exit 0.35s ease-in both;
    pointer-events: none;
}

.modal-head {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
}

.modal-head h2 {
    font-size: 23px;
}

.modal-body {
    padding: 24px;
    overflow: auto;
    min-height: 0;
    overscroll-behavior: contain;
}

.modal-body .actions {
    flex-direction: column;
}

.invitation-popup[data-close-requested] {
    pointer-events: none;
}

/* Image lightbox: one stage surface for the live canvas and transition snapshots. */
.invitation-popup:has(.modal-image) {
    --image-stage: #0a0d14;
    --image-safe-top: env(safe-area-inset-top, 0px);
    --image-safe-right: env(safe-area-inset-right, 0px);
    --image-safe-bottom: env(safe-area-inset-bottom, 0px);
    --image-safe-left: env(safe-area-inset-left, 0px);
    background: var(--image-stage);
    padding: 0;
}

.invitation-modal.modal-image {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    background: var(--image-stage);
    box-shadow: none;
    position: relative;
    color-scheme: dark;
    -webkit-user-select: none;
    user-select: none;
}

.modal-image ::selection { background: transparent; }

.modal-image .modal-header {
    position: absolute;
    top: 0;
    inset-inline: 0;
    z-index: 20;
    background: transparent;
    border-bottom: 0;
    padding: calc(clamp(12px, 2vh, 18px) + var(--image-safe-top))
        calc(clamp(16px, 3vw, 28px) + var(--image-safe-right))
        clamp(12px, 2vh, 18px)
        calc(clamp(16px, 3vw, 28px) + var(--image-safe-left));
    gap: 10px;
    pointer-events: none;
}

.modal-image .modal-header h2 {
    font-family: var(--body);
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    margin-right: auto;
}

.modal-image .modal-header button {
    pointer-events: auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: grid;
    place-items: center;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
    margin: 0;
    padding: 0;
}

.modal-image .modal-header svg { width: 20px; height: 20px; }
.modal-image button:focus:not(:focus-visible) { outline: none; }
.modal-image .modal-header button:focus-visible,
.modal-image [data-image-step]:focus-visible,
.modal-image [data-image-zoom]:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }

.modal-image .modal-header button:active {
    background: rgba(255, 255, 255, 0.28);
    transform: scale(0.92);
}

.modal-image .image-preview-body {
    flex: 1 1 auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--image-stage);
    overflow: hidden;
}

.image-viewer {
    --image-slide-gap: clamp(16px, 2vw, 24px);
    touch-action: none;
    position: relative;
    width: 100%;
    height: min(78vh, 780px);
    height: min(78dvh, 780px);
    max-height: calc(100dvh - 140px);
    min-height: 100px;
    overflow: hidden;
    background: var(--image-stage);
}

.image-viewer img { width: auto; height: auto; max-width: none; object-fit: contain; -webkit-user-drag: none; }
.image-viewer > img { display: none; }
.image-preview-status { position: absolute; inset: 0; z-index: 1; margin: 0; padding: 16px; background: rgba(10, 13, 20, 0.85); color: rgba(255, 255, 255, 0.85); text-align: center; backdrop-filter: blur(8px); }
.image-preview-status:not([hidden]) { display: grid; place-content: center; }
.image-transition { position: absolute; inset: 0; z-index: 2; pointer-events: none; transform: translateX(var(--image-slide-offset, 0px)); }
.image-slide { position: absolute; inset: 0; overflow: hidden; background: var(--image-stage); }
.image-slide img { display: block; max-width: none; }
.image-slide img.image-slide-content { width: 100%; height: 100%; object-fit: contain; }
.image-slide + .image-slide { left: calc(100% + var(--image-slide-gap)); right: calc(-100% - var(--image-slide-gap)); }
.image-transition[data-direction="previous"] .image-slide + .image-slide { left: calc(-100% - var(--image-slide-gap)); right: calc(100% + var(--image-slide-gap)); }
.image-transition[data-sliding] { animation: image-slide-next 320ms cubic-bezier(.22, .61, .36, 1) both; }
.image-transition[data-sliding][data-direction="previous"] { animation-name: image-slide-previous; }
.image-transition[data-returning] { animation: image-slide-return 180ms ease-out both; }
.image-viewer[data-image-dragging]::before,
.image-viewer[data-image-pending]::before,
.image-viewer[data-image-sliding]::before { content: ''; position: absolute; inset: 0; z-index: 2; background: var(--image-stage); pointer-events: none; }
.image-viewer[data-image-sliding] { pointer-events: none; }
.image-viewer[data-image-pending] .image-preview-status { inset: auto 16px 16px; z-index: 3; padding: 8px 14px; background: rgba(20, 24, 36, 0.85); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 8px; }
@keyframes image-slide-next { from { transform: translateX(var(--image-slide-offset, 0px)); } to { transform: translateX(calc(-100% - var(--image-slide-gap))); } }
@keyframes image-slide-previous { from { transform: translateX(var(--image-slide-offset, 0px)); } to { transform: translateX(calc(100% + var(--image-slide-gap))); } }
@keyframes image-slide-return { from { transform: translateX(var(--image-slide-offset, 0px)); } to { transform: translateX(0); } }
.image-viewer[data-image-pannable="false"] .viewer-canvas,
.image-viewer[data-image-pannable="false"] .viewer-canvas img,
.image-viewer[data-image-pannable="false"] .viewer-move { cursor: default; }
.image-viewer[data-image-pannable="true"] .viewer-move { cursor: grab; }
.image-viewer[data-image-pannable="true"] .viewer-move:active { cursor: grabbing; }

.modal-image .modal-footer {
    position: absolute;
    bottom: calc(clamp(16px, 3vh, 28px) + var(--image-safe-bottom));
    left: var(--image-safe-left);
    right: var(--image-safe-right);
    z-index: 20;
    margin-inline: auto;
    background: rgba(18, 22, 34, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
    padding: 5px 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: max-content;
    max-width: calc(100% - var(--image-safe-left) - var(--image-safe-right) - 32px);
    flex-wrap: nowrap;
    transition: opacity 0.2s ease;
}

.modal-image .image-toolbar-divider { width: 1px; height: 20px; background: rgba(255, 255, 255, 0.16); margin: 0 4px; flex: 0 0 1px; }
.modal-image .image-navigation[hidden] + .image-toolbar-divider { display: none; }
.modal-image .image-controls,
.modal-image .image-navigation { display: inline-flex; align-items: center; gap: 4px; }
.modal-image .cell-note { color: rgba(255, 255, 255, 0.85); font-size: 13px; }
.modal-image [data-image-position] { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.92); padding: 0 8px; font-variant-numeric: tabular-nums; letter-spacing: 0.3px; white-space: nowrap; }

.modal-image [data-image-zoom] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-height: 40px;
    flex: 0 0 auto;
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.88);
    width: 28px;
    min-width: 28px;
    border-radius: 6px;
    font-size: 17px;
    line-height: 1;
    font-weight: 500;
    padding: 0;
    box-shadow: none;
    transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

/* Universal disabled opacity is important; disabled must not change geometry. */
.modal-image [data-image-zoom]:disabled { opacity: 0.28 !important; }
.modal-image [data-image-zoom]:not(:disabled):active { background: rgba(255, 255, 255, 0.22); transform: scale(0.92); }

.modal-image .image-controls [data-image-zoom="reset"] {
    width: auto;
    padding-inline: 12px;
    border-radius: 999px;
    font-size: 12.5px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.95);
}

.modal-image [data-image-step] {
    display: grid;
    place-items: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    min-height: 52px;
    min-width: 52px;
    border-radius: 50%;
    background: rgba(18, 22, 34, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    z-index: 30;
    transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease, opacity 0.2s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    padding: 0;
}

.modal-image [data-image-step] svg { display: block; pointer-events: none; }
.modal-image [data-image-step="-1"] { left: calc(clamp(16px, 3vw, 40px) + var(--image-safe-left)); }
.modal-image [data-image-step="1"] { right: calc(clamp(16px, 3vw, 40px) + var(--image-safe-right)); }
.modal-image [data-image-step]:not(:disabled):active { background: rgba(255, 255, 255, 0.28); transform: translateY(-50%) scale(0.96); }
.modal-image [data-image-step]:disabled { opacity: 0.18 !important; transform: translateY(-50%) !important; }
.modal-image:has([data-image-pannable="true"]) [data-image-step]:not(:disabled) { opacity: 0.22; background: rgba(18, 22, 34, 0.45); border-color: rgba(255, 255, 255, 0.12); }
.modal-image:has([data-image-dragging]) [data-image-step],
.modal-image:has([data-image-sliding]) [data-image-step] { opacity: 0.06; pointer-events: none; }

@media (hover: hover) and (pointer: fine) {
    .modal-image .modal-header button:hover { background: rgba(255, 255, 255, 0.24); border-color: rgba(255, 255, 255, 0.35); transform: scale(1.06); }
    .modal-image [data-image-zoom]:not(:disabled):hover { background: rgba(255, 255, 255, 0.14); color: #ffffff; }
    .modal-image .image-controls [data-image-zoom="reset"]:not(:disabled):hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.3); }
    .modal-image [data-image-step]:not(:disabled):hover { background: rgba(255, 255, 255, 0.24); border-color: rgba(255, 255, 255, 0.4); transform: translateY(-50%) scale(1.08); }
    .modal-image:has([data-image-pannable="true"]) [data-image-step]:not(:disabled):hover { opacity: 1; background: rgba(18, 22, 34, 0.85); border-color: rgba(255, 255, 255, 0.35); transform: translateY(-50%) scale(1.06); }
}

.flight-envelope {
    --flight-duration-ms: 3800;
    position: fixed;
    left: 50%;
    top: 50%;
    width: 220px;
    height: 142.5px;
    margin-left: -110px;
    margin-top: -71px;
    z-index: 1200;
    pointer-events: none;
    perspective: 600px;
    opacity: 0;
    background: #fbf6ed;
    border-radius: 4px;
    box-shadow: 0 20px 48px rgba(70, 58, 45, 0.35), 0 6px 16px rgba(70, 58, 45, 0.18);
}

.flight-envelope[data-active] {
    animation: flight-takeoff calc(var(--flight-duration-ms) * 1ms) linear forwards;
    will-change: transform, opacity;
}

.flight-letter-mask {
    position: absolute;
    inset: 0;
    z-index: 2;
    /* Keep the entrance above the mouth open; contain the paper at both sides and the base. */
    clip-path: inset(-80px 0 0);
}

.flight-letter {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 10px;
    height: 110px;
    background: #ffffff;
    border: 1.5px solid #dcd1c2;
    border-radius: 4px;
    padding: 14px 16px;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(70, 58, 45, 0.12);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform: translateY(-56px);
}

.flight-envelope[data-active] .flight-letter {
    animation: flight-letter-slip 0.7s 0.3s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.flight-letter-line {
    display: block;
    height: 3px;
    background: #315e91;
    opacity: 0.75;
    border-radius: 2px;
}

.flight-letter-line:first-child {
    width: 70%;
}

.flight-letter-line:nth-child(2) {
    width: 50%;
}

.flight-letter-line:last-child {
    width: 36%;
    background: #b497a1;
    opacity: 0.7;
}

.flight-pocket {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 3px;
    z-index: 3;
}

.flight-flap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 3px rgba(118, 102, 85, 0.25));
    transform-origin: top center;
    transform: rotateX(180deg);
    z-index: 1;
}

.flight-envelope[data-active] .flight-flap {
    animation: flight-flap-close 0.6s 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.flight-seal {
    position: absolute;
    z-index: 5;
    left: 50%;
    top: 60%;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 2px solid #cbbb9f;
    border-radius: 48% 52% 49% 51% / 51% 49% 52% 48%;
    background: linear-gradient(145deg, #fff8e9, #eee1c9 70%, #e0cfb1);
    box-shadow: 0 3px 8px rgba(121, 103, 76, 0.35), inset 1px 1px 1px #ffffff70, inset -1px -1px 2px rgba(163, 140, 103, 0.25);
    opacity: 0;
    pointer-events: none;
}

.flight-seal::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid #ad967380;
    border-radius: 50%;
    box-shadow: 0 1px 0 #fff8e970, inset 0 1px 1px #95806125;
    pointer-events: none;
}

.flight-seal svg {
    position: absolute;
    pointer-events: none;
    overflow: hidden;
}

.flight-seal svg:first-child {
    inset: 18% 10% 18% 10%;
    width: 80%;
    height: 64%;
}

.flight-seal svg:last-child {
    inset: 5%;
    width: 90%;
    height: 90%;
    fill: none;
    stroke: #927a59;
    stroke-width: 1.15;
    stroke-linecap: round;
    filter: drop-shadow(0 1px 0 #fff9ec80);
}

.flight-envelope[data-active] .flight-seal {
    animation: flight-seal-stamp 0.44s 1.55s cubic-bezier(0.18, 0.9, 0.32, 1.35) forwards;
}

.flight-spark {
    position: absolute;
    left: 50%;
    top: 60%;
    width: 58px;
    height: 58px;
    margin-left: -29px;
    margin-top: -29px;
    background: radial-gradient(circle, rgba(255, 250, 238, 0.35) 0%, rgba(239, 227, 202, 0.18) 40%, rgba(239, 227, 202, 0) 70%);
    border-radius: 50%;
    opacity: 0;
    z-index: 4;
    pointer-events: none;
}

.flight-envelope[data-active] .flight-spark {
    animation: flight-sparkle 0.65s 1.8s ease-out forwards;
}

.flight-aura {
    position: absolute;
    inset: 0;
    z-index: 6;
    pointer-events: none;
}

.flight-heart {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    filter: drop-shadow(0 1px 3px rgba(180, 120, 140, 0.25));
}

.flight-heart-bloom-1 {
    left: 50%;
    top: 58%;
    width: 15px;
    height: 15px;
    fill: #f2a2b5;
}

.flight-envelope[data-active] .flight-heart-bloom-1 {
    animation: flight-heart-bloom-left 1.05s 1.65s cubic-bezier(0.22, 0.9, 0.35, 1) forwards;
}

.flight-heart-bloom-2 {
    left: 50%;
    top: 58%;
    width: 14px;
    height: 14px;
    fill: #dfbe88;
}

.flight-envelope[data-active] .flight-heart-bloom-2 {
    animation: flight-heart-bloom-right 1.05s 1.75s cubic-bezier(0.22, 0.9, 0.35, 1) forwards;
}

.flight-heart-fly-top {
    left: 45%;
    top: -14px;
    width: 20px;
    height: 20px;
    fill: #f09ab0;
}

.flight-envelope[data-active] .flight-heart-fly-top {
    animation: flight-heart-fly-top 0.95s 2.82s ease-out forwards;
}

.flight-heart-fly-bottom {
    left: 52%;
    bottom: -12px;
    width: 18px;
    height: 18px;
    fill: #dfba82;
}

.flight-envelope[data-active] .flight-heart-fly-bottom {
    animation: flight-heart-fly-bottom 0.9s 2.88s ease-out forwards;
}

.flight-heart-fly-trail-1 {
    left: -8px;
    bottom: 12px;
    width: 22px;
    height: 22px;
    fill: #eb8ca3;
}

.flight-envelope[data-active] .flight-heart-fly-trail-1 {
    animation: flight-heart-fly-trail-1 1s 2.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.flight-heart-fly-trail-2 {
    left: 10px;
    bottom: 2px;
    width: 17px;
    height: 17px;
    fill: #f3a896;
}

.flight-envelope[data-active] .flight-heart-fly-trail-2 {
    animation: flight-heart-fly-trail-2 0.85s 3.0s ease-out forwards;
}

.flight-heart-fly-lead {
    right: -10px;
    top: 8px;
    width: 18px;
    height: 18px;
    fill: #dfba82;
}

.flight-envelope[data-active] .flight-heart-fly-lead {
    animation: flight-heart-fly-lead 0.85s 2.92s ease-out forwards;
}

.flight-sparkle {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    filter: drop-shadow(0 1px 4px rgba(235, 195, 110, 0.65));
}

.flight-sparkle-seal {
    left: 56%;
    top: 48%;
    width: 14px;
    height: 14px;
    fill: #dfca9a;
}

.flight-envelope[data-active] .flight-sparkle-seal {
    animation: flight-sparkle-twinkle 0.8s 1.7s ease-out forwards;
}

.flight-sparkle-fly-1 {
    left: -12px;
    bottom: 25px;
    width: 16px;
    height: 16px;
    fill: #fbbf24;
}

.flight-envelope[data-active] .flight-sparkle-fly-1 {
    animation: flight-sparkle-fly-1 0.9s 2.85s ease-out forwards;
}

.flight-sparkle-fly-2 {
    left: 30%;
    top: -18px;
    width: 14px;
    height: 14px;
    fill: #fde68a;
}

.flight-envelope[data-active] .flight-sparkle-fly-2 {
    animation: flight-sparkle-fly-2 0.85s 2.9s ease-out forwards;
}

.flight-sparkle-fly-3 {
    right: -14px;
    top: -4px;
    width: 15px;
    height: 15px;
    fill: #f59e0b;
}

.flight-envelope[data-active] .flight-sparkle-fly-3 {
    animation: flight-sparkle-fly-3 0.8s 3.0s ease-out forwards;
}

@keyframes flight-letter-slip {
    0% { transform: translateY(-56px); }
    100% { transform: translateY(0); }
}

@keyframes flight-flap-close {
    0% { transform: rotateX(180deg); z-index: 4; }
    100% { transform: rotateX(0deg); z-index: 4; }
}

@keyframes flight-seal-stamp {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(2.6) rotate(-18deg); }
    65% { opacity: 1; transform: translate(-50%, -50%) scale(0.92) rotate(3deg); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
}

@keyframes flight-takeoff {
    0% { opacity: 0; transform: translate3d(0, 24px, 0) scale(0.81); }
    10% { opacity: 1; transform: translate3d(0, 0, 0) scale(0.92); }
    72% { opacity: 1; transform: translate3d(0, 0, 0) scale(0.92) rotate(0deg); }
    75% { opacity: 1; transform: translate3d(-8px, 5px, 0) scale(0.94) rotate(-3deg); }
    77% { opacity: 1; transform: translate3d(-17px, 10px, 0) scale(0.97) rotate(-7deg); }
    79% { opacity: 1; transform: translate3d(9px, -7px, 0) scale(0.94) rotate(5deg); }
    81% { opacity: 1; transform: translate3d(-10px, 5px, 0) scale(0.96) rotate(-5deg); }
    83% { opacity: 1; transform: translate3d(13px, -9px, 0) scale(0.95) rotate(4deg); animation-timing-function: cubic-bezier(.12, .68, .2, 1); }
    87% { opacity: 1; transform: translate3d(64px, -48px, 0) scale(0.9) rotate(11deg); }
    89% { opacity: 1; transform: translate3d(100px, -82px, 0) scale(0.84) rotate(5deg); }
    91% { opacity: .98; transform: translate3d(146px, -132px, 0) scale(0.76) rotate(-2deg); }
    93% { opacity: .9; transform: translate3d(206px, -205px, 0) scale(0.64) rotate(9deg); }
    95% { opacity: .78; transform: translate3d(280px, -310px, 0) scale(0.51) rotate(19deg); }
    100% { opacity: 0; transform: translate3d(520px, -760px, 0) scale(0.18) rotate(27deg); }
}

@keyframes flight-sparkle {
    0% { opacity: 0; transform: scale(0.3); }
    45% { opacity: 0.45; transform: scale(1.25); }
    100% { opacity: 0; transform: scale(1.6); }
}

@keyframes flight-heart-bloom-left {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(-15deg); }
    25% { opacity: 0.9; transform: translate(-34px, -42px) scale(1) rotate(-8deg); }
    65% { opacity: 0.8; transform: translate(-52px, -62px) scale(1.08) rotate(-14deg); }
    100% { opacity: 0; transform: translate(-68px, -82px) scale(0.85) rotate(-20deg); }
}

@keyframes flight-heart-bloom-right {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(15deg); }
    30% { opacity: 0.92; transform: translate(30px, -40px) scale(1) rotate(10deg); }
    70% { opacity: 0.75; transform: translate(48px, -56px) scale(1.05) rotate(16deg); }
    100% { opacity: 0; transform: translate(62px, -72px) scale(0.8) rotate(22deg); }
}

@keyframes flight-heart-fly-top {
    0% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.4) rotate(-10deg); }
    30% { opacity: 0.95; transform: translate3d(-15px, -28px, 0) scale(1.15) rotate(12deg); }
    70% { opacity: 0.85; transform: translate3d(-45px, -45px, 0) scale(1.0) rotate(-18deg); }
    100% { opacity: 0; transform: translate3d(-75px, -60px, 0) scale(0.6) rotate(25deg); }
}

@keyframes flight-heart-fly-bottom {
    0% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.4); }
    35% { opacity: 0.9; transform: translate3d(-20px, 25px, 0) scale(1.1) rotate(-12deg); }
    75% { opacity: 0.75; transform: translate3d(-50px, 45px, 0) scale(0.95) rotate(15deg); }
    100% { opacity: 0; transform: translate3d(-80px, 65px, 0) scale(0.5) rotate(-20deg); }
}

@keyframes flight-heart-fly-trail-1 {
    0% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.4) rotate(0deg); }
    25% { opacity: 0.95; transform: translate3d(-35px, 20px, 0) scale(1.15) rotate(-15deg); }
    60% { opacity: 0.9; transform: translate3d(-90px, 55px, 0) scale(1.05) rotate(-35deg); }
    85% { opacity: 0.7; transform: translate3d(-150px, 95px, 0) scale(0.9) rotate(-55deg); }
    100% { opacity: 0; transform: translate3d(-200px, 130px, 0) scale(0.6) rotate(-75deg); }
}

@keyframes flight-heart-fly-trail-2 {
    0% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.3) rotate(10deg); }
    30% { opacity: 0.95; transform: translate3d(-40px, 28px, 0) scale(1.1) rotate(-10deg); }
    70% { opacity: 0.85; transform: translate3d(-105px, 70px, 0) scale(0.95) rotate(-30deg); }
    100% { opacity: 0; transform: translate3d(-160px, 110px, 0) scale(0.5) rotate(-50deg); }
}

@keyframes flight-heart-fly-lead {
    0% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.4) rotate(15deg); }
    40% { opacity: 0.95; transform: translate3d(25px, -20px, 0) scale(1.2) rotate(25deg); }
    80% { opacity: 0.8; transform: translate3d(45px, -35px, 0) scale(1.0) rotate(10deg); }
    100% { opacity: 0; transform: translate3d(60px, -45px, 0) scale(0.5) rotate(0deg); }
}

@keyframes flight-sparkle-twinkle {
    0% { opacity: 0; transform: scale(0.2) rotate(0deg); }
    40% { opacity: 1; transform: scale(1.2) rotate(45deg); }
    70% { opacity: 0.8; transform: scale(0.9) rotate(80deg); }
    100% { opacity: 0; transform: scale(0.1) rotate(120deg); }
}

@keyframes flight-sparkle-fly-1 {
    0% { opacity: 0; transform: scale(0.2) rotate(0deg); }
    35% { opacity: 1; transform: translate3d(-25px, 15px, 0) scale(1.3) rotate(60deg); }
    70% { opacity: 0.85; transform: translate3d(-55px, 35px, 0) scale(1.0) rotate(120deg); }
    100% { opacity: 0; transform: translate3d(-85px, 55px, 0) scale(0.2) rotate(180deg); }
}

@keyframes flight-sparkle-fly-2 {
    0% { opacity: 0; transform: scale(0.2) rotate(0deg); }
    40% { opacity: 1; transform: translate3d(-10px, -22px, 0) scale(1.25) rotate(70deg); }
    75% { opacity: 0.8; transform: translate3d(-28px, -38px, 0) scale(0.9) rotate(140deg); }
    100% { opacity: 0; transform: translate3d(-45px, -50px, 0) scale(0.2) rotate(200deg); }
}

@keyframes flight-sparkle-fly-3 {
    0% { opacity: 0; transform: scale(0.2) rotate(0deg); }
    40% { opacity: 1; transform: translate3d(18px, -12px, 0) scale(1.3) rotate(55deg); }
    100% { opacity: 0; transform: translate3d(35px, -25px, 0) scale(0.2) rotate(160deg); }
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    position: fixed;
    top: calc(18px + env(safe-area-inset-top));
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    z-index: 120;
    max-width: calc(100% - 32px);
    width: max-content;
    background: var(--ink);
    color: white;
    padding: 12px 22px;
    border-radius: 7px;
    font-size: 13px;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    animation: appear-down 0.3s ease-out backwards;
}

.toast-container {
    position: fixed;
    inset: 0;
    z-index: 120;
    pointer-events: none;
}

.toast-container .toast {
    pointer-events: auto;
}

.toast svg {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.toast path {
    stroke-dasharray: 1;
    animation: ribbon-draw 0.55s ease-out both;
}


/* 13. MOTION */
/* Pending content reveals at the viewport threshold; JS also handles scroll/bottom fallback. */
[data-reveal='pending'] {
    opacity: 0;
}

[data-reveal='visible'] {
    animation: appear-up 0.95s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

[data-hero-reveal='names'][data-reveal='visible'] {
    animation: none;
}

.section-heading[data-reveal='visible'] {
    animation: none;
}

.section-heading[data-reveal='visible']>* {
    animation: appear-up 0.95s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.section-heading[data-reveal='visible']>:nth-child(2) {
    animation-delay: .1s;
}

.section-heading[data-reveal='visible']>:nth-child(3) {
    animation-delay: .2s;
}


[data-hero-reveal='names'][data-reveal='visible']>* {
    animation: letter-rise 1.1s cubic-bezier(0.22, 1, 0.36, 1) .1s backwards;
}

[data-hero-reveal='names'][data-reveal='visible']>:nth-child(2) {
    animation-delay: .24s;
}

[data-hero-reveal='names'][data-reveal='visible']>:nth-child(3) {
    animation-delay: .38s;
}


[data-hero-reveal='date'][data-reveal='visible'] {
    animation: stamp-imprint 0.95s cubic-bezier(0.34, 1.56, 0.64, 1) 0.16s backwards;
}

[data-hero-reveal='photo'][data-reveal='visible'] {
    animation: appear-photo 1.2s cubic-bezier(0.22, 1, 0.36, 1) .12s backwards;
}

.photo-frame[data-reveal='visible'] {
    animation: polaroid-settle 1.2s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.card[data-reveal='visible'],
.event-card[data-reveal='visible'] {
    animation: card-elevate 1.05s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.invitation-copy[data-reveal='visible'] h2 {
    animation: appear-up 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.1s backwards;
}

.invitation-copy[data-reveal='visible'] .recipient {
    animation: card-elevate 1.05s cubic-bezier(0.22, 1, 0.36, 1) 0.2s backwards;
}

.invitation-copy[data-reveal='visible'] .signature {
    animation: appear-up 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.3s backwards;
}

.event-card[data-reveal='visible'] .event-time {
    animation: stamp-imprint 0.95s cubic-bezier(0.34, 1.56, 0.64, 1) 0.12s backwards;
}

.event-card[data-reveal='visible'] .rule {
    animation: appear-up 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.18s backwards;
}

.event-card[data-reveal='visible'] h3 {
    animation: appear-up 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.24s backwards;
}

.event-card[data-reveal='visible'] .actions {
    animation: appear-up 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.28s backwards;
}

.portraits[data-reveal='visible'] > p {
    animation: appear-up 0.95s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.portraits[data-reveal='visible'] > p.eyebrow {
    animation-delay: .1s;
}

.portraits figure[data-reveal='visible'],
.interlude[data-reveal='visible'] {
    animation: none;
}


.portraits figure[data-reveal='visible'] img {
    animation: portrait-unveil 1.2s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.portraits figure:last-child[data-reveal='visible'] img {
    animation-delay: .12s;
}

.schedule[data-reveal='visible'] .sprig path {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: sprig-draw 1.8s ease-out 0.15s forwards;
}

.schedule li[data-reveal='pending'] {
    opacity: 0;
}

.schedule li[data-reveal='visible'] {
    animation: timeline-arrive 0.65s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.schedule li[data-reveal='visible'] svg {
    animation: icon-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

[data-reveal='visible'] .countdown>div:nth-child(1) { animation: appear-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.08s backwards; }
[data-reveal='visible'] .countdown>div:nth-child(2) { animation: appear-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.16s backwards; }
[data-reveal='visible'] .countdown>div:nth-child(3) { animation: appear-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.24s backwards; }
[data-reveal='visible'] .countdown>div:nth-child(4) { animation: appear-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.32s backwards; }

.month-calendar[data-reveal='visible'] {
    animation: card-elevate 1.05s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.interlude[data-reveal='visible']>div:not(.media-frame)>.eyebrow {
    animation: appear-up 0.95s ease-out backwards;
}

.interlude[data-reveal='visible']>div:not(.media-frame)>p>span {
    animation: letter-rise 1.2s cubic-bezier(0.22, 1, 0.36, 1) .15s backwards;
}

.interlude[data-reveal='visible']>div:not(.media-frame)>p>span:last-child {
    animation-delay: .32s;
}

.interlude[data-reveal='visible'] .media-frame img {
    animation: appear-photo 1.25s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

[data-reveal='visible'] .ribbon path,
.gift-divider[data-reveal='visible'] path[pathLength] {
    stroke-dasharray: 1;
    animation: ribbon-draw 1.1s ease-in-out 0.1s backwards;
}

.gift-cue[data-reveal='visible'] {
    animation: appear-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.gift-box[data-reveal='visible'] {
    animation: card-elevate 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.08s backwards;
}

.gallery-caption[data-reveal='visible'] {
    animation: appear-up 0.95s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}


.closing figure[data-reveal='visible'] img {
    animation: appear-photo 1.25s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.closing div[data-reveal='visible'] {
    animation: appear-up 0.95s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.closing div[data-reveal='visible'] .signature {
    animation: appear-up 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.22s backwards;
}

.footer[data-reveal='visible'] {
    animation: none;
}

.footer[data-reveal='visible']>* {
    animation: appear-up 0.95s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.footer[data-reveal='visible']>:nth-child(2) {
    animation-delay: .12s;
}


@keyframes heart-beat {
    0%, 65%, 100% {
        transform: translateY(0) scale(1);
    }
    14% {
        transform: translateY(-2px) scale(1.18);
    }
    26% {
        transform: translateY(0) scale(1.04);
    }
    38% {
        transform: translateY(-1px) scale(1.12);
    }
}

@keyframes heart-halo {
    0%, 8% {
        transform: scale(0.95);
        opacity: 0;
    }
    16% {
        opacity: 0.7;
    }
    55%, 100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

@keyframes gift-lid-invite {
    0%,
    60%,
    100% {
        transform: translateY(0) rotate(0);
    }

    20%,
    32% {
        transform: translateY(-24px) rotate(-8deg);
    }

    44% {
        transform: translateY(-12px) rotate(4deg);
    }
}

@keyframes gift-float {
    0%,
    75%,
    100% {
        transform: translateY(0) rotate(0);
    }

    15%, 35% {
        transform: translateY(-9px) rotate(-8deg);
    }

    25%, 45% {
        transform: translateY(-6px) rotate(8deg);
    }
}

@keyframes gift-glow {
    0% { transform: scale(.8); opacity: 0; }
    20% { opacity: .8; }
    80%, 100% { transform: scale(1.6); opacity: 0; }
}

@keyframes modal-exit {
    from {
        opacity: var(--exit-opacity, 1);
        translate: var(--exit-translate, 0 0);
    }

    to {
        opacity: 0;
        translate: 0 12px;
    }
}

@keyframes backdrop-exit {
    to {
        opacity: 0;
    }
}



@keyframes appear-down {
    from {
        opacity: 0;
        translate: 0 -12px;
    }

    to {
        opacity: 1;
        translate: 0 0;
    }
}






@keyframes ribbon-draw {
    from { stroke-dashoffset: 1; }
    to { stroke-dashoffset: 0; }
}

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

@keyframes portrait-unveil {
    from { opacity: 0.25; transform: translateY(18px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes card-elevate {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes appear-up {
    from {
        opacity: 0;
        translate: 0 16px;
    }

    to {
        opacity: 1;
        translate: 0 0;
    }
}

@keyframes appear-photo {
    from {
        opacity: 0;
        translate: 0 16px;
        scale: 0.96;
    }

    to {
        opacity: 1;
        translate: 0 0;
        scale: 1;
    }
}

@keyframes stamp-imprint {
    0% {
        opacity: 0;
        transform: scale(1.3) translateY(-10px);
    }

    65% {
        opacity: 1;
        transform: scale(0.96) translateY(1px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes polaroid-settle {
    from {
        opacity: 0;
        transform: translateY(28px) rotate(-6deg) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) rotate(-3deg) scale(1);
    }
}

@keyframes olive-sway {
    0%, 100% {
        transform: rotate(18deg) scale(1);
    }

    50% {
        transform: rotate(23deg) scale(1.02);
    }
}


@keyframes sprig-draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes timeline-arrive {
    from {
        opacity: 0;
        transform: translateX(-16px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes icon-pop {
    from {
        transform: scale(0.6);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes music-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes music-ripple {
    0% {
        transform: scale(0.85);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* 14. RESPONSIVE */
@media (min-width: 769px) {
    .gallery {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-auto-rows: clamp(240px, 28vw, 400px);
        gap: 16px;
        max-width: 1120px;
    }

    .gallery button {
        height: 100%;
        aspect-ratio: auto;
    }

    .gallery button[data-landscape='true'] {
        grid-column: span 3;
    }

    .gallery button[data-landscape='true'] img { object-position: center 28%; }
}
@media (hover: hover) {
    .countdown > div:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(49, 94, 145, 0.12);
    }

    .gallery button:hover {
        transform: translateY(-5px) scale(1.015);
        box-shadow: 0 14px 32px rgba(49, 94, 145, 0.16);
    }

    .gallery button:hover img {
        transform: scale(1.05);
    }

    .music-button:hover {
        transform: scale(1.08);
    }

    .stream-pill:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(49, 94, 145, 0.2);
    }

    .stream-pill:active {
        transform: translateY(0) scale(0.98);
    }

    .gift-box:hover {
        transform: translateY(-2px);
    }

    .button:hover {
        background: #c2dee9;
        transform: translateY(-2px);
    }

    .text-button:hover {
        color: #29485c;
    }
}

@media (max-width: 768px) {
    .gift-section {
        padding: 36px 0 40px;
    }

    .gift-divider {
        width: 118px;
        margin-bottom: 11px;
    }

    .gift-section .section-heading {
        margin-bottom: 12px;
    }

    .gift-section .section-heading h2 {
        font-size: 31px;
    }

    .gift-section .section-heading p:not(.eyebrow) {
        max-width: 290px;
        font-size: 12px;
    }

    .gift-cue {
        width: 78px;
        margin-bottom: -33px;
        transform: translateX(47px);
    }

    .gift-box>svg {
        width: 132px;
    }

    .gift-box>span {
        font-size: 14px;
    }

    .gift-popup {
        gap: 8px;
    }

    .gift-popup-intro {
        font-size: 12px;
    }

    .gift-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px;
        padding: 3px;
        border-radius: 8px;
        background: #f7eef1;
    }

    .gift-tabs button {
        min-width: 0;
        min-height: 34px;
        padding: 6px 8px;
        border: 0;
        border-radius: 6px;
        background: transparent;
        color: var(--muted);
        font: 600 11px/1.3 var(--body);
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    .gift-tabs button[aria-pressed='true'] {
        background: #fffdfd;
        color: var(--ink);
        box-shadow: 0 2px 8px #315e9112;
    }

    .gift-panels {
        display: block;
    }

    .gift-panel {
        display: none;
        padding: 12px 14px;
    }

    .gift-panel[data-gift-active='true'] {
        display: block;
    }

    .gift-panel h3 {
        font-size: 18px;
        margin: 2px 0 6px;
    }

    .gift-panel .notice {
        margin: 0 0 8px;
        padding: 6px 8px;
        font-size: 11px;
    }

    .gift-qr-frame {
        width: min(180px, 100%);
    }

    .gift-bank {
        margin-top: 2px;
        font-size: 12px;
    }

    .gift-account-number {
        margin: 4px 0 2px;
        font-size: 15px;
    }

    .gift-account-name {
        font-size: 12px;
    }

    .gift-note {
        margin-top: 6px;
        font-size: 10px;
        line-height: 1.4;
    }

    .gift-panel .actions {
        margin-top: 10px;
        gap: 6px;
    }

    .gift-panel .actions .button {
        min-height: 36px;
        padding: 7px 12px;
        font-size: 12px;
        gap: 8px;
    }

    .container {
        width: calc(100% - 40px);
        min-width: 0;
    }

    .section {
        padding-block: 44px;
    }

    .section+.section,
    .hero+.section {
        padding-top: 0;
    }

    .masthead {
        padding-block: 14px 0;
        justify-content: center;
        border-bottom: 0;
    }

    .masthead>.eyebrow {
        display: none;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-block: 28px 64px;
    }

    .hero h1 {
        font-size: clamp(40px, 11.6vw, 58px);
        margin: 24px 0 22px;
    }


    .hero-intro {
        font-size: 12px;
        max-width: 100%;
    }

    .date-stamp {
        margin: 26px 0 4px;
        gap: 20px;
        font-size: 23px;
    }

    .hero-photo {
        width: min(420px, 100%);
        margin: auto;
        padding: 9px;
    }

    .hero-photo img {
        aspect-ratio: 4/5;
        object-position: 50% 30%;
    }

    .hero-photo figcaption {
        left: -25px;
        bottom: 30px;
        font-size: 9px;
        white-space: nowrap;
    }

    .split {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .photo-frame {
        max-width: 340px;
        margin: 16px auto 28px;
        width: 88%;
    }

    .invitation-copy {
        text-align: left;
    }

    .recipient strong {
        font-size: 25px;
    }

    .portraits {
        grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr);
        row-gap: 10px;
    }

    .portraits > p {
        font-size: clamp(11.5px, 3.2vw, 13px);
        line-height: 1.65;
    }

    .portraits > p > span:not(.eyebrow) {
        display: inline-block;
        white-space: nowrap;
    }

    .portraits img {
        aspect-ratio: 3/4 !important;
    }

    .portraits h3 {
        font-size: 18px;
    }

    .portraits .eyebrow {
        font-size: 8px;
    }


    .event-section,
    .message-section {
        padding: 55px 0;
    }

    .event-layout {
        grid-template-columns: 100%;
        gap: 28px;
    }

    .event-card {
        padding: 42px 20px 30px;
        border-radius: 140px 140px 16px 16px;
        box-sizing: border-box;
    }

    .event-card::before {
        border-radius: 132px 132px 10px 10px;
    }

    .event-layout > .section-heading {
        box-sizing: border-box;
    }

    .countdown {
        display: flex;
        gap: 8px;
        margin: 20px auto 8px;
        width: 100%;
        max-width: 340px;
        justify-content: center;
        box-sizing: border-box;
    }

    .countdown > div {
        padding: 6px 6px;
        flex: 1 1 0;
        min-width: 0;
        box-sizing: border-box;
    }

    .countdown strong {
        min-width: 0;
        font-size: 26px;
    }

    .countdown span {
        font-size: 10px;
    }

    .month-calendar {
        width: 100%;
        max-width: 340px;
        margin-inline: auto;
        box-sizing: border-box;
    }

    .schedule {
        border-radius: 2px;
        padding: 32px 18px;
        box-shadow: 6px 7px 0 #d7eaf1, 0 10px 30px #315e910b;
        box-sizing: border-box;
        overflow: visible;
    }

    .schedule::before {
        border-radius: 0;
    }

    .schedule ol { margin-top: 24px; }
    .schedule li { grid-template-columns: 46px 28px minmax(0, 1fr); gap: 8px; padding-bottom: 22px; }
    .schedule li:last-child { padding-bottom: 0; }
    .schedule li::before {
        left: 67px;
        top: 30px;
        bottom: -2px;
        width: 2px;
        background: repeating-linear-gradient(to bottom, #d5c3cb 0, #d5c3cb 3px, transparent 3px, transparent 7px);
    }
    .schedule time { font-size: 18px; line-height: 28px; }
    .schedule time span { flex-basis: 10px; }
    .schedule time span:nth-child(3) { flex-basis: 4px; }
    .schedule li svg { width: 28px; height: 28px; }
    .schedule h3 { font-size: 16px; }

    .interlude {
        height: auto;
        aspect-ratio: 5/6;
    }

    .interlude img {
        position: absolute;
        inset: 0;
        object-position: 50% 25%;
    }

    .interlude>div:not(.media-frame)>p+p {
        font-size: 35px;
    }

    .interlude .eyebrow {
        font-size: 8px;
    }

    .card {
        padding: 26px 20px;
    }

    .choice-row {
        gap: 8px;
    }

    .choice-row span {
        min-height: 48px;
    }

    .form-grid {
        gap: 18px;
    }

    .section-heading {
        margin-bottom: 30px;
    }

    .section-heading h2 {
        font-size: 31px;
    }

    .section-heading p:not(.eyebrow) {
        font-size: 12px;
    }

    .closing {
        grid-template-columns: 1fr;
        gap: 35px;
        text-align: center;
    }

    .closing figure {
        width: 240px;
        margin: auto;
    }

    .closing::before {
        /* 40px section padding + half of the 240 × 320px portrait. */
        top: 200px;
    }

    .closing h2 {
        font-size: 32px;
    }

    .footer {
        padding-bottom: calc(85px + env(safe-area-inset-bottom));
    }

    .music-button {
        bottom: calc(20px + env(safe-area-inset-bottom));
        right: 16px;
    }



    .modal-body {
        padding: 12px 14px;
    }

    .modal-head {
        padding: 10px 14px;
    }

    .modal-head h2 {
        font-size: 18px;
    }

    .modal-head .icon-button {
        width: 36px;
        height: 36px;
    }

    .modal-head .icon-button:focus,
    .modal-head .icon-button:focus-visible {
        outline: none;
    }

    .stream-pill {
        bottom: calc(20px + env(safe-area-inset-bottom));
        left: 16px;
        width: calc(100% - 86px);
        max-width: 380px;
        height: 44px;
    }

    .envelope {
        margin-top: 18px;
    }





    .opening {
        gap: 20px;
    }

    .opening-title {
        font-size: 23px;
    }

    .modal-image .modal-footer {
        bottom: calc(14px + var(--image-safe-bottom));
        padding: 4px 6px;
        max-width: calc(100% - var(--image-safe-left) - var(--image-safe-right) - 20px);
    }

    .modal-image .modal-header button { width: 36px; height: 36px; font-size: 18px; }
    .modal-image [data-image-zoom] { font-size: 15px; }
    .modal-image .image-controls [data-image-zoom="reset"] { padding-inline: 10px; font-size: 12px; }
    .modal-image [data-image-step] { display: none; }
}

.media-frame,
.gallery button:has([data-photo-unloaded]) {
    background: linear-gradient(135deg, #e5edf1, #f4eee6 55%, #f1e4e8);
}
[data-media-state='pending']::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 25%, #ffffff66 50%, transparent 75%);
    background-size: 250% 100%;
    animation: media-wait 2.4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes media-wait {
    from { background-position: 150% 0; }
    to { background-position: -50% 0; }
}
.media-frame {
    position: relative;
    overflow: hidden;
    width: 100%;
}
.hero-photo .media-frame { border-radius: 230px 230px 3px 3px; }
.portraits .media-frame { border-radius: 180px 180px 4px 4px; }
.closing .media-frame { border-radius: 160px 160px 5px 5px; }
.interlude .media-frame {
    position: absolute;
    inset: 0;
    height: 100%;
}
.media-frame img,
.gallery img { transition: opacity .45s ease; }
.media-frame:not([data-media-state='ready']) img { opacity: 0; }
.media-frame > button {
    position: absolute;
    inset: 0;
    margin: auto;
    width: fit-content;
    height: fit-content;
    max-width: 90%;
}
@media (prefers-reduced-motion: reduce) {
    .stream-pill, .stream-pill[data-active], .stream-pill .stream-sender, .stream-pill .stream-text { animation: none; transition: none; transform: none; }
    .media-frame img, .gallery img { transition: none; }
    [data-media-state='pending']::after { animation: none; }
}
.gallery [data-photo-unloaded] { opacity: 0; }
.gallery [data-photo-placeholder] {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 16px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    pointer-events: none;
}

.envelope-letter::before {
    content: '';
    position: absolute;
    inset: 1.875cqw;
    border: 1px solid #e9dfcf;
    pointer-events: none;
}


.gallery button[data-reveal='visible'] {
    animation: photo-unveil 1.35s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.gallery button[data-reveal='visible'] img {
    animation: photo-bloom 1.45s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.gallery button:nth-child(odd) {
    --photo-tilt: -1.5deg;
}
.gallery button:nth-child(even) {
    --photo-tilt: 1.5deg;
}
.gallery button[data-landscape='true'] {
    --photo-tilt: 0deg;
}

@keyframes photo-unveil {
    0% {
        opacity: 0;
        transform: translateY(36px) scale(0.93) rotate(var(--photo-tilt, 0deg));
        clip-path: inset(6% 4% 6% 4% round 14px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
        clip-path: inset(0 0 0 0 round 8px);
    }
}

@keyframes photo-bloom {
    0% {
        transform: scale(1.08);
    }
    100% {
        transform: scale(1);
    }
}

.gallery button[data-reveal='visible']:nth-child(odd) { animation-delay: 0.08s; }
.gallery button[data-reveal='visible']:nth-child(even) { animation-delay: 0.22s; }

.envelope-letter > svg {
    display: block;
    width: 7.9167cqw;
    height: 5cqw;
    margin: 1.875cqw auto 0;
    fill: none;
    stroke: #a18b68;
    stroke-width: 1.25;
}

.envelope-letter .eyebrow { font-size: 2.0833cqw; }
.envelope-letter .date-line { font-size: 2.2917cqw; }

/* Shared AppUI tooltip; position is calculated at runtime. */
.tooltip {
    position: fixed;
    z-index: 10030;
    width: max-content;
    max-width: min(280px, calc(100vw - 16px));
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    box-shadow: var(--shadow);
    font-family: var(--body);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    overflow-wrap: anywhere;
}
