/* Email Writer demo — shadcn/ui-style, light + dark, mobile-first. */
:root{--bg:#fafafa;--fg:#0a0a0a;--card:#fff;--muted:#f5f5f5;--mfg:#6b7280;--border:#e5e7eb;--primary:#0a0a0a;--pfg:#fafafa}
@media(prefers-color-scheme:dark){:root{--bg:#0a0a0a;--fg:#e5e7eb;--card:#131316;--muted:#16181c;--mfg:#9ca3af;--border:#262626;--primary:#e5e7eb;--pfg:#0a0a0a}}
*{box-sizing:border-box}
body{margin:0;font-family:-apple-system,"Segoe UI",Inter,system-ui,sans-serif;background:var(--bg);color:var(--fg)}
.hidden{display:none !important}[hidden]{display:none !important}

.topbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem 1.1rem;border-bottom:1px solid var(--border);position:sticky;top:0;background:var(--bg)}
.brand{font-weight:600}.brand small{color:var(--mfg);font-weight:400;margin-left:.35rem}
.profile{display:flex;align-items:center;gap:.6rem}
.avatar{width:34px;height:34px;border-radius:50%;object-fit:cover}
.avatar.initial{display:grid;place-items:center;background:var(--primary);color:var(--pfg);font-weight:600}
.who{display:flex;flex-direction:column;line-height:1.15}.who small{color:var(--mfg);font-size:.75rem}
.btn{min-height:38px;padding:0 .9rem;font:inherit;border-radius:.5rem;cursor:pointer;border:1px solid var(--border);background:var(--card);color:var(--fg)}
.btn.ghost{background:transparent;border-color:transparent;color:var(--mfg)}
.btn.primary{background:var(--primary);color:var(--pfg);border-color:transparent;font-weight:600}
.mt{margin-top:1rem}

.wrap{max-width:40rem;margin:0 auto;padding:1.5rem 1.1rem 3rem}
.card{background:var(--card);border:1px solid var(--border);border-radius:.8rem;padding:1.25rem}
.card+.card{margin-top:1rem}
.card h2{margin:0 0 .2rem;font-size:1.05rem}.card .sub{margin:0 0 .8rem;color:var(--mfg);font-size:.88rem}
label{display:block;font-size:.82rem;font-weight:500;margin:.8rem 0 .3rem}
input,select{width:100%;font:inherit;color:inherit;background:var(--bg);border:1px solid var(--border);border-radius:.5rem;padding:.55rem .7rem}
input:focus,select:focus{outline:none;border-color:#9ca3af;box-shadow:0 0 0 3px rgba(120,120,120,.22)}
.out-head{display:flex;align-items:center;justify-content:space-between}
.field{margin-top:.4rem}.lbl{font-size:.72rem;text-transform:uppercase;letter-spacing:.05em;color:var(--mfg)}
.subject{font-weight:600;margin-top:.15rem}
.body{white-space:pre-wrap;font-family:inherit;font-size:.92rem;background:var(--muted);border-radius:.6rem;padding:.9rem;margin:.7rem 0 0;line-height:1.55}
