/* Dearly — Prisma-inspired dark editorial */
:root {
  --ink: #1A1A1A;
  --cream: #F5F1E8;
  --cream-2: #E1E0CC;
  --cream-70: rgba(225, 224, 204, 0.72);
  --cream-40: rgba(225, 224, 204, 0.4);
  --postmark: #C8433E;
  --slate: #6B6B6B;
  --bg: #000000;
  --surface-1: #0d0d0d;
  --surface-2: #141414;
  --surface-3: #1e1e1e;
  --hairline: rgba(225, 224, 204, 0.10);
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--cream-2);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
}

#root { min-height: 100vh; }

.font-serif { font-family: 'Fraunces', Georgia, serif; }
.font-sans  { font-family: 'Inter', -apple-system, sans-serif; }

button { font-family: inherit; border: 0; background: none; padding: 0; cursor: pointer; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--postmark); color: var(--cream); }

/* ---------- Noise textures ---------- */
.noise-hero {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.7'/></svg>");
  mix-blend-mode: overlay;
  opacity: 0.7;
}
.noise-bg {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.55'/></svg>");
  opacity: 0.15;
}

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 900ms cubic-bezier(0.16, 1, 0.3, 1), transform 900ms cubic-bezier(0.16, 1, 0.3, 1); transition-delay: var(--rev-delay, 0ms); will-change: opacity, transform; }
.reveal.is-in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { transition: none; opacity: 1; transform: none; } }

/* ---------- Word pull-up ---------- */
.words { display: inline; }
.words .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.words .w > span { display: inline-block; transform: translateY(105%); transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1); transition-delay: var(--w-delay, 0ms); }
.words.is-in .w > span { transform: translateY(0); }

/* ---------- HERO ---------- */
.page-pad { padding: 14px; }
@media (min-width: 768px) { .page-pad { padding: 20px; } }

.hero {
  position: relative;
  width: 100%;
  height: calc(100vh - 28px);
  min-height: 640px;
  border-radius: 22px;
  overflow: hidden;
  background: #0a0806;
  isolation: isolate;
}
@media (min-width: 768px) { .hero { border-radius: 32px; height: calc(100vh - 40px); } }

.hero video, .hero .poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* Tonal fallback — renders underneath the video; visible when video fails */
.hero-fallback {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(120% 90% at 30% 110%, rgba(200, 67, 62, 0.55) 0%, rgba(200, 67, 62, 0) 55%),
    radial-gradient(90% 70% at 85% 20%, rgba(209, 92, 58, 0.45) 0%, rgba(209, 92, 58, 0) 55%),
    radial-gradient(60% 50% at 20% 30%, rgba(245, 241, 232, 0.08) 0%, transparent 60%),
    linear-gradient(180deg, #1a0f0d 0%, #0a0707 70%, #050303 100%);
  animation: hero-drift 26s ease-in-out infinite alternate;
}
@keyframes hero-drift {
  0%   { transform: scale(1.05) translate(0, 0); filter: saturate(1); }
  100% { transform: scale(1.12) translate(-2%, -1%); filter: saturate(1.15); }
}
@media (prefers-reduced-motion: reduce) { .hero-fallback { animation: none; } }
.hero .noise-layer {
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
}
.hero .gradient-layer {
  position: absolute; inset: 0; z-index: 3;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, transparent 30%, transparent 50%, rgba(0,0,0,0.6) 100%);
  pointer-events: none;
}

/* Pill nav — hangs from top center */
.hero-nav {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  background: #000;
  color: var(--cream-2);
  border-bottom-left-radius: 22px;
  border-bottom-right-radius: 22px;
  padding: 14px 26px;
  display: flex;
  align-items: center;
  gap: 32px;
  z-index: 6;
  font-size: 13px;
  letter-spacing: 0.005em;
}
@media (min-width: 768px) { .hero-nav { gap: 56px; padding: 16px 40px; } }
.hero-nav a {
  color: var(--cream-70);
  transition: color 180ms;
  white-space: nowrap;
}
.hero-nav a:hover { color: var(--cream-2); }
.hero-nav .wordmark {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 20px;
  color: var(--cream-2);
  letter-spacing: -0.015em;
}

/* Content sits bottom-left with a right column */
.hero-inner {
  position: relative;
  z-index: 4;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 40px 28px 32px;
}
@media (min-width: 900px) { .hero-inner { padding: 56px 56px 48px; } }

.hero-bottom {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: end;
}
@media (min-width: 900px) {
  .hero-bottom {
    grid-template-columns: 1fr 340px;
    gap: 56px;
  }
}

.hero-word {
  position: relative;
  font-family: 'Fraunces', serif;
  font-weight: 400;
  color: var(--cream-2);
  font-size: clamp(84px, 20vw, 280px);
  line-height: 0.84;
  letter-spacing: -0.055em;
  margin: 0;
  display: inline-block;
}
.hero-word .ast {
  position: absolute;
  top: 0.18em;
  right: -0.22em;
  font-size: 0.28em;
  letter-spacing: 0;
  font-weight: 400;
}

.hero-desc {
  color: var(--cream-70);
  font-size: clamp(13px, 1.1vw, 15px);
  line-height: 1.35;
  max-width: 320px;
  font-family: 'Inter', sans-serif;
}
@media (min-width: 900px) { .hero-desc { text-align: left; } }

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 22px;
  background: var(--cream-2);
  color: #000;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 14px;
  transition: gap 300ms cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 16px;
}
.hero-cta:hover { gap: 14px; }
.hero-cta .bubble {
  width: 34px; height: 34px;
  border-radius: 999px;
  background: #000;
  color: var(--cream-2);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 300ms;
}
.hero-cta:hover .bubble { transform: scale(1.08); }

/* ---------- Sections (dark) ---------- */
.section-dark {
  background: var(--bg);
  padding: 140px 28px;
  position: relative;
}
@media (min-width: 768px) { .section-dark { padding: 180px 56px; } }

.col-narrow { max-width: 780px; margin: 0 auto; }
.col-mid    { max-width: 960px; margin: 0 auto; }
.col-wide   { max-width: 1200px; margin: 0 auto; }

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--postmark);
  margin-bottom: 36px;
  display: block;
}

/* ---------- About / multi-style headline ---------- */
.about-card {
  background: var(--surface-1);
  border-radius: 20px;
  padding: 72px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
@media (min-width: 768px) { .about-card { padding: 110px 56px; border-radius: 24px; } }

.big-serif {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  color: var(--cream-2);
  font-size: clamp(28px, 5vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.018em;
  max-width: 18ch;
  margin: 0 auto;
}
.big-serif .italic {
  font-style: italic;
  font-weight: 400;
}
.big-serif .soft { color: var(--slate); }

.about-body {
  margin: 48px auto 0;
  max-width: 640px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--cream-2);
}
.about-body .char { transition: opacity 200ms linear; }

/* ---------- Problem (text-heavy) ---------- */
.editorial {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  color: var(--cream-2);
  font-size: clamp(22px, 2.6vw, 36px);
  line-height: 1.25;
  letter-spacing: -0.012em;
}
.editorial p { margin: 0 0 1.2em; text-wrap: pretty; }
.editorial p:last-child { margin-bottom: 0; }
.editorial p.quiet { color: var(--slate); }

/* ---------- How it works ---------- */
.steps { display: flex; flex-direction: column; gap: 72px; }
@media (min-width: 768px) { .steps { gap: 96px; } }
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: start;
}
@media (min-width: 768px) { .step { gap: 48px; } }
.step-num {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(68px, 9vw, 130px);
  line-height: 0.85;
  color: var(--cream-2);
  letter-spacing: -0.04em;
}
.step-num .dot { color: var(--postmark); }
.step-body { padding-top: 10px; max-width: 520px; }
.step-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.18;
  color: var(--cream-2);
  margin: 0 0 14px;
  letter-spacing: -0.012em;
}
.step-text {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--cream-70);
  margin: 0;
}

/* ---------- Features: typographic list (NOT card grid) ---------- */
.feat-list { border-top: 1px solid var(--hairline); }
.feat-row {
  border-bottom: 1px solid var(--hairline);
  padding: 32px 4px;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  align-items: baseline;
  font-family: 'Fraunces', serif;
  font-size: clamp(20px, 2.3vw, 28px);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--cream-2);
  transition: background 240ms, padding-left 240ms;
}
.feat-row:hover { background: rgba(225,224,204,0.02); padding-left: 14px; }
.feat-row .num {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--slate);
}

/* ---------- Founder note ---------- */
.essay {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--cream-2);
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.38;
}
.essay p { margin: 0 0 1.05em; text-wrap: pretty; }
.essay p:last-child { margin-bottom: 0; }

.sig {
  margin-top: 36px;
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 16px;
  color: var(--slate);
}

/* ---------- Closing CTA ---------- */
.closing-card {
  background: var(--surface-1);
  border-radius: 24px;
  padding: 96px 32px;
  text-align: center;
}
@media (min-width: 768px) { .closing-card { padding: 140px 56px; } }
.closing-lines {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(26px, 4vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.018em;
}
.closing-lines .soft { color: var(--slate); }
.closing-lines .loud { color: var(--cream-2); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--hairline);
  padding: 32px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--slate);
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.02em;
}
@media (min-width: 768px) { .footer { padding: 32px 56px; } }
.footer .wordmark {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 16px;
  color: var(--slate);
  letter-spacing: -0.01em;
}

/* ===================== APP (dark phone) ===================== */
.app-backdrop {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  justify-content: center;
  padding: 0;
  position: relative;
}
@media (min-width: 520px) {
  .app-backdrop { padding: 24px 0; background: radial-gradient(100% 70% at 50% 0%, #1a1a1a 0%, #050505 100%); }
}

.device {
  width: min(100%, 400px);
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
@media (min-width: 520px) {
  .device {
    min-height: auto;
    height: calc(100vh - 48px);
    max-height: 880px;
    border-radius: 28px;
    box-shadow: 0 60px 120px -40px rgba(0,0,0,0.8), 0 0 0 1px rgba(225,224,204,0.06);
  }
}

.screen { animation: screen-in 500ms cubic-bezier(0.16, 1, 0.3, 1) both; flex: 1; display: flex; flex-direction: column; overflow: hidden; }
@keyframes screen-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Top bar */
.app-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 22px 18px;
  gap: 12px;
  flex-shrink: 0;
}
.app-top .back {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  transition: background 180ms;
  color: var(--cream-2);
  margin-left: -6px;
}
.app-top .back:hover { background: rgba(225,224,204,0.06); }
.app-top .title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.012em;
  color: var(--cream-2);
  line-height: 1.15;
}
.app-top .sub {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--slate);
  margin-top: 3px;
  letter-spacing: 0.005em;
}
.app-top .cta {
  color: var(--postmark);
  font-size: 13px;
  font-weight: 500;
}

/* Thread / Today */
.thread {
  flex: 1;
  overflow-y: auto;
  padding: 12px 22px 180px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.bubble {
  align-self: flex-end;
  max-width: 80%;
  background: var(--postmark);
  color: var(--cream-2);
  padding: 13px 17px;
  border-radius: 20px 20px 4px 20px;
  font-size: 15px;
  line-height: 1.4;
  font-family: 'Inter', sans-serif;
  animation: bubble-in 440ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes bubble-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.bubble-stamp {
  align-self: flex-end;
  font-size: 11px;
  color: var(--slate);
  margin-top: -14px;
  padding-right: 4px;
  letter-spacing: 0.02em;
}

.compose {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, #000 35%);
  padding: 40px 16px 20px;
}
.compose-box {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--surface-2);
  border-radius: 20px;
  padding: 8px 8px 8px 16px;
  border: 1px solid var(--hairline);
}
.compose textarea {
  flex: 1;
  resize: none;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 15px;
  line-height: 1.4;
  padding: 10px 0;
  min-height: 22px;
  max-height: 120px;
  font-family: 'Inter', sans-serif;
  color: var(--cream-2);
}
.compose textarea::placeholder { color: var(--slate); }
.send-btn {
  background: var(--postmark);
  color: var(--cream-2);
  width: 38px; height: 38px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 200ms, opacity 200ms;
  flex-shrink: 0;
}
.send-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.send-btn:not(:disabled):hover { transform: scale(1.06); }
.compose .hint {
  text-align: center;
  font-size: 11px;
  color: var(--slate);
  margin-top: 12px;
  letter-spacing: 0.02em;
}

/* Contacts */
.contacts-list, .history, .settings { padding: 0 22px 140px; overflow-y: auto; flex: 1; }
.contacts-list::-webkit-scrollbar, .history::-webkit-scrollbar, .settings::-webkit-scrollbar, .thread::-webkit-scrollbar { width: 0; }

.contact-row {
  padding: 20px 0;
  border-bottom: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.contact-row:last-child { border-bottom: 0; }
.contact-row .name {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--cream-2);
  letter-spacing: -0.01em;
}
.contact-row .meta {
  font-size: 12px;
  color: var(--slate);
  margin-top: 4px;
  letter-spacing: 0.005em;
}
.contact-row .edit {
  color: var(--slate);
  font-size: 13px;
  transition: color 180ms;
}
.contact-row .edit:hover { color: var(--cream-2); }
.empty-hint {
  margin-top: 28px;
  font-size: 12px;
  color: var(--slate);
  line-height: 1.5;
  padding: 0 2px;
  font-style: italic;
  font-family: 'Fraunces', serif;
}

/* History */
.date-group { margin-top: 40px; }
.date-group:first-child { margin-top: 0; }
.date-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--postmark);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.date-label .today-tag { color: var(--slate); font-weight: 400; margin-left: 8px; }
.history-entry {
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
}
.history-entry:last-child { border-bottom: 0; }
.history-entry .who {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  color: var(--cream-2);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.history-entry .msg {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--cream-70);
  line-height: 1.5;
}
.history-entry .time {
  font-size: 11px;
  color: var(--slate);
  white-space: nowrap;
  padding-top: 4px;
  letter-spacing: 0.02em;
}

/* Onboarding */
.onboard-wrap { padding: 56px 26px 120px; max-width: 560px; margin: 0 auto; flex: 1; overflow-y: auto; }
.onboard-welcome {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  color: var(--cream-2);
  font-size: clamp(30px, 6.5vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
}
.onboard-welcome .l2 { display: block; color: var(--slate); margin-top: 12px; font-size: 0.82em; }
.form { display: flex; flex-direction: column; gap: 24px; margin-bottom: 36px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 12px;
}
.form-row input, .form-row select {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  padding: 14px 2px;
  font-size: 15px;
  color: var(--cream-2);
  outline: none;
  width: 100%;
  border-radius: 0;
  transition: border-color 200ms;
  font-family: 'Inter', sans-serif;
  -webkit-appearance: none;
  appearance: none;
}
.form-row input:focus, .form-row select:focus { border-bottom-color: var(--cream-2); }
.form-row input::placeholder { color: var(--slate); font-style: italic; }
.form-row select { color: var(--slate); cursor: pointer; }
.form-row select.chosen { color: var(--cream-2); }
.chev { position: relative; }
.chev::after {
  content: ''; position: absolute; right: 8px; top: 50%;
  width: 7px; height: 7px;
  border-right: 1px solid var(--slate); border-bottom: 1px solid var(--slate);
  transform: translateY(-80%) rotate(45deg);
  pointer-events: none;
}
.start-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}
.btn-cream {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 24px;
  background: var(--cream-2);
  color: #000;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 14px;
  transition: gap 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-cream:hover { gap: 14px; }
.btn-cream .bubble {
  width: 34px; height: 34px;
  border-radius: 999px;
  background: #000;
  color: var(--cream-2);
  display: inline-flex; align-items: center; justify-content: center;
}
.later { font-size: 12px; color: var(--slate); }

/* Settings */
.setting-row {
  padding: 24px 0;
  border-bottom: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}
.setting-row:last-child { border-bottom: 0; }
.setting-row .s-label {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  font-weight: 400;
  color: var(--cream-2);
  letter-spacing: -0.01em;
  margin-bottom: 5px;
}
.setting-row .s-desc {
  font-size: 12px;
  color: var(--slate);
  line-height: 1.5;
  max-width: 36ch;
}
.setting-row select {
  background: transparent;
  border: 1px solid var(--hairline);
  padding: 8px 32px 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--cream-2);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.setting-row .link-slate {
  color: var(--slate);
  font-size: 13px;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 2px;
  transition: color 180ms, border-color 180ms;
}
.setting-row .link-slate:hover { color: var(--cream-2); border-color: var(--cream-2); }
.setting-row .link-postmark {
  color: var(--postmark);
  font-size: 13px;
  border-bottom: 1px solid rgba(200, 67, 62, 0.3);
  padding-bottom: 2px;
}
.settings-footer {
  padding: 40px 22px 48px;
  font-size: 11px;
  color: var(--slate);
  letter-spacing: 0.06em;
  font-family: 'Inter', sans-serif;
}

.toggle {
  width: 44px; height: 26px;
  border-radius: 999px;
  background: rgba(225,224,204,0.12);
  position: relative;
  transition: background 220ms;
  flex-shrink: 0;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 999px;
  background: var(--cream-2);
  transition: left 240ms cubic-bezier(0.16, 1, 0.3, 1);
}
.toggle.on { background: var(--postmark); }
.toggle.on::after { left: 21px; }

/* Bottom tabbar */
.tabbar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  background: #000;
  color: var(--cream-2);
  border-radius: 999px;
  padding: 6px 8px;
  display: flex;
  gap: 2px;
  z-index: 30;
  border: 1px solid rgba(225,224,204,0.08);
  box-shadow: 0 12px 30px -8px rgba(0,0,0,0.6);
}
.tabbar button {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.015em;
  color: var(--cream-70);
  transition: color 180ms, background 180ms;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}
.tabbar button:hover { color: var(--cream-2); }
.tabbar button.active {
  background: var(--cream-2);
  color: #000;
}

/* Mode switch */
.mode-switch {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 40;
  background: rgba(225,224,204,0.12);
  color: var(--cream-2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.01em;
  font-family: 'Inter', sans-serif;
  border: 1px solid rgba(225,224,204,0.1);
}
.mode-switch:hover { background: rgba(225,224,204,0.18); }

/* Selection */
textarea::selection { background: rgba(200, 67, 62, 0.3); color: var(--cream-2); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
