:root {
  --bg: #0e0f11;
  --fg: #f4f4f5;
  --muted: #a1a1aa;
  --line: #2a2a2e;
  --panel: #17181b;
  --work: #60a5fa;
  --stuck: #f59e0b;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); }
body {
  font: 400 16px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
.app { display: flex; flex-direction: column; height: 100dvh; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 8px; }
.top a { color: var(--muted); font-size: 13px; text-decoration: none; }
.calls { max-width: 52rem; margin: 0 auto; padding: 16px 18px 32px; }
.calls h1 { font-size: 15px; font-weight: 650; margin: 0 0 12px; }
.calls button, .calls a.back { color: var(--fg); background: transparent; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; cursor: pointer; text-decoration: none; }
.call-list, .call-detail { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.call-list[hidden], .call-detail[hidden] { display: none; }
.call-list button, .call-detail article {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--fg);
  border-radius: 12px;
  padding: 10px 12px;
}
.call-detail article { font-size: 14px; }
.call-detail .meta, .calls .meta { color: var(--muted); font-size: 12px; }
.call-detail pre { white-space: pre-wrap; margin: 8px 0 0; font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.name { font-weight: 650; font-size: 15px; }
.meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.field { height: 38vh; min-height: 180px; }
.field[hidden] { display: none; }
.field canvas { display: block; width: 100%; height: 100%; }
.talk { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.empty {
  margin: auto;
  max-width: 22rem;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}
.empty[hidden] { display: none; }
.log {
  list-style: none;
  margin: 0;
  padding: 16px 18px 18px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.log:empty { display: none; }
.log li {
  max-width: min(36rem, 85%);
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--panel);
}
.log li.you { align-self: flex-end; background: #1c2836; }
.log .who { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.log .body { display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
.dock {
  display: flex;
  gap: 8px;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.dock input {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
.dock button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  cursor: pointer;
}
.dock button:hover { border-color: #3f3f46; }
.login {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100% - 32px));
  margin: 18vh auto 0;
}
.login input, .login button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--fg);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
.login[hidden], .app[hidden] { display: none; }
