:root {
  --bg: #0b0d10;
  --card: #161a21;
  --line: #2a3140;
  --text: #f4f1ea;
  --muted: #9aa3b2;
  --amber: #f5b942;
  --amber-dim: #8a6a1a;
  --ok: #3dcc8a;
  --bad: #ff6b6b;
  --pad: max(16px, env(safe-area-inset-left));
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body {
  font-family: "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
}
button, input, textarea { font: inherit; }
button { touch-action: manipulation; }

#app { min-height: 100dvh; padding: 18px var(--pad) 28px; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.brand { font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.back {
  background: transparent;
  border: 0;
  color: var(--amber);
  font-size: 18px;
  padding: 8px 0;
}

h1 { font-size: 28px; margin: 0 0 8px; line-height: 1.15; }
.lead { color: var(--muted); font-size: 16px; line-height: 1.4; margin: 0 0 20px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 12px;
}
.card.tap { width: 100%; text-align: left; color: inherit; }
.card.tap:active { transform: scale(0.99); }

.label { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.path { font-size: 13px; color: var(--muted); word-break: break-all; }
.title { font-size: 20px; font-weight: 650; }

.field {
  width: 100%;
  background: #0f1218;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  -webkit-user-select: text;
  user-select: text;
}
textarea.field { min-height: 88px; resize: vertical; }

.btn {
  width: 100%;
  border: 0;
  border-radius: 18px;
  padding: 18px 16px;
  font-size: 20px;
  font-weight: 650;
  background: var(--amber);
  color: #1a1406;
}
.btn:disabled { opacity: 0.45; }
.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn.bad { background: #4a1d1d; color: #ffd4d4; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  background: #1c2430;
  color: var(--muted);
}
.pill.ok { color: var(--ok); }
.pill.busy { color: var(--amber); }
.pill.bad { color: var(--bad); }

.drive {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 40px);
}
.reply {
  flex: 1;
  font-size: 26px;
  line-height: 1.35;
  overflow-y: auto;
  -webkit-user-select: text;
  user-select: text;
  padding: 8px 0 16px;
}
.ticker { color: var(--amber); font-size: 16px; min-height: 24px; margin-bottom: 10px; }

.mic-wrap { display: flex; justify-content: center; padding: 12px 0 8px; }
.mic {
  width: 196px;
  height: 196px;
  border-radius: 50%;
  border: 0;
  background: radial-gradient(circle at 50% 40%, #ffd56a, var(--amber) 55%, #b8861f);
  color: #1a1406;
  font-size: 28px;
  font-weight: 750;
  box-shadow: 0 0 0 12px rgba(245, 185, 66, 0.12);
}
.mic.listen {
  background: radial-gradient(circle at 50% 40%, #fff1c2, #ff6b6b 70%);
  box-shadow: 0 0 0 16px rgba(255, 107, 107, 0.16);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }

.history { margin-top: 16px; }
.msg { margin-bottom: 14px; }
.msg .who { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.msg .body { font-size: 17px; line-height: 1.4; white-space: pre-wrap; }
.msg.user .body { color: #d7e3ff; }

.error { color: var(--bad); margin: 8px 0 16px; font-size: 16px; }
