* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #2b7de9;
  --primary-dark: #1c63c2;
  --bg: #f2f4f8;
  --card: #ffffff;
  --text: #1f2733;
  --muted: #8a94a6;
  --danger: #e5484d;
  --ok: #12a150;
}
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: var(--primary); color: #fff;
}
.brand { font-weight: 700; font-size: 17px; }
.step-hint { font-size: 13px; opacity: .9; }

.screen { display: none; padding: 18px; flex: 1; }
.screen.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px);} to {opacity:1; transform:none;} }

.card {
  background: var(--card); border-radius: 16px; padding: 20px;
  box-shadow: 0 4px 18px rgba(30,50,90,.06);
}
.card.center { text-align: center; }
h2 { font-size: 20px; margin-bottom: 6px; }
h3 { font-size: 17px; margin-bottom: 14px; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 12px; }
.err-text { color: var(--danger); font-size: 15px; margin-top: 10px; }
.big-emoji { font-size: 46px; margin-bottom: 10px; }

.notice { background: #eef4ff; border-radius: 12px; padding: 14px; margin: 16px 0; font-size: 14px; line-height: 1.7; color: #33465f; }
.notice p + p { margin-top: 8px; }

.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 14px; border: 1px solid #dce1ea; border-radius: 10px; font-size: 15px;
}
.field input:focus { outline: none; border-color: var(--primary); }

.consent-box { margin: 8px 0 18px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #44506a; line-height: 1.6; }
.consent input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; padding: 13px 16px; border: none; border-radius: 12px;
  font-size: 16px; font-weight: 600; cursor: pointer; transition: .15s;
}
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:active { background: var(--primary-dark); }
.btn.primary:disabled { background: #b9c6dd; cursor: not-allowed; }
.btn.ghost { background: #eef1f6; color: #33465f; }
.btn.small { width: auto; padding: 8px 14px; font-size: 13px; margin-bottom: 12px; }
.row { display: flex; gap: 10px; margin-top: 8px; }
.row .btn { flex: 1; }

.preview {
  width: 100%; aspect-ratio: 3/4; background: #10141c; border-radius: 12px;
  object-fit: cover; margin: 8px 0 12px; transform: scaleX(-1);
}
.check-list { list-style: none; margin: 12px 0; }
.check-list li { padding: 8px 0; border-bottom: 1px solid #eef1f6; font-size: 14px; }

.progress { font-size: 13px; color: var(--primary); font-weight: 600; margin-bottom: 8px; }
.question { line-height: 1.5; }
.instruction { background: #fff7e6; color: #8a5a00; border-radius: 10px; padding: 12px; font-size: 14px; line-height: 1.6; margin-bottom: 12px; }
.answer { width: 100%; padding: 12px; border: 1px solid #dce1ea; border-radius: 10px; font-size: 15px; resize: vertical; margin-bottom: 8px; }
.answer:focus { outline: none; border-color: var(--primary); }

.rec-badge { color: var(--danger); font-weight: 700; margin-bottom: 8px; }
.hidden { display: none !important; }

.btn.recording { background: var(--danger); }
#btnVoice.listening { background: var(--danger); color: #fff; }

.btn.big { padding: 16px; font-size: 18px; margin-top: 4px; }
.rec-area { margin: 14px 0 12px; text-align: center; }
.rec-btn { background: #eaf3ff; color: var(--primary); border: 2px dashed var(--primary); padding: 18px; font-size: 18px; }
.rec-btn.recording { background: var(--danger); color: #fff; border-color: var(--danger); }
.rec-tip { color: var(--muted); font-size: 13px; line-height: 1.6; margin-top: 8px; }
.playback { margin-top: 12px; }
.playback audio { width: 100%; margin-bottom: 8px; }

.loading { text-align: center; padding: 40px 0; color: var(--muted); }
.spinner {
  width: 38px; height: 38px; border: 4px solid #dde3ee; border-top-color: var(--primary);
  border-radius: 50%; margin: 10px auto 16px; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
