/* ============================================================
   Lucid — Coach Design System + 6 Themes
   Mobile-first, themed via body class, zero dependencies
   ============================================================ */

/* ── Theme: Lucid Coach (default) ─────────────────────────── */
:root {
  --bg: #0f1218;
  --bg-pattern: none;
  --surface: #171c26;
  --surface-2: #1e2433;
  --border: #262d3d;
  --border-light: #343d52;
  --primary: #c9956b;
  --primary-light: #deb896;
  --primary-bg: rgba(201,149,107,.10);
  --green: #5b9a6f;
  --green-bg: rgba(91,154,111,.10);
  --amber: #d4a44a;
  --amber-bg: rgba(212,164,74,.10);
  --red: #c75f5f;
  --red-bg: rgba(199,95,95,.10);
  --blue: #6a9bc3;
  --blue-bg: rgba(106,155,195,.10);
  --text: #e4dfd8;
  --text-2: #b0a898;
  --text-muted: #6b6358;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 18px;
  --shadow: 0 4px 24px rgba(0,0,0,.25);
  --font: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: Georgia, 'Noto Serif', 'Times New Roman', serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;
  --msg-user-bg: var(--primary);
  --msg-user-color: white;
  --msg-adv-bg: var(--surface-2);
  --msg-adv-border: var(--border);
  --nav-bg: rgba(15,18,24,.92);
  --transition: .3s cubic-bezier(.4,0,.2,1);
}

/* ── Theme: Obsidian ──────────────────────────────────────── */
body.theme-obsidian {
  --bg: #0a0e1a;
  --bg-pattern: none;
  --surface: #141b2d;
  --surface-2: #1a2340;
  --border: #1e2a45;
  --border-light: #2b3a5c;
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-bg: rgba(99,102,241,.12);
  --green: #22c55e;
  --green-bg: rgba(34,197,94,.12);
  --amber: #f59e0b;
  --amber-bg: rgba(245,158,11,.12);
  --red: #ef4444;
  --red-bg: rgba(239,68,68,.12);
  --blue: #3b82f6;
  --blue-bg: rgba(59,130,246,.12);
  --text: #f1f5f9;
  --text-2: #cbd5e1;
  --text-muted: #64748b;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,.3);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;
  --msg-user-bg: var(--primary);
  --msg-user-color: white;
  --msg-adv-bg: var(--surface-2);
  --msg-adv-border: var(--border);
  --nav-bg: rgba(10,14,26,.85);
  --transition: .25s cubic-bezier(.4,0,.2,1);
}

/* ── Theme: Terminal ──────────────────────────────────────── */
body.theme-terminal {
  --bg: #0d0d0d; --surface: #151515; --surface-2: #1a1a1a;
  --border: #2a2a2a; --border-light: #3a3a3a;
  --primary: #00ff41; --primary-light: #39ff70; --primary-bg: rgba(0,255,65,.08);
  --green: #00ff41; --green-bg: rgba(0,255,65,.08);
  --amber: #ffb300; --amber-bg: rgba(255,179,0,.08);
  --red: #ff3333; --red-bg: rgba(255,51,51,.08);
  --blue: #00bfff; --blue-bg: rgba(0,191,255,.08);
  --text: #00ff41; --text-2: #00cc33; --text-muted: #008822;
  --font: 'Courier New', 'Fira Code', monospace;
  --font-display: 'Courier New', 'Fira Code', monospace;
  --msg-user-bg: rgba(0,255,65,.12); --msg-user-color: #00ff41;
  --msg-adv-bg: #111; --msg-adv-border: #2a2a2a;
  --nav-bg: rgba(13,13,13,.95);
  --shadow: 0 0 20px rgba(0,255,65,.05);
}
body.theme-terminal { background-image: repeating-linear-gradient(0deg, rgba(0,255,65,.03) 0px, transparent 1px, transparent 3px); }
body.theme-terminal .nav-logo { background: #00ff41; color: #0d0d0d; border-radius: 2px; }
body.theme-terminal .msg.user { border: 1px solid rgba(0,255,65,.3); border-radius: 2px; }
body.theme-terminal .msg.adversary { border-radius: 2px; }
body.theme-terminal .card { border-style: dashed; }
body.theme-terminal .preset-card:hover { box-shadow: 0 0 20px rgba(0,255,65,.2); border-color: #00ff41; }

/* ── Theme: Poker ─────────────────────────────────────────── */
body.theme-poker {
  --bg: #1a3a1a; --surface: #1e4620; --surface-2: #235228;
  --border: #2d6630; --border-light: #3a8040;
  --primary: #d4a017; --primary-light: #f0c040; --primary-bg: rgba(212,160,23,.12);
  --green: #4ade80; --green-bg: rgba(74,222,128,.1);
  --amber: #d4a017; --amber-bg: rgba(212,160,23,.1);
  --red: #dc2626; --red-bg: rgba(220,38,38,.12);
  --blue: #60a5fa; --blue-bg: rgba(96,165,250,.1);
  --text: #f5f0e0; --text-2: #d4c9a8; --text-muted: #8a7e5e;
  --font: 'Georgia', 'Palatino', serif;
  --font-display: Georgia, 'Palatino', serif;
  --radius: 6px; --radius-sm: 4px; --radius-lg: 8px;
  --msg-user-bg: rgba(212,160,23,.2); --msg-user-color: #f0c040;
  --msg-adv-bg: #1a3a1a; --msg-adv-border: #3a8040;
  --nav-bg: rgba(20,40,20,.95);
  --shadow: 0 4px 20px rgba(0,0,0,.5);
}
body.theme-poker { background-image: radial-gradient(ellipse at 50% 50%, #1e4620 0%, #142814 100%); }
body.theme-poker .nav-logo { background: linear-gradient(135deg, #d4a017, #b8860b); border-radius: 50%; }
body.theme-poker .msg.user { border: 1px solid rgba(212,160,23,.3); }
body.theme-poker .stat-card.accent { border-color: #d4a017; background: rgba(212,160,23,.08); }
body.theme-poker .preset-card:hover { border-color: #d4a017; box-shadow: 0 0 25px rgba(212,160,23,.15); }
body.theme-poker .gauge-fill.green { background: linear-gradient(90deg, #2d8a4e, #4ade80); }

/* ── Theme: Dojo ──────────────────────────────────────────── */
body.theme-dojo {
  --bg: #f5f0e8; --surface: #ebe5d8; --surface-2: #e0d8c8;
  --border: #c8bfa8; --border-light: #b8a888;
  --primary: #8b4513; --primary-light: #a0522d; --primary-bg: rgba(139,69,19,.08);
  --green: #2e7d32; --green-bg: rgba(46,125,50,.08);
  --amber: #bf8c00; --amber-bg: rgba(191,140,0,.08);
  --red: #c62828; --red-bg: rgba(198,40,40,.08);
  --blue: #1565c0; --blue-bg: rgba(21,101,192,.08);
  --text: #2c1810; --text-2: #4a3520; --text-muted: #8a7560;
  --font: 'Noto Serif', 'Georgia', serif;
  --font-display: 'Noto Serif', Georgia, serif;
  --radius: 2px; --radius-sm: 1px; --radius-lg: 3px;
  --msg-user-bg: rgba(139,69,19,.1); --msg-user-color: #4a2800;
  --msg-adv-bg: #ebe5d8; --msg-adv-border: #c8bfa8;
  --nav-bg: rgba(245,240,232,.95);
  --shadow: 0 2px 12px rgba(0,0,0,.08);
}
body.theme-dojo .nav-logo { background: #8b4513; border-radius: 50%; }
body.theme-dojo .card { border-top: 3px solid #8b4513; border-left: none; border-right: none; border-bottom: none; border-radius: 0; }
body.theme-dojo .msg.user { border-bottom: 2px solid #8b4513; border-radius: 0; background: rgba(139,69,19,.06); }
body.theme-dojo .msg.adversary { border-bottom: 1px solid #c8bfa8; border-radius: 0; }
body.theme-dojo .preset-card { border: none; border-bottom: 2px solid #c8bfa8; border-radius: 0; }
body.theme-dojo .preset-card:hover { border-bottom-color: #8b4513; transform: none; box-shadow: none; }
body.theme-dojo .gauge-track { border-radius: 0; height: 4px; }
body.theme-dojo .gauge-fill { border-radius: 0; }
body.theme-dojo .btn-primary { border-radius: 0; }

/* ── Theme: Neon ──────────────────────────────────────────── */
body.theme-neon {
  --bg: #0c0015; --surface: rgba(20,10,40,.6); --surface-2: rgba(30,15,60,.5);
  --border: rgba(138,43,226,.25); --border-light: rgba(138,43,226,.4);
  --primary: #e040fb; --primary-light: #ea80fc; --primary-bg: rgba(224,64,251,.1);
  --green: #00e676; --green-bg: rgba(0,230,118,.1);
  --amber: #ffea00; --amber-bg: rgba(255,234,0,.08);
  --red: #ff1744; --red-bg: rgba(255,23,68,.1);
  --blue: #00e5ff; --blue-bg: rgba(0,229,255,.1);
  --text: #f0e6ff; --text-2: #c0a0e0; --text-muted: #7050a0;
  --font: 'Inter', system-ui, sans-serif;
  --font-display: 'Inter', system-ui, sans-serif;
  --radius: 16px; --radius-sm: 12px; --radius-lg: 20px;
  --msg-user-bg: rgba(224,64,251,.15); --msg-user-color: #ea80fc;
  --msg-adv-bg: rgba(0,229,255,.05); --msg-adv-border: rgba(0,229,255,.2);
  --nav-bg: rgba(12,0,21,.8);
  --shadow: 0 4px 30px rgba(224,64,251,.1);
}
body.theme-neon { background-image: radial-gradient(ellipse at 30% 20%, rgba(138,43,226,.15) 0%, transparent 50%), radial-gradient(ellipse at 70% 80%, rgba(0,229,255,.1) 0%, transparent 50%); }
body.theme-neon .nav { backdrop-filter: blur(20px); border-bottom: 1px solid rgba(224,64,251,.2); }
body.theme-neon .nav-logo { background: linear-gradient(135deg, #e040fb, #00e5ff); box-shadow: 0 0 20px rgba(224,64,251,.4); }
body.theme-neon .card { backdrop-filter: blur(12px); border: 1px solid rgba(138,43,226,.2); }
body.theme-neon .msg.user { box-shadow: 0 0 15px rgba(224,64,251,.15); border: 1px solid rgba(224,64,251,.2); }
body.theme-neon .msg.adversary { box-shadow: 0 0 10px rgba(0,229,255,.1); }
body.theme-neon .preset-card:hover { box-shadow: 0 0 30px rgba(224,64,251,.25); border-color: #e040fb; }
body.theme-neon .btn-primary { background: linear-gradient(135deg, #e040fb, #7c4dff); box-shadow: 0 0 20px rgba(224,64,251,.3); }
body.theme-neon .gauge-fill.green { background: linear-gradient(90deg, #00c853, #00e676); box-shadow: 0 0 8px rgba(0,230,118,.4); }
body.theme-neon .gauge-fill.red { background: linear-gradient(90deg, #d50000, #ff1744); box-shadow: 0 0 8px rgba(255,23,68,.4); }
body.theme-neon .gauge-fill.blue { background: linear-gradient(90deg, #00b8d4, #00e5ff); box-shadow: 0 0 8px rgba(0,229,255,.4); }
body.theme-neon .gauge-fill.amber { background: linear-gradient(90deg, #ffd600, #ffea00); box-shadow: 0 0 8px rgba(255,234,0,.3); }
body.theme-neon .stat-value { text-shadow: 0 0 20px currentColor; }

/* ── Reset + Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body, var(--font)); background: var(--bg); color: var(--text); line-height: 1.5; min-height: 100vh; min-height: 100dvh; transition: background .4s, color .4s; }

h1 { font-family: var(--font-display, var(--font)); font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; }
h2 { font-family: var(--font-display, var(--font)); font-size: 1.15rem; font-weight: 600; margin-bottom: 12px; }
h3 { font-size: .9rem; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.text-muted { color: var(--text-muted); font-size: .9rem; }
.required { color: var(--red); }
.mt-12 { margin-top: 12px; }

.container { max-width: 1080px; margin: 0 auto; padding: 16px; }
.view { display: none; }
.view.active { display: block; }
.hidden { display: none !important; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; gap: 16px; } }

/* ── Nav ──────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; height: 56px;
  background: var(--nav-bg); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.nav-logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), #a78bfa);
  display: grid; place-items: center; font-weight: 800; font-size: .95rem; color: white;
}
.nav-title { font-family: var(--font-display, var(--font)); font-weight: 700; font-size: .95rem; }
.nav-links { display: flex; gap: 2px; }
.nav-link {
  background: none; border: none; color: var(--text-muted); font: inherit;
  padding: 6px 10px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: .85rem; transition: var(--transition);
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--primary-light); background: var(--primary-bg); }
.nav-player {
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
  font: inherit; font-size: .8rem; font-weight: 600; padding: 4px 12px;
  border-radius: 20px; cursor: pointer; transition: var(--transition);
  max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-player:hover { border-color: var(--primary); color: var(--primary-light); }
.nav-right { display: flex; align-items: center; gap: 6px; }
.nav-settings {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: 1.1rem; padding: 6px; transition: var(--transition);
  display: grid; place-items: center; min-width: 36px; min-height: 36px;
}
.nav-settings:hover { color: var(--text); }
@media (min-width: 768px) {
  .nav { padding: 0 24px; height: 64px; }
  .nav-logo { width: 34px; height: 34px; }
  .nav-link { padding: 8px 14px; font-size: .9rem; }
  .nav-player { font-size: .85rem; padding: 6px 14px; }
}

.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 8px; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: var(--radius-sm); border: none;
  font: inherit; font-weight: 600; cursor: pointer; transition: var(--transition);
  white-space: nowrap; -webkit-tap-highlight-color: transparent;
  min-height: 44px; /* touch target */
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-light); }
.btn-outline { background: transparent; color: var(--text-2); border: 1px solid var(--border-light); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary-light); }
.btn-ghost { background: transparent; color: var(--text-muted); padding: 6px 12px; min-height: 36px; }
.btn-ghost:hover { color: var(--text); background: var(--surface); }
.btn-sm { font-size: .8rem; padding: 6px 12px; min-height: 36px; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  box-shadow: var(--shadow); transition: background .4s, border-color .4s, transform .25s, box-shadow .25s;
}
.card[onclick]:hover, .card.interactive:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}

/* ── Dashboard ────────────────────────────────────────────── */
.dashboard-filters-card { margin-bottom: 16px; }
.dashboard-filters-grid { margin-bottom: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; } }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px; text-align: center;
}
.stat-card.accent { border-color: var(--primary); background: var(--primary-bg); }
.stat-value { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; transition: color .3s; }
@media (min-width: 768px) { .stat-value { font-size: 2rem; } }
.stat-label { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }

.belts-grid { display: flex; flex-direction: column; gap: 8px; }
.belt-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border); }
.belt-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--border-light); flex-shrink: 0; }
.belt-dot.earned { border: none; box-shadow: 0 0 8px currentColor; background: currentColor; }
.belt-dot[data-color="white"] { color: #e2e8f0; } .belt-dot[data-color="yellow"] { color: #facc15; }
.belt-dot[data-color="green"] { color: #22c55e; } .belt-dot[data-color="blue"] { color: #3b82f6; }
.belt-dot[data-color="black"] { color: #a78bfa; }
.belt-name { font-size: .85rem; flex: 1; } .belt-progress { font-size: .75rem; color: var(--text-muted); }

.weakness-list { display: flex; flex-direction: column; gap: 6px; }
.weakness-item { padding: 6px 10px; border-radius: var(--radius-sm); background: var(--red-bg); color: var(--red); font-size: .85rem; border: 1px solid rgba(239,68,68,.2); }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 10px; border-radius: 999px; background: var(--bg);
  border: 1px solid var(--border); color: var(--text-2); font-size: .8rem;
}
.chip strong { color: var(--text); }
.metric-list { display: flex; flex-direction: column; gap: 10px; }
.metric-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border);
}
.metric-label { font-size: .85rem; color: var(--text-2); }
.metric-value { font-size: .85rem; font-weight: 700; color: var(--text); }
.section-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:14px; }
.section-head h2 { margin-bottom:4px; }
.section-actions { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
.academy-stack { display:flex; flex-direction:column; gap:12px; }
.academy-item { padding:12px; border:1px solid var(--border); border-radius: var(--radius); background: var(--surface-2, rgba(255,255,255,.02)); }
.academy-item.recommended { border-color: var(--primary); box-shadow: 0 8px 24px rgba(99,102,241,.10); }
.academy-item-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; }
.academy-meta { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.academy-hero { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:10px; margin-bottom:12px; }
.hero-kicker { font-size:.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing:.05em; }
.hero-value { font-size:1.2rem; font-weight:800; }
.academy-details summary { cursor:pointer; font-weight:700; margin-top:6px; }
.academy-pre { white-space:pre-wrap; font-family:inherit; font-size:.82rem; color: var(--text-2); background: var(--bg); border-radius: var(--radius-sm); padding:10px; margin-top:10px; }
.badge { display:inline-flex; align-items:center; padding:2px 8px; border-radius:999px; font-size:.72rem; font-weight:700; background: var(--primary-bg); color: var(--primary-light); border:1px solid rgba(99,102,241,.18); }
.badge-success { background: var(--green-bg); color: var(--green); border-color: rgba(34,197,94,.18); }
.divider.compact { margin: 18px 0 12px; }

/* ── Hero CTA ─────────────────────────────────────────────── */
.hero-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px; margin-bottom: 20px;
  background: linear-gradient(135deg, var(--primary-bg), rgba(99,102,241,.05));
  border: 2px solid var(--primary); border-radius: var(--radius-lg); flex-wrap: wrap;
}
.hero-cta h2 { font-size: 1.15rem; margin: 0 0 4px 0; }
.hero-cta p { color: var(--text-2); font-size: .9rem; margin: 0; }
.hero-content { flex: 1; min-width: 200px; }
.real-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 16px; }

/* ── Coach Hero (dashboard cold state) ────────────────────── */
.coach-hero { text-align: center; padding: 48px 16px 32px; max-width: 520px; margin: 0 auto; }
.coach-hero h1 { font-family: var(--font-display, var(--font)); font-size: 1.8rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: 8px; line-height: 1.2; }
@media (min-width: 768px) { .coach-hero h1 { font-size: 2.2rem; } }
.coach-hero p { color: var(--text-2); font-size: 1rem; line-height: 1.6; margin-bottom: 28px; }
.coach-hero .quickstart-options { max-width: 400px; margin: 0 auto; }

/* ── Prep sheet ───────────────────────────────────────────── */
.prep-section { margin-bottom: 20px; }
.prep-section h3 { color: var(--primary-light); margin-bottom: 8px; font-size: .95rem; }
.prep-opening { padding: 16px; background: var(--primary-bg); border: 1px solid var(--primary); border-radius: var(--radius-sm); font-size: 1.05rem; font-weight: 600; line-height: 1.5; margin-bottom: 16px; }
.prep-list { padding-left: 18px; } .prep-list li { margin-bottom: 6px; font-size: .9rem; color: var(--text-2); line-height: 1.4; }
.prep-if-card { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--bg); border-left: 3px solid var(--amber); margin-bottom: 8px; }
.prep-if-trigger { font-weight: 700; font-size: .85rem; color: var(--amber); }
.prep-if-response { font-size: .9rem; color: var(--text-2); margin-top: 2px; }
.prep-if-why { font-size: .8rem; color: var(--text-muted); font-style: italic; margin-top: 2px; }
.prep-confidence { padding: 16px; background: var(--green-bg); border: 1px solid rgba(34,197,94,.2); border-radius: var(--radius-sm); font-size: .95rem; color: var(--green); text-align: center; font-weight: 600; margin-top: 16px; }
.prep-one-thing { padding: 16px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: 1.05rem; font-weight: 600; text-align: center; margin-top: 12px; border: 1px solid var(--border); }

/* ── Empty State ──────────────────────────────────────────── */
.empty-state { text-align: center; padding: 56px 20px; }
.empty-icon { font-size: 3.5rem; margin-bottom: 16px; }
.empty-state h2 { margin-bottom: 10px; } .empty-state p { color: var(--text-muted); margin-bottom: 24px; font-size: .95rem; line-height: 1.6; }

/* ── Setup / Presets ──────────────────────────────────────── */
.section-title { margin-bottom: 12px; }
.presets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 10px; margin-bottom: 20px; }
@media (min-width: 768px) { .presets-grid { grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 12px; } }
.preset-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; cursor: pointer; transition: var(--transition); -webkit-tap-highlight-color: transparent; }
.preset-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(99,102,241,.15); }
.preset-card:active { transform: translateY(0); }
.preset-emoji { font-size: 1.6rem; margin-bottom: 8px; }
.preset-name { font-weight: 700; font-size: .95rem; margin-bottom: 4px; }
.preset-desc { font-size: .82rem; color: var(--text-muted); line-height: 1.5; }

.divider { text-align: center; margin: 24px 0; position: relative; }
.divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border); }
.divider span { position: relative; background: var(--bg); padding: 0 16px; color: var(--text-muted); font-size: .85rem; }

.setup-form { max-width: 720px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 20px; }
@media (min-width: 600px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-group.full { grid-column: 1/-1; }
.form-group label { display: block; font-size: .8rem; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font: inherit; font-size: 16px; /* prevent iOS zoom */ transition: var(--transition);
}
.form-group textarea { resize: vertical; min-height: 96px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.form-input {
  padding: 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font: inherit; font-size: 16px; transition: var(--transition);
}
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }

.quickstart-options { display: flex; flex-direction: column; gap: 8px; }
.quickstart-option {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font: inherit; font-size: .95rem;
  cursor: pointer; transition: var(--transition); text-align: left;
}
.quickstart-option:hover { border-color: var(--primary); background: var(--primary-bg); }
.quickstart-emoji { font-size: 1.5rem; flex-shrink: 0; }
.quickstart-label { font-weight: 500; }
.versus-lab-card { margin-top: 8px; }
.versus-result { margin-top: 14px; padding: 12px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border); white-space: pre-wrap; }

.difficulty-selector { display: flex; gap: 6px; flex-wrap: wrap; }
.diff-option { cursor: pointer; }
.diff-option input { display: none; }
.diff-badge { display: inline-block; padding: 8px 12px; border-radius: var(--radius-sm); font-size: .8rem; font-weight: 600; border: 1px solid var(--border); transition: var(--transition); }
.diff-option input:checked + .diff-badge { border-width: 2px; }
.diff-badge.cooperative { color: var(--green); } .diff-option input:checked + .diff-badge.cooperative { background: var(--green-bg); border-color: var(--green); }
.diff-badge.neutral { color: var(--blue); } .diff-option input:checked + .diff-badge.neutral { background: var(--blue-bg); border-color: var(--blue); }
.diff-badge.hostile { color: var(--amber); } .diff-option input:checked + .diff-badge.hostile { background: var(--amber-bg); border-color: var(--amber); }
.diff-badge.manipulative { color: var(--red); } .diff-option input:checked + .diff-badge.manipulative { background: var(--red-bg); border-color: var(--red); }

/* ── Briefing ─────────────────────────────────────────────── */
.briefing-context { line-height: 1.6; }
.briefing-context h3 { margin-top: 10px; }
.briefing-context p { color: var(--text-2); font-size: .9rem; }
.briefing-context .role-tag { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: .75rem; font-weight: 600; background: var(--primary-bg); color: var(--primary-light); }
.odds-badge { font-size: 1.3rem; font-weight: 900; padding: 4px 14px; border-radius: var(--radius-sm); }
.briefing-fields { display: flex; flex-direction: column; gap: 14px; }
.briefing-fields textarea, .briefing-fields input {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font: inherit; font-size: 16px; resize: vertical; transition: var(--transition);
}
.briefing-fields textarea:focus, .briefing-fields input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }

/* ── Sliders ──────────────────────────────────────────────── */
.slider-mode { display: flex; flex-direction: column; gap: 20px; }
.slider-group { }
.slider-header { display: flex; justify-content: space-between; font-size: .75rem; color: var(--text-muted); margin-bottom: 6px; }
.slider-label { font-weight: 700; color: var(--text-2); }
.slider-input {
  width: 100%; height: 6px; -webkit-appearance: none; appearance: none;
  background: var(--border); border-radius: 3px; outline: none; cursor: pointer;
}
.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--primary); border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--primary-bg), 0 2px 8px rgba(0,0,0,.3);
  cursor: grab; transition: transform .15s;
}
.slider-input::-webkit-slider-thumb:active { transform: scale(1.2); cursor: grabbing; }
.slider-input::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--primary); border: 3px solid var(--bg); cursor: grab;
}

/* ── Guided Rounds ────────────────────────────────────────── */
.guided-choices { padding: 10px 12px; border-top: 1px solid var(--border); background: var(--surface); }
.guided-label { font-size: .8rem; color: var(--text-muted); margin-bottom: 8px; font-weight: 600; }
.guided-btns { display: flex; flex-direction: column; gap: 8px; }
.guided-choice {
  padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font: inherit; font-size: .9rem;
  cursor: pointer; text-align: left; transition: var(--transition);
  line-height: 1.4; min-height: 44px;
}
.guided-choice:hover { border-color: var(--primary); background: var(--primary-bg); }
.guided-choice:active { transform: scale(.98); }
.guided-choice .choice-technique { font-size: .7rem; color: var(--text-muted); margin-top: 4px; display: block; }
.choice-feedback {
  padding: 10px 14px; margin: 6px 12px; border-radius: var(--radius-sm);
  font-size: .85rem; line-height: 1.5; animation: msgIn .3s ease;
}
.choice-feedback.positive { background: var(--green-bg); color: var(--green); border-left: 3px solid var(--green); }
.choice-feedback.negative { background: var(--red-bg); color: var(--red); border-left: 3px solid var(--red); }
.choice-feedback.neutral { background: var(--amber-bg); color: var(--amber); border-left: 3px solid var(--amber); }

/* ── Theory Insights ──────────────────────────────────────── */
.theory-insights { display: flex; flex-direction: column; gap: 10px; }
.theory-card { padding: 12px; border-radius: var(--radius-sm); border-left: 3px solid var(--border-light); background: var(--bg); }
.theory-card.positive { border-left-color: var(--green); }
.theory-card.high { border-left-color: var(--red); }
.theory-card.medium { border-left-color: var(--amber); }
.theory-framework { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 4px; }
.theory-observation { font-size: .85rem; color: var(--text-2); margin-bottom: 4px; }
.theory-recommendation { font-size: .85rem; color: var(--primary-light); font-style: italic; }

/* ── Negotiation ──────────────────────────────────────────── */
.negotiate-layout { display: flex; flex-direction: column; height: calc(100vh - 56px); height: calc(100dvh - 56px); }
@media (min-width: 768px) { .negotiate-layout { height: calc(100vh - 64px); height: calc(100dvh - 64px); } }

.nego-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 12px; background: var(--surface); border-bottom: 1px solid var(--border);
  flex-shrink: 0; flex-wrap: wrap; gap: 4px; min-height: 40px;
}
.topbar-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.act-badge { padding: 3px 10px; border-radius: 20px; font-size: .7rem; font-weight: 700; background: var(--primary-bg); color: var(--primary-light); }
.turn-counter { font-size: .8rem; color: var(--text-2); font-weight: 600; }
.session-status { font-size: .7rem; color: var(--green); text-transform: uppercase; letter-spacing: .05em; }
.adversary-name { font-size: .8rem; color: var(--text-muted); }

.nego-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
@media (min-width: 900px) { .nego-body { display: grid; grid-template-columns: 1fr 300px; } }

/* Chat */
.chat-panel { display: flex; flex-direction: column; overflow: hidden; flex: 1; }
.messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; -webkit-overflow-scrolling: touch; }
@media (min-width: 768px) { .messages { padding: 20px; } }
.msg {
  max-width: 85%; padding: 10px 14px; border-radius: var(--radius-lg);
  font-size: .9rem; line-height: 1.5; white-space: pre-wrap; animation: msgIn .3s ease;
  word-break: break-word;
}
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.msg.user { align-self: flex-end; background: var(--msg-user-bg); color: var(--msg-user-color); border-bottom-right-radius: 4px; }
.msg.adversary { align-self: flex-start; background: var(--msg-adv-bg); border: 1px solid var(--msg-adv-border); border-bottom-left-radius: 4px; }
.msg.system { align-self: center; background: var(--amber-bg); color: var(--amber); font-size: .8rem; border-radius: 20px; padding: 6px 14px; }

/* Input area -- MOBILE FIRST: big touch targets */
.turn-form { padding: 8px 12px; border-top: 1px solid var(--border); background: var(--surface); flex-shrink: 0; }
.input-row { display: flex; gap: 8px; }
.input-row input {
  flex: 1; padding: 12px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font: inherit; font-size: 16px; transition: var(--transition);
  min-height: 48px;
}
.input-row input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.input-actions { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; align-items: center; }

/* Mobile indicators drawer */
.indicators-panel {
  display: none; overflow-y: auto; padding: 12px; border-left: 1px solid var(--border);
  background: var(--surface); flex-direction: column; gap: 16px;
}
@media (min-width: 900px) { .indicators-panel { display: flex; } }

/* Mobile mini-gauges (shown below chat on mobile) */
.mobile-gauges {
  display: flex; gap: 6px; padding: 6px 12px; background: var(--surface);
  border-top: 1px solid var(--border); overflow-x: auto; flex-shrink: 0;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.mobile-gauges::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .mobile-gauges { display: none; } }
.mini-gauge {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 56px; padding: 4px 6px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--border); flex-shrink: 0;
}
.mini-gauge-label { font-size: .6rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.mini-gauge-value { font-size: .85rem; font-weight: 800; }

.indicator-section h3 { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 8px; }

/* Gauges */
.gauge-list { display: flex; flex-direction: column; gap: 10px; }
.gauge-header { display: flex; justify-content: space-between; font-size: .75rem; margin-bottom: 3px; }
.gauge-label { color: var(--text-2); } .gauge-value { font-weight: 700; }
.gauge-track { height: 5px; border-radius: 3px; background: var(--bg); overflow: hidden; position: relative; }
.gauge-fill { height: 100%; border-radius: 3px; transition: width .6s cubic-bezier(.4,0,.2,1); min-width: 2px; }
.gauge-fill.green { background: linear-gradient(90deg, #16a34a, #22c55e); }
.gauge-fill.red { background: linear-gradient(90deg, #dc2626, #ef4444); }
.gauge-fill.blue { background: linear-gradient(90deg, #2563eb, #3b82f6); }
.gauge-fill.amber { background: linear-gradient(90deg, #d97706, #f59e0b); }

.gauge-track.signed { position: relative; }
.gauge-track.signed::before { content: ''; position: absolute; top: 0; left: 50%; width: 1px; height: 100%; background: var(--border-light); z-index: 1; }
.gauge-fill-signed { position: absolute; top: 0; height: 100%; border-radius: 3px; transition: all .6s cubic-bezier(.4,0,.2,1); }
.gauge-value.trend-gaining { color: var(--green); } .gauge-value.trend-losing { color: var(--red); } .gauge-value.trend-stable { color: var(--amber); }

.coaching-box { font-size: .85rem; color: var(--text-2); line-height: 1.5; padding: 10px; background: var(--bg); border-radius: var(--radius-sm); border-left: 3px solid var(--primary); }
.coaching-bias { color: var(--red); font-weight: 600; } .coaching-tip { color: var(--green); }
.signals-box { display: flex; flex-wrap: wrap; gap: 4px; }
.signal-tag { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: .7rem; font-weight: 600; background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }

/* Round scoring */
.round-display { text-align: center; padding: 6px; }
.round-points { font-size: 1.8rem; font-weight: 900; line-height: 1; transition: var(--transition); }
.round-points.positive { color: var(--green); } .round-points.negative { color: var(--red); } .round-points.neutral { color: var(--text-muted); }
.round-label { font-size: .8rem; font-weight: 600; margin-top: 3px; } .round-cumul { font-size: .75rem; margin-top: 2px; }

/* ── Modal ────────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  animation: modalBgIn .25s ease;
}
@keyframes modalBgIn { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 600px) { .modal { align-items: center; } }
.modal-content {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%; max-height: 85vh; overflow-y: auto;
  box-shadow: 0 -10px 40px rgba(0,0,0,.4);
  animation: modalSlideUp .3s cubic-bezier(.4,0,.2,1);
}
@keyframes modalSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 600px) { .modal-content { border-radius: var(--radius-lg); width: min(600px, 90vw); max-height: 80vh; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; min-width: 44px; min-height: 44px; }
.modal-body { padding: 16px; }
.loading { text-align: center; padding: 30px; color: var(--text-muted); }

.sim-actions { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:10px; }
.sim-textarea {
  width:100%; padding:12px; border-radius: var(--radius-sm);
  border:1px solid var(--border); background: var(--bg); color: var(--text);
  font: inherit; resize: vertical; margin-bottom: 8px;
}
.sim-textarea:focus { outline:none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.sim-results-block { margin-top: 12px; display:flex; flex-direction:column; gap:12px; }
.sim-card { border:1px solid var(--border); border-radius: var(--radius); padding:12px; background: var(--bg); }
.sim-card.best { border-color: var(--green); box-shadow: 0 8px 24px rgba(34,197,94,.12); }
.sim-card-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; }
.sim-card-meta { display:flex; flex-wrap:wrap; gap:8px; margin: 8px 0; }
.sim-variant { white-space: pre-wrap; color: var(--text-2); }
.sim-verdict { font-size: 1rem; font-weight: 700; margin-bottom: 10px; padding: 10px 14px; border-radius: var(--radius-sm); }
.sim-verdict.send { background: var(--green-bg); color: var(--green); }
.sim-verdict.revise { background: var(--amber-bg); color: var(--amber); }
.sim-verdict.do_not_send { background: var(--red-bg); color: var(--red); }
.sim-score { font-size: 1.8rem; font-weight: 800; text-align: center; margin: 10px 0; }
.sim-section { margin-top: 14px; }
.sim-section h4 { font-size: .8rem; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; }
.sim-list { padding-left: 16px; } .sim-list li { font-size: .85rem; color: var(--text-2); margin-bottom: 3px; }
.sim-rewrite { padding: 10px; background: var(--bg); border-radius: var(--radius-sm); border: 1px dashed var(--primary); font-size: .85rem; color: var(--text-2); white-space: pre-wrap; }

/* ── Results ──────────────────────────────────────────────── */
.results-hero { text-align: center; margin-bottom: 24px; }
.score-circle { width: 100px; height: 100px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 2.2rem; font-weight: 900; border: 4px solid var(--border); margin-bottom: 6px; }
.score-circle.excellent { border-color: var(--green); color: var(--green); background: var(--green-bg); }
.score-circle.good { border-color: var(--blue); color: var(--blue); background: var(--blue-bg); }
.score-circle.average { border-color: var(--amber); color: var(--amber); background: var(--amber-bg); }
.score-circle.poor { border-color: var(--red); color: var(--red); background: var(--red-bg); }
.score-label { font-size: .85rem; color: var(--text-muted); }
.verdict { font-size: 1rem; font-weight: 600; margin-top: 6px; }

.grade-badge { display: inline-grid; place-items: center; width: 90px; height: 90px; border-radius: 14px; font-size: 2.2rem; font-weight: 900; margin-bottom: 6px; }
.grade-label { font-size: 1.2rem; font-weight: 700; }

.triangle-grid { display: flex; flex-direction: column; gap: 12px; }
.tri-axis { display: grid; grid-template-columns: 80px 1fr 36px; gap: 8px; align-items: center; }
@media (min-width: 600px) { .tri-axis { grid-template-columns: 100px 1fr 40px; } }
.tri-label { font-size: .8rem; color: var(--text-2); font-weight: 600; }
.tri-bar-track { height: 8px; border-radius: 4px; background: var(--bg); overflow: hidden; }
.tri-bar-fill { height: 100%; border-radius: 4px; transition: width 1s cubic-bezier(.4,0,.2,1); }
.tri-bar-fill.green { background: linear-gradient(90deg, #16a34a, #22c55e); }
.tri-bar-fill.blue { background: linear-gradient(90deg, #2563eb, #3b82f6); }
.tri-bar-fill.amber { background: linear-gradient(90deg, #d97706, #f59e0b); }
.tri-value { font-weight: 800; text-align: right; font-size: .9rem; }

.rounds-summary { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.round-dot { width: 26px; height: 26px; border-radius: 5px; display: grid; place-items: center; font-size: .7rem; font-weight: 800; }
.round-dot.win { background: var(--green-bg); color: var(--green); }
.round-dot.lose { background: var(--red-bg); color: var(--red); }
.round-dot.draw { background: rgba(148,163,184,.1); color: var(--text-muted); }

.dimensions-list { display: flex; flex-direction: column; gap: 12px; }
.dim-header { display: flex; justify-content: space-between; font-size: .8rem; margin-bottom: 3px; }
.dim-name { color: var(--text-2); } .dim-score { font-weight: 700; }
.dim-bar { height: 7px; border-radius: 4px; background: var(--bg); overflow: hidden; }
.dim-fill { height: 100%; border-radius: 4px; transition: width .8s cubic-bezier(.4,0,.2,1); }

.biases-list { display: flex; flex-direction: column; gap: 6px; }
.bias-card { padding: 8px 12px; border-radius: var(--radius-sm); background: var(--red-bg); border: 1px solid rgba(239,68,68,.15); }
.bias-type { font-weight: 700; color: var(--red); font-size: .85rem; }
.bias-detail { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }

.tags-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 5px 12px; border-radius: 20px; font-size: .8rem; font-weight: 600; background: var(--primary-bg); color: var(--primary-light); border: 1px solid rgba(99,102,241,.2); }
.recs-list { padding-left: 18px; } .recs-list li { font-size: .85rem; color: var(--text-2); margin-bottom: 5px; line-height: 1.4; }
.results-actions { display: flex; gap: 10px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

/* ── Results Debrief (coach feel) ─────────────────────────── */
.results-debrief { max-width: 560px; margin: 0 auto 24px; text-align: center; }
.results-debrief h2 { font-family: var(--font-display, var(--font)); font-size: 1.3rem; margin-bottom: 12px; }
.debrief-insight { padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 16px; }
.debrief-insight p { font-size: 1rem; line-height: 1.6; color: var(--text-2); }
.debrief-actions { display: flex; flex-direction: column; gap: 8px; max-width: 360px; margin: 0 auto; }
@media (min-width: 600px) { .debrief-actions { flex-direction: row; justify-content: center; } }

.results-details { margin-top: 16px; }
.results-details summary { cursor: pointer; font-weight: 600; color: var(--text-2); font-size: .9rem; padding: 12px 0; }
.results-details[open] summary { margin-bottom: 12px; }

/* ── History ──────────────────────────────────────────────── */
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-row { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); flex-wrap: wrap; }
.history-date { font-size: .75rem; color: var(--text-muted); white-space: nowrap; }
.history-situation { font-size: .85rem; flex: 1; min-width: 100px; }
.history-diff { padding: 2px 8px; border-radius: 20px; font-size: .7rem; font-weight: 600; }
.history-diff.cooperative { background: var(--green-bg); color: var(--green); }
.history-diff.neutral { background: var(--blue-bg); color: var(--blue); }
.history-diff.hostile { background: var(--amber-bg); color: var(--amber); }
.history-diff.manipulative { background: var(--red-bg); color: var(--red); }
.history-score { font-weight: 800; font-size: 1rem; }
.history-status { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.history-status.accepted { color: var(--green); } .history-status.broken, .history-status.quit { color: var(--red); } .history-status.ended { color: var(--amber); }
.history-replay-btn { margin-left: auto; }

/* ── Spinner ──────────────────────────────────────────────── */
.spinner { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--radius-lg); background: var(--surface-2); border: 1px solid var(--border); font-size: .85rem; color: var(--text-muted); align-self: flex-start; animation: msgIn .3s ease; }
.spinner::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border-light); border-top-color: var(--primary-light); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.loading { position: relative; color: transparent; pointer-events: none; }
.btn.loading::after { content: ''; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); border-top-color: white; animation: spin .7s linear infinite; }

/* ── Voice ────────────────────────────────────────────────── */
.btn-voice { background: transparent; color: var(--primary-light); border: 1px solid var(--primary); border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition); }
.btn-voice:hover { background: var(--primary-bg); }
.btn-voice.recording { background: var(--red); color: white; border-color: var(--red); animation: pulse 1.2s ease infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .6; } }
.voice-toggle { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; color: var(--text-muted); cursor: pointer; user-select: none; }
.voice-toggle input { width: 14px; height: 14px; accent-color: var(--primary); }

/* ── Theme Chooser Carousel ───────────────────────────────── */
.theme-chooser { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.theme-slides { position: relative; width: 100%; overflow: hidden; }
.theme-slide { display: none; text-align: center; padding: 16px; animation: fadeIn .3s ease; }
.theme-slide.active { display: block; }
.theme-preview { width: 100%; max-width: 280px; height: 160px; border-radius: var(--radius); margin: 0 auto 16px; border: 1px solid var(--border); }
.theme-slide-name { font-size: 1.2rem; font-weight: 700; font-family: var(--font-display, var(--font)); margin-bottom: 4px; }
.theme-slide-tagline { font-size: .85rem; color: var(--text-muted); margin-bottom: 8px; }
.theme-slide-ideal { font-size: .8rem; color: var(--text-2); font-style: italic; }
.theme-nav { display: flex; align-items: center; gap: 16px; }
.theme-nav-btn { background: none; border: 1px solid var(--border); color: var(--text-2); width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; transition: var(--transition); display: grid; place-items: center; }
.theme-nav-btn:hover { border-color: var(--primary); color: var(--primary-light); }
.theme-dots { display: flex; gap: 8px; }
.theme-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); cursor: pointer; transition: var(--transition); }
.theme-dot.active { background: var(--primary); transform: scale(1.3); }

/* ── Settings Modal ───────────────────────────────────────── */
.settings-section { margin-bottom: 24px; }
.settings-section h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 12px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.settings-row:last-child { border-bottom: none; }
.settings-label { font-size: .9rem; }
.settings-value { font-size: .85rem; color: var(--text-muted); }

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn .3s ease; } .slide-up { animation: slideUp .4s ease; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; } ::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; } ::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ── Paywall / Pro ────────────────────────────────────────── */
.paywall-price { display: flex; align-items: baseline; gap: 6px; }
.paywall-amount { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; color: var(--primary); }
.paywall-period { font-size: 1rem; color: var(--text-muted); }
.paywall-features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.paywall-features li { position: relative; padding-left: 24px; font-size: .92rem; color: var(--text-2); }
.paywall-features li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
#cta-pro { border-color: var(--primary); color: var(--primary-light); }
