:root {
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --danger: #dc2626;
  --ok: #16a34a;
}

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

html, body { height: 100%; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}

.screen {
  display: none;
  flex-direction: column;
  gap: 18px;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 32px 24px;
}
.screen.active { display: flex; }

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }

.lead { color: var(--muted); font-size: 1.1rem; }

label { font-weight: 600; margin-top: 8px; }

input[type="text"] {
  font-size: 1.4rem;
  padding: 14px;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  text-align: center;
  letter-spacing: 2px;
  width: 100%;
}
input[type="text"]:focus { outline: none; border-color: var(--accent); }

button.primary {
  background: var(--accent);
  color: #fff;
  font-size: 1.3rem;
  font-weight: 600;
  padding: 18px;
  border: none;
  border-radius: 14px;
  width: 100%;
  cursor: pointer;
}
button.primary:active { background: var(--accent-dark); }

button.secondary {
  background: #e2e8f0;
  color: var(--text);
  font-size: 1.1rem;
  padding: 14px;
  border: none;
  border-radius: 12px;
  width: 100%;
  cursor: pointer;
}

.choice { display: flex; gap: 12px; }
.choice-btn {
  flex: 1;
  font-size: 1.1rem;
  padding: 14px;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.choice-btn.selected {
  border-color: var(--accent);
  background: #eff6ff;
  font-weight: 700;
}

.note { color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.error { color: var(--danger); font-weight: 600; }

.step-progress { color: var(--muted); font-weight: 600; }

.badge {
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 8px 20px;
  border-radius: 999px;
  letter-spacing: 1px;
}

.instruction { font-size: 1.25rem; line-height: 1.6; }

/* Recording screen */
.screen.recording {
  background: var(--accent);
  color: #fff;
  justify-content: center;
  text-align: center;
}
.rec-task { font-size: 1.2rem; font-weight: 600; opacity: 0.9; }
#rec-count {
  font-size: 7rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.rec-status { font-size: 1.2rem; opacity: 0.9; }

.progress {
  height: 12px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  overflow: hidden;
}
#rec-bar {
  height: 100%;
  width: 0;
  background: #fff;
  border-radius: 6px;
  transition: width 0.25s linear;
}

.upload-status { font-size: 1.1rem; }
.upload-status.ok { color: var(--ok); font-weight: 600; }
.upload-status.fail { color: var(--danger); font-weight: 600; }
