:root {
  --bg: #0c0d10;
  --panel: #14161b;
  --line: #222631;
  --text: #e8f4ff;
  --muted: #8b94a7;
  --accent: #31d0ff;
  --ok: #38d39f;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(1200px 600px at 50% -10%, #12151c, var(--bg));
  color: var(--text);
  font: 16px/1.5 system-ui, "Segoe UI", sans-serif;
  display: flex; flex-direction: column; min-height: 100vh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.top { display: flex; align-items: center; gap: 12px; padding: 16px; }
.logo { width: 34px; height: 34px; }
h1 { font-size: 17px; margin: 0; letter-spacing: .3px; }
.status { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.status.ok { color: var(--ok); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; margin: 16px; padding: 20px; }
h2 { margin: 0 0 8px; font-size: 18px; }
.muted { color: var(--muted); font-size: 14px; }
input {
  width: 100%; margin: 10px 0; padding: 14px; border-radius: 12px;
  border: 1px solid var(--line); background: #0f1117; color: var(--text); font-size: 16px;
}
button { font: inherit; cursor: pointer; }
.primary {
  width: 100%; padding: 14px; margin-top: 6px; border: 0; border-radius: 12px;
  background: linear-gradient(180deg, #3bd6ff, #1aa6cf); color: #04121a; font-weight: 700;
}
.primary:disabled { filter: grayscale(.7) brightness(.7); cursor: default; }
.call { flex: 1; display: flex; flex-direction: column; margin: 16px; min-height: 0; }
.feed { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px; }
.line { padding: 10px 14px; border-radius: 14px; max-width: 85%; white-space: pre-wrap; word-wrap: break-word; }
.line.me { align-self: flex-end; background: #1d3a44; }
.line.ai { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); }
.line.sys { align-self: center; color: var(--muted); font-size: 13px; }
.typing { color: var(--muted); font-size: 13px; padding: 6px 4px; }
.controls { padding-top: 12px; }
.talk {
  width: 100%; padding: 18px; border: 0; border-radius: 16px;
  background: linear-gradient(180deg, #3bd6ff, #1aa6cf); color: #04121a; font-weight: 800; font-size: 17px;
}
.talk:disabled { filter: grayscale(.7) brightness(.7); }
.foot { padding: 14px 16px; text-align: center; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; }
