:root {
  --brand: #333;
  --accent: #c58b2b;
  --on-accent: #ffffff;
  --tagline: rgba(255, 255, 255, 0.8);
  --ink: #1d1d1f;
  --muted: #5f5f66;
  --bg: #faf8f5;
  --card: #ffffff;
  --line: #d9d6d0;
  --danger: #a8231f;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.brand { background: var(--brand); padding: 14px 16px; display: flex; align-items: center; justify-content: center; gap: 12px; color: #fff; }
.logo { height: 44px; width: auto; }
.wordmark { display: flex; flex-direction: column; line-height: 1; }
.wordmark .name { font-family: Georgia, "Times New Roman", serif; font-size: 1.75rem; letter-spacing: 0.15em; text-transform: uppercase; }
.wordmark .tagline { margin-top: 4px; font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--tagline); }
main { flex: 1; width: 100%; max-width: 520px; margin: 0 auto; padding: 24px 16px 32px; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 8px; color: var(--brand); }
.lede { margin: 0 0 24px; color: var(--muted); }
.mic {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  width: 100%; min-height: 120px; margin: 0 0 8px;
  border: 0; border-radius: 20px; background: var(--brand); color: #fff;
  font: inherit; font-size: 1.25rem; font-weight: 600; cursor: pointer;
}
.mic[hidden] { display: none; }
.mic-icon { font-size: 2.4rem; line-height: 1; }
.mic.recording { background: var(--danger); }
.mic.recording .mic-icon { animation: pulse 1s ease-in-out infinite; }
.mic:disabled { opacity: 0.6; }
.timer { font-variant-numeric: tabular-nums; font-size: 1rem; font-weight: 400; min-height: 1.5em; }
@keyframes pulse { 50% { transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .mic.recording .mic-icon { animation: none; } }
.status { min-height: 1.5em; margin: 0 0 16px; color: var(--muted); font-size: 0.95rem; }
.field-label { display: block; font-weight: 600; margin: 12px 0 6px; }
textarea, input {
  width: 100%; font: inherit; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink);
}
textarea:focus, input:focus, button:focus-visible, summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
details { margin: 20px 0 8px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); }
summary { cursor: pointer; font-weight: 600; min-height: 32px; display: list-item; }
.note { margin: 6px 0 0; color: var(--muted); font-size: 0.9rem; }
.error { min-height: 1.5em; color: var(--danger); font-weight: 600; margin: 12px 0 0; }
.send {
  width: 100%; min-height: 56px; margin-top: 8px; border: 0; border-radius: 14px;
  background: var(--accent); color: var(--on-accent); font: inherit; font-size: 1.15rem; font-weight: 700; cursor: pointer;
}
.send:disabled { opacity: 0.6; }
.google { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); text-align: center; }
.google-ask { margin: 0 0 4px; font-weight: 700; color: var(--brand); }
.google-note {
  margin: 12px 0 0; padding: 10px 14px; border-left: 3px solid var(--brand); background: var(--card);
  text-align: left; font-style: italic; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 9.5em; overflow: auto;
}
.google-btn {
  display: block; margin-top: 12px; padding: 14px; border-radius: 14px; background: var(--brand); color: #fff;
  font-weight: 700; text-decoration: none;
}
.again {
  width: 100%; min-height: 48px; margin-top: 24px; border: 1.5px solid var(--brand); border-radius: 14px;
  background: transparent; color: var(--brand); font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer;
}
.table-label { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 16px; }
.bubble { background: var(--card); border: 1.5px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 12px 14px; margin: 12px 0; }
.bubble p { margin: 0 0 6px; white-space: pre-wrap; }
.from { color: var(--muted); font-size: 0.9rem; }
footer { text-align: center; padding: 16px; font-size: 0.9rem; }
footer a, main a { color: var(--brand); }
