:root {
  --paper: #f9f0df;
  --ink: #48362e;
  --muted: #796353;
  --wine: #7c202b;
  --line: #d5c5b0;
  --season-gold: #a47d3c;
  --page-width: 440px;
  --backdrop: #681015;
}
html { background: var(--backdrop); scroll-padding-top: 18px; }
body {
  max-width: var(--page-width);
  margin-inline: auto;
  container: gift-page / inline-size;
  background: var(--backdrop);
  color: var(--ink);
}
body::before { display: none; }
.side-title {
  display: none;
  position: fixed;
  inset-inline-start: 0;
  top: 44%;
  width: calc((100% - var(--page-width)) / 2);
  margin: 0;
  padding-inline: 16px;
  text-align: center;
  color: #e8c9a5;
  font-family: var(--display);
  font-size: clamp(17px, 1.65vw, 21px);
  letter-spacing: .13em;
  pointer-events: none;
}
.side-title::before {
  content: "";
  display: block;
  width: 24px;
  margin: 0 auto 16px;
  border-top: 1px solid currentColor;
  opacity: .52;
}
.side-links {
  display: none;
  position: fixed;
  inset-inline-end: clamp(24px, 4vw, 64px);
  bottom: clamp(22px, 5vh, 52px);
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  color: #e8c9a5;
  font-family: var(--display);
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: .06em;
}
.side-links a { padding: 2px 0; color: inherit; text-underline-offset: .3em; }
.side-links a:is(:hover, :focus-visible) { color: #fff1e5; text-decoration: underline; }
.side-links a:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
@media (min-width: 940px) {
  html { scrollbar-gutter: stable; }
  .side-title { display: block; }
  .side-links { display: flex; }
}
.letter-whiteout, .letter-snow, .reading-progress, .dialog-shade {
  width: min(100%, var(--page-width));
  margin-inline: auto;
}
dialog, .toast { max-width: calc(min(100%, var(--page-width)) - 28px); }
.letter-page {
  position: relative;
  width: min(1320px, calc(100% - 112px));
  margin: 64px auto;
  padding: 24px 0 0;
  background: var(--paper);
  border: 1px solid #e7dccb;
  border-radius: 14px;
  box-shadow: 0 16px 60px #5e432b0b, 0 2px 5px #5e432b05;
}
.letter-page::before {
  content: ''; position: absolute; inset: 15px;
  border: 1px solid #d7c4a96b; pointer-events: none;
  border-radius: 10px;
}
.preview-note { color: var(--muted); padding-right: 35px; }
.hero {
  display: grid; grid-template-columns: 44% 48%; gap: 38px 8%;
  width: 87%; min-height: 0; margin: 0 auto;
  padding: 58px 0 65px;
}
.hero::before { display: none; }
.hero-copy { position: static; width: auto; height: auto; padding: 0; grid-column: 2; grid-row: 1; }
.hero .season-label { color: var(--wine); font-size: 12px; letter-spacing: .04em; }
.hero h1 { font-size: clamp(30px, 3.2cqw, 43px); letter-spacing: .035em; margin-top: 30px; line-height: 1.9; }
.hero h1:focus { outline: none; }
.hero h1 > span:last-child { margin-top: 0; }
.hero-description { font-size: 16px; line-height: 2.25; letter-spacing: .02em; margin-top: 28px; }
.hero-art { position: static; width: 100%; max-width: 480px; margin: 0; align-self: center; grid-column: 1; grid-row: 1; }
.hero-art > img { box-shadow: 0 8px 28px #5e432b12; }
.hero-art figcaption, .hero-folio, .quiet-art figcaption,
.stars-scene figcaption, .letter-prologue > span, .letter-signature > span,
.future-copy > .eyebrow, .chapter-second .chapter-kicker,
.section-intro > .eyebrow, .about-card-copy > .eyebrow { color: var(--muted); }
.hero-art figcaption { font-size: 12px; letter-spacing: .035em; }
.season-garland { top: 12px; right: 0; width: 140px; opacity: .72; }
.hero .read-link { position: static; grid-column: 2; grid-row: 2; justify-self: end; align-self: end; margin: 0; gap: 65px; border-color: #b59a76; }
.hero-folio { position: static; grid-column: 1 / -1; grid-row: 2; align-self: center; margin: 0; font-size: 12px; text-align: center; width: 100%; }
.letter { width: 84%; padding-top: 25px; }
.letter-opening { color: var(--wine); }
.letter-prologue { padding-bottom: 100px; }
.letter-prologue p { font-size: 22px; }
.reading-rail a { color: #80624f; border-right-color: #cbb89c; }
.reading-rail a[aria-current] { color: var(--wine); border-right-color: var(--wine); }
.chapter-first { background: #f5eddf; border-top: 1px solid #ddc9ad; border-bottom: 1px solid #ddc9ad; border-radius: 10px; }
.chapter-second .quiet-wish, .future-copy .future-last { color: #83592e; }
.quiet-art::before { background: #c5a47315; }
.art-whisper { color: var(--wine); }
.closing-rule { background: #b08a50; }
.reply-section { width: 100%; background: #f3ecdf; padding-left: 8%; padding-right: 8%; border-top: 1px solid #deccb3; border-bottom: 1px solid #deccb3; }
.reply-workspace { gap: 45px; }
.reply-form input { border-color: #b6a18b; }
.reply-form input::placeholder { color: #897363; }
.reply-form textarea { background: #fffdf7; color: var(--ink); border: 1px solid #d1bfa7; }
.reply-form textarea::placeholder { color: #897363; }
.examples button, .button, .button.subtle { border-color: #b19a7d; }
.button:hover { background: #e7d9c5; }
.button.primary, .create-card { background: var(--wine) !important; color: #fff7ed !important; border-color: var(--wine) !important; }
.button.primary:hover, .create-card:hover { background: #942b37 !important; }
.privacy-note svg { stroke: var(--muted); }
.form-error { color: #962a36; }
.card-stage { background: transparent; }
.about-card { width: 84%; padding-top: 105px; }
.about-card-art { border-left-color: #c7af8b; }
.about-card-art figcaption { color: var(--muted); }
.card-journey { border-top-color: #cbb89c; }
.card-search, .purchase-preview-note, footer nav, footer small { color: var(--muted); }
.afterword { padding-bottom: 70px; }
footer { width: 84%; margin: 0 auto; padding-bottom: 36px; border-color: #d6c4aa; }
.toast { background: #fff8ee; color: var(--ink); border-color: #c6ac89; }

.envelope-gate {
  min-height: 100svh; padding: clamp(24px, 4svh, 48px) 24px;
  display: grid; grid-template-rows: 1fr auto 1fr; justify-items: center;
  position: relative;
  isolation: isolate;
  clip-path: inset(0);
  text-align: center; color: #fff1e5;
}
.envelope-gate::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(#681015d9, #681015e8 58%, #681015d9) center / cover,
    var(--backdrop) url("./assets/iyashibainu-december.webp") 8% center / cover no-repeat;
  filter: blur(5px);
  transform: scale(1.04);
}
/* Blend the full illustration into the blurred background at the foot of the panel. */
.envelope-gate::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset-inline: 0;
  bottom: clamp(28px, 6svh, 60px);
  aspect-ratio: 1920 / 1013;
  background: linear-gradient(#68101590, #68101590),
    url("./assets/iyashibainu-december.webp") center / cover no-repeat;
  mask-image: linear-gradient(transparent, black 32%, black 62%, transparent);
}
.envelope-intro { align-self: end; margin-bottom: 16px; transition: opacity .22s ease, visibility .22s; }
.envelope-guide { align-self: start; }
.is-opening .envelope-intro { opacity: 0; visibility: hidden; }
.envelope-name { color: #f4d6b0; font-size: clamp(17px, 1.8cqw, 22px); letter-spacing: .14em; margin-bottom: 12px; }
.envelope-gate h2 { font-family: var(--display); font-size: 28px; line-height: 1.5; letter-spacing: .08em; }
.envelope-trigger { display: block; border: 0; padding: 0; margin: 0; background: transparent; color: #f5dfbd; }
.envelope-trigger:disabled { cursor: default; }
.envelope-trigger:focus-visible { outline: 2px solid #b08b56; outline-offset: 8px; border-radius: 3px; }
.envelope-scene { position: relative; display: block; width: min(440px, 80cqw, 50svh); aspect-ratio: 600 / 380; }
.envelope-body { position: absolute; left: 0; bottom: 0; width: 100%; aspect-ratio: 600 / 380; perspective: 1100px; filter: drop-shadow(0 16px 18px #29030720); }
.envelope-back, .envelope-front { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.envelope-back { z-index: 1; }
.envelope-front { z-index: 3; }
.envelope-letter { position: absolute; z-index: 2; left: 8%; top: 9.5%; width: 84%; height: 83%; background: #faf4e8 url("./assets/letter-paper.webp") center / cover; border: 1px solid #ddcdb2; border-radius: 8px; box-shadow: 0 3px 10px #52382013, inset 0 0 0 1px #fffdf8; transform-origin: center bottom; }
.letter-inset { position: absolute; inset: 8%; border: 1px solid #d9c5a180; border-radius: 4px; padding: 10% 8%; }
.letter-salutation { display: block; font-family: var(--display); font-size: clamp(11px, 1.2cqw, 16px); letter-spacing: .14em; color: #92744e; margin-bottom: 12%; }
.letter-rule { display: block; width: 100%; border-bottom: 1px solid #cbb79045; margin: 11% 0; }
/* Every fold uses the same 600 x 380 drawing. The hinge never changes width. */
.envelope-flap { position: absolute; z-index: 4; top: 0; left: 0; width: 100%; height: 60.526316%; transform-origin: 50% 0; transform-style: preserve-3d; }
.envelope-flap > svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: visible; backface-visibility: visible; }
.envelope-seal { position: absolute; left: 50%; top: 72%; width: 44px; height: 44px; transform: translateX(-50%) translateZ(1px); display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 25%, #923541, #77232e 80%); border: 1px solid #a94f58; box-shadow: 0 2px 4px #62232b2b, inset 0 0 0 3px #7f2834; backface-visibility: hidden; }
.envelope-seal img { display: block; position: static; width: 25px; height: auto; filter: url('#illustration-gold'); opacity: .75; }
.envelope-action { display: inline-block; margin-top: 28px; padding: 0 4px 11px; border-bottom: 1px solid #c8ad86; font-size: 15px; letter-spacing: .12em; }
.envelope-action > span { padding-left: 48px; }
.envelope-gate #envelope-note { margin-top: 28px; font-size: 13px; line-height: 2.15; color: #ecd4c3; }
.is-opening .envelope-flap { animation: flap-opens .94s cubic-bezier(.4,0,.2,1) .08s both; }
.is-opening .envelope-letter { animation: letter-withdraws 1.45s cubic-bezier(.25,.05,.2,1) .86s both; }
.is-opening .envelope-action { opacity: 0; transition: opacity .25s; }
.letter-whiteout { position: fixed; inset: 0; z-index: 300; background: #fffdf8; opacity: 0; pointer-events: none; }
.is-opening-letter .letter-whiteout { animation: opening-whiteout 3.35s linear both; pointer-events: auto; }
.letter-arriving::after { content: ''; position: fixed; z-index: 301; top: 64px; left: 50%; width: min(1320px, calc(100% - 112px)); height: calc(100dvh - 128px); max-height: 900px; background: #f9f0df; border: 1px solid #e0ccb0; border-radius: 14px; outline: 1px solid #d7c4a973; outline-offset: -16px; box-shadow: 0 15px 45px #482b211c; transform-origin: 50% 15%; pointer-events: none; animation: paper-settles 1.25s cubic-bezier(.2,.65,.3,1) both; }
.letter-page.is-unfolding { animation: stationery-arrives 1.1s ease both; }
@keyframes flap-opens { 0% { transform: rotateX(0); z-index: 4; } 45% { z-index: 4; } 55% { z-index: 1; } 100% { transform: rotateX(-180deg); z-index: 1; } }
/* Keep the lower portion in the pocket until the whiteout begins. */
@keyframes letter-withdraws { from { transform: translateY(0) rotate(0); } to { transform: translateY(-46%) rotate(-.6deg); } }
@keyframes opening-whiteout { 0%, 56% { opacity: 0; } 75%, 83% { opacity: 1; } 100% { opacity: 0; } }
@keyframes paper-settles { 0% { opacity: 0; transform: translateX(-50%) perspective(1200px) translateY(65px) rotateX(-18deg) rotateZ(-.65deg) scale(.97); } 18% { opacity: 1; } 58% { opacity: 1; transform: translateX(-50%) perspective(1200px) translateY(-4px) rotateX(2.5deg) rotateZ(.12deg) scale(1.003); } 78% { opacity: .9; transform: translateX(-50%) perspective(1200px) translateY(0) rotateX(-.4deg) rotateZ(0) scale(1); } 100% { opacity: 0; transform: translateX(-50%) perspective(1200px) translateY(0) rotateX(0) scale(1); } }
@keyframes stationery-arrives { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@container gift-page (max-width: 1190px) and (min-width: 701px) {
  .letter-page { width: calc(100% - 64px); margin: 36px auto; }
  .hero { width: 86%; grid-template-columns: 43% 50%; gap: 30px 7%; padding-top: 52px; }
  .hero h1 { font-size: clamp(25px, 3.15cqw, 36px); }
  .hero .season-label { font-size: 11px; }
  .hero-description { font-size: 16px; }
  .letter { width: 86%; }
  .chapter-first { padding-left: 5%; padding-right: 5%; }
  .book-body p:not(.book-emphasis) { font-size: 15px; }
  .reply-workspace { gap: 30px; }
}
@container gift-page (max-width: 700px) {
  .letter-page { width: calc(100% - 24px); margin: 22px auto; padding-top: 18px; border-radius: 10px; box-shadow: 0 5px 22px #5e432b0c; }
  .letter-page::before { inset: 7px; border-color: #d7c4a973; border-radius: 7px; }
  .preview-note { font-size: 10px; padding: 5px 18px 0; line-height: 1.8; }
  .preview-note span { margin-left: 8px; }
  .hero { display: flex; flex-direction: column; gap: 0; width: auto; padding: 44px 23px 45px; margin: 0; min-height: 0; }
  .hero-copy { width: 100%; padding: 0; order: 1; }
  .hero .season-label { font-size: 11px; line-height: 2; }
  .hero h1 { font-size: clamp(25px, 7.1cqw, 34px); line-height: 1.95; letter-spacing: .015em; margin-top: 27px; }
  .hero-description { font-size: 16px; line-height: 2.2; margin-top: 28px; letter-spacing: .01em; }
  .hero-art { position: static; width: 100%; max-width: 360px; margin: 35px auto 30px; order: 2; }
  .hero-art figcaption { font-size: 12px; }
  .season-garland { top: 6px; right: 23px; width: 105px; }
  .hero .read-link { align-self: flex-start; margin: 0; font-size: 14px; order: 3; }
  .hero-folio { font-size: 12px; margin-top: 24px; align-self: center; order: 4; text-align: center; }
  .letter { width: auto; padding: 10px 17px 0; }
  .letter-opening { font-size: 11px; gap: 10px; }
  .letter-opening .small-rule { width: 18px; }
  .letter-prologue { padding: 50px 5px 75px; }
  .letter-prologue p { font-size: 18px; line-height: 2.35; letter-spacing: .01em; }
  .chapter-first { padding: 120px 20px 65px; }
  .chapter-first h2 { font-size: 23px; }
  .book-body p:not(.book-emphasis) { font-size: 15px; }
  .chapter-first .chapter-kicker { left: 100px; font-size: 8px; }
  .chapter-second { margin-left: 5px; margin-right: 5px; }
  .chapter-second h2 { font-size: 29px; }
  .chapter-second p:not(.chapter-kicker):not(.quiet-wish) { font-size: 16px; letter-spacing: 0; }
  .chapter-second .quiet-wish { font-size: 18px; }
  .art-whisper { font-size: 26px; }
  .closing-letter { padding-left: 5px; padding-right: 5px; }
  .closing-letter h2 { font-size: 29px; }
  .closing-letter > .letter-signature { font-size: 22px !important; letter-spacing: .01em; }
  .reply-section { padding: 60px 24px; }
  .section-intro h2 { font-size: clamp(21px, 5.7cqw, 27px); }
  .reply-workspace { gap: 35px; }
  .field-row { grid-template-columns: 1fr; gap: 18px; }
  .card-stage, .preview-caption { padding: 0; }
  .about-card { width: auto; margin: 0 24px; padding-top: 75px; }
  .about-card h2 { font-size: 25px; }
  .about-card-art { border-left: 0; }
  .afterword { padding: 55px 20px; }
  .afterword > p { font-size: 17px; letter-spacing: .03em; }
  footer { width: auto; margin: 0 24px; padding-bottom: 30px; }
  .envelope-gate { padding: 36px 20px; }
  .envelope-gate h2 { font-size: 24px; }
  .envelope-scene { width: min(370px, 83cqw, 50svh); }
  .envelope-action { margin-top: 23px; font-size: 14px; }
  .envelope-seal { width: 36px; height: 36px; }
  .envelope-seal img { width: 21px; }
}
.letter-arriving::after { top: 22px; width: calc(min(100%, var(--page-width)) - 24px); height: calc(100dvh - 44px); border-radius: 10px; outline-offset: -8px; }
@container gift-page (max-width: 360px) {
  .hero { padding-left: 19px; padding-right: 19px; }
  .hero h1 { font-size: 25px; letter-spacing: 0; }
  .chapter-first h2 { font-size: 21px; }
  .book-body .book-emphasis { font-size: 17px; }
  .chapter-second h2, .closing-letter h2 { font-size: 27px; }
  .reply-section { padding-left: 20px; padding-right: 20px; }
  .about-card { margin-left: 21px; margin-right: 21px; }
  .about-card h2 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  .envelope-intro, .envelope-scene *, .envelope-action, .letter-page.is-unfolding { transition: none !important; animation: none !important; }
  .is-opening-letter .letter-whiteout, .letter-arriving::after { display: none; animation: none; }
}

/* The reply designs are compositions, not color swatches. */
.design-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.design-option { position: relative; display: flex; flex-direction: column; align-items: stretch; text-align: left; padding: 12px; border: 1px solid #d4c6ae; border-radius: 10px; background: #f8f2e6; min-width: 0; transition: border-color .2s, background .2s; }
.design-option canvas { display: block; width: 100%; height: auto; border-radius: 3px; box-shadow: 0 3px 8px #4e372412; }
.design-option[aria-pressed="true"] { border: 2px solid #79292c; padding: 11px; background: #f0e6d4; }
.design-option:focus-visible { outline: 2px solid #79292c; outline-offset: 4px; }
.design-name { font-size: 14px; margin: 12px 0 5px; font-weight: 500; color: #532329; }
.design-description { font-size: 11px; line-height: 1.7; color: #776856; }
.design-check { font-size: 10px; letter-spacing: .08em; color: #79292c; margin-top: 8px; visibility: hidden; }
.design-option[aria-pressed="true"] .design-check { visibility: visible; }
.card-preview-column { position: sticky; top: 32px; }
.card-stage { background: #e8decb; border-radius: 12px; }
.card-stage canvas { border-radius: 7px; }
.reply-form .card-designs legend { font-size: 15px; }
.button:disabled { opacity: .6; cursor: wait; }
.envelope-seal { background: #842b30; box-shadow: 0 1px 3px #62232b2b; border-color: #963d40; }
@container gift-page (max-width:700px) {
  .design-options { gap: 12px; }
  .design-option { padding: 9px; }
  .design-option[aria-pressed="true"] { padding: 8px; }
  .design-name { font-size: 13px; }
  .design-description { font-size: 11px; }
  .card-preview-column { position: static; max-width: 440px; }
}
@media(prefers-reduced-motion:reduce) { .design-option { transition: none; } }

.envelope-instruction { margin-top: 26px; font-size: 14px; letter-spacing: .07em; color: #f5dfbd; }
@media (max-height: 450px) {
  .envelope-gate { padding-block: 14px; }
  .envelope-intro { margin-bottom: 12px; }
  .envelope-name { margin-bottom: 8px; }
  .envelope-gate h2 { font-size: 20px; }
  .envelope-instruction, .envelope-gate #envelope-note { margin-top: 12px; }
}
.message-meta { justify-content: flex-end; }
.card-journey > li > span { font-family: "Baskerville", "Times New Roman", serif; font-size: 42px; font-style: italic; font-weight: 400; line-height: 1; letter-spacing: -.04em; color: #a47d3c; }
.candle-scene { width: 124px; margin: 0 auto 45px; }
.candle-scene .season-candles { width: 100%; height: auto; margin: 0; overflow: visible; filter: none; }
.candle-light { opacity: 0; transition: opacity 1.3s ease; }
.candle-scene.is-lit .candle-light { opacity: 1; }
.candle-glow { opacity: .4; }
.candle-flame { transform-box: fill-box; transform-origin: 50% 100%; }
.candle-scene.is-lit .candle-flame { animation: candle-breath 3.4s ease-in-out infinite; }
.candle-scene.is-lit .candle-flame-center { animation-delay: -.9s; }
.candle-scene.is-lit .candle-flame-right { animation-delay: -1.7s; }
@keyframes candle-breath { 0%, 100% { transform: rotate(-1deg) scaleY(.97); } 50% { transform: rotate(1deg) scaleY(1.025); } }
@container gift-page (max-width:700px) {
  .candle-scene { width: 104px; margin-bottom: 34px; }
  .card-journey > li > span { font-size: 36px; padding-top: 2px; }
}
@media(prefers-reduced-motion:reduce) {
  .candle-light { transition: none; }
  .candle-scene.is-lit .candle-flame { animation: none; }
}

/* Keep the centered letter layout and a consistent type scale. */
:root { --ink: #302c29; --letter-ink: #302c29; --heading-ink: #7c202b; --muted: #63594f; }
.letter-page :is(h1, h2, h3), .about-card-art .gift-words { color: var(--heading-ink); }
.letter { text-align: center; color: var(--letter-ink); }
.letter-prologue p { color: var(--letter-ink); font-size: 23px; }
.chapter-first { background: transparent; border: 0; border-radius: 0; padding: 112px 20px 65px; margin-bottom: 120px; color: var(--letter-ink); }
.chapter-first::before { display: none; }
.chapter-first .chapter-copy { display: block; text-align: center; }
.chapter-first .chapter-kicker { position: static; margin: 0 auto 30px; font-size: 14px; color: var(--muted); }
.chapter-first h2 { display: block; font-size: 34px; line-height: 1.9; margin: 0 auto 45px; letter-spacing: .06em; }
.chapter-first h2 > span { display: block; writing-mode: horizontal-tb; white-space: normal; }
.chapter-first h2 > span:last-child { padding: 0; }
.book-body { max-width: 850px; margin: 0 auto; }
.book-body p:not(.book-emphasis), .book-body .book-emphasis { color: var(--letter-ink); font-size: 20px; line-height: 2.25; letter-spacing: .02em; }
.book-body p { margin-top: 36px; }
.memory-line { display: block; transition: opacity 1s ease, transform 1.1s ease, filter 1.1s ease; }
.book-body p.reveal-pending { opacity: 1; transform: none; transition: none; }
.book-body p.reveal-pending .memory-line { opacity: 0; transform: translateY(7px); filter: blur(1.5px); }
.book-body p.is-visible .memory-line { opacity: 1; transform: none; filter: none; }
.memory-line:nth-child(2) { transition-delay: .24s; }
.memory-line:nth-child(3) { transition-delay: .48s; }
.memory-line:nth-child(4) { transition-delay: .72s; }
.chapter-second .chapter-copy, .future-copy { text-align: center; }
.chapter-second p:not(.chapter-kicker):not(.quiet-wish), .future-copy > p:not(.eyebrow):not(.future-last) { font-size: 20px; line-height: 2.25; color: var(--letter-ink); }
.chapter-second .quiet-wish, .future-copy .future-last { color: var(--letter-ink); font-size: 21px; }
.closing-letter h2 { text-align: center; }
.page-folio { font-family: "Baskerville", "Times New Roman", serif; font-style: italic; font-size: 24px; }
.art-whisper { left: 50%; right: auto; transform: translateX(-50%); width: max-content; max-width: none; white-space: nowrap; writing-mode: horizontal-tb; font-size: 30px; line-height: 1.7; letter-spacing: .05em; }
.hero-description, .about-card-copy > p:not(.eyebrow) { font-size: 18px; line-height: 2.25; }
.hero .season-label, .hero-folio, .letter-opening, .letter-prologue > span, .letter-signature > span, .stars-scene figcaption, .about-card-art figcaption { font-size: 14px; line-height: 2; }
.chapter-second .chapter-kicker, .future-copy > .eyebrow, .about-card-copy > .eyebrow { font-size: 14px; color: var(--muted); }
.card-journey p { font-size: 16px; }
.section-intro > p:last-child { font-size: 17px; }
/* One semantic form. Its visual order follows the writing flow on a phone. */
.reply-workspace { display: block; }
.reply-form { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); column-gap: 45px; row-gap: 28px; align-items: start; grid-template-areas: "names preview" "message preview" "designs preview" "stamps preview" "actions preview"; }
.reply-form > .field-row { grid-area: names; }
.reply-form > .card-designs { grid-area: designs; margin: 0; min-width: 0; }
.reply-form > .reply-stamps { grid-area: stamps; margin: 0; min-width: 0; }
.stamp-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stamp-option {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  padding: 8px 3px;
  border: 1px solid #d4c6ae;
  border-radius: 8px;
  background: #fffaf0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
}
.stamp-option img { display: block; width: 100%; height: 52px; object-fit: contain; }
.stamp-option[aria-pressed="true"] { border-color: #79292c; box-shadow: inset 0 0 0 1px #79292c; background: #f0e6d4; }
.stamp-option:focus-visible { outline: 2px solid #79292c; outline-offset: 2px; }
.reply-message-field { grid-area: message; min-width: 0; }
.reply-actions { grid-area: actions; }
.reply-message-field .message-label { margin-top: 0; }
.reply-form label, .reply-form legend, .reply-form .card-designs legend { font-size: 16px; line-height: 1.8; }
.reply-form label > span { margin-left: 7px; font-size: 13px; color: var(--muted); }
.reply-form input, .reply-form textarea { font-size: 17px; color: var(--ink); line-height: 2; }
.reply-form input::placeholder, .reply-form textarea::placeholder { color: #796353; opacity: 1; }
.message-meta, .card-hint, .preview-caption { font-size: 14px; line-height: 1.9; color: var(--muted); }
.card-preview-column { grid-area: preview; position: sticky; top: 24px; align-self: start; min-width: 0; width: 100%; margin: 0; max-width: none; padding: 24px; background: #fff; border-radius: 18px; box-shadow: none; }
.preview-caption { padding: 0; margin-bottom: 17px; flex-wrap: wrap; gap: 5px 14px; }
.card-stage { padding: 0; background: transparent; border: 0; box-shadow: none; border-radius: 0; }
.card-stage::before, .card-stage::after, .card-preview-column::before, .card-preview-column::after { display: none; }
.card-stage canvas, .design-option canvas { box-shadow: none; }
.design-name { font-size: 15px; }
.design-description { font-size: 13px; color: #6c5445; }
.design-check { font-size: 12px; }
.card-hint { letter-spacing: .025em; margin-top: 16px; }
@container gift-page (max-width:1000px) and (min-width:701px) {
  .reply-form { column-gap: 26px; }
  .card-preview-column { padding: 18px; }
}
@container gift-page (max-width:700px) {
  .hero-description, .about-card-copy > p:not(.eyebrow) { font-size: 17px; }
  .hero .season-label, .hero-folio, .letter-opening { font-size: 13px; }
  .letter-prologue p { font-size: 19px; line-height: 2.3; }
  .chapter-first { padding: 105px 6px 60px; margin-bottom: 80px; }
  .chapter-first .chapter-kicker, .chapter-second .chapter-kicker, .future-copy > .eyebrow { font-size: 13px; }
  .chapter-first h2 { font-size: 27px; margin-bottom: 35px; }
  .book-body p:not(.book-emphasis), .book-body .book-emphasis { font-size: 18px; line-height: 2.3; letter-spacing: 0; }
  .chapter-second p:not(.chapter-kicker):not(.quiet-wish), .future-copy > p:not(.eyebrow):not(.future-last) { font-size: 18px; line-height: 2.25; }
  .chapter-second .quiet-wish, .future-copy .future-last { font-size: 19px; }
  .art-whisper { font-size: 27px; }
  .reply-section { padding: 50px 18px; }
  .reply-form { grid-template-columns: minmax(0,1fr); row-gap: 28px; grid-template-areas: "names" "designs" "stamps" "preview" "message" "actions"; }
  .card-preview-column { position: static; padding: 18px; max-width: 440px; justify-self: center; }
  .reply-form input, .reply-form textarea { font-size: 17px; }
  .design-name { font-size: 14px; }
  .design-description { font-size: 12px; }
  .card-journey p { font-size: 16px; }
}
@media(prefers-reduced-motion:reduce) { .memory-line { transition: none; } }

.chapter-number { font-family: "Baskerville", "Times New Roman", serif; font-size: 1.2em; font-style: italic; font-variant-numeric: lining-nums; }
/* One layer for the sealed envelope and the three letter chapters. */
.letter-snow { position: fixed; inset: 0; z-index: 25; overflow: hidden; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 1.4s ease, visibility 1.4s; }
:is(.letter-sealed, .has-letter-snow) .letter-snow { opacity: 1; visibility: visible; }
.letter-snow > span { position: absolute; top: -10vh; left: 5%; width: 3px; height: 3px; border-radius: 50%; background: #fffaf3; border: .5px solid #b49a7540; opacity: .6; animation: letter-snowfall 18s linear infinite; animation-play-state: paused; }
:is(.letter-sealed, .has-letter-snow) .letter-snow > span { animation-play-state: running; }
.letter-sealed .letter-snow > span { opacity: .82; }
.letter-snow > span:nth-child(2) { left: 12%; animation-delay: -8s; animation-duration: 22s; }
.letter-snow > span:nth-child(3) { left: 24%; width: 2px; height: 2px; animation-delay: -3s; animation-duration: 16s; }
.letter-snow > span:nth-child(4) { left: 32%; animation-delay: -14s; animation-duration: 21s; }
.letter-snow > span:nth-child(5) { left: 43%; width: 2px; height: 2px; animation-delay: -6s; animation-duration: 19s; }
.letter-snow > span:nth-child(6) { left: 54%; animation-delay: -12s; animation-duration: 24s; }
.letter-snow > span:nth-child(7) { left: 61%; width: 2px; height: 2px; animation-delay: -4s; animation-duration: 17s; }
.letter-snow > span:nth-child(8) { left: 71%; animation-delay: -16s; animation-duration: 23s; }
.letter-snow > span:nth-child(9) { left: 80%; width: 2px; height: 2px; animation-delay: -9s; animation-duration: 20s; }
.letter-snow > span:nth-child(10) { left: 88%; animation-delay: -5s; animation-duration: 25s; }
.letter-snow > span:nth-child(11) { left: 94%; width: 2px; height: 2px; animation-delay: -11s; animation-duration: 18s; }
.letter-snow > span:nth-child(12) { left: 98%; animation-delay: -17s; animation-duration: 22s; }
@keyframes letter-snowfall { 0% { transform: translate3d(-12px,0,0); } 50% { transform: translate3d(10px,60vh,0); } 100% { transform: translate3d(-3px,120vh,0); } }
@container gift-page (max-width:700px) { body:not(.letter-sealed) .letter-snow > span:nth-child(n+9) { display: none; } }
.side-snow {
  display: none;
  width: calc((100% - var(--page-width)) / 2);
  margin: 0;
}
.side-snow-left { right: auto; }
.side-snow-right { left: auto; }
.side-snow > span:nth-child(1) { left: 17%; animation-delay: -5s; }
.side-snow > span:nth-child(2) { left: 37%; animation-delay: -13s; }
.side-snow > span:nth-child(3) { left: 63%; animation-delay: -9s; }
.side-snow > span:nth-child(4) { left: 84%; animation-delay: -18s; }
.side-snow-right > span:nth-child(1) { animation-delay: -10s; }
.side-snow-right > span:nth-child(3) { animation-delay: -2s; }
@media (min-width: 760px) { .side-snow { display: block; } }
@media(prefers-reduced-motion:reduce) { .letter-snow { display: none; transition: none; } }

/* Text is dark; headings carry the clinic red. */
.letter-page .chapter-kicker, .letter-page .future-copy > .eyebrow { color: var(--heading-ink); }
.art-whisper { color: var(--ink); }

.letter-page .hero-description, .letter-prologue p, .book-body p,
.chapter-second .chapter-copy > p:not(.chapter-kicker), .future-copy > p:not(.eyebrow),
.about-card-copy > p:not(.eyebrow), .section-intro > p,
.card-journey p, .afterword > p { color: var(--ink); }

@font-face { font-family: "Noto Sans JP"; src: url("./assets/noto-sans-jp-entry.woff") format("woff"); font-style: normal; font-weight: 400; font-display: swap; }
.envelope-name, .envelope-instruction, #envelope-note { font-family: "Noto Sans JP", var(--sans); font-weight: 400; }
/* Every narrative block is centered on the page, not inside one side of a spread. */
.hero { display: flex; flex-direction: column; align-items: center; gap: 0; }
.hero-copy { position: static; width: 100%; max-width: 820px; padding: 0; text-align: center; order: 1; }
.hero h1 { text-align: center; }
.hero h1 > span:last-child { padding-left: 0; }
.hero-art { width: min(100%, 440px); max-width: 440px; margin: 46px auto 32px; order: 2; }
.hero-folio { order: 3; margin: 0 auto; }
.chapter-second { display: flex; flex-direction: column; align-items: center; gap: 48px; min-height: 0; margin-bottom: 120px; }
.chapter-second .chapter-copy { order: 1; width: 100%; max-width: 820px; }
.quiet-art { order: 2; width: min(70%,300px); max-width: 300px; margin: 0 auto 75px; }
.quiet-art::before { display: none; }
.closing-letter { display: block; text-align: center; }
.future-copy { max-width: 820px; margin: 0 auto; }
.stars-scene { width: min(70%,270px); max-width: 270px; margin: 50px auto; }
@container gift-page (max-width:700px) {
  .hero-art { width: 100%; max-width: 360px; margin: 35px auto 28px; }
  .hero-folio { margin-top: 10px; }
  .chapter-second { gap: 38px; margin-bottom: 85px; }
  .chapter-second .chapter-copy { order: 1; }
  .quiet-art { order: 2; }
}
