/* ── THEME & SEN SVG ICONS ── */
.theme-icon-svg {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px; transition: transform .2s;
}
.theme-btn:hover .theme-icon-svg { transform: scale(1.1); }
.theme-btn.active .theme-icon-svg { transform: scale(1.05); }
.theme-icon-svg svg { display: block; }

.sen-badge-svg {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 6px;
}
.sen-badge-svg svg { display: block; }

/* Onboarding large icons */
.ob-icon {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; opacity: .9;
}
.ob-icon svg { display: block; }

/* Role button SVG */
.role-svg {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.role-svg svg { display: block; }

/* Theme pill SVG */
.tp-svg {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 3px; opacity: .85;
}
.tp-svg svg { display: block; }
.theme-pill.active .tp-svg { opacity: 1; }

/* Streak SVG flame */
.streak-fire-svg {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.streak-fire-svg svg { display: block; }


/* ═══════════════════════════════════════════════
   SVG NAV ICONS
═══════════════════════════════════════════════ */
.nav-icon {
  display: flex; align-items: center; justify-content: center;
  width: 20px; flex-shrink: 0;
}
.nav-icon svg { display: block; }
.nav-item .nav-icon svg,
.mm-item .nav-icon svg {
  stroke: currentColor;
  transition: stroke .18s;
}
/* inline SVGs used directly (TTS bar, quiz titles) */
.tts-label svg,
.quiz-title svg {
  display: inline-block; vertical-align: middle;
  margin-right: 6px; opacity: .7;
  position: relative; top: -1px;
}
.notes-btn svg {
  display: inline-block; vertical-align: middle;
  position: relative; top: -1px;
}

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

/* ═══════════════════════════════════════════════
   THEME 1 — SPACE (sci-fi dark, default)
═══════════════════════════════════════════════ */
:root, [data-theme="space"] {
  --bg:        #080810;
  --surface:   #111118;
  --surface2:  #18181f;
  --surface3:  #202028;
  --border:    #28283a;
  --border2:   #35354a;
  --text:      #eeeef8;
  --muted:     #6868a0;
  --muted2:    #9090c0;
  --accent:    #7c5cfc;
  --accent2:   #fc5c7d;
  --green:     #4ade80;
  --yellow:    #fbbf24;
  --orange:    #F5A623;
  --blue:      #4A90E2;
  --r:         16px;
  --head:      'Syne', sans-serif;
  --body:      'DM Sans', sans-serif;
  --orb1:      #7c5cfc;
  --orb2:      #fc5c7d;
}

/* ═══════════════════════════════════════════════
   THEME 2 — MINIMAL (Claude-style warm dark)
═══════════════════════════════════════════════ */
[data-theme="eclipse"] {
  --bg:        #141414;
  --surface:   #1d1d1d;
  --surface2:  #242424;
  --surface3:  #2c2c2c;
  --border:    #363636;
  --border2:   #454545;
  --text:      #f0ede8;
  --muted:     #686868;
  --muted2:    #9a9a9a;
  --accent:    #6b9ff8;
  --accent2:   #e8956d;
  --green:     #5cb85c;
  --yellow:    #f0ad4e;
  --orange:    #e8956d;
  --blue:      #6b9ff8;
  --orb1:      #6b9ff8;
  --orb2:      #e8956d;
}

/* ═══════════════════════════════════════════════
   THEME 3 — ZARA (high-end light luxury)
═══════════════════════════════════════════════ */
[data-theme="luxe"] {
  --bg:        #f7f5f2;
  --surface:   #ffffff;
  --surface2:  #f0ece6;
  --surface3:  #e8e3dc;
  --border:    #ddd9d2;
  --border2:   #ccc8c0;
  --text:      #1a1a1a;
  --muted:     #a0a0a0;
  --muted2:    #666666;
  --accent:    #1a1a1a;
  --accent2:   #b8922a;
  --green:     #2d7a4f;
  --yellow:    #b8922a;
  --orange:    #b8922a;
  --blue:      #2c5f8a;
  --r:         12px;
  --orb1:      #b8922a;
  --orb2:      #ddd9d2;
}

/* ─────────────────────────────────────────────
   BASE RESET + BODY
───────────────────────────────────────────── */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--body, 'DM Sans', sans-serif);
  min-height: 100vh; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .35s ease, color .35s ease;
}

/* ── ORBS ── */
.orb { position: fixed; border-radius: 50%; filter: blur(140px); pointer-events: none; z-index: 0; transition: background .5s; }
.orb1 { width: 700px; height: 700px; background: var(--orb1); top: -300px; left: -200px; opacity: .09; }
.orb2 { width: 500px; height: 500px; background: var(--orb2); bottom: -200px; right: -100px; opacity: .07; }
[data-theme="luxe"] .orb1, [data-theme="luxe"] .orb2 { opacity: .03; }
[data-theme="eclipse"] .orb1 { opacity: .07; }

/* ── TOAST ── */
#toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 14px; padding: 12px 22px;
  font-size: .88rem; color: var(--text); z-index: 9999;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none; white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
#toast.show { transform: translateX(-50%) translateY(0); }

/* ═══════════════════════════════════════════════
   THEME SWITCHER — in sidebar
═══════════════════════════════════════════════ */
.theme-switcher {
  display: flex; gap: 4px; padding: 5px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; margin: 0 4px 14px;
}
.theme-pill {
  flex: 1; padding: 8px 4px; border: none; border-radius: 8px;
  cursor: pointer; font-size: .6rem; font-weight: 700;
  font-family: var(--body, 'DM Sans', sans-serif);
  text-transform: uppercase; letter-spacing: .5px;
  background: transparent; color: var(--muted2);
  transition: all .2s; display: flex; flex-direction: column;
  align-items: center; gap: 3px; line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.theme-pill:hover { background: var(--surface3); color: var(--text); }
.theme-pill.active { background: var(--accent); color: #fff; }
[data-theme="luxe"] .theme-pill.active { color: #f7f5f2; }
.tp-icon { font-size: .95rem; }

/* ═══════════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════════ */
.app { display: flex; min-height: 100vh; }

/* ── SIDEBAR ── */
.sidebar {
  width: 235px; min-height: 100vh;
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 20px 12px; position: fixed; left: 0; top: 0; z-index: 100;
  display: flex; flex-direction: column; gap: 2px;
  transition: transform .3s ease, background .35s, border-color .35s;
  overflow-y: auto; overflow-x: hidden;
}
.sidebar-logo {
  font-family: var(--head, 'Syne', sans-serif); font-size: 1.5rem; font-weight: 800;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 60%, var(--accent2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 6px; padding: 4px 10px; display: block;
}
[data-theme="luxe"] .sidebar-logo { background: none; -webkit-text-fill-color: var(--text); letter-spacing: -1px; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  color: var(--muted2); font-size: .875rem; font-weight: 500;
  transition: all .18s; border: none; background: none;
  width: 100%; text-align: left; font-family: var(--body, 'DM Sans', sans-serif);
  -webkit-tap-highlight-color: transparent;
}
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active { background: rgba(124,92,252,.12); color: var(--accent); font-weight: 600; }
[data-theme="luxe"] .nav-item.active { background: rgba(26,26,26,.07); }
[data-theme="eclipse"] .nav-item.active { background: rgba(107,159,248,.1); }
.nav-item .icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }

.nav-section {
  font-size: .6rem; color: var(--muted); text-transform: uppercase;
  letter-spacing: 2px; padding: 12px 12px 4px;
  font-family: var(--body, 'DM Sans', sans-serif);
}
.sidebar-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); flex-shrink: 0; }

/* ── MAIN CONTENT ── */
.main { margin-left: 235px; flex: 1; padding: 32px 36px; position: relative; z-index: 1; }

/* ── MOBILE HEADER ── */
.mobile-header {
  display: none; background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 14px 18px; position: sticky; top: 0; z-index: 200;
  align-items: center; justify-content: space-between;
  transition: background .35s; gap: 12px;
}
.mobile-logo {
  font-family: var(--head, 'Syne', sans-serif); font-size: 1.2rem; font-weight: 800;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
[data-theme="luxe"] .mobile-logo { background: none; -webkit-text-fill-color: var(--text); }
.hamburger { background: none; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; padding: 4px; flex-shrink: 0; }

/* Sidebar overlay */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 99; backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* ═══════════════════════════════════════════════
   BREAKPOINTS
═══════════════════════════════════════════════ */

/* ── Mobile/tablet: hide sidebar, show top bar ── */
@media(max-width: 1100px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 20px; }
  .mobile-header { display: flex; }
  .grid3 { grid-template-columns: 1fr 1fr; }
}

/* Mobile */
@media(max-width: 768px) {
  .main { padding: 16px; }
  .grid3 { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
}

/* Small phone */
@media(max-width: 480px) {
  .main { padding: 12px; }
  .card { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .tts-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .tts-label { width: 100%; }
  .lesson-header { flex-direction: column; align-items: flex-start; }
  .flashcard { height: 155px; }
  .stat-val { font-size: 1.7rem; }
  .btn-primary { margin-top: 14px; padding: 13px; }
  .theme-grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
  .sen-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .onboard-card { padding: 22px 16px; }
  .onboard-title { font-size: 1.4rem; }
}


/* ═══════════════════════════════════════════════
   FULLSCREEN MOBILE MENU
═══════════════════════════════════════════════ */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 250;
  background: var(--bg);
  overflow-y: auto;
  animation: menuSlideDown .25s cubic-bezier(.4,0,.2,1);
}
.mobile-menu.open { display: block; }

@keyframes menuSlideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mobile-menu-inner {
  padding: 80px 24px 40px; /* top pad so content clears the header bar */
  max-width: 480px;
  margin: 0 auto;
}

.mm-logo {
  font-family: var(--head, 'Syne', sans-serif);
  font-size: 1.8rem; font-weight: 800;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 60%, var(--accent2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 20px;
}
[data-theme="luxe"] .mm-logo { background: none; -webkit-text-fill-color: var(--text); }

.mm-section {
  font-size: .62rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 2px;
  padding: 18px 4px 6px;
  font-family: var(--body, 'DM Sans', sans-serif);
}

.mm-item {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 14px 12px;
  border: none; background: none;
  color: var(--text); font-family: var(--body, 'DM Sans', sans-serif);
  font-size: 1.05rem; font-weight: 500;
  border-radius: 12px; cursor: pointer;
  text-align: left; transition: background .15s;
  -webkit-tap-highlight-color: transparent;
  border-bottom: 1px solid var(--border);
}
.mm-item:last-of-type { border-bottom: none; }
.mm-item:hover, .mm-item:active { background: var(--surface2); }
.mm-item .icon { font-size: 1.2rem; width: 24px; text-align: center; flex-shrink: 0; }
.mm-item.active-page { color: var(--accent); font-weight: 600; }

/* mobile header sits on top */
.mobile-header { position: fixed; top: 0; left: 0; right: 0; z-index: 300; }

/* push main content below fixed header */
@media(max-width: 1100px) {
  body { padding-top: 56px; }
  .mobile-header { height: 56px; }
}

/* ─────────────────────────────────────────────
   PAGES
───────────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; animation: pageIn .22s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.page-header { margin-bottom: 28px; }
.page-title { font-family: var(--head, 'Syne', sans-serif); font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 800; line-height: 1.1; }
.page-sub { color: var(--muted2); font-size: .9rem; margin-top: 6px; line-height: 1.5; }

/* ── CARDS ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 24px; margin-bottom: 20px; transition: background .35s, border-color .35s; }
.card-sm { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
[data-theme="luxe"] .card { box-shadow: 0 2px 16px rgba(0,0,0,.05); }

/* ── GRIDS ── */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ── STAT CARDS ── */
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; transition: background .35s, border-color .35s; }
[data-theme="luxe"] .stat-card { box-shadow: 0 2px 12px rgba(0,0,0,.04); }
.stat-label { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.stat-val { font-family: var(--head, 'Syne', sans-serif); font-size: 2rem; font-weight: 800; }
.stat-sub { font-size: .8rem; color: var(--muted2); margin-top: 4px; }

/* ── STEP LABEL ── */
.step-label {
  font-family: var(--head, 'Syne', sans-serif); font-size: .63rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 2.5px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.step-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── THEME GRID ── */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin-bottom: 12px; }
.theme-btn {
  background: var(--surface2); border: 2px solid var(--border); border-radius: 12px;
  padding: 14px 8px; cursor: pointer; text-align: center; transition: all .2s;
  color: var(--text); font-family: var(--body, 'DM Sans', sans-serif);
  -webkit-tap-highlight-color: transparent;
}
.theme-btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.theme-btn.active { border-color: var(--accent); background: rgba(124,92,252,.1); }
[data-theme="luxe"] .theme-btn.active { background: rgba(26,26,26,.06); }
.theme-icon { font-size: 1.6rem; display: block; margin-bottom: 5px; }
.theme-name { font-family: var(--head, 'Syne', sans-serif); font-size: .7rem; font-weight: 700; }

/* ── SEN BUTTONS ── */
.sen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.sen-btn {
  background: var(--surface2); border: 2px solid var(--border); border-radius: 12px;
  padding: 14px; cursor: pointer; text-align: center; transition: all .2s;
  color: var(--text); font-family: var(--body, 'DM Sans', sans-serif);
  -webkit-tap-highlight-color: transparent;
}
.sen-btn:hover { border-color: var(--accent); }
.sen-btn.active-sen { border-color: var(--accent); background: rgba(124,92,252,.1); }
[data-theme="luxe"] .sen-btn.active-sen { background: rgba(26,26,26,.05); }
.sen-badge { font-size: 1.35rem; display: block; margin-bottom: 4px; }
.sen-name { font-family: var(--head, 'Syne', sans-serif); font-size: .73rem; font-weight: 700; display: block; }
.sen-desc { font-size: .67rem; color: var(--muted2); margin-top: 2px; display: block; line-height: 1.4; }

/* ── FORM ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .7rem; color: var(--muted2); font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }
input, select, textarea {
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: 10px; color: var(--text); font-family: var(--body, 'DM Sans', sans-serif);
  font-size: .92rem; padding: 10px 14px; width: 100%;
  transition: border-color .2s; outline: none;
  -webkit-appearance: none; appearance: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--muted); }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
select option { background: var(--surface); color: var(--text); }
textarea { resize: vertical; min-height: 80px; }

/* ── CUSTOM THEME ROW ── */
.custom-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface2); border: 2px solid var(--border);
  border-radius: 12px; padding: 10px 14px; margin-top: 4px; transition: border-color .2s;
}
.custom-row:focus-within { border-color: var(--accent); }
.custom-row span { font-size: .82rem; color: var(--muted); white-space: nowrap; }

/* ── BUTTONS ── */
.btn-primary {
  width: 100%; padding: 14px 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none; border-radius: 12px; color: #fff;
  font-family: var(--head, 'Syne', sans-serif); font-size: .95rem; font-weight: 700;
  cursor: pointer; transition: opacity .2s, transform .15s; margin-top: 18px;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn-primary:hover:not(:disabled) { opacity: .9; transform: translateY(-1px); }
.btn-primary:active:not(:disabled) { transform: translateY(1px); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }
[data-theme="luxe"] .btn-primary { background: var(--text); color: var(--bg); }

.btn-secondary {
  padding: 10px 18px; background: var(--surface2); border: 1.5px solid var(--border2);
  border-radius: 10px; color: var(--muted2); font-family: var(--body, 'DM Sans', sans-serif);
  font-size: .88rem; cursor: pointer; transition: all .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--text); }

/* ── ERROR ── */
.error-box {
  background: rgba(252,92,125,.07); border: 1px solid rgba(252,92,125,.25);
  border-radius: 10px; padding: 12px 16px; color: var(--accent2);
  font-size: .86rem; margin-top: 12px; display: none; line-height: 1.5;
}

/* ── LOADING ── */
.loading { text-align: center; padding: 60px 20px; display: none; }
.spinner { width: 44px; height: 44px; border: 3px solid var(--border2); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading p { color: var(--muted2); }
.loading-theme { color: var(--accent); font-family: var(--head, 'Syne', sans-serif); font-size: 1rem; margin-top: 6px; }

/* ── LESSON OUTPUT ── */
.lesson-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.lesson-title {
  font-family: var(--head, 'Syne', sans-serif); font-size: clamp(1.2rem, 3vw, 1.75rem); font-weight: 800;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1.2;
}
[data-theme="luxe"] .lesson-title { background: none; -webkit-text-fill-color: var(--text); }
.lesson-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

.badge { background: rgba(124,92,252,.1); border: 1px solid rgba(124,92,252,.22); border-radius: 20px; padding: 3px 10px; font-size: .71rem; color: var(--accent); font-weight: 600; white-space: nowrap; }
.badge-sen-dyslexia { background: rgba(74,144,226,.1); border-color: rgba(74,144,226,.25); color: var(--blue); }
.badge-sen-adhd { background: rgba(245,166,35,.1); border-color: rgba(245,166,35,.25); color: var(--orange); }
.badge-sen-autism { background: rgba(80,200,120,.1); border-color: rgba(80,200,120,.25); color: #50C878; }
.badge-sen-dyspraxia { background: rgba(255,107,107,.1); border-color: rgba(255,107,107,.25); color: #FF6B6B; }
.badge-green { background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.22); color: var(--green); }
[data-theme="luxe"] .badge { background: var(--surface2); border-color: var(--border); color: var(--muted2); }

/* ── TTS BAR ── */
.tts-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 16px; margin-bottom: 12px;
}
.tts-label { font-size: .82rem; color: var(--muted2); flex: 1; min-width: 80px; }
.tts-speed, .tts-speed-select {
  background: var(--surface3); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: .78rem;
  padding: 5px 8px; font-family: var(--body, 'DM Sans', sans-serif);
  -webkit-appearance: none; appearance: none; cursor: pointer;
}
.tts-play {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none; border-radius: 50%; width: 40px; height: 40px; min-width: 40px;
  color: #fff; font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .2s; -webkit-tap-highlight-color: transparent;
}
.tts-play svg { display: block; flex-shrink: 0; }
.tts-play:hover:not(:disabled) { opacity: .85; }
.tts-play:disabled { opacity: .6; cursor: not-allowed; }
.tts-play:disabled svg { animation: spin 1s linear infinite; }
[data-theme="luxe"] .tts-play { background: var(--text); }

/* ── PODCAST BAR ── */
.podcast-bar {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface2)), var(--surface2));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  border-radius: 12px; padding: 14px 16px; margin-bottom: 20px;
}
.podcast-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.podcast-info {
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; color: var(--muted2); flex: 1;
}
.podcast-info svg { color: var(--accent); flex-shrink: 0; }
.podcast-info strong { color: var(--text); }
.podcast-meta { color: var(--muted2); font-size: .78rem; }
.podcast-controls { display: flex; align-items: center; gap: 8px; }
.podcast-btn {
  display: flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none; border-radius: 20px; padding: 8px 16px;
  color: #fff; font-size: .82rem; font-weight: 600; cursor: pointer;
  transition: opacity .2s; white-space: nowrap;
}
.podcast-btn:hover { opacity: .88; }
.podcast-stop {
  display: flex; align-items: center; justify-content: center;
  background: var(--surface3); border: 1px solid var(--border);
  border-radius: 50%; width: 32px; height: 32px; cursor: pointer; color: var(--muted2);
  transition: color .15s;
}
.podcast-stop:hover { color: var(--text); }
.podcast-progress-wrap { margin-top: 12px; }
.podcast-progress-bar {
  width: 100%; height: 4px; background: var(--surface3);
  border-radius: 99px; overflow: hidden; margin-bottom: 6px;
}
.podcast-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px; transition: width .4s ease;
}
.podcast-chunk-label {
  font-size: .72rem; color: var(--muted2); letter-spacing: .02em;
}
[data-theme="luxe"] .podcast-btn { background: var(--text); color: var(--bg); }

/* ── LESSON BODY ── */
.lesson-body { color: var(--muted2); line-height: 1.85; font-size: .95rem; }
.lesson-body h2 { font-family: var(--head, 'Syne', sans-serif); font-size: 1.05rem; color: var(--text); margin: 24px 0 8px; }
.lesson-body h3 { font-family: var(--head, 'Syne', sans-serif); font-size: .88rem; color: var(--accent); margin: 18px 0 6px; text-transform: uppercase; letter-spacing: 1px; }
.lesson-body p { margin-bottom: 12px; }
.lesson-body ul, .lesson-body ol { padding-left: 22px; margin-bottom: 14px; }
.lesson-body li { margin-bottom: 7px; }
.lesson-body strong { color: var(--text); font-weight: 600; }

/* ── KEY POINTS ── */
.key-points { margin-top: 24px; }
.kp-title { font-family: var(--head, 'Syne', sans-serif); font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 10px; }
.kp-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.kp-item:last-child { border-bottom: none; }
.kp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: 7px; }
.kp-text { font-size: .88rem; color: var(--muted2); line-height: 1.55; }

/* ── NOTES BTN ── */
.notes-btn {
  background: var(--surface2); border: 1.5px solid var(--border2); border-radius: 10px;
  color: var(--muted2); font-family: var(--body, 'DM Sans', sans-serif); font-size: .84rem;
  padding: 8px 14px; cursor: pointer; transition: all .2s;
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.notes-btn:hover { border-color: var(--accent); color: var(--text); }

/* ── FLASHCARDS ── */
.flashcard-container { perspective: 1200px; margin-bottom: 16px; }
.flashcard { width: 100%; height: 200px; cursor: pointer; position: relative; user-select: none; }
.flashcard-inner { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.4,0,.2,1); }
.flashcard-inner.flipped { transform: rotateY(180deg); }
.flashcard-front, .flashcard-back {
  position: absolute; inset: 0; background: var(--surface2); border: 2px solid var(--border2);
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  padding: 24px; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  font-size: 1rem; text-align: center; color: var(--text); font-weight: 600; line-height: 1.5;
}
.flashcard-back { background: rgba(124,92,252,.07); border-color: var(--accent); color: var(--muted2); font-weight: 400; transform: rotateY(180deg); }
[data-theme="luxe"] .flashcard-back { background: var(--surface2); border-color: var(--accent2); }
.flashcard-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
@media(max-width: 480px) { .flashcard { height: 155px; } }

/* ── QUIZ ── */
.quiz-section { margin-top: 0; }
.quiz-title { font-family: var(--head, 'Syne', sans-serif); font-size: 1rem; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.q-block { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.q-text { font-weight: 600; color: var(--text); margin-bottom: 12px; font-size: .92rem; line-height: 1.5; }
.q-options { display: flex; flex-direction: column; gap: 8px; }
.q-opt {
  background: var(--surface3); border: 1.5px solid var(--border); border-radius: 8px;
  color: var(--muted2); font-family: var(--body, 'DM Sans', sans-serif); font-size: .88rem;
  padding: 10px 14px; text-align: left; cursor: pointer; transition: all .18s;
  line-height: 1.4; -webkit-tap-highlight-color: transparent;
}
.q-opt:hover:not(:disabled) { border-color: var(--accent); color: var(--text); background: var(--surface2); }
.q-opt.correct { background: rgba(74,222,128,.1); border-color: var(--green); color: var(--green); }
.q-opt.wrong { background: rgba(252,92,125,.08); border-color: var(--accent2); color: var(--accent2); }
.q-opt:disabled { cursor: default; }
.q-explain { margin-top: 10px; padding: 10px 14px; background: rgba(124,92,252,.06); border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0; font-size: .82rem; color: var(--muted2); display: none; line-height: 1.6; }
.score-bar { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; margin-top: 16px; display: none; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.score-label { font-family: var(--head, 'Syne', sans-serif); font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.score-val { font-family: var(--head, 'Syne', sans-serif); font-size: 1.6rem; font-weight: 800; color: var(--accent); }

/* ── STREAK PAGE ── */
.streak-display { text-align: center; padding: 28px 0; }
.streak-fire { font-size: 3.5rem; display: block; margin-bottom: 8px; }
.streak-number { font-family: var(--head, 'Syne', sans-serif); font-size: 3.5rem; font-weight: 800; background: linear-gradient(135deg, var(--yellow), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.streak-label { color: var(--muted2); font-size: .9rem; margin-top: 4px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 20px; }
.cal-day { aspect-ratio: 1; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 600; background: var(--surface2); color: var(--muted); }
.cal-day.done { background: rgba(124,92,252,.18); color: var(--accent); }
.cal-day.today { border: 2px solid var(--accent); }

/* ── PROGRESS PAGE ── */
.progress-bar-wrap { background: var(--surface2); border-radius: 999px; height: 8px; margin-top: 8px; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .6s ease; }

/* ── LEADERBOARD ── */
.lb-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.lb-row:last-child { border-bottom: none; }
.lb-rank { font-family: var(--head, 'Syne', sans-serif); font-size: 1rem; font-weight: 800; width: 28px; color: var(--muted); flex-shrink: 0; }
.lb-rank.gold { color: #FFD700; }
.lb-rank.silver { color: #C0C0C0; }
.lb-rank.bronze { color: #CD7F32; }
.lb-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent2)); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; color: #fff; flex-shrink: 0; }
.lb-name { flex: 1; font-weight: 600; font-size: .9rem; }
.lb-score { font-family: var(--head, 'Syne', sans-serif); color: var(--accent); font-weight: 700; }

/* ── NOTES PAGE ── */
.note-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.note-topic { font-family: var(--head, 'Syne', sans-serif); font-size: .9rem; font-weight: 700; }
.note-theme { font-size: .75rem; color: var(--accent); margin-top: 2px; }
.note-content { font-size: .84rem; color: var(--muted2); margin-top: 8px; line-height: 1.6; }
.note-date { font-size: .7rem; color: var(--muted); margin-top: 8px; }
.note-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ── TEACHER PAGE ── */
.class-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-bottom: 12px; cursor: pointer; transition: border-color .2s; }
.class-card:hover { border-color: var(--accent); }
.class-name { font-family: var(--head, 'Syne', sans-serif); font-size: 1rem; font-weight: 700; }
.class-meta { font-size: .8rem; color: var(--muted2); margin-top: 4px; }
.student-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.student-row:last-child { border-bottom: none; }
.student-name { flex: 1; font-size: .9rem; min-width: 100px; }
.student-progress { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.dot-done { width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.dot-todo { width: 10px; height: 10px; border-radius: 50%; background: var(--border2); flex-shrink: 0; }

/* ── ONBOARDING ── */
#onboarding { position: fixed; inset: 0; background: var(--bg); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; overflow-y: auto; transition: background .35s; }
.onboard-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 36px; max-width: 520px; width: 100%; text-align: center; }
.onboard-step { display: none; }
.onboard-step.active { display: block; }
.onboard-title { font-family: var(--head, 'Syne', sans-serif); font-size: 1.8rem; font-weight: 800; margin-bottom: 10px; line-height: 1.15; }
.onboard-sub { color: var(--muted2); font-size: .9rem; margin-bottom: 28px; line-height: 1.6; }
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.role-btn { background: var(--surface2); border: 2px solid var(--border); border-radius: 14px; padding: 20px 12px; cursor: pointer; transition: all .2s; color: var(--text); font-family: var(--body, 'DM Sans', sans-serif); -webkit-tap-highlight-color: transparent; }
.role-btn:hover, .role-btn.active { border-color: var(--accent); background: rgba(124,92,252,.08); }
[data-theme="luxe"] .role-btn:hover, [data-theme="luxe"] .role-btn.active { background: rgba(26,26,26,.05); }
.role-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.role-name { font-family: var(--head, 'Syne', sans-serif); font-size: .85rem; font-weight: 700; display: block; }

/* ═══════════════════════════════════════════════════════════
   POLISHED SEN ACCESSIBILITY LAYER
   ═══════════════════════════════════════════════════════════ */

/* ── OPENDYSLEXIC FONT ── */
@font-face {
  font-family: 'OpenDyslexic';
  src: url('https://cdn.jsdelivr.net/npm/opendyslexic@0.91.12/fonts/OpenDyslexic-Regular.otf') format('opentype');
  font-weight: normal;
}
@font-face {
  font-family: 'OpenDyslexic';
  src: url('https://cdn.jsdelivr.net/npm/opendyslexic@0.91.12/fonts/OpenDyslexic-Bold.otf') format('opentype');
  font-weight: bold;
}
body.dyslexic-font #lessonBody,
body.dyslexic-font #lessonBody * {
  font-family: 'OpenDyslexic', sans-serif !important;
  font-size: 1.05rem !important;
}

/* ── COLOURED OVERLAY ── */
.colour-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 5;
  opacity: 0; transition: opacity .3s;
}
.colour-overlay.active { opacity: .13; }

/* ── TEXT SPACING ── */
body.spacing-wide #lessonBody {
  letter-spacing: .06em;
  word-spacing: .18em;
  line-height: 2.1;
}

/* ── CHUNK READING MODE ── */
.lesson-chunk { margin-bottom: 1.4rem; transition: opacity .3s; }
.lesson-chunk.chunk-dimmed { opacity: .22; }
.lesson-chunk.chunk-active { opacity: 1; }
.chunk-nav {
  margin: 20px 0 4px; padding-top: 16px;
  border-top: 1px solid var(--border);
}
.chunk-nav-hint {
  font-size: .75rem; color: var(--muted2); margin-bottom: 12px;
  padding: 8px 12px; background: var(--surface2);
  border-radius: 8px; border-left: 3px solid var(--accent);
  line-height: 1.5;
}
.chunk-nav-controls {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.chunk-nav-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface3); border: 1.5px solid var(--border);
  border-radius: 20px; padding: 9px 18px; color: var(--text);
  font-size: .85rem; font-weight: 600; cursor: pointer;
  transition: all .15s;
}
.chunk-nav-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.chunk-nav-btn:disabled { opacity: .3; cursor: not-allowed; }
.chunk-nav-next {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent; color: #fff;
}
.chunk-nav-next:hover:not(:disabled) { opacity: .88; color: #fff; border-color: transparent; }
.chunk-progress-pill {
  flex: 1; text-align: center;
  font-size: .78rem; color: var(--muted2);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 99px; padding: 6px 14px;
}

/* ── READING RULER ── */
.reading-ruler {
  position: fixed; left: 0; right: 0; height: 38px;
  background: rgba(255,220,50,.15); pointer-events: none;
  z-index: 999; transition: top .06s linear;
  border-top: 2px solid rgba(255,220,50,.4);
  border-bottom: 2px solid rgba(255,220,50,.4);
  display: none; /* JS controls display */
  box-shadow: 0 0 12px rgba(255,220,50,.1);
}

/* ── SEN TOOLBAR (shown in lesson view when SEN mode active) ── */
.sen-toolbar {
  display: none; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 14px;
}
.sen-toolbar.visible { display: flex; }
.sen-tool-label {
  font-size: .75rem; color: var(--muted2); font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; margin-right: 4px;
}
.sen-tool-btn {
  display: flex; align-items: center; gap: 5px;
  background: var(--surface3); border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 11px; color: var(--text);
  font-size: .78rem; cursor: pointer; transition: all .15s;
  white-space: nowrap;
}
.sen-tool-btn:hover { border-color: var(--accent); color: var(--accent); }
.sen-tool-btn.active { background: rgba(124,92,252,.12); border-color: var(--accent); color: var(--accent); }
.sen-tool-btn svg { flex-shrink: 0; }

/* colour picker swatch strip */
.overlay-swatches { display: flex; gap: 6px; align-items: center; }
.overlay-swatch {
  width: 20px; height: 20px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: border-color .15s, transform .1s;
  flex-shrink: 0;
}
.overlay-swatch:hover, .overlay-swatch.active { border-color: var(--text); transform: scale(1.2); }

/* spacing slider inline */
.spacing-slider {
  -webkit-appearance: none; appearance: none;
  width: 80px; height: 4px; border-radius: 99px;
  background: var(--surface3); outline: none; cursor: pointer;
}
.spacing-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px;
  border-radius: 50%; background: var(--accent); cursor: pointer;
}

/* ── POMODORO TIMER ── */
.pomodoro-bar {
  display: none; align-items: center; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(251,146,60,.08), var(--surface2));
  border: 1px solid rgba(251,146,60,.3);
  border-radius: 12px; padding: 12px 16px; margin-bottom: 14px;
}
.pomodoro-bar.visible { display: flex; }
.pomodoro-icon { color: #fb923c; display: flex; align-items: center; }
.pomodoro-label { font-size: .82rem; font-weight: 600; color: var(--text); }
.pomodoro-time {
  font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums;
  color: #fb923c; min-width: 56px; text-align: center;
  font-family: 'DM Mono', monospace;
}
.pomodoro-phase {
  font-size: .72rem; color: var(--muted2); text-transform: uppercase;
  letter-spacing: .06em;
}
.pomodoro-btn {
  display: flex; align-items: center; gap: 6px;
  background: #fb923c; border: none; border-radius: 20px;
  padding: 6px 14px; color: #fff; font-size: .78rem; font-weight: 700;
  cursor: pointer; transition: opacity .15s; margin-left: auto;
}
.pomodoro-btn:hover { opacity: .88; }
.pomodoro-progress {
  width: 100%; height: 3px; background: var(--surface3);
  border-radius: 99px; overflow: hidden; margin-top: 4px;
}
.pomodoro-fill {
  height: 100%; background: #fb923c;
  border-radius: 99px; transition: width 1s linear;
}

/* ── DISTRACTION FREE MODE ── */
body.distraction-free .sidebar,
body.distraction-free .top-bar,
body.distraction-free .lesson-header,
body.distraction-free .tts-bar,
body.distraction-free .podcast-bar,
body.distraction-free .sen-toolbar,
body.distraction-free .pomodoro-bar,
body.distraction-free .key-points,
body.distraction-free #flashcardSection,
body.distraction-free #quizSection,
body.distraction-free #notesSection { display: none !important; }
body.distraction-free .main-content { padding: 0; }
body.distraction-free #page-lesson .card { border: none; box-shadow: none; padding: 48px 32px; max-width: 680px; margin: 0 auto; }
.distraction-free-exit {
  display: none; position: fixed; top: 18px; right: 18px; z-index: 9999;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 20px; padding: 8px 16px; color: var(--text);
  font-size: .8rem; cursor: pointer; gap: 6px; align-items: center;
}
body.distraction-free .distraction-free-exit { display: flex; }

/* ── PROGRESS CELEBRATION ── */
@keyframes celebrate {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.06); }
  60%  { transform: scale(.97); }
  100% { transform: scale(1); }
}
.celebrate { animation: celebrate .5s ease; }

@keyframes confetti-fall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(80px) rotate(360deg); opacity: 0; }
}
.confetti-piece {
  position: fixed; width: 8px; height: 8px; border-radius: 2px;
  pointer-events: none; z-index: 9999;
  animation: confetti-fall .9s ease forwards;
}

/* ── MIND MAP ── */
#mindmapContainer {
  transition: background .3s;
  border-radius: 14px;
  padding: 20px 16px 16px;
  background: var(--surface3);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#mindmapSVG { display: block; margin: 0 auto; overflow: visible; min-width: 320px; }
#mindmapSVG text { user-select: none; }
[data-theme="luxe"] #mindmapContainer { background: #ede9e1; }

/* Mind map section header hint */
#mindmapSection .mindmap-hint {
  font-size: .78rem; color: var(--muted2);
  margin-bottom: 14px; display: flex; align-items: center; gap: 6px;
}

/* ═══════════════════════════════════════════════════════════
   PER-MODE SEN LESSON RENDERERS — each mode looks distinct
   ═══════════════════════════════════════════════════════════ */

.sen-lesson-wrap { width: 100%; }

/* ── DYSLEXIA lesson layout ── */
.sen-dyslexia { }

.sen-dyslexia .dys-para {
  font-size: 1.08rem !important;
  line-height: 2.0 !important;
  margin-bottom: 1.4rem !important;
  max-width: 66ch;
}
.sen-dyslexia .dys-heading {
  font-size: 1.25rem;
  border-left: 4px solid #60a5fa;
  padding-left: 12px;
  margin: 1.8rem 0 1rem;
  color: var(--text);
}
.sen-dyslexia .dys-subheading {
  font-size: 1.05rem;
  color: var(--accent);
  margin: 1.2rem 0 .6rem;
}
.sen-dyslexia .dys-list {
  padding-left: 1.4rem;
  margin-bottom: 1.2rem;
}
.sen-dyslexia .dys-item {
  margin-bottom: .7rem;
  font-size: 1.05rem;
  line-height: 1.85;
}
/* Key terms get a subtle highlight pill */
.sen-dyslexia .dys-term {
  background: rgba(96,165,250,.15);
  color: #93c5fd;
  border-radius: 4px;
  padding: 1px 5px;
  font-weight: 700;
}
[data-theme="luxe"] .sen-dyslexia .dys-term {
  background: rgba(26,26,26,.08);
  color: #1a1a1a;
}

/* ── ADHD lesson layout ── */
.sen-adhd { }

.adhd-progress-strip {
  display: flex; gap: 6px; align-items: center;
  margin-bottom: 20px; flex-wrap: wrap;
}
.adhd-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--surface3); border: 2px solid var(--border);
  cursor: pointer; transition: all .2s; flex-shrink: 0;
}
.adhd-dot-active, .adhd-dot:hover {
  background: var(--accent); border-color: var(--accent);
  transform: scale(1.3);
}

.adhd-section {
  border-left: 3px solid var(--adhd-colour, var(--accent));
  padding: 16px 20px;
  margin-bottom: 20px;
  border-radius: 0 12px 12px 0;
  background: color-mix(in srgb, var(--adhd-colour, var(--accent)) 6%, var(--surface2));
  transition: border-color .3s, background .3s;
}
.adhd-section h2 {
  color: var(--adhd-colour, var(--accent));
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.adhd-section h2::before {
  content: '';
  display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--adhd-colour, var(--accent));
  flex-shrink: 0;
}
.adhd-section p { font-size: .95rem; line-height: 1.75; margin-bottom: .9rem; }
.adhd-section strong {
  color: var(--adhd-colour, var(--accent));
  background: color-mix(in srgb, var(--adhd-colour, var(--accent)) 10%, transparent);
  border-radius: 3px; padding: 1px 4px;
}

/* ── AUTISM lesson layout ── */
.sen-autism { }

.autism-schedule {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
  margin-bottom: 24px;
}
.autism-schedule-label {
  font-size: .78rem; color: var(--muted2);
  font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; margin-bottom: 10px;
}
.autism-schedule-steps {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
}
.autism-sched-item {
  font-size: .78rem; color: var(--muted2);
  background: var(--surface3); border-radius: 6px; padding: 4px 10px;
  transition: all .3s;
}
.autism-sched-item.autism-sched-done {
  background: rgba(80,200,120,.15);
  color: #4ade80;
  text-decoration: line-through;
}
.autism-sched-arrow { color: var(--border); font-size: .75rem; }

.autism-step {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  transition: opacity .3s;
}
.autism-step:last-of-type { border-bottom: none; }
.autism-step-done { opacity: .45; }

.autism-step-num {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface2); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .88rem; font-weight: 700; color: var(--muted2);
  transition: all .3s;
}
.autism-step-done .autism-step-num {
  background: rgba(80,200,120,.15);
  border-color: #4ade80;
  color: #4ade80;
}
.autism-step-content { flex: 1; }
.autism-step-content h2 {
  font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--text);
}
.autism-step-content p { font-size: .93rem; line-height: 1.75; margin-bottom: .7rem; }

.autism-tick {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--surface3); border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 12px; font-size: .78rem;
  color: var(--muted2); cursor: pointer; margin-top: 8px;
  transition: all .2s;
}
.autism-tick:hover { border-color: #4ade80; color: #4ade80; }
.autism-step-done .autism-tick {
  background: rgba(80,200,120,.1);
  border-color: #4ade80; color: #4ade80;
}

.autism-completion {
  display: flex; align-items: center; gap: 10px;
  background: rgba(80,200,120,.12); border: 1px solid #4ade80;
  border-radius: 12px; padding: 14px 18px; margin-top: 16px;
  color: #4ade80; font-weight: 600; font-size: .9rem;
}

/* ── DYSPRAXIA lesson layout ── */
.sen-dyspraxia { }

.dysp-why {
  display: flex; align-items: center; gap: 8px;
  background: rgba(167,139,250,.08); border: 1px solid rgba(167,139,250,.25);
  border-radius: 10px; padding: 12px 14px;
  font-size: .83rem; color: #a78bfa; margin-bottom: 20px;
}
.dysp-why svg { flex-shrink: 0; color: #a78bfa; }

.dysp-step {
  padding: 20px 0; border-bottom: 1px solid var(--border);
}
.dysp-step:last-of-type { border-bottom: none; }
.dysp-step-badge {
  display: inline-flex; align-items: baseline; gap: 4px;
  margin-bottom: 14px;
}
.dysp-step-num {
  font-size: 2.2rem; font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.dysp-step-of { font-size: .75rem; color: var(--muted2); }

.dysp-step-body h2 {
  font-size: 1.1rem; font-weight: 700; margin-bottom: 10px;
  color: var(--text);
}
.dysp-step-body p {
  font-size: 1rem; line-height: 1.9; margin-bottom: 1rem;
  max-width: 64ch;
}
.dysp-step-body li {
  font-size: 1rem; line-height: 1.8; margin-bottom: .6rem;
}

.dysp-nav {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--border);
}
.dysp-nav-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 12px 20px; color: var(--text);
  font-size: .9rem; font-weight: 600; cursor: pointer;
  transition: all .2s;
}
.dysp-next {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent; color: #fff;
}
.dysp-nav-btn:hover:not(:disabled) { opacity: .85; transform: translateY(-1px); }
.dysp-nav-btn:disabled { opacity: .3; cursor: not-allowed; }
.dysp-nav-label {
  flex: 1; text-align: center; font-size: .82rem; color: var(--muted2);
}

/* ── Body-level SEN mode classes (auto-applied on lesson load) ── */
body.sen-mode-dyslexia #lessonBody {
  background: rgba(254,249,231,.04);
  border-radius: 12px; padding: 8px 4px;
}
body.sen-mode-autism #lessonBody { padding: 4px 0; }
body.sen-mode-dyspraxia #lessonBody { padding: 4px 0; }

/* Luxe theme overrides for SEN */
[data-theme="luxe"] .adhd-section {
  background: color-mix(in srgb, var(--adhd-colour, var(--accent)) 5%, #f7f5f2);
}
[data-theme="luxe"] .autism-step-num { background: #e8e4dd; }
[data-theme="luxe"] .dysp-step-num { background: #f7f5f2; }

/* ═══════════════════════════════════════════════════════════
   ONBOARDING — BACKGROUND PICKER (Step 0)
   ═══════════════════════════════════════════════════════════ */

.bg-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0;
  width: 100%;
}

.bg-picker-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 14px 10px 12px;
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: 16px; cursor: pointer;
  transition: all .2s; text-align: center;
}
.bg-picker-btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.bg-picker-btn.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface2));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.bg-picker-preview {
  width: 100%; height: 64px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  overflow: hidden; position: relative;
}

/* Space preview — dark purple */
.bg-preview-space {
  background: linear-gradient(135deg, #0d0d1a 0%, #1a0a2e 50%, #0f0a1e 100%);
}
.bg-preview-space .bg-preview-dot:nth-child(1) { background: #7c5cfc; }
.bg-preview-space .bg-preview-dot:nth-child(2) { background: #fc5c7d; }
.bg-preview-space .bg-preview-dot:nth-child(3) { background: #7c5cfc; opacity: .5; }

/* Eclipse preview — dark slate */
.bg-preview-eclipse {
  background: linear-gradient(135deg, #0a0a0f 0%, #111118 50%, #0d0d14 100%);
}
.bg-preview-eclipse .bg-preview-dot:nth-child(1) { background: #60a5fa; }
.bg-preview-eclipse .bg-preview-dot:nth-child(2) { background: #a78bfa; }
.bg-preview-eclipse .bg-preview-dot:nth-child(3) { background: #60a5fa; opacity: .5; }

/* Luxe preview — warm cream/light */
.bg-preview-luxe {
  background: linear-gradient(135deg, #faf8f3 0%, #f0ebe0 50%, #f5f0e8 100%);
}
.bg-preview-luxe .bg-preview-dot:nth-child(1) { background: #c8a96e; }
.bg-preview-luxe .bg-preview-dot:nth-child(2) { background: #8b6f47; }
.bg-preview-luxe .bg-preview-dot:nth-child(3) { background: #c8a96e; opacity: .5; }

.bg-preview-dot {
  width: 8px; height: 8px; border-radius: 50%;
}

.bg-picker-name {
  font-size: .9rem; font-weight: 700; color: var(--text);
}
.bg-picker-desc {
  font-size: .72rem; color: var(--muted2); line-height: 1.3;
}

/* Stack vertically on very small screens */
@media (max-width: 360px) {
  .bg-picker-grid { grid-template-columns: 1fr; }
}

/* Section label inside onboarding card */
.ob-section-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted2);
  margin: 16px 0 10px; width: 100%;
}

/* Fix bg-picker preview to show SVG icon centred, not dots */
.bg-picker-preview {
  align-items: center;
  justify-content: center;
}
.bg-picker-preview svg {
  display: block;
}
/* Hide old dots if any remain */
.bg-preview-dot { display: none; }

/* ═══════════════════════════════════════════════════════════
   REFERENCES SECTION
   ═══════════════════════════════════════════════════════════ */
.refs-intro {
  font-size: .82rem; color: var(--muted2);
  margin-bottom: 14px; line-height: 1.5;
}
.references-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.ref-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  border-left: 3px solid var(--accent);
  transition: border-color .2s;
}
.ref-item:hover { border-left-color: var(--accent2); }
.ref-num {
  font-size: .75rem; font-weight: 700;
  color: var(--accent); flex-shrink: 0;
  padding-top: 1px; min-width: 24px;
}
.ref-text {
  font-size: .82rem; color: var(--muted2);
  line-height: 1.6; font-style: italic;
}

/* ═══════════════════════════════════════════════════════════
   CLICK TO READ
   ═══════════════════════════════════════════════════════════ */
.click-read-hint {
  display: none; /* shown via JS after lesson loads */
  align-items: center; gap: 6px;
  font-size: .75rem; color: var(--muted2);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 12px;
  margin-bottom: 12px;
  opacity: 0.85;
}
.click-read-hint svg { color: var(--accent); flex-shrink: 0; }

/* Clickable words */
.readable-word {
  cursor: pointer;
  border-radius: 3px;
  transition: background .12s, color .12s;
  padding: 0 1px;
}
.readable-word:hover {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}
.readable-word.word-reading {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════
   SUBTOPIC PILLS
   ═══════════════════════════════════════════════════════════ */
.subtopic-pill {
  padding: 7px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--muted2);
  font-size: .78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.subtopic-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.subtopic-pill.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════
   AUTH MODAL
   ═══════════════════════════════════════════════════════════ */
.auth-modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
  animation: authSlideUp .25s ease;
}
@keyframes authSlideUp {
  from { opacity:0; transform: translateY(20px) }
  to   { opacity:1; transform: translateY(0) }
}
.auth-label {
  font-size: .78rem;
  color: var(--muted2);
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.auth-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: .9rem;
  box-sizing: border-box;
  transition: border-color .15s;
  outline: none;
}
.auth-input:focus { border-color: var(--accent); }
.auth-submit-btn {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  margin-bottom: 16px;
  font-family: var(--head);
  letter-spacing: .3px;
}
.auth-submit-btn:hover { opacity: .9; }
.auth-submit-btn:active { transform: scale(.98); }
.auth-submit-btn:disabled { opacity: .5; cursor: not-allowed; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: .78rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-role-btn {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  color: var(--muted2);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.auth-role-btn.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════
   TEACHER DASHBOARD
   ═══════════════════════════════════════════════════════════ */

/* Stat cards row */
.t-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 600px) { .t-stat-grid { grid-template-columns: repeat(4, 1fr); } }
.t-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}
.t-stat-icon { margin-bottom: 8px; }
.t-stat-val {
  font-family: var(--head);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}
.t-stat-label { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; }

/* Class card */
.t-class-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: border-color .15s, transform .12s;
  margin-bottom: 10px;
}
.t-class-card:hover { border-color: var(--accent); transform: translateX(3px); }
.t-class-main { flex: 1; min-width: 0; }
.t-class-name { font-weight: 700; font-size: .95rem; color: var(--text); margin-bottom: 4px; }
.t-class-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.t-class-meta { font-size: .78rem; color: var(--muted2); }
.t-class-actions { display: flex; align-items: center; gap: 8px; }
.t-icon-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
  color: var(--muted2);
  display: flex;
  align-items: center;
  transition: all .15s;
}
.t-icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.t-icon-btn--delete:hover { border-color: #f87171; color: #f87171; }

/* Badge */
.t-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 600;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}
.t-badge--sen {
  background: color-mix(in srgb, #a78bfa 18%, transparent);
  color: #a78bfa;
}

/* Invite bar */
.t-invite-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px;
  margin: 16px 0;
  flex-wrap: wrap;
}
.t-invite-code {
  font-family: monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 2px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 4px 12px;
  border-radius: 8px;
}
.t-copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.t-copy-btn:hover { background: var(--accent); color: #fff; }

/* Student list */
.t-student-list { display: flex; flex-direction: column; gap: 6px; }
.t-student-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: border-color .15s;
}
.t-student-row:hover { border-color: var(--accent); }
.t-student-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent);
  font-weight: 700;
  font-size: .95rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.t-student-avatar--sm { width: 30px; height: 30px; font-size: .8rem; }
.t-student-info { flex: 1; min-width: 0; }
.t-student-name { font-weight: 600; font-size: .88rem; color: var(--text); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.t-student-meta { font-size: .75rem; color: var(--muted2); margin-top: 2px; }
.t-student-score { font-family: var(--head); font-weight: 800; font-size: 1rem; flex-shrink: 0; }

/* Tabs */
.t-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.t-tab {
  padding: 8px 16px;
  border: none;
  background: none;
  color: var(--muted2);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .15s;
}
.t-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Student detail rows */
.t-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.t-detail-row:last-child { border-bottom: none; }
.t-detail-topic { font-size: .88rem; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.t-detail-meta { font-size: .75rem; color: var(--muted2); }
.t-detail-words { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.t-detail-score { font-family: var(--head); font-weight: 800; font-size: .95rem; white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; }

/* Empty state */
.t-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
  font-size: .88rem;
}

/* Analytics grid */
.t-analytics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 700px) { .t-analytics-grid { grid-template-columns: 1fr 1fr; } }
.t-analytics-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}
.t-analytics-title {
  font-weight: 700;
  font-size: .9rem;
  color: var(--text);
  margin-bottom: 14px;
}
.t-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.t-bar-label { font-size: .78rem; color: var(--muted2); width: 80px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-bar-track { flex: 1; height: 8px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
.t-bar-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width .5s ease; }
.t-bar-count { font-size: .75rem; color: var(--muted); width: 24px; text-align: right; }
.t-struggling-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.t-struggling-row:last-child { border-bottom: none; }

/* Weekly chart */
.t-week-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 110px;
  padding-top: 8px;
}
.t-week-col { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }
.t-week-bar { width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; transition: height .4s ease; }
.t-week-label { font-size: .65rem; color: var(--muted); }
.t-week-count { font-size: .65rem; color: var(--muted2); font-weight: 600; }

/* Nav divider */
.nav-divider { height: 1px; background: var(--border); margin: 8px 0; }

/* Settings account area */
.settings-account-box {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-top: 8px;
}
.settings-account-email { font-size: .85rem; color: var(--text); font-weight: 600; margin-bottom: 4px; }
.settings-account-role  { font-size: .75rem; color: var(--muted2); margin-bottom: 14px; }

/* Slideshow spinner */
.sse-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Trending theme pills */
.trend-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.trend-pill:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}
.trend-pill.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.trend-cat {
  font-size: .72rem;
  opacity: .75;
  font-weight: 400;
}
.trend-skeleton {
  display: inline-block;
  width: 110px;
  height: 36px;
  border-radius: 20px;
  background: var(--border);
  animation: shimmer 1.4s infinite linear;
  background-size: 200% 100%;
  background-image: linear-gradient(90deg, var(--border) 0%, var(--card) 50%, var(--border) 100%);
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}


/* ── LOGOUT BUTTON ─────────────────────────────────────────── */
.logout-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% - 16px);
  margin: 0 8px;
  padding: 10px 14px;
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.25);
  border-radius: 10px;
  color: #ef4444;
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s, border-color .18s;
  font-family: var(--body);
  text-align: left;
}
.logout-btn:hover {
  background: rgba(239,68,68,.22);
  border-color: rgba(239,68,68,.55);
}

/* ── TEACHER QUICK ACTION CARDS ────────────────────────────── */
.teacher-quick-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color .18s, transform .14s, box-shadow .18s;
  font-family: var(--body);
  width: 100%;
}
.teacher-quick-btn:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.tqb-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: var(--surface2);
  border-radius: 12px;
  flex-shrink: 0;
}