:root {
  --bg: #0f172a;
  --card: #1e293b;
  --card2: #273449;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #2dd4bf;
  --accent-dark: #0d9488;
  --red: #f87171;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent); color: #04241f; font-size: 22px; font-weight: 800;
}
.ghost-btn {
  background: transparent; color: var(--text);
  border: 1px solid #475569; border-radius: 999px; padding: 8px 16px; font-size: 15px;
}
main { padding: 4px 14px 20px; max-width: 640px; margin: 0 auto; }
.card {
  background: var(--card); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px;
}
.hidden { display: none !important; }
h1 { font-size: 26px; line-height: 1.25; margin: 0 0 10px; }
h2 { font-size: 19px; margin: 0 0 10px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.ticks { list-style: none; padding: 0; margin: 12px 0 18px; }
.ticks li { padding: 4px 0 4px 26px; position: relative; color: var(--muted); }
.ticks li::before { content: "✓"; position: absolute; left: 2px; color: var(--accent); font-weight: 700; }
.big-btn {
  display: block; width: 100%; border: none; cursor: pointer;
  border-radius: 14px; padding: 18px 16px; font-size: 19px; font-weight: 700;
  margin: 14px 0;
}
.big-btn.record { background: #dc2626; color: #fff; }
.big-btn.ask { background: var(--accent); color: #04241f; }
.big-btn.end { background: transparent; color: var(--red); border: 1.5px solid var(--red); }
.big-btn:disabled { opacity: 0.55; }
.small-btn {
  background: var(--accent-dark); color: #fff; border: none; border-radius: 10px;
  padding: 9px 14px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.small-btn.secondary { background: var(--card2); }
.small-btn.danger { background: transparent; border: 1px solid var(--red); color: var(--red); }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
label { display: block; margin: 14px 0 4px; font-size: 14px; color: var(--muted); }
label.check { display: flex; gap: 9px; align-items: flex-start; color: var(--text); font-size: 14px; }
label.check input { margin-top: 3px; width: 19px; height: 19px; flex: none; }
input[type="text"], input[type="password"], select {
  width: 100%; margin-top: 6px; padding: 11px 12px; font-size: 16px;
  border-radius: 10px; border: 1px solid #475569; background: #0b1220; color: var(--text);
}
label.check select { width: auto; margin: 0 2px; padding: 4px 8px; font-size: 15px; }
.status-line { min-height: 1.2em; font-size: 14px; color: var(--accent); }
.error-line { min-height: 1.2em; font-size: 14px; color: var(--red); }
.live-head { display: flex; align-items: center; gap: 10px; }
.live-dot {
  width: 14px; height: 14px; border-radius: 50%; background: #ef4444;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.live-label { font-weight: 700; font-size: 18px; }
.timer { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 700; }
.meter-wrap { height: 8px; background: #0b1220; border-radius: 99px; margin: 12px 0 4px; overflow: hidden; }
.meter-bar { height: 100%; width: 0%; background: var(--accent); transition: width 0.12s; }
.caption {
  font-size: 17px; min-height: 3em; background: #0b1220; border-radius: 12px;
  padding: 12px; margin-top: 12px; color: #e2e8f0;
}
.auto-row { align-items: center; flex-wrap: wrap; }
.feed-title { margin-top: 20px; }
.feed { display: flex; flex-direction: column; gap: 10px; }
.q-card {
  background: var(--card2); border-left: 4px solid var(--accent);
  border-radius: 10px; padding: 12px 14px; font-size: 16.5px;
}
.q-card .q-meta { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }
.peek { margin-top: 18px; }
.peek summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.transcript { white-space: pre-wrap; font-size: 14px; color: var(--muted); max-height: 220px; overflow-y: auto; }
.foot { text-align: center; padding: 6px 16px 26px; }
.diag-line { font-size: 13.5px; color: var(--accent); background: #0b1220; border-radius: 8px; padding: 8px 10px; }
.warn-box { background: #451a1a; border: 1px solid var(--red); border-radius: 12px; padding: 14px; margin-top: 10px; }
.warn-box p { margin-top: 8px; }
