*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand: #111111;
  --accent: #E63946;
  --accent-dim: rgba(230, 57, 70, 0.15);
  --text: #111111;
  --muted: #6b7280;
  --bg: #ffffff;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ── Shared layout ── */
.screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 28px 60px;
  text-align: center;
}

/* ── Logo / wordmark ── */
.logo {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--brand);
  margin-bottom: 48px;
}

/* ── Typography ── */
h1 {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin-bottom: 16px;
}

.subhead {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 340px;
  margin: 0 auto 48px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); opacity: 0.9; }

.btn-primary {
  background: var(--brand);
  color: #fff;
  width: 100%;
  max-width: 320px;
}

.btn-secondary {
  background: transparent;
  color: var(--brand);
  border: 2px solid var(--brand);
  width: 100%;
  max-width: 320px;
}

.btn-danger {
  background: var(--accent);
  color: #fff;
  width: 100%;
  max-width: 320px;
}

.btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ── Processing spinner ── */
.spinner {
  width: 56px;
  height: 56px;
  border: 4px solid #e5e7eb;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin-bottom: 36px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Pulse dot (recording indicator) ── */
.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.75); }
}

/* ── Inline notice / error ── */
.notice {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  max-width: 320px;
  width: 100%;
  text-align: left;
}
.notice-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; }
.notice-info  { background: #f0f9ff; color: #0369a1; border: 1px solid #7dd3fc; }

/* ── Link ── */
a.text-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-top: 24px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 1px;
}
