/* ── Variables ────────────────────────────────────────────── */
:root {
  --bg: #0f172a;
  --bg2: #1e293b;
  --bg3: #334155;
  --bg4: #475569;
  --text: #f1f5f9;
  --text1: #f1f5f9;
  --text2: #94a3b8;
  --text3: #64748b;
  --blue: #1e40af;
  --blue2: #2563eb;
  --blue3: #3b82f6;
  --blue-light: #dbeafe;
  --green: #10b981;
  --green-dark: #065f46;
  --red: #ef4444;
  --red-dark: #7f1d1d;
  --gold: #f59e0b;
  --accent: #0d9488;
  --accent2: #0e7490;
  --border: #1e293b;
  --border2: #334155;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,.35);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.2);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg2: #ffffff;
  --bg3: #f1f5f9;
  --bg4: #e2e8f0;
  --text: #0f172a;
  --text1: #0f172a;
  --text2: #334155;
  --text3: #64748b;
  --border: #e2e8f0;
  --border2: #cbd5e1;
  --shadow: 0 4px 24px rgba(0,0,0,.10);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  transition: background .2s, color .2s;
}
a { color: var(--blue3); text-decoration: none; }
a:hover { text-decoration: underline; }
.site-footer {
  display: flex; justify-content: center; align-items: center; gap: 28px;
  padding: 20px 24px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text3);
}
.site-footer a { color: var(--text3); }
.site-footer a:hover { color: var(--text1); text-decoration: none; }
.legal-page { max-width: 720px; margin: 0 auto; padding: 48px 24px 80px; }
.legal-page h1 { font-size: clamp(24px, 4vw, 36px); font-weight: 900; margin-bottom: 8px; }
.legal-page .legal-date { font-size: 13px; color: var(--text3); margin-bottom: 36px; }
.legal-page h2 { font-size: 16px; font-weight: 800; margin: 28px 0 8px; }
.legal-page p, .legal-page li { font-size: 14px; color: var(--text2); line-height: 1.75; }
.legal-page ul { padding-left: 20px; margin: 8px 0; }
button { cursor: pointer; font-family: var(--font); }
input, textarea, select {
  font-family: var(--font);
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 15px;
  width: 100%;
  outline: none;
  transition: border-color .2s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--blue3);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
img { max-width: 100%; display: block; }

/* ── Layout ───────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 680px; margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 1300px; margin: 0 auto; padding: 0 20px; }

/* ── Nav ──────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.nav-inner {
  display: flex; align-items: center; gap: 8px;
  padding: 0 20px; height: 62px; max-width: 1300px; margin: 0 auto;
}
.nav-logo {
  font-size: 22px; font-weight: 900; color: var(--text);
  letter-spacing: -0.5px; margin-right: 28px;
  display: flex; align-items: center; gap: 8px; text-decoration: none;
}
.nav-logo span { color: var(--blue3); }
.nav-logo-icon { width: 30px; height: 30px; display: block; flex-shrink: 0; }
.nav-logo-text {
  font-size: 21px; font-weight: 800; letter-spacing: -0.5px;
  background: linear-gradient(135deg, #0d9488, #0e7490);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links { display: flex; gap: 4px; align-items: center; flex: 1; }
.nav-link {
  padding: 7px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--text2);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  background: var(--bg3); color: var(--text); text-decoration: none;
}
.nav-link.active { color: var(--blue3); }
.nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-streak { display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; }
.nav-xp { font-size: 13px; color: var(--text2); font-weight: 600; }
.theme-btn {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 8px; padding: 6px 10px; font-size: 16px; color: var(--text);
}
.hamburger { display: none; background: none; border: none; color: var(--text); font-size: 22px; }
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute;
    top: 62px; left: 0; right: 0; background: var(--bg);
    border-bottom: 1px solid var(--border); padding: 12px 20px;
  }
  .hamburger { display: block; }
}

/* ── Buttons ──────────────────────────────────────────────── */
/* Base — shared by all variants whether or not .btn is also present */
.btn,
.btn-primary, .btn-secondary, .btn-ghost, .btn-green, .btn-red {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius); font-size: 15px;
  font-weight: 700; border: none; transition: all .15s; white-space: nowrap;
  text-decoration: none !important; cursor: pointer;
}
.btn-primary { background: var(--blue2); color: #fff; }
.btn-primary:hover { background: var(--blue3); text-decoration: none !important; }
.btn-secondary { background: var(--bg3); color: var(--text); border: 1px solid var(--border2); }
.btn-secondary:hover { background: var(--bg4); text-decoration: none !important; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #059669; text-decoration: none !important; }
.btn-red { background: var(--red); color: #fff; }
.btn-ghost { background: transparent; color: var(--text2); border: 1px solid var(--border2); }
.btn-ghost:hover { background: var(--bg3); text-decoration: none !important; }
.btn-lg { padding: 15px 32px !important; font-size: 17px !important; border-radius: var(--radius-lg) !important; }
.btn-sm { padding: 7px 14px !important; font-size: 13px !important; border-radius: 8px !important; }
.btn:disabled, .btn-primary:disabled { opacity: .45; cursor: not-allowed; }

/* ── Cards / Panels ───────────────────────────────────────── */
.card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card-sm { padding: 16px; border-radius: var(--radius); }

/* ── Badges / Chips ───────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.badge-blue { background: rgba(37,99,235,.18); color: var(--blue3); }
.badge-green { background: rgba(16,185,129,.18); color: var(--green); }
.badge-gold { background: rgba(245,158,11,.18); color: var(--gold); }
.badge-red { background: rgba(239,68,68,.18); color: var(--red); }

/* ── Landing ──────────────────────────────────────────────── */
.hero {
  padding: 90px 20px 80px;
  text-align: center;
  background: radial-gradient(ellipse at 60% 0%, rgba(30,64,175,.25) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(16,185,129,.12) 0%, transparent 50%);
}
.hero h1 {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 900; letter-spacing: -2px; line-height: 1.05;
  max-width: 860px; margin: 0 auto 20px;
}
.hero h1 em { font-style: normal; color: var(--blue3); }
.hero p { font-size: clamp(16px, 2vw, 20px); color: var(--text2); max-width: 560px; margin: 0 auto 36px; }
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 60px; }
.hero-langs { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.lang-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 16px;
  font-size: 14px; font-weight: 600; color: var(--text2);
}
.lang-chip .flag { font-size: 20px; }

.modes-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
  padding: 60px 20px; max-width: 860px; margin: 0 auto;
}
.mode-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 24px;
}
.mode-card .mode-icon { font-size: 32px; margin-bottom: 14px; }
.mode-card h3 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.mode-card p { font-size: 14px; color: var(--text2); line-height: 1.6; margin-bottom: 14px; }
.mode-price { font-size: 22px; font-weight: 900; color: var(--blue3); }
.mode-price span { font-size: 14px; font-weight: 500; color: var(--text2); }
@media (max-width: 768px) { .modes-grid { grid-template-columns: 1fr; } }

.pricing-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  padding: 0 20px 60px;
}
.price-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px 20px;
}
.price-card.featured { border-color: var(--blue2); box-shadow: 0 0 0 2px rgba(37,99,235,.2); }
.price-card .price { font-size: 36px; font-weight: 900; margin: 10px 0 4px; }
.price-card .price span { font-size: 16px; font-weight: 500; color: var(--text2); }
.price-card ul { list-style: none; margin: 16px 0 20px; }
.price-card ul li { font-size: 14px; color: var(--text2); padding: 5px 0; }
.price-card ul li::before { content: "✓ "; color: var(--green); font-weight: 700; }
@media (max-width: 900px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .pricing-grid { grid-template-columns: 1fr; } }

.demo-section {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); max-width: 680px; margin: 0 auto 60px;
  padding: 32px;
}
.demo-tabs { display: flex; gap: 6px; margin-bottom: 24px; flex-wrap: wrap; }
.demo-tab {
  padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 700;
  background: var(--bg3); color: var(--text2); border: none;
  transition: all .15s;
}
.demo-tab.active { background: var(--blue2); color: #fff; }
.demo-sentence {
  font-size: 22px; font-weight: 700; margin-bottom: 8px; line-height: 1.4;
}
.demo-word { cursor: pointer; transition: background .15s; border-radius: 4px; padding: 1px 3px; }
.demo-word:hover, .demo-word.tapped { background: rgba(59,130,246,.25); color: var(--blue3); }
.demo-translation { font-size: 14px; color: var(--text3); margin-bottom: 20px; }
.demo-input-wrap { position: relative; }
.demo-input-wrap input { padding-right: 100px; font-size: 16px; }
.demo-check-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: var(--blue2); color: white; border: none; border-radius: 8px;
  padding: 6px 14px; font-size: 13px; font-weight: 700;
}
.demo-feedback {
  margin-top: 12px; padding: 10px 14px; border-radius: 8px;
  font-size: 14px; font-weight: 600; display: none;
}
.demo-feedback.correct { background: rgba(16,185,129,.15); color: var(--green); }
.demo-feedback.wrong { background: rgba(239,68,68,.15); color: var(--red); }

/* ── Dashboard ────────────────────────────────────────────── */
.dashboard-grid {
  display: grid; grid-template-columns: 280px 1fr; gap: 24px;
  padding: 28px 20px; max-width: 1100px; margin: 0 auto;
}
@media (max-width: 860px) { .dashboard-grid { grid-template-columns: 1fr; } }
.stat-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.stat-card {
  flex: 1; min-width: 120px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  text-align: center;
}
.stat-card .value { font-size: 28px; font-weight: 900; }
.stat-card .label { font-size: 12px; color: var(--text3); margin-top: 2px; }
.xp-bar-wrap { margin: 16px 0; }
.xp-bar-track { background: var(--bg3); border-radius: 999px; height: 8px; overflow: hidden; }
.xp-bar-fill { background: linear-gradient(90deg, var(--blue2), var(--blue3)); height: 8px; border-radius: 999px; transition: width .4s; }
.level-label { font-size: 12px; color: var(--text3); display: flex; justify-content: space-between; margin-top: 4px; }

/* ── Lesson Interface ─────────────────────────────────────── */
.lesson-shell {
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.lesson-topbar {
  background: var(--bg2); border-bottom: 1px solid var(--border);
  padding: 14px 20px; display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 50;
}
.lesson-progress-track {
  flex: 1; height: 8px; background: var(--bg3);
  border-radius: 999px; overflow: hidden;
}
.lesson-progress-fill {
  height: 8px; background: linear-gradient(90deg, var(--green), #34d399);
  border-radius: 999px; transition: width .5s cubic-bezier(.4,0,.2,1);
}
.lesson-xp { font-size: 13px; font-weight: 700; color: var(--gold); white-space: nowrap; }
.lesson-streak { font-size: 13px; font-weight: 700; white-space: nowrap; }
.lesson-close {
  background: none; border: none; color: var(--text3); font-size: 20px; padding: 4px;
}
.lesson-body {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.lesson-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px 32px;
  max-width: 640px; width: 100%;
  box-shadow: var(--shadow);
}
.lesson-type-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; margin-bottom: 20px;
}
.lesson-type-writing { background: rgba(37,99,235,.15); color: var(--blue3); }
.lesson-type-listening { background: rgba(245,158,11,.15); color: var(--gold); }
.lesson-type-speaking { background: rgba(16,185,129,.15); color: var(--green); }
.lesson-type-immersion { background: rgba(139,92,246,.15); color: #a78bfa; }
.lesson-prompt { font-size: 14px; color: var(--text2); margin-bottom: 12px; }
.lesson-sentence {
  font-size: clamp(22px, 4vw, 32px); font-weight: 700; line-height: 1.4;
  margin-bottom: 8px;
}
.lesson-phonetic { font-size: 14px; color: var(--text3); margin-bottom: 28px; font-style: italic; }
.lesson-word { cursor: pointer; border-radius: 4px; padding: 2px 4px; transition: background .15s; }
.lesson-word:hover { background: rgba(59,130,246,.2); }
.lesson-word.tapped { background: rgba(59,130,246,.25); color: var(--blue3); position: relative; }
.word-tooltip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--bg); border: 1px solid var(--border2);
  border-radius: 8px; padding: 6px 12px; white-space: nowrap;
  font-size: 13px; font-weight: 600; color: var(--text);
  box-shadow: var(--shadow); z-index: 100;
}
.lesson-answer-input { font-size: 18px; padding: 14px 16px; margin-bottom: 12px; }
.lesson-submit-btn { width: 100%; padding: 14px; font-size: 16px; font-weight: 800; border: none; border-radius: var(--radius); transition: all .15s; }
.lesson-submit-btn.primary { background: var(--blue2); color: #fff; }
.lesson-submit-btn.primary:hover { background: var(--blue3); }
.lesson-hint-btn {
  background: none; border: 1px solid var(--border2); color: var(--text2);
  border-radius: 8px; padding: 6px 14px; font-size: 13px;
}
.lesson-audio-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 12px 20px;
  font-size: 15px; font-weight: 700; color: var(--text);
  margin-bottom: 24px; width: 100%;
}
.lesson-audio-btn:hover { background: var(--bg4); }
.lesson-mic-btn {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--blue2); color: #fff; border: none;
  font-size: 28px; transition: all .2s; margin: 0 auto 20px; display: block;
}
.lesson-mic-btn.recording { background: var(--red); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100%{ box-shadow: 0 0 0 0 rgba(239,68,68,.4); } 50%{ box-shadow: 0 0 0 14px rgba(239,68,68,0); } }
.lesson-score-ring {
  width: 80px; height: 80px; border-radius: 50%;
  border: 4px solid var(--green); display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900; color: var(--green); margin: 0 auto 12px;
}

.feedback-overlay {
  position: fixed; bottom: 0; left: 0; right: 0;
  padding: 20px 24px 28px; transition: transform .3s;
  transform: translateY(100%); z-index: 200;
}
.feedback-overlay.show { transform: translateY(0); }
.feedback-overlay.correct { background: #064e3b; border-top: 3px solid var(--green); }
.feedback-overlay.wrong { background: #450a0a; border-top: 3px solid var(--red); }
.feedback-title { font-size: 20px; font-weight: 900; margin-bottom: 4px; }
.feedback-correct .feedback-title { color: var(--green); }
.feedback-wrong .feedback-title { color: var(--red); }
.feedback-detail { font-size: 14px; color: var(--text2); margin-bottom: 16px; }
.feedback-next-btn { background: var(--green); color: #fff; width: 100%; padding: 14px; border: none; border-radius: var(--radius); font-size: 16px; font-weight: 800; }
.feedback-wrong .feedback-next-btn { background: var(--red); }

.complete-screen {
  text-align: center; padding: 40px 20px;
}
.complete-screen h2 { font-size: 36px; font-weight: 900; margin-bottom: 8px; }
.complete-stats { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin: 28px 0; }
.complete-stat { text-align: center; }
.complete-stat .val { font-size: 32px; font-weight: 900; }
.complete-stat .lbl { font-size: 13px; color: var(--text2); }

.xp-popup {
  position: fixed; bottom: 80px; right: 24px;
  background: var(--gold); color: #000; border-radius: 999px;
  padding: 8px 18px; font-size: 16px; font-weight: 900;
  animation: xpPop .6s ease forwards;
  z-index: 300; pointer-events: none;
}
@keyframes xpPop {
  0% { opacity: 0; transform: translateY(20px) scale(.8); }
  30% { opacity: 1; transform: translateY(-10px) scale(1.1); }
  70% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-30px) scale(.9); }
}

/* ── Word Bank ────────────────────────────────────────────── */
.word-bank-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px;
  margin-top: 20px;
}
.word-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.word-card .word { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.word-card .translation { font-size: 13px; color: var(--text2); }
.word-card .meta { font-size: 11px; color: var(--text3); margin-top: 8px; display: flex; gap: 8px; }
.word-strength { height: 4px; background: var(--bg3); border-radius: 999px; margin-top: 8px; overflow: hidden; }
.word-strength-fill { height: 4px; border-radius: 999px; }
.strength-0 { background: var(--red); }
.strength-1 { background: var(--gold); }
.strength-2 { background: var(--blue3); }
.strength-3, .strength-4 { background: var(--green); }

.review-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px; max-width: 520px; margin: 0 auto;
  text-align: center;
}
.review-word { font-size: 38px; font-weight: 900; margin-bottom: 12px; }
.review-btns { display: flex; gap: 12px; justify-content: center; margin-top: 20px; }
.reveal-btn { background: var(--bg3); border: 1px solid var(--border2); color: var(--text); border-radius: var(--radius); padding: 12px 28px; font-size: 15px; font-weight: 700; }
.knew-btn { background: var(--green); color: #fff; border: none; border-radius: var(--radius); padding: 12px 28px; font-size: 15px; font-weight: 700; }
.forgot-btn { background: var(--red); color: #fff; border: none; border-radius: var(--radius); padding: 12px 28px; font-size: 15px; font-weight: 700; }

/* ── Leaderboard ──────────────────────────────────────────── */
.leader-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.leader-rank { font-size: 20px; font-weight: 900; width: 36px; text-align: center; }
.leader-name { flex: 1; font-weight: 600; }
.leader-xp { font-size: 15px; font-weight: 800; color: var(--gold); }

/* ── Badges ───────────────────────────────────────────────── */
.badges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.badge-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 14px; text-align: center;
}
.badge-card.earned { border-color: var(--gold); }
.badge-card.locked { opacity: .45; filter: grayscale(1); }
.badge-card .icon { font-size: 36px; margin-bottom: 10px; }
.badge-card .name { font-size: 14px; font-weight: 700; }
.badge-card .desc { font-size: 12px; color: var(--text3); margin-top: 4px; }

/* ── Trip Assistant ───────────────────────────────────────── */
.trip-phrases { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.trip-phrase {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.trip-phrase .native { font-weight: 700; font-size: 15px; }
.trip-phrase .english { font-size: 13px; color: var(--text2); margin-top: 3px; }
.save-phrase-btn {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 8px; padding: 6px 12px; font-size: 12px; font-weight: 700;
  color: var(--text2); white-space: nowrap;
}
.save-phrase-btn.saved { background: rgba(16,185,129,.15); color: var(--green); }

/* ── Language Selector ────────────────────────────────────── */
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.lang-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 20px; text-align: center; cursor: pointer;
  transition: all .2s;
}
.lang-card:hover { border-color: var(--blue3); transform: translateY(-2px); box-shadow: var(--shadow); }
.lang-card.active { border-color: var(--blue2); background: rgba(37,99,235,.07); }
.lang-card .flag { font-size: 48px; margin-bottom: 12px; }
.lang-card .name { font-size: 17px; font-weight: 800; }
.lang-card .learners { font-size: 12px; color: var(--text3); margin-top: 4px; }

/* ── Auth Pages ───────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  background: radial-gradient(ellipse at 50% 0%, rgba(30,64,175,.2) 0%, transparent 60%);
}
.auth-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px 36px; width: 100%; max-width: 420px;
  box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 26px; font-weight: 900; margin-bottom: 6px; }
.auth-card p { color: var(--text2); font-size: 14px; margin-bottom: 28px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--text2); }
.form-msg { font-size: 13px; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.form-msg.error { background: rgba(239,68,68,.12); color: var(--red); }
.form-msg.success { background: rgba(16,185,129,.12); color: var(--green); }
.pw-wrap { position: relative; }
.pw-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text3); font-size: 13px; font-weight: 700;
}

/* ── Settings ─────────────────────────────────────────────── */
.settings-section { margin-bottom: 32px; }
.settings-section h3 { font-size: 17px; font-weight: 800; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); gap: 16px; }
.settings-row label { font-size: 14px; font-weight: 600; }
.toggle-switch { position: relative; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--bg3); border-radius: 999px;
  transition: .2s; cursor: pointer;
}
.toggle-slider:before {
  position: absolute; content: ""; height: 18px; width: 18px;
  left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: .2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--blue2); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); }

/* ── Upgrade ──────────────────────────────────────────────── */
.upgrade-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 860px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 720px) { .upgrade-grid { grid-template-columns: 1fr; } }
.upgrade-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 24px;
}
.upgrade-card.featured { border-color: var(--blue2); box-shadow: 0 0 0 2px rgba(37,99,235,.2); }
.upgrade-card h3 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.upgrade-price { font-size: 38px; font-weight: 900; margin: 12px 0; }
.upgrade-price span { font-size: 16px; font-weight: 500; color: var(--text2); }
.upgrade-features { list-style: none; margin: 16px 0 24px; }
.upgrade-features li { font-size: 14px; color: var(--text2); padding: 5px 0; }
.upgrade-features li::before { content: "✓ "; color: var(--green); font-weight: 800; }

/* ── Section titles ───────────────────────────────────────── */
.section-title { text-align: center; padding: 48px 20px 32px; }
.section-title .eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text3); margin-bottom: 10px; }
.section-title h2 { font-size: clamp(26px, 4vw, 42px); font-weight: 900; letter-spacing: -1px; }
.section-title p { font-size: 16px; color: var(--text2); margin-top: 10px; max-width: 520px; margin-left: auto; margin-right: auto; }

/* ── Testimonials ─────────────────────────────────────────── */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 0 20px 60px; }
@media (max-width: 768px) { .testimonials-grid { grid-template-columns: 1fr; } }
.testimonial-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
}
.testimonial-card p { font-size: 14px; color: var(--text2); line-height: 1.7; margin-bottom: 16px; }
.testimonial-card .author { font-weight: 700; font-size: 14px; }
.testimonial-card .handle { font-size: 13px; color: var(--text3); }

/* ── FAQ ──────────────────────────────────────────────────── */
.faq-list { max-width: 680px; margin: 0 auto; padding: 0 20px 60px; display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-item summary { padding: 16px 20px; font-weight: 700; font-size: 15px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::after { content: "+"; font-size: 20px; color: var(--text3); }
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-body { padding: 0 20px 16px; font-size: 14px; color: var(--text2); line-height: 1.7; }

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border); padding: 28px 20px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: gap;
  font-size: 13px; color: var(--text3);
}
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--text3); }
.footer-links a:hover { color: var(--text2); }

/* ── Misc utils ───────────────────────────────────────────── */
.page-header { padding: 32px 20px 0; max-width: 1100px; margin: 0 auto; }
.page-header h1 { font-size: 28px; font-weight: 900; }
.page-header p { color: var(--text2); margin-top: 6px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text2); }
.empty-state .icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.text-center { text-align: center; } .text-sm { font-size: 13px; } .text-muted { color: var(--text2); }
.flex { display: flex; } .items-center { align-items: center; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 540px) { .grid-2 { grid-template-columns: 1fr; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Top nav (primary nav bar) ────────────────────────────── */
.top-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
  padding: 0 20px; height: 62px;
}
.top-nav .nav-logo { font-size: 20px; font-weight: 900; color: var(--text); margin-right: 32px; }
.top-nav .nav-links { display: flex; gap: 4px; align-items: center; flex: 1; }
.theme-toggle {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 8px; padding: 6px 10px; font-size: 16px; color: var(--text); margin-left: auto;
}
.hamburger { display: none; background: none; border: none; color: var(--text); font-size: 22px; margin-left: 8px; }
.mobile-user-btn {
  display: none;
  margin-left: auto;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 8px; padding: 5px 11px; font-size: 13px; font-weight: 700;
  color: var(--text); cursor: pointer; max-width: 100px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 768px) {
  .top-nav .nav-links { display: none; }
  .top-nav .nav-logo { margin-right: 6px; }
  .hamburger { display: block; }
  .mobile-user-btn { display: block; }
}
.mobile-nav-drawer {
  display: none; flex-direction: column; gap: 4px;
  position: fixed; top: 62px; left: 0; right: 0; z-index: 99;
  background: var(--bg); border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  max-height: calc(100vh - 62px); overflow-y: auto;
}
.mobile-nav-drawer.open { display: flex; }
.mobile-user-drawer {
  display: none; flex-direction: column; gap: 4px;
  position: fixed; top: 62px; right: 0; z-index: 99;
  background: var(--bg); border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
  padding: 12px 20px; min-width: 200px;
  max-height: calc(100vh - 62px); overflow-y: auto;
}
.mobile-user-drawer.open { display: flex; }
.mobile-nav-link {
  padding: 10px 12px; border-radius: 8px; font-size: 15px; font-weight: 500;
  color: var(--text2); text-decoration: none; display: block; border: none; background: none; text-align: left;
}
.mobile-nav-link:hover { background: var(--bg3); color: var(--text); text-decoration: none; }
.mobile-nav-locked { opacity: .45; cursor: default; }

/* ── Nav dropdowns ────────────────────────────────────────── */
.nav-spacer { flex: 1; }
.nav-dropdown { position: relative; }
.nav-dd-btn {
  background: none; border: none; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; gap: 4px;
}
.nav-dd-caret { font-size: 10px; opacity: .6; transition: transform .15s; }
.nav-dd-menu.open ~ * .nav-dd-caret,
.nav-dd-btn:has(+ .nav-dd-menu.open) .nav-dd-caret { transform: rotate(180deg); }
.nav-dd-menu {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 200;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,.35);
  padding: 6px; min-width: 200px; flex-direction: column; gap: 1px;
}
.nav-dd-menu.open { display: flex; }
.nav-dd-right { left: auto; right: 0; }
.nav-dd-item {
  display: block; padding: 9px 14px; border-radius: 8px; font-size: 14px; font-weight: 500;
  color: var(--text2); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .1s, color .1s;
}
.nav-dd-item:hover { background: var(--bg3); color: var(--text); text-decoration: none; }
.nav-dd-locked { opacity: .45; cursor: default; }
.nav-dd-locked:hover { background: none; color: var(--text2); }
.nav-dd-danger { color: var(--red) !important; }
.nav-dd-danger:hover { background: rgba(239,68,68,.1); }
.nav-dd-sep { height: 1px; background: var(--border); margin: 4px 6px; }

/* ── Buttons (supplemental) ───────────────────────────────── */
.btn-full { width: 100%; display: block; text-align: center; }
.btn-warning { background: var(--gold); color: #000; border: none; padding: 10px 18px; border-radius: var(--radius); font-size: 14px; font-weight: 700; }
.btn-danger { background: var(--red); color: #fff; border: none; padding: 10px 18px; border-radius: var(--radius); font-size: 14px; font-weight: 700; }
.btn-success { background: var(--green); color: #fff; border: none; padding: 10px 18px; border-radius: var(--radius); font-size: 14px; font-weight: 700; }
.btn-upgrade-small {
  padding: 5px 12px; border-radius: 8px; font-size: 13px; font-weight: 700;
  background: var(--gold); color: #000; text-decoration: none;
}
.btn-upgrade-small:hover { background: #d97706; text-decoration: none; }

/* ── Flash toast ──────────────────────────────────────────── */
.flash-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--green); color: #fff; padding: 12px 24px; border-radius: 999px;
  font-size: 14px; font-weight: 700; z-index: 9999; opacity: 0; transition: all .35s;
  white-space: nowrap; box-shadow: var(--shadow);
}
.flash-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Auth (supplemental) ──────────────────────────────────── */
.auth-card label { display: block; font-size: 13px; font-weight: 700; margin: 14px 0 6px; color: var(--text2); }
.auth-card input { margin-bottom: 0; }
.auth-alt { text-align: center; font-size: 14px; color: var(--text2); margin-top: 18px; }
.form-error { background: rgba(239,68,68,.12); color: var(--red); padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }

/* ── Landing (supplemental) ───────────────────────────────── */
.hero-content { max-width: 760px; margin: 0 auto; }
.hero-title { font-size: clamp(36px, 6vw, 68px); font-weight: 900; letter-spacing: -2px; line-height: 1.05; margin-bottom: 20px; }
.gradient-text { background: linear-gradient(135deg, var(--blue3), #7c3aed); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { font-size: clamp(16px, 2vw, 20px); color: var(--text2); margin-bottom: 36px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.hero-note { font-size: 13px; color: var(--text3); }
.lang-belt {
  overflow: hidden;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.lang-belt-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: lang-belt-scroll 28s linear infinite;
}
.lang-belt-track:hover { animation-play-state: paused; }
.lang-belt-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 36px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text2);
  white-space: nowrap;
  border-right: 1px solid var(--border);
}
.lang-belt-item .belt-flag { font-size: 22px; line-height: 1; }
@keyframes lang-belt-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.modes-section { padding: 20px; }
.section-title { font-size: clamp(22px, 3vw, 36px); font-weight: 900; text-align: center; padding: 40px 20px 24px; letter-spacing: -0.5px; }
.section-title p { font-size: 15px; color: var(--text2); margin-top: 8px; }
.features-section { padding: 20px; background: var(--bg2); border-top: 1px solid var(--border); }
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 860px; margin: 0 auto; padding: 0 20px 40px; }
@media (max-width: 600px) { .features-grid { grid-template-columns: 1fr; } }
.feature-item { display: flex; gap: 16px; align-items: flex-start; }
.feature-item > span { font-size: 28px; flex-shrink: 0; }
.feature-item strong { font-size: 15px; font-weight: 800; display: block; margin-bottom: 4px; }
.feature-item p { font-size: 14px; color: var(--text2); }
.testimonials-section { padding: 20px; }
.testimonial-author { font-size: 13px; color: var(--text3); font-style: italic; }
.pricing-section { padding: 20px; }
.pricing-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px 20px; text-align: center;
}
.pricing-card.featured { border-color: var(--blue2); box-shadow: 0 0 0 2px rgba(37,99,235,.2); }
.plan-badge { background: var(--blue2); color: #fff; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 3px 10px; display: inline-block; margin-bottom: 10px; }
.plan-name { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.plan-price { font-size: 40px; font-weight: 900; margin-bottom: 16px; }
.plan-price span { font-size: 16px; font-weight: 500; color: var(--text2); }
.plan-features { list-style: none; text-align: left; margin: 0 0 20px; }
.plan-features li { font-size: 14px; color: var(--text2); padding: 5px 0; }
.faq-section { padding: 20px; }
.faq-item { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-question {
  width: 100%; text-align: left; background: none; border: none;
  padding: 16px 20px; font-weight: 700; font-size: 15px; color: var(--text);
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
}
.faq-question::after { content: "+"; font-size: 20px; color: var(--text3); }
.faq-item.open .faq-question::after { content: "−"; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-answer p { padding: 0 20px 16px; font-size: 14px; color: var(--text2); line-height: 1.7; }
.cta-section { text-align: center; padding: 60px 20px; background: var(--bg2); border-top: 1px solid var(--border); }
.cta-section h2 { font-size: 32px; font-weight: 900; margin-bottom: 10px; }
.cta-section p { color: var(--text2); margin-bottom: 24px; }

/* ── Dashboard (supplemental) ────────────────────────────── */
.dashboard-wrap { max-width: 1060px; margin: 0 auto; padding: 32px 24px 60px; }

/* Hero */
.dash-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px 32px; margin-bottom: 24px; }
.dash-hero-left { flex: 1; min-width: 0; }
.dash-greeting { font-size: 26px; font-weight: 900; margin-bottom: 10px; }
.dash-rank-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.dash-rank-badge { font-size: 14px; font-weight: 800; background: var(--bg3); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; }
.dash-streak-title { font-size: 13px; color: var(--text2); font-style: italic; }
.dash-xp-bar-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dash-xp-bar { flex: 1; max-width: 260px; height: 7px; background: var(--bg3); border-radius: 999px; overflow: hidden; }
.dash-xp-fill { height: 100%; background: linear-gradient(90deg, var(--blue2), #7c3aed); border-radius: 999px; transition: width .4s; }
.dash-xp-label { font-size: 12px; color: var(--text3); white-space: nowrap; }
.dash-hero-right { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; flex-shrink: 0; }
.dash-hero-right a { white-space: nowrap; }

/* Upgrade banner */
.upgrade-banner { display: inline-block; margin-top: 4px; padding: 6px 14px; background: linear-gradient(135deg, var(--blue2), #7c3aed); color: #fff; border-radius: 999px; font-size: 13px; font-weight: 700; text-decoration: none; }
.upgrade-banner:hover { opacity: .9; text-decoration: none; }
.upgrade-banner.upgrade-soft { background: var(--bg2); color: var(--text2); border: 1px solid var(--border); font-weight: 500; }

/* Stat cards */
.dashboard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 16px; text-align: center; transition: border-color .15s; }
.stat-card:hover { border-color: var(--blue3); }
.stat-icon { font-size: 22px; margin-bottom: 8px; }
.stat-value { font-size: 32px; font-weight: 900; }
.stat-streak .stat-value { color: #f97316; }
.stat-lessons .stat-value { color: #10b981; }
.stat-badges .stat-value { color: #f59e0b; }
.stat-words .stat-value { color: var(--blue2); }
.stat-label { font-size: 12px; color: var(--text3); margin-top: 4px; text-transform: uppercase; letter-spacing: .04em; }

/* Deprecated but kept for other uses */
.xp-bar { background: var(--bg3); border-radius: 999px; height: 6px; overflow: hidden; margin: 8px 0 4px; }
.xp-bar-label { font-size: 11px; color: var(--text3); }
.dashboard-actions { display: flex; gap: 10px; flex-direction: column; }

/* Two-column main layout */
.dash-main { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.dash-primary { display: flex; flex-direction: column; gap: 20px; }
.dash-sidebar { display: flex; flex-direction: column; gap: 16px; }

/* Recent activity */
.recent-activity { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 22px; }
.recent-activity h2 { font-size: 16px; font-weight: 800; margin-bottom: 14px; }
.activity-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.activity-item:last-child { border-bottom: none; padding-bottom: 0; }
.activity-xp { margin-left: auto; color: var(--gold); font-weight: 700; font-size: 13px; }
.activity-acc { color: var(--text3); font-size: 12px; }

@media (max-width: 860px) {
  .dash-hero { flex-direction: column; }
  .dash-hero-right { flex-direction: row; align-items: flex-start; flex-wrap: wrap; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-main { grid-template-columns: 1fr; }
  .dash-sidebar { display: contents; }
}

/* ── Language picker ──────────────────────────────────────── */
.langs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; padding: 20px; max-width: 1100px; margin: 0 auto; }
.lang-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px 20px; text-align: center; transition: all .2s; }
.lang-card:hover { border-color: var(--blue3); transform: translateY(-2px); }
.lang-flag { font-size: 48px; margin-bottom: 10px; }
.lang-card h3 { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.lang-card p { font-size: 13px; color: var(--text2); margin-bottom: 14px; }
.lang-modes { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.mode-pill {
  padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--bg3); color: var(--text2); border: 1px solid var(--border2);
  text-decoration: none; transition: all .15s;
}
.mode-pill:hover { background: var(--blue2); color: #fff; border-color: var(--blue2); text-decoration: none; }
.mode-locked { opacity: .5; cursor: default; }
.mode-locked:hover { background: var(--bg3); color: var(--text2); border-color: var(--border2); }

/* ── Lesson page ──────────────────────────────────────────── */
.lesson-wrap { max-width: 720px; margin: 0 auto; padding-bottom: 80px; }
.lesson-topbar { display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: var(--bg2); border-bottom: 1px solid var(--border); position: sticky; top: 62px; z-index: 50; }
.lesson-meta { font-size: 14px; font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lesson-progress-wrap { display: flex; align-items: center; gap: 8px; }
.lesson-progress-bar { width: 120px; height: 8px; background: var(--bg3); border-radius: 999px; overflow: hidden; }
.lesson-item-area { padding: 32px 20px; min-height: 400px; }
.lesson-loading { text-align: center; padding: 80px 20px; color: var(--text3); }
.lesson-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; max-width: 640px; margin: 0 auto; }
.lesson-prompt { font-size: 18px; font-weight: 700; margin-bottom: 20px; line-height: 1.4; }
.lesson-context { font-size: 14px; color: var(--text2); font-style: italic; margin-bottom: 16px; }
.lesson-input-wrap { display: flex; gap: 10px; margin-top: 16px; }
.lesson-input { flex: 1; font-size: 16px; padding: 12px 14px; }
.lesson-hint { font-size: 13px; color: var(--gold); margin-top: 10px; }
.hint-btn { font-size: 12px; margin-top: 8px; }
.char-toggle-row { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.char-toggle-btn { font-size: 12px; }
.char-display { font-size: 48px; font-weight: 700; text-align: center; letter-spacing: 4px; margin: 10px 0 16px; padding: 14px; background: var(--bg); border: 1.5px solid var(--border2); border-radius: 12px; color: var(--text1); line-height: 1.3; }
.lesson-word { font-size: 36px; font-weight: 900; margin: 16px 0; display: block; }
.lesson-translation { font-size: 15px; color: var(--text2); margin-bottom: 20px; }
.speak-status { font-size: 14px; color: var(--text2); margin-top: 10px; text-align: center; }
.immersion-sentence { font-size: clamp(18px, 3vw, 26px); font-weight: 600; line-height: 1.6; margin: 20px 0; }
.tappable-word { position: relative; cursor: pointer; border-radius: 4px; padding: 1px 3px; }
.tappable-word:hover { background: rgba(59,130,246,.2); }
.word-tooltip { display: none; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--bg); border: 1px solid var(--border2); border-radius: 8px; padding: 5px 10px; white-space: nowrap; font-size: 13px; font-weight: 600; z-index: 100; box-shadow: var(--shadow); }
.word-tooltip.active { display: block; }

/* ── Feedback overlay (supplemental) ─────────────────────── */
.feedback-overlay.incorrect { background: #450a0a; border-top: 3px solid var(--red); }
.feedback-content { max-width: 500px; margin: 0 auto; }
.feedback-icon { font-size: 28px; margin-bottom: 6px; }
.feedback-text { font-size: 20px; font-weight: 900; margin-bottom: 6px; }
.feedback-overlay.correct .feedback-text { color: var(--green); }
.feedback-overlay.incorrect .feedback-text { color: var(--red); }
.feedback-answer { font-size: 14px; color: var(--text2); margin-bottom: 16px; }
.feedback-btn { background: var(--green); color: #fff; border: none; border-radius: var(--radius); padding: 14px 28px; font-size: 15px; font-weight: 800; }
.feedback-overlay.incorrect .feedback-btn { background: var(--red); }

/* ── Lesson complete ──────────────────────────────────────── */
.lesson-complete { text-align: center; padding: 40px 20px; }
.complete-icon { font-size: 64px; margin-bottom: 12px; }
.lesson-complete h2 { font-size: 32px; font-weight: 900; margin-bottom: 24px; }
.complete-stats { display: flex; gap: 32px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.complete-stats .stat { text-align: center; }
.stat-num { display: block; font-size: 36px; font-weight: 900; color: var(--blue3); }
.stat-label { font-size: 13px; color: var(--text3); }
.complete-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.complete-xp-bar { max-width: 320px; margin: 0 auto; background: var(--bg3); border-radius: 999px; height: 8px; overflow: hidden; }

/* ── Word bank (supplemental) ────────────────────────────── */
.word-bank-table-wrap { overflow-x: auto; margin-top: 16px; }
.word-bank-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.word-bank-table th { text-align: left; padding: 10px 12px; background: var(--bg2); border-bottom: 2px solid var(--border2); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text3); }
.word-bank-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.word-cell { font-weight: 700; font-size: 15px; }
.word-example { font-size: 12px; color: var(--text3); font-style: italic; }
.strength-dots { display: flex; gap: 4px; margin-bottom: 2px; }
.strength-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bg3); border: 1px solid var(--border2); }
.strength-dot.filled { background: var(--green); border-color: var(--green); }
.add-word-form { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 0 20px; border-bottom: 1px solid var(--border); }
.add-word-form input, .add-word-form select { flex: 1; min-width: 140px; }
.upgrade-note { background: rgba(245,158,11,.12); color: var(--gold); padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 12px; }

/* ── Word bank review (supplemental) ────────────────────── */
.review-card-area { padding: 32px 20px; }
.review-card { cursor: pointer; transition: transform .1s; }
.review-card:active { transform: scale(.98); }
.review-card.flipped { cursor: default; }
.review-front, .review-back { text-align: center; }
.review-word { font-size: 42px; font-weight: 900; margin: 16px 0; }
.review-tap { font-size: 13px; color: var(--text3); margin-top: 8px; }
.review-translation { font-size: 26px; font-weight: 800; margin-bottom: 10px; }
.review-example { font-size: 14px; color: var(--text2); font-style: italic; margin-bottom: 20px; }
.review-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.review-complete { text-align: center; padding: 60px 20px; }

/* ── Trip assistant ───────────────────────────────────────── */
.trip-page { max-width: 760px; margin: 0 auto; padding: 24px 20px 80px; display: flex; flex-direction: column; gap: 20px; }
.trip-setup-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.trip-setup-card h2 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.trip-setup-card p { font-size: 14px; color: var(--text2); margin-bottom: 16px; }
.trip-set .trip-card-top { display: flex; align-items: center; justify-content: space-between; }
.trip-dest-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--text3); margin-bottom: 4px; }
.trip-dest-name { display: block; font-size: 20px; font-weight: 800; }
.trip-dest-date { display: block; font-size: 13px; color: var(--text2); margin-top: 2px; }
.hidden { display: none !important; }
.trip-wrap { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.trip-header { margin-bottom: 14px; }
.trip-header h1 { font-size: 26px; font-weight: 900; margin-bottom: 6px; }
.trip-header p { font-size: 15px; color: var(--text2); }
.trip-lang-select { display: flex; align-items: center; gap: 10px; }
.trip-lang-select label { font-size: 14px; font-weight: 600; color: var(--text2); }
.trip-lang-select select { width: auto; }
.trip-messages { min-height: 260px; max-height: 420px; overflow-y: auto; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.trip-message { padding: 12px 16px; border-radius: var(--radius); max-width: 85%; font-size: 14px; line-height: 1.6; }
.trip-user { background: var(--blue2); color: #fff; align-self: flex-end; }
.trip-assistant { background: var(--bg3); color: var(--text); align-self: flex-start; }
.trip-input-form { display: flex; gap: 10px; align-items: flex-end; }
.trip-input { flex: 1; resize: none; min-height: 48px; max-height: 120px; }

/* ── Leaderboard ──────────────────────────────────────────── */
.admin-wrap { max-width: 1000px; margin: 0 auto; padding: 32px 24px 80px; }
.admin-stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin: 24px 0; }
.admin-stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 16px; text-align: center; }
.admin-stat-num { font-size: 28px; font-weight: 900; color: var(--text); }
.admin-stat-label { font-size: 12px; color: var(--text3); margin-top: 4px; text-transform: uppercase; letter-spacing: .05em; }
.admin-section { margin-top: 32px; }
.admin-section h2 { font-size: 16px; font-weight: 800; margin-bottom: 12px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; padding: 8px 12px; background: var(--bg2); border-bottom: 2px solid var(--border2); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text3); }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.leaderboard-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.leaderboard-table th { text-align: left; padding: 10px 14px; background: var(--bg2); border-bottom: 2px solid var(--border2); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text3); }
.leaderboard-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.leaderboard-me td { background: rgba(37,99,235,.07); font-weight: 700; }

/* ── Badges (supplemental) ────────────────────────────────── */
.badges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; padding: 20px; max-width: 1100px; margin: 0 auto; }
.badge-icon { font-size: 38px; margin-bottom: 10px; }
.badge-name { font-size: 14px; font-weight: 800; margin-bottom: 4px; }
.badge-desc { font-size: 12px; color: var(--text3); line-height: 1.5; }
.badge-date { font-size: 11px; color: var(--text3); margin-top: 6px; }
.badge-locked-label { font-size: 11px; color: var(--text3); margin-top: 6px; }
.badge-earned { border-color: var(--gold); }
.badge-locked { opacity: .45; filter: grayscale(1); }

/* ── Settings ─────────────────────────────────────────────── */
.settings-wrap { max-width: 620px; margin: 0 auto; padding: 28px 20px; }
.settings-wrap h1 { font-size: 26px; font-weight: 900; margin-bottom: 24px; }
.settings-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; }
.settings-card h2 { font-size: 17px; font-weight: 800; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.settings-card p { font-size: 14px; color: var(--text2); margin-bottom: 8px; }
.settings-card p strong { color: var(--text); }
.settings-card label { display: block; font-size: 13px; font-weight: 700; margin: 14px 0 6px; color: var(--text2); }
.danger-zone { border-color: var(--red); }
.danger-zone h2 { color: var(--red); }

/* ── Success / canceled ───────────────────────────────────── */
.success-wrap { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.success-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 48px 40px; max-width: 460px; width: 100%; text-align: center; }
.success-icon { font-size: 64px; margin-bottom: 16px; }
.success-card h1 { font-size: 28px; font-weight: 900; margin-bottom: 12px; }
.success-card p { color: var(--text2); margin-bottom: 24px; }
.success-card .btn-primary, .success-card .btn-ghost { display: inline-block; margin: 6px; }

/* ── Empty lesson ─────────────────────────────────────────── */
.empty-lesson { text-align: center; padding: 80px 20px; }
.empty-lesson h2 { font-size: 24px; font-weight: 800; margin-bottom: 16px; }

/* ── Upgrade (supplemental) ───────────────────────────────── */
.upgrade-note { background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3); color: var(--gold); padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }

/* ── Language detail / curriculum ────────────────────────── */
.lang-detail-wrap { max-width: 860px; margin: 0 auto; padding: 24px 20px 80px; }
.lang-detail-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.lang-detail-title { display: flex; align-items: center; gap: 16px; }
.lang-detail-flag { font-size: 52px; line-height: 1; }
.lang-detail-flag-img { width: 52px; height: auto; border-radius: 6px; display: block; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.lang-detail-title h1 { font-size: 28px; font-weight: 900; }
.lang-detail-title p { font-size: 14px; color: var(--text2); margin-top: 2px; }
.mode-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.mode-tab {
  padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 700;
  background: var(--bg3); color: var(--text2); border: 1px solid var(--border2);
  text-decoration: none; transition: all .15s;
}
.mode-tab:hover { background: var(--bg4); text-decoration: none; }
.mode-tab.active { background: var(--blue2); color: #fff; border-color: var(--blue2); }
.mode-tab.locked { opacity: .5; cursor: default; }
.mode-tab.locked:hover { background: var(--bg3); color: var(--text2); }
.curriculum { display: flex; flex-direction: column; gap: 20px; }
.curriculum-stage { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.stage-header { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: var(--bg2); border-bottom: 1px solid var(--border); }
.stage-icon { font-size: 26px; flex-shrink: 0; }
.stage-info h3 { font-size: 17px; font-weight: 800; margin-bottom: 2px; }
.stage-progress { font-size: 13px; color: var(--text3); }
.stage-progress.done { color: var(--green); }
.stage-lessons { padding: 8px 0; }
.curriculum-lesson {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; text-decoration: none; color: var(--text);
  transition: background .15s; border-bottom: 1px solid var(--border);
}
.curriculum-lesson:last-child { border-bottom: none; }
.curriculum-lesson:hover { background: var(--bg3); text-decoration: none; }
.curriculum-lesson.done { color: var(--text2); }
.curriculum-lesson.locked { opacity: .6; cursor: default; }
.curriculum-lesson.locked:hover { background: transparent; }
.lesson-status-icon { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; }
.lesson-title-text { flex: 1; font-size: 15px; font-weight: 600; }
.lesson-desc-text { font-size: 12px; color: var(--text3); margin-top: 1px; }
.lesson-mode-badge { font-size: 16px; }
.curriculum-lesson.done .lesson-title-text { font-weight: 500; }
.stage-all-done { padding: 10px 20px; font-size: 13px; color: var(--green); font-weight: 700; }

/* ── Language picker ─────────────────────────────────────── */
.languages-hero { text-align: center; padding: 48px 20px 12px; max-width: 600px; margin: 0 auto; }
.languages-hero h1 { font-size: 32px; font-weight: 900; margin-bottom: 8px; }
.languages-hero p { font-size: 16px; color: var(--text2); }
.langs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; padding: 28px 20px 60px; max-width: 1100px; margin: 0 auto; }
.lang-card-link { text-decoration: none; color: var(--text); display: block; }
.lang-card-link:hover { text-decoration: none; }
.lang-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px 24px 20px;
  transition: all .22s; position: relative; overflow: hidden;
  border-top: 3px solid var(--lang-accent, var(--blue3));
}
.lang-card-link:hover .lang-card {
  transform: translateY(-4px); box-shadow: var(--shadow);
  border-color: var(--lang-accent, var(--blue3));
}
.lang-card-top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.lang-card-flag { font-size: 40px; line-height: 1; flex-shrink: 0; }
.lang-card-flag-img { width: 44px; height: auto; border-radius: 5px; display: block; box-shadow: 0 2px 8px rgba(0,0,0,.18); flex-shrink: 0; }
.flag-img-sm { line-height: 1; vertical-align: middle; display: inline-block; }
.lang-card-heading { flex: 1; }
.lang-card-name { font-size: 20px; font-weight: 900; margin-bottom: 2px; }
.lang-card-speakers { font-size: 12px; color: var(--text3); font-weight: 600; }
.lang-card-arrow { font-size: 13px; font-weight: 700; color: var(--lang-accent, var(--blue3)); white-space: nowrap; }
.lang-card-desc { font-size: 13px; color: var(--text2); line-height: 1.6; margin-bottom: 14px; }
.lang-card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.lang-tag { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--bg3); color: var(--text3); border: 1px solid var(--border2); }
.lang-card-progress { margin-top: 4px; }
.lang-progress-track { height: 5px; background: var(--bg3); border-radius: 999px; overflow: hidden; margin-bottom: 5px; }
.lang-progress-fill { height: 5px; border-radius: 999px; transition: width .5s ease; }
.lang-progress-pct { font-size: 11px; font-weight: 700; color: var(--text3); float: right; margin-top: -18px; }
.lang-card-stats-row { display: flex; gap: 6px; font-size: 12px; color: var(--text3); margin-top: 4px; clear: both; }
.lang-stat-sep { color: var(--border2); }
.lang-card-start-badge { display: inline-block; font-size: 11px; font-weight: 800; color: var(--green); background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.25); padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }

/* ── Rank / prestige system ──────────────────────────────── */
.rank-display { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 22px; margin-bottom: 24px; }
.rank-name { font-size: 18px; font-weight: 900; color: var(--gold); display: inline-block; margin-right: 12px; }
.streak-title { font-size: 14px; color: var(--text2); font-style: italic; }
.xp-bar-label { font-size: 12px; color: var(--text3); margin-top: 4px; }
.rank-up-banner { position: fixed; top: 72px; left: 50%; transform: translateX(-50%) translateY(-20px); background: linear-gradient(135deg, var(--gold), #f97316); color: #1a1a1a; padding: 14px 28px; border-radius: 999px; font-size: 16px; font-weight: 800; z-index: 2000; opacity: 0; pointer-events: none; transition: all .4s; box-shadow: 0 4px 20px rgba(245,158,11,.5); }
.rank-up-banner.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Dashboard widgets ───────────────────────────────────── */
.dashboard-widgets { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin: 24px 0; }
.dashboard-widget { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 22px; }
.widget-title { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.widget-sub { font-size: 13px; color: var(--text2); margin-bottom: 12px; }
.widget-scenario { border-left: 4px solid var(--blue3); }
.widget-scenario.done { border-left-color: var(--green); }
.widget-mistakes { border-left: 4px solid var(--red); }
.widget-revive { border-left: 4px solid var(--gold); }
.mistake-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.mistake-item:last-child { border-bottom: none; }
.mistake-count { background: rgba(239,68,68,.15); color: var(--red); font-weight: 800; font-size: 11px; padding: 2px 6px; border-radius: 999px; flex-shrink: 0; }
.mistake-prompt { flex: 1; color: var(--text2); }
.mistake-answer { font-weight: 700; color: var(--text); }
.revive-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.revive-item:last-child { border-bottom: none; }

/* ── Auth (combined) ─────────────────────────────────────── */
.auth-tabs { display: flex; gap: 0; margin-bottom: 28px; background: var(--bg3); border-radius: 999px; padding: 3px; }
.auth-tab { flex: 1; padding: 9px 0; border-radius: 999px; font-size: 14px; font-weight: 700; background: transparent; color: var(--text2); border: none; cursor: pointer; transition: all .18s; }
.auth-tab.auth-tab-active { background: var(--blue2); color: #fff; }
.auth-tab:hover:not(.auth-tab-active) { background: var(--bg4); color: var(--text); }
.auth-submit-wrap { margin-top: 24px; }
.ref-code-toggle-wrap { margin-top: 14px; text-align: right; }
.ref-code-toggle { background: none; border: none; padding: 0; font-size: 12px; color: var(--text3); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.ref-code-toggle:hover { color: var(--text2); }
.ref-code-field { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .2s ease; overflow: hidden; margin-top: 0; }
.ref-code-field > input { min-height: 0; overflow: hidden; }
.ref-code-field-open { grid-template-rows: 1fr; margin-top: 8px; }
.ref-code-field-open > input { min-height: unset; overflow: unset; }

/* ── Animations ──────────────────────────────────────────── */
@keyframes slideUp { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:translateY(0); } }
@keyframes pop { 0%,100%{ transform:scale(1); } 50%{ transform:scale(1.15); } }
@keyframes pulse { 0%,100%{ opacity:1; } 50%{ opacity:.5; } }
.feedback-overlay.show .feedback-content { animation: slideUp .22s ease; }
.lesson-card { animation: slideUp .2s ease; }
.complete-icon { animation: pop .6s ease .1s both; }
.xp-popup { animation: xpFloat 1.4s ease forwards; }
@keyframes xpFloat { 0%{ opacity:0; transform:translateY(0); } 20%{ opacity:1; } 80%{ opacity:1; transform:translateY(-60px); } 100%{ opacity:0; transform:translateY(-80px); } }
.feedback-overlay.correct { background: rgba(16,185,129,.12); }
.feedback-overlay.incorrect { background: rgba(239,68,68,.12); }
.feedback-overlay.correct .feedback-icon { animation: pop .4s ease; }

/* ── Speed buttons (listening) ───────────────────────────── */
.listen-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.speed-buttons { display: flex; gap: 6px; }
.speed-btn { padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bg3); color: var(--text2); border: 1px solid var(--border2); cursor: pointer; transition: all .15s; }
.speed-btn.active, .speed-btn:hover { background: var(--blue2); color: #fff; border-color: var(--blue2); }

/* ── Speaking controls ───────────────────────────────────── */
.speaking-controls { display: flex; gap: 10px; margin: 16px 0; flex-wrap: wrap; }
.speak-status { font-size: 14px; margin-top: 8px; min-height: 20px; }
.speak-pass { color: var(--green); font-weight: 700; }
.speak-miss { color: var(--gold); }

/* ── Conversation ────────────────────────────────────────── */
/* ── Conversation — scenario picker ──────────────────────── */
.convo-picker-wrap { max-width: 900px; margin: 0 auto; padding: 32px 20px 60px; }
.convo-picker-header { text-align: center; margin-bottom: 28px; }
.convo-picker-title { font-size: 30px; font-weight: 900; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.convo-picker-sub { color: var(--text3); font-size: 15px; }
.convo-lang-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; justify-content: center; }
.convo-lang-btn { padding: 8px 14px; border-radius: 999px; background: var(--bg2); border: 1.5px solid var(--border2); text-decoration: none; transition: all .15s; display: flex; align-items: center; gap: 6px; color: var(--text); }
.convo-lang-btn:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg2)); text-decoration: none; color: var(--text); }
.convo-lang-btn.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, var(--bg2)); font-weight: 700; }
.convo-lang-flag { font-size: 18px; line-height: 1; }
.convo-lang-name { font-size: 13px; font-weight: 600; }
.convo-scenario-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; justify-content: center; }
.convo-tab { padding: 9px 20px; border-radius: 999px; font-size: 14px; font-weight: 700; background: var(--bg2); color: var(--text2); border: 1.5px solid var(--border); cursor: pointer; transition: all .15s; }
.convo-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.convo-tab:hover:not(.active) { border-color: var(--accent); color: var(--text1); }
.convo-scenario-grid { width: 100%; }
.scenario-type-group { display: none; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.scenario-card { background: var(--bg2); border: 1.5px solid var(--border); border-radius: 18px; padding: 22px 24px; text-decoration: none; color: var(--text); transition: all .2s; display: block; }
.scenario-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.15); text-decoration: none; }
.scenario-card.locked-card { opacity: .55; cursor: default; }
.scenario-card.locked-card:hover { transform: none; box-shadow: none; border-color: var(--border); }
.scenario-title { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.scenario-desc { font-size: 13px; color: var(--text2); line-height: 1.55; }

/* ── Conversation — chat UI ──────────────────────────────── */
.convo-chat-wrap { max-width: 820px; margin: 0 auto; padding: 20px 20px 40px; display: flex; flex-direction: column; height: calc(100vh - 64px); box-sizing: border-box; }
.convo-chat-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-shrink: 0; }
.convo-chat-title { flex: 1; font-size: 18px; font-weight: 800; }
.convo-difficulty-tag { font-size: 12px; font-weight: 700; background: var(--bg3); padding: 4px 12px; border-radius: 999px; color: var(--text2); }
.convo-scenario-banner { background: linear-gradient(135deg, color-mix(in srgb, var(--blue3) 10%, var(--bg2)), var(--bg2)); border: 1px solid color-mix(in srgb, var(--blue3) 30%, var(--border)); border-radius: 14px; padding: 14px 18px; margin-bottom: 14px; font-size: 14px; color: var(--text2); line-height: 1.6; flex-shrink: 0; }
.convo-messages { flex: 1; overflow-y: auto; background: var(--bg2); border: 1px solid var(--border); border-radius: 20px; padding: 20px 16px; display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; scroll-behavior: smooth; }
.convo-messages::-webkit-scrollbar { width: 4px; }
.convo-messages::-webkit-scrollbar-track { background: transparent; }
.convo-messages::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 999px; }

/* Row wrapper for avatar + bubble alignment */
.convo-msg-row { display: flex; align-items: flex-end; gap: 8px; margin: 2px 0; }
.convo-msg-row.row-user { flex-direction: row-reverse; }
.convo-msg-row.row-system { justify-content: center; }

/* Avatars */
.convo-avatar { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.avatar-ai { background: linear-gradient(135deg, #0d9488, #0e7490); color: #fff; }
.avatar-user { background: var(--blue2); color: #fff; font-size: 12px; font-weight: 800; }

/* Bubbles */
.convo-msg { padding: 11px 16px; border-radius: 18px; max-width: 72%; font-size: 15px; line-height: 1.65; word-break: break-word; }
.convo-user { background: var(--blue2); color: #fff; border-radius: 18px 18px 4px 18px; }
.convo-assistant { background: var(--bg1); color: var(--text1); border: 1px solid var(--border); border-radius: 18px 18px 18px 4px; }
.convo-system { background: color-mix(in srgb, var(--accent) 8%, var(--bg2)); color: var(--text3); font-size: 12px; border-radius: 10px; padding: 8px 14px; max-width: 88%; text-align: center; font-style: italic; }
.convo-correction { display: inline-block; background: color-mix(in srgb, #10b981 15%, transparent); color: #10b981; padding: 1px 8px; border-radius: 6px; font-size: 13px; margin-top: 4px; font-style: normal; }

/* Timestamps */
.convo-time { font-size: 10px; color: var(--text3); padding: 0 4px; flex-shrink: 0; align-self: flex-end; margin-bottom: 2px; }

/* Typing indicator */
.convo-typing .convo-msg { background: var(--bg1); border: 1px solid var(--border); color: var(--text3); font-style: italic; }

/* Input bar */
.convo-input-bar { display: flex; gap: 10px; align-items: flex-end; background: var(--bg2); border: 1.5px solid var(--border); border-radius: 16px; padding: 10px 12px; flex-shrink: 0; transition: border-color .15s; }
.convo-input-bar:focus-within { border-color: var(--accent); }
.convo-input { flex: 1; background: none; border: none; outline: none; font-size: 15px; color: var(--text1); resize: none; font-family: inherit; line-height: 1.4; max-height: 120px; overflow-y: auto; }
.convo-input::placeholder { color: var(--text3); }
.convo-send-btn { background: var(--accent); color: #fff; border: none; border-radius: 10px; padding: 8px 16px; font-size: 14px; font-weight: 700; cursor: pointer; transition: opacity .15s; flex-shrink: 0; }
.convo-send-btn:hover { opacity: .85; }
.convo-send-btn:disabled { opacity: .4; cursor: default; }

/* ── Homework ─────────────────────────────────────────────── */
.homework-wrap { max-width: 760px; margin: 0 auto; padding: 0 20px 80px; }
.hw-controls-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.homework-lang-row { display: flex; align-items: center; gap: 12px; }
.homework-lang-row label { font-size: 14px; font-weight: 600; color: var(--text2); white-space: nowrap; }
.homework-lang-row select { width: auto; }
.hw-mode-toggle { display: flex; gap: 4px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px; }
.hw-mode-btn { padding: 6px 14px; border-radius: calc(var(--radius) - 2px); border: none; background: transparent; color: var(--text2); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; white-space: nowrap; }
.hw-mode-btn:hover { color: var(--text1); background: var(--bg4); }
.hw-mode-btn.hw-mode-active { background: var(--accent); color: #fff; }
.homework-chat { min-height: 280px; max-height: 500px; overflow-y: auto; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.hw-message { padding: 12px 16px; border-radius: var(--radius); max-width: 90%; font-size: 14px; line-height: 1.7; }
.hw-user { background: var(--blue2); color: #fff; align-self: flex-end; }
.hw-assistant { background: var(--bg3); color: var(--text); align-self: flex-start; border-left: 3px solid var(--blue3); }
.homework-input-row { display: flex; flex-direction: column; gap: 8px; }
.hw-input { width: 100%; resize: vertical; min-height: 72px; box-sizing: border-box; }

/* ── Daily Scenario ──────────────────────────────────────── */
.daily-page { max-width: 680px; margin: 0 auto; padding: 32px 24px 80px; }
.scenario-card-big { background: var(--bg2); border: 1px solid var(--blue3); border-radius: var(--radius-lg); padding: 28px 28px 24px; margin: 20px 0; position: relative; }
.scenario-situation-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--text3); margin-bottom: 10px; }
.scenario-text { font-size: 22px; font-weight: 700; line-height: 1.5; color: var(--text); }
.scenario-lang-badge { position: absolute; top: 16px; right: 16px; font-size: 12px; background: var(--bg3); padding: 4px 10px; border-radius: 999px; color: var(--text2); }
.scenario-form { margin: 20px 0; }
.scenario-input { width: 100%; resize: vertical; min-height: 100px; font-size: 16px; }
.scenario-feedback { background: var(--bg2); border: 1px solid var(--green); border-left: 4px solid var(--green); border-radius: var(--radius-lg); padding: 20px 22px; margin-top: 20px; }
.scenario-feedback h3 { font-size: 16px; font-weight: 800; margin-bottom: 10px; color: var(--green); }
.scenario-feedback p { font-size: 14px; color: var(--text); line-height: 1.7; }
.scenario-done-msg { background: rgba(16,185,129,.1); border: 1px solid var(--green); color: var(--green); border-radius: var(--radius); padding: 12px 18px; font-weight: 700; font-size: 14px; text-align: center; margin: 16px 0; }
.scenario-response-view { background: var(--bg3); border-radius: var(--radius); padding: 16px; font-size: 14px; color: var(--text2); margin-top: 12px; }

/* ── Mistake drill ────────────────────────────────────────── */
.mistake-drill-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 24px; }
.mistake-drill-card { background: var(--bg2); border: 1px solid rgba(239,68,68,.3); border-radius: var(--radius); padding: 16px; position: relative; }
.mistake-count-badge { position: absolute; top: 10px; right: 10px; background: rgba(239,68,68,.15); color: var(--red); font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px; }
.mistake-count-badge-sm { font-size: 11px; font-weight: 700; color: var(--red); background: rgba(239,68,68,.1); padding: 2px 8px; border-radius: 999px; display: inline-block; margin-bottom: 6px; }
.mistake-prompt { font-size: 13px; color: var(--text2); margin-top: 6px; }
.mistake-lesson-tag { font-size: 11px; color: var(--text3); margin-top: 8px; }

/* ── Language maintenance ─────────────────────────────────── */
.maintenance-wrap { max-width: 860px; margin: 0 auto; padding: 0 20px 80px; }
.maintenance-section { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; }
.maintenance-section h2 { font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.maintenance-words { display: flex; flex-wrap: wrap; gap: 10px; }
.maintenance-word { background: var(--bg3); border-radius: var(--radius); padding: 10px 16px; display: flex; gap: 10px; align-items: center; }
.mw-word { font-size: 17px; font-weight: 800; }
.mw-trans { font-size: 13px; color: var(--text3); }
.maintenance-chat { min-height: 240px; max-height: 380px; overflow-y: auto; background: var(--bg3); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }

/* ── Stage progress (supplemental) ───────────────────────── */
.stage-progress-bar { height: 5px; background: var(--bg3); border-radius: 999px; width: 120px; overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 6px; }
.stage-progress-fill { height: 5px; background: var(--blue3); border-radius: 999px; transition: width .4s; }
.stage-progress-label { font-size: 12px; color: var(--text3); vertical-align: middle; }
.stage-info { flex: 1; }
.stage-name { font-size: 15px; font-weight: 800; display: block; margin-bottom: 4px; }

/* ── Feedback enhancements ───────────────────────────────── */
.feedback-answer { background: var(--bg3); border-radius: var(--radius); padding: 10px 16px; font-size: 18px; font-weight: 800; margin: 12px 0 8px; }
.feedback-hint { font-size: 13px; color: var(--text2); margin-bottom: 8px; }
.feedback-chars { font-size: 42px; font-weight: 700; letter-spacing: 3px; margin: 6px 0 4px; }
.feedback-content { text-align: center; max-width: 340px; padding: 32px 28px; background: var(--bg2); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.feedback-overlay { position: fixed; inset: 0; z-index: 500; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 24px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.feedback-overlay.show { opacity: 1; pointer-events: auto; }
.feedback-icon { font-size: 52px; margin-bottom: 8px; }
.feedback-text { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.feedback-btn { margin-top: 16px; min-width: 140px; }
.feedback-overlay.partial { background: rgba(234,179,8,.10); border-top: 3px solid #eab308; }
.feedback-overlay.partial .feedback-text { color: #eab308; }
.feedback-overlay.partial .feedback-btn { background: #eab308; color: #000; }
.feedback-partial-note { font-size: 13px; color: #eab308; font-weight: 700; margin: 4px 0 8px; }

/* ── Lesson intro card ───────────────────────────────────── */
.intro-card { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.intro-tag { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue3); background: color-mix(in srgb, var(--blue2) 12%, var(--bg2)); border-radius: 999px; padding: 3px 10px; }
.intro-title { font-size: 22px; font-weight: 800; color: var(--text1); line-height: 1.25; }
.intro-desc { font-size: 15px; color: var(--text2); line-height: 1.6; }
.intro-formality-note { font-size: 13px; color: var(--text2); background: var(--bg3); border-left: 3px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; padding: 10px 14px; line-height: 1.55; }

/* ── Explanation card ────────────────────────────────────── */
.explain-card { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.explain-icon { font-size: 36px; }
.explain-content { width: 100%; }
.explain-text { font-size: 16px; line-height: 1.65; color: var(--text1); white-space: pre-line; }
.explain-example { font-size: 14px; color: var(--text2); margin-top: 10px; font-style: italic; background: var(--bg3); padding: 10px 14px; border-radius: var(--radius); border-left: 3px solid var(--blue3); }

/* ── Settings change-password page ──────────────────────── */
/* ── Homework image upload ───────────────────────────────── */
.hw-form-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.hw-image-btn { display: flex; align-items: center; gap: 4px; padding: 8px 14px; border-radius: var(--radius); background: var(--bg3); border: 1px solid var(--border2); font-size: 13px; font-weight: 600; color: var(--text2); cursor: pointer; transition: all .15s; white-space: nowrap; }
.hw-image-btn:hover { background: var(--bg4); color: var(--text1); }
.hw-image-preview { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; }
.hw-image-preview img { max-width: 140px; max-height: 100px; border-radius: var(--radius); object-fit: cover; border: 1px solid var(--border); }
.hw-image-remove { background: var(--bg3); border: none; border-radius: 999px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 13px; color: var(--text2); flex-shrink: 0; }
.hw-image-remove:hover { background: var(--red); color: #fff; }

/* ── Translator ──────────────────────────────────────────── */
.translator-wrap { max-width: 900px; margin: 0 auto; padding: 0 16px 80px; }
.translator-lang-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.translator-lang-sel { flex: 1; }
.translator-swap-btn { background: var(--bg3); border: 1px solid var(--border2); border-radius: var(--radius); padding: 8px 14px; font-size: 18px; cursor: pointer; transition: all .15s; color: var(--text1); }
.translator-swap-btn:hover { background: var(--blue2); color: #fff; border-color: var(--blue2); }
.translator-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 640px) { .translator-panels { grid-template-columns: 1fr; } }
.translator-panel { position: relative; display: flex; flex-direction: column; }
.translator-input { width: 100%; min-height: 180px; resize: vertical; background: var(--bg2); color: var(--text1); border: 1px solid var(--border2); border-radius: var(--radius); padding: 14px; font-size: 15px; font-family: inherit; line-height: 1.6; }
.translator-input:focus { outline: none; border-color: var(--blue2); }
.translator-output { min-height: 180px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; font-size: 15px; line-height: 1.6; color: var(--text1); white-space: pre-wrap; word-break: break-word; }
.translator-placeholder { color: var(--text3); font-style: italic; }
.translator-thinking { color: var(--text2); animation: pulse 1s infinite; }
.translator-clear-btn, .translator-copy-btn { margin-top: 8px; align-self: flex-end; background: none; border: 1px solid var(--border2); border-radius: var(--radius); padding: 5px 12px; font-size: 13px; color: var(--text2); cursor: pointer; transition: all .15s; display: inline-flex; align-items: center; gap: 4px; }
.translator-clear-btn:hover { border-color: var(--red); color: var(--red); }
.translator-copy-btn:hover { border-color: var(--green); color: var(--green); }
.translator-actions { display: flex; align-items: center; gap: 16px; }
.translator-status { font-size: 13px; color: var(--text2); }

/* ── Auth native lang select ─────────────────────────────── */
.auth-native-lang { width: 100%; margin-top: 4px; }

/* ── Settings change-password page ──────────────────────── */
.change-pw-wrap { max-width: 440px; margin: 0 auto; padding: 32px 20px 80px; }
.change-pw-wrap h1 { margin-bottom: 24px; }
.change-pw-wrap .settings-card label { display: block; font-size: 13px; color: var(--text2); margin-bottom: 4px; margin-top: 16px; }
.change-pw-wrap .settings-card input { width: 100%; }
.change-pw-submit { margin-top: 24px; }

/* ── Mobile-first refinements ────────────────────────────── */
@media (max-width: 640px) {
  .dashboard-widgets { grid-template-columns: 1fr; }
  .convo-scenario-grid { grid-template-columns: 1fr; }
  .mistake-drill-list { grid-template-columns: 1fr; }
  .scenario-text { font-size: 18px; }
  .rank-name { font-size: 18px; }
  .convo-chat-wrap, .homework-wrap, .maintenance-wrap { padding: 0 12px 60px; }
  .convo-scenario-banner { padding: 10px 14px; }
}


/* ── Plan tier card ──────────────────────────────────────── */
.plan-tier-card { border-radius: var(--radius); }
.plan-tier-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; margin-right: 8px; }
.plan-features-list { list-style: none; padding: 0; margin: 10px 0 0; font-size: 13px; color: var(--text2); }
.plan-features-list li { padding: 3px 0; }

/* ── Upgrade gate (locked feature page) ─────────────────── */
.upgrade-gate { max-width: 440px; margin: 80px auto; text-align: center; padding: 20px; }
.upgrade-gate-icon { font-size: 48px; margin-bottom: 16px; }
.upgrade-gate h2 { font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.upgrade-gate p { color: var(--text2); margin-bottom: 24px; line-height: 1.6; }
.upgrade-gate .btn-primary { margin-right: 12px; }

/* ── Locked scenario card ────────────────────────────────── */
.scenario-card.locked-card { opacity: .55; cursor: pointer; }
.scenario-card.locked-card:hover { opacity: .75; }

/* ── Fluent widget ───────────────────────────────────────── */
.widget-fluent { border-left: 3px solid #f59e0b; }

/* ── Nav locked link ─────────────────────────────────────── */
.nav-link.nav-locked { opacity: .55; }
.nav-link.nav-locked:hover { opacity: .8; }

/* ── Translator enriched output ──────────────────────────── */
.tr-formality-wrap { display: flex; flex-direction: column; gap: 12px; }
.tr-formality-block { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: var(--bg3); border-radius: var(--radius); }
.tr-formality-label { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.tr-formality-label.formal-lbl { color: var(--blue3); }
.tr-formality-label.casual-lbl { color: var(--green); }
.tr-formality-text { font-size: 17px; color: var(--text1); line-height: 1.5; }
.tr-main { display: block; font-size: 16px; line-height: 1.6; }
.tr-literal { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text2); line-height: 1.5; }
.tr-slang { margin-top: 10px; padding: 8px 12px; background: var(--bg2); border-radius: var(--radius); border-left: 3px solid #f59e0b; font-size: 13px; color: var(--text2); line-height: 1.5; }
.tr-label { font-weight: 700; color: var(--text1); margin-right: 4px; }

/* ── Translator multi-meaning view ───────────────────────── */
.tr-meanings-label { font-size: 12px; color: var(--text3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.tr-meanings-list { display: flex; flex-direction: column; gap: 0; }
.tr-meaning-row { padding: 12px 0; border-bottom: 1px solid var(--border); }
.tr-meaning-row:last-child { border-bottom: none; }
.tr-meaning-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tr-meaning-word { font-size: 17px; font-weight: 700; color: var(--text1); }
.tr-meaning-pos { font-size: 11px; background: var(--bg3); color: var(--text2); border-radius: 4px; padding: 2px 7px; text-transform: uppercase; letter-spacing: .04em; }
.tr-why-btn { margin-left: auto; background: none; border: 1px solid var(--blue2); color: var(--blue2); border-radius: var(--radius); padding: 3px 10px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; white-space: nowrap; }
.tr-why-btn:hover { background: var(--blue2); color: #fff; }
.tr-meaning-example { margin-top: 5px; font-size: 13px; color: var(--text2); }
.tr-ex-orig { font-style: italic; }
.tr-ex-arr { color: var(--text3); margin: 0 4px; }
.tr-ex-trans { color: var(--text2); }
.tr-explain-box { margin-top: 10px; padding: 12px 14px; background: var(--bg2); border-radius: var(--radius); border-left: 3px solid var(--blue2); }
.tr-explain-text { font-size: 14px; color: var(--text1); line-height: 1.65; white-space: pre-wrap; }
.tr-explain-loading { font-size: 13px; color: var(--text2); font-style: italic; }


/* ── Pricing redesign ────────────────────────────────────── */
.pricing-hero { text-align: center; padding: 48px 20px 32px; }
.pricing-hero h1 { font-size: clamp(28px, 5vw, 48px); font-weight: 900; line-height: 1.15; margin-bottom: 14px; }
.pricing-hero-sub { font-size: 17px; color: var(--text2); max-width: 560px; margin: 0 auto; }
.pricing-grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pricing-grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.plan-emoji { font-size: 32px; margin-bottom: 8px; }
.plan-tagline { font-size: 13px; color: var(--text2); margin-top: 4px; margin-bottom: 16px; font-style: italic; }
.plan-social-proof { font-size: 12px; color: var(--text3); text-align: center; margin-top: 10px; }
.btn-full { width: 100%; text-align: center; display: block; }
.btn-travel { background: #3b82f6; color: #fff; border-radius: var(--radius); padding: 10px 18px; font-weight: 700; font-size: 14px; display: inline-block; text-decoration: none; }
.btn-travel:hover { background: #2563eb; }
.btn-fluent { background: #f59e0b; color: #fff; border-radius: var(--radius); padding: 10px 18px; font-weight: 700; font-size: 14px; display: inline-block; text-decoration: none; }
.btn-fluent:hover { background: #d97706; }
.plan-current-badge { text-align: center; padding: 10px; font-size: 13px; color: var(--text2); font-weight: 600; border: 1px dashed var(--border); border-radius: var(--radius); }

/* ── Pricing FAQ ─────────────────────────────────────────── */
.pricing-faq { max-width: 720px; margin: 48px auto 32px; padding: 0 20px; }
.pricing-faq h2 { font-size: 22px; font-weight: 800; margin-bottom: 20px; text-align: center; }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .faq-grid { grid-template-columns: 1fr; } }
.faq-item { padding: 16px; background: var(--bg2); border-radius: var(--radius); }
.faq-q { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.faq-a { font-size: 13px; color: var(--text2); line-height: 1.55; }

/* ── Trip widget ─────────────────────────────────────────── */
.widget-trip { border-left: 3px solid #3b82f6; }
.widget-trip.trip-urgent { border-left-color: #ef4444; }
.widget-trip.trip-today { border-left-color: #22c55e; }
.trip-countdown-number { font-size: 48px; font-weight: 900; color: #3b82f6; line-height: 1; }
.trip-urgent .trip-countdown-number { color: #ef4444; animation: pulse 1.5s infinite; }
.trip-countdown-label { font-size: 14px; color: var(--text2); margin-top: 4px; }

/* ── Progress timeline widget ────────────────────────────── */
.widget-timeline { border-left: 3px solid #22c55e; }
.timeline-bar-wrap { background: var(--bg3); border-radius: 999px; height: 8px; margin: 10px 0 6px; overflow: hidden; }
.timeline-bar { height: 100%; background: #22c55e; border-radius: 999px; transition: width .5s; }
.timeline-label { font-size: 12px; color: var(--text3); }

/* ── CEFR badge ──────────────────────────────────────────── */
.cefr-badge { display: inline-block; padding: 3px 12px; background: #f59e0b; color: #fff; border-radius: 999px; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.cefr-result-banner { max-width: 400px; margin: 0 auto 24px; text-align: center; padding: 20px; background: var(--bg2); border-radius: var(--radius); }
.cefr-result-level { font-size: 56px; font-weight: 900; color: #f59e0b; line-height: 1; margin-bottom: 8px; }

/* ── Onboarding ──────────────────────────────────────────── */
.onboarding-wrap { min-height: 80vh; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; }
.onboarding-card { background: var(--bg2); border-radius: var(--radius); padding: 36px 32px; max-width: 560px; width: 100%; }
.onboarding-logo { font-size: 28px; font-weight: 900; margin-bottom: 16px; }
.onboarding-card h1 { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.onboarding-sub { color: var(--text2); font-size: 15px; margin-bottom: 28px; }
.onboarding-form { display: flex; flex-direction: column; gap: 28px; }
.onboarding-step { padding: 20px; background: var(--bg3); border-radius: var(--radius); transition: opacity .3s; }
.onboarding-step h2 { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.step-number { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); margin-bottom: 8px; font-weight: 600; }
.onboarding-choices { display: flex; flex-direction: column; gap: 8px; }
.choice-card { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg2); border: 1.5px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: border-color .15s, background .15s; }
.choice-card:hover { border-color: var(--blue2); }
.choice-card input[type=radio] { accent-color: var(--blue2); width: 16px; height: 16px; flex-shrink: 0; }
.choice-card input[type=radio]:checked + span { color: var(--text1); font-weight: 600; }
.choice-card:has(input:checked) { border-color: var(--blue2); background: color-mix(in srgb, var(--blue2) 10%, var(--bg2)); }
.choice-card span { font-size: 14px; color: var(--text1); }
.onboarding-submit { margin-top: 8px; }

/* ── Cheat sheet ─────────────────────────────────────────── */
.cheat-sheet-wrap { max-width: 800px; margin: 0 auto; padding: 24px 16px; }
.cs-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.cs-title-row { display: flex; align-items: center; gap: 12px; }
.cs-flag { font-size: 32px; }
.cs-header h1 { font-size: 22px; font-weight: 800; }
.cs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .cs-grid { grid-template-columns: 1fr; } }
.cs-section { background: var(--bg2); border-radius: var(--radius); padding: 16px; }
.cs-category { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); margin-bottom: 10px; }
.cs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cs-table tr { border-bottom: 1px solid var(--border); }
.cs-table tr:last-child { border-bottom: none; }
.cs-en { padding: 5px 8px 5px 0; color: var(--text2); width: 50%; }
.cs-native { padding: 5px 0; color: var(--text1); font-weight: 600; }
.cs-footer { text-align: center; font-size: 11px; color: var(--text3); margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
.cs-lang-switch { display: flex; gap: 8px; justify-content: center; margin: 20px auto; flex-wrap: wrap; }
.cs-lang-btn { padding: 6px 14px; background: var(--bg2); border-radius: 999px; font-size: 13px; text-decoration: none; color: var(--text1); }
.cs-lang-btn.active { background: var(--blue2); color: #fff; }
@media print {
  .no-print, nav, .top-nav { display: none !important; }
  body { background: #fff; color: #000; }
  .cs-section { border: 1px solid #ddd; break-inside: avoid; }
  .cs-en { color: #555; }
  .cs-native { color: #000; }
}

/* ── Essay grader ────────────────────────────────────────── */
.essay-wrap { max-width: 700px; margin: 0 auto; }
.essay-controls { display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.essay-select { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; color: var(--text1); font-size: 14px; }
.essay-textarea { width: 100%; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; color: var(--text1); font-size: 14px; resize: vertical; line-height: 1.6; margin-bottom: 12px; font-family: inherit; }
.essay-loading { padding: 24px; text-align: center; color: var(--text2); font-size: 15px; }
.essay-result { background: var(--bg2); border-radius: var(--radius); padding: 24px; margin-top: 20px; }
.essay-score-wrap { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.essay-score { font-size: 64px; font-weight: 900; line-height: 1; }
.essay-grade-letter { font-size: 28px; font-weight: 800; color: var(--text2); padding-bottom: 8px; }
.essay-summary { font-size: 15px; color: var(--text1); margin-bottom: 20px; line-height: 1.65; }
.essay-section { margin-bottom: 18px; }
.essay-section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text3); margin-bottom: 8px; }
.essay-section ul { padding-left: 20px; font-size: 14px; color: var(--text1); line-height: 1.7; }
.essay-section p { font-size: 14px; color: var(--text1); line-height: 1.65; }
.essay-corrected { font-style: italic; color: var(--text2); padding: 12px; background: var(--bg3); border-radius: var(--radius); }

/* ── Fluency test ────────────────────────────────────────── */
.fluency-test-wrap { max-width: 600px; margin: 0 auto; }
.fluency-lang-row { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.fluency-lang-row select { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; color: var(--text1); font-size: 14px; }
.ft-lang-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.ft-lang-pill { display: flex; align-items: center; gap: 6px; background: var(--bg2); border: 1.5px solid var(--border2); border-radius: 999px; padding: 6px 14px; font-size: 14px; color: var(--text2); cursor: pointer; transition: border-color .15s, color .15s; }
.ft-lang-pill:hover { border-color: var(--blue3); color: var(--text1); }
.ft-lang-pill.ft-lang-active { border-color: var(--blue2); color: var(--text1); background: color-mix(in srgb, var(--blue2) 12%, var(--bg2)); }
.ft-pill-name { font-size: 13px; }
.ft-loading { padding: 40px; text-align: center; color: var(--text2); font-size: 16px; }
.ft-progress { font-size: 13px; color: var(--text3); margin-bottom: 6px; }
.ft-progress-bar { background: var(--bg3); border-radius: 999px; height: 6px; margin-bottom: 24px; overflow: hidden; }
.ft-progress-fill { height: 100%; background: var(--blue2); border-radius: 999px; transition: width .3s; }
.ft-question { font-size: 18px; font-weight: 700; margin-bottom: 20px; line-height: 1.4; }
.ft-options { display: flex; flex-direction: column; gap: 10px; }
.ft-option { background: var(--bg2); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 13px 16px; text-align: left; color: var(--text1); font-size: 15px; cursor: pointer; transition: border-color .15s; }
.ft-option:hover:not(:disabled) { border-color: var(--blue2); }
.ft-option.ft-correct { border-color: #22c55e; background: color-mix(in srgb, #22c55e 15%, var(--bg2)); color: #22c55e; }
.ft-option.ft-wrong { border-color: #ef4444; background: color-mix(in srgb, #ef4444 15%, var(--bg2)); color: #ef4444; }
.ft-result { text-align: center; padding: 32px; }
.ft-result-level { font-size: 72px; font-weight: 900; line-height: 1; margin-bottom: 16px; }
.ft-result-explanation { font-size: 15px; color: var(--text1); line-height: 1.65; margin-bottom: 16px; }
.ft-next-steps { font-size: 14px; color: var(--text2); padding: 14px; background: var(--bg2); border-radius: var(--radius); line-height: 1.6; }
.ft-stop-btn { margin-top: 20px; background: none; border: 1px solid var(--border2); border-radius: 999px; padding: 7px 18px; font-size: 13px; color: var(--text3); cursor: pointer; transition: color .15s, border-color .15s; }
.ft-stop-btn:hover { color: var(--red); border-color: var(--red); }

/* ── Story lesson ────────────────────────────────────────── */
.story-wrap { max-width: 680px; margin: 0 auto; }
.story-controls { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; align-items: center; }
.story-controls select { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; color: var(--text1); font-size: 14px; }
.story-loading { padding: 40px; text-align: center; color: var(--text2); font-size: 16px; }
.story-placeholder { padding: 40px; text-align: center; color: var(--text3); font-size: 15px; border: 1.5px dashed var(--border); border-radius: var(--radius); }
.story-content { background: var(--bg2); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.story-title { font-size: 20px; font-weight: 800; margin-bottom: 16px; }
.story-body { font-size: 16px; line-height: 1.75; color: var(--text1); white-space: pre-wrap; }
.story-trans-btn { margin-top: 16px; }
.story-translation { margin-top: 12px; padding: 16px; background: var(--bg3); border-radius: var(--radius); font-size: 14px; color: var(--text2); line-height: 1.7; white-space: pre-wrap; }
.story-questions { background: var(--bg2); border-radius: var(--radius); padding: 24px; }
.story-q-title { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text3); margin-bottom: 20px; }
.story-question { margin-bottom: 24px; }
.story-q-text { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.story-q-options { display: flex; flex-direction: column; gap: 8px; }
.story-opt { background: var(--bg3); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 10px 14px; text-align: left; color: var(--text1); font-size: 14px; cursor: pointer; }
.story-opt:hover:not(:disabled) { border-color: var(--blue2); }
.story-opt-correct { border-color: #22c55e !important; background: color-mix(in srgb, #22c55e 15%, var(--bg3)) !important; }
.story-opt-wrong { border-color: #ef4444 !important; background: color-mix(in srgb, #ef4444 15%, var(--bg3)) !important; }
.story-q-feedback { font-size: 13px; margin-top: 6px; font-weight: 600; }

/* ── Referral page ───────────────────────────────────────── */
.referral-wrap { max-width: 520px; margin: 0 auto; }
.referral-card { background: var(--bg2); border-radius: var(--radius); padding: 28px; }
.referral-code-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); margin-bottom: 8px; }
.referral-code { font-size: 14px; color: var(--text2); margin-top: 12px; }
.referral-url-row { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.referral-url-input { flex: 1; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; color: var(--text2); font-size: 13px; }
.referral-stats { display: flex; gap: 24px; margin: 20px 0; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ref-stat { text-align: center; }
.ref-stat-num { font-size: 32px; font-weight: 900; color: var(--text1); }
.ref-stat-label { font-size: 12px; color: var(--text3); }
.referral-how { margin-top: 20px; }
.referral-how h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.referral-how ol { padding-left: 20px; font-size: 14px; color: var(--text2); line-height: 1.8; }
.ref-fine-print { font-size: 12px; color: var(--text3); margin-top: 10px; }
.ref-progress-wrap { margin: 20px 0; }
.ref-progress-label { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.ref-progress-bar { height: 10px; background: var(--bg3); border-radius: 999px; overflow: hidden; margin-bottom: 6px; }
.ref-progress-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s; }
.ref-progress-sub { font-size: 12px; color: var(--text3); }
.ref-trial-active { background: color-mix(in srgb, var(--accent) 12%, var(--bg2)); border: 1px solid var(--accent); border-radius: var(--radius); padding: 14px 18px; font-weight: 700; font-size: 14px; margin-bottom: 16px; color: var(--accent); }
.ref-trial-expired { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; font-size: 13px; color: var(--text2); margin-bottom: 16px; }

/* ── Form success message ────────────────────────────────── */
.form-success { color: #22c55e; font-size: 14px; font-weight: 600; margin-bottom: 12px; padding: 10px 14px; background: color-mix(in srgb, #22c55e 12%, var(--bg2)); border-radius: var(--radius); }

/* ── My Courses hub ──────────────────────────────────────── */
.course-hub-wrap { max-width: 900px; margin: 0 auto; padding: 32px 16px; }
.course-hub-header { margin-bottom: 28px; }
.course-hub-header h1 { font-size: 28px; font-weight: 800; margin-bottom: 6px; }
.course-hub-sub { color: var(--text3); font-size: 14px; }
.course-hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.course-hub-card { background: var(--bg2); border: 2px solid var(--border); border-radius: var(--radius); padding: 24px 20px; display: flex; flex-direction: column; gap: 8px; transition: border-color .15s, box-shadow .15s; }
.course-hub-card:hover:not(.course-locked) { border-color: var(--course-color); box-shadow: 0 0 0 4px color-mix(in srgb, var(--course-color) 12%, transparent); }
.course-locked { opacity: .6; }
.course-card-icon { font-size: 36px; }
.course-card-name { font-size: 17px; font-weight: 800; color: var(--text1); }
.course-card-tagline { font-size: 13px; color: var(--text3); line-height: 1.4; flex: 1; }
.course-card-progress { display: flex; flex-direction: column; gap: 5px; margin: 4px 0; }
.course-progress-bar { height: 6px; background: var(--bg3); border-radius: 99px; overflow: hidden; }
.course-progress-bar.large { height: 8px; }
.course-progress-fill { height: 100%; border-radius: 99px; background: var(--course-color, #6b7280); transition: width .4s; }
.course-progress-label { font-size: 12px; color: var(--text3); }
.btn-upgrade-course { display: inline-block; padding: 8px 14px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; font-weight: 600; color: var(--text2); text-decoration: none; text-align: center; margin-top: 4px; }
.btn-course-cta { display: inline-block; margin-top: 6px; text-align: center; }
.mini-cefr-badge { font-size: 12px; background: color-mix(in srgb, #f59e0b 15%, var(--bg3)); color: #f59e0b; border-radius: 8px; padding: 3px 8px; width: fit-content; }
.course-hub-footer { margin-top: 28px; text-align: center; }

/* ── Individual course pages ─────────────────────────────── */
.course-page-wrap { max-width: 860px; margin: 0 auto; padding: 24px 16px 48px; }
.course-page-header { background: var(--bg2); border: 1px solid var(--border); border-top: 3px solid var(--course-color); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; display: flex; flex-direction: column; gap: 14px; }
.course-page-title { display: flex; align-items: flex-start; gap: 16px; }
.course-page-icon { font-size: 44px; line-height: 1; }
.course-page-title h1 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.course-page-title p { font-size: 14px; color: var(--text3); margin: 0; }
.lang-name-inline { font-size: 16px; font-weight: 600; color: var(--text2); }
.lang-pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.lang-pill { display: inline-block; padding: 5px 14px; background: var(--bg3); border: 1px solid var(--border); border-radius: 99px; font-size: 13px; font-weight: 500; color: var(--text2); text-decoration: none; transition: background .15s, border-color .15s; }
.lang-pill:hover { background: var(--bg2); border-color: var(--text3); }
.lang-pill.active { background: color-mix(in srgb, var(--course-color) 20%, var(--bg2)); border-color: var(--course-color); color: var(--course-color); font-weight: 700; }
.course-overall-progress { display: flex; flex-direction: column; gap: 6px; }
.course-overall-progress span { font-size: 13px; color: var(--text3); }

/* Course tools row */
.course-tools-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.course-tool-btn { display: flex; flex-direction: column; align-items: flex-start; padding: 12px 16px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; font-weight: 600; color: var(--text1); text-decoration: none; flex: 1; min-width: 160px; transition: border-color .15s; }
.course-tool-btn:hover { border-color: var(--course-color, var(--accent)); }
.tool-note { font-size: 11px; color: var(--text3); font-weight: 400; margin-top: 2px; }

/* Lesson cards in course pages */
.course-lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-bottom: 24px; }
.course-lesson-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; transition: border-color .15s, background .15s; }
.course-lesson-card:hover { border-color: var(--course-color, var(--accent)); background: color-mix(in srgb, var(--course-color, var(--accent)) 6%, var(--bg2)); }
.course-lesson-card.done { border-color: color-mix(in srgb, var(--course-color, #22c55e) 40%, var(--border)); }
.cls-status { font-size: 16px; flex-shrink: 0; padding-top: 1px; }
.cls-title { font-size: 14px; font-weight: 700; color: var(--text1); display: block; }
.cls-desc { font-size: 12px; color: var(--text3); display: block; margin-top: 2px; }

/* Course stages (class course) */
.course-stage { margin-bottom: 32px; }
.course-stage-header { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.course-stage-header .stage-icon { font-size: 22px; }
.course-stage-header .stage-info { flex: 1; }
.course-stage-header .stage-name { font-size: 15px; font-weight: 700; color: var(--text1); }
.course-stage-header .stage-progress { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.course-stage-header .stage-progress-bar { flex: 1; height: 4px; background: var(--bg3); border-radius: 99px; max-width: 120px; overflow: hidden; }
.course-stage-header .stage-progress-fill { height: 100%; background: #8b5cf6; border-radius: 99px; }
.course-stage-header .stage-progress-label { font-size: 12px; color: var(--text3); }

/* Trip banner in travel course */
.course-trip-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: color-mix(in srgb, #3b82f6 12%, var(--bg3)); border: 1px solid color-mix(in srgb, #3b82f6 30%, var(--border)); border-radius: var(--radius); font-size: 14px; font-weight: 600; color: var(--text1); }
.course-trip-banner .btn-ghost.btn-xs { margin-left: auto; }
.course-trip-banner.trip-urgent { background: color-mix(in srgb, #ef4444 10%, var(--bg3)); border-color: color-mix(in srgb, #ef4444 30%, var(--border)); }
.course-trip-banner.trip-today { background: color-mix(in srgb, #22c55e 12%, var(--bg3)); border-color: color-mix(in srgb, #22c55e 30%, var(--border)); }
.course-trip-banner.trip-setup-prompt { opacity: .85; font-weight: 500; }
.btn-ghost.btn-xs { padding: 5px 10px; font-size: 12px; }

/* Fluent course split layout */
.course-fluent-split { display: grid; grid-template-columns: 1fr 220px; gap: 24px; }
.fluent-main {}
.fluent-sidebar { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; height: fit-content; }
.fluent-sidebar-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); margin-bottom: 14px; }
.course-lesson-section-title { font-size: 14px; font-weight: 700; color: var(--text2); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.course-cefr-widget { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.cefr-badge-large { width: 72px; height: 72px; border-radius: 50%; background: color-mix(in srgb, #f59e0b 15%, var(--bg3)); border: 3px solid #f59e0b; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 900; color: #f59e0b; }
.cefr-untested .cefr-badge-large { border-color: var(--border); background: var(--bg3); color: var(--text3); }
.cefr-badge-desc { font-size: 13px; color: var(--text2); font-weight: 600; }
.btn-primary.btn-xs, .btn-ghost.btn-xs { padding: 5px 10px; font-size: 12px; }

/* "You also have" bar */
.also-access { margin-top: 32px; padding: 14px 18px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; color: var(--text2); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.also-access span { color: var(--text3); font-weight: 600; }
.also-access a { color: var(--accent); text-decoration: none; font-weight: 600; }
.also-access a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .course-hub-grid { grid-template-columns: 1fr 1fr; }
  .course-fluent-split { grid-template-columns: 1fr; }
  .fluent-sidebar { order: -1; }
  .course-lesson-grid { grid-template-columns: 1fr; }
}

/* ── Lesson exit modal ───────────────────────────────────── */
.exit-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(6px); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.exit-modal-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 20px; padding: 40px 36px; max-width: 420px; width: 100%; text-align: center; box-shadow: 0 24px 80px rgba(0,0,0,.5); animation: exitModalPop .18s cubic-bezier(.34,1.56,.64,1); }
@keyframes exitModalPop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.exit-modal-icon { font-size: 48px; margin-bottom: 16px; }
.exit-modal-title { font-size: 22px; font-weight: 800; color: var(--text1); margin-bottom: 10px; }
.exit-modal-body { font-size: 14px; color: var(--text3); line-height: 1.6; margin-bottom: 28px; }
.exit-modal-btns { display: flex; flex-direction: column; gap: 10px; }
.exit-modal-btns .btn-primary { font-size: 15px; padding: 13px 20px; }
.exit-modal-leave { color: #ef4444; border-color: color-mix(in srgb, #ef4444 30%, var(--border)); font-size: 14px; }
.exit-modal-leave:hover { background: color-mix(in srgb, #ef4444 10%, var(--bg3)); border-color: #ef4444; }

/* ── Grammar Reference ───────────────────────────────────── */
.gr-wrap { max-width: 900px; margin: 0 auto; padding: 0 16px 60px; }
.gr-lang-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.gr-lang-btn { padding: 7px 14px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--border); color: var(--text2); font-size: 13px; font-weight: 600; text-decoration: none; transition: all .15s; }
.gr-lang-btn:hover, .gr-lang-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.gr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.gr-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; }
.gr-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.gr-icon { font-size: 22px; }
.gr-card-header h3 { font-size: 15px; font-weight: 700; color: var(--text1); }
.gr-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.gr-item { font-size: 13px; color: var(--text2); padding: 6px 10px; background: var(--bg3); border-radius: 8px; line-height: 1.5; }
.gr-note { font-size: 12px; color: var(--text3); margin-top: 28px; text-align: center; }

/* ── Vocabulary Coverage ─────────────────────────────────── */
.vc-wrap { max-width: 800px; margin: 0 auto; padding: 0 16px 60px; }
.vc-hero { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 32px; }
.vc-hero-stat { background: linear-gradient(135deg, #1e40af, #3b82f6); border-radius: 16px; padding: 24px 16px; text-align: center; color: #fff; }
.vc-big-num { font-size: 36px; font-weight: 900; line-height: 1.1; }
.vc-big-label { font-size: 12px; opacity: .85; margin-top: 4px; }
.vc-section { background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px; margin-bottom: 16px; }
.vc-section h2 { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.vc-tier-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.vc-tier-label { font-size: 13px; color: var(--text2); min-width: 140px; }
.vc-tier-bar-wrap { flex: 1; display: flex; align-items: center; gap: 10px; }
.vc-tier-bar { flex: 1; height: 8px; background: var(--bg3); border-radius: 99px; overflow: hidden; }
.vc-tier-fill { height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s ease; }
.vc-tier-pct { font-size: 12px; color: var(--text3); white-space: nowrap; }
.vc-wb-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.vc-wb-stat { background: var(--bg3); border-radius: 12px; padding: 14px 12px; text-align: center; }
.vc-wb-stat strong { display: block; font-size: 24px; font-weight: 800; color: var(--text1); }
.vc-wb-stat span { font-size: 11px; color: var(--text3); }
.vc-wb-bar { height: 8px; background: var(--bg3); border-radius: 99px; overflow: hidden; margin-bottom: 6px; }
.vc-wb-fill { height: 100%; background: #22c55e; border-radius: 99px; }
.vc-wb-note { font-size: 12px; color: var(--text3); }
.vc-cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── SM-2 Review cards ───────────────────────────────────── */
.review-strength-row { display: flex; gap: 4px; justify-content: center; margin: 8px 0 4px; }
.str-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bg3); border: 1.5px solid var(--border2); }
.str-dot.filled { background: var(--accent); border-color: var(--accent); }
.review-rate-label { font-size: 12px; color: var(--text3); margin-bottom: 10px; }
.review-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.review-btn { display: flex; flex-direction: column; align-items: center; padding: 10px 14px; border-radius: 10px; font-size: 14px; font-weight: 700; border: none; cursor: pointer; transition: transform .1s, opacity .15s; min-width: 70px; }
.review-btn:hover { transform: translateY(-2px); }
.review-btn-sub { font-size: 10px; font-weight: 400; margin-top: 2px; opacity: .75; }
.review-btn-again { background: #ef4444; color: #fff; }
.review-btn-hard  { background: #f97316; color: #fff; }
.review-btn-good  { background: #3b82f6; color: #fff; }
.review-btn-easy  { background: #22c55e; color: #fff; }
.review-complete-sub { font-size: 14px; color: var(--text2); margin-bottom: 20px; }

/* ── Listening Comprehension ─────────────────────────────── */
.listen-wrap { max-width: 760px; margin: 0 auto; padding: 0 16px 60px; }
.listen-controls-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; margin-bottom: 20px; }
.listen-level-pick label, .listen-topic-row label { font-size: 12px; font-weight: 700; color: var(--text3); text-transform: uppercase; display: block; margin-bottom: 6px; }
.listen-level-btns { display: flex; gap: 6px; }
.listen-lvl-btn { padding: 7px 14px; border-radius: 8px; background: var(--bg2); border: 1.5px solid var(--border); color: var(--text2); font-size: 13px; font-weight: 700; cursor: pointer; transition: all .15s; }
.listen-lvl-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.listen-passage-area { margin-top: 24px; }
.listen-passage-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 18px; padding: 28px; }
.listen-level-badge { display: inline-block; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 10px; border-radius: 999px; margin-bottom: 14px; letter-spacing: .05em; }
.listen-passage-text { font-size: 18px; line-height: 1.8; color: var(--text1); margin-bottom: 18px; font-style: italic; }
.listen-audio-controls { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.listen-translation { font-size: 14px; color: var(--text3); background: var(--bg3); border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; line-height: 1.6; }
.listen-question-section { border-top: 1px solid var(--border); padding-top: 20px; margin-top: 8px; }
.listen-question { font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.listen-options { display: flex; flex-direction: column; gap: 8px; }
.listen-opt-btn { padding: 12px 16px; background: var(--bg3); border: 1.5px solid var(--border); border-radius: 10px; font-size: 14px; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; color: var(--text1); }
.listen-opt-btn:hover:not(:disabled) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg3)); }
.listen-opt-btn.correct-opt { border-color: #22c55e; background: color-mix(in srgb, #22c55e 15%, var(--bg3)); color: #22c55e; font-weight: 700; }
.listen-opt-btn.wrong-opt { border-color: #ef4444; background: color-mix(in srgb, #ef4444 12%, var(--bg3)); }
.listen-result { margin-top: 14px; font-size: 15px; }
.listen-correct { color: #22c55e; font-weight: 700; }
.listen-wrong { color: #ef4444; }

/* ── SRS due badge ───────────────────────────────────────── */
.srs-due-badge { display: inline-block; background: #ef4444; color: #fff; font-size: 10px; font-weight: 800; padding: 1px 7px; border-radius: 999px; margin-left: 4px; vertical-align: middle; animation: pulse-badge 2s infinite; }
@keyframes pulse-badge { 0%,100% { opacity: 1; } 50% { opacity: .65; } }

/* ── Custom Lesson Creator ───────────────────────────────── */
.cl-wrap { max-width: 760px; margin: 0 auto; padding: 0 16px 60px; }
.cl-header { text-align: center; padding: 40px 0 32px; }
.cl-title { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.cl-sub { color: var(--text3); font-size: 15px; }
.cl-form { background: var(--bg2); border: 1px solid var(--border); border-radius: 18px; padding: 28px; margin-bottom: 28px; }
.cl-row { display: flex; gap: 16px; flex-wrap: wrap; }
.cl-textarea { min-height: 160px; resize: vertical; font-family: inherit; }
.cl-submit { width: 100%; padding: 14px; font-size: 16px; margin-top: 8px; }
.cl-note { text-align: center; font-size: 12px; color: var(--text3); margin-top: 8px; }
.cl-status { border-radius: 12px; padding: 16px 20px; font-size: 15px; margin-bottom: 20px; }
.cl-loading { background: color-mix(in srgb, var(--accent) 10%, var(--bg2)); border: 1px solid var(--accent); color: var(--accent); }
.cl-success { background: color-mix(in srgb, #22c55e 10%, var(--bg2)); border: 1px solid #22c55e; color: #22c55e; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cl-error { background: color-mix(in srgb, #ef4444 10%, var(--bg2)); border: 1px solid #ef4444; color: #ef4444; }
.cl-section-title { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
.cl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cl-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.cl-card-title { font-weight: 700; font-size: 15px; }
.cl-card-meta { font-size: 12px; color: var(--text3); }
.cl-card-actions { display: flex; gap: 8px; margin-top: 4px; }

/* ── Why? Explanation Overlay ────────────────────────────── */
.why-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(4px); }
.why-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 20px; max-width: 480px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.why-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 12px; border-bottom: 1px solid var(--border); }
.why-title { font-weight: 700; font-size: 15px; color: var(--accent); }
.why-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--text3); padding: 4px 8px; border-radius: 6px; }
.why-close:hover { background: var(--bg3); }
.why-body { padding: 20px; font-size: 15px; line-height: 1.7; color: var(--text1); }
.why-btn-row { margin-top: 10px; }
.why-btn { font-size: 12px; color: var(--accent); border-color: var(--accent); opacity: .8; }
.why-btn:hover { opacity: 1; }

/* ── AI Lessons Page ─────────────────────────────────────── */
.ail-wrap { max-width: 680px; margin: 0 auto; padding: 0 16px 60px; }
.ail-header { text-align: center; padding: 40px 0 24px; }
.ail-flag { font-size: 36px; margin-bottom: 8px; }
.ail-title { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.ail-sub { color: var(--text3); font-size: 14px; max-width: 440px; margin: 0 auto; }
.ail-progress-bar-wrap { background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 18px 22px; margin-bottom: 24px; }
.ail-stage-label { font-weight: 700; font-size: 14px; margin-bottom: 10px; color: var(--accent); }
.ail-progress-outer { height: 8px; background: var(--bg3); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.ail-progress-inner { height: 100%; background: linear-gradient(90deg, #0d9488, #0e7490); border-radius: 999px; transition: width .6s ease; }
.ail-progress-label { font-size: 12px; color: var(--text3); }
.ail-generate-wrap { text-align: center; margin-bottom: 28px; }
.ail-gen-btn { padding: 14px 32px; font-size: 16px; }
.ail-gen-note { font-size: 12px; color: var(--text3); margin-top: 8px; }
.ail-lessons-list { display: flex; flex-direction: column; gap: 10px; }
.ail-empty { text-align: center; color: var(--text3); padding: 40px 0; }
.ai-lesson-card { display: flex; align-items: center; gap: 16px; background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; text-decoration: none; color: var(--text1); transition: border-color .15s, background .15s; }
.ai-lesson-card:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--bg2)); }
.ai-lesson-card.ai-lesson-done { opacity: .65; }
.ai-lesson-num { font-size: 12px; font-weight: 800; color: var(--text3); min-width: 28px; }
.ai-lesson-info { flex: 1; }
.ai-lesson-title { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.ai-lesson-meta { font-size: 12px; color: var(--text3); }
.ai-done-badge { font-size: 11px; font-weight: 700; color: #22c55e; background: color-mix(in srgb, #22c55e 12%, var(--bg2)); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }

/* ── AI Lessons Banner (language detail page) ────────────── */
.ai-lessons-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: linear-gradient(135deg, color-mix(in srgb, #0d9488 12%, var(--bg2)), color-mix(in srgb, #0e7490 8%, var(--bg2))); border: 1.5px solid var(--accent); border-radius: 16px; padding: 16px 20px; margin-bottom: 20px; }
.ai-banner-left { display: flex; align-items: center; gap: 14px; }
.ai-banner-icon { font-size: 24px; }
.ai-banner-title { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.ai-banner-sub { font-size: 12px; color: var(--text3); }

/* ── Speaking self-eval fallback (Safari) ───────────────── */
.self-eval-block { background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--radius); padding: 20px 22px; margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.self-eval-note { font-size: 18px; font-weight: 600; margin: 0; }
.self-eval-sub { font-size: 13px; color: var(--text2); margin: 0; }
.self-eval-btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Lesson feedback save button ────────────────────────── */
.feedback-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 4px; }
.feedback-save-btn { font-size: 13px; opacity: .8; }
.feedback-save-btn:hover { opacity: 1; }

/* ── Free plan — daily limit bar ────────────────────────── */
.free-daily-limit-bar { background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--radius); padding: 14px 18px; margin: 16px 0; display: flex; flex-direction: column; gap: 8px; }
.fdl-info { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.fdl-label { color: var(--text2); font-weight: 600; }
.fdl-count { color: var(--text); }
.fdl-track { height: 6px; background: var(--bg3); border-radius: 999px; overflow: hidden; }
.fdl-fill { height: 100%; background: linear-gradient(90deg, #22c55e, #f59e0b); border-radius: 999px; transition: width .4s; }
.fdl-upgrade { font-size: 12px; color: var(--accent); text-decoration: none; align-self: flex-end; }
.fdl-upgrade:hover { text-decoration: underline; }

/* ── Free plan — upsell section ──────────────────────────── */
.free-upsell-section { margin-top: 36px; }
.free-upsell-title { font-size: 13px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.free-upsell-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.free-upsell-card { display: flex; gap: 14px; align-items: flex-start; background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: inherit; transition: border-color .15s, background .15s; cursor: pointer; }
.free-upsell-card:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--bg2)); }
.fuc-icon { font-size: 26px; flex-shrink: 0; margin-top: 2px; }
.fuc-body { display: flex; flex-direction: column; gap: 4px; }
.fuc-title { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.fuc-lock { font-size: 13px; opacity: .6; }
.fuc-desc { font-size: 13px; color: var(--text2); line-height: 1.4; }
.fuc-cta { font-size: 12px; color: var(--accent); font-weight: 600; margin-top: 4px; }

/* ── Conjugation Master ──────────────────────────────────── */
.conj-wrap { max-width: 860px; margin: 0 auto; padding: 0 16px 48px; }
.conj-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 28px; padding: 18px 20px; background: var(--bg2); border-radius: var(--radius); border: 1px solid var(--border2); }
.conj-controls select { flex: 1; min-width: 180px; background: var(--bg3); border: 1px solid var(--border2); color: var(--text); padding: 9px 12px; border-radius: 8px; font-size: 14px; }
.conj-content { min-height: 120px; }
.conj-lesson { display: flex; flex-direction: column; gap: 24px; }
.conj-overview { background: var(--bg2); border-radius: var(--radius); padding: 20px 24px; border-left: 4px solid var(--accent); }
.conj-overview h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.conj-overview p { color: var(--text2); line-height: 1.6; }
.conj-tense-block { background: var(--bg2); border-radius: var(--radius); padding: 20px 24px; border: 1px solid var(--border2); }
.conj-tense-block h3 { font-size: 17px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.conj-usage { font-size: 13px; color: var(--text2); margin-bottom: 14px; }
.conj-table { overflow-x: auto; margin-bottom: 12px; }
.conj-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.conj-table th { background: var(--bg3); color: var(--text2); font-weight: 600; padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--border2); }
.conj-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); }
.conj-table tr:last-child td { border-bottom: none; }
.conj-form { font-weight: 700; color: var(--text); }
.conj-example { color: var(--text2); font-style: italic; }
.conj-notes { font-size: 13px; color: var(--text2); background: color-mix(in srgb, var(--gold) 8%, var(--bg2)); border-radius: 8px; padding: 10px 14px; }
.conj-practice { background: var(--bg2); border-radius: var(--radius); padding: 20px 24px; border: 1px solid var(--border2); }
.conj-practice h3 { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.conj-q { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.conj-q:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.conj-q p { font-weight: 600; margin-bottom: 6px; }
.conj-q details summary { font-size: 13px; color: var(--accent); cursor: pointer; user-select: none; }
.conj-answer { font-size: 14px; color: var(--green); margin-top: 6px; }

/* ── Slang Unit ──────────────────────────────────────────── */
.slang-wrap { max-width: 860px; margin: 0 auto; padding: 0 16px 48px; }
.slang-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 28px; padding: 18px 20px; background: var(--bg2); border-radius: var(--radius); border: 1px solid var(--border2); }
.slang-controls select { flex: 1; min-width: 180px; background: var(--bg3); border: 1px solid var(--border2); color: var(--text); padding: 9px 12px; border-radius: 8px; font-size: 14px; }
.slang-content { min-height: 120px; }
.slang-lesson h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.slang-intro { color: var(--text2); line-height: 1.6; margin-bottom: 24px; }
.slang-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 24px; }
.slang-card { background: var(--bg2); border-radius: var(--radius); padding: 18px 20px; border: 1px solid var(--border2); display: flex; flex-direction: column; gap: 8px; }
.slang-term { font-size: 20px; font-weight: 800; color: var(--text); }
.slang-meaning { font-size: 14px; color: var(--accent); font-weight: 600; }
.slang-example { font-size: 13px; color: var(--text2); font-style: italic; }
.slang-ex-label { font-style: normal; font-weight: 600; color: var(--text3); }
.slang-translation { font-size: 12px; color: var(--text3); }
.slang-warning { font-size: 12px; color: var(--gold); background: color-mix(in srgb, var(--gold) 8%, var(--bg2)); border-radius: 6px; padding: 6px 10px; }
.slang-tips { background: var(--bg2); border-radius: var(--radius); padding: 18px 22px; border-left: 4px solid var(--green); }
.slang-tips h3 { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.slang-tips ul { padding-left: 18px; }
.slang-tips li { color: var(--text2); font-size: 14px; line-height: 1.6; margin-bottom: 4px; }
