:root {
  color-scheme: light;
  --cream: #f7e9d4;
  --paper: #fff3df;
  --ink: #2b1a12;
  --muted: #674d3a;
  --heading: #4b261c;
  --gold: #e5b765;
  --gold-dark: #94601f;
  --green: #46522f;
  --green-dark: #242c1b;
  --line: #debb86;
  --red: #743831;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', Arial, sans-serif;
  font: 16px/1.48 var(--serif);
  color: var(--ink);
  background: #302016;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-wrap: anywhere; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .66; }
img { display: block; max-width: 100%; height: auto; }
a { color: #4a4d29; text-underline-offset: .22em; }
:focus-visible { outline: 3px solid #aa7437; outline-offset: 4px; }
[id] { scroll-margin-top: 1rem; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.17; margin: 0 0 .55em; }
h2 { color: var(--heading); font-size: clamp(1.65rem, 2.85vw, 2.55rem); }
h3 { color: var(--heading); font-size: clamp(1.25rem, 1.9vw, 1.72rem); }
p { margin: 0 0 .8rem; }
.wrap { width: min(84.5%, 77rem); margin-inline: auto; }
.section { padding-block: 1.45rem; }
.section > h2, .surprise-section h2, .centered { text-align: center; }
.support { color: var(--muted); font-size: .9rem; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.7rem, 2vw, 1.75rem); }

.icon-library { position: absolute; width: 0; height: 0; pointer-events: none; }
.icon { display: inline-block; width: 1.3em; height: 1.3em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
#residence { position: relative; }
#residence main, .story-page { background: radial-gradient(ellipse at 5% 34%, #f3ddbfbc, transparent 43%), radial-gradient(ellipse at 99% 30%, #eaceabbc, transparent 52%), linear-gradient(#f8ebd8cc, #f8ebd8f0), url('../assets/paper-detail.webp') repeat, #f8ebd8; }
.site-header { position: absolute; z-index: 1; inset: 0 0 auto; color: #ffe3ad; background: linear-gradient(#21150ed9, #21150e15); }
.header-inner { width: min(80%, 75rem); min-height: clamp(3.2rem, 5vw, 4.5rem); display: flex; align-items: center; justify-content: space-between; gap: .5rem 1.8rem; }
.brand { min-width: 0; display: inline-flex; flex-wrap: wrap; align-items: center; gap: .22rem .95rem; color: inherit; text-decoration: none; }
.brand-name, .footer-brand { display: inline-flex; align-items: center; gap: .32em; color: #ffdfa4; font-size: clamp(1.13rem, 1.9vw, 1.65rem); font-weight: 700; white-space: nowrap; }
.brand-leaves { display: inline-block; flex-shrink: 0; vertical-align: middle; object-fit: contain; }
.brand .brand-leaves, .footer-brand .brand-leaves { width: 1.25em; height: 1.1em; }
.brand-caption { border-left: 1px solid #dca971a1; padding-left: .85rem; font: 500 clamp(.8rem, 1.3vw, 1.08rem)/1.25 var(--sans); }
.site-header nav { display: flex; flex-wrap: wrap; gap: .3rem clamp(.7rem, 2.4vw, 2.6rem); }
.site-header nav a { color: inherit; font: 500 clamp(.78rem, 1.28vw, 1.08rem)/1.25 var(--sans); text-decoration: none; padding-block: .6rem; }
.site-header a:hover, .site-footer a:hover { text-decoration: underline; }

.hero { position: relative; color: #ffedc3; background: #261d1c; }
.hero-picture, .hero-picture img { display: block; width: 100%; }
.hero-inner { position: absolute; inset: 13.3% 0 auto; width: min(83%, 80rem); }
.hero-copy { width: 29%; max-width: 29rem; }
.hero-copy h1 { position: relative; color: #ffdfa0; font-size: clamp(1.85rem, 3.72vw, 5rem); font-style: italic; font-weight: 400; line-height: 1.01; letter-spacing: -.025em; margin: 0 0 .65em; text-align: center; }
.hero-copy h1 > span { display: block; position: relative; white-space: nowrap; }
.hero-copy p { font: 400 clamp(.82rem, 1.37vw, 1.48rem)/1.39 var(--sans); color: #ffe8b9; margin-bottom: clamp(1.2rem, 3vw, 3rem); }
.hero-copy .button { font: 700 clamp(.86rem, 1.54vw, 1.62rem)/1.2 var(--sans); min-height: clamp(2.7rem, 4.9vw, 5.6rem); width: 100%; justify-content: space-evenly; padding-inline: .75rem; }
.hero-copy .button > span { font-size: 1.5em; line-height: .65; }

.journey { color: #fbe2b3; background: linear-gradient(#332214, #21170f); border-block: 1px solid #a16a35; box-shadow: 0 .3rem 1rem #6a452629; }
.journey ul { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-block: 0; padding: .68rem 0; }
.journey li { display: flex; align-items: center; justify-content: center; min-width: 0; padding: .24rem .45rem; gap: .58rem; text-align: left; font: 500 clamp(.65rem, 1.12vw, 1rem)/1.25 var(--sans); }
.journey li + li { border-inline-start: 1px solid #ac7a4d99; }
.journey .icon { width: 1.5rem; height: 1.5rem; color: #f2c579; }

.button { display: inline-flex; min-height: 2.72rem; align-items: center; justify-content: center; gap: .55em; border: 1px solid transparent; border-radius: 999px; padding: .53rem 1rem; color: inherit; font-size: .99rem; font-weight: 650; line-height: 1.2; text-align: center; text-decoration: none; }
.button:hover:not(:disabled) { filter: brightness(1.12); }
.button-gold { background: linear-gradient(#f7d79a, #cc934a); color: #261913; border-color: #f0c780; box-shadow: 0 2px 6px #1f150eaa, inset 0 1px #fff0c4; }
.button-green { background: linear-gradient(#515a31, #292e18); color: #fff5de; border-color: #c99953; box-shadow: 0 2px 5px #66412446, inset 0 1px #ab83515e; }
.button-outline { background: linear-gradient(#fff4e0, #f4d8ad); border-color: #b9894d; color: #362418; }
.button-brown { background: linear-gradient(#694522, #382419); color: #fff4db; border-color: #b68349; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

.paper { background: radial-gradient(ellipse at 6% 8%, #fff4e5b0, transparent 70%), linear-gradient(124deg, #fff4e3, #f3dcb9); border: 1px solid var(--line); border-radius: .9rem; box-shadow: 0 4px 12px #79512b1d; }
.ornament-title { display: flex; align-items: center; justify-content: center; gap: clamp(.38rem, 1.5vw, 1.4rem); }
.ornament-title::before, .ornament-title::after { content: ''; display: block; flex: 0 1 4rem; min-width: .8rem; height: .5rem; opacity: .82; background: linear-gradient(12deg, transparent 36%, #a96d2d 39% 47%, transparent 50%) 50% 0 / 70% 50% no-repeat, linear-gradient(-13deg, transparent 39%, #a96d2d 42% 50%, transparent 53%) 66% 100% / 35% 55% no-repeat; }
.ornament-title::after { transform: scaleX(-1); }
.examples { padding-bottom: 1rem; }
.example { display: grid; gap: .48rem; margin: 0; padding: .75rem clamp(.65rem, 2vw, 1.45rem); }
.example blockquote, .example figcaption { display: grid; grid-template-columns: clamp(2.2rem, 4.7vw, 3.3rem) minmax(0, 1fr); align-items: center; gap: .7rem; margin: 0; }
.example blockquote { font-weight: 650; }
.example figcaption span { padding: .53rem .75rem; background: #efd1a869; border-radius: .55rem; }
.moroz-avatar { border-radius: 50%; object-fit: cover; border: 1px solid #af7334; }
.guest-icon { border-radius: 50%; background: #edd2ac; color: #654025; width: 100%; height: auto; aspect-ratio: 1; padding: 21%; }
.examples .support { margin: .62rem 0 0; }

.correspondence { position: relative; padding: clamp(1rem, 2.2vw, 1.95rem); box-shadow: 0 .46rem 1.2rem #865b3842; }
.correspondence::before { content: ''; position: absolute; inset: .39rem; pointer-events: none; border: 1px solid #bc935e61; border-radius: .65rem; }
.correspondence-grid { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 2.35fr) minmax(0, 1fr); align-items: end; gap: clamp(.5rem, 1.7vw, 1.45rem); }
.letter-prop { width: 100%; min-height: 11rem; aspect-ratio: 229 / 221; align-self: end; margin-bottom: -.5rem; background: url('../assets/letter-tea.webp') left bottom / 100% 100% no-repeat; mix-blend-mode: multiply; mask-image: linear-gradient(90deg, transparent, #000 8% 77%, transparent), linear-gradient(0deg, transparent, #000 12% 81%, transparent); mask-composite: intersect; }
.letter-aside { align-self: center; font-size: clamp(.82rem, 1.26vw, 1.05rem); }
.letter-aside div { width: 100%; aspect-ratio: 1.9; background: url('../assets/letter-city.webp') center / contain no-repeat; mix-blend-mode: multiply; mask-image: radial-gradient(ellipse, #000 47%, transparent 75%); }
.letter-aside p { border-left: 1px solid #b9874a; padding-left: .65rem; margin: .6rem 0 0; }
.letter { position: relative; padding: clamp(.85rem, 2.15vw, 1.85rem); }
#letter-form { min-width: 0; padding: 0; border: 0; box-shadow: none; background: none; }
.address { border-bottom: 1px solid #b0874b4b; padding-bottom: .4rem; display: flex; gap: .55rem; flex-wrap: wrap; }
.address strong { color: var(--muted); font-size: .93rem; }
label { display: block; margin: .55rem 0 .22rem; font-weight: 650; }
input:not([type=checkbox]), textarea { display: block; min-width: 0; width: 100%; background: #fff8ec96; color: var(--ink); padding: .5rem .66rem; border: 1px solid #b9966ebf; border-radius: .43rem; }
input::placeholder, textarea::placeholder { color: #796657; opacity: 1; }
textarea { resize: vertical; min-height: 4.2rem; }
.field-row { display: flex; align-items: center; gap: .6rem; }
.field-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem .65rem; padding: .35rem 0 0; color: var(--muted); font-size: .82rem; }
.count { white-space: nowrap; color: var(--muted); font: .81rem/1.4 var(--sans); font-variant-numeric: tabular-nums; }
.status { color: #40512d; font-weight: 650; margin: .55rem 0 0; }
.status:empty { margin: 0; }
.sending #send-letter { animation: send .42s ease-out; }
@keyframes send { 50% { transform: translateY(-.18rem); } }

.how { padding-block: 1.15rem 1.35rem; }
.how ol { list-style: none; counter-reset: steps; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem; padding: 0; margin: 0; }
.how li { counter-increment: steps; position: relative; text-align: center; font-size: clamp(.9rem, 1.42vw, 1.18rem); line-height: 1.25; }
.how li .icon { display: block; width: 2.65rem; height: 2.65rem; margin: 0 auto .4rem; padding: .55rem; color: #54311f; border: 1px solid #bf8a49; border-radius: 50%; background: #f8e2bb; }
.how li:not(:last-child)::after { content: '⟶'; position: absolute; top: .48rem; right: -.75rem; color: var(--gold-dark); font-size: 1.13rem; }
.how li span { display: inline-block; max-width: 14ch; }
.how li span::before { content: counter(steps) '. '; }

.scenario-preview { margin-top: 1.15rem; }
.scenario-label { margin-bottom: .65rem; }
.scenario-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.9rem, 2.4vw, 2rem); align-items: start; }
.sample-letters { display: grid; isolation: isolate; }
.sample-letter { position: relative; padding: clamp(.85rem, 1.65vw, 1.5rem); }
.sample-letter h3 { font-size: clamp(1.12rem, 1.55vw, 1.46rem); margin-bottom: .32em; }
.sample-letter p { margin: 0; }
.sample-visitor { width: 92%; margin-inline: auto; padding-bottom: 1.8rem; font-style: italic; }
.sample-visitor h3 { font-style: normal; }
.sample-visitor .icon { width: 1.1em; height: 1.1em; }
.sample-response { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .65rem .85rem; margin-top: -1rem; box-shadow: 0 6px 15px #79512b35; }
.sample-response .moroz-avatar { width: clamp(2.6rem, 4.4vw, 3.55rem); }
.sample-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; align-items: stretch; }
.sample-response .sample-actions { grid-column: 1 / -1; margin-top: .15rem; }
.sample-actions .button { font-size: clamp(.84rem, 1.2vw, .98rem); padding-inline: .55rem; }
.sample-gift { min-width: 0; }
.sample-pocket { position: relative; isolation: isolate; display: grid; justify-items: center; padding: 0 5% 3.85rem; }
.sample-pocket::before { content: ''; position: absolute; z-index: -1; inset: .85rem 0 0; background: linear-gradient(155deg, #62633b, #31391f); border: 1px solid #9c763a; border-radius: .85rem; clip-path: polygon(0 31%, 50% 0, 100% 31%, 100% 100%, 0 100%); }
.sample-card { position: relative; width: min(100%, 31rem); padding: .85rem clamp(.85rem, 2.2vw, 1.7rem) 1.45rem; text-align: center; }
.sample-card::before { content: ''; position: absolute; inset: .3rem; border: 1px solid #c798568c; border-radius: .62rem; pointer-events: none; }
.sample-card h3 { max-width: 23ch; margin-inline: auto; font-size: clamp(1.22rem, 2vw, 1.68rem); }
.sample-card p { margin-bottom: .35rem; }
.sample-flaps { position: absolute; inset: auto 0 0; height: 6rem; border-bottom: 1px solid #ad874b; border-radius: 0 0 .85rem .85rem; filter: drop-shadow(0 3px 6px #49351f55); pointer-events: none; }
.sample-flaps::before, .sample-flaps::after { content: ''; position: absolute; inset: 0; }
.sample-flaps::before { background: linear-gradient(158deg, #73774e, #333c23); clip-path: polygon(0 0, 50% 66%, 100% 0, 100% 100%, 0 100%); }
.sample-flaps::after { background: linear-gradient(#696744, #3b3c24); clip-path: polygon(0 100%, 50% 40%, 100% 100%); }
.sample-seal { position: absolute; left: 50%; bottom: .65rem; transform: translateX(-50%); width: 2.55rem; height: 2.55rem; display: grid; place-items: center; border: 1px solid #ddaf70; border-radius: 50%; background: #a66d3b; box-shadow: 0 1px 5px #33201299, inset 0 0 0 3px #d5a46b55; }
.sample-seal img { width: 1.25rem; height: 1.25rem; }
.sample-gift .sample-actions { margin-top: .5rem; }
.sample-gift .status { text-align: center; }

.results:not(:has(.response:not([hidden]))) { display: none; }
.results-grid { display: grid; grid-template-columns: minmax(0, 1.857fr) minmax(250px, 1fr); gap: 26px; align-items: start; }
.response, .follow-up { --reply-padding: clamp(22px, 3vw, 34px); min-width: 0; }
.response .reply-sheet, .follow-up .reply-sheet { margin: 0; padding: 32px var(--reply-padding); background: #fffaf0; border: 1px solid #dfceb0; border-radius: 5px; box-shadow: 0 9px 26px #49311c0d; }
.response .reply-sheet .handwritten, .follow-up .reply-sheet .handwritten { margin: 26px 0 0; white-space: pre-wrap; font: 18px/1.75 var(--serif); color: #38291f; }
.reply-heading { display: grid; grid-template-columns: 66px minmax(0, 1fr); align-items: center; gap: 17px; padding-bottom: 24px; border-bottom: 1px solid #e8dbc5; }
.reply-heading h3 { margin: 0 0 9px; font: 400 25px/1.2 var(--serif); color: #4b3025; }
.reply-heading-copy { min-width: 0; }
.reply-addresses { display: flex; flex-wrap: wrap; gap: 0 8px; }
.reply-addresses .address { display: inline; border: 0; padding: 0; margin: 0; color: #83725d; font: 12px/1.5 var(--sans); }
.reply-addresses .address + .address::before { content: '·'; margin-right: 8px; }
.reply-addresses .address strong { font: inherit; color: inherit; }
.response-avatar { width: 66px; height: 66px; border-radius: 50%; object-fit: cover; }
.reply-actions { margin-top: 19px; }
.reply-actions .actions { gap: 15px; margin: 0; }
.reply-actions #follow-up-hint { margin: 0; color: #86745f; font: 12px/1.5 var(--sans); }
.reply-actions .mock-note { margin: 15px 0 0; color: #8a7b68; font: 11px/1.5 var(--sans); }
.results-grid > .gift { min-width: 0; }
.handwritten { white-space: pre-wrap; font-size: 1.05rem; margin: 1rem 0; }
.follow-up { padding: clamp(.9rem, 2.15vw, 1.75rem); margin-top: 1.05rem; }
.follow-up form .button, .follow-up > a, .follow-up > #return-letter { margin-top: .65rem; }
.follow-up > a { display: inline-block; }
.messages { display: grid; gap: .65rem; margin-block: .5rem 1rem; }
.message { min-width: 0; padding: 24px var(--reply-padding, 24px); border: 1px solid #dfceb0; border-radius: 5px; background: #f8ecd6; }
.message-moroz { background: #fffaf0; }
.message .reply-heading { padding-bottom: 16px; }
.message .reply-heading strong { font: 400 25px/1.2 var(--serif); color: #4b3025; }
.message-guest > strong { color: #70533b; }
.message-guest .handwritten { margin-top: 12px; font: 18px/1.75 var(--serif); }
.message p { margin: .2rem 0 0; white-space: pre-wrap; }
.coupon-code code { display: inline-block; border: 1px solid #c29a56; border-radius: .32rem; padding: .2rem .65rem; background: linear-gradient(#555a33, #30371d); color: #ffe4ad; box-shadow: 0 2px 4px #794a2d69; font: bold clamp(1.1rem, 2.45vw, 1.75rem)/1.35 var(--serif); letter-spacing: .06em; }
.gift { position: relative; text-align: center; padding: 48px clamp(20px, 2.3vw, 32px) 28px; border: 0; border-radius: 7px; background: #293f32; color: #f8ebd4; box-shadow: 0 8px 24px #24342716; }
.gift h3 { margin: 18px 0 10px; color: #f8ebd4; font: 400 22px/1.25 var(--serif); }
.gift .envelope { width: min(140px, 65%); min-width: 82px; margin: 0 auto; }
.gift .actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; margin: 18px 0 0; }
.gift .button { width: 100%; }
.gift #open-gift, .gift #copy-coupon { border-color: #ead5ad; background: #ead5ad; color: #283c2e; }
.gift > #open-gift { margin-top: 12px; }
.gift-copy { position: relative; z-index: 1; }
.gift-copy > p, #envelope-invitation p { color: #d3dbc9; font: 13px/1.6 var(--sans); margin: 0 0 16px; }
.gift-copy .gift-terms, .gift-copy .support { color: #aebca5; font: 11px/1.6 var(--sans); margin: 17px 0 0; }
.gift-copy .gift-terms strong { font-weight: 500; }
.gift-copy > a { display: inline-block; margin-top: 10px; color: #b8c8af; font: 11px/1.6 var(--sans); }
.gift .coupon-code { border-block: 1px dashed #bba5727a; margin: 17px 0 18px; padding: 15px 0; }
.gift .coupon-code code { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: #f0d49d; font: 400 23px/1.4 var(--serif); letter-spacing: .035em; }
.gift .status { color: #d3dbc9; font: 12px/1.5 var(--sans); }

.envelope { position: relative; isolation: isolate; width: min(7.5rem, 34%); min-width: 5.4rem; aspect-ratio: 1.68; margin: .6rem auto .7rem; border: 1px solid #8a443c; border-radius: .28rem; background: linear-gradient(147deg, #934740, #592924); box-shadow: 0 .25rem .45rem #5b2d324d; }
.envelope::after { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, transparent 49.4%, #ce9a5c80 49.6% 50.5%, transparent 50.8%), linear-gradient(-160deg, transparent 49.4%, #ce9a5c80 49.6% 50.5%, transparent 50.8%); }
.envelope > span { position: absolute; inset: 0 0 36%; clip-path: polygon(0 0, 100% 0, 50% 100%); background: linear-gradient(90deg, #833a34, #ad6750, #833a34); transform-origin: top; }
.gift:is(.opening, .opened) .envelope > span { transform: scaleY(-.65); }
.gift.opening .envelope > span { animation: fold .52s ease-out; }
.envelope i { position: absolute; z-index: 1; left: 50%; top: 48%; transform: translate(-50%, -24%); display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border: 1px solid #ddaf70; border-radius: 50%; color: #ffeacc; background: #a66d3b; }
.envelope i .brand-leaves { width: 1.05rem; height: 1.3em; filter: url('#brand-seal-tone'); }
@keyframes fold { from { transform: scaleY(1); } }

.surprise-section { padding-block: 1.25rem 1.5rem; }
.surprise-section .support { margin-bottom: 1rem; }
.extra { display: grid; grid-template-columns: minmax(4.1rem, .72fr) minmax(0, 1.25fr); gap: .85rem; align-items: center; padding: clamp(.6rem, 1.6vw, 1.15rem); }
.extra img { margin-inline: auto; width: 100%; mix-blend-mode: multiply; mask-image: radial-gradient(ellipse closest-side, #000 89%, transparent 118%); }
.extra h3 { margin-bottom: .28rem; }
.extra p { margin-bottom: .65rem; }
.project-note { position: relative; color: #fff5df; border-block: 1px solid #a87746; background: #2e3446; }
.project-note::before, .project-note::after { content: ''; position: absolute; inset-block: 0; width: 39%; pointer-events: none; background-repeat: no-repeat; background-size: cover; }
.project-note::before { left: 0; background-image: url('../assets/winter-left.webp'); background-position: left center; mask-image: linear-gradient(90deg, #000 48%, transparent); }
.project-note::after { right: 0; background-image: url('../assets/winter-right.webp'); background-position: right center; mask-image: linear-gradient(-90deg, #000 48%, transparent); }
.project-inner { position: relative; z-index: 1; display: grid; justify-items: center; gap: .4rem; text-align: center; padding: .85rem 0; }
.project-note p { margin: 0; font-size: clamp(1rem, 1.75vw, 1.38rem); text-shadow: 0 1px 2px #201910, 0 0 6px #171a21; }
.site-footer { background: linear-gradient(#382619, #2b1b13); color: #f5e8d5; padding-block: .82rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: .4rem 1.08rem; align-items: center; }
.footer-brand { text-decoration: none; margin-right: auto; }
.text-button { background: transparent; color: inherit; border: 0; padding: .3rem .05rem; text-decoration: underline; text-underline-offset: .24em; font-size: .9rem; }

dialog { position: fixed; max-height: calc(100% - 2rem); width: min(41rem, 100% - 1.5rem); max-width: none; overflow: auto; border: 1px solid var(--line); border-radius: .85rem; padding: clamp(1rem, 4vw, 2rem); background: var(--paper); color: var(--ink); }
dialog h2 { font-size: clamp(1.55rem, 5vw, 2.15rem); padding-right: 2.35rem; }
dialog::backdrop { background: #201708b5; }
.close { float: right; border: 1px solid var(--line); border-radius: 50%; width: 2.35rem; height: 2.35rem; background: var(--paper); color: var(--ink); font-size: 1.5rem; line-height: 1; }
.check { display: flex; align-items: start; gap: .6rem; margin-block: .65rem; font-weight: 450; }
.check input { flex: 0 0 auto; width: 1.13rem; height: 1.13rem; accent-color: var(--green); margin: .24rem 0 0; }
.doc-note { color: var(--green); margin-block: .6rem; }
.doc-note summary { cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: .25rem; margin: 1rem 0; }
legend { font-weight: 650; }
.preview { border-block: 1px solid #e2cfb0; padding-block: .8rem .1rem; }
.preview h3 { font-size: 1.2rem; }
.story-result .actions { margin-top: .65rem; }
.story-page { width: min(48rem, 100%); min-height: 100vh; padding: 2rem clamp(.9rem, 5vw, 2.2rem); }
.story-page .letter { margin-top: .8rem; }
.story-page h1 { font-size: clamp(1.9rem, 5vw, 3.2rem); }

@media (max-width: 1023px) {
  .header-inner { width: 84%; }
  .letter-prop { min-height: 8.5rem; }
}

@media (max-width: 767px) {
  .wrap { width: calc(100% - 1.5rem); }
  .site-header { position: relative; background: #2a1b14; border-bottom: 1px solid #9d6c3c94; }
  .header-inner { min-height: 0; align-items: start; flex-direction: column; padding-block: .59rem .35rem; gap: .1rem; }
  .brand-caption { padding-left: .55rem; }
  .site-header nav { gap: .35rem .86rem; }
  .site-header nav a { font-size: .84rem; padding-block: .52rem; }
  .hero { display: flex; flex-direction: column; }
  .hero-inner { position: relative; inset: auto; order: -1; width: min(calc(100% - 1.5rem), 34rem); }
  .hero-copy { width: auto; max-width: none; text-align: center; padding: .8rem .2rem .8rem; }
  .hero-copy h1 { font-size: clamp(1.98rem, 7.45vw, 3rem); line-height: 1.04; margin-bottom: .48rem; }
  .hero-copy h1 > span { display: inline; white-space: normal; }
  .hero-copy h1 > span:last-child { white-space: nowrap; }
  .hero-copy p { font-size: .94rem; max-width: 34ch; margin: 0 auto .75rem; }
  .hero-copy .button { min-height: 2.58rem; width: min(100%, 17rem); font-size: .96rem; }
  .journey ul { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-block: .42rem; gap: .3rem .25rem; }
  .journey li { min-height: 1.7rem; justify-content: start; gap: .34rem; font-size: .66rem; padding: .24rem .2rem; }
  .journey li:nth-child(4) { border-inline-start: 0; }
  .journey .icon { width: 1.12rem; height: 1.12rem; }
  .two-col, .results-grid { grid-template-columns: minmax(0, 1fr); gap: .65rem; }
  .correspondence-grid { grid-template-columns: minmax(0, 1fr); }
  .letter-prop, .letter-aside { display: none; }
  .section { padding-block: 1rem; }
  .how ol { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: .8rem; }
  .how li:nth-child(2)::after { display: none; }
  .scenario-grid { grid-template-columns: minmax(0, 1fr); }
  .sample-letters { gap: .55rem; }
  .sample-visitor { width: 100%; padding-bottom: .85rem; }
  .sample-response { margin-top: 0; }
  .gift { margin-top: 0; }
  .response .reply-sheet, .follow-up .reply-sheet { padding-block: 24px; }
  .response .reply-sheet .handwritten, .follow-up .reply-sheet .handwritten { font-size: 17px; }
  .reply-heading { grid-template-columns: 58px minmax(0, 1fr); gap: 14px; }
  .reply-heading h3 { font-size: 22px; }
  .response-avatar { width: 58px; height: 58px; }
  .footer-brand { flex-basis: 100%; }
}

@media (max-width: 420px) {
  .sample-actions { grid-template-columns: minmax(0, 1fr); }
  .actions .button { width: 100%; }
  .brand-caption { font-size: .77rem; }
  #send-letter { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
}

/* AI-1B: required local consent slot; existing palette and typography retained. */
.letter-count-row { justify-content: flex-end; }
.letter-consent { margin: .6rem 0 1rem; font-size: .83rem; line-height: 1.45; }
.letter-consent label { display: flex; align-items: flex-start; gap: .55rem; cursor: pointer; }
.letter-consent input { width: 1.1rem; height: 1.1rem; flex: 0 0 1.1rem; margin: .15rem 0 0; accent-color: #315745; }
.letter-consent a { display: inline-block; margin-top: .35rem; }
.letter-consent a[hidden], .consent-error[hidden] { display: none; }
.consent-error { color: #922f2f; margin: .4rem 0 0; }

/* Waiting inside the existing reply paper; no layout animation. */
.response-wait { display: inline-flex; align-items: center; gap: .55em; color: var(--ink); }
.response-wait-dots { display: inline-flex; gap: .25em; }
.response-wait-dots i { width: .28em; height: .28em; border-radius: 50%; background: #af8046; animation: residence-wait 1.2s ease-in-out infinite; }
.response-wait-dots i:nth-child(2) { animation-delay: .16s; }
.response-wait-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes residence-wait { 0%, 70%, 100% { opacity: .35; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-.15em); } }
@media (prefers-reduced-motion: reduce) { .response-wait-dots i { animation: none; opacity: .65; } }

/* Retained continuation-form spacing from the functional UX fix. */
#chat-form > label { margin-top: 0; }
#chat-form .field-note { margin: 6px 0 0; }
#chat-form #send-chat { margin-top: 10px; }

/* Open envelope: approved concise benefit copy. */
.gift-copy #coupon-label { color: #f8ebd4; font-size: 14px; font-weight: 700; line-height: 1.4; margin-bottom: 0; }
.gift-copy .coupon-code { margin: 8px 0 10px; padding: 8px 0; }
.gift-copy .coupon-code code { font-size: clamp(28px, 2.5vw, 34px); line-height: 1.2; font-weight: 700; overflow-wrap: anywhere; }
.gift-benefits, .gift-benefits #assigned-terms { display: grid; gap: 10px; }
.gift-benefits { margin-top: 14px; }
.gift-copy .gift-benefit { margin: 0; }
.gift-benefit strong { display: block; color: #f0d49d; font: 700 16px/1.3 var(--sans); }
.gift-benefit span { display: block; margin-top: 2px; color: #e3e9db; font: 400 14px/1.4 var(--sans); }

.gift-copy > p:first-child { margin-bottom: 12px; }
.gift-copy .status:empty { display: none; }

.gift-copy { container-type: inline-size; }
.gift-copy .gift-greeting { color: #f8ebd4; font-size: min(18px, 5cqi); line-height: 1.4; white-space: nowrap; }

/* Published wall previews on the homepage only. */
.homepage-wall-card { min-width: 0; padding: clamp(20px, 3vw, 28px); overflow-wrap: anywhere; }
.homepage-wall-card h3 { margin-top: 0; }
.homepage-wall-snippet { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; white-space: pre-wrap; }
.homepage-wall-reply { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; align-items: start; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.homepage-wall-reply p { margin: 0; }

.homepage-wall > .actions { margin-top: 18px; }

/* Mobile brand/menu separation and the approved six informational benefits. */
.journey ul { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (min-width: 768px) and (max-width: 1023px) {
  .journey ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .journey li:nth-child(4) { border-inline-start: 0; }
}
@media (max-width: 767px) {
  #top .header-inner { gap: 8px; }
  #top nav { width: 100%; border-top: 1px solid #dca97188; padding-top: 6px; justify-content: space-between; gap: .35rem .6rem; }
  #top nav a { display: inline-flex; align-items: center; min-height: 44px; }
  .journey ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journey li:nth-child(odd) { border-inline-start: 0; }
  .journey li:nth-child(even) { border-inline-start: 1px solid #ac7a4d99; }
}
