:root {
  --bg: #f4faf6;
  --card: #ffffff;
  --text: #1b2e24;
  --muted: #5b6f63;
  --accent: #2d6a4f;
  --accent-dark: #1f4d38;
  --danger: #b42318;
  --record: #d92d20;
  --record-dark: #b42318;
  --shadow: 0 8px 24px rgba(29, 78, 58, 0.08);
  --radius: 16px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #eef8f1 0%, var(--bg) 40%);
  color: var(--text);
  min-height: 100vh;
  font-size: 18px;
}
.wrap { max-width: 480px; margin: 0 auto; padding: 1.25rem 1rem 2rem; }
h1, h2 { margin: 0 0 0.75rem; line-height: 1.2; }
h1 { font-size: 1.75rem; color: var(--accent); }
h2 { font-size: 1.35rem; }
p { margin: 0 0 1rem; color: var(--muted); line-height: 1.5; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.hidden { display: none !important; }
.btn-grid { display: grid; gap: 0.75rem; }
button {
  font: inherit;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease, opacity 0.15s ease;
}
button:active { transform: scale(0.98); }
button:disabled { cursor: not-allowed; transform: none; }
.btn-name, .btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}
.btn-name { text-align: left; padding: 1.1rem 1rem; font-size: 1.15rem; }
.btn-name:hover, .btn-primary:hover { background: var(--accent-dark); }
.btn-secondary {
  background: #e8f2ec;
  color: var(--accent-dark);
  padding: 0.9rem 1rem;
  font-size: 1rem;
}
.btn-logout {
  background: transparent;
  color: var(--muted);
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  text-decoration: underline;
}
.topbar { display: flex; justify-content: flex-end; margin-bottom: 0.5rem; }
.pin-display {
  text-align: center;
  font-size: 2rem;
  letter-spacing: 0.5rem;
  min-height: 2.5rem;
  margin: 0.5rem 0 1rem;
  font-weight: 700;
}
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.65rem; }
.pin-pad button {
  background: #fff;
  border: 2px solid #d7e7dd;
  color: var(--text);
  font-size: 1.5rem;
  padding: 1rem 0;
  border-radius: 14px;
  font-weight: 600;
}
.pin-pad .wide { grid-column: span 3; font-size: 1rem; padding: 0.85rem; }
.error { color: var(--danger); min-height: 1.25rem; margin-bottom: 0.75rem; font-weight: 600; }
.section-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.35rem; }
.placeholder { color: var(--muted); font-size: 1rem; padding: 0.75rem 0 0.25rem; }
.loading { text-align: center; padding: 2rem 0; color: var(--muted); }
.wide { width: 100%; }
.card-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 2px solid #d7e7dd;
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.progress-label { font-weight: 600; margin-bottom: 0.5rem; }
.progress-bar {
  height: 8px;
  background: #d7e7dd;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.progress-fill { height: 100%; background: var(--accent); width: 0; transition: width 0.2s; }
.nav-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.btn-option {
  display: block;
  width: 100%;
  margin-bottom: 0.65rem;
  padding: 1rem;
  background: #fff;
  border: 2px solid #d7e7dd;
  border-radius: 14px;
  text-align: left;
  font-size: 1.05rem;
}
.btn-option.selected { border-color: var(--accent); background: #eef8f1; }
textarea {
  width: 100%;
  font: inherit;
  border: 2px solid #d7e7dd;
  border-radius: 12px;
  padding: 0.75rem;
  resize: vertical;
}
.text-answer-wrap { display: grid; gap: 0.75rem; }

.mic-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  min-height: 3rem;
}
.mic-btn__icon { font-size: 1.2rem; line-height: 1; }
.mic-btn__timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  min-width: 2.5rem;
}
.mic-btn--idle {
  background: #e8f2ec;
  color: var(--accent-dark);
}
.mic-btn--preparing,
.mic-btn--processing {
  background: #edf2ef;
  color: var(--muted);
  opacity: 0.75;
}
.mic-btn--recording {
  background: var(--record);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(217, 45, 32, 0.45);
  animation: mic-pulse 1.2s ease-in-out infinite;
}
.mic-btn--recording:hover { background: var(--record-dark); }
@keyframes mic-pulse {
  0% { box-shadow: 0 0 0 0 rgba(217, 45, 32, 0.45); }
  70% { box-shadow: 0 0 0 12px rgba(217, 45, 32, 0); }
  100% { box-shadow: 0 0 0 0 rgba(217, 45, 32, 0); }
}

.review-row { border-bottom: 1px solid #e8f2ec; padding: 0.75rem 0; }
.review-row:last-child { border-bottom: none; }
