/* The writing flow stays separate from the landing page and optional app demos. */
.visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.hero { display:block; min-height:0; max-width:760px; padding:12px 0 40px; }
.hero h1 { font-size:clamp(38px,5vw,62px); }
.hero-demo { display:none; }
.hero-note { display:none; }
.hero-actions { margin-top:22px; }
.platform-status { display:flex; flex-wrap:wrap; gap:9px 18px; margin:0 0 20px; color:var(--muted); font-size:11px; line-height:1.7; }
.platform-status span { display:inline-flex; gap:6px; }
.platform-status b { font-weight:500; color:#b3d9bc; }
.platform-status .soon { color:#d8c5a5; }
.composer-heading { margin-top:20px; margin-bottom:22px; }
.composer-heading .eyebrow { display:none; }
.composer-heading h2 { font-size:30px; }
.composer-heading p { font-size:13px; max-width:380px; }
.tabbar { margin:0 0 20px; max-width:100%; background:none; border:0; padding:0; gap:4px; }
.tab-button { padding:9px 13px; font-weight:500; }
.tab-button.active { color:#f4ded2; background:#ffffff0d; box-shadow:inset 0 -2px #efa99d; border-radius:8px 8px 0 0; }
body.composing .hero, body.composing .landing-content,
body.reviewing .hero, body.reviewing .landing-content { display:none; }
body.composing .site-nav, body.reviewing .site-nav { display:none; }
body.composing header, body.reviewing header { margin-bottom:24px; }
.layout { grid-template-columns:minmax(0,1fr) minmax(0,.9fr); max-width:1000px; margin:0 auto; gap:28px; }
.editor { padding:24px; }
.editor .section-head { margin-bottom:18px; }
.editor .field { margin-bottom:14px; }
.editor textarea { min-height:125px; resize:vertical; font-size:16px; }
.editor input, .editor select { font-size:16px; padding:10px 12px; }
#message-count { display:block; color:var(--muted); text-align:right; font-size:11px; margin-top:5px; }
#message-error:empty { display:none; }
.design-picker { margin:16px 0; }
.design-note { font-size:11px; margin:8px 0; }
.theme-options { grid-template-columns:repeat(9,minmax(0,1fr)); gap:6px; }
.theme-option { position:relative; padding:3px; border-radius:50%; aspect-ratio:1; }
.theme-option > span:not(.theme-swatch) { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.theme-swatch { margin:0; height:100%; width:100%; border-radius:50%; min-height:26px; }
.theme-option[aria-pressed=true]::after { content:'✓'; position:absolute; inset:0; display:grid; place-items:center; color:white; text-shadow:0 1px 3px #000; font-size:13px; }
.decoration-options { margin:0; gap:7px; }
.decoration-option { display:flex; justify-content:center; align-items:center; gap:7px; padding:9px 5px; min-height:43px; font-size:10px; }
.decoration-mark { flex-shrink:0; margin:0; width:20px; height:23px; }
[data-decoration=Minimal] .decoration-mark { width:16px; margin:0; height:2px; }
.letter-style-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.letter-style-option { padding:9px 7px; min-height:43px; gap:2px; justify-content:center; font-size:11px; }
.letter-style-sample { display:none; }
.letter-style-check { width:12px; }
.occasion-extra { color:var(--muted); font-size:11px; margin:0 0 16px; }
.occasion-extra .field { margin-top:10px; }
.editor .actions { margin-top:20px; }
.editor .primary { min-height:46px; }
.draft-status, #app-availability { margin:9px 0 0; font-size:10px; line-height:1.5; }
.preview { padding:22px; min-height:0; }
.preview::before { display:none; }
.preview-top { min-height:20px; }
#preview-kind { font-size:9px; }
.preview-bottom { margin:14px 0 0; align-items:center; }
.preview-bottom .hint { font-size:11px; }
.device-simulation-note { text-align:left; font-size:11px; margin:5px 0 0; }
.stage { min-height:0; padding:22px 0; }
#opening-note { margin-bottom:0; }
.review-actions { display:flex; gap:10px; margin-top:22px; }
body.reviewing .editor { display:none; }
body.reviewing .layout { display:block; max-width:650px; }
body.reviewing #letter-preview { position:relative; top:auto; }
body.reviewing .composer-heading h2 { font-size:28px; }
body.reviewing .composer-heading p { display:none; }
.app-preview-options { border-top:1px solid #ffffff12; padding-top:14px; margin-top:5px; font-size:11px; color:var(--muted); }
.app-preview-options summary { cursor:pointer; }
.preview-devices { display:flex; gap:6px; margin-top:12px; }
.preview-devices button { padding:10px 12px; border:1px solid #ffffff20; border-radius:9px; background:none; color:var(--muted); font:inherit; }
.preview-devices button[aria-pressed=true] { color:var(--ink); border-color:var(--rose); }
body.receiving .app-preview-options, body.receiving .review-actions { display:none; }
.about-brief { margin:45px 0 20px; max-width:650px; }
.about-brief h2 { font:26px Georgia,serif; }.about-brief p { font-size:14px; color:var(--muted); line-height:1.7; }
.beta-band { padding:24px; }.beta-band h2 { font-size:28px; }
.steps-heading { margin-top:70px; }.steps { margin-top:20px; }
.occasion-card { min-height:170px; padding:22px; }.occasion-card blockquote { font-size:24px; }
.font-licenses { margin-bottom:20px; color:var(--muted); font-size:11px; line-height:1.8; }
body.receiving .font-licenses { display:none; }
body.composing .site-footer, body.reviewing .site-footer { margin-top:36px; padding-top:22px; }
body.composing .footer-main, body.reviewing .footer-main { display:none; }
/* Main preview: the same readable paper used by a browser recipient. */
#preview-device[data-kind=web] { width:min(100%,380px); aspect-ratio:auto; }
#preview-device[data-kind=web] .device-assembly,
#preview-device[data-kind=web] .device-right { position:relative; inset:auto; transform:none; }
#preview-device[data-kind=web] .device-right { border:0; border-radius:0; background:none; box-shadow:none; overflow:visible; }
#preview-device[data-kind=web] .device-right::before,
#preview-device[data-kind=web] .device-screen::before,
#preview-device[data-kind=web] .device-status,
#preview-device[data-kind=web] .device-appbar,
#preview-device[data-kind=web] .device-intro,
#preview-device[data-kind=web] .device-letter-label,
#preview-device[data-kind=web] .device-home,
#preview-device[data-kind=web] .device-instruction { display:none; }
#preview-device[data-kind=web] .device-screen { height:auto; padding:0; background:none; overflow:visible; }
#preview-device[data-kind=web] .card-wrap { margin:0; width:100%; height:clamp(340px,60svh,520px); aspect-ratio:auto; }
#preview-device[data-kind=web] .inside { overflow-y:auto; }
#preview-device[data-kind=web] .inside .mini { font-size:10px; }
#preview-device[data-kind=web] .cover-copy small, #preview-device[data-kind=web] .front-footnote { font-size:9px; }
#letter-preview[data-mode=web] { --letter-size:1.5rem; --letter-greeting:2rem; }
#letter-preview[data-mode=web][data-typography=calligraphy] { --letter-size:1.875rem; --letter-greeting:2.375rem; }
#letter-preview[data-mode=web][data-typography=handwritten] { --letter-size:1.5625rem; --letter-greeting:2rem; }
#letter-preview .device-left-paper { background:linear-gradient(140deg,var(--paper-start),var(--paper-end)); color:var(--letter-accent); }
#letter-preview .device-outer-letter { background:linear-gradient(145deg,var(--cover-start),var(--cover-end)); color:var(--cover-ink); }
#letter-preview .device-outer-letter strong { font-family:var(--letter-font); font-style:var(--letter-slant); font-synthesis:none; }
#letter-preview .device-outer-letter > span { color:var(--cover-foil); }
#letter-preview[data-decoration=Minimal] .device-outer-letter::before,
#letter-preview[data-decoration=Minimal] .device-outer-letter > span,
#letter-preview[data-decoration=Minimal] .device-left-paper > span { visibility:hidden; }
#letter-preview[data-decoration="Embossed sprig"] .device-outer-letter::before { display:none; }
#letter-preview[data-decoration="Embossed sprig"] .device-outer-letter > span,
#letter-preview[data-decoration="Embossed sprig"] .device-left-paper > span { mask:none; background:url('/assets/embossed-sprig.webp') center/contain no-repeat; height:28%; width:25%; }
#letter-preview[data-mode=folding] #letter-front { display:none; }
#letter-preview[data-mode=folding] .device-left-paper { user-select:none; }
/* Browser posture never opens the message; keep paper clear of a reported hinge. */
@media (horizontal-viewport-segments:2) {
  body.receiving .page { width:env(viewport-segment-width 1 0); margin-left:env(viewport-segment-left 1 0); padding-inline:18px; }
  body.receiving .layout { max-width:100%; }
}
@media(max-width:800px) {
  .layout { grid-template-columns:1fr; max-width:550px; }
  .layout > .editor { grid-row:1; }
  .layout > .preview { grid-row:2; }
  body:not(.reviewing):not(.receiving) .layout > .preview { display:none; }
  .hero { padding-top:0; padding-bottom:20px; }
  .hero h1 { font-size:42px; }
  .hero .lead { font-size:15px; }
  .hero-actions { gap:16px; }
  .composer-heading { margin-top:24px; margin-bottom:18px; }
  .composer-heading p { margin-top:8px; line-height:1.5; }
  .editor { padding:20px; }
  .preview { padding:20px 16px; }
  .site-footer { margin-top:45px; }
}
@media(max-width:360px) { .editor { padding:16px; }.letter-style-option { font-size:10px; }.decoration-option { font-size:9px; gap:3px; }.theme-options { gap:4px; }.theme-swatch { min-height:20px; } }

#letter-preview[data-mode=folding] .device-right .card-wrap,
#letter-preview[data-mode=folding] .device-left-paper { position:absolute; top:26%; height:68%; width:82%; aspect-ratio:auto; margin:0; }
#letter-preview[data-mode=folding] .device-right .card-wrap { left:0; }
#letter-preview[data-mode=folding] .device-left-paper { right:0; }

.email-option { font-size:12px; color:var(--muted); margin-top:22px; }
.email-option summary { cursor:pointer; }
.email-option input { margin-bottom:10px; }
.email-option label { margin-top:14px; }
.send-view .send-summary { margin:20px 0; }
.send-view #send-options > label { margin-top:12px; }
.send-view .lead { font-size:14px; }
@media(max-width:800px) {
  .preview-devices button { padding-inline:10px; }
}
/* The next step remains reachable while reviewing a tall letter or an app simulation. */
body.reviewing .review-actions { position:fixed; left:50%; right:auto; bottom:0; width:min(650px,100%); transform:translateX(-50%); margin:0; padding:12px max(16px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)); z-index:40; background:#171b25f5; border:1px solid #ffffff20; border-bottom:0; border-radius:14px 14px 0 0; backdrop-filter:blur(12px); }
body.reviewing .page { padding-bottom:105px; }
body.reviewing .review-actions .primary { min-height:46px; }
