body {
  font-family: system-ui, sans-serif;
  max-width: 640px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.subtitle {
  color: #666;
  font-size: 0.9rem;
}

#log {
  border: 1px solid #ccc;
  border-radius: 8px;
  min-height: 300px;
  padding: 1rem;
  margin-bottom: 1rem;
  overflow-y: auto;
  max-height: 60vh;
}

.entry {
  margin-bottom: 0.75rem;
}

.entry.user {
  font-weight: 600;
  white-space: pre-wrap;
}

.entry.thinking {
  color: #888;
  font-style: italic;
}

.entry.error {
  color: #b00020;
  white-space: pre-wrap;
}

.entry.agent p,
.entry.agent ul,
.entry.agent pre,
.entry.agent h1,
.entry.agent h2,
.entry.agent h3 {
  margin: 0 0 0.5rem 0;
}

.entry.agent > *:last-child {
  margin-bottom: 0;
}

.entry.agent ul {
  padding-left: 1.5rem;
}

.entry.agent code {
  background: #f0f0f0;
  border-radius: 3px;
  padding: 0.1em 0.3em;
  font-size: 0.9em;
}

.entry.agent pre {
  background: #f0f0f0;
  border-radius: 6px;
  padding: 0.75rem;
  overflow-x: auto;
}

.entry.agent pre code {
  background: none;
  padding: 0;
}

#chat-form {
  display: flex;
  gap: 0.5rem;
}

#prompt {
  flex: 1;
  padding: 0.5rem;
}
