@font-face { font-family:UnfoldClassic; src:url('/assets/fonts/CormorantGaramond-Italic.otf') format('opentype'); font-weight:400; font-style:italic; font-display:swap; }
@font-face { font-family:UnfoldCalligraphy; src:url('/assets/fonts/GreatVibes-Regular.ttf') format('truetype'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:UnfoldHandwritten; src:url('/assets/fonts/MarckScript-Regular.ttf') format('truetype'); font-weight:400; font-style:normal; font-display:swap; }
#letter-preview, .letter-style-classic { --letter-font:UnfoldClassic,Georgia,serif; --letter-slant:italic; --letter-size:1.125rem; --letter-greeting:1.625rem; --letter-font-scale:1; --letter-leading:1.3; }
#letter-preview[data-typography=calligraphy], .letter-style-calligraphy { --letter-font:UnfoldCalligraphy,system-ui,sans-serif; --letter-slant:normal; --letter-size:1.25rem; --letter-greeting:1.75rem; --letter-leading:1.45; }
#letter-preview[data-typography=handwritten], .letter-style-handwritten { --letter-font:UnfoldHandwritten,system-ui,sans-serif; --letter-slant:normal; --letter-size:1.125rem; --letter-greeting:1.5625rem; --letter-leading:1.35; }
#letter-preview .inside { padding:28px 24px; justify-content:flex-start; }
#letter-preview[data-typography=calligraphy] .inside { padding-inline:32px; }
#letter-preview .inside > :first-child { margin-top:0; }
#letter-preview .inside > :last-child { margin-bottom:0; }
#letter-preview #inner-title, #letter-preview #inner-message, #letter-preview #inner-from, #letter-preview #cover-title, .letter-style-sample {
  font-family:var(--letter-font); font-style:var(--letter-slant); font-weight:400; font-synthesis:none; letter-spacing:0; text-transform:none;
}
#letter-preview #inner-title, #letter-preview #cover-title { font-size:calc(var(--letter-greeting) * var(--letter-font-scale)); line-height:var(--letter-leading); }
#letter-preview #inner-message, #letter-preview #inner-from { font-size:calc(var(--letter-size) * var(--letter-font-scale)); line-height:var(--letter-leading); color:#55434e; white-space:pre-wrap; overflow-wrap:anywhere; }
#letter-preview .inside::after { opacity:.07; }
#letter-preview #inner-message > span { display:block; min-height:1em; }
#letter-preview #inner-message > span + span { margin-top:.5em; }
#letter-preview #inner-from { margin-top:16px; }
.letter-style-options { display:grid; gap:8px; }
.letter-style-option { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; padding:10px 12px; color:var(--ink); background:#ffffff08; border:1px solid #ffffff20; border-radius:12px; font:13px system-ui,sans-serif; }
.letter-style-option[aria-pressed=true] { border-color:var(--rose); }
.letter-style-sample { font-size:27px; line-height:1.6; }
.letter-style-check { width:16px; }

/* The received letter is a readable sheet on every phone, outside the editor's device mockup. */
body.receiving .hero-demo, body.receiving .hero-note,
body.receiving .steps, body.receiving #occasions,
body.replying .hero-demo, body.replying .hero-note,
body.replying .hero-actions, body.replying .site-nav, body.replying .steps-heading,
body.replying .steps, body.replying #occasions { display:none; }
body.replying .hero { display:block; min-height:0; }
body.receiving #letter-preview { min-height:0; }
body.receiving .stage { min-height:0; padding:24px 0 32px; }
body.receiving #preview-device { width:min(100%,440px); aspect-ratio:auto; }
body.receiving #preview-device .device-assembly,
body.receiving #preview-device .device-right { position:relative; inset:auto; }
body.receiving #preview-device .device-right { border:0; border-radius:0; background:none; box-shadow:none; overflow:visible; }
body.receiving #preview-device .device-right::before,
body.receiving #preview-device .device-screen::before,
body.receiving #preview-device .device-status,
body.receiving #preview-device .device-appbar,
body.receiving #preview-device .device-intro,
body.receiving #preview-device .device-home { display:none; }
body.receiving #preview-device .device-screen { height:auto; padding:0; background:none; overflow:visible; }
body.receiving #preview-device .card-wrap { margin:0; width:100%; height:clamp(360px,65svh,600px); aspect-ratio:auto; }
body.receiving #letter-preview .inside { overflow-y:auto; overscroll-behavior:contain; }
body.receiving #letter-preview { --letter-size:1.5rem; --letter-greeting:2rem; }
body.receiving #letter-preview[data-typography=calligraphy] { --letter-size:1.875rem; --letter-greeting:2.375rem; }
body.receiving #letter-preview[data-typography=handwritten] { --letter-size:1.5625rem; --letter-greeting:2rem; }
body.receiving #preview-device .inside .mini { font-size:.7rem; }
body.receiving #preview-device .cover-copy small,
body.receiving #preview-device .front-footnote { font-size:.65rem; }
body.receiving #preview-device .device-instruction { font-size:1rem; margin-top:20px; }
body.receiving #reply-actions { text-align:center; }
body.receiving .hero { padding-bottom:0; }
body.receiving .site-footer .footer-main { display:none; }
body.receiving #letter-preview[hidden], [hidden] { display:none !important; }
/* Keep the skip action available to keyboard focus and out of scrolled full-page captures. */
.skip-link:not(:focus) { clip-path:inset(50%); width:1px; height:1px; padding:0; overflow:hidden; white-space:nowrap; }
