:root { color-scheme: light dark; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}
header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
header h1 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  margin-right: auto;
}
input {
  font: inherit;
  padding: 0.35rem 0.55rem;
  width: 9rem;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  background: transparent;
  color: inherit;
}
button {
  font: inherit;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  background: transparent;
  color: inherit;
}
button:hover:not(:disabled) {
  background: color-mix(in srgb, currentColor 8%, transparent);
}
#status {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  color: color-mix(in srgb, currentColor 60%, transparent);
}
#status.err { color: #c0392b; }
main {
  flex: 1;
  overflow: hidden;
  padding: 1rem 1.25rem;
  max-width: 48rem;
  width: 100%;
  margin: 0 auto;
}
#transcript {
  height: 100%;
  overflow-y: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
  line-height: 1.55;
}
#transcript > div { padding: 0.15rem 0; white-space: pre-wrap; word-wrap: break-word; }
.turn-user { color: #2563eb; }
.turn-assistant { color: inherit; }
.turn-status { color: color-mix(in srgb, currentColor 55%, transparent); font-style: italic; }
.turn-tool { color: #b45309; }
.turn-error { color: #c0392b; }
@media (prefers-color-scheme: dark) {
  .turn-user { color: #7dd3fc; }
  .turn-tool { color: #fbbf24; }
  .turn-error { color: #f87171; }
}
