:root {
  --bg: #ffffff;
  --fg: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f5f6f8;
  --accent: #1f4fd8;
  --accent-soft: #eaf0ff;
  --warn: #b45309;
  --ok: #047857;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", sans-serif;
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
main { max-width: 560px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 20px) 20px calc(env(safe-area-inset-bottom) + 32px); }
h1 { font-size: 24px; margin: 4px 0 4px; letter-spacing: -0.02em; }
h2 { font-size: 15px; margin: 28px 0 10px; color: var(--muted); font-weight: 600; }
p { margin: 6px 0; }
.muted { color: var(--muted); font-size: 14px; }
button { font: inherit; cursor: pointer; border: 0; }
.btn { display: block; width: 100%; padding: 14px 16px; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 600; }
.btn.ghost { background: var(--soft); color: var(--fg); }
.btn.small { display: inline-block; width: auto; padding: 8px 12px; font-size: 14px; }
.btn:disabled { opacity: 0.5; }
input { font: inherit; width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 12px; margin: 12px 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.stat { background: var(--soft); border-radius: 12px; padding: 12px; }
.stat b { display: block; font-size: 20px; }
.stat span { font-size: 12px; color: var(--muted); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--soft); padding: 4px; border-radius: 12px; margin-top: 20px; }
.tabs button { padding: 10px; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 600; }
.tabs button.on { background: #fff; color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.modehint { font-size: 14px; color: var(--muted); margin: 10px 2px 4px; }
.list { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; padding: 14px 2px; border-bottom: 1px solid var(--line); background: none; width: 100%; text-align: left; color: inherit; }
.row .t { flex: 1; }
.row .t b { display: block; font-weight: 600; }
.row .t small { color: var(--muted); font-size: 13px; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.badge.ok { background: #e7f6ef; color: var(--ok); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.link { background: none; color: var(--accent); padding: 4px 0; font-size: 14px; }
/* session */
.call { display: flex; flex-direction: column; min-height: calc(100vh - 60px); }
.orb { width: 140px; height: 140px; border-radius: 50%; margin: 28px auto 12px; background: var(--accent-soft); display: grid; place-items: center; transition: transform .15s; }
.orb i { width: 84px; height: 84px; border-radius: 50%; background: var(--accent); opacity: .85; transition: transform .12s; }
.orb.speaking i { animation: pulse 1s infinite ease-in-out; }
.orb.listening { background: #e7f6ef; }
.orb.listening i { background: var(--ok); }
@keyframes pulse { 50% { transform: scale(1.15); } }
.status { text-align: center; color: var(--muted); font-size: 14px; min-height: 21px; }
.timer { text-align: center; font-variant-numeric: tabular-nums; font-size: 14px; color: var(--muted); }
.captions { flex: 1; margin: 16px 0; overflow-y: auto; max-height: 42vh; display: flex; flex-direction: column; gap: 8px; }
.captions.hidden .line { filter: blur(6px); }
.line { padding: 10px 12px; border-radius: 12px; background: var(--soft); font-size: 15px; max-width: 88%; }
.line.user { align-self: flex-end; background: var(--accent-soft); }
.controls { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.controls .btn { padding: 12px 8px; font-size: 15px; }
.btn.end { background: #111827; }
.btn.on { background: var(--warn); color: #fff; }
/* review */
.card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 10px 0; }
.card .said { color: var(--muted); }
.card .better { font-weight: 600; margin-top: 6px; }
.reveal { margin-top: 10px; }
.chip { display: inline-block; background: var(--soft); border-radius: 999px; padding: 4px 10px; margin: 3px 4px 3px 0; font-size: 14px; }
.chip.ok { background: #e7f6ef; color: var(--ok); }
.err { color: #b91c1c; font-size: 14px; margin-top: 8px; }
.spin { text-align: center; padding: 48px 0; color: var(--muted); }
