@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,600;0,700;0,800;1,400&family=Inter:wght@400;500;600&display=swap');

/* ── Tokens ───────────────────────────────────────────────────────────────── */
:root {
  --primary:        #004e9f;
  --primary-light:  #d6e4ff;
  --primary-dark:   #003880;
  --surface:        #f8f9fa;
  --surface-card:   #ffffff;
  --surface-low:    #f0f2f4;
  --text:           #191c1e;
  --text-mid:       #4a4d51;
  --text-faint:     #8a8d93;
  --accent:         #004e9f;
  --danger:         #ba1a1a;
  --success:        #1a6b31;
  --outline:        rgba(0,0,0,0.08);
  --outline-strong: rgba(0,0,0,0.16);

  --font-display:   'Plus Jakarta Sans', sans-serif;
  --font-body:      'Inter', sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-card: 0 2px 12px rgba(0,0,0,0.07), 0 0 0 1px rgba(0,0,0,0.06);
  --shadow-sheet: 0 -8px 40px rgba(0,0,0,0.12);

  --anim-fast: 0.15s ease;
  --anim-std:  0.25s ease;
}

/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }
input, textarea { font-family: var(--font-body); }
a { color: var(--primary); text-decoration: none; }

/* ── Overlays (invite / auth) ─────────────────────────────────────────────── */
.v2-overlay {
  position: fixed;
  inset: 0;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 200;
}

.v2-overlay-card {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.v2-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.03em;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.v2-brand-hanzi {
  font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', serif;
  font-size: 20px;
  color: var(--text-mid);
  font-weight: 400;
}

.v2-tagline {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.5;
}

.v2-btn-primary {
  background: var(--primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: opacity var(--anim-fast);
}
.v2-btn-primary:hover { opacity: 0.9; }
.v2-btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.v2-btn-apple {
  background: #000;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: center;
}

.v2-btn-secondary {
  background: var(--surface-low);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  width: 100%;
  text-align: center;
  border: 1px solid var(--outline);
  transition: background var(--anim-fast);
}
.v2-btn-secondary:hover { background: var(--surface-card); }

.v2-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-faint);
  font-size: 13px;
}
.v2-divider::before, .v2-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--outline);
}

.v2-input {
  background: var(--surface-low);
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--text);
  width: 100%;
  outline: none;
  transition: border-color var(--anim-fast);
}
.v2-input:focus { border-color: var(--primary); }

.v2-auth-msg { font-size: 13px; color: var(--success); }
.v2-auth-msg.error { color: var(--danger); }

/* ── App shell ────────────────────────────────────────────────────────────── */
#v2App {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Web nav header (hidden in native shell) ──────────────────────────────── */
.v2-web-nav {
  background: var(--surface-card);
  border-bottom: 1px solid var(--outline);
  padding: 0 20px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 10;
}

body.is-native .v2-web-nav { display: none; }

.v2-web-nav-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.v2-web-nav-brand span {
  font-family: 'PingFang SC', 'Hiragino Sans GB', serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-faint);
}

.v2-web-nav-actions { display: flex; align-items: center; gap: 8px; }

.v2-nav-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  background: none;
  cursor: pointer;
  transition: background var(--anim-fast), color var(--anim-fast);
}
.v2-nav-pill:hover { background: var(--surface-low); color: var(--text); }
.v2-nav-pill.active { background: var(--primary-light); color: var(--primary); }

/* ── Screens ──────────────────────────────────────────────────────────────── */
.v2-screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* ── Onboarding ───────────────────────────────────────────────────────────── */
.v2-onboard {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 40px 24px 48px;
  max-width: 480px;
  margin: 0 auto;
}

.v2-onboard-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}

.v2-onboard-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 32px;
}

.v2-onboard-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

/* Language cards */
.v2-lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

.v2-lang-card {
  padding: 24px 16px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--outline);
  background: var(--surface-card);
  cursor: pointer;
  text-align: center;
  transition: border-color var(--anim-fast), background var(--anim-fast);
  -webkit-tap-highlight-color: transparent;
}
.v2-lang-card:hover { border-color: var(--primary-light); }
.v2-lang-card.selected { border-color: var(--primary); background: var(--primary-light); }

.v2-lang-hanzi {
  font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', serif;
  font-size: 32px;
  line-height: 1;
  margin-bottom: 6px;
  color: var(--text);
}
.v2-lang-card.selected .v2-lang-hanzi { color: var(--primary); }

.v2-lang-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.v2-lang-card.selected .v2-lang-name { color: var(--primary); }

.v2-lang-sub {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 2px;
}

/* Level slider */
.v2-level-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}

.v2-level-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--outline);
  background: var(--surface-card);
  cursor: pointer;
  transition: border-color var(--anim-fast), background var(--anim-fast);
}
.v2-level-opt.selected { border-color: var(--primary); background: var(--primary-light); }

.v2-level-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--outline-strong);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--anim-fast);
}
.v2-level-opt.selected .v2-level-radio { border-color: var(--primary); }
.v2-level-opt.selected .v2-level-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.v2-level-text { flex: 1; }
.v2-level-text strong { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.v2-level-text span { font-size: 12px; color: var(--text-faint); }

/* Topic chips */
.v2-topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.v2-chip {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--outline);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-mid);
  cursor: pointer;
  background: var(--surface-card);
  transition: all var(--anim-fast);
  -webkit-tap-highlight-color: transparent;
}
.v2-chip:hover { border-color: var(--primary-light); color: var(--text); }
.v2-chip.selected { border-color: var(--primary); background: var(--primary-light); color: var(--primary); font-weight: 600; }

.v2-onboard-footer {
  margin-top: auto;
  padding-top: 32px;
  display: flex;
  gap: 12px;
}

/* ── Today home ───────────────────────────────────────────────────────────── */
.v2-home {
  padding: 0 20px 40px;
  max-width: 480px;
  margin: 0 auto;
}

.v2-home-header {
  padding: 28px 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.v2-home-greeting {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.v2-streak {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-mid);
  background: var(--surface-low);
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

/* Review card */
.v2-review-card {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: box-shadow var(--anim-fast);
  border-left: 4px solid var(--primary);
}
.v2-review-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.12); }

.v2-review-icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}

.v2-review-body { flex: 1; min-width: 0; }

.v2-review-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 2px;
}

.v2-review-sub {
  font-size: 13px;
  color: var(--text-faint);
}

.v2-review-arrow {
  font-size: 20px;
  color: var(--primary);
  flex-shrink: 0;
}

/* Start card */
.v2-start-card {
  background: var(--primary);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  color: #fff;
  margin-bottom: 20px;
}

.v2-start-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 8px;
}

.v2-start-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  line-height: 1.2;
}

.v2-start-btn {
  width: 100%;
  background: #fff;
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: opacity var(--anim-fast);
  margin-bottom: 16px;
}
.v2-start-btn:hover { opacity: 0.92; }
.v2-start-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.v2-session-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.v2-session-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.v2-session-chip {
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.v2-change-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.4);
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--anim-fast);
}
.v2-change-btn:hover { background: rgba(255,255,255,0.15); }

/* Secondary home nav (web only) */
.v2-home-nav { display: flex; flex-direction: column; gap: 8px; }

.v2-home-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface-card);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--outline);
  transition: background var(--anim-fast);
}
.v2-home-nav-item:hover { background: var(--surface-low); }

.v2-home-nav-icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.v2-home-nav-chevron { margin-left: auto; color: var(--text-faint); font-size: 18px; }

body.is-native .v2-home-nav { display: none; }

/* ── Settings sheet ───────────────────────────────────────────────────────── */
.v2-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--anim-std);
}
.v2-sheet-backdrop.visible { opacity: 1; pointer-events: auto; }

.v2-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface-card);
  border-radius: 24px 24px 0 0;
  z-index: 101;
  max-height: 92vh;
  overflow-y: auto;
  visibility: hidden;
  transform: translateY(100%);
  transition: transform var(--anim-std), visibility 0s var(--anim-std);
  box-shadow: var(--shadow-sheet);
  -webkit-overflow-scrolling: touch;
}
.v2-sheet.visible {
  visibility: visible;
  transform: translateY(0);
  transition: transform var(--anim-std), visibility 0s;
}

.v2-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--outline-strong);
  border-radius: var(--radius-full);
  margin: 12px auto 0;
}

.v2-sheet-inner {
  padding: 20px 20px 40px;
  max-width: 480px;
  margin: 0 auto;
}

.v2-sheet-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 20px;
}

/* Preset cards */
.v2-preset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.v2-preset-card {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 2px solid var(--outline);
  background: var(--surface-low);
  cursor: pointer;
  transition: all var(--anim-fast);
  -webkit-tap-highlight-color: transparent;
}
.v2-preset-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}
.v2-preset-card:hover { border-color: var(--outline-strong); }

.v2-preset-icon { font-size: 24px; margin-bottom: 8px; }
.v2-preset-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 3px;
}
.v2-preset-card.selected .v2-preset-name { color: var(--primary); }
.v2-preset-desc { font-size: 11px; color: var(--text-faint); line-height: 1.4; }

/* Advanced disclosure */
.v2-advanced { margin-top: 4px; border-top: 1px solid var(--outline); padding-top: 20px; }
.v2-advanced-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
  margin-bottom: 0;
  background: none;
  border: none;
}
.v2-advanced-toggle[aria-expanded="true"] .v2-adv-chevron { transform: rotate(180deg); }
.v2-adv-chevron { transition: transform var(--anim-fast); font-size: 18px; }

.v2-advanced-body {
  display: none;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.v2-advanced-body.hidden { display: none; }

.v2-field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.v2-select {
  width: 100%;
  background: var(--surface-low);
  border: 1px solid var(--outline);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--text);
  outline: none;
}

.v2-sheet-footer {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--outline);
}

.v2-btn-ghost {
  flex: 0 0 auto;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-mid);
  background: var(--surface-low);
  border: 1px solid var(--outline);
  cursor: pointer;
}

/* ── Session canvas ───────────────────────────────────────────────────────── */
.v2-canvas {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.v2-canvas-header {
  flex-shrink: 0;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--outline);
  background: var(--surface-card);
}

.v2-canvas-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-mid);
  padding: 6px 0;
  cursor: pointer;
  background: none;
  border: none;
}

.v2-canvas-status {
  font-size: 13px;
  color: var(--text-faint);
  font-style: italic;
}

/* Exchange area: scrolls */
.v2-exchange {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  -webkit-overflow-scrolling: touch;
}

/* Turn label above AI response */
.v2-turn-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
  display: none;
}
.v2-turn-label.visible { display: block; }

/* AI response area (word cards rendered by renderer.js) */
#v2AiResponse {
  margin-bottom: 16px;
  min-height: 60px;
}

/* Transcript */
.v2-transcript {
  font-size: 14px;
  color: var(--text-faint);
  font-style: italic;
  min-height: 20px;
  margin-bottom: 8px;
}

/* Imitation panel */
.v2-imitation-panel {
  background: var(--surface-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--outline);
  padding: 16px;
  margin-bottom: 16px;
  display: none;
}
.v2-imitation-panel.active { display: block; }

.v2-imitation-sentence {
  font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', serif;
  font-size: 20px;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 8px;
}

.v2-imitation-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-faint);
}

/* Pronunciation score chips — shown after imitation recording is graded */
.imit-score-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  min-width: 40px;
  text-align: center;
}
.imit-score-chip .imit-score-pinyin {
  font-size: 10px;
  font-weight: 400;
  opacity: 0.8;
}
.imit-score-chip.imit-score-good  { background: #d4edda; color: #1a5c2a; }
.imit-score-chip.imit-score-tone  { background: #fff3cd; color: #7a5a00; }
.imit-score-chip.imit-score-bad   { background: #f8d7da; color: #7c1a22; }

/* Bottom mic area */
.v2-bottom {
  flex-shrink: 0;
  background: var(--surface-card);
  border-top: 1px solid var(--outline);
  padding: 16px 16px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.v2-your-turn {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  opacity: 0;
  transition: opacity var(--anim-std);
}
.v2-your-turn.visible { opacity: 1; }

/* The mic button — large and centered */
.v2-mic-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,78,159,0.4);
  transition: transform var(--anim-fast), box-shadow var(--anim-fast), background var(--anim-fast);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.v2-mic-btn:active, .v2-mic-btn.recording {
  transform: scale(0.94);
  background: var(--primary-dark);
  box-shadow: 0 2px 8px rgba(0,78,159,0.3);
}
.v2-mic-btn.recording {
  animation: pulse-ring 1.2s ease infinite;
}

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(0,78,159,0.4); }
  70%  { box-shadow: 0 0 0 16px rgba(0,78,159,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,78,159,0); }
}

.v2-mic-hint {
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.03em;
  margin-top: 6px;
  transition: color var(--anim-fast);
}
.v2-mic-hint.recording {
  color: var(--primary);
}

/* Text input row */
.v2-text-row {
  display: flex;
  gap: 8px;
  width: 100%;
  align-items: center;
}

.v2-chat-input {
  flex: 1;
  background: var(--surface-low);
  border: 1px solid var(--outline);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--text);
  outline: none;
}
.v2-chat-input:focus { border-color: var(--primary); }
.v2-chat-input:disabled { opacity: 0.4; }

.v2-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity var(--anim-fast);
}
.v2-send-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* Stop / cancel button */
.v2-stop-btn {
  display: none;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  background: var(--surface-low);
  border: 1px solid var(--outline);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
}

/* ── Secondary pages (progress, vocabulary, recordings) ───────────────────── */
.v2-page {
  padding: 20px 20px 48px;
  max-width: 600px;
  margin: 0 auto;
}

.v2-page-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.v2-page-back {
  font-size: 18px;
  color: var(--text-mid);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

/* ── Review page ─────────────────────────────────────────────────────────── */
.v2-review-wrap { padding: 20px; max-width: 500px; margin: 0 auto; }

/* ── Skeleton loading ─────────────────────────────────────────────────────── */
.session-skeleton {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0;
}
.skeleton-word {
  height: 64px;
  width: 72px;
  background: linear-gradient(90deg, var(--surface-low) 25%, var(--surface-card) 50%, var(--surface-low) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-sm);
  animation: shimmer 1.4s infinite;
}
.skeleton-word--wide { width: 100px; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Reduced motion ───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
