@font-face {
  font-family: 'Pretendard Variable';
  font-style: normal;
  font-weight: 45 920;
  font-display: swap;
  src: url('assets/fonts/pretendard/PretendardVariable.woff2') format('woff2');
}

:root {
  --bg: #fdfbf7;
  --paper: #fffefa;
  --ink: #4a4036;
  --muted: #78695e;
  --wine: #a85237;
  --wine-dark: #783e2d;
  --line: #e9dfd3;
  --control-line: #b7a698;
  --green: #606d49;
  --notebook-line: #dce5e8;
  --sans: 'Pretendard Variable', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  --letter-font: var(--sans);
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body { margin: 0; background: #f2ece2; color: var(--ink); font: 1rem/1.8 var(--sans); -webkit-font-smoothing: antialiased; }
body:has(dialog[open]) { overflow: hidden; }
button, input, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; background: #e2dbd0; color: #655d53; border-color: #c7bbae; }
button, a, input, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 5px; }
main:focus, #preview-title:focus { outline: none; }
[hidden] { display: none !important; }
.intro-active { overflow: hidden; }
.brand-splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: #fdfbf7; animation: intro-dismiss .22s ease 3s forwards; }
.splash-stage { width: min(88vw, 400px); }
.splash-logo { display: block; width: 100%; height: auto; overflow: visible; }
.splash-logo svg { overflow: hidden; }
/* The symbol and send arrive first. One pen then writes love before the words merge. */
.splash-glyph { opacity: 0; clip-path: inset(0 100% 0 0); animation: intro-write-glyph .3s cubic-bezier(.45,0,.2,1) forwards; }
.splash-symbol, .splash-s, .splash-e1, .splash-n, .splash-d { opacity: 1; clip-path: none; animation: intro-send-arrive .28s ease-out .08s both; }
.splash-love-l { animation-delay: .42s; }
.splash-o { animation-delay: .69s; }
.splash-v { animation-delay: .96s; }
.splash-ending { animation-delay: 1.23s; }
.splash-lockup { animation: intro-center-logo .58s cubic-bezier(.22,1,.36,1) 1.9s forwards; }
.splash-love-l { translate: 0 0; }
.splash-ending { translate: 0 0; }
.splash-love-l { animation: intro-write-l .3s cubic-bezier(.45,0,.2,1) .42s forwards, intro-merge-l .58s cubic-bezier(.22,1,.36,1) 1.9s forwards; }
.splash-ending { animation: intro-write-glyph .3s cubic-bezier(.45,0,.2,1) 1.23s forwards, intro-merge-ending .58s cubic-bezier(.22,1,.36,1) 1.9s forwards; }
.splash-o, .splash-v { animation-name: intro-write-glyph, intro-remove-love; animation-duration: .3s, .4s; animation-timing-function: cubic-bezier(.45,0,.2,1), ease; animation-fill-mode: forwards, forwards; }
.splash-o { animation-delay: .69s, 1.9s; }
.splash-v { animation-delay: .96s, 1.9s; }
.splash-final-brown { opacity: 0; animation: intro-final-brown .4s ease 1.9s forwards; }
.splash-love-red { animation: intro-remove-red .4s ease 1.9s forwards; }
.splash-pen { opacity: 0; transform-box: view-box; transform-origin: 0 0; animation: intro-pen-write 1.35s linear .34s forwards; }
.info-privacy { color: #78695e; font-size: .75rem; line-height: 1.8; margin-block: 14px; }
.splash-skip { position: absolute; right: max(20px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); min-height: 44px; padding: 10px 14px; border: 0; background: transparent; color: #78695e; font-size: .8125rem; }
@keyframes intro-write-glyph { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0); } }
@keyframes intro-write-l { from { opacity: 0; clip-path: inset(0 0 100% 0); } to { opacity: 1; clip-path: inset(0); } }
@keyframes intro-send-arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes intro-pen-write {
  0% { opacity: 0; transform: translate(1645px, 275px); }
  4% { opacity: 1; transform: translate(1645px, 275px); }
  22% { opacity: 1; transform: translate(1658px, 515px); }
  42% { opacity: 1; transform: translate(1810px, 430px); }
  62% { opacity: 1; transform: translate(1995px, 470px); }
  82% { opacity: 1; transform: translate(2180px, 420px); }
  94% { opacity: 1; transform: translate(2270px, 470px); }
  100% { opacity: 0; transform: translate(2290px, 465px); }
}
@keyframes intro-center-logo { to { translate: 250px 0; } }
@keyframes intro-merge-l { to { translate: -90px 0; } }
@keyframes intro-merge-ending { to { translate: -500px 0; } }
@keyframes intro-remove-love { from { opacity: 1; clip-path: inset(0); } to { opacity: 0; clip-path: inset(0); } }
@keyframes intro-remove-red { to { opacity: 0; } }
@keyframes intro-final-brown { to { opacity: 1; } }
@keyframes intro-dismiss { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .brand-splash { display: none; } }
p, h1, h2, h3, blockquote { margin: 0; }
p + p { margin-top: 1rem; }
h1, h2, h3 { font-family: var(--sans); font-weight: 400; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }
p, dd { word-break: keep-all; overflow-wrap: anywhere; }
::selection { background: #e7d5d3; }
.site-shell { width: 100%; max-width: 480px; min-height: 100svh; background: var(--bg); box-shadow: 0 0 40px #57443209; margin: auto; padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right)); }
.site-header { min-height: 68px; padding-top: env(safe-area-inset-top); display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; flex-shrink: 0; gap: 9px; min-height: 48px; font: 700 1.5rem var(--sans); letter-spacing: -.05em; }
.brand > span:first-child { color: var(--wine); font-size: 1.6rem; font-weight: 400; }
nav { display: flex; align-items: center; font-size: .875rem; }
nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 4px; color: var(--wine-dark); font-size: .9375rem; font-weight: 600; }
main { min-height: calc(100svh - 180px); }
.kicker { font-size: .875rem; color: var(--wine); margin-bottom: 16px; letter-spacing: .04em; }
.hero { display: flex; flex-direction: column; gap: 24px; padding: 28px 0 32px; }
.hero h1 { font-size: clamp(1.875rem, 8.2vw, 2.25rem); letter-spacing: -.045em; line-height: 1.45; margin-bottom: 12px; }
.hero h1 em { color: var(--wine); font-style: normal; }
.hero-description { color: var(--muted); font-size: .875rem; line-height: 1.85; }
.hero-entry { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.hero-entry .button { width: 100%; justify-content: space-between; min-height: 52px; }
.hero-entry .entry-reassurance { text-align: center; font-size: .8125rem; }
.hero .kicker { margin-bottom: 8px; font-size: .8125rem; }
.sample-label { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--wine); }
.sample-dot { content: ''; display: inline-block; width: 5px; height: 5px; background: var(--wine); border-radius: 50%; flex-shrink: 0; }
.hero-entry > p { color: var(--muted); font-size: .875rem; margin: 0; }
.button { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; gap: 16px; padding: 13px 20px; border: 1px solid transparent; border-radius: 14px; font-size: 1rem; line-height: 1.5; font-weight: 650; text-align: center; transition: background-color .16s; }
.button-primary { color: #482f25; background: #e8a38b; box-shadow: 0 5px 12px #b56d4820; }
.button-primary:hover:not(:disabled) { background: #e2987f; }
.button-quiet { color: var(--wine-dark); background: var(--paper); border-color: #928574; }
.button-quiet:hover { background: #ebe4d8; }
.text-link { display: inline-flex; align-items: center; justify-content: flex-start; gap: 16px; min-height: 44px; padding: 8px 0; background: transparent; border: 0; color: var(--wine-dark); font-size: .9375rem; font-weight: 600; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: #9b7b70; }
.text-link:hover { text-decoration-color: var(--wine); }
.letter-scene { position: relative; width: 100%; padding: 0 6px 12px; }
.letter-fragment { position: relative; z-index: 2; background: var(--paper); padding: 18px 22px 22px; border: 1px solid #e5dccd; box-shadow: 0 12px 28px #6d573811; }
.fragment-top { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 10px; color: var(--muted); font-size: .8125rem; }
.flower { color: var(--green); }
.fragment-top .flower { font-size: 1.6rem; line-height: 1; }
.letter-fragment blockquote { font: 1.1875rem/1.85 var(--letter-font); letter-spacing: -.035em; margin: 16px 0 12px; }
.fragment-sign { font: .8125rem/1.8 var(--letter-font); color: var(--muted); }
.fragment-heart { position: absolute; right: 20px; bottom: 17px; color: var(--wine); font: 1.8rem var(--sans); }
.quiet-promise { border-top: 1px solid var(--line); padding: 24px 0 8px; }
.quiet-promise h2 { font-size: 1.125rem; margin-bottom: 8px; }
.quiet-promise p { font-size: .875rem; color: var(--muted); }
.home-bottom { padding: 20px 0 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.home-bottom p { color: var(--muted); font: .9375rem/1.8 var(--sans); }
.site-footer { min-height: 112px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 16px 0 max(20px, env(safe-area-inset-bottom)); }
.footer-brand { display: inline-flex; align-items: center; min-height: 44px; gap: 18px; font: 1.125rem var(--sans); }
.footer-brand span, .site-footer > p { font: .75rem/1.8 var(--sans); color: var(--muted); }
.skip-link { position: fixed; z-index: 20; top: -100px; left: 16px; padding: 12px 20px; background: var(--paper); border: 1px solid var(--wine); }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* The mobile paper uses the same visual front as the administrator's 145 × 110mm card. */
.letter-paper.stationery, .preview-paper.stationery, .letter-fragment.stationery {
  position: relative; isolation: isolate; padding: 24px;
  border: 1px solid #e6ddd1; border-radius: 2px; color: #422b20;
  background: #fffcf3; box-shadow: 0 2px 0 #e9e0d3, 0 10px 28px #8c7a6b14;
}
.stationery-heading { display: flex; align-items: flex-start; min-height: 24px; }
.stationery-logo { display: block; width: 96px; aspect-ratio: 5.1 / 1; height: auto; object-fit: cover; object-position: center; }
.stationery-title { margin: 22px 0 24px; color: #422b20; font-size: 1.125rem; font-weight: 600; line-height: 1.65; letter-spacing: -.025em; }
.stationery-foot { display: flex; justify-content: flex-end; align-items: flex-end; min-height: 32px; margin-top: 18px; pointer-events: none; }
.stationery-signature { color: #78695e; font-size: .75rem; font-weight: 500; letter-spacing: -.01em; }
.stationery .letter-body p, .stationery #preview-body { font-size: 1.0625rem; line-height: 2.125rem; }
.stationery .letter-body p + p { margin-top: 1.0625rem; }
.stationery .letter-input { font-size: 1.0625rem; line-height: 2.125rem; padding: 0; border: 0; border-radius: 0; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(2.125rem - 1px), #dce0d3 calc(2.125rem - 1px), #dce0d3 2.125rem); background-origin: content-box; background-clip: content-box; }
.stationery .letter-input:focus-visible { outline-offset: 6px; }
.stationery .field-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.letter-fragment.stationery .stationery-heading { min-height: 20px; }
.letter-fragment.stationery blockquote { margin: 8px 0 0; }
.letter-fragment.stationery .stationery-logo { width: 78px; }
.letter-fragment.stationery .stationery-foot { margin-top: 8px; min-height: 24px; }

/* Reading is an unhurried, static page. */
.inner-page { padding: 24px 0 40px; }
.page-heading { margin-bottom: 24px; }
.page-heading h1 { font-size: 1.75rem; letter-spacing: -.04em; line-height: 1.5; margin-bottom: 12px; }
.page-heading > p:not(.kicker) { color: var(--muted); font-size: .875rem; line-height: 1.9; }
.sample-note { color: var(--muted); font-size: .875rem; line-height: 1.85; }
.sample-dot { margin-right: 7px; vertical-align: middle; }
.letter-paper { background: var(--paper); padding: 24px 20px; border: 1px solid #e4dccf; box-shadow: 0 8px 24px #6d573807; }
.reading-page .letter-paper { max-width: 680px; margin-inline: auto; padding: 24px; }
.paper-top { display: flex; justify-content: space-between; gap: 16px; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 24px; font: 1rem/1.8 var(--letter-font); }
.paper-top > span:last-child { color: var(--wine); font-size: 1.8rem; }
.letter-body { font: 1.0625rem/2 var(--letter-font); }
.letter-body p + p { margin-top: 24px; }
.letter-signature { font: .875rem/1.9 var(--letter-font); text-align: right; color: var(--muted); margin-top: 32px; }
.rest-panel { margin: 32px auto 0; text-align: center; }
.rest-panel h2 { font-size: 1.375rem; margin-bottom: 12px; }
.rest-panel > p { color: var(--muted); font-size: .9375rem; margin-bottom: 24px; }
.optional-next { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.optional-next p { color: var(--muted); font-size: .875rem; margin-bottom: 4px; }
.center-page { padding: 56px 0 64px; text-align: center; }
.rest-mark { display: block; font: 4rem/1 var(--sans); color: var(--wine); margin-bottom: 30px; }
.rest-mark.flower { color: var(--green); }
.center-page h1 { font-size: 1.875rem; margin-bottom: 24px; letter-spacing: -.04em; }
.center-page > p { color: var(--muted); font-size: .9375rem; }
.rest-permission { margin-block: 30px; font-size: .9375rem; }
.center-page > .text-link { display: flex; justify-content: center; width: fit-content; max-width: 100%; margin: 20px auto 0; }
.completion-details { text-align: left; border-block: 1px solid var(--line); margin: 32px 0; padding: 24px 0; }
.completion-details h2 { font: 500 1rem/1.8 var(--sans); margin-bottom: 8px; }
.completion-details p { color: var(--muted); font-size: .875rem; }

/* Writing tools stay quieter than the letter. */
.write-page { width: 100%; }
.write-layout { display: flex; flex-direction: column; gap: 24px; }
.write-main, .write-sidebar { min-width: 0; width: 100%; }
.write-paper { padding: 20px 16px; }
.write-paper .paper-top { margin-bottom: 24px; }
.field-label { display: block; font-size: .875rem; margin-bottom: 12px; }
.letter-input { display: block; resize: none; overflow: hidden; width: 100%; min-height: 0; border: 1px solid var(--control-line); border-radius: 3px; padding: 10px 12px; color: var(--ink); background: transparent; font: 1rem/2 var(--letter-font); scroll-margin-block: 24px; }
.letter-input::placeholder { color: var(--muted); opacity: 1; }
.line-limit { margin: 10px 0 0; color: #85523c; font-size: .75rem; line-height: 1.7; }
.write-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: .6875rem; margin-top: 14px; color: var(--muted); }
.char-count { white-space: nowrap; align-self: flex-end; }
.storage-warning { color: #8a352d !important; }
.write-meta .storage-warning { font-size: .875rem; }
.privacy-note, .demo-note { color: var(--muted); font-size: .875rem; margin-top: 18px; line-height: 1.85; }
.inline-warning, .form-error { font-size: .875rem; line-height: 1.85; color: #823b31; padding: 12px 16px; margin-block: 16px; background: #eee0d4; border-left: 2px solid #a25b4f; }
.form-error { color: #852f2f; }
.write-sidebar { padding-top: 0; }
summary { cursor: pointer; min-height: 48px; padding: 12px 0; font-size: .9375rem; }
summary::marker { color: var(--wine); }
.sidebar-note { margin-top: 0; padding-top: 24px; border-top: 1px solid var(--line); }
.sidebar-note h2 { font-size: 1.125rem; margin-bottom: 12px; }
.sidebar-note p { font-size: .875rem; color: var(--muted); line-height: 1.9; }
.sidebar-note strong { font-weight: 500; color: var(--ink); }
/* The physical coupon is a sticker, so it sits directly on the letter without faux tape. */
.coupon-attachment { position: absolute; z-index: 2; top: 6px; right: 24px; width: 50px; margin: 0; transform: rotate(-2deg); transform-origin: center; pointer-events: none; filter: drop-shadow(0 1px 1px #5948301a); }
/* BEGIN COUPON V15: generated from assets/coupon-v15.css; keep proportions in sync. */
/* Shared v15 coupon: the printed design and web sticker use identical proportions. */
.coupon-art { container-type: inline-size; display: block; position: relative; width: 100%; aspect-ratio: 38 / 44; overflow: hidden; background: #fff9ed; color: #684333; font-family: var(--sans, Pretendard, sans-serif); -webkit-font-smoothing: antialiased; mask: url('assets/coupon-stamp-mask-v14.svg') center / 100% 100% no-repeat; -webkit-mask: url('assets/coupon-stamp-mask-v14.svg') center / 100% 100% no-repeat; }
.coupon-art, .coupon-art * { box-sizing: border-box; }
.coupon-art::before { content: ''; position: absolute; inset: 6.8%; border: .88cqw double #ac7258; pointer-events: none; }
.coupon-art .coupon-brands { position: absolute; top: 11cqw; width: 100%; display: flex; align-items: center; justify-content: center; gap: 2cqw; font-size: 5.2cqw; line-height: 1; }
.coupon-art .coupon-logo { display: block; width: 24cqw; height: 5.3cqw; object-fit: cover; }
.coupon-art .coupon-cross { color: #b86a54; font-weight: 400; }
.coupon-art .coupon-partner { display: inline-flex; align-items: center; gap: 1.2cqw; font-weight: 600; letter-spacing: -.025em; white-space: nowrap; }
.coupon-art .coupon-tangerine { display: block; width: 5.8cqw; height: 5.8cqw; }
.coupon-art .coupon-message { position: absolute; top: 21cqw; width: 100%; margin: 0; text-align: center; font-size: 4.8cqw; font-weight: 450; line-height: 1.4; color: #8a6955; white-space: nowrap; }
.coupon-art .coupon-picture { display: block; position: absolute; top: 29cqw; left: 11%; width: 78%; height: 47cqw; overflow: hidden; background: #f3e2cf; border-block: .3cqw solid #c5987d; }
.coupon-art .coupon-cup { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.coupon-art .coupon-details { position: absolute; top: 82cqw; left: 12%; width: 76%; display: flex; align-items: flex-start; justify-content: space-between; gap: 3cqw; }
.coupon-art .coupon-name { display: block; margin: 0; padding-top: .3cqw; font-size: 6cqw; font-weight: 600; line-height: 1.4; letter-spacing: -.025em; }
.coupon-art .coupon-name > span { display: block; white-space: nowrap; }
.coupon-art .coupon-value { display: block; margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.coupon-art .coupon-value > strong { display: block; font-size: 10cqw; font-weight: 650; line-height: 1.05; letter-spacing: -.045em; color: #9a543a; }
.coupon-art .coupon-value > span { display: block; margin-top: 1.2cqw; font-size: 5.2cqw; font-weight: 450; line-height: 1.4; color: #8a6955; white-space: nowrap; }
/* END COUPON V15 */
.gift-toggle-control { margin-block: 20px; }
.gift-toggle-control small { display: inline-block; color: var(--muted, #756b61); font-size: .78rem; font-weight: 400; }
.gift-toggle-control:has(input:disabled) { cursor: default; }
.payment-mode-note { margin: 8px 22px; color: #76532d; font-size: .86rem; line-height: 1.6; }
.payment-status { margin-block: 14px; padding: 12px 14px; border: 1px solid #ddd0bd; border-radius: 12px; background: #faf5ec; font-size: .88rem; line-height: 1.65; overflow-wrap: anywhere; }
.payment-status p { margin: 0; }
#preview-payment-status { margin-inline: 22px; }
.payment-recovery-actions { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; }
.payment-recovery-actions button { min-height: 44px; text-align: left; font-size: .84rem; }
.check-label { display: flex; align-items: flex-start; gap: 12px; min-height: 48px; padding: 12px 0; font-size: 1rem; font-weight: 500; line-height: 1.8; cursor: pointer; }
input[type=checkbox] { accent-color: var(--wine); width: 22px; height: 22px; margin: 3px 0 0; flex-shrink: 0; }
.help-text { color: var(--muted); font-size: .875rem; line-height: 1.8; }
.write-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.write-actions > .button { width: 100%; min-height: 52px; }
.draft-delete { color: var(--wine-dark); align-self: flex-end; }

.about-page { width: 100%; }
.about-page .page-heading { padding: 0; }
.about-page h1 { font-size: 1.75rem; }
.about-manifesto { display: flex; flex-direction: column; gap: 24px; padding: 28px 0; border-block: 1px solid var(--line); }
.about-manifesto h2 { font-size: 1.25rem; }
.about-manifesto p { font-size: 1rem; color: var(--muted); line-height: 2; }
.about-manifesto blockquote { margin-block: 24px; font: 1.125rem/1.9 var(--sans); color: var(--wine); }
.about-principles { margin-block: 40px; }
.about-principles > h2 { font-size: 1.5rem; margin-bottom: 24px; }
.about-principles dl { margin: 0; }
.about-principles dl > div { display: flex; flex-direction: column; gap: 8px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.about-principles dt { font: 1.125rem/1.8 var(--sans); }
.about-principles dd { margin: 0; color: var(--muted); font-size: .9375rem; }
.about-cta { padding: 0 0 24px; }
.about-cta .sample-note { margin-bottom: 16px; }

/* Native dialogs provide modal focus containment and Escape handling. */
dialog { width: min(680px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--ink); padding: 28px 32px; box-shadow: 0 24px 80px #2b251c30; overscroll-behavior: contain; }
dialog::backdrop { background: #30291f88; }
.dialog-heading { display: flex; flex-shrink: 0; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 20px; padding-top: max(16px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); }
.dialog-heading .kicker { margin-bottom: 4px; }
dialog h2 { font-size: 1.5rem; margin-bottom: 12px; }
.dialog-heading h2 { margin-bottom: 0; }
.icon-button { border: 0; background: transparent; font-size: 1.75rem; min-width: 48px; min-height: 48px; padding: 4px; line-height: 1; color: var(--wine-dark); font-weight: 600; }
.notice { border-left: 2px solid #a38c7d; background: #ece5d9; padding: 14px 16px; font-size: .875rem; line-height: 1.85; }
.preview-paper { padding: 20px 16px; background: var(--paper); border: 1px solid #e4dccf; margin-block: 24px; }
.letter-salutation { font: 1rem/1.8 var(--letter-font); margin-bottom: 20px; }
#preview-body { font: 1rem/2 var(--letter-font); white-space: pre-wrap; overflow-wrap: anywhere; }
.dialog-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
#delete-dialog { max-width: 520px; }
#delete-description { color: var(--muted); font-size: .9375rem; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: 24px; transform: translateX(-50%); opacity: 0; pointer-events: none; max-width: calc(100% - 32px); width: max-content; background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 4px; font-size: .875rem; transition: opacity .15s; }
.toast.visible { opacity: 1; }


/* Phone layout is the baseline. Wider screens keep the same reading order. */
.hero-copy { width: 100%; }
.rest-panel > .button, .about-cta > .button { width: 100%; min-height: 52px; }
#preview-dialog { width: 100%; max-width: none; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; border-radius: 0; overflow: hidden; }
#preview-dialog[open] { display: flex; flex-direction: column; }
.dialog-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px; }
.dialog-body:focus-visible { outline-offset: -4px; }
#preview-dialog > .dialog-actions { flex-shrink: 0; padding: 12px 20px max(12px, env(safe-area-inset-bottom)); margin: 0; background: var(--bg); border-top: 1px solid var(--line); }
#preview-dialog .dialog-actions .button { min-height: 52px; }
#preview-dialog .dialog-actions .button-quiet { min-height: 48px; padding-block: 10px; }
#delete-dialog { padding: 24px 20px; }
#delete-dialog .dialog-actions .button { width: 100%; }
@media (min-width: 600px) {
  .site-shell { max-width: 480px; padding-inline: max(24px, env(safe-area-inset-left)) max(24px, env(safe-area-inset-right)); }
  .hero { padding-top: 36px; }
  .hero h1 { font-size: 1.875rem; }
  .letter-fragment { padding: 22px 28px; }
  .letter-fragment blockquote { font-size: 1.375rem; }
  .inner-page { padding-top: 32px; }
  .letter-paper { padding: 32px; }
  .write-paper { padding: 24px; }
  .page-heading h1 { font-size: 1.625rem; }
  #preview-dialog { width: min(600px, calc(100% - 48px)); height: min(860px, calc(100dvh - 48px)); max-height: calc(100dvh - 48px); margin: auto; border: 1px solid var(--line); border-radius: 6px; }
  #preview-dialog > .dialog-actions { flex-direction: row; justify-content: space-between; }
  #preview-dialog > .dialog-actions .button { flex: 1; }
  .dialog-body { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}


/* Direct stationery editor. */
.stationery-editor .inner-page { padding-top: 12px; }
.write-paper { cursor: text; }
.stationery-editor .write-layout { gap: 0; }
.stationery-editor .write-meta { margin-top: 12px; }
.stationery-editor .gift-toggle-control { margin-block: 18px; }
.stationery-editor .write-actions { gap: 4px; }

/* Warm mobile app direction from the supplied October reference. */
.site-header { position: sticky; top: 0; z-index: 10; min-height: 78px; background: #fdfbf7f5; backdrop-filter: blur(12px); }
.brand { gap: 7px; font-size: 1.25rem; }
.brand > span:first-child { color: #bb7054; background: #f8e6db; width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; font-size: 1.45rem; }
.site-header nav { gap: 5px; }
.site-header nav a { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 44px; min-height: 52px; padding: 5px; color: var(--muted); border-radius: 12px; font-size: .6875rem; font-weight: 550; }
.site-header nav a[aria-current=page] { background: #f8e8de; color: #8b4832; }
.site-header nav a:hover { background: #f3ece3; }
.site-header nav svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hero { gap: 22px; padding-top: 28px; }
.hero-copy { text-align: center; }
.hero .kicker, .reading-page .kicker { display: inline-block; padding: 5px 12px; border-radius: 30px; background: #fae9de; color: #975238; font-size: .75rem; margin-bottom: 14px; }
.hero h1 { font-size: 1.875rem; font-weight: 650; line-height: 1.45; letter-spacing: -.045em; }
.hero h1 em { color: var(--ink); }
.hero-description { line-height: 1.8; }
.letter-scene { display: block; padding: 0 6px; }
.letter-fragment.stationery { padding: 20px 24px; transform: rotate(-1.5deg); transition: transform .18s ease; }
.letter-scene:hover .letter-fragment { transform: rotate(0); }
.letter-fragment blockquote { font-size: 1.1875rem; }
.card-open-hint { display: flex; justify-content: center; align-items: center; gap: 12px; font-size: .75rem; color: var(--muted); margin-top: 15px; }
.hero-entry { text-align: center; }
.hero-entry .button { justify-content: center; }
.hero-entry .sample-label { display: block; font-size: .75rem; }
.quiet-promise { border: 0; background: #f4ede3; border-radius: 20px; padding: 22px; text-align: center; }
.quiet-promise h2 { font-size: 1.0625rem; font-weight: 650; }
.home-bottom { align-items: center; text-align: center; padding: 24px 0 32px; }
.home-bottom p { font-size: .8125rem; }
.page-heading h1 { font-size: 1.625rem; font-weight: 650; line-height: 1.4; }
.reading-page .page-heading { text-align: center; }
.reading-page .sample-note { font-size: .75rem; }
.reading-page .stationery .letter-body p { background: repeating-linear-gradient(to bottom, transparent 0, transparent 33px, #eee7dd 33px, #eee7dd 34px); }
.rest-panel { margin-top: 28px; }
.rest-panel h2 { font-size: 1.25rem; font-weight: 650; }
.rest-panel > p { font-size: .875rem; }
.rest-panel > .button { background: var(--ink); color: #fffdf9; }
.optional-next { border: 0; padding: 20px 16px; background: #f4ede3; border-radius: 18px; margin-top: 24px; }
.optional-next p { font-size: .8125rem; }
.write-page .page-heading .kicker { font-size: .75rem; margin-bottom: 8px; }
.gift-toggle-control { padding: 12px 14px; background: #f4ede3; border-radius: 14px; }
.privacy-note, .demo-note, .write-meta, .help-text { font-size: .75rem; }
.sidebar-note { border: 0; padding: 20px; border-radius: 18px; background: #f4ede3; }
.sidebar-note h2 { font-size: 1rem; font-weight: 600; }
.about-manifesto { border: 0; padding: 24px; border-radius: 20px; background: #f4ede3; }
.about-manifesto h2 { font-weight: 650; }
.about-manifesto p { font-size: .9375rem; }
.about-principles dl > div { padding: 20px; background: #fffefa; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 12px; }
.about-principles dt { font-size: 1rem; font-weight: 650; }
.about-principles dd { font-size: .875rem; }
.center-page h1 { font-weight: 650; font-size: 1.75rem; }
.notice { border: 0; border-radius: 12px; background: #f3ebe1; font-size: .8125rem; }
dialog { border-radius: 20px; }
.site-footer { align-items: center; text-align: center; }
.footer-brand span, .site-footer > p { font-size: .6875rem; }
@media (min-width: 600px) { #preview-dialog { max-width: 480px; border-radius: 22px; } }

/* Choose a topic before seeing the letter itself. */
.site-header nav { gap: 1px; }
.site-header nav a { min-width: 40px; }
.utility-links { display: flex; justify-content: flex-end; }
.utility-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .75rem; text-decoration: underline; text-underline-offset: 4px; }
.hero { padding-top: 12px; }
.hero > .sample-label { font-size: .75rem; margin: 0; text-align: center; display: block; }
.topic-list { display: grid; gap: 12px; }
.topic-card { display: flex; align-items: center; gap: 12px; min-height: 108px; padding: 20px 16px; border: 1px solid #e5d8ca; border-radius: 18px 25px 20px 18px; background: #fffefa; box-shadow: 0 4px 16px #8c7a6b0c; }
.topic-card:hover { background: #fbf1e7; border-color: #c9957e; }
.topic-card h2 { flex: 1; font-size: 1.0625rem; font-weight: 600; line-height: 1.6; margin: 0; }
.topic-number { color: #9b5c43; font-size: .75rem; }
.topic-card > span:last-child { color: #9b5c43; }
.topic-label { display: block; font-size: .9375rem; font-weight: 600; margin-bottom: 8px; }
.topic-label span { display: block; color: var(--muted); font-size: .75rem; font-weight: 400; }
.topic-input { width: 100%; padding: 13px 14px; min-height: 50px; color: var(--ink); background: #fffefa; border: 1px solid #b7a698; border-radius: 12px; font-size: 1rem; }
.topic-input::placeholder { color: var(--muted); }
.topic-input[aria-invalid=true] { border-color: #a33f2c; }
#topic-help { margin: 6px 0 22px; }
.preview-topic { font-size: 1.125rem; font-weight: 600; margin-top: 24px; }
.process-panel { margin: 24px 0; padding: 20px; border-radius: 18px; background: #f4ede3; }
.process-panel h2, .process-panel h3 { font-size: 1rem; font-weight: 650; }
.process-panel p { color: var(--muted); font-size: .8125rem; }
.process-steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 18px 0; counter-reset: process; }
.process-steps li { flex: 1; min-width: 64px; padding: 8px 4px; text-align: center; font-size: .75rem; font-weight: 600; counter-increment: process; }
.process-steps li::before { content: counter(process); display: grid; place-items: center; margin: 0 auto 8px; width: 26px; height: 26px; border-radius: 50%; background: #f3d5c3; color: #713f2e; }
.received-card { border: 1px solid var(--line); background: #fffefa; border-radius: 22px; padding: 24px; }
.received-card h2 { margin: 12px 0; font-size: 1.375rem; font-weight: 600; }
.received-card .sample-label { font-size: .75rem; }
.optional-next > .button { width: 100%; margin-top: 14px; }
.help-page details { border-bottom: 1px solid var(--line); padding: 8px 0; }
.help-page details p { font-size: .875rem; color: var(--muted); padding: 0 0 16px; }
.dialog-body > .process-panel { margin-top: 0; }

/* SENDLovE: two views; the letter opens in place. */
:root { --ink: #422b20; --wine: #b84436; --wine-dark: #853124; --line: #eddfd5; }
.site-header { position: static; min-height: 84px; border: 0; background: transparent; }
.brand { width: 208px; max-width: calc(100% - 56px); }
.brand img { display: block; width: 100%; height: auto; aspect-ratio: 5.1 / 1; object-fit: cover; }
.info-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 50%; background: #f5ece4; color: #72584b; }
.info-button svg, .collection-write svg, .visual-flow svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.view-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: #f2e9e1; border-radius: 15px; gap: 4px; }
.view-tabs a { justify-content: center; min-height: 44px; border-radius: 11px; font-size: .9375rem; color: #786458; }
.view-tabs a[aria-current=page] { background: #fffdfa; color: #9c382d; box-shadow: 0 2px 7px #68452b0c; }
main { min-height: 0; }
.letter-collection { padding: 28px 0 12px; }
.collection-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.collection-heading h1 { font-size: 1.375rem; font-weight: 650; }
.status-badge { display: inline-flex; align-items: center; font-size: .6875rem; color: #806152; background: #f6e9e0; border-radius: 20px; padding: 4px 9px; }
.letter-choice { background: #fffefa; border: 1px solid #e9dbd0; border-radius: 20px 28px 22px 18px; box-shadow: 0 4px 20px #8c7a6b08; overflow: hidden; }
.letter-choice summary { display: flex; align-items: center; list-style: none; gap: 12px; min-height: 114px; padding: 22px 18px; }
.letter-choice summary::-webkit-details-marker { display: none; }
.letter-choice summary h2 { flex: 1; font-size: 1.0625rem; line-height: 1.6; font-weight: 550; }
.letter-choice summary:focus-visible { outline-offset: -5px; border-radius: 20px; }
.expand-icon { flex-shrink: 0; width: 20px; height: 20px; fill: none; stroke: #a66655; stroke-width: 1.5; transition: transform .16s; }
.letter-choice[open] .expand-icon { transform: rotate(180deg); }
.letter-choice[open] summary { min-height: 90px; }
.inline-letter { padding: 0 22px 12px; }
.inline-letter .letter-body { padding-top: 22px; border-top: 1px solid #eee4dc; font-size: 1rem; line-height: 2; }
.inline-letter .letter-body p+p { margin-top: 20px; }
.letter-inline-actions { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid #eee4dc; margin-top: 8px; }
.letter-inline-actions .text-link { font-size: .8125rem; }
.collection-write { display: flex; width: 100%; margin-top: 24px; }
.button-primary { background: #b84436; color: #fffdfa; box-shadow: 0 4px 12px #b8443618; }
.button-primary:hover:not(:disabled) { background: #9c382d; }
.compact-footer { padding: 18px 0 24px; text-align: center; font-size: .6875rem; color: #887568; }
.write-page.inner-page { padding: 24px 0 0; }
.writing-permission { margin: 0 0 14px; color: #786458; font-size: .9375rem; }
.write-paper .stationery-heading { min-height: 24px; }
.write-paper .stationery-logo { width: 88px; }
.write-paper .stationery-title { margin: 18px 0 20px; font-size: 1rem; }
.write-paper .coupon-attachment { top: 6px; }
.write-paper .stationery-foot { min-height: 28px; margin-top: 10px; }
.write-paper .letter-input { background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(2.125rem - 1px), #e9e9df calc(2.125rem - 1px), #e9e9df 2.125rem); }
.write-layout { gap: 0; }
.privacy-note { font-size: .6875rem; margin-top: 12px; }
.gift-toggle-control { margin-block: 14px; }
.write-meta { font-size: .6875rem; }
.draft-delete { font-size: .8125rem; }
#preview-dialog .dialog-heading h2 { font-size: 1.125rem; font-weight: 600; }
#preview-content > .preview-topic { margin-top: 0; font-size: 1rem; }
.completion-content { padding: 30px 24px; text-align: center; overflow-y: auto; }
.completion-check { display: block; width: 72px; height: 72px; margin: 8px auto 20px; fill: #f8e7df; stroke: #b84436; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.flow-caption { display: block; margin-top: 32px; font-size: .6875rem; color: #887568; }
.visual-flow { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 24px 0; color: #956751; }
.visual-flow > div { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 52px; font-size: .75rem; }
.visual-flow svg { width: 32px; height: 32px; }
.flow-arrow { color: #b9a89b; margin-top: -24px; }
.completion-content > .button { width: 100%; margin-top: 20px; }
#info-dialog { max-width: 400px; padding: 0; background: var(--bg); }
#info-dialog .dialog-heading h2 { font-size: 1rem; font-weight: 600; }
.info-content { padding: 12px 24px 28px; text-align: center; }
.info-logo { display: block; width: 100%; height: auto; aspect-ratio: 5.1 / 1; object-fit: cover; margin: 8px 0 14px; }
.info-content > p { font-size: .9375rem; }
.info-status { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding: 18px 0; color: #806152; font-size: .8125rem; }
#preview-dialog:has(#completion-content:not([hidden])) { width: min(420px, calc(100% - 24px)); height: fit-content; max-height: calc(100dvh - 24px); inset: 50% auto auto 50%; transform: translate(-50%, -50%); margin: 0; border-radius: 24px; }

/* QR arrival is a specific received letter, never a catalogue. */
.view-tabs a { gap: 8px; }
.view-tabs a > span { font-size: .6875rem; opacity: .65; }
.received-experience { padding: 24px 0 0; }
.received-letter .received-id { display: block; color: #a56a55; font-size: .625rem; letter-spacing: .12em; margin-bottom: 18px; }
.received-letter .stationery-title { font-size: 1.125rem; line-height: 1.65; font-weight: 600; margin: 22px 0 24px; }
.received-letter .letter-body { font-size: 1rem; }
.received-letter.stationery .letter-body p { font-size: 1rem; line-height: 2rem; }
.received-letter .stationery-foot { min-height: 28px; margin-top: 14px; }
.pass-on { margin-top: 24px; text-align: center; }
.pass-on-label { color: #8a6c5c; font-size: .75rem; }
.pass-on-label > span { color: #b84436; margin-right: 6px; }
.pass-on .collection-write { margin-top: 10px; }
.letter-reaction { margin: 18px 0 0; text-align: center; }
.reaction-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; max-width: 100%; padding: 10px 16px; border: 1px solid #e2c7b9; border-radius: 100px; background: #fff8f1; color: #984f40; font: 550 .8125rem/1.5 var(--sans); transition: background-color .2s, border-color .2s; }
.reaction-button > [aria-hidden] { font-size: 1.125rem; line-height: 1; color: #b85a47; }
.reaction-button:hover:not(:disabled) { background: #f8e9df; border-color: #c7957f; }
.reaction-button[aria-pressed="true"] { background: #f5e8df; color: #855545; border-color: transparent; opacity: 1; cursor: default; }
.reaction-button[aria-busy="true"] { opacity: .65; }
.reaction-feedback { margin: 8px 0 0; color: #985747; font-size: .75rem; line-height: 1.7; }
.example-drawer { border-top: 1px solid var(--line); margin-top: 24px; }
.example-drawer > summary { display: flex; justify-content: space-between; align-items: center; list-style: none; min-height: 52px; color: #826d60; font-size: .8125rem; }
.example-drawer > summary::-webkit-details-marker { display: none; }
.example-drawer > summary > span { font-size: 1.125rem; }
.example-drawer[open] > summary > span { transform: rotate(45deg); }
.example-drawer .topic-list { padding-bottom: 12px; }
.write-page .collection-heading { margin-bottom: 22px; }
.write-page .collection-heading h1 { font-size: 1.25rem; }
.missing-qr { text-align: center; padding: 60px 12px; }
.missing-qr > span { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 24px; background: #f6e9e0; color: #a46b54; font-size: 1.75rem; }
.missing-qr h1 { font-size: 1.25rem; }
.qr-entry-art { display: block; width: 100px; height: 100px; margin: 0 auto 24px; }
.missing-qr p { margin: 14px 0; color: #78695e; font-size: .875rem; }

/* One two-sided card: published letters first, our purpose on the reverse. */
.home-card { perspective: 1400px; padding-top: 20px; }
.home-card-turn { display: grid; transform-style: preserve-3d; transition: transform .62s cubic-bezier(.22, .7, .25, 1); cursor: pointer; }
.home-card.is-flipped .home-card-turn { transform: rotateY(180deg); }
/* Shared grid sizing keeps the flip steady and grows for the full letter text. */
.home-card .home-card-face { grid-area: 1 / 1; min-width: 0; min-height: 360px; padding: 24px 20px; border: 1px solid #e5d7c8; border-radius: 24px; background: #fffdf6; box-shadow: 0 7px 24px #65422a08; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.home-card .project-purpose { display: flex; flex-direction: column; justify-content: center; transform: rotateY(180deg); }
.home-card:focus-visible { outline: none; }
.home-card:focus-visible .home-card-turn { outline: 2px solid var(--wine); outline-offset: 4px; border-radius: 24px; }
.home-card .archive-paper { padding: 12px 0 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.home-card .archive-empty { border: 0; background: transparent; padding: 40px 0; }
.home-card .archive-controls { display: grid; grid-template-columns: 44px minmax(26px, 1fr) 44px auto; gap: 4px; }
.home-card .archive-position { min-width: 0; }
.home-card .archive-play { padding: 8px; font-size: .6875rem; }
@media (prefers-reduced-motion: reduce) { .home-card-turn { transition: none; } }
.project-purpose { padding: 18px 0 30px; text-align: center; }
.purpose-kicker { font-size: .6875rem; font-weight: 600; color: #8e7464; margin: 0 0 14px; }
.purpose-art { display: block; width: min(100%, 246px); height: auto; margin: 12px auto 0; }
.project-purpose h2 { font-size: clamp(1.1875rem, 5.2vw, 1.5rem); line-height: 1.5; font-weight: 650; letter-spacing: -.045em; }
.project-purpose h2 em { color: #a74938; font-style: normal; }
.purpose-caption { font-size: .8125rem; line-height: 1.85; color: #7e675a; margin: 14px 0 0; }
.purpose-steps { display: flex; justify-content: center; align-items: center; gap: 10px; color: #765542; font-size: .75rem; margin-top: 10px; }
.purpose-steps > span:nth-child(2) { color: #b85a47; }
.purpose-vision { margin: 12px 0 0; color: #907a6b; font-size: .6875rem; }
.home-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.home-actions .button { flex: 1; min-width: 120px; max-width: 210px; }
#mailbox-dialog { width: min(460px, calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 0; }
#mailbox-dialog h2 { font-size: 1.125rem; }
.mailbox-content { padding: 20px; }
.mailbox-login { text-align: center; padding: 10px 0; }
.mailbox-symbol { display: block; color: #b84436; font-size: 3rem; line-height: 1; margin-bottom: 20px; }
.mailbox-login h3 { font-size: 1.25rem; font-weight: 650; }
.mailbox-login p, .mailbox-note { font-size: .8125rem; line-height: 1.8; color: #78695e; margin: 12px 0; }
.social-buttons { display: grid; gap: 10px; margin: 24px 0 14px; }
.social-button { min-height: 48px; border: 1px solid #d9c9bb; border-radius: 14px; font: 600 .875rem var(--sans); }
.social-kakao { color: #191919; background: #fee500; border-color: #fee500; }
.social-google { color: #1f1f1f; background: #fff; }
.social-button:disabled { opacity: .5; cursor: not-allowed; }
.mailbox-tabs { display: flex; gap: 6px; padding: 4px; border-radius: 14px; background: #f3e9df; margin-bottom: 20px; }
.mailbox-tabs button { flex: 1; min-height: 44px; border: 0; border-radius: 11px; background: transparent; color: #78695e; font: 600 .8125rem var(--sans); }
.mailbox-tabs button[aria-pressed=true] { color: #843d2e; background: #fffdf8; box-shadow: 0 2px 7px #6343310d; }
.mailbox-tabs span { margin-left: 4px; font-size: .75rem; }
.mailbox-letters { display: grid; gap: 16px; }
.mailbox-letter { border: 1px solid #e8d6c8; border-radius: 16px; padding: 20px 16px; background: #fffdf7; }
.mailbox-letter time { font-size: .6875rem; color: #907a6b; }
.mailbox-body { margin: 14px 0 20px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9375rem; line-height: 1.9; }
.mailbox-progress { display: flex; list-style: none; padding: 14px 0 0; margin: 0; border-top: 1px solid #efe3d9; }
.mailbox-progress li { flex: 1; text-align: center; font-size: .6875rem; color: #9d8b7d; position: relative; }
.mailbox-progress li::before { content: ''; display: block; margin: 0 auto 8px; width: 7px; height: 7px; border-radius: 50%; background: #e1d1c4; }
.mailbox-progress .is-reached { color: #a74938; }
.mailbox-progress .is-reached::before { background: #b84436; }
.mailbox-progress [aria-current=step] { font-weight: 750; }
.mailbox-held { color: #856032; font-size: .8125rem; padding-top: 10px; border-top: 1px solid #efe3d9; }
.mailbox-reaction { margin: 16px 0 0; color: #985747; font-size: .75rem; line-height: 1.7; }
.mailbox-reaction > span { color: #b85a47; margin-right: 3px; }
.mailbox-empty, .mailbox-loading { padding: 32px 8px; text-align: center; color: #78695e; font-size: .875rem; line-height: 1.8; }
.mailbox-empty > span { display: block; color: #b85a47; font-size: 2rem; }
.mailbox-empty .button { margin-top: 18px; }
.mailbox-footer { display: flex; justify-content: space-between; margin-top: 20px; }
.mailbox-footer .text-link { font-size: .75rem; }
.completion-content > .button + .button { margin-top: 8px; }
.archive-kicker { margin: 0 0 6px; color: #947768; font-size: .6875rem; }
.home-archive .collection-heading h1 { font-size: 1.25rem; font-weight: 650; }
.purpose-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 0; margin: 24px 0 0; list-style: none; text-align: center; }
.purpose-values li { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.purpose-values li > span:first-child { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #f5e9df; color: #a74938; font-size: 1.25rem; line-height: 1; }
.purpose-values strong { color: #674739; font-size: .8125rem; font-weight: 650; }
.purpose-values li > span:last-child { color: #7e675a; font-size: .6875rem; line-height: 1.6; word-break: keep-all; }
.project-purpose .purpose-art { width: min(100%, 210px); margin-top: 6px; }
.project-purpose .purpose-vision { margin-top: 22px; font-size: .75rem; color: #7e675a; }
.archive-count { color: #806859; font-size: .6875rem; white-space: nowrap; }
.home-archive .collection-heading { align-items: end; margin-bottom: 12px; }
.archive-controls { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.archive-arrow, .archive-play { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; background: transparent; border: 1px solid #d9c4b4; border-radius: 100px; color: #74513d; }
.archive-arrow { width: 44px; flex-shrink: 0; font-size: 1.125rem; }
.archive-position { min-width: 48px; text-align: center; font-size: .6875rem; color: #735b4b; font-variant-numeric: tabular-nums; }
.archive-play { margin-left: auto; padding: 8px 12px; font-size: .75rem; font-weight: 600; gap: 5px; }
.archive-arrow:disabled, .archive-play:disabled { background: transparent; border-color: #e6d9cd; color: #aa9a8b; }
.archive-paper { position: relative; padding: 26px 24px 20px; border: 1px solid #e5d7c8; border-radius: 22px 28px 25px 20px; background: #fffdf6; box-shadow: 0 5px 18px #65422a05; animation: archive-arrive .3s ease; }
.archive-greeting { margin: 0 0 22px; padding-bottom: 16px; border-bottom: 1px solid #eee4d7; color: #a25844; font-size: .75rem; }
.archive-body { white-space: pre-wrap; overflow-wrap: anywhere; font: 1rem/2 var(--letter-font); color: #503d31; }
.archive-letter-foot { display: flex; justify-content: space-between; gap: 12px; align-items: end; margin-top: 24px; }
.archive-letter-foot > span { color: #806959; font-size: .6875rem; }
.archive-letter-foot img { flex-shrink: 0; }
.archive-empty { padding: 30px 16px; border: 1px solid #e9ddd0; border-radius: 22px; background: #fffdf8; text-align: center; }
.archive-empty-heart { color: #be7663; font-size: 2rem; }
.archive-empty p { margin: 12px 0 5px; font-size: .875rem; line-height: 1.8; color: #705341; }
.archive-feedback { padding: 20px 10px 4px; text-align: center; font-size: .8125rem; line-height: 1.8; color: #806653; }
.archive-retry { display: block; min-height: 44px; margin: 8px auto; }
@keyframes archive-arrive { from { opacity: .35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .archive-paper { animation: none; } }
.archive-consent { margin: 22px 0 0; min-height: 44px; align-items: flex-start; font-size: .8125rem; }
.archive-consent small { display: block; font-size: .6875rem; color: #897466; margin-top: 3px; }
[data-page="home"] .site-header { min-height: 78px; }
#submission-error { padding: 12px 24px; margin: 0; }

.training-consent { min-width: 0; margin: 18px 0 8px; padding: 16px; border: 1px solid #dfd2c6; border-radius: 16px; background: #fffefa; transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease; }
.training-consent legend { padding: 0 5px; color: var(--ink); font-size: .875rem; font-weight: 650; line-height: 1.55; }
.training-choice-help { margin: 0 0 12px; color: #79695e; font-size: .75rem; line-height: 1.65; }
.training-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.training-options label { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 48px; padding: 10px 8px; border: 1px solid #cfbfb1; border-radius: 12px; background: #fffdf8; color: #5f4e43; font-size: .8125rem; font-weight: 600; line-height: 1.35; text-align: center; cursor: pointer; transition: border-color .16s ease, background-color .16s ease, color .16s ease; }
.training-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.training-options label:has(input:checked) { border-color: var(--wine); background: #f8e9e5; color: var(--wine-dark); box-shadow: inset 0 0 0 1px var(--wine); }
.training-options label:has(input:focus-visible) { outline: 2px solid var(--wine); outline-offset: 3px; }
.training-consent.is-invalid { border-color: #c33f45; background: #fff9f8; box-shadow: 0 0 0 2px #c33f4524; }
.training-consent-error { margin: 10px 0 0; color: #a52f36; font-size: .75rem; font-weight: 600; line-height: 1.55; }
.training-privacy{font-size:12px;line-height:1.7;color:#705d51;margin:10px 0 0}.training-privacy summary{cursor:pointer;min-height:32px}.training-privacy p{margin-top:8px}.training-privacy button{font-size:12px;min-height:40px}

/* Small, finite gestures. Text, input measurements and card height stay still. */
:root { --ease-settle: cubic-bezier(.22, 1, .36, 1); }
#main > section { animation: view-arrive .24s ease-out both; }
.received-letter, .write-paper, .qr-entry-art {
  animation: paper-arrive .48s var(--ease-settle) both;
}
.received-experience > .collection-heading, .write-page > .collection-heading,
.purpose-kicker, .project-purpose h2, .purpose-caption {
  animation: detail-arrive .4s var(--ease-settle) both;
}
.project-purpose h2 { animation-delay: .04s; }
.purpose-caption { animation-delay: .08s; }
.pass-on { animation: detail-arrive .4s var(--ease-settle) .12s both; }
.purpose-card { animation: paper-arrive .65s var(--ease-settle) .12s both; }
.purpose-card:nth-of-type(2) { animation-delay: .24s; }
.purpose-card:nth-of-type(3) { animation-delay: .36s; }
.purpose-values li { animation: detail-arrive .4s var(--ease-settle) .2s both; }
.purpose-values li:nth-child(2) { animation-delay: .28s; }
.purpose-values li:nth-child(3) { animation-delay: .36s; }
/* Play the entrance when the introductory overlay releases the original page. */
.intro-active #main, .intro-active #main * { animation-play-state: paused !important; }

.button, .info-button, .archive-arrow, .archive-play, .view-tabs a {
  transition: background-color .16s, border-color .16s, box-shadow .2s, transform .16s var(--ease-settle);
}
:is(.button, .info-button, .archive-arrow, .archive-play, .view-tabs a):active:not(:disabled) {
  transform: scale(.98);
}
.button > [aria-hidden="true"] { transition: transform .2s var(--ease-settle); }
@media (hover: hover) and (pointer: fine) {
  .button-primary:hover:not(:disabled) { box-shadow: 0 6px 16px #b8443624; }
  .button-primary:hover:not(:disabled) > [aria-hidden="true"] { transform: translate(2px, -2px); }
}
.write-paper { transition: border-color .2s, box-shadow .2s; }
.write-paper:focus-within { border-color: #c9aa98; box-shadow: 0 2px 0 #e9e0d3, 0 10px 28px #8c7a6b14, 0 0 0 3px #b9856610; }
.coupon-attachment:not([hidden]) { animation: coupon-attach .45s var(--ease-settle) both; }

/* Fade dialogs without overriding the completion dialog's centering transform. */
dialog[open], dialog[open]::backdrop { animation: view-arrive .2s ease-out; }
dialog[open] #preview-content:not([hidden]) > .preview-paper { animation: paper-arrive .4s var(--ease-settle) both; }
dialog[open] .completion-content:not([hidden]) { animation: detail-arrive .3s var(--ease-settle) both; }
.completion-content:not([hidden]) .completion-check { animation: check-arrive .45s var(--ease-settle) both; }
.completion-check path { fill: none; }
.completion-content:not([hidden]) .completion-check path {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: check-draw .4s ease-out .18s backwards;
}
.toast { transition: opacity .18s, translate .25s var(--ease-settle); translate: 0 6px; }
.toast.visible { translate: 0 0; }

@keyframes view-arrive { from { opacity: 0; } to { opacity: 1; } }
@keyframes detail-arrive {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes paper-arrive {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes coupon-attach {
  from { opacity: 0; transform: translate(6px, -10px) rotate(2deg) scale(1.04); }
  to { opacity: 1; transform: rotate(-2deg); }
}
@keyframes check-arrive {
  from { opacity: 0; transform: scale(.88); }
  to { opacity: 1; transform: none; }
}
@keyframes check-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* A virtual fold after the server accepts the letter; the printed card stays unfolded. */
.send-scene { position: absolute; inset: 72px 0 0; overflow: hidden; }
.departure-stage { position: absolute; left: 50%; top: 42%; translate: -50% -50%; }
.flying-letter { width: 100%; height: 100%; animation: send-paper-depart 1.9s both; }
.departure-sheet { position: relative; transform-origin: top left; perspective: 1000px; }
.departure-fold { position: absolute; left: 0; width: 100%; height: calc(100% / 3); transform-style: preserve-3d; }
.departure-top { top: 0; z-index: 3; transform-origin: center bottom; animation: paper-fold-top 1.9s both; }
.departure-middle { top: calc(100% / 3); z-index: 1; }
.departure-bottom { top: calc(200% / 3); z-index: 2; transform-origin: center top; animation: paper-fold-bottom 1.9s both; }
.departure-front, .departure-back { position: absolute; inset: 0; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #fffefa; }
.departure-back { transform: rotateX(180deg); background: linear-gradient(175deg, #fffcf5, #eee2d1); border: 1px solid #e6d8c6; border-radius: 3px; }
.departure-top .departure-front { border-radius: 22px 32px 0 0; }
.departure-bottom .departure-front { border-radius: 0 0 25px 20px; }
.departure-top .departure-back { box-shadow: 0 3px 8px #6a4a2920; }
.departure-top .departure-back::after { content: '♡'; position: absolute; inset: 0; display: grid; place-items: center; color: #b85a47; font-size: 26px; }
.departure-copy.preview-paper { position: absolute; left: 0; width: 100%; margin: 0; box-shadow: none; }
.departure-copy > p { font: 1.0625rem/2.125rem var(--letter-font); white-space: pre-wrap; overflow-wrap: anywhere; }
.departure-copy, .departure-copy * { animation: none !important; }
.departure-skip { position: absolute; bottom: max(22px, env(safe-area-inset-bottom)); left: 50%; translate: -50% 0; white-space: nowrap; font-size: .8125rem; color: #806859; }
.letter-departing .dialog-heading { position: relative; z-index: 1; }
@keyframes paper-fold-bottom {
  0%, 18% { transform: rotateX(0); }
  43%, 100% { transform: rotateX(180deg); }
}
@keyframes paper-fold-top {
  0%, 40% { transform: rotateX(0); }
  66%, 100% { transform: rotateX(-180deg); }
}
@keyframes send-paper-depart {
  0% { opacity: 1; transform: translate(var(--depart-x, 0px), var(--depart-y, 0px)) scale(var(--depart-scale, 1)); animation-timing-function: var(--ease-settle); }
  20%, 66% { opacity: 1; transform: translate(0, 0) rotate(0); animation-timing-function: ease-in-out; }
  76% { opacity: 1; transform: translate(-8px, 5px) rotate(-7deg); animation-timing-function: cubic-bezier(.55, 0, 1, .5); }
  100% { opacity: 0; transform: translate(85vw, -65vh) rotate(-22deg) scale(.6); }
}

/* The global reduced-motion rule cancels all animations, including on preference changes. */
@media (prefers-reduced-motion: reduce) {
  :is(.button, .info-button, .archive-arrow, .archive-play, .view-tabs a):active:not(:disabled),
  .button-primary:hover:not(:disabled) > [aria-hidden="true"] { transform: none; }
  .toast { translate: none; }
}
