* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #fafafa;
  --card: #ffffff;
  --ink: #1a1a1a;
  --soft: #6b7280;
  --line: #e5e7eb;
  --accent: #4f46e5;
  --accent-soft: #eef2ff;
  --us: #2563eb;
  --us-soft: #dbeafe;
  --uk: #dc2626;
  --uk-soft: #fee2e2;
  --highlight: #fef3c7;
  --good: #10b981;
  --warn: #dc2626;
  --warn-soft: #fef2f2;
}
body.theme-no { --accent: #e11d48; --accent-soft: #fff1f2; }
body.theme-ask { --accent: #0d9488; --accent-soft: #f0fdfa; }
body.theme-disagree { --accent: #b45309; --accent-soft: #fffbeb; }
body.theme-health { --accent: #0369a1; --accent-soft: #f0f9ff; }
body {
  font-family: 'Inter', 'Noto Sans KR', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
.container { max-width: 540px; margin: 0 auto; padding: 0 0 80px 0; }

/* === Hero === */
.hero {
  padding: 36px 24px 28px;
  background: linear-gradient(160deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
body.theme-no .hero { background: linear-gradient(160deg, #be123c 0%, #e11d48 60%, #f97316 100%); }
body.theme-ask .hero { background: linear-gradient(160deg, #0f766e 0%, #0d9488 60%, #2563eb 100%); }
body.theme-disagree .hero { background: linear-gradient(160deg, #92400e 0%, #b45309 55%, #7c3aed 100%); }
body.theme-health .hero { background: linear-gradient(160deg, #0c4a6e 0%, #0369a1 55%, #10b981 100%); }
.hero::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
}
.hero .topic-tag {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 13px;
  opacity: 0.85;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
  position: relative;
}
.hero h1 {
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
  position: relative;
}
.hero h1 em {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
}
.hero .lede {
  font-size: 14px;
  opacity: 0.92;
  line-height: 1.6;
  position: relative;
}
.hero .meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 18px;
  font-size: 11.5px;
  position: relative;
}
.hero .chip {
  background: rgba(255,255,255,0.2);
  padding: 5px 11px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  font-weight: 600;
}
.hero .home-link {
  position: relative;
  display: inline-block;
  margin-bottom: 10px;
  color: #fff;
  opacity: 0.8;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.hero .home-link:hover { opacity: 1; }

/* === Voice toggle (sticky bar) === */
.voice-bar {
  position: sticky; top: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  z-index: 100;
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}
.voice-bar .label {
  font-size: 11px;
  color: var(--soft);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.voice-toggle {
  display: flex;
  background: var(--bg);
  border-radius: 999px;
  padding: 3px;
}
.voice-toggle button {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--soft);
  cursor: pointer;
  border-radius: 999px;
  font-family: inherit;
  transition: all 0.15s;
}
.voice-toggle button.active.us { background: var(--us); color: #fff; }
.voice-toggle button.active.uk { background: var(--uk); color: #fff; }
.progress-pill {
  font-size: 11px;
  color: var(--soft);
  background: var(--bg);
  padding: 5px 11px;
  border-radius: 999px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* === Section === */
.section { margin-top: 24px; padding: 0 16px; }
.section-title {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--soft);
}
.section-title .num {
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-weight: 800;
  color: var(--ink);
  font-size: 13px;
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: none;
}

/* === Level banner (단계 구분) === */
.level-head {
  border-radius: 14px;
  padding: 16px 18px;
  margin: 20px 0 12px;
  color: #fff;
}
.level-head.l1 { background: linear-gradient(135deg, #059669, #10b981); }
.level-head.l2 { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.level-head.l3 { background: linear-gradient(135deg, #7c3aed, #c026d3); }
.level-head .lv {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 4px;
}
.level-head .name { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.level-head .desc { font-size: 12.5px; opacity: 0.92; line-height: 1.55; }

/* === Sentence card === */
.sentence {
  position: relative;
  padding: 16px;
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--line);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.sentence:hover { border-color: var(--accent); }
.sentence.played { border-color: var(--good); background: #f0fdf4; }
.sentence .en {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.sentence .kr {
  font-size: 13.5px;
  color: var(--soft);
  margin-bottom: 8px;
  line-height: 1.5;
}
.sentence .real {
  font-size: 12.5px;
  color: #92400e;
  background: #fffbeb;
  border: 1px dashed #fcd34d;
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 8px;
  line-height: 1.5;
}
.sentence .real strong { font-weight: 700; }
.sentence .nuance {
  font-size: 11.5px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-block;
  font-weight: 600;
  margin-top: 4px;
}
.sentence .play-row { display: flex; gap: 6px; margin-top: 10px; }
.sentence .play-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  color: var(--soft);
  transition: all 0.15s;
}
.sentence .play-btn:hover { border-color: var(--ink); }
.sentence .play-btn.us { color: var(--us); border-color: var(--us-soft); background: var(--us-soft); }
.sentence .play-btn.uk { color: var(--uk); border-color: var(--uk-soft); background: var(--uk-soft); }
.sentence .play-btn.playing { background: var(--ink); color: #fff; border-color: var(--ink); }

/* === Dialogue === */
.dialogue-card {
  background: var(--card);
  border-radius: 14px;
  border: 1px solid var(--line);
  margin-bottom: 16px;
  overflow: hidden;
}
.dialogue-header { padding: 16px 18px 10px; border-bottom: 1px solid var(--line); }
.dialogue-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.dialogue-context {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 12.5px;
  color: var(--soft);
}
.dialogue-controls { display: flex; gap: 6px; margin-top: 10px; }
.dialogue-controls button {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.dialogue-controls button.us { color: var(--us); border-color: var(--us-soft); background: var(--us-soft); }
.dialogue-controls button.uk { color: var(--uk); border-color: var(--uk-soft); background: var(--uk-soft); }
.dialogue-controls button.playing { background: var(--ink); color: #fff; border-color: var(--ink); }
.dialogue-line {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.dialogue-line:first-of-type { border-top: none; }
.dialogue-line:hover { background: #fafafa; }
.dialogue-line.playing { background: var(--highlight); }
.speaker-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.speaker-avatar.A { background: var(--accent); }
.speaker-avatar.B { background: var(--good); }
.line-body { flex: 1; min-width: 0; }
.line-en {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 3px;
}
.line-kr { font-size: 13px; color: var(--soft); line-height: 1.5; }

/* === Note === */
.note-card {
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-left: 4px solid var(--accent);
}
.note-card .label {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}
.note-card .body { font-size: 13.5px; color: var(--ink); line-height: 1.55; }
.note-card .body strong { font-weight: 700; }
.note-card.warn { background: var(--warn-soft); border-left-color: var(--warn); }
.note-card.warn .label { color: var(--warn); }

/* === Formula (부탁의 공식) === */
.formula {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 12px;
}
.formula .steps { display: flex; flex-direction: column; gap: 8px; }
.formula .step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--bg);
  border-radius: 10px;
  padding: 10px 12px;
}
.formula .step .n {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.formula .step .t { font-size: 13px; line-height: 1.5; }
.formula .step .t b { font-weight: 700; }
.formula .step .t .ex { color: var(--soft); font-size: 12.5px; display: block; }

/* === Activity (소모임 활동) === */
.activity-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.activity-card .badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.activity-card .a-title { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.activity-card .a-body { font-size: 13.5px; color: var(--ink); line-height: 1.6; }
.activity-card .a-body li { margin-left: 18px; margin-bottom: 4px; }
.activity-card .scenario {
  background: var(--bg);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.55;
}
.activity-card .scenario b { font-weight: 700; }

/* Footer */
.footer { text-align: center; padding: 32px 16px; color: var(--soft); font-size: 11px; }
.footer .hint { font-family: 'Fraunces', serif; font-style: italic; margin-bottom: 6px; }
.footer a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* Session nav (next/prev) */
.session-nav { padding: 0 16px; margin-top: 28px; }
.session-nav a {
  display: block;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  border-radius: 14px;
  padding: 16px 18px;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
}
.session-nav a span { opacity: 0.7; font-weight: 500; font-size: 12px; display: block; margin-bottom: 2px; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.playing .speaker-avatar { animation: pulse 1.2s infinite; }

@media (min-width: 700px) {
  body { padding: 20px 0; }
  .container { box-shadow: 0 4px 24px rgba(0,0,0,0.06); border-radius: 20px; overflow: hidden; background: var(--card); }
}
