:root {
  --ink: #1C2321; --page: #F5F0E8; --page-2: #EDE6DA; --cream: #FBF8F2;
  --mute: #5A5E58; --accent: #A8431A; --accent-dark: #7E3112; --accent-l: #F3E1D6;
  --ok: #2F6B4F; --hair: rgba(28, 35, 33, .13); --hair-2: rgba(28, 35, 33, .22);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --display: 'Fraunces', Georgia, serif;
  --text: 'Manrope', 'Helvetica Neue', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--text); font-size: 16px; -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.wrap { max-width: 560px; margin: 0 auto; padding: calc(28px + env(safe-area-inset-top)) 20px calc(96px + env(safe-area-inset-bottom)); }
.top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 26px; gap: 12px; }
.brand { font-family: var(--display); font-weight: 600; font-size: 20px; }
.biz { font-size: 13px; color: var(--mute); text-align: right; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--mute); text-transform: uppercase; display: block; margin-bottom: 8px; }
.eyebrow.hot { color: var(--accent); }
h1 { font-family: var(--display); font-weight: 400; font-size: 36px; line-height: 1.06; letter-spacing: -.02em; margin: 0 0 10px; }
h2 { font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: -.01em; margin: 0 0 8px; }
.lede { font-size: 16px; line-height: 1.6; margin: 0; }
.mute { color: var(--mute); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 13px; }
section { margin-top: 30px; }
.list { border-top: 1px solid var(--hair); }
.row { border-bottom: 1px solid var(--hair); padding: 14px 0; display: flex; flex-direction: column; gap: 8px; }
.row p { margin: 0; line-height: 1.5; }
.row-link { display: block; text-decoration: none; color: inherit; border-bottom: 1px solid var(--hair); padding: 14px 0; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; }
.timegrid { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mute); margin-right: 7px; vertical-align: 1px; }
.dot.hot { background: var(--accent); } .dot.ok { background: var(--ok); }
.hot { color: var(--accent); } .okc { color: var(--ok); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--hair-2); background: transparent; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--ink); cursor: pointer; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.dark { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn.block { width: 100%; min-height: 52px; font-size: 15px; }
.btn:disabled { opacity: .55; cursor: default; }
.empty { padding: 18px 0; color: var(--mute); font-size: 15px; line-height: 1.5; border-bottom: 1px solid var(--hair); }
label { display: block; font-size: 14px; font-weight: 600; margin: 16px 0 6px; }
.hint { font-size: 13px; color: var(--mute); font-weight: 400; margin-top: 4px; }
input, select, textarea { width: 100%; min-height: 46px; border: 1px solid var(--hair-2); border-radius: 10px; background: var(--cream); padding: 10px 12px; font-size: 16px; }
textarea { min-height: 90px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice { display: flex; flex-direction: column; gap: 8px; }
.choice button { text-align: left; min-height: 60px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--hair-2); background: var(--cream); cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.choice button[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--accent-l); }
.choice b { font-size: 15px; } .choice span { font-size: 13px; color: var(--mute); }
nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; background: var(--cream); border-top: 1px solid var(--hair); padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
nav.tabs div { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
nav.tabs a { min-height: 60px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; color: var(--mute); text-decoration: none; border-top: 2px solid transparent; position: relative; }
nav.tabs a[aria-current="page"] { color: var(--ink); font-weight: 700; border-top-color: var(--accent); }
nav.tabs .badge { position: absolute; top: 6px; right: calc(50% - 46px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
.thread { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }
.bubble { max-width: 84%; padding: 10px 13px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.in { align-self: flex-start; background: var(--cream); border: 1px solid var(--hair); border-radius: 14px 14px 14px 4px; }
.bubble.out { align-self: flex-end; background: var(--accent-l); border-radius: 14px 14px 4px 14px; }
.bubble.owner { align-self: flex-end; background: var(--ink); color: var(--cream); border-radius: 14px 14px 4px 14px; }
.bubble small { display: block; font-size: 11px; margin-top: 4px; opacity: .7; }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 46px; height: 46px; }
.sheet-bg { position: fixed; inset: 0; background: rgba(28, 35, 33, .28); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--page); width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(28, 35, 33, .18); animation: up .28s var(--ease); }
@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--cream); padding: 12px 18px; border-radius: 10px; font-size: 14px; z-index: 30; max-width: calc(100vw - 32px); }
.login { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; max-width: 420px; margin: 0 auto; padding: 32px 20px; }
.err { color: var(--accent-dark); font-size: 14px; margin-top: 10px; min-height: 20px; }
.back { display: inline-flex; min-height: 44px; align-items: center; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--mute); margin-bottom: 6px; }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
