/* ==========================================================================
   Velora — Premium SaaS English-Learning Platform
   Complete Redesign · v2.0
   ========================================================================== */

/* ─── 1. CSS Variables ──────────────────────────────────────────────────── */

:root {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-2: #F1F5F9;
  --text: #0F172A;
  --text-2: #64748B;
  --text-3: #94A3B8;
  --border: #E2E8F0;
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --primary-light: #EEF2FF;
  --accent: #6366F1;
  --success: #16A34A;
  --success-light: #F0FDF4;
  --warning: #F59E0B;
  --warning-light: #FFFBEB;
  --error: #EF4444;
  --error-light: #FEF2F2;
  --sidebar-bg: #FFFFFF;
  --topbar-bg: rgba(248, 250, 252, 0.85);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-dropdown: 0 8px 24px rgba(0, 0, 0, 0.12);
  --soft: rgba(79, 70, 229, 0.06);
  --glow: rgba(79, 70, 229, 0.2);
  --band-color: #4F46E5;
  --sc: var(--primary);
}

[data-theme="dark"] {
  --bg: #0F172A;
  --surface: #1E293B;
  --surface-2: #334155;
  --text: #F1F5F9;
  --text-2: #94A3B8;
  --text-3: #64748B;
  --border: #334155;
  --primary: #818CF8;
  --primary-hover: #A5B4FC;
  --primary-light: rgba(99, 102, 241, 0.15);
  --accent: #A5B4FC;
  --success: #16A34A;
  --success-light: rgba(22, 163, 74, 0.15);
  --warning: #F59E0B;
  --warning-light: rgba(245, 158, 11, 0.15);
  --error: #EF4444;
  --error-light: rgba(239, 68, 68, 0.15);
  --sidebar-bg: #0F172A;
  --topbar-bg: rgba(15, 23, 42, 0.85);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.15);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-dropdown: 0 8px 24px rgba(0, 0, 0, 0.35);
  --soft: rgba(99, 102, 241, 0.08);
  --glow: rgba(99, 102, 241, 0.22);
  --band-color: #818CF8;
  --sc: var(--primary);
}

/* ─── 2. Reset & Base ───────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

::selection {
  background: var(--primary);
  color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--text-3);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-2);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #334155;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

/* ─── 3. App Layout ─────────────────────────────────────────────────────── */

.app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 240px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 24px;
  flex-shrink: 0;
}

.sidebar-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--primary);
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.brand .logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
  background: var(--primary);
}

.sidebar-name,
.brand h1 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
}

.sidebar-nav,
.nav {
  flex: 1;
  overflow-y: auto;
  padding: 0 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section,
.nav-label {
  margin-bottom: 4px;
}

.nav-section-label,
.nav-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  padding: 16px 12px 6px;
}

.nav-item,
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: all 150ms ease;
  position: static;
}

.nav-item:hover,
.nav a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-item.active,
.nav a.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.nav-item.active::before,
.nav a.active::before {
  display: none;
}

.nav-icon,
.nav .icon {
  width: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid var(--border);
}

.sidebar-logout,
.btn-logout {
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: transparent;
  color: var(--text-2);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 150ms ease;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logout:hover,
.btn-logout:hover {
  color: var(--error);
  background: var(--error-light);
}

/* Overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 90;
  display: none;
}

.overlay.show {
  display: block;
}

/* Main Wrapper */
.main-wrapper,
.main {
  flex: 1;
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── 4. Topbar ─────────────────────────────────────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 32px;
  height: 56px;
  border-bottom: 1px solid var(--border);
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  transition: background 150ms;
}

.hamburger:hover {
  background: var(--surface-2);
}

.page-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
  flex: 1;
}

.topbar-spacer {
  flex: 1;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-3);
  font-size: 13px;
  cursor: pointer;
  transition: all 150ms ease;
  min-width: 200px;
  font-family: inherit;
}

.search-trigger:hover {
  border-color: var(--text-3);
  color: var(--text-2);
}

.search-trigger kbd {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: inherit;
  margin-left: auto;
}

.level-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 5px 12px;
  border-radius: 999px;
  border: none;
  white-space: nowrap;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 150ms ease;
  font-size: 15px;
}

.icon-btn:hover {
  border-color: var(--text-3);
  color: var(--text);
}

/* Bell / Notifications */
.bell-wrap {
  position: relative;
}

.bell-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 150ms ease;
  font-size: 16px;
}

.bell-btn:hover {
  border-color: var(--text-3);
  color: var(--text);
}

.bell-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--error);
  border: 2px solid var(--surface);
}

.bell-panel {
  position: absolute;
  top: 44px;
  right: 0;
  width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-dropdown);
  z-index: 100;
  display: none;
  overflow: hidden;
  max-width: 85vw;
}

.bell-wrap.open .bell-panel {
  display: block;
  animation: fadeIn 150ms ease;
}

.bell-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bell-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 6px;
}

.bell-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  border: none;
  background: none;
  font-family: inherit;
  align-items: flex-start;
  transition: background 150ms;
}

.bell-item:hover {
  background: var(--surface-2);
}

.bell-ic {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  font-size: 15px;
}

.bell-item:not(.new) .bell-ic {
  background: var(--surface-2);
}

.bell-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.bell-title {
  font-size: 13px;
  font-weight: 600;
}

.bell-text {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
}

.bell-new {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: var(--error);
  padding: 2px 7px;
  border-radius: 8px;
  margin-left: 6px;
  vertical-align: 1px;
}

.bell-empty {
  padding: 28px;
  text-align: center;
  color: var(--text-3);
  font-size: 14px;
}

.bell-unread {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--error);
  border-radius: 999px;
  padding: 2px 8px;
}

.bell-clear {
  border: 1px solid var(--border);
  background: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 150ms;
  font-family: inherit;
}

.bell-clear:hover {
  background: var(--primary-light);
}

/* Avatar */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

/* ─── 5. Content Area ───────────────────────────────────────────────────── */

.content {
  padding: 32px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  align-self: center;
}

/* ─── 6. Placeholder / Empty State ──────────────────────────────────────── */

.placeholder {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 60px 24px;
  text-align: center;
}

.placeholder h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.placeholder p {
  font-size: 14px;
  color: var(--text-2);
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ─── 7. Dashboard ──────────────────────────────────────────────────────── */

.dash {
  padding: 0;
  margin: 0 -32px;
  position: relative;
  min-height: calc(100vh - 57px);
  overflow: hidden;
  background: var(--bg);
  background-image: none;
}

.dash::before {
  display: none;
}

.dash-inner {
  padding: 32px;
  position: relative;
  z-index: 1;
}

.dash-welcome,
.dash-head {
  margin-bottom: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.dash-welcome h2,
.dash-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.dash-welcome p,
.dash-sub {
  font-size: 15px;
  color: var(--text-2);
  margin-top: 6px;
}

.dash-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.dash-primary-btn {
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 150ms ease;
}

.dash-primary-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.dash-secondary-btn {
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 150ms ease;
}

.dash-secondary-btn:hover {
  border-color: var(--text-3);
}

.dash-section {
  margin-top: 6px;
}

.dashboard-title,
.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Today's Lesson Card */
.dash-today {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
}

.dash-today-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.dash-today-title {
  font-size: 16px;
  font-weight: 600;
}

.dash-today-time {
  font-size: 13px;
  color: var(--text-2);
}

.dash-today-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-today-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.dash-today-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
  transition: width 500ms ease;
}

.dash-today-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}

.dash-today-lesson {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface-2);
  border-radius: 10px;
  margin-top: 14px;
}

.dash-today-lesson-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.dash-today-lesson-info {
  flex: 1;
  min-width: 0;
}

.dash-today-lesson-name {
  font-size: 14px;
  font-weight: 600;
}

.dash-today-lesson-meta {
  font-size: 12px;
  color: var(--text-2);
}

.dash-today-lesson-btn {
  padding: 7px 14px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background 150ms;
}

.dash-today-lesson-btn:hover {
  background: var(--primary-hover);
}

/* Grid Layouts */
.dash-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.dash-grid-full {
  grid-template-columns: 1fr;
}

/* Stats / Metrics */
.stats,
.dash-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card,
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.stat-card::after {
  display: none;
}

.stat-icon,
.metric-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  margin-bottom: 10px;
  background: var(--primary-light);
  color: var(--primary);
}

.metric-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.metric-card-label,
.stat-card .label {
  font-size: 13px;
  color: var(--text-2);
}

.metric-card-value,
.stat-card .num {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--primary);
  -webkit-text-fill-color: var(--primary);
}

.metric-card-trend {
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
}

.metric-card-trend.up {
  color: var(--success);
}

.metric-card-trend.down {
  color: var(--error);
}

/* Dash Skills */
.dash-skills {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
}

.skill-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.skill-row:last-child {
  border-bottom: none;
}

.skill-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  background: var(--primary-light);
}

.skill-name {
  font-size: 14px;
  font-weight: 500;
  width: 100px;
}

.skill-bar-wrap {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
  transition: width 600ms ease;
}

.skill-percent {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  width: 40px;
  text-align: right;
}

/* Dash Streak */
.dash-streak {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
}

.streak-number {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1px;
}

.streak-label {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 4px;
}

.streak-days {
  display: flex;
  gap: 6px;
  margin-top: 16px;
}

.streak-day {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

.streak-day.done {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(22, 163, 74, 0.2);
}

.streak-day.today {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.streak-day.future {
  background: var(--surface-2);
  color: var(--text-3);
}

/* Dash Activity */
.dash-activity {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
}

.activity-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
  padding-top: 10px;
}

.activity-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: 100%;
}

.activity-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  background: var(--primary);
  transition: height 500ms ease;
  min-height: 2px;
}

.activity-bar-label {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
}

.activity-bar-value {
  font-size: 10px;
  color: var(--text-3);
}

/* Continue Learning */
.dash-continue {
  margin-bottom: 24px;
}

.continue-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.continue-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  cursor: pointer;
  transition: all 150ms ease;
  display: flex;
  flex-direction: column;
}

.continue-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.continue-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 12px;
  background: var(--primary-light);
  color: var(--primary);
}

.continue-card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.continue-card-meta {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 12px;
}

.continue-card-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  margin-bottom: 12px;
}

.continue-card-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
}

.continue-card-btn {
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms ease;
  align-self: flex-start;
  margin-top: auto;
  font-family: inherit;
}

.continue-card-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* AI Suggestion */
.dash-ai {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: center;
}

.dash-ai-visual {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.dash-ai-content {
  flex: 1;
}

.dash-ai-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.dash-ai-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}

.dash-ai-btn {
  margin-top: 12px;
}

/* Quick Actions */
.dash-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.dash-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 22px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  transition: all 150ms ease;
}

.dash-action:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--primary);
}

.dash-action-icon {
  font-size: 24px;
  margin-bottom: 10px;
}

.dash-action-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.dash-action-sub {
  font-size: 13px;
  color: var(--text-2);
}

/* Glass (legacy compat) */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
}

/* ─── 8. Buttons ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms ease;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--text-3);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 13px;
}

.btn-lg {
  padding: 10px 22px;
  font-size: 15px;
}

.btn-danger {
  background: var(--error);
  color: #fff;
}

.btn-danger:hover {
  background: #DC2626;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover {
  background: #15803D;
}

/* Test button */
.test-btn {
  padding: 11px 20px;
  border: none;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms ease;
  font-family: inherit;
  white-space: nowrap;
}

.test-btn:hover {
  background: var(--primary-hover);
}

.test-btn.voice {
  background: var(--success);
}

.test-btn.voice:hover {
  background: #15803D;
}

.head-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ─── 9. Cards ──────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
}

/* ─── 10. Badges ─────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary);
}

.badge-success {
  background: var(--success-light);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-light);
  color: var(--warning);
}

.badge-error {
  background: var(--error-light);
  color: var(--error);
}

.badge-neutral {
  background: var(--surface-2);
  color: var(--text-2);
}

/* ─── 11. Progress Bar ──────────────────────────────────────────────────── */

.progress {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
  transition: width 500ms ease;
}

/* ─── 12. Tabs ──────────────────────────────────────────────────────────── */

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.tab {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 150ms ease;
  font-family: inherit;
}

.tab:hover {
  color: var(--text);
  border-color: var(--text-3);
}

.tab.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

/* ─── 13. Modal ─────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 150ms ease;
}

.modal-overlay.show {
  opacity: 1;
}

.modal-pop {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
  transform: translateY(8px);
  transition: transform 150ms ease;
}

.modal-overlay.show .modal-pop {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-3);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 150ms;
}

.modal-close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 3px;
}

.modal-sub {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 8px;
}

.modal-bn {
  color: var(--primary);
  font-weight: 700;
}

.modal-neg {
  font-size: 14px;
  margin-bottom: 12px;
  padding: 7px 10px;
  background: var(--error-light);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  display: inline-block;
}

.modal-link {
  border: none;
  background: none;
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 2px 0;
}

.modal-link:hover {
  opacity: 0.8;
}

/* ─── 14. Form Elements ─────────────────────────────────────────────────── */

.input,
.form-in {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  font-family: inherit;
  transition: all 150ms ease;
  line-height: 1.5;
}

.form-in {
  max-width: 420px;
  padding: 12px 14px;
  font-size: 15px;
}

.input:focus,
.form-in:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.write-area {
  width: 100%;
  min-height: 160px;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  resize: vertical;
  font-family: inherit;
  transition: border-color 150ms, box-shadow 150ms;
}

.write-area:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  font-family: inherit;
  appearance: none;
  transition: all 150ms ease;
  cursor: pointer;
}

.select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* ─── 15. Vocabulary Page ───────────────────────────────────────────────── */

.vocab-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.vocab-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.vtab {
  padding: 10px 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all 150ms ease;
  font-family: inherit;
}

.vtab:hover {
  color: var(--text);
  border-color: var(--text-3);
}

.vtab.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
  font-weight: 500;
}

.word-list-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.word-list-grid.grammar-grid {
  grid-template-columns: repeat(2, 1fr);
}

.word-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 150ms ease;
  text-align: left;
  font-family: inherit;
  display: block;
  width: 100%;
  box-shadow: var(--shadow-card);
}

.word-item:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card-hover);
}

.witem-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.witem-word {
  font-size: 17px;
  font-weight: 600;
}

.witem-pos {
  font-size: 12px;
  color: var(--text-3);
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 4px;
}

.witem-meaning {
  display: block;
  font-size: 14px;
  color: var(--text-2);
}

.witem-cefr {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ─── 16. Word Detail ───────────────────────────────────────────────────── */

.back-btn {
  border: none;
  background: none;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 0 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 150ms;
}

.back-btn:hover {
  color: var(--primary);
}

.word-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.word-head {
  margin-bottom: 20px;
}

.word-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.word-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.audio-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 150ms ease;
}

.audio-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.word-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.ipa {
  font-size: 15px;
  color: var(--text-2);
}

.pos-badge {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-2);
  padding: 3px 10px;
  border-radius: 6px;
}

.cefr-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 10px;
  border-radius: 6px;
  display: inline-block;
}

.word-meanings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.meaning-box {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 16px;
}

.m-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
}

.m-text {
  font-size: 16px;
  margin-top: 6px;
  line-height: 1.5;
}

.wsec {
  margin-bottom: 20px;
}

.wsec-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 10px;
}

.wsec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.chip {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  background: var(--surface-2);
  color: var(--text);
  padding: 5px 12px;
  border-radius: 999px;
  margin: 0 4px 4px 0;
}

.chip.say {
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 150ms ease;
  font-family: inherit;
}

.chip.say:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.word-list {
  list-style: none;
}

.word-list li {
  position: relative;
  padding-left: 14px;
  font-size: 14px;
  line-height: 1.7;
}

.word-list li::before {
  content: "•";
  position: absolute;
  left: 2px;
  color: var(--primary);
}

.media-box {
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 20px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--text-3);
}

.media-box.video {
  color: var(--primary);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.action-btn {
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms ease;
  font-family: inherit;
  color: var(--text);
}

.action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.ai-box,
.mini-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-top: 12px;
  background: var(--surface-2);
}

.ai-tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 6px;
  display: block;
}

.ai-box p,
.mini-box p {
  font-size: 14px;
  line-height: 1.7;
}

.mini-btn {
  margin-top: 10px;
  border: none;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 150ms;
}

.mini-btn:hover {
  background: var(--primary-hover);
}

.mini-answer {
  color: var(--primary);
  font-weight: 500;
  margin-top: 10px;
}

.flash-card {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  background: var(--surface-2);
  transition: all 150ms ease;
}

.flash-card:hover {
  border-color: var(--primary);
}

.flash-text {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

/* ─── 17. CEFR Grid ─────────────────────────────────────────────────────── */

.cefr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.cefr-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: all 150ms ease;
  display: block;
  width: 100%;
}

.cefr-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.cefr-card .cefr-badge {
  background: var(--primary-light);
  color: var(--primary);
  margin-bottom: 10px;
}

.cefr-card h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.cefr-card p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
}

.cefr-count {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: 4px;
}

.level-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.level-back {
  border: none;
  background: none;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.level-back:hover {
  color: var(--primary);
}

.grammar-count {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 12px;
}

.level-name {
  font-size: 14px;
  color: var(--text-2);
}

/* ─── 18. Vocabulary Test ───────────────────────────────────────────────── */

.test-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.test-progress {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.test-question {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 4px;
}

.test-hint {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 20px;
}

.test-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.test-opt {
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms ease;
  font-family: inherit;
  color: var(--text);
}

.test-opt:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.test-opt.correct {
  border-color: var(--success);
  background: var(--success-light);
  color: #15803D;
}

.test-opt.wrong {
  border-color: var(--error);
  background: var(--error-light);
  color: #B91C1C;
}

.test-opt.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.test-opt:disabled {
  cursor: default;
}

.test-result {
  text-align: center;
  padding: 40px 24px;
}

.result-score {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--primary);
}

.result-pct {
  font-size: 20px;
  font-weight: 600;
  margin-top: 4px;
}

.result-msg {
  font-size: 14px;
  color: var(--text-2);
  margin: 12px 0 24px;
}

.result-learned {
  margin-bottom: 22px;
}

.learned-num {
  font-size: 26px;
  font-weight: 700;
  margin-top: 6px;
}

.learned-num span {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
}

.result-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  max-width: 400px;
  margin: 0 auto 24px;
}

.result-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
  transition: width 500ms ease;
}

/* ─── 19. Grammar ───────────────────────────────────────────────────────── */

.grammar-topics .grammar-hero {
  margin-bottom: 24px;
}

.grammar-hero h3 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0 0 8px;
}

.grammar-hero p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
  max-width: 600px;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.topic-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  padding: 24px 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: all 150ms ease;
  font-family: inherit;
  width: 100%;
  box-shadow: var(--shadow-card);
}

.topic-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card-hover);
}

.topic-ic {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.topic-ic svg {
  display: block;
}

.topic-ic .ic-text {
  font-size: 16px;
  font-weight: 700;
}

.topic-name {
  font-size: 16px;
  font-weight: 600;
}

.topic-steps {
  font-size: 13px;
  color: var(--text-2);
}

.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: var(--primary-light);
  color: var(--primary);
}

.sub-grid {
  grid-template-columns: repeat(2, 1fr);
}

.modal-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.modal-cards .sub-card {
  padding: 16px 14px;
  background: var(--surface);
  background-image: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 150ms ease;
}

.modal-cards .sub-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.modal-cards .sub-card::after {
  display: none;
}

.modal-cards .sub-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 18px;
}

.modal-cards .topic-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.modal-cards .sub-desc {
  font-size: 12px;
  line-height: 1.55;
  margin: 2px 0 8px;
  color: var(--text-2);
}

.modal-cards .sub-struct {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}

.sub-card {
  border-left: none;
  padding: 24px 20px;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.sub-card::after {
  display: none;
}

.sub-card .topic-name,
.sub-card .sub-icon,
.sub-card .topic-steps,
.sub-card .sub-desc {
  position: relative;
  z-index: 1;
}

.sub-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  margin: 2px 0 6px;
}

.sub-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 10px;
}

.sub-icon svg {
  display: block;
}

.sub-card .topic-name {
  font-size: 16px;
}

.sub-struct {
  font-weight: 600;
  color: var(--primary);
  font-size: 13px;
}

/* ─── 20. Grammar Content ───────────────────────────────────────────────── */

.g-intro {
  font-size: 15px;
  line-height: 1.7;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 14px 0;
}

.g-rules {
  list-style: none;
  padding: 0;
  margin: 0;
}

.g-rules li {
  position: relative;
  padding: 7px 0 7px 24px;
  font-size: 14px;
  line-height: 1.6;
  border-bottom: 1px solid var(--border);
}

.g-rules li:last-child {
  border-bottom: none;
}

.g-rules li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 7px;
  color: var(--primary);
  font-weight: 700;
}

.g-example {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
}

.g-en {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 3px;
  cursor: pointer;
}

.g-en:hover {
  color: var(--primary);
}

.g-bn {
  font-size: 14px;
  color: var(--text-2);
  margin: 0;
}

.trans-box {
  border-left: 3px solid var(--primary);
  background: var(--surface);
}

.trans-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--primary);
  margin-bottom: 6px;
}

.story-text {
  font-size: 16px;
  font-weight: 500;
  line-height: 2;
  letter-spacing: 0.02em;
  word-spacing: 0.1em;
  text-align: justify;
  color: var(--text);
  cursor: default;
  margin: 0;
}

.g-hint {
  font-size: 12px;
  color: var(--text-3);
  text-transform: none;
  letter-spacing: 0;
}

/* ─── 21. Grammar Tables ────────────────────────────────────────────────── */

.g-visual {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-top: 14px;
  overflow-x: auto;
}

.g-visual-caption {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 12px;
}

.g-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
  min-width: 400px;
}

.g-table th,
.g-table td {
  border: 1px solid var(--border);
  padding: 9px 12px;
  font-size: 14px;
  text-align: left;
}

.g-table th {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.g-table tr:nth-child(even) td {
  background: var(--surface-2);
}

.g-table td.num {
  width: 36px;
  text-align: center;
  font-weight: 600;
  color: var(--text-2);
}

.struct-group {
  margin-bottom: 18px;
}

.struct-group:last-child {
  margin-bottom: 0;
}

.struct-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}

.struct-line {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 10px;
  background: var(--primary-light);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
}

/* ─── 22. Grammar Practice/Quiz ─────────────────────────────────────────── */

.pract-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--surface);
}

.pract-q {
  font-size: 14px;
  margin: 0 0 8px;
  line-height: 1.6;
}

.pract-blank {
  color: var(--primary);
  font-weight: 700;
  border-bottom: 2px solid var(--primary);
  padding: 0 4px;
}

.pract-row {
  display: flex;
  gap: 8px;
}

.pract-in {
  flex: 1;
}

.pract-fb {
  margin-top: 8px;
  font-size: 14px;
}

.pract-fb-result {
  border-radius: 8px;
  padding: 7px 12px;
  font-weight: 500;
}

.pract-fb-result.ok {
  background: var(--success-light);
  color: #15803D;
}

.pract-fb-result.no {
  background: var(--error-light);
  color: #B91C1C;
}

.step-quiz {
  margin-top: 8px;
}

.quiz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.step-q {
  font-size: 17px;
  font-weight: 600;
  margin: 8px 0 14px;
  line-height: 1.5;
}

.quiz-fb {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 8px;
}

.quiz-fb.ok {
  background: var(--success-light);
  color: #15803D;
}

.quiz-fb.no {
  background: var(--error-light);
  color: #B91C1C;
}

.quiz-explain {
  font-weight: 400;
  opacity: 0.85;
}

.step-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.step-tab {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms ease;
  font-family: inherit;
  color: var(--text);
}

.step-tab:hover {
  border-color: var(--primary);
}

.step-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.step-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

/* ─── 23. Voice/Speaking ────────────────────────────────────────────────── */

.voice-prompt {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.3px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin: 16px 0 8px;
}

.mic-btn {
  display: block;
  margin: 20px auto 8px;
  width: 80px;
  height: 80px;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  transition: all 150ms ease;
}

.mic-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.03);
}

.mic-btn:disabled {
  background: var(--surface-2);
  color: var(--text-3);
  cursor: default;
  transform: none;
}

.stop-btn {
  display: none;
  margin: 16px auto 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: all 150ms;
}

.stop-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.voice-input {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 12px auto;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  text-align: center;
  background: var(--surface);
  color: var(--text);
  transition: border-color 150ms, box-shadow 150ms;
}

.voice-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.voice-heard {
  margin-top: 16px;
}

.voice-result {
  border-radius: 10px;
  padding: 14px;
  font-size: 15px;
  line-height: 1.6;
}

.voice-result.correct {
  background: var(--success-light);
  border: 1px solid rgba(22, 163, 74, 0.3);
  color: #15803D;
}

.voice-result.wrong {
  background: var(--error-light);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #B91C1C;
}

.voice-answer {
  margin-top: 4px;
  font-size: 14px;
}

.type-link {
  border: none;
  background: none;
  color: var(--text-3);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
  padding: 4px;
  transition: color 150ms;
}

.type-link:hover {
  color: var(--primary);
}

.type-area {
  margin-top: 14px;
}

.engine-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-2);
}

.engine-row select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
}

.engine-row select:focus {
  outline: none;
  border-color: var(--primary);
}

.warm-note {
  margin-top: 6px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
}

/* ─── 24. Listening ─────────────────────────────────────────────────────── */

.listen-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms ease;
}

.listen-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.listen-btn.playing {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.listen-mini {
  border: 1px solid var(--border);
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 6px;
  padding: 2px 8px;
  margin-left: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 150ms ease;
}

.listen-mini:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.big-listen {
  font-size: 15px;
  padding: 12px 20px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.yt-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  margin-bottom: 10px;
}

.yt-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.tf-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.tf-btn {
  flex: 1;
  max-width: 160px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms ease;
  font-family: inherit;
  color: var(--text);
}

.tf-btn:hover {
  border-color: var(--primary);
}

.tf-btn.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.tf-btn.selected[data-v="true"] {
  border-color: var(--success);
  background: var(--success-light);
  color: #15803D;
}

.tf-btn.selected[data-v="false"] {
  border-color: var(--error);
  background: var(--error-light);
  color: #B91C1C;
}

.open-area {
  min-height: 90px;
}

.open-sa {
  margin-top: 10px;
}

.open-sample {
  margin-top: 10px;
}

/* ─── 25. Mock Tests / IELTS ────────────────────────────────────────────── */

.mock-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.mock-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  padding: 24px 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: all 150ms ease;
  font-family: inherit;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.mock-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card-hover);
}

.mock-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--error-light);
  color: var(--error);
}

.mock-card[data-mock^="esl"] .mock-badge {
  background: var(--success-light);
  color: var(--success);
}

.mock-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  transition: all 150ms ease;
}

.mock-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.bt-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
}

.bt-timer {
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.bt-prog {
  color: var(--text-2);
}

.exam-q {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--surface);
}

.exam-options .test-opt {
  padding: 10px 12px;
}

.exam-timer {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

.exam-review {
  font-size: 14px;
  padding: 9px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  font-weight: 500;
}

.exam-review.ok {
  background: var(--success-light);
  color: #15803D;
}

.exam-review.no {
  background: var(--error-light);
  color: #B91C1C;
}

/* Listening sections */
.ls-sec {
  margin-top: 22px;
}

.ls-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: var(--surface);
  margin-bottom: 14px;
}

.ls-box .listen-btn {
  margin-bottom: 8px;
}

.ls-qs .exam-q:first-child {
  margin-top: 14px;
}

/* ─── 26. IELTS Band Result ─────────────────────────────────────────────── */

.band-card {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  animation: fadeIn 300ms ease;
}

.band-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
  letter-spacing: 0.06em;
}

.band-main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
  margin-top: 16px;
}

.band-ring {
  position: relative;
  width: 160px;
  height: 160px;
  justify-self: center;
}

.band-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: var(--surface-2);
  stroke-width: 10;
}

.ring-fg {
  fill: none;
  stroke: var(--primary);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 440;
  stroke-dashoffset: 440;
  transition: stroke-dashoffset 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.band-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.band-val {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
}

.band-max {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 600;
  margin-top: 4px;
}

.band-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.band-stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
}

.band-stat b {
  display: block;
  font-size: 18px;
}

.band-stat span {
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.band-perf {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  background: var(--primary);
}

.band-next {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
}

.band-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-3);
}

.band-card .mini-btn {
  margin-top: 16px;
}

/* ─── 27. Settings ──────────────────────────────────────────────────────── */

.settings-page {
  max-width: 600px;
}

.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 14px;
}

.settings-name {
  font-size: 15px;
  font-weight: 600;
}

.settings-desc {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 3px;
}

.theme-options {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.theme-opt {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  background: var(--surface);
  border: 2px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  transition: all 150ms ease;
}

.theme-opt:hover {
  border-color: var(--primary);
}

.theme-opt.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.theme-swatch {
  width: 100%;
  height: 56px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.theme-swatch.light {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.theme-swatch.dark {
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

/* ─── 28. Translation Module ────────────────────────────────────────────── */

.tr-sentence {
  border: 1px solid var(--primary);
  border-radius: 12px;
  padding: 18px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  background: var(--primary-light);
  margin-bottom: 12px;
}

.tr-input {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  line-height: 1.6;
  outline: none;
  transition: border-color 150ms ease;
}

.tr-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.tr-answer {
  margin-top: 10px;
  border: 1px solid var(--success);
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  line-height: 1.7;
  background: var(--success-light);
}

.tr-answer.tr-good {
  border-color: var(--success);
  background: var(--success-light);
}

.tr-answer.tr-warn {
  border-color: var(--warning);
  background: var(--warning-light);
}

.tr-answer.tr-err {
  border-color: var(--error);
  background: var(--error-light);
  color: var(--error);
}

.tr-diff {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
}

.tr-diff-easy {
  background: var(--success-light);
  color: var(--success);
}

.tr-diff-mid {
  background: var(--warning-light);
  color: var(--warning);
}

.tr-diff-hard {
  background: var(--error-light);
  color: var(--error);
}

.tr-result {
  text-align: center;
  padding: 20px 10px 6px;
}

.tr-result-score {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -2px;
  color: var(--primary);
  line-height: 1;
}

.tr-prog {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 10px;
}

.tr-acc {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
}

.tr-challenge-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tr-challenge-btn {
  background: var(--warning);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 150ms;
}

.tr-challenge-btn:hover {
  background: #D97706;
}

.ch-bar {
  height: 5px;
  border-radius: 999px;
  background: var(--surface-2);
  margin-bottom: 12px;
  overflow: hidden;
}

.ch-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--warning);
  transition: width 300ms ease;
}

.tr-result-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  margin: 16px auto 20px;
  max-width: 320px;
  overflow: hidden;
}

.tr-result-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--success);
  transition: width 400ms ease;
}

.tr-result-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.tr-result-pct {
  font-size: 16px;
  font-weight: 700;
  margin-top: 4px;
}

.tr-result-msg {
  font-size: 15px;
  font-weight: 600;
  margin-top: 4px;
}

.tr-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tr-answer-btn {
  background: var(--success);
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: background 150ms;
}

.tr-answer-btn:hover {
  background: #15803D;
}

.tr-next-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 150ms;
}

.tr-next-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tr-practice {
  margin-top: 16px;
}

.tr-chal-note {
  font-size: 12px;
  color: var(--text-2);
}

/* Histories */
.hist-summary {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 12px 0 4px;
}

.hist-band-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface-2);
}

.hist-band-chip b {
  color: var(--text);
}

.hist-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.hist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--surface-2);
  font-size: 14px;
}

.hist-score {
  font-size: 14px;
  min-width: 40px;
}

.hist-pct {
  font-weight: 700;
  min-width: 44px;
}

.hist-date {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-3);
}

.hist-empty {
  text-align: center;
  padding: 30px 10px;
  color: var(--text-3);
  line-height: 1.8;
}

.hist-diff {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.hist-diff-easy {
  background: var(--success-light);
  color: var(--success);
}

.hist-diff-mid {
  background: var(--warning-light);
  color: var(--warning);
}

.hist-diff-hard {
  background: var(--error-light);
  color: var(--error);
}

/* ─── 29. Writing Module ────────────────────────────────────────────────── */

.write-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.wc-badge {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 5px 12px;
  border-radius: 999px;
}

.write-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms ease;
  font-family: inherit;
}

.write-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.write-btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.write-btn.primary:hover {
  background: var(--primary-hover);
}

.write-status {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
}

.write-score {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.write-score-num {
  font-size: 42px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

.write-score-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.write-grade {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.write-sub {
  font-size: 13px;
  color: var(--text-2);
}

.write-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.write-stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
}

.write-stat b {
  color: var(--primary);
  font-size: 14px;
}

.write-issues {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.write-issue {
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  background: var(--error-light);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.write-issue.ok {
  background: var(--success-light);
  border-color: rgba(22, 163, 74, 0.3);
}

.write-tip {
  font-size: 14px;
}

.model-text {
  white-space: pre-wrap;
}

.write-patterns {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.write-pattern {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  background: var(--primary-light);
  font-size: 14px;
}

/* ─── 30. Level Test ────────────────────────────────────────────────────── */

.lt-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 14px;
}

.lt-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--surface-2);
}

.lt-sec-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.lt-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
}

.lt-sec-name {
  font-size: 15px;
  font-weight: 700;
}

.lt-q {
  margin-bottom: 14px;
}

.lt-q:last-child {
  margin-bottom: 4px;
}

.lt-stem {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.lt-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.lt-opt {
  text-align: left;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 150ms ease;
  color: var(--text);
}

.lt-opt:hover {
  border-color: var(--primary);
}

.lt-opt.lt-sel {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.lt-actions {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lt-msg {
  font-size: 14px;
  font-weight: 600;
  color: var(--error);
}

.lt-result {
  margin-top: 18px;
}

.lt-result-inner {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  background: var(--primary-light);
}

.lt-result-lvl {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.lt-big {
  font-size: 18px;
  padding: 5px 14px;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
}

.lt-result-txt {
  font-size: 16px;
  line-height: 1.7;
  margin: 6px 0 12px;
}

.lt-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.lt-chip {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
}

.lt-chip-pass {
  background: var(--success-light);
  color: var(--success);
}

.lt-chip-fail {
  background: var(--error-light);
  color: var(--error);
}

.lt-result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ─── 31. Roadmap ───────────────────────────────────────────────────────── */

.roadmap-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px 14px;
  box-shadow: var(--shadow-card);
}

.roadmap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.roadmap-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.road-wrap {
  position: relative;
  padding: 12px 8px 4px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.road-wrap svg.road-core {
  display: block;
  width: 100%;
  height: auto;
}

.road-body {
  fill: none;
  stroke: var(--border);
  stroke-width: 13;
  stroke-linecap: round;
}

.road-dash {
  fill: none;
  stroke: var(--text-3);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 1.5 13;
  animation: roadDash 0.9s linear infinite;
}

@keyframes roadDash {
  to { stroke-dashoffset: -29; }
}

.road-deco {
  fill: none;
  stroke: var(--border);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.9;
}

.road-node .node-body {
  fill: var(--surface);
  stroke: var(--border);
  stroke-width: 2;
}

.road-node .node-label {
  font-size: 10.5px;
  font-weight: 700;
  fill: var(--text-2);
  letter-spacing: 0.02em;
  text-anchor: middle;
}

.road-node.done .node-body {
  fill: var(--success-light);
  stroke: var(--success);
}

.road-node.done .node-check {
  fill: none;
  stroke: var(--success);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.road-node.done .node-label {
  fill: var(--success);
}

.road-node.current .node-halo {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: haloPulse 1.7s ease-in-out infinite;
}

.road-node.current .node-label {
  fill: var(--primary);
  font-weight: 800;
}

@keyframes haloPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.55); opacity: 0; }
}

.road-robot {
  filter: drop-shadow(0 3px 5px rgba(15, 18, 30, 0.28));
}

.road-robot .rob-nested {
  overflow: visible;
}

.rob-bob {
  animation: roadBounce 0.55s ease-in-out infinite;
}

.rob-arm,
.rob-leg,
.rob-head {
  transform-box: view-box;
}

.arm-back {
  transform-origin: 45px 50px;
  animation: armSwingR 0.55s ease-in-out infinite;
}

.arm-front {
  transform-origin: 75px 50px;
  animation: armSwingL 0.55s ease-in-out infinite;
}

.leg-back {
  transform-origin: 46px 73px;
  animation: legStepR 0.55s ease-in-out infinite;
}

.leg-front {
  transform-origin: 62px 73px;
  animation: legStepL 0.55s ease-in-out infinite;
}

.rob-head {
  transform-origin: 56px 41px;
  animation: headWobble 0.55s ease-in-out infinite;
}

@keyframes armSwingL {
  0%, 100% { transform: rotate(-24deg); }
  50% { transform: rotate(24deg); }
}

@keyframes armSwingR {
  0%, 100% { transform: rotate(24deg); }
  50% { transform: rotate(-24deg); }
}

@keyframes legStepL {
  0%, 100% { transform: rotate(22deg); }
  50% { transform: rotate(-22deg); }
}

@keyframes legStepR {
  0%, 100% { transform: rotate(-22deg); }
  50% { transform: rotate(22deg); }
}

@keyframes headWobble {
  0%, 100% { transform: rotate(2.5deg); }
  50% { transform: rotate(-2.5deg); }
}

@keyframes roadBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* ─── 32. A1 Split Layout ───────────────────────────────────────────────── */

.a1-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.a1-col {
  min-width: 0;
}

.a1-col .wsec:first-child {
  margin-top: 0;
}

/* ─── 33. Animations ────────────────────────────────────────────────────── */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes bandIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ─── 34. Focus States (Accessibility) ──────────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ─── 35. Responsive Design ─────────────────────────────────────────────── */

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 260px;
    z-index: 200;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.15);
  }

  .main-wrapper,
  .main {
    margin-left: 0;
  }

  .hamburger {
    display: flex;
  }

  .content {
    padding: 20px;
  }

  .topbar {
    padding: 0 16px;
  }

  .dash-metrics,
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .dash-grid {
    grid-template-columns: 1fr;
  }

  .word-list-grid {
    grid-template-columns: 1fr;
  }

  .cefr-grid {
    grid-template-columns: 1fr;
  }

  .topic-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mock-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .continue-grid {
    grid-template-columns: 1fr;
  }

  .test-options {
    grid-template-columns: 1fr;
  }

  .dash {
    margin: 0 -20px;
    padding: 20px;
  }

  .dash-inner {
    padding: 20px;
  }

  .search-trigger {
    display: none;
  }

  .word-meanings {
    grid-template-columns: 1fr;
  }

  .a1-split {
    grid-template-columns: 1fr;
  }

  .band-main {
    grid-template-columns: 1fr;
  }

  .band-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .dash-actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .dash-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .dash-welcome {
    flex-direction: column;
    align-items: flex-start;
  }

  .word-title {
    font-size: 22px;
  }

  .test-question {
    font-size: 24px;
  }

  .result-score {
    font-size: 36px;
  }

  .tr-result-score {
    font-size: 40px;
  }

  .write-score-num {
    font-size: 32px;
  }

  .band-val {
    font-size: 32px;
  }

  .pt-big-badge {
    font-size: 26px;
  }

  .streak-days {
    flex-wrap: wrap;
  }

  .bt-top {
    font-size: 13px;
  }

  .lt-opts {
    grid-template-columns: 1fr;
  }

  .pt-opts {
    grid-template-columns: 1fr;
  }

  .pt-two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .dash-metrics,
  .stats {
    grid-template-columns: 1fr;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .mock-grid {
    grid-template-columns: 1fr;
  }

  .modal-cards {
    grid-template-columns: 1fr;
  }

  .band-stats {
    grid-template-columns: 1fr;
  }

  .theme-options {
    flex-direction: column;
  }

  .word-title {
    font-size: 20px;
  }

  .flash-text {
    font-size: 18px;
  }

  .voice-prompt {
    font-size: 18px;
  }

  .grammar-hero h3 {
    font-size: 20px;
  }

  .grammar-hero p {
    font-size: 13px;
  }
}

/* ─── 36. Dark Theme Overrides ──────────────────────────────────────────── */

[data-theme="dark"] {
  --band-color: var(--primary);
}

[data-theme="dark"] .glass {
  background: var(--surface);
  border-color: var(--border);
}

[data-theme="dark"] .stat-card::after {
  display: none;
}

[data-theme="dark"] .stat-card .num,
[data-theme="dark"] .metric-card-value {
  -webkit-text-fill-color: var(--primary);
}

[data-theme="dark"] .brand .logo {
  background: var(--primary);
}

[data-theme="dark"] .vtab:hover {
  border-color: var(--text-3);
  color: var(--text);
}

[data-theme="dark"] .g-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .g-table th {
  background: var(--primary-light);
  color: var(--primary);
}

[data-theme="dark"] .voice-result.correct {
  background: rgba(22, 163, 74, 0.15);
  color: #4ADE80;
}

[data-theme="dark"] .voice-result.wrong {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
}

[data-theme="dark"] .tf-btn.selected[data-v="true"] {
  background: rgba(22, 163, 74, 0.15);
  color: #4ADE80;
}

[data-theme="dark"] .tf-btn.selected[data-v="false"] {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
}

[data-theme="dark"] .tr-answer.tr-err {
  background: var(--error-light);
  color: #FCA5A5;
}

[data-theme="dark"] .tr-input {
  background: var(--surface);
}

[data-theme="dark"] .tr-answer {
  background: rgba(22, 163, 74, 0.1);
}

[data-theme="dark"] .lt-big {
  background: var(--primary);
}

[data-theme="dark"] .bell-panel {
  background: var(--surface);
  box-shadow: var(--shadow-dropdown);
}

[data-theme="dark"] .audio-btn {
  background: var(--primary-light);
}

[data-theme="dark"] .audio-btn:hover {
  background: var(--primary);
  color: #fff;
}

[data-theme="dark"] .pt-big-badge {
  background: var(--primary);
}

/* ─── 37. Test Card Overrides ───────────────────────────────────────────── */

.test-hero {
  margin-top: 44px;
}

.test-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.test-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.test-card {
  padding: 22px 20px;
}

.test-ic {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.test-card .topic-name {
  font-size: 16px;
}

.test-chip {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0;
  font-family: inherit;
}

.topic-card.test-card {
  background: var(--surface);
  border-color: var(--border);
}

.topic-card.test-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

.topic-card:hover .test-chip {
  border-color: var(--primary);
  color: var(--primary);
}

/* ─── 38. Grammar Grid ──────────────────────────────────────────────────── */

.word-list-grid.grammar-grid {
  grid-template-columns: repeat(2, 1fr);
}

/* ─── 39. Band Ring Center ──────────────────────────────────────────────── */

.band-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ─── 40. Histories (Translation) ───────────────────────────────────────── */

.hist-summary {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 12px 0 4px;
}

.hist-band-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface-2);
}

.hist-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.hist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--surface-2);
  font-size: 14px;
}

/* ─── 41. PT (Placement Test) ───────────────────────────────────────────── */

.pt-intro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.pt-intro-card {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: var(--surface);
}

.pt-intro-ic {
  font-size: 22px;
}

.pt-intro-name {
  font-size: 14px;
  font-weight: 700;
}

.pt-intro-steps {
  font-size: 12px;
  color: var(--text-2);
}

.pt-intro-note {
  font-size: 13px;
  color: var(--text-2);
  margin: 4px 0 14px;
  line-height: 1.6;
}

.pt-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  margin: 4px 0 14px;
}

.pt-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
  transition: width 300ms ease;
}

.pt-skill-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.pt-tab {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-2);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: all 150ms;
}

.pt-tab-on {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.pt-passage {
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-2);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 14px;
}

.pt-q {
  margin-bottom: 18px;
}

.pt-stem {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.6;
}

.pt-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pt-opt {
  text-align: left;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 150ms ease;
  color: var(--text);
}

.pt-opt:hover {
  border-color: var(--primary);
}

.pt-opt.pt-sel {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.pt-listen {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.pt-listen-hint {
  font-size: 12px;
  color: var(--text-2);
}

.pt-result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 10px 0 14px;
  flex-wrap: wrap;
}

.pt-result-lvl {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pt-big-badge {
  font-size: 30px;
  font-weight: 900;
  color: #fff;
  background: var(--primary);
  border-radius: 14px;
  padding: 10px 18px;
  letter-spacing: 0.02em;
}

.pt-result-level-name {
  font-size: 18px;
  font-weight: 800;
}

.pt-result-sub {
  font-size: 13px;
  color: var(--text-2);
}

.pt-ring {
  --ptv: 0%;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) var(--ptv), var(--border) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.pt-ring-in {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.pt-ring-in b {
  font-size: 20px;
  color: var(--primary);
}

.pt-ring-in span {
  font-size: 11px;
  color: var(--text-2);
}

.pt-band-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 16px;
}

.pt-chip {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
}

.pt-chip-pass {
  background: var(--success-light);
  color: var(--success);
}

.pt-chip-fail {
  background: var(--error-light);
  color: var(--error);
}

.pt-sec {
  margin-bottom: 14px;
}

.pt-skill-row {
  display: grid;
  grid-template-columns: 140px 1fr 50px 42px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.pt-skill-name {
  font-size: 14px;
  font-weight: 600;
}

.pt-skill-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.pt-skill-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
}

.pt-skill-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  text-align: right;
}

.pt-skill-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
  text-align: center;
}

.pt-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.pt-col {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--surface-2);
}

.pt-col h4 {
  margin-top: 0;
}

.pt-chip-line {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 0;
  border-bottom: 1px dashed var(--border);
}

.pt-chip-line:last-child {
  border-bottom: 0;
}

/* ─── 42. Voice/Banner ──────────────────────────────────────────────────── */

.voice-banner {
  background: var(--warning-light);
  border: 1px solid var(--warning);
  color: #92400E;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 12px;
}

[data-theme="dark"] .voice-banner {
  color: #FCD34D;
}

/* ─── 43. Engine Row ────────────────────────────────────────────────────── */

.engine-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-2);
}

/* ─── 44. Misc ──────────────────────────────────────────────────────────── */

.sound-hint {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: all 150ms;
}

.sound-hint:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ─── 45. Dark mode scrollbar ───────────────────────────────────────────── */

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #334155;
}

/* ─── 46. Print ─────────────────────────────────────────────────────────── */

@media print {
  .sidebar,
  .topbar,
  .hamburger,
  .overlay {
    display: none !important;
  }

  .main-wrapper,
  .main {
    margin-left: 0 !important;
  }

  .content {
    padding: 0;
  }

  .dash {
    margin: 0;
  }
}

/* ─── Utility: content typography ────────────────────────────────────────── */

.content h1,
.content h2,
.content h3 {
  line-height: 1.35;
  letter-spacing: -0.015em;
}
