/* =====================================================================
   English Academy — visual design system (loaded after app.css)
   Fresh palette, dark sidebar shell, colourful skill tones, interactive
   lesson components and admin screens. Works in light and dark mode.
   ===================================================================== */
:root {
  --ea-primary: #5b4cf0;
  --ea-primary-rgb: 91, 76, 240;
  --ea-primary-strong: #4536d6;
  --ea-violet: #8b5cf6;
  --ea-accent: #ff8a3d;
  --ea-teal: #14b8a6;
  --ea-radius: 18px;
  --ea-radius-sm: 12px;
  --ea-sidebar-w: 264px;
  --ea-shadow-sm: 0 1px 2px rgba(17, 24, 61, .06), 0 2px 8px rgba(17, 24, 61, .05);
  --ea-shadow: 0 10px 30px -12px rgba(30, 27, 90, .22), 0 2px 6px rgba(30, 27, 90, .05);
  --ea-shadow-lg: 0 24px 60px -20px rgba(42, 30, 140, .35);
  --ea-grad: linear-gradient(135deg, #6a5cff 0%, #8b5cf6 45%, #ec4899 100%);
  --ea-grad-cool: linear-gradient(135deg, #5b4cf0 0%, #3aa0ff 60%, #14b8a6 120%);
  --bs-primary: var(--ea-primary);
  --bs-primary-rgb: var(--ea-primary-rgb);
  --bs-link-color: var(--ea-primary);
  --bs-link-color-rgb: var(--ea-primary-rgb);
  --bs-link-hover-color: var(--ea-primary-strong);
  --bs-border-radius: 12px;
  --bs-border-radius-lg: var(--ea-radius);
}
[data-bs-theme="light"] {
  --bs-body-bg: #f4f5fb; --ea-surface: #ffffff; --ea-muted-surface: #eef0f8; --ea-line: #e6e8f2;
  --bs-body-color: #1f2440; --bs-emphasis-color: #121633; --bs-secondary-color: #6b7193;
}
[data-bs-theme="dark"] {
  --bs-body-bg: #0b0e1c; --ea-surface: #141930; --ea-muted-surface: #1c2340; --ea-line: #262d4d;
  --ea-primary: #8f86ff; --ea-primary-rgb: 143, 134, 255; --ea-primary-strong: #a9a2ff;
  --bs-card-bg: var(--ea-surface); --bs-body-color: #dfe2f5; --bs-secondary-color: #9aa1c7; --bs-border-color: #2a3254;
  --ea-shadow: 0 10px 30px -12px rgba(0, 0, 0, .6); --ea-shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
}

/* ---- Tones (skills, block types, tiles) */
.tone-indigo, .type-reading, .focus-reading { --tone: #5b4cf0; }
.tone-violet, .type-vocabulary, .focus-vocabulary, .tone-words { --tone: #8b5cf6; }
.tone-pink, .type-alphabet, .focus-alphabet { --tone: #ec4899; }
.tone-coral, .type-speaking, .focus-speaking, .tone-talk { --tone: #f43f5e; }
.tone-orange, .type-pronunciation, .focus-pronunciation, .tone-speak { --tone: #f97316; }
.tone-amber, .type-writing, .focus-writing, .tone-write, .tone-quiz, .tone-tip { --tone: #f59e0b; }
.tone-gold { --tone: #d4a017; }
.tone-green, .type-review { --tone: #22c55e; }
.tone-teal, .type-grammar, .focus-grammar, .tone-practice { --tone: #14b8a6; }
.tone-sky, .type-listening, .focus-listening, .tone-listen { --tone: #0ea5e9; }
.tone-slate, .focus-general, .tone-learn, .tone-read { --tone: #5b4cf0; }
.tone-intro, .type-phonics, .focus-phonics { --tone: #a855f7; }

/* ---- Base polish */
body { -webkit-font-smoothing: antialiased; letter-spacing: -.005em; }
h1, h2, h3, .h1, .h2, .h3, .h4, .h5 { letter-spacing: -.02em; }
a { text-underline-offset: 3px; }
.card { --bs-card-border-color: var(--ea-line); --bs-card-border-radius: var(--ea-radius); border-color: var(--ea-line); box-shadow: var(--ea-shadow-sm); background: var(--ea-surface); }
.card-header { border-bottom-color: var(--ea-line); font-weight: 700; padding: 1rem 1.25rem; }
.btn { --bs-btn-border-radius: 12px; font-weight: 600; }
.btn-sm { --bs-btn-border-radius: 9px; }
.btn-lg { --bs-btn-border-radius: 14px; }
.btn-primary { --bs-btn-bg: var(--ea-primary); --bs-btn-border-color: var(--ea-primary); --bs-btn-hover-bg: var(--ea-primary-strong); --bs-btn-hover-border-color: var(--ea-primary-strong);
  --bs-btn-active-bg: var(--ea-primary-strong); --bs-btn-disabled-bg: var(--ea-primary); --bs-btn-disabled-border-color: var(--ea-primary);
  background-image: linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,0)); box-shadow: 0 6px 16px -6px rgba(var(--ea-primary-rgb), .6); }
.btn-primary:hover { transform: translateY(-1px); }
[data-bs-theme="dark"] .btn-primary { --bs-btn-color: #0b0e1c; --bs-btn-hover-color: #0b0e1c; --bs-btn-active-color: #0b0e1c; }
.btn-outline-primary { --bs-btn-color: var(--ea-primary); --bs-btn-border-color: rgba(var(--ea-primary-rgb), .45); --bs-btn-hover-bg: var(--ea-primary); --bs-btn-hover-border-color: var(--ea-primary); --bs-btn-active-bg: var(--ea-primary-strong); }
.btn { transition: transform .12s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease; }
.form-control, .form-select { border-radius: 12px; border-color: var(--ea-line); background-color: var(--ea-surface); }
.form-control:focus, .form-select:focus { border-color: rgba(var(--ea-primary-rgb), .6); box-shadow: 0 0 0 .22rem rgba(var(--ea-primary-rgb), .16); }
.form-check-input:checked { background-color: var(--ea-primary); border-color: var(--ea-primary); }
.table { --bs-table-bg: transparent; }
.table > thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-secondary-color); font-weight: 700; border-bottom-color: var(--ea-line); }
.table > :not(caption) > * > * { border-bottom-color: var(--ea-line); padding-top: .8rem; padding-bottom: .8rem; }
.alert { border-radius: 14px; border-width: 0; box-shadow: var(--ea-shadow-sm); }
.progress { background: var(--ea-muted-surface); }
.progress-bar { background: var(--ea-grad-cool); }
.badge { font-weight: 600; }
.breadcrumb { --bs-breadcrumb-divider-color: var(--bs-secondary-color); }
.dropdown-menu { border-radius: 14px; border-color: var(--ea-line); box-shadow: var(--ea-shadow); padding: .4rem; }
.dropdown-item { border-radius: 9px; }
::selection { background: rgba(var(--ea-primary-rgb), .22); }

/* ---- Chips, tabs, empty states, page heads */
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--ea-muted-surface); color: var(--bs-secondary-color); white-space: nowrap; }
.chip-success { background: rgba(34, 197, 94, .14); color: #15803d; }
.chip-warning { background: rgba(245, 158, 11, .16); color: #b45309; }
.chip-danger { background: rgba(244, 63, 94, .13); color: #be123c; }
.chip-info { background: rgba(14, 165, 233, .14); color: #0369a1; }
.chip-muted { background: var(--ea-muted-surface); color: var(--bs-secondary-color); }
[data-bs-theme="dark"] .chip-success { color: #4ade80; } [data-bs-theme="dark"] .chip-warning { color: #fbbf24; }
[data-bs-theme="dark"] .chip-danger { color: #fb7185; } [data-bs-theme="dark"] .chip-info { color: #38bdf8; }
.level-chip { display: inline-flex; align-items: center; padding: .2rem .6rem; border-radius: 8px; font-weight: 800; font-size: .76rem; letter-spacing: .02em;
  background: var(--ea-grad); color: #fff; }
.pill-tabs { display: inline-flex; gap: .25rem; padding: .3rem; border-radius: 14px; background: var(--ea-muted-surface); flex-wrap: wrap; }
.pill-tab { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: 10px; font-weight: 600; font-size: .9rem; color: var(--bs-secondary-color); text-decoration: none; }
.pill-tab:hover { color: var(--bs-emphasis-color); }
.pill-tab.active { background: var(--ea-surface); color: var(--ea-primary); box-shadow: var(--ea-shadow-sm); }
.pill-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; background: #f43f5e; color: #fff; font-size: .72rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; margin-bottom: 1.25rem; }
.page-title { font-size: 1.5rem; font-weight: 800; margin: 0; }
.page-sub { margin: .2rem 0 0; color: var(--bs-secondary-color); }
.page-actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.empty-state { text-align: center; padding: 3rem 1.5rem; }
.empty-state .empty-icon { width: 76px; height: 76px; margin: 0 auto 1rem; border-radius: 24px; display: grid; place-items: center; font-size: 2rem;
  background: rgba(var(--ea-primary-rgb), .1); color: var(--ea-primary); transform: rotate(-6deg); }
.empty-state h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: .3rem; }
.empty-state p { color: var(--bs-secondary-color); margin: 0; }
.note-box { display: flex; gap: .75rem; align-items: flex-start; padding: .85rem 1rem; border-radius: 14px; background: rgba(var(--ea-primary-rgb), .07); border: 1px solid rgba(var(--ea-primary-rgb), .15); font-size: .9rem; }
.note-box > i { color: var(--ea-primary); font-size: 1.15rem; }
.code-box { background: var(--ea-muted-surface); border-radius: 10px; padding: .6rem .8rem; font-size: .78rem; white-space: pre-wrap; word-break: break-all; margin-bottom: .75rem; }
.emoji-badge { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: var(--ea-muted-surface); flex-shrink: 0; }
.emoji-badge.sm { width: 36px; height: 36px; font-size: 1.1rem; border-radius: 11px; }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .75rem 1.25rem; background: var(--ea-muted-surface); border-bottom: 1px solid var(--ea-line); }
.section-row { display: flex; align-items: center; margin-bottom: .75rem; }
.section-title { font-size: 1.1rem; font-weight: 800; margin: 0; }

/* ---- App shell: dark sidebar */
.sidebar { background: linear-gradient(180deg, #17153a 0%, #1b1747 55%, #241a52 100%); color: #c9c8ee; border-right: 0; }
[data-bs-theme="dark"] .sidebar { background: linear-gradient(180deg, #0f1128 0%, #141436 100%); border-right: 1px solid var(--ea-line); }
@media (min-width: 992px) { .sidebar { width: var(--ea-sidebar-w); } .main-wrap { margin-left: var(--ea-sidebar-w); } }
.sidebar-brand { padding: 1.2rem 1.25rem 1rem; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--ea-grad); box-shadow: 0 8px 20px -8px rgba(236, 72, 153, .7); font-size: 1rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.sidebar .brand-name { color: #fff; font-size: 1.02rem; }
.brand-sub { font-size: .72rem; color: #9d9bd6; font-weight: 500; }
.sidebar-scroll { flex: 1; overflow-y: auto; padding-bottom: 1rem; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.sidebar .sidebar-section { color: #8c8ac9; font-size: .68rem; padding: 1rem 1.5rem .35rem; letter-spacing: .1em; }
.sidebar .sidebar-nav { padding: 0 .75rem; gap: 1px; }
.sidebar .sidebar-nav .nav-link { color: #cfcdf3; padding: .5rem .7rem; border-radius: 11px; font-size: .92rem; font-weight: 500; position: relative; }
.sidebar .sidebar-nav .nav-link i { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; font-size: 1rem; opacity: 1;
  background: rgba(255,255,255,.06); color: var(--tone-c, #b9b6ff); flex-shrink: 0; }
.sidebar .sidebar-nav .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar .sidebar-nav .nav-link.active { background: rgba(255,255,255,.12); color: #fff; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.sidebar .sidebar-nav .nav-link.active::before { content: ""; position: absolute; left: -.75rem; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--ea-grad); }
.sidebar .sidebar-nav .nav-link.active i { background: var(--tone-c, #8f86ff); color: #fff; }
.nav-link[data-tone="pink"] { --tone-c: #f472b6; } .nav-link[data-tone="violet"] { --tone-c: #a78bfa; } .nav-link[data-tone="orange"] { --tone-c: #fb923c; }
.nav-link[data-tone="green"] { --tone-c: #4ade80; } .nav-link[data-tone="sky"] { --tone-c: #38bdf8; } .nav-link[data-tone="indigo"] { --tone-c: #818cf8; }
.nav-link[data-tone="coral"] { --tone-c: #fb7185; } .nav-link[data-tone="amber"] { --tone-c: #fbbf24; } .nav-link[data-tone="teal"] { --tone-c: #2dd4bf; }
.nav-link[data-tone="gold"] { --tone-c: #facc15; } .nav-link[data-tone="slate"] { --tone-c: #a5b4fc; }
.nav-badge { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px; background: #f43f5e; color: #fff; font-size: .7rem; font-weight: 700; display: inline-grid; place-items: center; box-shadow: 0 0 0 3px rgba(244, 63, 94, .25); }
.sidebar .sidebar-locked li { color: #8c8ac9; font-size: .86rem; padding: .4rem .8rem; }
.lock-level { margin-left: auto; font-size: .66rem; font-weight: 700; padding: .1rem .45rem; border-radius: 6px; background: rgba(255,255,255,.08); color: #c9c8ee; }
.sidebar-footer { padding: .9rem 1rem 1rem; border-top: 1px solid rgba(255,255,255,.07); }
.btn-switch { background: rgba(255,255,255,.08); color: #e7e6ff; border: 1px solid rgba(255,255,255,.12); }
.btn-switch:hover { background: rgba(255,255,255,.16); color: #fff; }
.sidebar-user { display: flex; align-items: center; gap: .65rem; padding: .45rem .5rem; border-radius: 12px; text-decoration: none; color: #fff; }
.sidebar-user:hover { background: rgba(255,255,255,.06); }
.su-name { display: block; font-weight: 700; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.su-role { display: block; font-size: .72rem; color: #9d9bd6; }
.topbar { background: color-mix(in srgb, var(--bs-body-bg) 80%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--ea-line); padding: .75rem 1.75rem; }
.topbar-title { font-size: 1.2rem; font-weight: 800; }
.topbar-streak { align-items: center; gap: .3rem; padding: .3rem .7rem; border-radius: 99px; background: rgba(249, 115, 22, .12); color: #c2410c; font-weight: 700; font-size: .85rem; }
.topbar-streak i { color: #f97316; }
[data-bs-theme="dark"] .topbar-streak { color: #fdba74; }
.content { padding: 1.75rem; max-width: 1480px; }
.avatar-initials { background: var(--ea-grad); }

/* ---- Dashboards */
.welcome { background: var(--ea-grad); border-radius: 24px; box-shadow: var(--ea-shadow-lg); }
.welcome::after { content: "✦ Aa ✦"; font-size: 140px; right: 4%; top: -18px; color: rgba(255,255,255,.09); }
.welcome::before { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; right: -80px; bottom: -160px; background: radial-gradient(circle, rgba(255,255,255,.22), transparent 70%); }
.target-ring { background: conic-gradient(#ffd166 calc(var(--p) * 1%), rgba(255,255,255,.22) 0); }
.target-ring > div { background: #5a3fe0; }
.continue-card { background: var(--ea-surface); border: 1px solid var(--ea-line); position: relative; overflow: hidden; }
.continue-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--ea-grad); }
.continue-icon { background: var(--ea-grad); box-shadow: 0 10px 22px -10px rgba(139, 92, 246, .9); }
.stat-card { transition: transform .15s ease, box-shadow .15s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--ea-shadow); }
.stat-icon { width: 42px; height: 42px; border-radius: 13px; background: rgba(var(--ea-primary-rgb), .1); }
.row > div:nth-child(4n+1) > .stat-card .stat-icon { background: rgba(249, 115, 22, .13); color: #f97316; }
.row > div:nth-child(4n+2) > .stat-card .stat-icon { background: rgba(14, 165, 233, .13); color: #0ea5e9; }
.row > div:nth-child(4n+3) > .stat-card .stat-icon { background: rgba(34, 197, 94, .14); color: #16a34a; }
.row > div:nth-child(4n+4) > .stat-card .stat-icon { background: rgba(236, 72, 153, .13); color: #ec4899; }
.stat-value { font-size: 1.75rem; }
.skill-tile { border-color: var(--ea-line); background: var(--ea-surface); border-radius: 14px; transition: transform .15s ease; }
.skill-tile:hover { transform: translateY(-2px); }
.activity-bar.on { background: var(--ea-grad); }
.badge-chip { background: rgba(245, 158, 11, .14); }
.practice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .9rem; }
.practice-tile { --tone: #5b4cf0; position: relative; display: flex; flex-direction: column; gap: .15rem; padding: 1rem 1.05rem 1.1rem; border-radius: 18px; text-decoration: none;
  background: var(--ea-surface); border: 1px solid var(--ea-line); color: var(--bs-body-color); overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.practice-tile::after { content: ""; position: absolute; width: 120px; height: 120px; border-radius: 50%; right: -50px; top: -50px; background: color-mix(in srgb, var(--tone) 12%, transparent); transition: transform .3s ease; }
.practice-tile:hover { transform: translateY(-3px); box-shadow: var(--ea-shadow); color: var(--bs-body-color); }
.practice-tile:hover::after { transform: scale(1.35); }
.pt-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.25rem; color: #fff; background: var(--tone);
  box-shadow: 0 8px 18px -8px var(--tone); margin-bottom: .55rem; position: relative; z-index: 1; }
.pt-label { font-weight: 800; position: relative; z-index: 1; }
.pt-sub { font-size: .8rem; color: var(--bs-secondary-color); position: relative; z-index: 1; }
.action-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.action-card { --tone: #5b4cf0; display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; border-radius: 18px; text-decoration: none; color: var(--bs-body-color);
  background: var(--ea-surface); border: 1px solid var(--ea-line); box-shadow: var(--ea-shadow-sm); transition: transform .15s ease, box-shadow .15s ease; }
.action-card:hover { transform: translateY(-2px); box-shadow: var(--ea-shadow); color: var(--bs-body-color); }
.action-card.attention { border-color: color-mix(in srgb, var(--tone) 45%, transparent); background: linear-gradient(120deg, color-mix(in srgb, var(--tone) 9%, var(--ea-surface)), var(--ea-surface)); }
.ac-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.4rem; color: #fff; background: var(--tone); flex-shrink: 0; box-shadow: 0 10px 20px -10px var(--tone); }
.ac-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ac-value { font-size: 1.6rem; font-weight: 800; line-height: 1.1; color: var(--bs-emphasis-color); }
.ac-value small { font-size: .9rem; color: var(--bs-secondary-color); font-weight: 600; }
.ac-label { font-size: .85rem; color: var(--bs-secondary-color); }
.ac-go { font-weight: 700; font-size: .85rem; color: var(--tone); white-space: nowrap; }

/* ---- Hero panel (studio) */
.hero-panel { border-radius: 24px; background: var(--ea-grad); color: #fff; box-shadow: var(--ea-shadow-lg); position: relative; overflow: hidden; }
.hero-panel::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; right: -120px; top: -200px; background: radial-gradient(circle, rgba(255,255,255,.25), transparent 65%); }
.hero-panel-body { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 2rem; padding: 2rem; align-items: center; }
.hero-kicker { display: inline-flex; gap: .4rem; align-items: center; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; background: rgba(255,255,255,.16); padding: .3rem .75rem; border-radius: 99px; }
.hero-title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; margin: .75rem 0 .5rem; }
.hero-title .hl { color: #ffe08a; }
.hero-text { color: rgba(255,255,255,.85); max-width: 720px; }
.hero-meter { max-width: 620px; margin-top: 1rem; }
.meter { height: 12px; border-radius: 99px; background: rgba(255,255,255,.22); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ffe08a, #fff); transition: width .6s ease; }
.hero-stats { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-stat { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); border-radius: 18px; padding: .9rem 1.1rem; min-width: 150px; display: flex; flex-direction: column; }
.hs-value { font-size: 1.6rem; font-weight: 800; }
.hs-label { font-size: .78rem; color: rgba(255,255,255,.8); line-height: 1.3; }
.level-progress-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .9rem; }
.level-progress { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: 1rem .5rem; border-radius: 16px; border: 1px solid var(--ea-line); text-decoration: none; color: var(--bs-body-color); transition: transform .15s ease; }
.level-progress:hover { transform: translateY(-2px); box-shadow: var(--ea-shadow); color: var(--bs-body-color); }
.lp-ring { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ea-primary) calc(var(--p) * 1%), var(--ea-muted-surface) 0); }
.lp-ring span { width: 50px; height: 50px; border-radius: 50%; background: var(--ea-surface); display: grid; place-items: center; font-size: 1.4rem; }
.lp-code { font-weight: 800; margin-top: .3rem; }
.lp-count { font-size: .78rem; color: var(--bs-secondary-color); }
.lp-fail { font-size: .7rem; color: #e11d48; font-weight: 600; }
.studio-log { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; }
.studio-log li { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; border-radius: 12px; background: var(--ea-muted-surface); animation: pop-in .35s ease; }
.studio-log li.bad { background: rgba(244, 63, 94, .08); }
.log-emoji { font-size: 1.4rem; }
.log-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.log-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-meta { font-size: .78rem; color: var(--bs-secondary-color); }

/* ---- Auth & public pages */
.auth-shell { background:
  radial-gradient(900px 480px at 0% -10%, rgba(139, 92, 246, .18), transparent 60%),
  radial-gradient(800px 500px at 100% 0%, rgba(236, 72, 153, .13), transparent 60%),
  radial-gradient(900px 600px at 50% 120%, rgba(20, 184, 166, .12), transparent 60%), var(--bs-body-bg); }
.auth-card { border: 1px solid var(--ea-line) !important; border-radius: 26px; box-shadow: var(--ea-shadow-lg) !important; overflow: hidden; position: relative; }
.auth-card-accent { height: 6px; background: var(--ea-grad); }
.auth-emoji { font-size: 2.4rem; line-height: 1; margin-bottom: .6rem; animation: wave 2.2s ease-in-out 1; transform-origin: 70% 70%; }
.pending-illustration { position: relative; width: 112px; height: 112px; margin: 0 auto 1.25rem; }
.pi-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(#8b5cf6, #ec4899, #f59e0b, #14b8a6, #8b5cf6); animation: spin 6s linear infinite; }
.pi-ring::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--ea-surface); }
.pi-icon { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.6rem; color: var(--ea-primary); }
.pending-steps { list-style: none; padding: 0; max-width: 430px; margin: 0 auto 1.5rem; display: flex; flex-direction: column; gap: .9rem; }
.pending-steps li { display: flex; gap: .9rem; align-items: flex-start; }
.ps-dot { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--ea-muted-surface); color: var(--bs-secondary-color); flex-shrink: 0; }
.pending-steps li.done .ps-dot { background: #22c55e; color: #fff; }
.pending-steps li.now .ps-dot { background: rgba(var(--ea-primary-rgb), .14); color: var(--ea-primary); box-shadow: 0 0 0 4px rgba(var(--ea-primary-rgb), .08); }
.landing-hero { padding: 2.5rem .75rem 2rem; }
.hero-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: 99px; font-weight: 700; font-size: .85rem;
  background: rgba(var(--ea-primary-rgb), .1); color: var(--ea-primary); margin-bottom: 1rem; }
.landing-title { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; line-height: 1.08; letter-spacing: -.035em; margin-bottom: 1rem; }
.text-gradient { background: var(--ea-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.trust-row { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; color: var(--bs-secondary-color); font-size: .92rem; }
.trust-row strong { color: var(--bs-emphasis-color); }
.hero-stage { position: relative; min-height: 420px; }
.mock { position: absolute; background: var(--ea-surface); border: 1px solid var(--ea-line); border-radius: 22px; box-shadow: var(--ea-shadow-lg); padding: 1.1rem 1.25rem; animation: float 6s ease-in-out infinite; }
.mock-card { left: 4%; top: 6%; width: 190px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.mock-emoji { font-size: 3rem; }
.mock-word { font-size: 1.6rem; font-weight: 800; }
.mock-chip { margin-top: .4rem; font-size: .8rem; font-weight: 700; padding: .3rem .7rem; border-radius: 99px; background: rgba(var(--ea-primary-rgb), .1); color: var(--ea-primary); }
.mock-chat { right: 2%; top: 0; width: 300px; animation-delay: -2s; display: flex; flex-direction: column; gap: .5rem; }
.mc-row { display: flex; gap: .5rem; align-items: flex-end; }
.mc-row.right { flex-direction: row-reverse; }
.mc-row span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .65rem; font-weight: 800; color: #fff; background: #8b5cf6; flex-shrink: 0; }
.mc-row.right span { background: #14b8a6; }
.mc-row p { margin: 0; padding: .45rem .7rem; border-radius: 14px; background: var(--ea-muted-surface); font-size: .85rem; }
.mc-row.right p { background: rgba(20, 184, 166, .14); }
.mock-score { left: 18%; bottom: 4%; display: flex; align-items: center; gap: .9rem; animation-delay: -4s; }
.score-ring { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#22c55e calc(var(--p) * 1%), var(--ea-muted-surface) 0); }
.score-ring span { width: 50px; height: 50px; border-radius: 50%; background: var(--ea-surface); display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.mock-say { right: 8%; bottom: 14%; display: flex; gap: .8rem; align-items: center; animation-delay: -1s; }
.mock-say > i { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #f97316; color: #fff; font-size: 1.2rem; }
.section-head { max-width: 680px; margin: 0 auto 2rem; }
.section-kicker { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--ea-primary); }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin: .35rem 0 .5rem; }
.section-head p { color: var(--bs-secondary-color); }
.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.skill-card { padding: 1.4rem; border-radius: 20px; background: var(--ea-surface); border: 1px solid var(--ea-line); transition: transform .18s ease, box-shadow .18s ease; }
.skill-card:hover { transform: translateY(-4px); box-shadow: var(--ea-shadow); }
.skill-card h3 { font-size: 1.05rem; font-weight: 800; margin: .9rem 0 .35rem; }
.skill-card p { font-size: .9rem; color: var(--bs-secondary-color); margin: 0; }
.skill-icon { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; font-size: 1.35rem; color: #fff; background: var(--tone); box-shadow: 0 10px 22px -10px var(--tone); }
.how-steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; counter-reset: none; }
.how-steps li { padding: 1.4rem; border-radius: 20px; background: var(--ea-surface); border: 1px solid var(--ea-line); position: relative; }
.how-num { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--ea-grad); }
.how-steps h3 { font-size: 1.02rem; font-weight: 800; margin: .9rem 0 .3rem; }
.how-steps p { color: var(--bs-secondary-color); font-size: .9rem; margin: 0; }
.level-path-h { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; }
.lph-step { padding: 1.1rem; border-radius: 18px; background: var(--ea-surface); border: 1px solid var(--ea-line); display: flex; flex-direction: column; gap: .15rem; }
.lph-emoji { font-size: 1.8rem; }
.lph-code { font-weight: 800; font-size: 1.2rem; }
.lph-name { font-weight: 700; font-size: .9rem; }
.lph-desc { font-size: .78rem; color: var(--bs-secondary-color); }
.cta-band { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; padding: 2.25rem; border-radius: 26px; background: var(--ea-grad); color: #fff; box-shadow: var(--ea-shadow-lg); }
.cta-band h2 { font-weight: 800; margin: 0 0 .3rem; }
.cta-band p { margin: 0; color: rgba(255,255,255,.85); }

/* ---- Courses */
.continue-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; padding: 1.4rem 1.6rem; border-radius: 22px; background: var(--ea-grad); color: #fff; box-shadow: var(--ea-shadow-lg); }
.continue-hero-icon { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 1.7rem; background: rgba(255,255,255,.2); }
.ch-kicker { font-size: .8rem; color: rgba(255,255,255,.8); font-weight: 600; }
.ch-title { font-size: 1.3rem; font-weight: 800; }
.ch-meta { font-size: .85rem; color: rgba(255,255,255,.8); }
.level-section { margin-bottom: 2rem; }
.level-section-head { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; }
.ls-emoji { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; font-size: 1.6rem; background: var(--ea-surface); border: 1px solid var(--ea-line); box-shadow: var(--ea-shadow-sm); }
.level-section-head h2 { font-size: 1.15rem; font-weight: 800; margin: 0; }
.level-section-head span { font-size: .85rem; color: var(--bs-secondary-color); }
.level-section.is-locked .course-grid { opacity: .6; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.course-tile { --tone: #5b4cf0; display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: var(--ea-surface); border: 1px solid var(--ea-line); box-shadow: var(--ea-shadow-sm); transition: transform .18s ease, box-shadow .18s ease; }
.course-tile:hover { transform: translateY(-3px); box-shadow: var(--ea-shadow); }
.course-cover { height: 110px; display: grid; place-items: center; position: relative; overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.35), transparent 40%), linear-gradient(135deg, var(--tone), color-mix(in srgb, var(--tone) 55%, #ec4899)); }
.course-cover::after { content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%; right: -40px; bottom: -80px; background: rgba(255,255,255,.14); }
.course-cover span { font-size: 3rem; filter: drop-shadow(0 8px 12px rgba(0,0,0,.18)); position: relative; z-index: 1; transition: transform .25s ease; }
.course-tile:hover .course-cover span { transform: scale(1.12) rotate(-6deg); }
.course-body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.course-body h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: .35rem; }
.course-body p { font-size: .86rem; color: var(--bs-secondary-color); flex: 1; }
.course-stats { display: flex; gap: .5rem; font-size: .82rem; margin-bottom: .4rem; color: var(--bs-secondary-color); }
.course-tile.locked { filter: grayscale(.4); }
.course-hero { --tone: #5b4cf0; display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; padding: 1.6rem; border-radius: 24px; margin-bottom: 1.5rem;
  background: linear-gradient(120deg, color-mix(in srgb, var(--tone) 14%, var(--ea-surface)), var(--ea-surface) 70%); border: 1px solid var(--ea-line); box-shadow: var(--ea-shadow-sm); }
.course-hero-emoji { width: 84px; height: 84px; border-radius: 24px; display: grid; place-items: center; font-size: 2.8rem; background: var(--ea-surface); box-shadow: var(--ea-shadow); }
.unit-list { display: flex; flex-direction: column; gap: .8rem; }
.unit-card { border-radius: 18px; background: var(--ea-surface); border: 1px solid var(--ea-line); box-shadow: var(--ea-shadow-sm); overflow: hidden; }
.unit-card > summary { display: flex; align-items: center; gap: 1rem; padding: .95rem 1.2rem; cursor: pointer; list-style: none; }
.unit-card > summary::-webkit-details-marker { display: none; }
.unit-card[open] > summary { border-bottom: 1px solid var(--ea-line); }
.unit-emoji { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: var(--ea-muted-surface); flex-shrink: 0; }
.unit-head { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.unit-kicker { font-size: .75rem; color: var(--bs-secondary-color); font-weight: 600; }
.unit-title { font-weight: 800; }
.unit-progress { width: 140px; }
.unit-chevron { transition: transform .2s ease; color: var(--bs-secondary-color); }
.unit-card[open] .unit-chevron { transform: rotate(180deg); }
.unit-card.complete .unit-emoji { background: rgba(34, 197, 94, .14); }
@media (max-width: 575.98px) { .unit-progress { display: none; } }
.lesson-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .6rem; padding: 1rem; }
.lesson-tile { --tone: #5b4cf0; display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border-radius: 14px; border: 1px solid var(--ea-line); text-decoration: none; color: var(--bs-body-color); transition: transform .12s ease, border-color .12s ease, background .12s ease; }
.lesson-tile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--tone) 50%, transparent); background: color-mix(in srgb, var(--tone) 5%, var(--ea-surface)); color: var(--bs-body-color); }
.lt-emoji { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; background: color-mix(in srgb, var(--tone) 13%, transparent); flex-shrink: 0; }
.lt-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lt-type { font-size: .72rem; color: var(--tone); font-weight: 700; }
.lt-title { font-weight: 700; font-size: .9rem; line-height: 1.25; }
.lt-state { color: var(--bs-secondary-color); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.lesson-tile.st-completed .lt-state { color: #16a34a; }
.lesson-tile.st-completed { background: rgba(34, 197, 94, .05); }
.mini-ring { display: inline-block; width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(var(--ea-primary) calc(var(--p) * 1%), var(--ea-muted-surface) 0); vertical-align: middle;
  -webkit-mask: radial-gradient(circle, transparent 6px, #000 7px); mask: radial-gradient(circle, transparent 6px, #000 7px); }

/* ---- Lesson player */
.lesson-hero { --tone: #5b4cf0; position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; padding: 1.75rem; border-radius: 26px; margin-bottom: 1.5rem; overflow: hidden;
  background: linear-gradient(125deg, color-mix(in srgb, var(--tone) 92%, #000) 0%, var(--tone) 40%, color-mix(in srgb, var(--tone) 60%, #ec4899) 100%); color: #fff; box-shadow: var(--ea-shadow-lg); }
.lesson-hero::after { content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%; right: -120px; top: -160px; background: radial-gradient(circle, rgba(255,255,255,.25), transparent 65%); }
.lesson-hero > * { position: relative; z-index: 1; }
.lesson-hero-emoji { width: 92px; height: 92px; border-radius: 26px; display: grid; place-items: center; font-size: 3rem; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.25); animation: float 6s ease-in-out infinite; }
.lesson-meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; align-items: center; font-size: .82rem; font-weight: 600; opacity: .95; }
.lesson-hero .level-chip { background: rgba(255,255,255,.22); }
.lesson-title { font-size: clamp(1.5rem, 2.8vw, 2.1rem); font-weight: 800; margin: .45rem 0 .3rem; }
.lesson-summary { opacity: .9; margin-bottom: .6rem; max-width: 760px; }
.goal-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.goal-chips li { font-size: .8rem; font-weight: 600; padding: .3rem .7rem; border-radius: 99px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.2); }
.unit-card .goal-chips li { background: var(--ea-muted-surface); border-color: var(--ea-line); }
.course-hero .goal-chips li, .course-hero .level-chip { color: #fff; }
.course-hero .lesson-meta { color: var(--bs-secondary-color); }
.lesson-ring { width: 118px; height: 118px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#ffe08a calc(var(--p) * 1%), rgba(255,255,255,.2) 0); flex-shrink: 0; transition: background .6s ease; }
.lesson-ring > div { width: 94px; height: 94px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: rgba(0,0,0,.18); backdrop-filter: blur(4px); }
.lesson-ring strong { font-size: 1.6rem; line-height: 1; }
.lesson-ring span { font-size: .7rem; opacity: .85; }
.course-hero .lesson-ring { background: conic-gradient(var(--ea-primary) calc(var(--p) * 1%), var(--ea-muted-surface) 0); }
.course-hero .lesson-ring > div { background: var(--ea-surface); color: var(--bs-emphasis-color); }
.lesson-hero-bar { flex-basis: 100%; }
.lesson-hero-bar .progress { height: 8px; background: rgba(255,255,255,.2); }
.lesson-hero-bar .progress-bar { background: linear-gradient(90deg, #ffe08a, #fff); }
.lesson-layout { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 1200px) { .lesson-layout { grid-template-columns: 230px minmax(0, 1fr); } }
.step-rail { display: none; }
@media (min-width: 1200px) {
  .step-rail { display: block; position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; }
}
.step-rail-title { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--bs-secondary-color); margin: 0 0 .5rem .4rem; }
.step-rail ol { list-style: none; padding: 0; margin: 0; position: relative; }
.step-rail ol::before { content: ""; position: absolute; left: 22px; top: 14px; bottom: 14px; width: 2px; background: var(--ea-line); }
.step-dot { display: flex; align-items: center; gap: .65rem; width: 100%; padding: .4rem; border: 0; background: none; border-radius: 12px; text-align: left; color: var(--bs-secondary-color); position: relative; }
.step-dot:hover { background: var(--ea-muted-surface); color: var(--bs-emphasis-color); }
.sd-icon { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--ea-surface); border: 2px solid var(--ea-line); font-size: .85rem; flex-shrink: 0; z-index: 1; }
.sd-check { display: none; }
.step-dot.done .sd-icon { background: #22c55e; border-color: #22c55e; color: #fff; }
.step-dot.done .sd-icon .bi:not(.sd-check) { display: none; }
.step-dot.done .sd-check { display: inline; }
.step-dot.current { color: var(--bs-emphasis-color); font-weight: 700; background: rgba(var(--ea-primary-rgb), .07); }
.step-dot.current .sd-icon { border-color: var(--ea-primary); box-shadow: 0 0 0 4px rgba(var(--ea-primary-rgb), .14); }
.sd-label { font-size: .82rem; line-height: 1.2; }
.lesson-block { --tone: #5b4cf0; border-radius: 22px; overflow: hidden; scroll-margin-top: 90px; transition: box-shadow .2s ease, transform .2s ease; }
.lesson-block.is-done { box-shadow: var(--ea-shadow-sm), inset 0 0 0 2px rgba(34, 197, 94, .35); }
.block-head { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.5rem 0; }
.block-badge { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: var(--tone); box-shadow: 0 8px 16px -8px var(--tone); }
.block-kicker { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--tone); }
.block-done-mark { margin-left: auto; color: #22c55e; font-size: 1.3rem; opacity: 0; transform: scale(.5); transition: all .3s cubic-bezier(.34, 1.56, .64, 1); }
.lesson-block.is-done .block-done-mark { opacity: 1; transform: scale(1); }
.block-title { font-size: 1.3rem; font-weight: 800; margin: .5rem 0 1rem; }
.block-footer { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px dashed var(--ea-line); }
.rich { font-size: 1.02rem; line-height: 1.7; }
.rich-lead { font-size: 1.12rem; }
.rich-tip { padding: 1rem 1.15rem; border-radius: 14px; background: rgba(245, 158, 11, .1); border-left: 4px solid #f59e0b; }
.rich h3 { font-weight: 800; color: var(--tone); }
.rich ul { padding-left: 1.1rem; }
.rich li::marker { color: var(--tone); }
.example-list li { border-bottom-color: var(--ea-line); padding: .65rem .2rem; border-radius: 10px; transition: background .12s ease; }
.example-list li:hover { background: var(--ea-muted-surface); }

/* flashcards (lesson blocks only; the vocabulary review page keeps its own .flashcard) */
.flash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }
.flash-grid .flashcard { min-height: 0; height: 210px; padding: 0; border: 0; background: none; box-shadow: none; perspective: 1000px; cursor: pointer; display: block; border-radius: 20px; }
.flash-grid .flashcard:focus-visible { outline: 3px solid rgba(var(--ea-primary-rgb), .5); outline-offset: 3px; }
.flash-inner { position: relative; width: 100%; height: 100%; transition: transform .55s cubic-bezier(.4, .2, .2, 1); transform-style: preserve-3d; }
.flash-grid .flashcard.flipped .flash-inner { transform: rotateY(180deg); }
.flash-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 20px; padding: 1rem; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .3rem; }
.flash-front { background: var(--ea-surface); border: 1px solid var(--ea-line); box-shadow: var(--ea-shadow); }
.flash-front::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; border-radius: 20px 20px 0 0; background: var(--ea-grad); }
.flash-back { transform: rotateY(180deg); background: var(--ea-grad); color: #fff; box-shadow: var(--ea-shadow); }
.flash-emoji { font-size: 2.8rem; line-height: 1; transition: transform .2s ease; }
.flashcard:hover .flash-emoji { transform: scale(1.12) rotate(-5deg); }
.flash-word { font-size: 1.35rem; font-weight: 800; }
.flash-speak { margin-top: .2rem; }
.flash-pos { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; background: rgba(255,255,255,.2); padding: .15rem .5rem; border-radius: 99px; }
.flash-meaning { font-weight: 700; font-size: .95rem; }
.flash-tr { font-size: 1.05rem; font-weight: 600; }
.flash-example { font-size: .8rem; opacity: .9; font-style: italic; }

/* dialogue */
.chat-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.chat-toolbar .active { background: var(--ea-primary); color: #fff; border-color: var(--ea-primary); }
.chat { display: flex; flex-direction: column; gap: .7rem; padding: 1rem; border-radius: 18px; background: var(--ea-muted-surface); }
.chat-row { display: flex; align-items: flex-end; gap: .6rem; }
.chat-row.right { flex-direction: row-reverse; }
.chat-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 800; color: #fff; background: #8b5cf6; flex-shrink: 0; }
.chat-row.right .chat-avatar { background: #14b8a6; }
.chat-bubble { max-width: min(560px, 78%); padding: .65rem .9rem; border-radius: 18px 18px 18px 6px; background: var(--ea-surface); box-shadow: var(--ea-shadow-sm); display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.chat-row.right .chat-bubble { border-radius: 18px 18px 6px 18px; background: color-mix(in srgb, #14b8a6 14%, var(--ea-surface)); }
.chat-name { font-size: .72rem; font-weight: 800; color: var(--bs-secondary-color); }
.chat-text { font-size: 1rem; }
.chat-hidden { display: none; font-weight: 700; color: var(--ea-primary); }
.chat-row.is-me .chat-text { display: none; }
.chat-row.is-me .chat-hidden { display: block; }
.chat-row.is-me .chat-bubble { border: 2px dashed rgba(var(--ea-primary-rgb), .5); background: rgba(var(--ea-primary-rgb), .06); }
.chat-row.speaking .chat-bubble { transform: scale(1.03); box-shadow: 0 0 0 3px rgba(var(--ea-primary-rgb), .3), var(--ea-shadow); }
.chat-row .speak-group { opacity: .65; }
.chat-row:hover .speak-group { opacity: 1; }

/* passage */
.passage-tools { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.passage-text { font-family: Georgia, "Times New Roman", serif; font-size: 1.1rem; line-height: 1.85; padding: 1.2rem 1.4rem; border-radius: 16px; background: var(--ea-muted-surface); transition: filter .35s ease; }
.passage.is-hidden .passage-text { filter: blur(7px); user-select: none; pointer-events: none; }
.gloss-chip { display: inline-flex; gap: .4rem; align-items: baseline; padding: .35rem .75rem; border-radius: 12px; background: rgba(var(--ea-primary-rgb), .07); border: 1px solid rgba(var(--ea-primary-rgb), .15); font-size: .9rem; }

/* say it */
.say-list { display: flex; flex-direction: column; gap: .6rem; }
.say-item { display: grid; grid-template-columns: 1fr auto; gap: .4rem 1rem; align-items: center; padding: .85rem 1rem; border-radius: 16px; border: 1px solid var(--ea-line); background: var(--ea-surface); transition: border-color .2s ease, background .2s ease; }
.say-item.said-well { border-color: rgba(34, 197, 94, .5); background: rgba(34, 197, 94, .05); }
.say-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem; }
.say-text { font-size: 1.15rem; font-weight: 800; }
.say-tip { flex-basis: 100%; font-size: .82rem; color: var(--bs-secondary-color); }
.say-actions { display: flex; gap: .4rem; align-items: center; }
.btn-mic { width: 40px; height: 40px; border-radius: 50%; padding: 0; display: grid; place-items: center; background: #f97316; color: #fff; border: 0; box-shadow: 0 8px 16px -8px #f97316; }
.btn-mic:hover { background: #ea580c; color: #fff; }
.btn-mic.listening { animation: pulse-ring 1.2s infinite; background: #e11d48; }
.say-result { grid-column: 1 / -1; font-size: .9rem; }
.say-result:empty { display: none; }
.say-listening { display: inline-flex; gap: .5rem; align-items: center; color: #e11d48; font-weight: 700; }
.pulse-dot { width: 10px; height: 10px; border-radius: 50%; background: #e11d48; animation: blink 1s infinite; }
.say-stars { font-size: 1.1rem; letter-spacing: .1em; color: #f59e0b; }
.say-stars .off { color: var(--ea-line); }

/* exercises */
.exercise-q { margin-bottom: 1.2rem; padding: 1.1rem 1.15rem; border-radius: 18px; background: var(--ea-muted-surface); border: 2px solid transparent; transition: border-color .2s ease, background .2s ease; }
.exercise-q.needs-answer { border-color: rgba(245, 158, 11, .55); }
.exercise-q.is-right { border-color: rgba(34, 197, 94, .45); background: rgba(34, 197, 94, .06); animation: pop .35s ease; }
.exercise-q.is-wrong { border-color: rgba(244, 63, 94, .4); background: rgba(244, 63, 94, .05); animation: shake .35s ease; }
.q-legend { display: flex; align-items: center; gap: .6rem; font-size: 1.02rem; font-weight: 700; margin-bottom: .8rem; float: none; width: 100%; }
.q-num { width: 30px; height: 30px; background: var(--tone, var(--ea-primary)); color: #fff; font-weight: 800; }
.exercise-options { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .55rem; }
.exercise-option { padding: .75rem .9rem; border: 2px solid var(--ea-line); border-radius: 14px; font-weight: 600; transition: transform .1s ease, border-color .15s ease, background .15s ease; }
.exercise-option input { position: absolute; opacity: 0; pointer-events: none; }
.exercise-option:hover { transform: translateY(-1px); border-color: rgba(var(--ea-primary-rgb), .5); }
.exercise-option:has(input:focus-visible) { outline: 3px solid rgba(var(--ea-primary-rgb), .4); outline-offset: 2px; }
.opt-letter { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-size: .8rem; font-weight: 800; background: var(--ea-muted-surface); color: var(--bs-secondary-color); flex-shrink: 0; }
.exercise-option:has(input:checked) { border-color: var(--ea-primary); background: rgba(var(--ea-primary-rgb), .07); }
.exercise-option:has(input:checked) .opt-letter { background: var(--ea-primary); color: #fff; }
.exercise-option.correct { border-color: #22c55e; background: rgba(34, 197, 94, .12); }
.exercise-option.correct .opt-letter { background: #22c55e; color: #fff; }
.exercise-option.wrong { border-color: #f43f5e; background: rgba(244, 63, 94, .1); }
.exercise-option.wrong .opt-letter { background: #f43f5e; color: #fff; }
.exercise-feedback { margin-top: .7rem; font-size: .92rem; }
.exercise-feedback.ok { color: #15803d; }
.exercise-feedback.no { color: #be123c; }
[data-bs-theme="dark"] .exercise-feedback.ok { color: #4ade80; } [data-bs-theme="dark"] .exercise-feedback.no { color: #fb7185; }
.exercise-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: .5rem; }
.exercise-score { font-weight: 700; }
.score-pill { display: inline-block; padding: .25rem .7rem; border-radius: 99px; color: #fff; font-weight: 800; margin-right: .3rem; }
.score-pill.great { background: #22c55e; } .score-pill.good { background: #f59e0b; } .score-pill.low { background: #f43f5e; }
.gap-sentence { font-size: 1.15rem; line-height: 2.4; margin: 0; }
.lesson-block .gap-input { width: 9rem; border: 0; border-bottom: 3px solid rgba(var(--ea-primary-rgb), .5); border-radius: 8px 8px 0 0; background: var(--ea-surface); padding: .15rem .5rem; font-weight: 700; color: var(--ea-primary); text-align: center; outline: none; }
.lesson-block .gap-input:focus { border-bottom-color: var(--ea-primary); box-shadow: 0 6px 12px -8px rgba(var(--ea-primary-rgb), .7); }
.lesson-block .gap-input.correct { border-bottom-color: #22c55e; color: #15803d; background: rgba(34, 197, 94, .1); }
.lesson-block .gap-input.wrong { border-bottom-color: #f43f5e; color: #be123c; background: rgba(244, 63, 94, .08); }
.order-tray { min-height: 60px; display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; padding: .6rem; border-radius: 14px; border: 2px dashed rgba(var(--ea-primary-rgb), .35); background: var(--ea-surface); margin-bottom: .7rem; }
.order-tray.correct { border-style: solid; border-color: #22c55e; background: rgba(34, 197, 94, .08); }
.order-tray.wrong { border-style: solid; border-color: #f43f5e; }
.order-placeholder { color: var(--bs-secondary-color); font-size: .88rem; padding: 0 .4rem; }
.order-bank { display: flex; flex-wrap: wrap; gap: .45rem; min-height: 44px; }
.lesson-block .word-tile { padding: .45rem .85rem; border-radius: 12px; border: 0; font-weight: 700; font-size: 1rem; background: var(--ea-surface); color: var(--bs-emphasis-color);
  box-shadow: 0 3px 0 var(--ea-line), var(--ea-shadow-sm); transition: transform .1s ease; }
.lesson-block .word-tile:hover { transform: translateY(-2px); }
.lesson-block .order-tray .word-tile { background: var(--ea-primary); color: #fff; box-shadow: 0 3px 0 var(--ea-primary-strong); }
.match-board { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.match-col { display: flex; flex-direction: column; gap: .5rem; }
.match-item { padding: .65rem .85rem; border-radius: 14px; border: 2px solid var(--ea-line); background: var(--ea-surface); font-weight: 600; text-align: left; transition: transform .1s ease, border-color .15s ease, background .15s ease; }
.match-item:hover { transform: translateY(-1px); border-color: rgba(var(--ea-primary-rgb), .45); }
.match-item.selected { border-color: var(--ea-primary); box-shadow: 0 0 0 4px rgba(var(--ea-primary-rgb), .15); }
.match-item.pair-0 { border-color: #8b5cf6; background: rgba(139, 92, 246, .1); } .match-item.pair-1 { border-color: #0ea5e9; background: rgba(14, 165, 233, .1); }
.match-item.pair-2 { border-color: #f97316; background: rgba(249, 115, 22, .1); } .match-item.pair-3 { border-color: #ec4899; background: rgba(236, 72, 153, .1); }
.match-item.pair-4 { border-color: #14b8a6; background: rgba(20, 184, 166, .1); } .match-item.pair-5 { border-color: #eab308; background: rgba(234, 179, 8, .12); }
.match-item.correct { border-color: #22c55e !important; background: rgba(34, 197, 94, .14) !important; }
.match-item.wrong { border-color: #f43f5e !important; background: rgba(244, 63, 94, .1) !important; }
@media (max-width: 575.98px) { .match-board { gap: .5rem; } .match-item { font-size: .88rem; padding: .55rem .6rem; } }
.writing-pad textarea { border-radius: 16px; font-size: 1.05rem; line-height: 1.7; padding: 1rem; }
.writing-pad.reached [data-words] { color: #16a34a; font-weight: 800; }
.checklist { padding: .9rem 1rem; border-radius: 14px; background: var(--ea-muted-surface); }
.checklist .form-check { margin-bottom: .3rem; }
.model-answer summary { cursor: pointer; font-weight: 700; color: var(--ea-primary); }
.model-answer .rich { padding: 1rem; border-radius: 14px; background: rgba(var(--ea-primary-rgb), .06); }
.lesson-complete { text-align: center; padding: 2.5rem 1.5rem; border-radius: 26px; background: var(--ea-grad); color: #fff; box-shadow: var(--ea-shadow-lg); margin-bottom: 1.5rem; }
.lesson-complete h2 { font-weight: 800; margin: .5rem 0; }
.lesson-complete p { opacity: .9; }
.trophy { font-size: 4rem; animation: bounce-in .7s cubic-bezier(.34, 1.56, .64, 1); }
.lesson-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0 3rem; }
.lesson-nav-link { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.2rem; border-radius: 18px; background: var(--ea-surface); border: 1px solid var(--ea-line); text-decoration: none; color: var(--bs-body-color); transition: transform .15s ease, box-shadow .15s ease; }
.lesson-nav-link:hover { transform: translateY(-2px); box-shadow: var(--ea-shadow); color: var(--bs-body-color); }
.lesson-nav-link.next { justify-content: flex-end; text-align: right; grid-column: 2; }
.lesson-nav-link span { display: flex; flex-direction: column; font-weight: 700; min-width: 0; }
.lesson-nav-link small { font-weight: 600; color: var(--bs-secondary-color); font-size: .75rem; }
.lesson-nav-link i { font-size: 1.3rem; color: var(--ea-primary); }
@media (max-width: 575.98px) { .lesson-nav { grid-template-columns: 1fr; } .lesson-nav-link.next { grid-column: 1; } .lesson-hero { padding: 1.25rem; } .lesson-hero-emoji { width: 70px; height: 70px; font-size: 2.3rem; } }

/* ---- Celebration */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 3000; }
.confetti i { position: absolute; width: 9px; height: 14px; border-radius: 3px; animation: confetti 1.5s cubic-bezier(.2, .7, .3, 1) forwards; }

/* ---- Toasts */
#ea-toasts .toast { border-radius: 14px; box-shadow: var(--ea-shadow-lg); }

/* ---- Animations */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 0% { transform: scale(.98); } 50% { transform: scale(1.01); } 100% { transform: scale(1); } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes bounce-in { 0% { transform: scale(.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(225, 29, 72, .55); } 100% { box-shadow: 0 0 0 16px rgba(225, 29, 72, 0); } }
@keyframes blink { 50% { opacity: .2; } }
@keyframes wave { 0%, 100% { transform: rotate(0); } 20%, 60% { transform: rotate(16deg); } 40%, 80% { transform: rotate(-8deg); } }
@keyframes confetti { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), calc(var(--dy) + 420px)) rotate(var(--r)); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mock, .lesson-hero-emoji, .pi-ring { animation: none !important; } }

/* ---- Mobile */
@media (max-width: 991.98px) { .content { padding: 1.1rem; } .topbar { padding: .65rem 1rem; } .hero-stage { min-height: 380px; margin-top: 1rem; } }
@media (max-width: 575.98px) {
  .mock-chat { width: 240px; } .mock-card { width: 160px; } .mock-say { display: none; }
  .hero-panel-body { padding: 1.4rem; } .flash-grid { grid-template-columns: repeat(2, 1fr); } .flash-grid .flashcard { height: 190px; }
}
@media print { .step-rail, .lesson-nav, .chat-toolbar { display: none !important; } }

/* Heading colours are set explicitly so themes or older caches cannot tint them. */
.topbar-title, .block-title, .page-title, .section-title, .course-body h3, .unit-title, .lt-title { color: var(--bs-emphasis-color); }
.lesson-hero .lesson-title, .lesson-hero, .hero-panel .hero-title, .continue-hero, .cta-band h2, .lesson-complete h2 { color: #fff; }
.course-hero .lesson-title { color: var(--bs-emphasis-color); }

/* ---- World library */
.library-hero { --tone: #8b5cf6; display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; padding: 1.9rem; border-radius: 26px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(125deg, color-mix(in srgb, var(--tone) 85%, #000) 0%, var(--tone) 45%, color-mix(in srgb, var(--tone) 55%, #ec4899) 100%); box-shadow: var(--ea-shadow-lg); }
.library-hero::after { content: "🌍"; position: absolute; right: 2%; bottom: -40px; font-size: 180px; opacity: .12; pointer-events: none; }
.library-hero.kids { background: linear-gradient(125deg, #ff7eb3 0%, #ffb547 50%, #4fd1c5 100%); }
.library-hero.kids::after { content: "🎈"; }
.library-hero > * { position: relative; z-index: 1; }
.library-search { display: flex; align-items: center; gap: .5rem; max-width: 620px; margin-top: 1rem; padding: .35rem .35rem .35rem 1rem; border-radius: 16px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); }
.library-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: #fff; outline: none; font-weight: 600; }
.library-search input::placeholder { color: rgba(255,255,255,.75); }
.skill-switch { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .3rem; scrollbar-width: thin; }
.skill-pill { --tone: #5b4cf0; display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .95rem; border-radius: 14px; white-space: nowrap; font-weight: 700; font-size: .9rem;
  background: var(--ea-surface); border: 1px solid var(--ea-line); color: var(--bs-body-color); text-decoration: none; transition: transform .12s ease, border-color .12s ease; }
.skill-pill i { color: var(--tone); }
.skill-pill:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--tone) 50%, transparent); color: var(--bs-body-color); }
.skill-pill.active { background: var(--tone); border-color: var(--tone); color: #fff; box-shadow: 0 8px 18px -10px var(--tone); }
.skill-pill.active i { color: #fff; }
.skill-pill.kids { --tone: #ec4899; }
.sp-count { font-size: .7rem; padding: .05rem .45rem; border-radius: 99px; background: var(--ea-muted-surface); color: var(--bs-secondary-color); }
.skill-pill.active .sp-count { background: rgba(255,255,255,.25); color: #fff; }
.filter-bar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.filter-bar .form-select { width: auto; }
.level-tabs { display: inline-flex; flex-wrap: wrap; gap: .25rem; padding: .3rem; border-radius: 14px; background: var(--ea-muted-surface); }
.lvl-tab { padding: .35rem .75rem; border-radius: 10px; font-size: .84rem; font-weight: 700; color: var(--bs-secondary-color); text-decoration: none; }
.lvl-tab:hover { color: var(--bs-emphasis-color); }
.lvl-tab.active { background: var(--ea-surface); color: var(--ea-primary); box-shadow: var(--ea-shadow-sm); }
.own-link { display: flex; align-items: center; gap: .9rem; padding: .9rem 1.1rem; border-radius: 16px; text-decoration: none; color: var(--bs-body-color);
  background: rgba(var(--ea-primary-rgb), .07); border: 1px dashed rgba(var(--ea-primary-rgb), .35); }
.own-link:hover { background: rgba(var(--ea-primary-rgb), .12); color: var(--bs-body-color); }
.ol-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--ea-primary); color: #fff; flex-shrink: 0; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1rem; }
.res-grid.compact { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.res-card { --tone: #5b4cf0; display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--ea-surface); border: 1px solid var(--ea-line);
  box-shadow: var(--ea-shadow-sm); transition: transform .16s ease, box-shadow .16s ease; position: relative; }
.res-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--tone); opacity: .85; z-index: 2; }
.res-card:hover { transform: translateY(-3px); box-shadow: var(--ea-shadow); }
.res-card.is-done { background: color-mix(in srgb, #22c55e 6%, var(--ea-surface)); }
.res-card.is-done .res-title::after { content: " ✓"; color: #16a34a; }
.res-media { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #1b1747, #3b1d6e); display: grid; place-items: center; overflow: hidden; }
.res-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.res-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.res-play { position: relative; z-index: 1; width: 62px; height: 62px; border-radius: 50%; border: 0; background: #ff0033; color: #fff; font-size: 1.8rem; display: grid; place-items: center;
  box-shadow: 0 10px 26px rgba(0,0,0,.35); transition: transform .15s ease; }
.res-play:hover { transform: scale(1.08); }
.res-media-note { position: absolute; left: .6rem; bottom: .5rem; font-size: .7rem; font-weight: 700; color: #fff; background: rgba(0,0,0,.45); padding: .15rem .5rem; border-radius: 99px; }
.res-media.playing .res-media-note { display: none; }
.res-body { padding: 1rem 1.05rem 1.05rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.res-top { display: flex; align-items: center; gap: .5rem; }
.res-provider { --pc: #5b4cf0; min-width: 32px; height: 32px; padding: 0 .35rem; border-radius: 9px; display: inline-grid; place-items: center; font-size: .68rem; font-weight: 800;
  letter-spacing: .02em; color: #fff; background: var(--pc); flex-shrink: 0; }
.res-provider-name { font-size: .78rem; font-weight: 700; color: var(--bs-secondary-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-title { font-size: 1rem; font-weight: 800; line-height: 1.3; margin: 0; color: var(--bs-emphasis-color); }
.res-desc { font-size: .86rem; color: var(--bs-secondary-color); margin: 0; flex: 1; }
.res-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.res-tag { font-size: .72rem; font-weight: 700; padding: .18rem .55rem; border-radius: 99px; background: var(--ea-muted-surface); color: var(--bs-secondary-color); }
.res-tag.lvl { background: color-mix(in srgb, var(--tone) 14%, transparent); color: var(--tone); }
.res-tag.kids { background: rgba(236, 72, 153, .12); color: #db2777; }
.res-actions { display: flex; align-items: center; gap: .4rem; margin-top: auto; padding-top: .35rem; }
.res-actions .btn-primary { flex: 1; }
.btn-icon-soft { width: 34px; height: 34px; padding: 0; display: inline-grid; place-items: center; border-radius: 10px; background: var(--ea-muted-surface); color: var(--bs-secondary-color); border: 0; }
.btn-icon-soft:hover { color: var(--ea-primary); }
.btn-icon-soft.on { background: rgba(var(--ea-primary-rgb), .14); color: var(--ea-primary); }
.btn-icon-soft.on.done { background: rgba(34, 197, 94, .16); color: #16a34a; }
.res-card.compact .res-media { display: none; }
.res-strip { padding: 1.25rem; border-radius: 22px; background: linear-gradient(120deg, rgba(var(--ea-primary-rgb), .06), rgba(20, 184, 166, .06)); border: 1px solid var(--ea-line); }
.res-strip-head { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.rs-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 1.2rem; color: #fff; background: var(--ea-grad-cool); }
.pill-count.muted { background: var(--ea-muted-surface); color: var(--bs-secondary-color); }

/* Tones repeated last so they override each component's default colour (same specificity, later rule wins). */
.tone-indigo, .type-reading, .focus-reading { --tone: #5b4cf0; }
.tone-violet, .type-vocabulary, .focus-vocabulary, .tone-words { --tone: #8b5cf6; }
.tone-pink, .type-alphabet, .focus-alphabet { --tone: #ec4899; }
.tone-coral, .type-speaking, .focus-speaking, .tone-talk { --tone: #f43f5e; }
.tone-orange, .type-pronunciation, .focus-pronunciation, .tone-speak { --tone: #f97316; }
.tone-amber, .type-writing, .focus-writing, .tone-write, .tone-quiz, .tone-tip { --tone: #f59e0b; }
.tone-gold { --tone: #d4a017; }
.tone-green, .type-review { --tone: #22c55e; }
.tone-teal, .type-grammar, .focus-grammar, .tone-practice { --tone: #14b8a6; }
.tone-sky, .type-listening, .focus-listening, .tone-listen { --tone: #0ea5e9; }
.tone-slate, .focus-general, .tone-learn, .tone-read { --tone: #5b4cf0; }
.tone-intro, .type-phonics, .focus-phonics { --tone: #a855f7; }

.library-hero, .library-hero .hero-title, .library-hero .hero-text { color: #fff; }
.library-hero .hero-title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
