:root {
    --olive-950: #243126;
    --olive-900: #31402d;
    --olive-800: #41553b;
    --olive-700: #647455;
    --olive-500: #889678;
    --olive-300: #bac4ae;
    --paper: #f5efe2;
    --paper-shadow: #d8ceba;
    --ink: #253026;
    --ink-soft: rgba(37, 48, 38, 0.72);
    --line: rgba(53, 68, 47, 0.18);
    --shadow-deep: 0 2rem 4rem rgba(24, 33, 24, 0.22);
    --shadow-soft: 0 1rem 2rem rgba(24, 33, 24, 0.12);
    --radius-xl: 28px;
    --radius-lg: 22px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Manrope", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 50% 36%, rgba(247, 243, 232, 0.92), transparent 26%),
        radial-gradient(circle at top left, rgba(193, 202, 181, 0.34), transparent 30%),
        radial-gradient(circle at bottom right, rgba(131, 146, 113, 0.18), transparent 26%),
        linear-gradient(145deg, #eef0e7 0%, #e4e7da 38%, #dde2d4 62%, #edf0e6 100%);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 10% 85%, rgba(35, 44, 34, 0.05) 0.55px, transparent 0.65px) 0 0 / 12px 12px,
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.58) 0.7px, transparent 0.8px) 0 0 / 18px 18px,
        radial-gradient(circle at 80% 65%, rgba(92, 105, 77, 0.12) 0.7px, transparent 0.8px) 0 0 / 22px 22px,
        linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
    opacity: 0.46;
    mix-blend-mode: multiply;
    pointer-events: none;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at center, transparent 48%, rgba(96, 111, 82, 0.08) 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 22%, transparent 78%, rgba(95, 110, 81, 0.06));
    pointer-events: none;
    opacity: 0.9;
}

.page-shell::before {
    content: "";
    position: absolute;
    inset: 8% 6% auto;
    height: 22rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(248, 243, 232, 0.55), rgba(248, 243, 232, 0.1) 58%, transparent 72%);
    filter: blur(28px);
    pointer-events: none;
}

.page-shell {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    gap: 2rem;
    padding: 3rem 1.25rem 4rem;
}

.ambient {
    position: absolute;
    inset: auto;
    width: 18rem;
    aspect-ratio: 1;
    filter: blur(18px);
    opacity: 0.55;
    pointer-events: none;
}

.ambient-left {
    top: 8%;
    left: -4rem;
    background: radial-gradient(circle, rgba(151, 168, 129, 0.42), transparent 65%);
}

.ambient-right {
    right: -4rem;
    bottom: 10%;
    background: radial-gradient(circle, rgba(85, 104, 70, 0.34), transparent 65%);
}

.hero-copy {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 42rem;
}

.eyebrow {
    margin: 0 0 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.3rem;
    font-size: 0.8rem;
    color: var(--olive-700);
}

.hero-copy h1 {
    margin: 0;
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(3rem, 9vw, 5.4rem);
    font-weight: 600;
    line-height: 0.9;
    color: var(--olive-900);
}

.hero-copy h1 span {
    font-size: 0.7em;
    color: var(--olive-700);
}

.hero-text {
    margin: 1rem auto 0;
    max-width: 34rem;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--ink-soft);
}

.envelope-stage {
    position: relative;
    z-index: 2;
    width: min(100%, 58rem);
    display: grid;
    justify-items: center;
    gap: 1rem;
    perspective: 1800px;
}

.envelope-wrapper {
    position: relative;
    width: min(100%, 52rem);
    padding-top: 0.5rem;
    --pocket-height: clamp(15rem, 44vw, 22rem);
    --flap-height: calc(var(--pocket-height) * 0.68);
    --letter-lift: clamp(4.5rem, 8vw, 7rem);
    --closed-letter-offset: calc(var(--pocket-height) * 0.56);
    --closed-envelope-height: calc(var(--pocket-height) + 1.5rem);
    --open-envelope-expand: 0px;
}

.gesture-layer {
    position: absolute;
    inset: 0;
    z-index: 10;
    cursor: grab;
    touch-action: none;
    border-radius: 2rem;
}

.gesture-layer.is-dragging {
    cursor: grabbing;
}

.gesture-layer.is-hidden {
    display: none;
}

.gesture-badge {
    position: absolute;
    left: 50%;
    bottom: calc(var(--pocket-height) * 0.28);
    transform: translateX(-50%);
    z-index: 6;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    font-size: 0.72rem;
    letter-spacing: 0.01rem;
    font-weight: 700;
    color: #f6f2e9;
    background: rgba(49, 64, 45, 0.92);
    box-shadow: var(--shadow-soft);
    white-space: nowrap;
    opacity: calc(1 - (var(--open-progress) * 2));
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.gesture-layer.is-hidden + .envelope .gesture-badge,
.envelope-stage.is-open .gesture-badge {
    opacity: 0;
}

.gesture-layer.is-dragging + .envelope .gesture-badge {
    transform: translateX(-50%) translateY(-2px);
}

.envelope {
    position: relative;
    width: min(100%, 52rem);
    min-height: var(--closed-envelope-height);
    transition: min-height 0.75s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: min-height;
}

.envelope-stage.is-open .envelope {
    min-height: calc(var(--closed-envelope-height) + var(--open-envelope-expand));
}

.envelope-shadow {
    position: absolute;
    bottom: 1.5rem;
    width: 72%;
    height: 2.5rem;
    background: rgba(31, 43, 30, 0.18);
    border-radius: 999px;
    filter: blur(18px);
    transform: scaleX(calc(0.84 + (var(--open-progress) * 0.16)));
    transition: transform 0.45s ease;
    will-change: transform;
}

.envelope-back,
.envelope-front,
.envelope-flap {
    position: absolute;
    width: min(100%, 46rem);
    left: 50%;
    transform-style: preserve-3d;
    transform: translateX(-50%);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.envelope-back,
.envelope-front {
    bottom: 0;
    height: var(--pocket-height);
}

.envelope-back {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 22%),
        linear-gradient(145deg, #d8decf 0%, #c3cdb7 34%, #a8b696 100%);
    border: 1px solid rgba(74, 90, 63, 0.18);
    box-shadow:
        0 1.8rem 3.8rem rgba(29, 40, 28, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(84, 102, 68, 0.12);
    z-index: 1;
}

.envelope-back::before {
    content: "";
    position: absolute;
    inset: 0.7rem;
    border-radius: 0 0 calc(var(--radius-xl) - 8px) calc(var(--radius-xl) - 8px);
    border: 1px solid rgba(247, 242, 230, 0.18);
    pointer-events: none;
}

.envelope-front {
    overflow: hidden;
    z-index: 2;
}

.envelope-pocket {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 20%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.42), transparent 40%),
        linear-gradient(145deg, #aebc9d 0%, #91a184 100%);
    border: 1px solid rgba(74, 90, 63, 0.18);
    clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.24),
        inset 0 -1px 0 rgba(84, 102, 68, 0.14);
}

.envelope-pocket::before {
    content: "";
    position: absolute;
    inset: 0.8rem;
    clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%);
    border: 1px solid rgba(246, 241, 229, 0.14);
    opacity: 0.85;
    pointer-events: none;
}

.envelope-flap {
    top: calc(100% - var(--pocket-height));
    height: var(--flap-height);
    border-radius: 0;
    transform:
        translateX(-50%)
        rotateX(calc(var(--open-progress) * -175deg));
    transform-origin: center top;
    transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 4;
    pointer-events: none;
    will-change: transform;
}

.envelope-flap::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent 34%),
        linear-gradient(145deg, #d8dfcb 0%, #afbc9f 56%, #8a9b7d 100%);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    box-shadow:
        inset 0 -1px 0 rgba(49, 64, 45, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backface-visibility: hidden;
}

.seal {
    position: absolute;
    left: 50%;
    bottom: calc(var(--flap-height) * 0.12);
    transform: translateX(-50%) translateZ(18px);
    width: 5.35rem;
    height: 5.35rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.72), transparent 30%),
        linear-gradient(160deg, #f1eadb 0%, #d9d1bd 58%, #c3baa5 100%);
    box-shadow:
        inset 0 0.2rem 0.8rem rgba(255, 255, 255, 0.5),
        inset 0 -0.35rem 0.8rem rgba(111, 108, 92, 0.16),
        0 1rem 2rem rgba(25, 35, 24, 0.18);
    opacity: calc(1 - (var(--open-progress) * 2.2));
    transition: opacity 0.2s ease;
    will-change: opacity, transform;
}

.seal::before {
    content: "";
    position: absolute;
    inset: 0.38rem;
    border-radius: 50%;
    border: 1px solid rgba(108, 121, 92, 0.24);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.seal::after {
    content: "";
    position: absolute;
    inset: 1.05rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.24), transparent 68%);
    filter: blur(1px);
}

.seal-art {
    position: relative;
    z-index: 1;
    width: 72%;
    height: 72%;
    object-fit: contain;
    display: block;
    filter:
        drop-shadow(0 0.08rem 0.12rem rgba(255, 255, 255, 0.18))
        saturate(1.02);
}

.letter {
    position: absolute;
    left: 50%;
    bottom: 1rem;
    z-index: 5;
    width: min(88%, 36rem);
    margin-bottom: 0;
    transform:
        translateX(-50%)
        translateY(calc(var(--closed-letter-offset) - (var(--open-progress) * var(--letter-lift))))
        scale(calc(0.93 + (var(--open-progress) * 0.07)));
    opacity: calc(var(--open-progress) * 0.96);
    transition:
        transform 0.75s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.55s ease;
    will-change: transform, opacity;
}

.envelope-stage.is-dragging .envelope,
.envelope-stage.is-dragging .envelope-shadow,
.envelope-stage.is-dragging .envelope-flap,
.envelope-stage.is-dragging .letter,
.envelope-stage.is-dragging .seal {
    transition: none;
}

.letter-paper {
    position: relative;
    padding: clamp(1.2rem, 3.2vw, 2rem);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.44), transparent 20%),
        linear-gradient(180deg, #f7f2e8 0%, #f3ecdf 100%);
    border: 1px solid rgba(109, 122, 92, 0.38);
    box-shadow:
        0 1.2rem 2.8rem rgba(28, 38, 28, 0.14),
        inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.letter-paper::before {
    content: "";
    position: absolute;
    inset: 0.45rem;
    border-radius: calc(var(--radius-lg) - 4px);
    border: 1px solid rgba(109, 122, 92, 0.18);
    pointer-events: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ornament {
    display: block;
    width: calc(100% + 0.8rem);
    height: auto;
    margin-inline: -0.4rem;
    opacity: 0.92;
}

.ornament-top {
    margin-top: -1.3rem;
    margin-bottom: -0.15rem;
    transform: scaleY(-1);
    transform-origin: center;
}

.ornament-bottom {
    margin-top: 0.15rem;
    margin-bottom: -0.9rem;
}

.invitation-header {
    text-align: center;
    padding-bottom: 1.4rem;
}

.crest {
    display: grid;
    justify-items: center;
    margin: 0.5rem auto 0.6rem;
    color: var(--olive-800);
}

.crest-image {
    display: block;
    width: min(100%, 12rem);
    height: auto;
}

.verse {
    margin: 1.35rem auto 1.6rem;
    max-width: 31rem;
    color: var(--olive-700);
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(1.15rem, 2.5vw, 1.55rem);
    font-style: italic;
    line-height: 1.35;
}

.verse p {
    margin: 0;
}

.verse cite {
    display: block;
    margin-top: 0.45rem;
    font-size: 1.2rem;
    font-style: normal;
}

.blessing-block {
    margin: 0 auto 1.45rem;
    max-width: 33rem;
}

.parents-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 0.7rem;
}

.parent-family {
    padding: 0.95rem 0.75rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(76, 92, 63, 0.12);
}

.parent-family strong {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.92rem;
    color: var(--olive-900);
}

.parent-family p {
    margin: 0.16rem 0;
    font-size: 0.92rem;
    color: var(--ink-soft);
}

.couple-names {
    margin: 0.6rem 0 0.75rem;
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2.4rem, 5.6vw, 3.9rem);
    font-weight: 600;
    line-height: 0.92;
    color: var(--olive-900);
}

.couple-names span {
    color: var(--olive-700);
}

.intro-strong {
    font-size: 1.14rem;
    font-weight: 700;
    color: var(--olive-900);
}

.intro {
    margin: 0 auto;
    max-width: 31rem;
    color: var(--ink-soft);
    line-height: 1.7;
}

.invitation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-card {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.54);
    border: 1px solid rgba(76, 92, 63, 0.13);
}

.detail-card strong,
.detail-card p {
    display: block;
}

.detail-card strong {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.55rem;
    font-weight: 600;
    color: var(--olive-950);
}

.detail-card p {
    margin: 0.25rem 0 0;
    color: var(--ink-soft);
}

.map-link {
    margin-top: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 0.95rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.86rem;
    letter-spacing: 0.02rem;
    color: var(--olive-900);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(76, 92, 63, 0.14);
    box-shadow: 0 0.9rem 1.6rem rgba(28, 38, 28, 0.08);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.map-link:hover,
.map-link:focus-visible {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(76, 92, 63, 0.22);
}

.detail-card-wide {
    grid-column: 1 / -1;
}

.detail-label {
    display: inline-block;
    margin-bottom: 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18rem;
    color: var(--olive-700);
}

.event-note {
    margin: 0 0 1.6rem;
    padding: 1rem 1.1rem;
    border-left: 4px solid rgba(100, 116, 85, 0.56);
    background: rgba(100, 116, 85, 0.08);
    border-radius: 14px;
    color: var(--ink-soft);
    line-height: 1.75;
}

.manual-block {
    margin: 0 0 1.6rem;
    padding: 1.25rem;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(186, 196, 174, 0.18), transparent 100%),
        rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(76, 92, 63, 0.12);
}

.manual-block h3 {
    margin: 0 0 0.35rem;
    font-family: "Cormorant Garamond", serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--olive-950);
}

.manual-sub {
    margin: 0 0 1.1rem;
    color: var(--ink-soft);
    line-height: 1.7;
}

.manual-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.95rem 0.8rem;
}

.manual-item {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 0.55rem;
    padding: 0.95rem 0.8rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(76, 92, 63, 0.12);
}

.manual-item p {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--olive-900);
    line-height: 1.25;
}

.manual-icon {
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    place-items: center;
    color: var(--olive-700);
    opacity: 0.92;
}

.manual-icon svg {
    width: 100%;
    height: 100%;
}

.dress-code {
    margin-top: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.54);
    border: 1px solid rgba(76, 92, 63, 0.12);
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 0.15rem;
}

.dress-code strong {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.65rem;
    font-weight: 600;
    color: var(--olive-950);
}

.dress-code-note {
    margin: 0.4rem 0 0;
    max-width: 30rem;
    color: var(--ink-soft);
    line-height: 1.65;
}

.dress-code-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.85rem;
}

.dress-code-card {
    padding: 0.85rem 0.85rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(76, 92, 63, 0.12);
}

.dress-code-who {
    margin: 0 0 0.35rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.18rem;
    font-size: 0.75rem;
    color: var(--olive-700);
}

.dress-code-tip {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.65;
    font-size: 0.92rem;
}

.rsvp-block {
    padding: 1.25rem;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(186, 196, 174, 0.24), transparent 100%),
        rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(76, 92, 63, 0.12);
}

.rsvp-heading h3 {
    margin: 0 0 0.4rem;
    font-family: "Cormorant Garamond", serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--olive-950);
}

.rsvp-heading p {
    margin: 0 0 1rem;
    line-height: 1.7;
    color: var(--ink-soft);
}

.rsvp-form {
    display: grid;
    gap: 0.95rem;
}

.rsvp-allocation,
.companion-group {
    padding: 1rem 1.05rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.54);
    border: 1px solid rgba(76, 92, 63, 0.12);
}

.allocation-copy,
.companion-copy p:last-child {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.65;
}

.companion-fields {
    display: grid;
    gap: 0.85rem;
}

.companion-copy {
    margin-bottom: 0.85rem;
}

.companion-copy .detail-label {
    margin-bottom: 0.3rem;
}

.companion-grid {
    display: grid;
    gap: 0.8rem;
}

.companion-empty {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.65;
}

.field-row {
    display: grid;
    gap: 0.45rem;
}

.field-row label,
.attendance-group legend {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--olive-900);
}

.field-row input {
    width: 100%;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(76, 92, 63, 0.18);
    border-radius: 16px;
    background: rgba(251, 249, 244, 0.92);
    color: var(--ink);
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field-row input:focus {
    outline: none;
    border-color: rgba(76, 92, 63, 0.52);
    box-shadow: 0 0 0 4px rgba(138, 150, 120, 0.16);
    transform: translateY(-1px);
}

.attendance-group {
    margin: 0;
    padding: 0;
    border: 0;
    display: grid;
    gap: 0.7rem;
}

.choice-chip {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(76, 92, 63, 0.14);
    background: rgba(251, 249, 244, 0.7);
    cursor: pointer;
}

.choice-chip input {
    accent-color: var(--olive-800);
}

.submit-button,
.reset-button {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.submit-button {
    padding: 1rem 1.2rem;
    border-radius: 999px;
    background:
        linear-gradient(180deg, #5f7354 0%, #34442f 100%);
    color: #f7f2e8;
    font-weight: 700;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.submit-button:hover,
.submit-button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 1.2rem 2rem rgba(40, 53, 37, 0.2);
}

.submit-button:disabled {
    cursor: wait;
    opacity: 0.75;
}

.form-feedback {
    min-height: 1.5rem;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.form-feedback.is-error {
    color: #9c3f2c;
}

.form-feedback.is-success {
    color: var(--olive-900);
}

.reset-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 10rem;
    padding: 0.9rem 1.2rem;
    border-radius: 999px;
    color: var(--olive-900);
    background: rgba(255, 250, 242, 0.78);
    border: 1px solid rgba(76, 92, 63, 0.15);
    box-shadow: var(--shadow-soft);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.envelope-stage.is-open .reset-button {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.gift-stage {
    position: relative;
    z-index: 2;
    width: min(100%, 58rem);
}

.calendar-stage {
    position: relative;
    z-index: 2;
    width: min(100%, 58rem);
}

.calendar-stage-card {
    padding: clamp(1.35rem, 3vw, 2rem);
    border-radius: 30px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 18%),
        linear-gradient(180deg, #f7f2e8 0%, #f3ecdf 100%);
    border: 1px solid rgba(89, 104, 71, 0.18);
    box-shadow: 0 1.6rem 3rem rgba(28, 38, 28, 0.12);
}

.calendar-stage-card h2 {
    margin: 0;
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2rem, 4vw, 3.1rem);
    font-weight: 600;
    color: var(--olive-950);
}

.calendar-copy {
    margin: 0.45rem 0 0;
    color: var(--ink-soft);
    line-height: 1.7;
    max-width: 44rem;
}

.calendar-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1.25rem;
}

.calendar-detail {
    padding: 1rem 1.05rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.54);
    border: 1px solid rgba(76, 92, 63, 0.12);
    text-align: left;
}

.calendar-detail strong {
    display: block;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--olive-950);
}

.calendar-detail p {
    margin: 0.25rem 0 0;
    color: var(--ink-soft);
    line-height: 1.6;
}

.calendar-detail-wide {
    grid-column: 1 / -1;
}

.calendar-actions {
    margin-top: 1.15rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.calendar-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.9rem 1.2rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #5f7354 0%, #34442f 100%);
    color: #f7f2e8;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0.02rem;
    box-shadow: 0 1.2rem 2.2rem rgba(28, 38, 28, 0.14);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.calendar-button:hover,
.calendar-button:focus-visible {
    transform: translateY(-1px);
    filter: saturate(1.03);
}

.calendar-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.15rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    color: var(--olive-900);
    background: rgba(255, 250, 242, 0.78);
    border: 1px solid rgba(76, 92, 63, 0.15);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, background 0.2s ease;
}

.calendar-secondary:hover,
.calendar-secondary:focus-visible {
    transform: translateY(-1px);
    background: rgba(255, 250, 242, 0.95);
}

.calendar-note {
    margin: 0.9rem 0 0;
    color: var(--ink-soft);
    line-height: 1.65;
}

.gift-stage-card {
    padding: clamp(1.35rem, 3vw, 2rem);
    border-radius: 30px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 18%),
        linear-gradient(180deg, #f7f2e8 0%, #f3ecdf 100%);
    border: 1px solid rgba(89, 104, 71, 0.18);
    box-shadow: 0 1.6rem 3rem rgba(28, 38, 28, 0.12);
}

.gift-stage-card h2 {
    margin: 0;
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    font-weight: 600;
    color: var(--olive-950);
}

.gift-stage-copy {
    margin: 0.45rem 0 0;
    color: var(--ink-soft);
    line-height: 1.7;
}

.gift-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.35rem;
}

.gift-card {
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 250, 242, 0.82);
    border: 1px solid rgba(76, 92, 63, 0.13);
    box-shadow: 0 1rem 2rem rgba(29, 41, 28, 0.08);
}

.gift-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 220px;
    object-fit: contain;
    background: rgba(233, 237, 226, 0.9);
    padding: 0.8rem;
    display: block;
}

.gift-card-copy {
    display: grid;
    gap: 0.55rem;
    padding: 1rem 1rem 1.1rem;
}

.gift-card-copy h3 {
    margin: 0;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--olive-950);
}

.gift-card-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #5f7354 0%, #34442f 100%);
    color: #f7f2e8;
    font-weight: 700;
    text-decoration: none;
}

.gift-empty {
    margin: 0;
    color: var(--ink-soft);
    font-weight: 600;
}

.site-footer {
    width: min(100%, 58rem);
    text-align: center;
    margin-top: 1.5rem;
    padding: 0.75rem 0.5rem 0;
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.site-footer p {
    margin: 0;
    line-height: 1.6;
}

.site-footer a {
    color: var(--olive-900);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(76, 92, 63, 0.24);
}

.site-footer a:hover,
.site-footer a:focus-visible {
    border-bottom-color: rgba(76, 92, 63, 0.5);
}

@media (max-width: 720px) {
    .page-shell {
        padding-inline: 0.9rem;
    }

    .hero-text {
        font-size: 0.95rem;
    }

    .envelope-wrapper {
        --pocket-height: 15.5rem;
        --flap-height: 10.25rem;
        --letter-lift: 4.25rem;
        --closed-letter-offset: 9.25rem;
    }

    .gesture-badge {
        bottom: calc(var(--pocket-height) * 0.3);
        padding: 0.42rem 0.72rem;
        font-size: 0.65rem;
    }

    .seal {
        width: 4.5rem;
        height: 4.5rem;
        bottom: calc(var(--flap-height) * 0.1);
    }

    .letter {
        width: 92%;
        transform:
            translateX(-50%)
            translateY(calc(var(--closed-letter-offset) - (var(--open-progress) * var(--letter-lift))))
            scale(calc(0.94 + (var(--open-progress) * 0.06)));
    }

    .invitation-grid {
        grid-template-columns: 1fr;
    }

    .parents-grid {
        grid-template-columns: 1fr;
    }

    .couple-names {
        font-size: clamp(2.45rem, 11vw, 3.5rem);
    }

    .verse {
        font-size: 1.18rem;
    }

    .crest-image {
        width: min(100%, 15.5rem);
    }

    .manual-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dress-code-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 480px) {
    body::before {
        opacity: 0.38;
    }

    .page-shell {
        gap: 1.35rem;
        padding: 2rem 0.7rem 3rem;
    }

    .ambient-left {
        left: -6rem;
    }

    .ambient-right {
        right: -6rem;
    }

    .hero-copy {
        width: 100%;
        max-width: 18rem;
    }

    .eyebrow {
        font-size: 0.68rem;
        letter-spacing: 0.22rem;
    }

    .hero-copy h1 {
        font-size: clamp(2.4rem, 14vw, 3.7rem);
        line-height: 0.92;
    }

    .hero-text {
        max-width: 16rem;
        font-size: 0.84rem;
        line-height: 1.55;
    }

    .envelope-wrapper {
        width: 100%;
        --pocket-height: 13.4rem;
        --flap-height: 8.9rem;
        --letter-lift: 3.3rem;
        --closed-letter-offset: 7.6rem;
    }

    .envelope-back,
    .envelope-front,
    .envelope-flap {
        width: calc(100% - 0.4rem);
    }

    .letter {
        width: 94%;
    }

    .seal {
        width: 3.75rem;
        height: 3.75rem;
    }

    .seal::before {
        inset: 0.28rem;
    }

    .seal::after {
        inset: 0.78rem;
    }

    .gesture-badge {
        bottom: calc(var(--pocket-height) * 0.23);
        max-width: 82%;
        padding: 0.38rem 0.62rem;
        font-size: 0.58rem;
    }

    .gift-stage-card h2 {
        font-size: clamp(1.85rem, 9vw, 2.4rem);
    }

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

    .manual-block {
        padding: 1.05rem 0.95rem;
    }

    .manual-block h3 {
        font-size: 1.7rem;
    }

    .manual-grid {
        gap: 0.75rem 0.65rem;
    }

    .manual-item {
        padding: 0.85rem 0.65rem;
        border-radius: 16px;
    }

    .manual-item p {
        font-size: 0.85rem;
    }

    .manual-icon {
        width: 2rem;
        height: 2rem;
    }

    .dress-code-note {
        font-size: 0.92rem;
    }

    .dress-code-tip {
        font-size: 0.88rem;
    }
}

@media (max-width: 360px) {
    .hero-copy {
        max-width: 15.5rem;
    }

    .hero-copy h1 {
        font-size: clamp(2.05rem, 13vw, 3rem);
    }

    .hero-text {
        max-width: 14.5rem;
        font-size: 0.78rem;
    }

    .envelope-wrapper {
        --pocket-height: 11.9rem;
        --flap-height: 8rem;
        --letter-lift: 2.8rem;
        --closed-letter-offset: 6.8rem;
    }

    .gesture-badge {
        font-size: 0.54rem;
    }
}

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