* { box-sizing: border-box; }
body {
  margin: 0; font-family: system-ui, -apple-system, Roboto, sans-serif;
  background: #0f172a; color: #e2e8f0; font-size: 17px;
}
.screen { max-width: 640px; margin: 0 auto; padding: 20px 16px 140px; display: flex; flex-direction: column; gap: 14px; }
.hidden { display: none !important; }
h1 { font-size: 1.5rem; margin: 8px 0; }
.muted { color: #94a3b8; }
.err { color: #f87171; min-height: 1.2em; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
label.row { flex-direction: row; align-items: center; font-weight: 400; }
input, select {
  font-size: 1rem; padding: 12px; border-radius: 10px; border: 1px solid #334155;
  background: #1e293b; color: #e2e8f0;
}
button {
  font-size: 1rem; padding: 14px; border-radius: 12px; border: 1px solid #334155;
  background: #1e293b; color: #e2e8f0; cursor: pointer;
}
button.primary { background: #2563eb; border-color: #2563eb; color: #fff; font-weight: 600; }
button.small { padding: 8px 12px; font-size: .9rem; }
button:disabled { opacity: .5; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card { background: #1e293b; border-radius: 14px; padding: 14px; }
.label { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: #94a3b8; margin-bottom: 8px; display: flex; justify-content: space-between; }
.status { text-transform: none; letter-spacing: 0; }
.status.on { color: #4ade80; }
.question { font-size: 1.15rem; min-height: 2.5em; outline: none; }
.question:empty::before { content: attr(data-placeholder); color: #64748b; }
.answer { font-size: 1.2rem; line-height: 1.55; white-space: pre-wrap; }
.answer-card { border-left: 4px solid #2563eb; }
.controls {
  position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #0f172aee; display: flex; gap: 10px; justify-content: center; max-width: 640px; margin: 0 auto;
}
.controls button { flex: 1; }
.mic { flex: 0 0 64px !important; font-size: 1.6rem; border-radius: 50%; height: 64px; padding: 0; }
.mic.on { background: #16a34a; border-color: #16a34a; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 #16a34a88; } 50% { box-shadow: 0 0 0 10px #16a34a00; } }
.hist-item { background: #1e293b; border-radius: 12px; padding: 12px; }
.hist-item .q { font-weight: 600; margin-bottom: 6px; }
.hist-item .a { white-space: pre-wrap; color: #cbd5e1; }
.hist-item .t { font-size: .8rem; color: #64748b; margin-top: 6px; }
