*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f5f0e8;
  --bg-card: #ffffff;
  --bg-elevated: #ebe4d8;
  --bg-soft: #faf7f2;
  --text: #1c2a3a;
  --text-dim: #5c6b7e;
  --text-muted: #8e9bab;
  --accent: #1a5f9e;
  --accent-light: #e8f2fa;
  --accent-warm: #c45c2c;
  --accent-warm-light: #fdf0ea;
  --french-blue: #0055a4;
  --french-red: #ce1126;
  --gold: #c9920a;
  --gold-light: #fef7e6;
  --success: #1a7a4c;
  --success-bg: #e6f5ed;
  --error: #c0392b;
  --error-bg: #fdecea;
  --lavender: #6b5b95;
  --lavender-light: #f0edf5;
  --border: rgba(28, 42, 58, 0.1);
  --shadow: 0 4px 24px rgba(28, 42, 58, 0.08);
  --shadow-lg: 0 12px 40px rgba(28, 42, 58, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --font: 'DM Sans', system-ui, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;

  --role-subject: #1a5f9e;
  --role-verb: #c45c2c;
  --role-article: #6b5b95;
  --role-other: #5c6b7e;
  --role-question: #c9920a;
  --role-negation: #c0392b;
  --role-prep: #1a7a4c;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  min-height: 100%;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 10% 0%, rgba(26, 95, 158, 0.07), transparent),
    radial-gradient(ellipse 50% 40% at 90% 100%, rgba(196, 92, 44, 0.06), transparent),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(201, 146, 10, 0.04), transparent);
  pointer-events: none;
  z-index: 0;
}

/* Floating decorative shapes */
body::after {
  content: '';
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(26, 95, 158, 0.04), rgba(206, 17, 38, 0.03));
  top: -100px;
  right: -80px;
  animation: floatShape 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes floatShape {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-30px, 20px) rotate(10deg); }
}

.screen {
  display: none;
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(1rem, env(safe-area-inset-top)) 1.25rem max(2.5rem, env(safe-area-inset-bottom));
  max-width: 720px;
  margin: 0 auto;
}

.screen.active {
  display: block;
  animation: screenIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.logo-flag {
  display: flex;
  width: 30px;
  height: 21px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.logo-flag span { flex: 1; }
.logo-flag span:nth-child(1) { background: var(--french-blue); }
.logo-flag span:nth-child(2) { background: #fff; }
.logo-flag span:nth-child(3) { background: var(--french-red); }

.logo h1 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.logo h1 em {
  font-style: italic;
  color: var(--accent-warm);
}

.header-actions { display: flex; gap: 0.5rem; }

.icon-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.icon-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: rgba(26, 95, 158, 0.2);
  transform: translateY(-1px);
}

/* TEF / TCF Exam UI */
.exam-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--french-blue);
  animation: screenIn 0.5s ease;
}

.exam-hero.ready { border-top-color: var(--success); }

.exam-hero.compact { margin-bottom: 1.5rem; padding: 1rem 1.25rem; }

.exam-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.exam-type-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.exam-target {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-dim);
}

.exam-target strong { color: var(--text); font-size: 1.25rem; }
.exam-target-pts { font-size: 0.85rem; color: var(--text-muted); }

.exam-score-box { text-align: right; }

.exam-score-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.exam-score {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.exam-score-band { font-size: 0.78rem; color: var(--text-dim); }

.exam-readiness { margin-bottom: 1rem; }

.exam-readiness-bar {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.exam-readiness-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--french-blue), var(--success));
  border-radius: 999px;
  transition: width 0.8s ease;
}

.exam-readiness-text { font-size: 0.82rem; color: var(--text-dim); line-height: 1.45; }

.exam-mock-btn { width: 100%; }

.exam-sections-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.exam-section-card {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  color: var(--text);
  box-shadow: var(--shadow);
  transition: all 0.25s;
  animation: cardStagger 0.5s ease backwards;
  border-top: 3px solid var(--sec-color, var(--accent));
}

.exam-section-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.esc-icon { font-size: 1.75rem; flex-shrink: 0; }

.esc-body { flex: 1; min-width: 0; }

.esc-body strong {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.1rem;
}

.esc-en {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.esc-bar {
  height: 5px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.2rem;
}

.esc-fill {
  height: 100%;
  background: var(--sec-color, var(--accent));
  border-radius: 999px;
  transition: width 0.6s ease;
}

.esc-body small { font-size: 0.65rem; color: var(--text-muted); }

.study-path-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1.15rem 1.25rem;
  background: linear-gradient(135deg, var(--accent-light), var(--bg-card));
  border: 1px solid rgba(26, 95, 158, 0.2);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  color: var(--text);
  transition: all 0.25s;
  box-shadow: var(--shadow);
}

.study-path-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.spc-week {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
}

.spc-title { display: block; font-size: 1.05rem; margin: 0.2rem 0; }
.spc-sub { font-size: 0.8rem; color: var(--text-dim); }

.spc-right { text-align: center; }

.spc-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid var(--accent-light);
  border-top-color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 auto 0.35rem;
  animation: ringSpin 3s linear infinite;
}

@keyframes ringSpin {
  to { transform: rotate(360deg); }
}

.spc-cta { font-size: 0.78rem; color: var(--accent); font-weight: 600; }

.study-module-card {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
  animation: stepReveal 0.4s ease backwards;
}

.study-module-card.done { border-color: rgba(26, 122, 76, 0.3); background: var(--success-bg); }
.study-module-card.locked { opacity: 0.5; }

.smc-week {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
}

.smc-icon { font-size: 1.75rem; }

.smc-body strong { display: block; font-size: 0.95rem; }
.smc-level { font-size: 0.72rem; color: var(--accent); font-weight: 600; }
.smc-body p { font-size: 0.8rem; color: var(--text-dim); margin: 0.3rem 0; }

.smc-goals {
  list-style: none;
  margin: 0.4rem 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.smc-goals li::before { content: '→ '; color: var(--accent-warm); }

.smc-progress {
  height: 5px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
  margin: 0.4rem 0 0.2rem;
}

.smc-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

.smc-body small { font-size: 0.68rem; color: var(--text-muted); }

.section-prep-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.35rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.sph-icon { font-size: 2rem; display: block; margin-bottom: 0.5rem; }
.section-prep-hero h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.section-prep-hero p { font-size: 0.88rem; color: var(--text-dim); line-height: 1.5; }
.sph-tip { margin-top: 0.75rem; padding: 0.6rem; background: var(--gold-light); border-radius: 8px; font-size: 0.82rem !important; }
.sph-score { margin-top: 0.75rem; font-size: 0.9rem; }
.sph-score strong { color: var(--accent); font-size: 1.1rem; }

.section-modes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.section-stat-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.ssr-icon { font-size: 1.4rem; }
.ssr-body { flex: 1; }
.ssr-body strong { display: block; font-size: 0.82rem; margin-bottom: 0.3rem; }
.ssr-pct { font-weight: 700; color: var(--accent); font-size: 0.9rem; }

.reading-passage {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.1rem;
  margin-bottom: 0.5rem;
}

.passage-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.passage-text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
  white-space: pre-line;
}

.reading-q { font-size: 1.2rem !important; }

.cloze-template {
  font-size: 1.2rem;
  line-height: 1.8;
  padding: 1rem;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-family: var(--font-display);
}

.cloze-blank.active {
  color: var(--accent-warm);
  border-bottom: 3px solid var(--accent-warm);
  padding: 0 0.3rem;
  animation: blankPulse 1.5s ease infinite;
}

.cloze-filled {
  color: var(--success);
  font-weight: 600;
  background: var(--success-bg);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.cloze-en-hint {
  font-size: 0.88rem;
  color: var(--text-dim);
  font-style: italic;
  margin-bottom: 0.75rem;
}

.mock-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--french-red);
  background: rgba(206, 17, 38, 0.08);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  text-align: center;
}

/* French CEFR level card */
.french-level-card { margin-bottom: 1.25rem; }

.fl-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--level-color, var(--accent));
  animation: screenIn 0.5s ease;
}

.fl-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.fl-badge-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.fl-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--level-color, var(--accent)), rgba(255,255,255,0.3));
  background-color: color-mix(in srgb, var(--level-color, var(--accent)) 18%, white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  animation: coachBounce 3s ease infinite;
}

.fl-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.fl-level {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--level-color, var(--accent));
  line-height: 1.1;
}

.fl-title {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.fl-pips {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.level-pip {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.level-pip.certified {
  background: var(--success-bg);
  color: var(--success);
  border-color: rgba(26, 122, 76, 0.3);
}

.level-pip.active {
  background: var(--accent-light);
  color: var(--accent);
  border-color: rgba(26, 95, 158, 0.3);
  animation: pipPulse 2s ease infinite;
}

@keyframes pipPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.fl-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.level-next-section {
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 1rem;
  border: 1px solid var(--border);
}

.level-next-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.level-next-header strong { color: var(--accent); font-size: 1rem; }
.level-next-pct { font-weight: 700; color: var(--accent-warm); font-size: 1.1rem; }

.level-req-list { display: flex; flex-direction: column; gap: 0.55rem; }

.level-req-row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.5rem;
  border-radius: 8px;
  background: var(--bg-card);
  animation: stepReveal 0.5s ease backwards;
}

.level-req-row.done { background: var(--success-bg); }

.req-icon { font-size: 1.1rem; flex-shrink: 0; padding-top: 0.1rem; }

.req-body { flex: 1; min-width: 0; }

.req-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.req-status { color: var(--success); font-weight: 700; }
.level-req-row:not(.done) .req-status { color: var(--text-muted); }

.req-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.2rem;
}

.req-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
  border-radius: 999px;
  transition: width 0.6s ease;
}

.level-req-row.done .req-fill { background: var(--success); }

.req-body small { font-size: 0.7rem; color: var(--text-muted); }

.level-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  line-height: 1.45;
}

.level-max-msg {
  text-align: center;
  font-weight: 600;
  color: var(--gold);
  padding: 0.75rem;
  background: var(--gold-light);
  border-radius: var(--radius-sm);
}

/* Level requirements on stats page */
.level-req-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
  animation: stepReveal 0.4s ease backwards;
}

.level-req-card.certified {
  border-color: rgba(26, 122, 76, 0.35);
  background: var(--success-bg);
}

.level-req-card.locked { opacity: 0.55; }

.lrc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.lrc-badge {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
}

.lrc-status { font-size: 0.78rem; font-weight: 600; color: var(--text-dim); }
.level-req-card.certified .lrc-status { color: var(--success); }

.lrc-desc { font-size: 0.8rem; color: var(--text-dim); line-height: 1.45; margin-bottom: 0.65rem; }

.lrc-lock-msg { font-size: 0.78rem; color: var(--text-muted); font-style: italic; }

.lrc-reqs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.lrc-reqs span {
  font-size: 0.72rem;
  padding: 0.35rem 0.5rem;
  background: var(--bg-soft);
  border-radius: 6px;
  color: var(--text-dim);
}

.lrc-reqs span.done {
  background: rgba(26, 122, 76, 0.12);
  color: var(--success);
  font-weight: 600;
}

/* Level up modal */
.level-up-card { border-top: 4px solid var(--gold); }

.level-up-icon {
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
  animation: coachBounce 1s ease infinite;
}

.level-up-bonus {
  color: var(--gold);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.level-up-overlay .onboarding-card h2 {
  color: var(--accent);
}

/* Player card */
.player-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.player-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--french-blue), #fff 50%, var(--french-red));
}

.player-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.player-info h2 {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}

.level-badge {
  font-size: 2.2rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--accent);
}

.streak-pill {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--gold-light);
  border: 1px solid rgba(201, 146, 10, 0.25);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
  animation: streakPulse 2s ease-in-out infinite;
}

@keyframes streakPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 146, 10, 0); }
  50% { box-shadow: 0 0 0 6px rgba(201, 146, 10, 0.12); }
}

.xp-bar-wrap { margin-bottom: 0.85rem; }

.xp-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.xp-bar {
  height: 10px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
}

.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #3d8fd4);
  border-radius: 999px;
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  width: 0%;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.quick-stat {
  text-align: center;
  padding: 0.6rem;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.quick-stat strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.quick-stat span {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Daily */
.daily-challenge {
  background: linear-gradient(135deg, var(--accent-light), var(--lavender-light));
  border: 1px solid rgba(26, 95, 158, 0.15);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  animation: dailyGlow 3s ease-in-out infinite;
}

@keyframes dailyGlow {
  0%, 100% { box-shadow: var(--shadow); }
  50% { box-shadow: 0 4px 24px rgba(26, 95, 158, 0.15); }
}

.daily-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.daily-icon {
  font-size: 1.85rem;
  animation: bounce 2s ease infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.daily-inner strong { display: block; font-size: 0.95rem; color: var(--accent); }
.daily-inner p { font-size: 0.82rem; color: var(--text-dim); }
.daily-done { margin-left: auto; font-size: 1.5rem; color: var(--success); }

/* Section title */
.section-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

/* Mode grid */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.mode-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: cardStagger 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.mode-card:nth-child(1) { animation-delay: 0.05s; }
.mode-card:nth-child(2) { animation-delay: 0.1s; }
.mode-card:nth-child(3) { animation-delay: 0.15s; }
.mode-card:nth-child(4) { animation-delay: 0.2s; }
.mode-card:nth-child(5) { animation-delay: 0.25s; }
.mode-card:nth-child(6) { animation-delay: 0.3s; }
.mode-card:nth-child(7) { animation-delay: 0.35s; }

@keyframes cardStagger {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.mode-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--mode-color, var(--accent));
}

.mode-card:hover {
  transform: translateY(-4px);
  border-color: rgba(26, 95, 158, 0.2);
  box-shadow: var(--shadow-lg);
}

.mode-icon { font-size: 1.6rem; display: block; margin-bottom: 0.5rem; }
.mode-name { display: block; font-weight: 600; font-size: 0.95rem; color: var(--text); margin-bottom: 0.2rem; }
.mode-desc { display: block; font-size: 0.72rem; color: var(--text-dim); line-height: 1.45; }

/* Achievements */
.achievements-row {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}
.achievements-row::-webkit-scrollbar { display: none; }

.ach-badge {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.65rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 74px;
  opacity: 0.45;
  filter: grayscale(0.8);
  box-shadow: var(--shadow);
}

.ach-badge.earned {
  opacity: 1;
  filter: none;
  border-color: rgba(201, 146, 10, 0.35);
  background: var(--gold-light);
}

.ach-badge span { font-size: 1.3rem; }
.ach-badge small { font-size: 0.6rem; color: var(--text-dim); text-align: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  background: linear-gradient(135deg, var(--accent), #2a7bc4);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 4px 14px rgba(26, 95, 158, 0.25);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 95, 158, 0.35);
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.82rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  margin-left: auto;
}

.btn-ghost {
  padding: 0.65rem 1.2rem;
  background: var(--bg-card);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ghost:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: rgba(26, 95, 158, 0.2);
}

/* Game header */
.game-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.game-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.game-title-wrap h2 { font-size: 1.1rem; font-weight: 600; color: var(--text); }
.game-icon { font-size: 1.3rem; }

.timer-display {
  display: none;
  margin-left: auto;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-warm);
  font-variant-numeric: tabular-nums;
  animation: timerPulse 1s ease infinite;
}

@keyframes timerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.timer-display.visible { display: block; }

.help-btn {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold-light);
  border: 1px solid rgba(201, 146, 10, 0.3);
  color: var(--gold);
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}

.help-btn:hover {
  background: var(--gold);
  color: #fff;
  transform: scale(1.08);
}

.progress-wrap { margin-bottom: 1rem; }

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.progress-bar {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-warm), var(--gold));
  border-radius: 999px;
  transition: width 0.5s ease;
  width: 0%;
}

/* Coach panel */
.coach-panel {
  display: flex;
  gap: 0.85rem;
  background: linear-gradient(135deg, var(--gold-light), #fff);
  border: 1px solid rgba(201, 146, 10, 0.25);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
  animation: coachSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow);
}

.coach-panel.collapsed { display: none; }

@keyframes coachSlide {
  from { opacity: 0; transform: translateY(-12px); max-height: 0; }
  to { opacity: 1; transform: translateY(0); max-height: 400px; }
}

.coach-avatar {
  font-size: 2rem;
  flex-shrink: 0;
  animation: coachBounce 2s ease infinite;
}

@keyframes coachBounce {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

.coach-content { flex: 1; min-width: 0; }

.coach-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.coach-header strong { font-size: 0.88rem; color: var(--accent-warm); }

.coach-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0 0.25rem;
}

.coach-steps {
  list-style: none;
  margin-bottom: 0.65rem;
}

.coach-step {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
  opacity: 0;
  animation: stepReveal 0.5s ease forwards;
  line-height: 1.4;
}

@keyframes stepReveal {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.step-icon { flex-shrink: 0; }

.coach-tip {
  font-size: 0.78rem;
  color: var(--text);
  background: rgba(255,255,255,0.7);
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border-left: 3px solid var(--gold);
  line-height: 1.45;
}

.tip-pulse {
  display: inline-block;
  animation: tipPulse 1.5s ease infinite;
}

@keyframes tipPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Question card */
.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  animation: questionIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes questionIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.question-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.question-prompt {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text);
}

.listen-prompt { color: var(--accent); }

.listen-monologue-card { overflow: hidden; }

.listen-monologue-card.listen-theater-active .listen-mono-panel {
  border-color: rgba(107, 91, 149, 0.55);
  box-shadow: 0 0 28px rgba(107, 91, 149, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.listen-monologue-card.listen-theater-active .listen-live-badge {
  animation: listen-badge-pulse 1.2s ease infinite;
}

@keyframes listen-badge-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.03); }
}

.listen-mono-panel {
  margin: 0.75rem 0 0;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(107, 91, 149, 0.1), rgba(26, 95, 158, 0.05));
  border: 1px solid rgba(107, 91, 149, 0.25);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.listen-mono-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.listen-mono-speaker {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b5b95;
}

.listen-mono-fr {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 0.85rem;
  padding: 0.75rem;
  background: var(--surface);
  border-radius: var(--radius);
  border-left: 3px solid #6b5b95;
}

.mono-phrase,
.pron-phrase-chip {
  display: inline;
  padding: 0.12rem 0.28rem;
  margin: 0 0.05rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.mono-phrase--key { border-bottom: 1px dashed rgba(107, 91, 149, 0.35); }
.mono-phrase--bridge { opacity: 0.92; }
.mono-phrase--tail { opacity: 0.95; }

.mono-phrase:hover,
.pron-phrase-chip:hover,
.pron-word-row:hover {
  background: rgba(107, 91, 149, 0.1);
}

.mono-phrase.seg-active {
  background: linear-gradient(135deg, rgba(107, 91, 149, 0.42), rgba(26, 95, 158, 0.3));
  color: #0d4a7a;
  font-weight: 700;
  box-shadow: 0 0 0 2px rgba(107, 91, 149, 0.5), 0 4px 16px rgba(107, 91, 149, 0.25);
  transform: scale(1.03);
  animation: phrase-glow 0.9s ease infinite;
}

@keyframes phrase-glow {
  0%, 100% { box-shadow: 0 0 0 2px rgba(107, 91, 149, 0.5), 0 4px 16px rgba(107, 91, 149, 0.2); }
  50% { box-shadow: 0 0 0 3px rgba(26, 95, 158, 0.55), 0 6px 22px rgba(26, 95, 158, 0.28); }
}

.mono-phrase.seg-done {
  background: rgba(26, 122, 76, 0.12);
  color: var(--text-dim);
  opacity: 0.78;
}

.pron-phrase-chip {
  font-size: 0.86rem;
  line-height: 1.55;
  border: 1px solid transparent;
}

.pron-phrase-chip--key {
  font-weight: 600;
  border-color: rgba(107, 91, 149, 0.2);
}

.pron-phrase-chip.seg-active {
  background: rgba(26, 95, 158, 0.2);
  border-color: #1a5f9e;
  box-shadow: 0 0 0 2px rgba(26, 95, 158, 0.35);
  animation: phrase-glow 0.9s ease infinite;
}

.pron-phrase-chip.seg-active .pron-stress {
  color: #c45c2c;
}

.pron-phrase-chip.seg-done {
  opacity: 0.55;
  background: rgba(26, 122, 76, 0.08);
}

.pron-word-row {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
}

.pron-word-row.seg-active {
  background: linear-gradient(135deg, rgba(107, 91, 149, 0.28), rgba(26, 95, 158, 0.18)) !important;
  border: 2px solid #6b5b95;
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(107, 91, 149, 0.28);
  animation: phrase-glow 0.9s ease infinite;
}

.pron-word-row.seg-done {
  opacity: 0.65;
  border-color: rgba(26, 122, 76, 0.35);
}

.pron-word-row.seg-active .pron-ipa {
  color: #1a5f9e;
  font-size: 0.95rem;
  font-weight: 700;
}

.listen-karaoke-fr {
  line-height: 1.85;
}

.listen-theater {
  margin-bottom: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(107, 91, 149, 0.2);
}

.listen-theater-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.listen-live-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #6b5b95;
  background: linear-gradient(135deg, rgba(107, 91, 149, 0.15), rgba(196, 92, 44, 0.1));
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.listen-phrase-count {
  font-size: 0.65rem;
  color: var(--text-dim);
}

.listen-progress-track {
  height: 5px;
  background: rgba(107, 91, 149, 0.15);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.listen-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6b5b95, #1a5f9e, #c45c2c);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.listen-progress-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.45rem;
}

.listen-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(107, 91, 149, 0.25);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.listen-dot--key { background: rgba(107, 91, 149, 0.45); }
.listen-dot:hover { transform: scale(1.35); }
.listen-dot.active {
  background: #1a5f9e;
  box-shadow: 0 0 0 3px rgba(26, 95, 158, 0.3);
  transform: scale(1.4);
}
.listen-dot.done { background: #1a7a4c; opacity: 0.85; }

.listen-now-playing {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-dim);
  min-height: 1.2rem;
}

.listen-now-playing em { color: #6b5b95; font-style: normal; font-weight: 700; }
.np-phon { color: #1a5f9e; font-weight: 600; }
.np-hint {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.7rem;
  color: #c45c2c;
}

.pron-karaoke-strip { margin-bottom: 0.75rem; }

.pron-phrase-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  line-height: 1.7;
}

.listen-mono-en {
  padding: 0.65rem 0.75rem;
  background: rgba(26, 95, 158, 0.06);
  border-radius: var(--radius);
  margin-bottom: 0.85rem;
}

.listen-en-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
}

.listen-mono-en p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.55;
}

.listen-audio-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin: 0.5rem 0;
}

.listen-play-btn {
  min-width: 10rem;
  background: linear-gradient(135deg, #6b5b95, #1a5f9e) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 600;
}

.listen-play-btn.playing {
  opacity: 0.85;
  animation: listen-pulse 1s ease infinite;
}

@keyframes listen-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.listen-speed-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.speed-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-dim);
  padding: 0 0.35rem 0 0.5rem;
}

.speed-btn {
  border: none;
  background: transparent;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-dim);
  transition: background 0.15s, color 0.15s;
}

.speed-btn.active {
  background: #6b5b95;
  color: #fff;
}

.speed-btn:hover:not(.active) {
  background: rgba(107, 91, 149, 0.12);
}

.listen-tip {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin: 0.5rem 0 0;
}

.pronunciation-panel {
  margin: 0.65rem 0 0.85rem;
  padding: 0.95rem 1rem;
  background: linear-gradient(135deg, rgba(107, 91, 149, 0.14), rgba(26, 95, 158, 0.1));
  border: 2px solid rgba(107, 91, 149, 0.45);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(107, 91, 149, 0.12);
}

.pronunciation-panel--compact {
  margin-top: 0.5rem;
}

.pron-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.65rem;
}

.pron-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #6b5b95;
}

.pron-sub {
  font-size: 0.68rem;
  color: var(--text-dim);
}

.pron-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}

.pron-full-line {
  margin-bottom: 0.75rem;
}

.pron-phonetic-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
}

.pron-stress {
  color: #1a5f9e;
  font-weight: 800;
}

.pron-word-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pron-word-row {
  display: grid;
  grid-template-columns: minmax(5rem, 1fr) minmax(6rem, 1.2fr) minmax(0, 1.5fr);
  gap: 0.35rem 0.5rem;
  align-items: baseline;
  padding: 0.35rem 0.5rem;
  background: var(--surface);
  border-radius: 8px;
  font-size: 0.8rem;
}

.pron-fr {
  font-weight: 700;
  color: var(--text);
}

.pron-ipa {
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #6b5b95;
  font-weight: 600;
}

.pron-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.35;
}

@media (max-width: 480px) {
  .pron-word-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

.link-btn {
  background: none;
  border: none;
  color: #6b5b95;
  font-weight: 600;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.audio-test-card { max-width: 420px; }
.audio-test-steps { margin: 1rem 0; display: flex; flex-direction: column; gap: 0.5rem; }
.audio-test-step {
  display: flex;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
}
.audio-test-step.ok { border-color: rgba(26, 122, 76, 0.35); background: rgba(26, 122, 76, 0.06); }
.audio-test-step.fail { border-color: rgba(206, 17, 38, 0.3); background: rgba(206, 17, 38, 0.05); }
.ats-icon { font-size: 1.1rem; font-weight: 700; flex-shrink: 0; }
.audio-test-step strong { display: block; font-size: 0.85rem; }
.audio-test-step p { margin: 0.2rem 0 0; font-size: 0.8rem; color: var(--text-dim); }
.audio-test-loading { font-size: 0.9rem; color: var(--text-dim); padding: 0.5rem; }
.audio-test-tips {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: left;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: var(--radius);
}
.audio-test-tips ul { margin: 0.35rem 0 0.65rem 1.1rem; padding: 0; }
.audio-test-tips li { margin-bottom: 0.25rem; }
.audio-test-pass { color: #1a7a4c; font-weight: 600; font-size: 0.9rem; margin: 0.5rem 0 0; }
.audio-test-fail { color: #c45c2c; font-weight: 600; font-size: 0.85rem; margin: 0.5rem 0 0; }
.setting-hint { font-size: 0.75rem; color: var(--text-dim); margin: 0.2rem 0 0; }
.setting-row-stack { flex-direction: column; align-items: stretch !important; gap: 0.5rem; }
.audio-test-inline { margin-top: 0.5rem; }
.en-prompt {
  font-family: var(--font);
  font-size: 1.15rem;
  color: var(--text-dim);
  font-style: italic;
}

.conj-prompt .blank {
  color: var(--accent-warm);
  border-bottom: 3px solid var(--accent-warm);
  padding: 0 0.3rem;
  animation: blankPulse 1.5s ease infinite;
}

@keyframes blankPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.verb-info { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 1rem; }

.hint {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
  padding: 0.6rem 0.85rem;
  background: var(--accent-light);
  border-radius: 10px;
  border-left: 3px solid var(--accent);
  animation: hintIn 0.4s ease;
}

@keyframes hintIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.memory-tip {
  background: var(--lavender-light);
  border-left-color: var(--lavender);
}

.cefr-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 6px;
  margin-bottom: 1rem;
}

.options-grid { display: grid; gap: 0.6rem; }

.option-btn {
  padding: 1rem 1.2rem;
  background: var(--bg-soft);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-light);
  transform: translateX(4px);
}

.option-btn:disabled { cursor: default; }

.option-btn.correct {
  background: var(--success-bg);
  border-color: var(--success);
  color: var(--success);
  animation: correctPop 0.4s ease;
}

.option-btn.wrong {
  background: var(--error-bg);
  border-color: var(--error);
  color: var(--error);
  animation: shake 0.4s ease;
}

@keyframes correctPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.question-actions { margin-top: 1rem; display: flex; gap: 0.5rem; }

/* Vocab bridge */
.vocab-bridge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.75rem;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
}

.bridge-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
}

.bridge-flag { font-size: 1.4rem; }

.bridge-connector {
  position: relative;
  width: 80px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bridge-line {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--french-blue), var(--accent-warm));
  border-radius: 2px;
}

.bridge-pulse {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--gold);
  border-radius: 50%;
  animation: bridgeTravel 2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(201, 146, 10, 0.5);
}

@keyframes bridgeTravel {
  0% { left: 0; transform: translateX(0); }
  50% { left: 50%; transform: translateX(-50%); }
  100% { left: 100%; transform: translateX(-100%); }
}

/* Sound waves */
.sound-waves {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 48px;
  margin-bottom: 1rem;
}

.wave-bar {
  display: block;
  width: 5px;
  height: 12px;
  background: var(--accent);
  border-radius: 3px;
  animation: waveAnim 0.8s ease-in-out infinite;
}

@keyframes waveAnim {
  0%, 100% { height: 12px; }
  50% { height: 36px; }
}

/* Sentence structure guide */
.structure-guide {
  background: var(--bg-soft);
  border: 1px dashed rgba(26, 95, 158, 0.25);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.structure-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.75rem;
  text-align: center;
}

.structure-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.structure-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  position: relative;
  animation: blockPop 0.5s ease backwards;
}

.structure-block:nth-child(1) { animation-delay: 0.1s; }
.structure-block:nth-child(2) { animation-delay: 0.3s; }
.structure-block:nth-child(3) { animation-delay: 0.5s; }

@keyframes blockPop {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.subject-block { background: rgba(26, 95, 158, 0.12); border: 2px solid var(--role-subject); }
.verb-block { background: rgba(196, 92, 44, 0.12); border: 2px solid var(--role-verb); }
.object-block { background: rgba(26, 122, 76, 0.12); border: 2px solid var(--role-prep); }

.block-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.subject-block .block-label { color: var(--role-subject); }
.verb-block .block-label { color: var(--role-verb); }
.object-block .block-label { color: var(--role-prep); }

.block-example {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

.flow-arrow {
  position: absolute;
  right: -18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-weight: 700;
  font-size: 1.1rem;
  animation: arrowPulse 1s ease infinite;
}

.object-block .flow-arrow { display: none; }

@keyframes arrowPulse {
  0%, 100% { opacity: 0.5; transform: translateY(-50%) translateX(0); }
  50% { opacity: 1; transform: translateY(-50%) translateX(4px); }
}

/* Conjugation mini table */
.conj-mini-table {
  background: var(--accent-warm-light);
  border: 1px solid rgba(196, 92, 44, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  margin-bottom: 1.25rem;
}

.conj-table-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-warm);
  margin-bottom: 0.5rem;
}

.conj-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.75rem;
  font-size: 0.82rem;
}

.conj-pronoun { color: var(--text-muted); font-weight: 500; }
.conj-form { color: var(--text); font-weight: 600; }

/* Typed input */
.typed-input-wrap {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.typed-input {
  flex: 1;
  padding: 0.9rem 1rem;
  background: var(--bg-soft);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.typed-input:focus { border-color: var(--accent); }

.or-divider {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 1rem 0;
}

/* Sentence builder */
.sentence-built {
  min-height: 60px;
  padding: 0.85rem;
  background: var(--bg-soft);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  transition: border-color 0.3s;
}

.sentence-built.has-words {
  border-style: solid;
  border-color: rgba(26, 95, 158, 0.25);
}

.sentence-built .placeholder {
  color: var(--text-muted);
  font-size: 0.85rem;
  animation: placeholderBlink 2s ease infinite;
}

@keyframes placeholderBlink {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.built-word, .word-chip {
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
  font-weight: 500;
}

.built-word { animation: chipPlace 0.3s cubic-bezier(0.16, 1, 0.3, 1); }

@keyframes chipPlace {
  from { opacity: 0; transform: scale(0.8) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.role-subject { background: rgba(26, 95, 158, 0.15); border-color: var(--role-subject); color: var(--role-subject); }
.role-verb { background: rgba(196, 92, 44, 0.15); border-color: var(--role-verb); color: var(--role-verb); }
.role-article { background: rgba(107, 91, 149, 0.15); border-color: var(--role-article); color: var(--role-article); }
.role-question { background: rgba(201, 146, 10, 0.15); border-color: var(--role-question); color: var(--role-question); }
.role-negation { background: rgba(192, 57, 43, 0.15); border-color: var(--role-negation); color: var(--role-negation); }
.role-prep { background: rgba(26, 122, 76, 0.15); border-color: var(--role-prep); color: var(--role-prep); }
.role-other { background: var(--bg-elevated); border-color: var(--border); color: var(--text-dim); }

.word-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.word-chip {
  background: var(--bg-card);
  border: 2px solid var(--border);
  color: var(--text);
}

.word-chip:hover:not(.used) {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.word-chip.used {
  opacity: 0.2;
  pointer-events: none;
  transform: scale(0.9);
}

.role-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
  font-size: 0.68rem;
}

.role-legend span {
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-weight: 600;
}

/* Flashcard */
.flashcard {
  perspective: 1000px;
  height: 300px;
  margin-bottom: 1rem;
  cursor: pointer;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
}

.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }

.flashcard-front, .flashcard-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.flashcard-front {
  border-top: 4px solid var(--french-blue);
}

.flashcard-back {
  transform: rotateY(180deg);
  border-top: 4px solid var(--success);
}

.flashcard-front h2, .flashcard-back h2 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  text-align: center;
  color: var(--text);
}

.tap-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 1rem;
  animation: tapHint 2s ease infinite;
}

@keyframes tapHint {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.cat-tag { margin-top: 0.75rem; font-size: 0.82rem; color: var(--text-dim); }

.mastery-bar {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.mastery-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  transition: all 0.3s;
}

.mastery-dot.filled {
  background: var(--success);
  border-color: var(--success);
  animation: dotFill 0.4s ease;
}

@keyframes dotFill {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.flash-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.btn-wrong, .btn-correct {
  flex: 1;
  padding: 0.9rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-wrong {
  background: var(--error-bg);
  color: var(--error);
  border: 2px solid rgba(192, 57, 43, 0.25);
}

.btn-correct {
  background: var(--success-bg);
  color: var(--success);
  border: 2px solid rgba(26, 122, 76, 0.25);
}

.btn-wrong:hover, .btn-correct:hover { transform: translateY(-2px); }

/* Dialogue */
.dialogue-list { display: flex; flex-direction: column; gap: 0.75rem; }

.dialogue-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font-family: var(--font);
  transition: all 0.25s;
  width: 100%;
  box-shadow: var(--shadow);
}

.dialogue-card:hover {
  border-color: rgba(26, 95, 158, 0.25);
  transform: translateX(6px);
  box-shadow: var(--shadow-lg);
}

.dialogue-card.completed { border-color: rgba(26, 122, 76, 0.3); background: var(--success-bg); }

.dialogue-icon { font-size: 1.85rem; }
.dialogue-card strong { display: block; margin-bottom: 0.25rem; }
.done-badge { font-size: 0.72rem; color: var(--success); margin-left: 0.5rem; font-weight: 600; }

.dialogue-line-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  animation: questionIn 0.4s ease;
}

.speaker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-warm);
  margin-bottom: 1rem;
  display: block;
  font-weight: 700;
}

.fr-line {
  font-family: var(--font-display);
  font-size: 1.65rem;
  margin-bottom: 0.85rem;
  line-height: 1.45;
  color: var(--text);
  animation: lineReveal 0.5s ease;
}

@keyframes lineReveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.en-line {
  font-size: 0.95rem;
  color: var(--text-dim);
  font-style: italic;
  margin-bottom: 1.5rem;
  animation: lineReveal 0.5s ease 0.15s backwards;
}

.dialogue-nav { display: flex; gap: 0.75rem; justify-content: center; }

/* Speech bubble for dialogue */
.speech-bubble {
  position: relative;
  display: inline-block;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border: 10px solid transparent;
  border-top-color: var(--bg-card);
}

/* Feedback */
.feedback {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: 1rem;
  right: 1rem;
  transform: translateY(120px);
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 200;
  pointer-events: none;
}

.feedback.show {
  opacity: 1;
  transform: translateY(0);
}

.feedback.correct { border-color: var(--success); background: var(--success-bg); }
.feedback.wrong { border-color: var(--error); background: var(--error-bg); }

.feedback strong { display: block; font-size: 1.05rem; margin-bottom: 0.3rem; }
.feedback.correct strong { color: var(--success); }
.feedback.wrong strong { color: var(--error); }
.feedback p { font-size: 0.88rem; color: var(--text-dim); line-height: 1.45; }

/* Confetti */
.confetti-piece {
  position: fixed;
  width: 8px;
  height: 8px;
  top: -10px;
  z-index: 300;
  animation: confettiFall 1.2s ease forwards;
  pointer-events: none;
}

@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* Results */
.results-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: questionIn 0.5s ease;
}

.results-score {
  font-family: var(--font-display);
  font-size: 4.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.results-score span {
  font-size: 1.5rem;
  color: var(--text-muted);
}

.results-pct { font-size: 1.15rem; color: var(--text-dim); margin: 0.5rem 0; }
.results-xp { color: var(--gold); font-weight: 700; margin-bottom: 1.5rem; font-size: 1.05rem; }
.results-actions { display: flex; gap: 0.75rem; justify-content: center; }

/* Onboarding overlay */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 42, 58, 0.6);
  backdrop-filter: blur(6px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeOverlay 0.4s ease;
}

@keyframes fadeOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

.onboarding-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: onboardingPop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes onboardingPop {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.onboarding-card h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.onboarding-card .subtitle {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.onboarding-steps {
  text-align: left;
  margin-bottom: 1.5rem;
}

.onboarding-step {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  opacity: 0;
  animation: stepReveal 0.5s ease forwards;
}

.onboarding-step:nth-child(1) { animation-delay: 0.2s; }
.onboarding-step:nth-child(2) { animation-delay: 0.4s; }
.onboarding-step:nth-child(3) { animation-delay: 0.6s; }
.onboarding-step:nth-child(4) { animation-delay: 0.8s; }

.onboarding-step .step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.onboarding-step p {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.45;
  padding-top: 0.35rem;
}

.onboarding-step strong { color: var(--text); display: block; margin-bottom: 0.15rem; }

/* Stats & Settings */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 520px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-card strong {
  display: block;
  font-size: 1.85rem;
  font-family: var(--font-display);
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.stat-card span {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cefr-breakdown {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.cefr-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.cefr-row:last-child { margin-bottom: 0; }
.cefr-label { font-weight: 700; font-size: 0.85rem; width: 28px; color: var(--accent); }

.cefr-bar {
  flex: 1;
  height: 10px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
}

.cefr-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
  border-radius: 999px;
  transition: width 0.8s ease;
}

.cefr-pct { font-size: 0.75rem; color: var(--text-muted); width: 48px; text-align: right; }

.ach-grid { display: grid; gap: 0.65rem; }

.ach-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  opacity: 0.5;
  filter: grayscale(0.6);
}

.ach-card.earned {
  opacity: 1;
  filter: none;
  border-color: rgba(201, 146, 10, 0.3);
  background: var(--gold-light);
}

.ach-icon { font-size: 1.6rem; }
.ach-card strong { display: block; font-size: 0.92rem; }
.ach-card p { font-size: 0.78rem; color: var(--text-dim); }
.ach-card small { font-size: 0.72rem; color: var(--gold); font-weight: 600; }

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
}

.setting-row:last-child { border-bottom: none; }
.setting-row label { font-size: 0.9rem; color: var(--text); }

.setting-row select {
  padding: 0.5rem 0.75rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
}

.toggle { position: relative; width: 46px; height: 26px; }
.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-elevated);
  border-radius: 999px;
  cursor: pointer;
  transition: 0.3s;
  border: 1px solid var(--border);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 2px;
  bottom: 2px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.toggle input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

.danger-zone { margin-top: 2rem; text-align: center; }

.btn-danger {
  padding: 0.65rem 1.2rem;
  background: transparent;
  color: var(--error);
  border: 1px solid rgba(192, 57, 43, 0.3);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  cursor: pointer;
}

.btn-danger:hover { background: var(--error-bg); }

.page-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--text);
}

.intro-text {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  line-height: 1.55;
}

#coachContainer { margin-bottom: 0.5rem; }

@media (min-width: 721px) {
  .mode-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ─── Continue, Streak & Ecosystem ─── */
.continue-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  text-align: left;
  background: linear-gradient(135deg, #fff 0%, var(--accent-light) 100%);
  border: 2px solid rgba(26, 95, 158, 0.15);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  font-family: var(--font);
  color: var(--text);
}

.continue-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(26, 95, 158, 0.28);
}

.continue-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(28, 42, 58, 0.08);
}

.continue-body { flex: 1; min-width: 0; }

.continue-meta {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.continue-title {
  display: block;
  font-size: 1rem;
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.continue-sub {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.45;
  margin: 0;
}

.continue-cta {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.streak-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: linear-gradient(135deg, #fff8ec, #fef3d8);
  border: 1px solid rgba(201, 146, 10, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.streak-flame { font-size: 1.5rem; line-height: 1; }

.streak-banner strong {
  display: block;
  font-size: 0.92rem;
  color: #8a5f00;
  margin-bottom: 0.15rem;
}

.streak-banner p {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.45;
}

.ecosystem-strip {
  margin-bottom: 1.25rem;
}

.ecosystem-header {
  margin-bottom: 0.65rem;
}

.ecosystem-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.ecosystem-header p {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.45;
}

.ecosystem-links {
  display: grid;
  gap: 0.55rem;
}

.ecosystem-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.ecosystem-link:hover {
  border-color: rgba(26, 95, 158, 0.25);
  box-shadow: 0 4px 16px rgba(28, 42, 58, 0.08);
  transform: translateY(-1px);
}

.eco-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
}

.eco-body { flex: 1; min-width: 0; }

.eco-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.1rem;
}

.eco-top strong { font-size: 0.88rem; }

.eco-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
}

.eco-desc {
  display: block;
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.eco-arrow {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.ecosystem-compact {
  margin-bottom: 1rem;
}

.ecosystem-compact .ecosystem-header { display: none; }

.ecosystem-compact .ecosystem-links {
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.ecosystem-compact .ecosystem-link {
  flex-direction: column;
  align-items: flex-start;
  padding: 0.65rem 0.75rem;
}

.ecosystem-compact .eco-arrow { display: none; }

.ecosystem-compact .eco-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#landingEcosystem {
  margin-bottom: 2rem;
}

#landingEcosystem .ecosystem-strip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow);
}

@media (max-width: 520px) {
  .continue-card {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .continue-cta {
    width: 100%;
    text-align: center;
    padding-top: 0.35rem;
    border-top: 1px solid var(--border);
  }

  .ecosystem-compact .ecosystem-links {
    grid-template-columns: 1fr;
  }
}

/* ─── Landing Page ─── */
.screen-landing {
  max-width: 960px;
  padding: 1rem 1.5rem 3rem;
}

.screen-landing.active { display: block; }

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  padding-top: 0.5rem;
}

.logo-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-outline:hover {
  background: var(--accent-light);
}

.btn-hero {
  background: linear-gradient(135deg, var(--french-blue), var(--accent));
  color: #fff;
  border: none;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(26, 95, 158, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(26, 95, 158, 0.35);
}

.landing-hero {
  text-align: center;
  margin-bottom: 3rem;
  animation: screenIn 0.6s ease;
}

.hero-badge {
  display: inline-block;
  background: var(--gold-light);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1rem;
}

.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 1.75rem;
  line-height: 1.65;
}

.hero-cta {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 520px;
  margin: 0 auto;
}

.hero-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.5rem;
  box-shadow: var(--shadow);
}

.hero-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--accent);
}

.hero-stat span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.feature-card:hover { transform: translateY(-3px); }

.feature-icon {
  font-size: 1.75rem;
  display: block;
  margin-bottom: 0.65rem;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.landing-practice {
  margin-bottom: 2.5rem;
}

.landing-practice h3,
.landing-curriculum-preview h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.landing-curriculum-preview {
  background: linear-gradient(135deg, var(--accent-light), var(--gold-light));
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
  margin-bottom: 2rem;
}

.landing-curriculum-preview p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.phase-pills {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.phase-pill {
  background: var(--bg-card);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: 2px solid transparent;
}

.ig-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.ig-link:hover { text-decoration: underline; }

.coach-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: linear-gradient(135deg, #fdf2f8, var(--accent-light));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.coach-card-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e1306c, #833ab4, #f77737);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(225, 48, 108, 0.3);
}

.coach-card-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.coach-card-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0.15rem 0 0.4rem;
}

.coach-card-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.instagram-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #e1306c, #833ab4, #f77737);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(225, 48, 108, 0.25);
}

.instagram-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(225, 48, 108, 0.35);
  color: #fff;
}

.instagram-btn-block {
  width: 100%;
  justify-content: center;
}

.instagram-settings-card {
  background: linear-gradient(135deg, rgba(225, 48, 108, 0.04), rgba(131, 58, 180, 0.04));
}

.free-coach-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  background: linear-gradient(135deg, var(--success-bg), var(--gold-light));
  border: 1px solid rgba(26, 122, 76, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  margin-bottom: 1rem;
  text-decoration: none;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  transition: transform 0.2s;
}

.free-coach-strip:hover {
  transform: translateY(-1px);
  color: var(--accent);
}

.strip-divider { color: var(--text-muted); }

.footer-ig {
  display: inline-block;
  color: #e1306c;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  margin-bottom: 1rem;
}

.footer-ig:hover { text-decoration: underline; }

.landing-footer {
  text-align: center;
  padding: 2rem 0 1rem;
  border-top: 1px solid var(--border);
}

.landing-footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* ─── Practice Areas / Skill Hubs ─── */
.screen-hub {
  max-width: 1080px;
}

.practice-areas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  gap: 0.75rem;
}

.practice-view-all {
  background: none;
  border: none;
  color: var(--accent);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.35rem 0;
  transition: color 0.2s;
}

.practice-view-all:hover { color: var(--accent-warm); text-decoration: underline; }

.practice-areas-wrap {
  margin-bottom: 1.5rem;
}

.practice-landing-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}

.practice-hub-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: linear-gradient(135deg, var(--accent-light), var(--bg-card) 55%, var(--gold-light));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.practice-hub-hero h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.practice-hub-hero p {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.5;
  max-width: 480px;
}

.practice-hub-stats {
  display: flex;
  gap: 0.65rem;
  flex-shrink: 0;
}

.ph-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  text-align: center;
  min-width: 72px;
  box-shadow: var(--shadow);
}

.ph-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent);
}

.ph-stat span {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hub-category {
  margin-bottom: 1.75rem;
}

.hub-cat-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.hub-cat-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.hub-cat-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.hub-cat-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.hub-featured-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.hub-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--font);
  color: var(--text);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow);
  animation: cardPop 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  overflow: hidden;
  position: relative;
}

.hub-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--hub-color, var(--accent));
}

.hub-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--hub-color, var(--accent)) 35%, var(--border));
}

.hub-card.featured {
  background: linear-gradient(145deg, var(--bg-card) 0%, color-mix(in srgb, var(--hub-color) 8%, var(--bg-card)) 100%);
}

.hub-card.featured .hub-icon-wrap {
  box-shadow: 0 6px 20px color-mix(in srgb, var(--hub-color) 35%, transparent);
}

.hub-card-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.2rem;
}

.hub-icon-wrap {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--hub-color, var(--accent)) 14%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--hub-color, var(--accent)) 22%, var(--border));
  transition: transform 0.25s;
}

.hub-card:hover .hub-icon-wrap { transform: scale(1.06); }

.hub-icon {
  font-size: 1.55rem;
  line-height: 1;
}

.hub-body {
  flex: 1;
  min-width: 0;
}

.hub-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.3rem;
}

.hub-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.hub-badge {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
}

.hub-badge-free {
  background: var(--success-bg);
  color: var(--success);
}

.hub-badge-start {
  background: #fdecea;
  color: #ce1126;
}

.hub-badge-premium {
  background: var(--gold-light);
  color: var(--gold);
}

.hub-desc {
  display: block;
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.45;
  margin-bottom: 0.45rem;
}

.hub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.hub-tag {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.hub-arrow {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--hub-color, var(--accent));
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.25s;
  opacity: 0.7;
}

.hub-card:hover .hub-arrow {
  opacity: 1;
  background: color-mix(in srgb, var(--hub-color, var(--accent)) 12%, var(--bg-card));
  transform: translateX(3px);
}

/* Desktop — Practice Areas */
@media (min-width: 900px) {
  .screen-hub { padding-left: 2rem; padding-right: 2rem; }

  .hub-featured-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.15rem;
  }

  .hub-featured-row .hub-card-inner { padding: 1.35rem 1.5rem; }
  .hub-featured-row .hub-icon-wrap { width: 58px; height: 58px; }
  .hub-featured-row .hub-name { font-size: 1.08rem; }

  .hub-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .hub-category .hub-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .practice-areas-home .hub-category:last-child {
    margin-bottom: 0;
  }

  .practice-areas-home .hub-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hub-card-inner { padding: 1.2rem 1.25rem; }
}

@media (min-width: 1100px) {
  .hub-featured-row .hub-desc { font-size: 0.86rem; }
}

/* ─── Curriculum ─── */
.curriculum-banner {
  width: 100%;
  background: linear-gradient(135deg, var(--french-blue), #2a7ab8);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  text-align: left;
  cursor: pointer;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 6px 24px rgba(0, 85, 164, 0.25);
  transition: transform 0.2s;
  font-family: var(--font);
}

.curriculum-banner:hover { transform: translateY(-2px); }

.cbanner-left strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.cbanner-left span {
  font-size: 0.82rem;
  opacity: 0.9;
}

.cbanner-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.curriculum-hero-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.curriculum-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.curriculum-filter-btn {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.curriculum-filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.curriculum-day-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 0.65rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  transition: all 0.2s;
  animation: cardPop 0.35s ease backwards;
}

.curriculum-day-card.done {
  border-color: var(--success);
  background: var(--success-bg);
}

.curriculum-day-card.current {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-light);
}

.curriculum-day-card.locked {
  opacity: 0.55;
}

.cday-num {
  min-width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.cday-body { flex: 1; }

.cday-body strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.cday-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.cday-topic {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.cday-start {
  align-self: center;
}

/* ─── Lectures ─── */
.lecture-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}

.lecture-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.lecture-card.expanded {
  border-color: var(--accent);
}

.lecture-top {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.lecture-icon {
  font-size: 2rem;
  line-height: 1;
}

.lecture-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.lecture-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.lecture-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.lecture-detail {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  animation: screenIn 0.3s ease;
}

.lecture-topics {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.lecture-topic-tag {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.lecture-takeaways {
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.lecture-takeaways li {
  padding: 0.3rem 0;
  padding-left: 1.2rem;
  position: relative;
}

.lecture-takeaways li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

.lecture-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.85rem;
  flex-wrap: wrap;
}

/* ─── Dictation ─── */
.dictation-card {
  text-align: center;
}

.dictation-play {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lavender), var(--accent));
  color: #fff;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  margin: 1rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(107, 91, 149, 0.35);
  transition: transform 0.2s;
}

.dictation-play:hover { transform: scale(1.08); }

.dictation-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  margin: 1rem 0;
  transition: border-color 0.2s;
}

.dictation-input:focus {
  outline: none;
  border-color: var(--accent);
}

.dictation-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

.placement-result {
  text-align: center;
  padding: 1.5rem;
}

.placement-level {
  font-family: var(--font-display);
  font-size: 3.5rem;
  color: var(--accent);
  margin: 0.5rem 0;
}

/* ─── Freemium / Pricing ─── */
.btn-premium {
  background: linear-gradient(135deg, #c9920a, #e8a317, #c45c2c);
  color: #fff;
  border: none;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(201, 146, 10, 0.35);
  transition: transform 0.2s;
}

.btn-premium:hover:not(:disabled) { transform: translateY(-2px); }
.btn-premium:disabled { opacity: 0.7; cursor: default; }

.premium-pill-btn {
  background: linear-gradient(135deg, var(--gold-light), #fff);
  border: 1px solid var(--gold);
}

.dashboard-strips {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.support-strip,
.premium-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  width: 100%;
  background: linear-gradient(135deg, #fff8e6, var(--gold-light));
  border: 1px solid rgba(201, 146, 10, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  color: var(--text);
  transition: transform 0.2s;
}

.support-strip:hover,
.premium-strip:hover { transform: translateY(-1px); color: var(--gold); }

.support-pill-btn,
.premium-pill-btn {
  background: linear-gradient(135deg, #fff8e6, var(--gold-light));
  border: 1px solid rgba(201, 146, 10, 0.35);
}

.btn-support {
  background: linear-gradient(135deg, #f5c842, #e8a317);
  color: #3d2e00;
  border: none;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(201, 146, 10, 0.3);
  transition: transform 0.2s;
}

.btn-support:hover { transform: translateY(-2px); }

.support-landing-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: linear-gradient(135deg, var(--gold-light), var(--bg-card));
  border: 1px solid rgba(201, 146, 10, 0.25);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--shadow);
}

.support-landing-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.support-landing-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.support-landing-card p {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.55;
  margin-bottom: 1rem;
}

.support-card { text-align: center; }
.support-heart { font-size: 2.75rem; display: block; margin-bottom: 0.5rem; }

.support-reason {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.55;
  margin: 0.75rem 0 1.25rem;
  padding: 0.85rem;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  text-align: left;
}

.support-never {
  font-size: 0.75rem !important;
  color: var(--text-muted) !important;
  margin-top: 0.35rem;
}

.pricing-section { margin: 2rem 0; }
.pricing-landing { margin-top: 2.5rem; }

.pricing-heading {
  font-family: var(--font-display);
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 0.4rem;
}

.pricing-sub {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  max-width: 520px;
  margin: 0 auto 1.5rem;
  line-height: 1.55;
}

.expense-grid {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.expense-card {
  display: flex;
  gap: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
}

.expense-icon { font-size: 1.4rem; flex-shrink: 0; }

.expense-card strong {
  display: block;
  font-size: 0.88rem;
}

.expense-cost {
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 700;
  margin-left: 0.35rem;
}

.expense-card p {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
  line-height: 1.45;
}

.pricing-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.plan-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: relative;
  box-shadow: var(--shadow);
}

.plan-premium {
  border-color: var(--gold);
  background: linear-gradient(180deg, #fffdf8, var(--bg-card));
}

.plan-premium.active-plan {
  border-color: var(--success);
  background: linear-gradient(180deg, var(--success-bg), var(--bg-card));
}

.plan-badge {
  position: absolute;
  top: -10px;
  right: 12px;
  background: var(--gold);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.plan-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.plan-price {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--text);
  margin: 0.35rem 0 0.75rem;
}

.plan-price span {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: var(--font);
}

.plan-features {
  list-style: none;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
  line-height: 1.55;
}

.plan-features li {
  padding: 0.2rem 0;
  padding-left: 1.1rem;
  position: relative;
}

.plan-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

.plan-btn { width: 100%; }

.pricing-footer-note {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.paywall-card { text-align: center; }
.paywall-icon { font-size: 2.5rem; display: block; margin-bottom: 0.5rem; }

.paywall-free-note {
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 1rem 0;
  text-align: left;
  line-height: 1.5;
}

.premium-locked { opacity: 0.85; }

.premium-locked .cday-num,
.premium-locked .smc-icon {
  background: linear-gradient(135deg, var(--gold-light), #fff);
}

/* ─── Mobile optimization ─── */
@media (max-width: 600px) {
  .screen { padding: max(0.85rem, env(safe-area-inset-top)) 1rem max(2rem, env(safe-area-inset-bottom)); }
  .screen-landing { padding: max(0.75rem, env(safe-area-inset-top)) 1rem 2.5rem; }

  .landing-nav {
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1.75rem;
  }

  .landing-nav .logo h1 { font-size: 1.15rem; }
  .landing-nav .btn-outline { flex: 1; min-width: 120px; text-align: center; }

  .hero-title { font-size: 1.85rem; }
  .hero-sub { font-size: 0.95rem; }
  .hero-cta { flex-direction: column; width: 100%; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 0.65rem; }

  .landing-features { grid-template-columns: 1fr; }
  .hub-grid { grid-template-columns: 1fr; }
  .hub-featured-row { grid-template-columns: 1fr; }

  .hub-card-inner {
    padding: 1rem;
    gap: 0.85rem;
  }

  .hub-icon-wrap { width: 46px; height: 46px; }
  .hub-arrow { width: 28px; height: 28px; font-size: 0.9rem; }

  .practice-hub-hero {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 1.15rem;
  }

  .practice-hub-hero p { max-width: none; }
  .practice-hub-stats { justify-content: center; }

  .hub-cat-header { gap: 0.65rem; }
  .pricing-cards { grid-template-columns: 1fr; }

  .coach-card {
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding: 1.25rem;
  }

  .instagram-btn { width: 100%; justify-content: center; }

  .app-header { margin-bottom: 1rem; gap: 0.5rem; }
  .logo h1 { font-size: 1.1rem; }
  .header-actions { gap: 0.35rem; flex-shrink: 0; }
  .page-title { font-size: 1.15rem; max-width: 55vw; text-align: center; line-height: 1.2; }

  .exam-hero { padding: 1rem; }
  .exam-hero-top { flex-direction: column; align-items: stretch; }
  .exam-score-box { text-align: center; padding-top: 0.5rem; border-top: 1px solid var(--border); }
  .exam-score { font-size: 2rem; }

  .exam-sections-grid { grid-template-columns: 1fr; }
  .exam-section-card { padding: 0.9rem; }

  .study-path-card {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    text-align: center;
  }

  .spc-right { display: flex; align-items: center; justify-content: center; gap: 0.75rem; }
  .spc-cta { margin: 0; }

  .curriculum-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    text-align: center;
  }

  .cbanner-ring { margin: 0 auto; }

  .study-module-card {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .smc-week {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 0.72rem;
  }

  .smc-start { width: 100%; margin-top: 0.35rem; }

  .curriculum-day-card {
    flex-wrap: wrap;
    padding: 0.85rem;
  }

  .cday-start {
    width: 100%;
    margin-top: 0.35rem;
    min-height: 44px;
  }

  .curriculum-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .curriculum-filters::-webkit-scrollbar { display: none; }
  .curriculum-filter-btn { flex-shrink: 0; }

  .game-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.5rem;
    align-items: center;
  }

  .game-header .back-btn { grid-row: 1; grid-column: 1; }
  .game-title-wrap { grid-row: 1; grid-column: 2; min-width: 0; }
  .game-title-wrap h2 {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .timer-display { grid-row: 1; grid-column: 3; margin-left: 0; }
  .game-header .help-btn { grid-row: 2; grid-column: 3; margin-left: 0; }

  .question-card { padding: 1rem; }
  .question-prompt { font-size: 1.35rem; word-break: break-word; }
  .reading-passage { padding: 0.85rem; }
  .passage-text { font-size: 0.88rem; line-height: 1.55; }

  .option-btn {
    min-height: 48px;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    touch-action: manipulation;
  }

  .word-chip, .built-word {
    min-height: 44px;
    touch-action: manipulation;
  }

  .typed-input, .dictation-input {
    font-size: 16px;
    min-height: 48px;
  }

  .dictation-play {
    width: 72px;
    height: 72px;
    font-size: 1.75rem;
  }

  .btn, .btn-hero, .btn-premium, .btn-outline, .btn-sm {
    min-height: 44px;
    touch-action: manipulation;
  }

  .daily-inner {
    flex-wrap: wrap;
    gap: 0.65rem;
  }

  .daily-inner .btn-sm { width: 100%; }

  .onboarding-overlay { padding: 1rem; align-items: flex-end; }
  .onboarding-card {
    max-height: 88dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: env(safe-area-inset-bottom);
  }

  .paywall-card { max-height: 85dvh; overflow-y: auto; }

  .results-card { padding: 1.75rem 1rem; }
  .results-score { font-size: 3rem; }
  .results-actions {
    flex-direction: column;
    width: 100%;
  }

  .results-actions .btn,
  .results-actions .btn-ghost { width: 100%; }

  .dialogue-line-card { padding: 1rem; }
  .fr-line { font-size: 1.35rem; }
  .dialogue-nav {
    flex-direction: column;
    gap: 0.5rem;
  }

  .dialogue-nav .btn,
  .dialogue-nav .btn-ghost { width: 100%; }

  .fl-card { padding: 1rem; }
  .fl-top { flex-direction: column; gap: 0.75rem; }
  .level-pips { flex-wrap: wrap; justify-content: center; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .setting-row { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .setting-row select { width: 100%; }

  .expense-card { padding: 0.75rem; }
  .mode-card:active, .hub-card:active, .exam-section-card:active {
    transform: scale(0.98);
  }

  .options-grid { gap: 0.55rem; }
  .word-bank { gap: 0.45rem; }

  .coach-panel { padding: 0.85rem; }
  .structure-flow { flex-direction: column; }
  .flow-arrow { display: none; }
}

@media (max-width: 380px) {
  .header-actions .icon-btn { width: 40px; height: 40px; font-size: 1rem; }
  .hero-title { font-size: 1.65rem; }
  .mode-grid { grid-template-columns: 1fr; }
}
/* ═══════════════════════════════════════════
   Maestro AI Coach
   ═══════════════════════════════════════════ */

.maestro-pill-btn {
  background: linear-gradient(135deg, #eef5fc, var(--accent-light));
  border: 1px solid rgba(26, 95, 158, 0.3);
  box-shadow: 0 0 0 0 rgba(26, 95, 158, 0.35);
  animation: maestroPulse 2.8s ease-in-out infinite;
}

@keyframes maestroPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26, 95, 158, 0.25); }
  50% { box-shadow: 0 0 0 6px rgba(26, 95, 158, 0); }
}

.feature-maestro {
  border-color: rgba(26, 95, 158, 0.35) !important;
  background: linear-gradient(160deg, #eef5fc 0%, var(--bg-card) 55%) !important;
}

.btn-maestro-cta {
  margin: 0.85rem 0 0;
  margin-left: 0;
  background: linear-gradient(135deg, var(--french-blue), var(--accent));
  color: #fff;
  border: none;
  display: inline-flex;
}

.maestro-home-banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  margin: 0.75rem 0 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(26, 95, 158, 0.22);
  border-radius: var(--radius);
  background: linear-gradient(120deg, #e8f2fa 0%, #fff 45%, #fdf0ea 100%);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  color: var(--text);
  transition: transform 0.2s, box-shadow 0.2s;
}

.maestro-home-banner:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.maestro-home-icon {
  font-size: 1.75rem;
  line-height: 1;
  flex-shrink: 0;
}

.maestro-home-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.maestro-home-text strong {
  font-size: 0.98rem;
  color: var(--french-blue);
}

.maestro-home-text span {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.35;
}

.maestro-home-cta {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  flex-shrink: 0;
}

.screen-maestro.active {
  display: flex;
  flex-direction: column;
}

.maestro-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.75rem;
  min-height: 0;
  padding-bottom: env(safe-area-inset-bottom);
}

.maestro-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
  padding: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.maestro-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 88px;
}

.maestro-field-grow {
  flex: 1;
  min-width: 140px;
}

.maestro-field span,
.maestro-toggle span {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.maestro-field select {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  font-family: var(--font);
  font-size: 0.88rem;
  cursor: pointer;
}

.maestro-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-dim);
  padding-bottom: 0.35rem;
  cursor: pointer;
  user-select: none;
}

.maestro-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.maestro-messages {
  flex: 1;
  min-height: 280px;
  max-height: min(52vh, 520px);
  overflow-y: auto;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  scroll-behavior: smooth;
}

.maestro-empty {
  text-align: center;
  padding: 1.5rem 0.75rem 1rem;
  color: var(--text-dim);
}

.maestro-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.maestro-empty h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.maestro-empty p {
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 36ch;
  margin: 0 auto 0.5rem;
}

.maestro-empty-hint {
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
}

.maestro-msg {
  margin-bottom: 0.9rem;
  max-width: 92%;
  animation: maestroIn 0.28s ease;
}

@keyframes maestroIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.maestro-msg-user {
  margin-left: auto;
}

.maestro-msg-assistant {
  margin-right: auto;
}

.maestro-msg-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  padding: 0 0.15rem;
}

.maestro-msg-user .maestro-msg-label {
  text-align: right;
  color: var(--accent);
}

.maestro-msg-assistant .maestro-msg-label {
  color: var(--french-blue);
}

.maestro-msg-bubble {
  padding: 0.75rem 0.95rem;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.55;
  word-wrap: break-word;
}

.maestro-msg-user .maestro-msg-bubble {
  background: linear-gradient(135deg, var(--french-blue), var(--accent));
  color: #fff;
  border-bottom-right-radius: 4px;
}

.maestro-msg-assistant .maestro-msg-bubble {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.maestro-msg-assistant .maestro-msg-bubble code {
  background: rgba(26, 95, 158, 0.1);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.88em;
}

.maestro-typing .maestro-msg-bubble {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  min-width: 64px;
}

.maestro-typing .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
  animation: maestroDot 1.2s ease-in-out infinite;
}

.maestro-typing .dot:nth-child(2) { animation-delay: 0.15s; }
.maestro-typing .dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes maestroDot {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-4px); opacity: 1; }
}

.maestro-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.maestro-chip {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.maestro-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.maestro-status {
  min-height: 1.1em;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.maestro-status.is-error {
  color: var(--error);
}

.maestro-compose {
  display: flex;
  gap: 0.65rem;
  align-items: flex-end;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem;
  box-shadow: var(--shadow);
}

.maestro-compose textarea {
  flex: 1;
  resize: none;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font);
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text);
  min-height: 48px;
  max-height: 140px;
}

.maestro-compose textarea::placeholder {
  color: var(--text-muted);
}

.maestro-send {
  flex-shrink: 0;
  padding: 0.7rem 1.15rem;
  margin: 0;
}

.maestro-footnote {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
  line-height: 1.4;
}

@media (max-width: 560px) {
  .maestro-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .maestro-field,
  .maestro-field-grow {
    width: 100%;
  }
  .maestro-messages {
    max-height: min(48vh, 420px);
  }
  .maestro-compose {
    flex-direction: column;
    align-items: stretch;
  }
  .maestro-send {
    width: 100%;
  }
  .maestro-home-text span {
    display: none;
  }
  .maestro-chip {
    white-space: normal;
    text-align: left;
  }
}

/* ── Speaking monologues + tricky listen ── */
.speak-mono-card .speak-mono-prompt {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.08), var(--bg-soft));
  border: 1px solid rgba(13, 148, 136, 0.22);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 0.85rem;
}
.speak-mono-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0d9488;
  background: rgba(13, 148, 136, 0.12);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-right: 0.4rem;
}
.speak-mono-timer-hint {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 0.5rem 0 0.35rem;
}
.speak-mono-tips {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
  color: var(--text-dim);
  font-size: 0.86rem;
  line-height: 1.5;
}
.speak-mono-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}
.speak-mono-model {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  margin-bottom: 0.5rem;
}
.speak-mono-model.hidden { display: none; }
.listen-monologue-card.listen-tricky .listen-mono-panel {
  border-color: rgba(107, 70, 193, 0.35);
  box-shadow: 0 0 0 1px rgba(107, 70, 193, 0.08);
}
.listen-monologue-card.listen-tricky .listen-mono-speaker {
  color: #6b46c1;
}

/* ── Speaker delivery + richer pronunciation ── */
.speaker-delivery-panel {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.08), var(--bg-soft));
  border: 1px solid rgba(13, 148, 136, 0.22);
  border-radius: var(--radius-sm);
}
.speaker-delivery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 0.65rem 0;
}
.sd-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
}
.sd-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}
.sd-mouth {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin: 0.35rem 0;
  line-height: 1.45;
}
.sd-tips {
  margin: 0.4rem 0 0.5rem;
  padding-left: 1.1rem;
  font-size: 0.86rem;
  color: var(--text-dim);
  line-height: 1.45;
}
.sd-shadow-tip {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 0.35rem 0 0;
}
.sentence-phon-block { margin-top: 0.75rem; }
.sentence-phon-list { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.4rem; }
.sentence-phon-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.15rem 0.55rem;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  font-family: var(--font);
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.sentence-phon-row:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.sp-num {
  grid-row: span 2;
  align-self: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.sp-fr { font-size: 0.9rem; font-weight: 600; }
.sp-ph { grid-column: 2; font-size: 0.8rem; color: var(--text-dim); font-style: italic; }
.pron-word-btn {
  width: 100%;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  text-align: left;
}
.pron-word-btn:hover { border-color: var(--accent); background: var(--accent-light); border-radius: 10px; }

/* ── Psychology Learning ── */
.psy-hero {
  background: linear-gradient(135deg, #f3e8ff, var(--bg-card));
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.psy-hero h3 { font-family: var(--font-display); margin-bottom: 0.4rem; }
.psy-hero p { color: var(--text-dim); font-size: 0.92rem; line-height: 1.5; margin-bottom: 0.9rem; }
.psy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 560px) {
  .psy-grid { grid-template-columns: 1fr; }
  .speaker-delivery-grid { grid-template-columns: 1fr; }
}
.psy-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  animation: screenIn 0.4s ease both;
}
.psy-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.psy-icon, .psy-icon-lg { font-size: 1.5rem; }
.psy-icon-lg { font-size: 2rem; }
.psy-card h4 { font-size: 1rem; margin-bottom: 0.25rem; }
.psy-hindi { font-size: 0.8rem; color: #7c3aed; margin-bottom: 0.35rem; }
.psy-summary { font-size: 0.85rem; color: var(--text-dim); line-height: 1.45; margin-bottom: 0.65rem; }
.btn-psy-open { margin-left: 0; background: #7c3aed; color: #fff; border: none; }
.psy-lesson {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 0.75rem;
  box-shadow: var(--shadow);
}
.psy-lesson-head { display: flex; gap: 0.85rem; align-items: flex-start; margin-bottom: 0.75rem; }
.psy-fr-title { font-size: 0.85rem; color: var(--text-muted); font-style: italic; }
.psy-summary-lg { font-size: 1rem; line-height: 1.55; margin-bottom: 0.75rem; }
.psy-science {
  background: #f5f3ff;
  border-left: 3px solid #7c3aed;
  padding: 0.75rem 0.9rem;
  border-radius: 0 10px 10px 0;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  color: var(--text-dim);
}
.psy-steps { padding-left: 1.2rem; margin: 0.5rem 0 1rem; }
.psy-steps li { margin-bottom: 0.45rem; line-height: 1.45; color: var(--text-dim); font-size: 0.92rem; }
.psy-practice {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}
.psy-prompt { font-weight: 600; margin: 0.35rem 0; }
.psy-model { font-size: 0.9rem; color: var(--text-dim); margin: 0.35rem 0; }
.psy-tip { font-size: 0.85rem; color: #7c3aed; margin: 0.35rem 0 0.65rem; }
.psy-lesson-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.psy-question-card .psy-q-context {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: #f5f3ff;
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.85rem;
}
.psy-q-context p { font-size: 0.85rem; color: var(--text-dim); margin-top: 0.2rem; }

/* ── Freemium banner + paywall ── */
.freemium-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin: 0.5rem 0 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(201, 146, 10, 0.35);
  background: linear-gradient(120deg, #fff8e6, #fff, #fdf0ea);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  color: var(--text);
  transition: transform 0.15s;
}
.freemium-banner:hover { transform: translateY(-1px); }
.freemium-banner.is-premium {
  border-color: rgba(26, 95, 158, 0.3);
  background: linear-gradient(120deg, #e8f2fa, #fff);
}
.freemium-banner.hidden { display: none; }
.fb-icon { font-size: 1.4rem; }
.fb-text { flex: 1; display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.fb-text strong { font-size: 0.92rem; }
.fb-text span { font-size: 0.78rem; color: var(--text-dim); line-height: 1.3; }
.fb-cta { font-weight: 700; font-size: 0.82rem; color: var(--accent-warm); white-space: nowrap; }
.freemium-banner.is-premium .fb-cta { color: var(--accent); }

.paywall-card .paywall-inr {
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 600;
  margin: 0.35rem 0 0.65rem;
}
.paywall-perks {
  text-align: left;
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.55;
}
.paywall-ig { color: var(--accent) !important; font-weight: 600; font-size: 0.88rem; }

.premium-settings-card {
  border: 1px solid rgba(201, 146, 10, 0.3);
  background: linear-gradient(135deg, #fff8e6, var(--bg-card));
}

.hub-card.hub-locked {
  opacity: 0.92;
  position: relative;
}
.hub-card.hub-locked::after {
  content: '⭐ Premium';
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f5c842, #e8a317);
  color: #3d2e00;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}
