:root {
  color-scheme: dark;
  --bg: #0f1a24;
  --bg-card: #172533;
  --line: #2a3d4f;
  --text: #f3f6f8;
  --muted: #9aa8b5;
  --accent: #3db8a8;
  --accent-press: #2e9e90;
  --danger: #f0a3a3;
  --ok: #8ee0b8;
  --ring: #f2c14e;
  font-family: "SF Pro Text", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(1200px 600px at 10% -10%, #1c3346 0%, var(--bg) 55%);
  color: var(--text);
}

body {
  padding: 20px 16px calc(24px + env(safe-area-inset-bottom));
}

#app { max-width: 430px; margin: 0 auto; }

.screen[hidden] { display: none; }

.hero, .top { margin-bottom: 20px; }
.top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

.eyebrow {
  margin: 0 0 4px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 700;
}

h1 { margin: 0; font-size: 1.7rem; line-height: 1.2; font-weight: 700; }
h2 { margin: 28px 0 12px; font-size: 1.05rem; font-weight: 650; }
.lede, .muted, .hint, .cost { color: var(--muted); }
.lede { margin: 10px 0 0; line-height: 1.45; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

label { font-size: 0.86rem; font-weight: 650; }

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #101922;
  color: var(--text);
  border-radius: 12px;
  padding: 14px 12px;
  font: inherit;
  font-size: 1.05rem;
}

textarea { resize: vertical; min-height: 140px; line-height: 1.4; }

input:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

button {
  appearance: none;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #06221f;
  font: inherit;
  font-weight: 800;
  font-size: 1.08rem;
  padding: 14px 16px;
  min-height: 50px;
}

button:disabled { opacity: 0.55; }
button:not(:disabled):active { background: var(--accent-press); }

.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  min-height: 40px;
  padding: 8px 12px;
  font-size: 0.9rem;
}

.row-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.error { color: var(--danger); margin: 0; font-size: 0.9rem; }
.cost { margin: 4px 0 0; font-size: 0.78rem; line-height: 1.4; }

.status-label { margin: 0; font-size: 1.45rem; font-weight: 750; }
.status-detail { margin: 0; color: var(--muted); line-height: 1.4; }
.status.ringing .status-label { color: var(--ring); }
.status.in-progress .status-label, .status.completed .status-label { color: var(--ok); }
.status.failed .status-label, .status.no-answer .status-label, .status.busy .status-label { color: var(--danger); }

.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.history li {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
.history .to { font-weight: 700; }
.history .msg { margin: 6px 0; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.history .meta { color: var(--muted); font-size: 0.8rem; }
#history-empty[hidden] { display: none; }
