/* Secret Inbox — one stylesheet. Colours, radii, shadows and timings are tokens; light and dark. */
@font-face { font-family: 'Fraunces'; src: url('/assets/fonts/fraunces.woff2') format('woff2'); font-weight: 500 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/assets/fonts/fraunces-italic.woff2') format('woff2'); font-weight: 500 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Plus Jakarta Sans'; src: url('/assets/fonts/jakarta.woff2') format('woff2'); font-weight: 400 800; font-style: normal; font-display: swap; }

:root {
  --bg: #fbf5ee; --bg-2: #f4e9de; --surface: #fffdfa; --surface-2: #fbf4ec; --raised: #ffffff;
  --ink: #261a2c; --ink-2: #57475e; --muted: #87768c; --line: #eadcd0; --line-2: #dfcdbf;
  --accent: #e8466f; --on-accent: #ffffff; --sun: #f5a24b; --mint: #139c84; --danger: #c43a45; --ok: #13865f;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, var(--surface));
  --accent-line: color-mix(in srgb, var(--accent) 35%, var(--line));
  --accent-ink: color-mix(in srgb, var(--accent) 78%, var(--ink));
  --shadow-1: 0 1px 2px rgb(38 26 44 / .06), 0 6px 18px -6px rgb(38 26 44 / .10);
  --shadow-2: 0 2px 6px rgb(38 26 44 / .05), 0 22px 48px -18px rgb(38 26 44 / .28);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
  --r-sm: 12px; --r: 18px; --r-lg: 28px; --r-pill: 999px;
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-ui: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'Noto Naskh Arabic', sans-serif;
  --dur: 220ms; --ease: cubic-bezier(.2, .8, .2, 1);
  --wrap: 1140px; --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #140e19; --bg-2: #1a121f; --surface: #1f1626; --surface-2: #261c2e; --raised: #2a1f33;
    --ink: #f7eef6; --ink-2: #d4c5d8; --muted: #a291a8; --line: #33273c; --line-2: #42344c;
    --accent-ink: color-mix(in srgb, var(--accent) 70%, #ffffff);
    --shadow-1: 0 1px 2px rgb(0 0 0 / .3), 0 8px 22px -8px rgb(0 0 0 / .5);
    --shadow-2: 0 2px 8px rgb(0 0 0 / .3), 0 26px 56px -18px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #140e19; --bg-2: #1a121f; --surface: #1f1626; --surface-2: #261c2e; --raised: #2a1f33;
  --ink: #f7eef6; --ink-2: #d4c5d8; --muted: #a291a8; --line: #33273c; --line-2: #42344c;
  --accent-ink: color-mix(in srgb, var(--accent) 70%, #ffffff);
  --shadow-1: 0 1px 2px rgb(0 0 0 / .3), 0 8px 22px -8px rgb(0 0 0 / .5);
  --shadow-2: 0 2px 8px rgb(0 0 0 / .3), 0 26px 56px -18px rgb(0 0 0 / .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--font-ui); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
main { flex: 1; }
img, canvas, svg { display: block; max-width: 100%; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 650; letter-spacing: -.015em; line-height: 1.12; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); }
h2 { font-size: clamp(1.45rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: var(--r-pill); }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small, small { font-size: .875rem; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 .6em; }
.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--ink-2); }
.fine { font-size: .82rem; color: var(--muted); margin: .9em 0 0; text-align: center; }
[hidden] { display: none !important; }

/* ----- Header & footer ----- */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 20px -16px rgb(0 0 0 / .4); }
.header-inner { display: flex; align-items: center; gap: 16px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.22rem; letter-spacing: -.01em; }
.mark { width: 34px; height: 34px; flex: none; }
.mark-tile { fill: var(--accent); }
.mark-env { fill: #fff; }
.mark-flap { fill: none; stroke: color-mix(in srgb, var(--accent) 40%, #fff); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mark-seal { fill: var(--accent); stroke: #fff; stroke-width: 1.4; }
.mark-hole { fill: #fff; }
.wordmark em { font-style: italic; color: var(--accent); font-weight: 650; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .93rem; padding: 8px 12px; border-radius: var(--r-pill); transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.site-nav a:hover { background: var(--surface-2); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }
.header-actions { display: flex; gap: 6px; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-pill); cursor: pointer; color: var(--ink); transition: transform var(--dur) var(--ease), background var(--dur) var(--ease); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg, .btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.i-moon { display: none; }
.is-dark .i-sun { display: none; }
.is-dark .i-moon { display: inline; }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .menu-btn { display: inline-grid; }
  .site-nav { position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; gap: 2px; padding: 10px var(--gutter) 16px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-2); opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
  .site-nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .site-nav a { padding: 12px 14px; font-size: 1rem; }
  .header-actions { margin-left: auto; }
}
.site-footer { margin-top: 64px; border-top: 1px solid var(--line); background: var(--bg-2); padding: 36px 0 28px; }
.footer-inner { display: grid; gap: 18px; grid-template-columns: 1.4fr 2fr; align-items: start; }
.footer-brand p { color: var(--muted); font-size: .9rem; margin: .6em 0 0; max-width: 34ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: flex-end; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .92rem; }
.footer-links a:hover { color: var(--accent-ink); }
.footer-bottom { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: var(--muted); font-size: .84rem; margin: 6px 0 0; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.footer-dev { margin-left: auto; text-align: right; }
.footer-dev strong { color: var(--ink); font-weight: 700; }
.footer-dev a { color: var(--accent-ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.footer-dev a:hover { text-decoration: underline; }
@media print { .footer-dev { display: none; } }
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; } .footer-links { justify-content: flex-start; } }

/* ----- Buttons & fields ----- */
.btn { --b: var(--surface); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: var(--r-pill); border: 1px solid transparent; background: var(--b); color: var(--ink); font-weight: 700; font-size: .96rem; text-decoration: none; cursor: pointer; transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), opacity var(--dur) var(--ease); -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.97); }
.btn:disabled, .btn[aria-busy="true"] { opacity: .6; cursor: progress; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 22px -10px color-mix(in srgb, var(--accent) 75%, transparent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-soft { background: var(--accent-soft); color: var(--accent-ink); }
.btn-soft:hover { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 85%, #000); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .88rem; }
.btn-sm svg { width: 17px; height: 17px; }
.btn-lg { min-height: 54px; padding: 14px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn .spinner { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.stack-actions { display: grid; gap: 10px; }

.field { margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { display: block; font-weight: 700; font-size: .9rem; margin: 0 0 8px; color: var(--ink); padding: 0; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { width: 100%; background: var(--surface); border: 1.5px solid var(--line-2); border-radius: var(--r-sm); padding: 12px 14px; min-height: 48px; font-size: 1rem; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: var(--muted); }
.hint { display: block; color: var(--muted); margin-top: 6px; }
.field-error { color: var(--danger); font-weight: 600; font-size: .9rem; min-height: 0; margin: 0 0 10px; }
.field-error:empty { display: none; }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.check { display: inline-flex; gap: 10px; align-items: center; font-weight: 600; font-size: .92rem; cursor: pointer; margin: 10px 0; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chips button { border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink-2); border-radius: var(--r-pill); padding: 8px 14px; font-weight: 600; font-size: .9rem; cursor: pointer; transition: all var(--dur) var(--ease); }
.chips button:hover { border-color: var(--accent-line); color: var(--ink); }
.chips button[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chips.small button { padding: 6px 12px; font-size: .84rem; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches button { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--surface); background: var(--c); box-shadow: 0 0 0 1.5px var(--line-2); cursor: pointer; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.swatches button:hover { transform: scale(1.08); }
.swatches button[aria-checked="true"] { box-shadow: 0 0 0 2.5px var(--c); transform: scale(1.08); }

.toggle { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.toggle input { position: absolute; opacity: 0; }
.toggle-ui { width: 46px; height: 28px; border-radius: 99px; background: var(--line-2); position: relative; transition: background var(--dur) var(--ease); margin-top: 2px; }
.toggle-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .3); transition: transform var(--dur) var(--ease); }
.toggle input:checked + .toggle-ui { background: var(--accent); }
.toggle input:checked + .toggle-ui::after { transform: translateX(18px); }
.toggle input:focus-visible + .toggle-ui { box-shadow: var(--ring); }
.toggle small { display: block; color: var(--muted); font-weight: 400; }

/* ----- Cards ----- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px, 3.5vw, 30px); box-shadow: var(--shadow-1); }
.card h2 { font-size: 1.3rem; }
.narrow-card { max-width: 520px; margin: 0 auto; }

/* ----- Hero ----- */
.hero { position: relative; padding: clamp(28px, 6vw, 72px) 0 clamp(40px, 6vw, 80px); overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 820px; max-height: 820px; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); pointer-events: none; }
.hero::after { content: ''; position: absolute; left: -15%; bottom: -30%; width: 55vw; height: 55vw; max-width: 640px; max-height: 640px; background: radial-gradient(closest-side, color-mix(in srgb, var(--sun) 16%, transparent), transparent 70%); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 em { font-style: italic; color: var(--accent); }
.create-card { margin-top: 26px; max-width: 520px; }
.have-link { margin-top: 14px; color: var(--ink-2); font-weight: 600; }
.hero-art { position: relative; height: 520px; }
.float-note { position: absolute; width: min(320px, 78%); background: var(--raised); border: 1px solid var(--line); border-radius: 22px; padding: 18px 20px 20px; box-shadow: var(--shadow-2); animation: drift 9s ease-in-out infinite; }
.float-note p { font-family: var(--font-display); font-size: 1.18rem; line-height: 1.35; margin: 0; }
.note-tag { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--on-accent); background: var(--accent); border-radius: var(--r-pill); padding: 4px 10px; margin-bottom: 10px; }
.note-reply { margin-top: 12px; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: .95rem; width: fit-content; }
.n1 { top: 4%; left: 2%; transform: rotate(-5deg); }
.n2 { top: 31%; right: 0; transform: rotate(3deg); animation-delay: -3s; }
.n3 { bottom: 6%; left: 10%; transform: rotate(-2deg); animation-delay: -6s; }
.n3 .note-tag { background: var(--sun); color: #3a2410; }
.n2 .note-tag { background: var(--mint); }
.hero-envelope { position: absolute; right: 8%; top: 2%; width: 92px; height: 92px; display: grid; place-items: center; background: var(--surface); border-radius: 26px; box-shadow: var(--shadow-2); transform: rotate(8deg); animation: drift 7s ease-in-out infinite reverse; }
.hero-envelope .mark { width: 56px; height: 56px; }
.art-caption { position: absolute; bottom: -6px; right: 4px; font-size: .75rem; color: var(--muted); margin: 0; }
@keyframes drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { height: 360px; order: -1; max-width: 520px; width: 100%; margin: 0 auto; }
  .create-card { max-width: none; }
  .float-note p { font-size: 1.02rem; }
}
@media (max-width: 520px) { .hero-art { height: 300px; } .hero-envelope { width: 70px; height: 70px; } .hero-envelope .mark { width: 42px; height: 42px; } .n2 .note-reply { display: none; } }

/* ----- Sections ----- */
.section { padding: clamp(40px, 7vw, 84px) 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 28px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-1); }
.feature p { color: var(--ink-2); margin: 0; }
.feature-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 14px; }
.feature-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }
.steps-section { background: var(--bg-2); }
.steps { list-style: none; padding: 0; margin: 28px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.steps li { background: var(--surface); border-radius: var(--r-lg); padding: 24px; border: 1px solid var(--line); }
.steps p { color: var(--ink-2); margin: 0; }
.step-n { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 800; margin-bottom: 12px; flex: none; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.table-wrap { overflow-x: auto; margin-top: 24px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.compare { width: 100%; border-collapse: collapse; font-size: .95rem; }
.compare th, .compare td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.compare thead th { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.compare thead th:last-child, .compare td:last-child { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.yes { color: var(--ok); font-weight: 800; }
.no { color: var(--muted); font-weight: 800; }
.faq { margin-top: 24px; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 0 20px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 1.4rem; line-height: 1; transition: transform var(--dur) var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary::-webkit-details-marker { display: none; }
.faq p { color: var(--ink-2); padding-bottom: 16px; margin: 0; }
.cta { text-align: center; }
.cta .wrap { background: var(--accent); color: var(--on-accent); border-radius: var(--r-lg); padding: clamp(32px, 6vw, 56px) var(--gutter); box-shadow: var(--shadow-2); }
.cta .lead { color: color-mix(in srgb, var(--on-accent) 85%, transparent); }
.cta .btn-primary { background: var(--surface); color: var(--accent-ink); box-shadow: none; }

/* ----- Prose pages ----- */
.prose h2 { margin-top: 1.6em; }
.prose li { margin-bottom: .45em; color: var(--ink-2); }
.prose li b { color: var(--ink); }
.prose section { scroll-margin-top: 84px; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 22px; margin: 22px 0; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; gap: 24px; }
@media (max-width: 560px) { .toc ol { columns: 1; } }
.note { background: var(--accent-soft); color: var(--accent-ink); padding: 12px 16px; border-radius: var(--r-sm); font-weight: 600; }
.legal li { margin-bottom: .8em; }

/* ----- App screens ----- */
.app-section { padding: clamp(18px, 4vw, 40px) 0 20px; }
.avatar { width: 54px; height: 54px; border-radius: 18px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; flex: none; box-shadow: 0 10px 22px -12px var(--accent); }
.send-card { max-width: 620px; margin: 0 auto; border-top: 6px solid var(--accent); }
.send-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.send-head h1 { font-size: clamp(1.6rem, 5vw, 2.2rem); margin: 0; overflow-wrap: anywhere; }
.send-head .eyebrow { margin: 0 0 2px; }
.prompt-bubble { font-family: var(--font-display); font-size: clamp(1.25rem, 3.6vw, 1.6rem); line-height: 1.3; background: var(--accent); color: var(--on-accent); padding: 18px 22px; border-radius: 22px 22px 22px 6px; margin: 0 0 18px; overflow-wrap: anywhere; }
#s-text { min-height: 150px; font-size: 1.08rem; border-radius: var(--r); }
.send-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 10px 0; }
.reactions { display: flex; flex-wrap: wrap; gap: 4px; }
.reactions button { width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid transparent; background: var(--surface-2); font-size: 1.25rem; cursor: pointer; transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.reactions button:hover { transform: translateY(-2px); }
.reactions button[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.08); }
.count { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.idea-btn { margin-bottom: 14px; }
.lockline { display: flex; gap: 8px; justify-content: center; align-items: flex-start; text-align: left; }
.lockline svg { width: 16px; height: 16px; flex: none; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; }
.done-card, .state-card { max-width: 560px; margin: 0 auto; text-align: center; }
.state-icon .mark { width: 64px; height: 64px; margin: 0 auto 14px; }
.answers { max-width: 620px; margin: 30px auto 0; }
.answers h2 { font-size: 1.3rem; }
.answer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.answer-list li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; }
.answer-list .q { font-family: var(--font-display); font-size: 1.12rem; margin: 0 0 10px; overflow-wrap: anywhere; white-space: pre-wrap; }
.answer-list .a { background: var(--accent-soft); color: var(--accent-ink); border-radius: 16px 16px 16px 4px; padding: 10px 14px; margin: 0; font-weight: 600; overflow-wrap: anywhere; white-space: pre-wrap; width: fit-content; max-width: 100%; }
.answer-list .when { color: var(--muted); font-size: .8rem; margin: 8px 0 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* Envelope animation after sending (transform/opacity only). */
.envelope-anim { position: relative; width: 132px; height: 96px; margin: 8px auto 22px; }
.env-back, .env-front, .env-flap, .env-letter { position: absolute; inset: 0; border-radius: 14px; }
.env-back { background: color-mix(in srgb, var(--accent) 75%, #000); }
.env-letter { inset: 10px 14px 18px; background: var(--raised); border-radius: 8px; box-shadow: var(--shadow-1); animation: letter-in .7s var(--ease) both; }
.env-front { background: var(--accent); clip-path: polygon(0 35%, 50% 72%, 100% 35%, 100% 100%, 0 100%); }
.env-flap { background: color-mix(in srgb, var(--accent) 88%, #fff); clip-path: polygon(0 0, 100% 0, 50% 62%); transform-origin: top; animation: flap-close .45s .55s var(--ease) both; }
@keyframes letter-in { from { transform: translateY(-46px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes flap-close { from { transform: scaleY(-1); } to { transform: scaleY(1); } }
.done-card h2 { font-size: 2rem; }

/* Inbox */
.inbox-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.who { display: flex; gap: 14px; align-items: center; min-width: 0; }
.who h1 { font-size: clamp(1.5rem, 4vw, 2rem); margin: 0; overflow-wrap: anywhere; }
.who .eyebrow { margin: 0 0 2px; }
.status-paused { color: var(--danger); }
.link-pill { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 5px 5px 5px 16px; max-width: 100%; min-width: 0; }
.link-text { font-weight: 600; font-size: .92rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.switcher select { min-height: 40px; padding: 6px 12px; border-radius: var(--r-pill); width: auto; }
.welcome { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 20px; border: 1.5px dashed var(--accent-line); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.welcome-step { display: flex; gap: 14px; }
.welcome-step h2 { font-size: 1.15rem; margin-bottom: .3em; }
.welcome-step p { color: var(--ink-2); font-size: .94rem; }
.welcome-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; }
@media (max-width: 760px) { .welcome { grid-template-columns: 1fr; } }
.key-box { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 1.02rem; font-weight: 700; letter-spacing: .04em; background: var(--surface); border: 1.5px dashed var(--line-2); border-radius: var(--r-sm); padding: 12px 14px; overflow-wrap: anywhere; user-select: all; margin: 0 0 12px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; border: 0; background: none; padding: 12px 14px; font-weight: 700; color: var(--muted); border-bottom: 2.5px solid transparent; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; margin-bottom: -1px; transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--accent); }
.badge { background: var(--accent); color: var(--on-accent); font-size: .75rem; min-width: 22px; height: 22px; border-radius: 11px; display: inline-grid; place-items: center; padding: 0 6px; }
.panel-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-bar .chips { margin: 0; }
.sync { color: var(--muted); font-size: .82rem; }
.msg-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.msg-card { position: relative; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-lg); padding: 18px 18px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 10px; min-height: 150px; box-shadow: var(--shadow-1); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.msg-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.msg-card .m-prompt { font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--accent-ink); }
.msg-card .m-text { font-family: var(--font-display); font-size: 1.12rem; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.msg-card .m-meta { margin-top: auto; display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .8rem; }
.msg-card .m-react { position: absolute; top: 12px; right: 14px; font-size: 1.3rem; }
.m-flag { font-weight: 700; color: var(--accent-ink); }
/* Unread: a sealed envelope. */
.msg-card.sealed { background: var(--accent); border-color: transparent; color: var(--on-accent); overflow: hidden; }
.msg-card.sealed::before { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, transparent 49.5%, color-mix(in srgb, #000 10%, transparent) 50%, transparent 72%), linear-gradient(200deg, transparent 49.5%, color-mix(in srgb, #fff 12%, transparent) 50%, transparent 72%); pointer-events: none; }
.msg-card.sealed .m-text, .msg-card.sealed .m-prompt { visibility: hidden; }
.msg-card.sealed .m-meta { color: color-mix(in srgb, var(--on-accent) 80%, transparent); }
.msg-card.sealed .seal { position: absolute; inset: 0; display: grid; place-items: center; }
.seal-inner { width: 58px; height: 58px; border-radius: 50%; background: var(--on-accent); color: var(--accent); display: grid; place-items: center; font-size: 1.6rem; box-shadow: 0 6px 18px rgb(0 0 0 / .2); transition: transform var(--dur) var(--ease); }
.msg-card.sealed:hover .seal-inner { transform: scale(1.08) rotate(-6deg); }
.msg-card .seal { display: none; }
.msg-card.sealed .seal { display: grid; }
.msg-card.is-answer { border-style: dashed; border-color: var(--accent-line); }
.empty { text-align: center; padding: 40px 20px; }
.empty-art .mark { width: 64px; height: 64px; margin: 0 auto 14px; opacity: .9; }
.empty p { color: var(--ink-2); max-width: 44ch; margin-left: auto; margin-right: auto; }

.share-grid, .settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 860px) { .share-grid, .settings-grid { grid-template-columns: 1fr; } }
.link-box { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line-2); border-radius: var(--r); padding: 6px 6px 6px 14px; margin-bottom: 18px; background: var(--surface-2); }
.share-texts { display: grid; gap: 8px; }
.share-texts button { text-align: left; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 12px; background: var(--surface); cursor: pointer; font-size: .92rem; transition: border-color var(--dur) var(--ease); }
.share-texts button[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.share-buttons { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 16px; }
.share-buttons .btn { min-height: 46px; }
.share-buttons .btn i { width: 10px; height: 10px; border-radius: 50%; background: var(--dot); }
.card-preview { background: var(--bg-2); border-radius: var(--r); padding: 14px; margin-bottom: 14px; display: grid; place-items: center; }
.card-preview canvas { width: min(100%, 260px); height: auto; aspect-ratio: 9 / 16; border-radius: 14px; box-shadow: var(--shadow-2); }
.danger-card .btn { margin: 0 8px 8px 0; }

/* Sent */
.page-head { margin-bottom: 18px; }
.sent-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.sent-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; border-left: 6px solid var(--accent); box-shadow: var(--shadow-1); }
.sent-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 10px; }
.sent-top b { font-family: var(--font-display); font-size: 1.15rem; overflow-wrap: anywhere; }
.sent-top span { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.status-chip { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); }
.status-chip.new { background: var(--accent); color: var(--on-accent); }

/* Threads & bubbles */
.bubble { padding: 12px 16px; border-radius: 18px; overflow-wrap: anywhere; white-space: pre-wrap; max-width: 88%; width: fit-content; line-height: 1.45; }
.bubble.them { background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px 18px 18px 6px; font-family: var(--font-display); font-size: 1.2rem; }
.bubble.me { background: var(--accent); color: var(--on-accent); border-radius: 18px 18px 6px 18px; margin-left: auto; }
.thread { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 10px; }
.thread li { display: grid; gap: 3px; }
.thread .t-when { font-size: .74rem; color: var(--muted); }
.thread li.me .t-when { text-align: right; }
.composer { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 10px; }
.composer textarea { min-height: 70px; }
.ms-prompt { font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 10px; }
.ms-meta { color: var(--muted); font-size: .8rem; margin: 8px 0 0; }
.ms-danger { display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }

/* ----- Sheets (dialogs): bottom sheet on phones, centred card on wide screens ----- */
dialog.sheet { border: 0; padding: 0; background: var(--surface); color: var(--ink); width: min(560px, 100%); max-height: min(92vh, 900px); border-radius: var(--r-lg); box-shadow: var(--shadow-2); overflow: auto; overscroll-behavior: contain; }
dialog.sheet::backdrop { background: rgb(20 12 24 / .55); backdrop-filter: blur(4px); }
dialog.sheet[open] { animation: sheet-in var(--dur) var(--ease); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  dialog.sheet { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 94vh; padding-bottom: env(safe-area-inset-bottom); }
  @keyframes sheet-in { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
}
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 20px 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-size: 1.2rem; }
.sheet-body { padding: 18px 20px 22px; }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.sheet-actions.stack { flex-direction: column; }
.age-gate .sheet-body { text-align: center; padding: 28px 24px; }
.age-badge { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 22px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; box-shadow: 0 12px 26px -14px var(--accent); }
.age-under { color: var(--danger); font-weight: 600; margin-top: 12px; }
#image-sheet img { width: min(100%, 280px); margin: 0 auto 14px; border-radius: 14px; box-shadow: var(--shadow-2); }

/* ----- Toast, skeletons ----- */
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: var(--r-pill); font-weight: 600; font-size: .92rem; box-shadow: var(--shadow-2); max-width: calc(100vw - 32px); animation: toast-in var(--dur) var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.skeleton-card { display: grid; gap: 14px; max-width: 620px; margin: 0 auto; }
.sk { display: block; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; border-radius: 10px; animation: shimmer 1.3s linear infinite; }
.sk-circle { width: 54px; height: 54px; border-radius: 18px; }
.sk-line { height: 18px; }
.sk-box { height: 120px; border-radius: var(--r); }
.w60 { width: 60%; } .w40 { width: 40%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.form-done { color: var(--ok); font-weight: 700; margin-top: 12px; }
.or { text-align: center; color: var(--muted); margin: 14px 0; }
.turnstile:empty { display: none; }
.turnstile { margin: 0 0 12px; min-height: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print { .site-header, .site-footer, .hero-art, .cta { display: none; } }

/* Guides */
.guide-card { text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.guide-card .more { margin-top: 14px; font-weight: 700; color: var(--accent-ink); }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--ink-2); }
.idea-list { columns: 2; gap: 28px; }
.idea-list li { break-inside: avoid; }
@media (max-width: 560px) { .idea-list { columns: 1; } }
.cta-inline { text-align: center; margin: 36px 0; border-top: 6px solid var(--accent); }
.more-guides { border-top: 1px solid var(--line); margin-top: 36px; padding-top: 22px; }
.more-guides h2 { font-size: 1.2rem; margin-top: 0; }
.more-guides ul { padding-left: 20px; }

/* Notifications: the bell bar and the "new" dots in the menu */
.bell-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin: 0 0 16px; text-align: left; }
.bell-bar[hidden] { display: none; }
.bell-icon { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.bell-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bell-bar.is-on .bell-icon { background: var(--accent); color: var(--on-accent); }
.bell-body { flex: 1 1 200px; min-width: 0; }
.bell-body p { margin: 0; font-size: .92rem; font-weight: 600; color: var(--ink-2); }
.bell-body .field-error:empty { display: none; }
.done-card .bell-bar { margin: 16px 0 4px; }
.nav-dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: .7rem; font-weight: 800; line-height: 1; vertical-align: 1px; }
.menu-btn { position: relative; }
.menu-btn.has-dot::after { content: ''; position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }
.notify-sheet .age-badge svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
