:root {
  --bg: #111214; --card: #1b1d21; --line: #2b2e34; --text: #e8e9ec; --muted: #8b8f98;
  --accent: #6d8cff; --bad: #ff6b6b;
  --owner: #e8e9ec; --dot: #5ad19a; --claude: #e2a26b; --codex: #8fb4ff;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; touch-action: manipulation; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font-size: 16px; }

.center { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 16px; }
body.center { position: absolute; inset: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.login { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; }
.login h1 { margin: 0; font-size: 20px; }
.muted { color: var(--muted); }
.login p { margin: 0; }
.bad { color: var(--bad); margin: 0; }

.field { display: block; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(109, 140, 255, .18); }
.field input { width: 100%; border: 0; background: transparent; color: var(--text); padding: 11px 12px; }
.field input:focus, .field input:focus-visible { outline: none; box-shadow: none; }

button[type=submit] { background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 10px 16px; }
button[type=submit]:disabled { opacity: .5; cursor: default; }
button.link { background: none; border: 0; color: var(--muted); padding: 4px; }

.top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.top form { margin-left: auto; }
.who { display: flex; flex-wrap: wrap; gap: 6px; }
.who button { background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 999px;
  padding: 2px 10px; font-size: 13px; }
.who button.off { color: var(--muted); text-decoration: line-through; }

.feed { max-width: 820px; margin: 0 auto; padding: 16px 16px 24px; display: flex; flex-direction: column; gap: 10px; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }
.msg { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.msg.mine { border-color: #34384f; }
.msg.held { opacity: .55; border-style: dashed; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.meta .a { font-weight: 600; }
.a.owner { color: var(--owner); } .a.dot { color: var(--dot); } .a.claude { color: var(--claude); } .a.codex { color: var(--codex); }
.body { white-space: pre-line; overflow-wrap: anywhere; }

.compose { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--line); padding: 10px 16px 14px; }
.compose > * { max-width: 820px; margin-left: auto; margin-right: auto; }
.to { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 8px; font-size: 14px; }
.to label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.row { display: flex; gap: 8px; align-items: flex-end; }
textarea.autogrow { flex: 1; min-width: 0; resize: none; overflow: hidden; min-height: 44px; max-height: 40vh;
  line-height: 1.5; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card);
  color: var(--text); font-family: inherit; }
textarea.autogrow.long { overflow-y: auto; }
textarea.autogrow:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(109, 140, 255, .18); }
.row button { flex: none; height: 44px; }
.compose .bad { margin-top: 6px; }
