:root {
  --bg: #fafaf7;
  --fg: #1a1a1a;
  --accent: #2c5f8d;
  --muted: #6b6b6b;
  --border: #e5e5e0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  margin: 0;
  padding: 0;
}

#app {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

h1 { font-size: 1.4rem; font-weight: 600; margin: 0; }

#status { color: var(--muted); font-size: 0.875rem; margin-top: 0.25rem; }

#chat-log {
  min-height: 60vh;
  margin-bottom: 1rem;
}

.message {
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
}

.message.user { background: #e8f0f7; }
.message.assistant { background: white; border: 1px solid var(--border); }

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

#chat-input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
}

button {
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
}

#mic-btn {
  padding: 0.5rem 0.65rem;
  font-size: 1.3rem;
  line-height: 1;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: white;
  color: var(--fg);
  cursor: pointer;
  transition: background 0.2s;
}

button:disabled { background: var(--muted); cursor: not-allowed; }

#controls {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
}

#controls button { background: white; color: var(--fg); border: 1px solid var(--border); }
