/* ===================================================================
   0.0 IKONKA SHRIFTI — o'z serverimizdan
   ------------------------------------------------------------------
   Ilgari Material Symbols Google CDN'dan yuklanardi. Ikonkalar
   ligatura orqali chizilgani uchun shrift kelmasa foydalanuvchi
   ikonka o'rnida "rocket_launch" degan yozuvni ko'rardi. Endi shrift
   /fonts/ ichida — tashqi CDN'ga bog'liqlik yo'q, 64 KB, bir marta
   keshlanadi. Yangi ikonka kerak bo'lsa shriftni qayta yig'ish kerak
   (scripts/fetch_icon_font.js).
   =================================================================== */
@font-face {
  font-family: 'Material Symbols Rounded';
  font-style: normal;
  font-weight: 400 700;
  font-display: block;
  src: url('/fonts/material-symbols-rounded.woff2?v=3.3') format('woff2');
}

/* ===================================================================
   SafeStudy — Design System
   Theme-aware tokens (dark + light), navigation, cards, forms, a11y.
   Har bir sahifa shu fayldagi tokenlardan foydalanadi.
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700&family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block');

.material-symbols-rounded,
.material-symbols-outlined,
.material-icons {
  font-family: 'Material Symbols Rounded' !important;
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: 'liga' 1;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

/* ===================================================================
   0.1 IKONKA TIZIMI — "iOS Filled" uslubidagi to'ldirilgan ikonkalar
   ------------------------------------------------------------------
   Emoji har platformada boshqacha chiziladi (Windows/Android/iOS),
   rangini mavzuga moslay olmaydi va o'lchami matn bilan mos tushmaydi.
   Shu sabab barcha emoji shu yerdagi .ss-icon bilan almashtirildi:
   bitta variativ shrift, FILL=1 — ya'ni to'la bo'yalgan, iOS Filled
   ko'rinishidagi ikonka. Rangni `color` orqali meros oladi.
   =================================================================== */
.ss-icon {
  font-family: 'Material Symbols Rounded' !important;
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: 'liga' 1;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  user-select: none;
  flex: 0 0 auto;
  /* to'ldirilgan, biroz qalinroq — emoji o'rnida ham "og'irligi" saqlanadi */
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

/* Kontur ko'rinishi kerak bo'lganda */
.ss-icon.is-outline {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Mavjud .material-symbols-rounded konturligicha qoladi —
   variativ shriftga o'tgach ham ko'rinishi o'zgarmasin */
.material-symbols-rounded,
.material-symbols-outlined,
.material-icons {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.material-symbols-rounded.filled,
.material-symbols-rounded.is-filled {
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

/* Navigatsiya va tugma ikonkalari — .ss-icon bilan bir xil to'ldirilgan
   ko'rinishda bo'lsin, aks holda bitta panelda ikki xil uslub aralashadi */
.nav-item .material-symbols-rounded,
.mobile-nav-item .material-symbols-rounded,
.mobile-sub-item .material-symbols-rounded,
.mobile-group-header .material-symbols-rounded,
.bottom-bar-item .material-symbols-rounded,
.theme-toggle-btn .material-symbols-rounded,
.mobile-toggle-btn .material-symbols-rounded,
.btn .material-symbols-rounded,
.dropdown-item .material-symbols-rounded,
.dropdown-trigger .material-symbols-rounded {
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

/* Karta ichidagi "davom etish" strelkasi — hoverda biroz siljiydi,
   bu bosiladigan joy ekanini ko'rsatadi */
.feat-footer-link .feat-arrow {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.feat-card:hover .feat-footer-link .feat-arrow {
  transform: translateX(4px);
}
@media (prefers-reduced-motion: reduce) {
  .feat-footer-link .feat-arrow,
  .feat-card:hover .feat-footer-link .feat-arrow {
    transition: none;
    transform: none;
  }
}

/* O'lchamlar — matn yonida turganda optik muvozanat uchun */
.ss-icon.ic-14 { font-size: 14px; font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24; }
.ss-icon.ic-16 { font-size: 16px; font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24; }
.ss-icon.ic-18 { font-size: 18px; font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.ss-icon.ic-20 { font-size: 20px; }
.ss-icon.ic-22 { font-size: 22px; }
.ss-icon.ic-24 { font-size: 24px; font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.ss-icon.ic-28 { font-size: 28px; font-variation-settings: 'FILL' 1, 'wght' 450, 'GRAD' 0, 'opsz' 24; }
.ss-icon.ic-32 { font-size: 32px; font-variation-settings: 'FILL' 1, 'wght' 450, 'GRAD' 0, 'opsz' 24; }
.ss-icon.ic-40 { font-size: 40px; font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.ss-icon.ic-48 { font-size: 48px; font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }

/* Emoji rangini yo'qotmaslik uchun ma'no bo'yicha ranglar */
.ss-icon.ic-gold    { color: #F59E0B; }
.ss-icon.ic-fire    { color: #F97316; }
.ss-icon.ic-success { color: var(--accent-emerald-text); }
.ss-icon.ic-danger  { color: var(--accent-rose-text, #F87171); }
.ss-icon.ic-info    { color: var(--accent-blue-text); }
.ss-icon.ic-violet  { color: var(--accent-violet-text); }

/* Shrift yuklanmaguncha ligatura nomi ("rocket_launch") ko'rinmasligi
   uchun shrift havolasida `display=block` ishlatilgan — brauzer shrift
   kelguncha ikonka o'rnini bo'sh qoldiradi, matn chizmaydi. */

/* Qo'shimcha himoya: shrift juda sekin kelsa (yoki bloklansa) brauzer
   3 soniyadan keyin ligaturani oddiy matn sifatida chizib yuboradi —
   "featured_play_list" degan yozuv paydo bo'ladi. Sahifa boshidagi
   kichik skript <html> ga .icons-loading qo'yadi va shrift tayyor
   bo'lgach olib tashlaydi; JS ishlamasa klass umuman qo'yilmaydi,
   ya'ni ikonkalar baribir ko'rinadi. */
html.icons-loading .ss-icon,
html.icons-loading .material-symbols-rounded,
html.icons-loading .material-symbols-outlined,
html.icons-loading .material-icons {
  visibility: hidden;
}


/* ===================================================================
   1. DESIGN TOKENS — DARK (default)
   =================================================================== */
:root {
  color-scheme: dark;

  /* Surfaces */
  --bg-body: #070a12;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #1e293b;
  --bg-surface-hover: #27354f;
  --bg-inset: rgba(15, 23, 42, 0.6);
  --bg-scrim: rgba(0, 0, 0, 0.7);
  --bg-nav: rgba(15, 23, 42, 0.85);
  --bg-overlay: rgba(15, 23, 42, 0.96);

  /* Ambient page glow (sahifa fonidagi radial nur) */
  --glow-primary: rgba(37, 99, 235, 0.18);
  --glow-secondary: rgba(16, 185, 129, 0.10);

  /* Borders */
  --border-subtle: #1e293b;
  --border-hairline: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-focus: #3b82f6;
  --border-active: #6366f1;

  /* Text — barchasi WCAG AA (4.5:1) dan yuqori */
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-on-accent: #ffffff;

  /* Solid accents (fon uchun) */
  --accent-blue: #2563eb;
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-cyan: #38bdf8;
  --accent-violet: #8b5cf6;

  /* Accent text (matn uchun — mavzuga qarab kontrast saqlanadi) */
  --accent-blue-text: #93c5fd;
  --accent-blue-light: #93c5fd;
  --accent-emerald-text: #6ee7b7;
  --accent-emerald-light: #6ee7b7;
  --accent-amber-text: #fcd34d;
  --accent-rose-text: #fda4af;
  --accent-violet-text: #c4b5fd;
  --accent-cyan-text: #7dd3fc;

  /* Accent washes (yumshoq fon) */
  --wash-blue: rgba(37, 99, 235, 0.14);
  --wash-emerald: rgba(16, 185, 129, 0.14);
  --wash-amber: rgba(245, 158, 11, 0.14);
  --wash-rose: rgba(244, 63, 94, 0.14);
  --wash-violet: rgba(139, 92, 246, 0.14);

  --font-main: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-color: rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px rgba(37, 99, 235, 0.25);

  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);

  --nav-height: 64px;
  --bottom-bar-height: 64px;
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-left: env(safe-area-inset-left, 0px);
  --safe-area-right: env(safe-area-inset-right, 0px);
}

/* ===================================================================
   2. DESIGN TOKENS — LIGHT
   html.theme-light — FOUC oldini olish uchun <head> da qo'yiladi.
   body.theme-light — eski kodga moslik uchun saqlanadi.
   =================================================================== */
html.theme-light,
body.theme-light {
  color-scheme: light;

  --bg-body: #f6f8fc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-hover: #e2e8f0;
  --bg-inset: rgba(241, 245, 249, 0.8);
  --bg-scrim: rgba(15, 23, 42, 0.45);
  --bg-nav: rgba(255, 255, 255, 0.9);
  --bg-overlay: rgba(255, 255, 255, 0.98);

  --glow-primary: rgba(37, 99, 235, 0.10);
  --glow-secondary: rgba(16, 185, 129, 0.07);

  --border-subtle: #e2e8f0;
  --border-hairline: rgba(15, 23, 42, 0.10);
  --border-strong: rgba(15, 23, 42, 0.18);

  --text-primary: #0f172a;
  --text-secondary: #3f4c60;
  --text-muted: #55637a;

  --accent-blue-text: #1d4ed8;
  --accent-blue-light: #1d4ed8;
  --accent-emerald-text: #047857;
  --accent-emerald-light: #047857;
  --accent-amber-text: #b45309;
  --accent-rose-text: #be123c;
  --accent-violet-text: #6d28d9;
  --accent-cyan-text: #0369a1;

  --wash-blue: rgba(37, 99, 235, 0.10);
  --wash-emerald: rgba(16, 185, 129, 0.12);
  --wash-amber: rgba(245, 158, 11, 0.16);
  --wash-rose: rgba(244, 63, 94, 0.10);
  --wash-violet: rgba(139, 92, 246, 0.12);

  --shadow-color: rgba(15, 23, 42, 0.10);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 24px rgba(37, 99, 235, 0.14);
}

/* ===================================================================
   3. BASE
   =================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: var(--bg-body);
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent-blue-text);
}

::selection {
  background: rgba(37, 99, 235, 0.35);
  color: var(--text-primary);
}

/* Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--bg-surface-hover) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: var(--bg-surface-hover);
  border-radius: 100px;
  border: 2px solid transparent;
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
  background-clip: content-box;
}

/* Klaviatura fokusi — a11y uchun majburiy */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: 6px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* Sichqoncha bosilganda halqa ko'rinmasin */
:focus:not(:focus-visible) {
  outline: none;
}

/* Klaviatura bilan yurganlar uchun asosiy kontentga o'tish */
.skip-to-content {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translate(-50%, -200%);
  z-index: 4000;
  background: var(--accent-blue);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.skip-to-content:focus {
  transform: translate(-50%, 0);
}

/* Harakatni kamaytirish sozlamasi yoqilganda */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===================================================================
   4. TOP NAVBAR
   =================================================================== */
.main-navbar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-hairline);
  z-index: 1000;
  padding-top: var(--safe-area-top);
  box-sizing: border-box;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(12px, 2vw, 24px);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Brand */
.nav-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  text-decoration: none;
  color: var(--text-primary);
  line-height: 1;
}

/* Wordmark logo — oq harflar + to'q siyohrang kontur,
   shu sababli kunduzgi va tungi rejimda ham o'qiladi.
   Kunduzgi rejimda oq harflar yo'qolmasligi uchun yengil soya beriladi. */
.brand-logo {
  height: 34px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

html.theme-light .brand-logo,
body.theme-light .brand-logo {
  filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.18));
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #2563EB, #6366F1);
  color: #fff;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
  flex-shrink: 0;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  white-space: nowrap;
}

.brand-sub {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--accent-blue-text);
  font-family: var(--font-mono);
  white-space: nowrap;
  padding-left: 3px;
}

/* Navigation Links (Desktop) */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);
  border: 1px solid transparent;
  white-space: nowrap;
}

.nav-item .material-symbols-rounded {
  font-size: 17px;
  opacity: 0.85;
}

.nav-item:hover {
  color: var(--text-primary);
  background-color: var(--bg-surface-elevated);
}

.nav-item.active {
  color: var(--accent-blue-text);
  background-color: var(--wash-blue);
  border-color: rgba(59, 130, 246, 0.3);
  font-weight: 700;
}

.nav-item.active .material-symbols-rounded {
  opacity: 1;
  color: var(--accent-blue-text);
}

/* Dropdown Menu (IELTS) */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-main);
  transition: color var(--transition-fast), background-color var(--transition-fast);
  white-space: nowrap;
}

.dropdown-trigger .material-symbols-rounded {
  font-size: 18px;
}

.dropdown-trigger .drop-arrow {
  font-size: 16px;
  transition: transform 0.2s ease;
}

.dropdown-trigger:hover,
.dropdown-trigger.active {
  color: var(--text-primary);
  background-color: var(--bg-surface-elevated);
}

.dropdown-trigger.active {
  color: var(--accent-blue-text);
  background-color: var(--wash-blue);
  border-color: rgba(59, 130, 246, 0.3);
  font-weight: 700;
}

.nav-dropdown.open .dropdown-trigger .drop-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-surface-elevated, #ffffff);
  border: 1px solid var(--border-hairline, rgba(0,0,0,0.1));
  border-radius: 18px;
  padding: 8px;
  min-width: 290px;
  max-width: min(340px, calc(100vw - 24px));
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
  display: none;
  flex-direction: column;
  gap: 4px;
  animation: fadeIn 0.18s ease;
  z-index: 1100;
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 14px;
}

body.theme-light .dropdown-menu {
  background: #ffffff !important;
  border-color: rgba(226, 232, 240, 0.95) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

body.theme-dark .dropdown-menu {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55) !important;
}

/* Hover bilan ochilish faqat haqiqiy kursorli qurilmalarda */
@media (hover: hover) and (pointer: fine) {
  .nav-dropdown:hover .dropdown-menu {
    display: flex;
  }
}

.nav-dropdown.open .dropdown-menu {
  display: flex !important;
}


.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-main);
}

.dropdown-item:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.dropdown-item.active {
  color: var(--accent-blue-text);
  background: var(--wash-blue);
}

.drop-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 18px;
}

.drop-icon-box.blue { background: var(--wash-blue); color: var(--accent-blue-text); }
.drop-icon-box.purple { background: var(--wash-violet); color: var(--accent-violet-text); }
.drop-icon-box.amber { background: var(--wash-amber); color: var(--accent-amber-text); }
.drop-icon-box.emerald { background: var(--wash-emerald); color: var(--accent-emerald-text); }

.drop-text-box {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.drop-text-box strong {
  font-size: 13.5px;
  color: var(--text-primary);
}

.drop-text-box span {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Nav Right & HUD */
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-hud-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 10px;
}

.hud-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.hud-item .material-symbols-rounded {
  font-size: 16px;
}

.hud-item.streak { color: #f97316; }
.hud-item.coins { color: var(--accent-amber-text); }
.hud-item.xp { color: var(--accent-emerald-text); }

body.theme-light .hud-item.streak,
html.theme-light .hud-item.streak { color: #c2410c; }

.hud-divider {
  width: 1px;
  height: 14px;
  background: var(--border-subtle);
}

/* User Profile Menu */
.user-profile-menu {
  position: relative;
}

.profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 10px 4px 4px;
  cursor: pointer;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  transition: border-color var(--transition-fast);
}

.profile-btn:hover {
  border-color: var(--border-focus);
}

.user-avatar-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-surface);
  display: grid;
  place-items: center;
  font-size: 14px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.user-avatar-badge.large {
  width: 44px;
  height: 44px;
  font-size: 22px;
}

.plan-pill {
  background: var(--wash-blue);
  color: var(--accent-blue-text);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 100px;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 10px;
  min-width: 240px;
  max-width: calc(100vw - 24px);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 1100;
  animation: fadeIn 0.18s ease;
}

.profile-dropdown.open {
  display: flex;
}

.profile-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 12px 10px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
  min-width: 0;
}

.profile-dropdown-header > div {
  min-width: 0;
}

.profile-dropdown-header strong {
  display: block;
  font-size: 14px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-dropdown-header #dropdown-email {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prof-drop-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  display: grid;
  place-items: center;
  font-size: 18px;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
  overflow: hidden;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 6px 0;
}

.text-danger {
  color: var(--accent-rose-text) !important;
}

/* Theme Switcher */
.theme-toggle-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.theme-toggle-btn .material-symbols-rounded {
  font-size: 18px;
}

.theme-toggle-btn:hover {
  background-color: var(--bg-surface-hover);
  border-color: var(--border-focus);
}

/* Mobile Hamburger */
.mobile-toggle-btn {
  display: none;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.mobile-toggle-btn .material-symbols-rounded {
  font-size: 22px;
}

/* ===================================================================
   5. MOBILE DRAWER
   =================================================================== */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-scrim);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* Yopilishda visibility animatsiya tugagach o'zgaradi, ochilishda — darhol */
  transition: opacity 0.28s ease, visibility 0s linear 0.28s;
}

.mobile-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.28s ease, visibility 0s linear 0s;
}

.mobile-drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 86vw;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-hairline);
  z-index: 2001;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  /* Ochilganda panel darhol ko'rinadi (fokus berish uchun),
     yopilganda esa sirg'anish tugagach yashiriladi */
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.3s;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4);
}

.mobile-drawer-panel.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0s;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-drawer-close {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.mobile-user-card {
  margin: 16px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px;
}

.mobile-user-card .drawer-user-name {
  font-weight: 800;
  font-size: 15px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-user-card .drawer-user-mail {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.mobile-stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: var(--text-secondary);
}

.mobile-stat-box strong {
  font-size: 12.5px;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.mobile-nav-list {
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  min-height: 46px;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
  background: var(--bg-surface-elevated);
  color: var(--accent-blue-text);
}

.mobile-nav-item.active {
  background: var(--wash-blue);
  font-weight: 700;
}

.mobile-nav-group {
  margin: 6px 0;
  border-radius: 12px;
  background: var(--bg-surface-elevated);
  padding: 8px 12px;
}

.mobile-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.mobile-group-sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 28px;
}

.mobile-sub-item {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 9px 0;
  font-weight: 600;
}

.mobile-sub-item.active {
  color: var(--accent-blue-text);
  font-weight: 700;
}

.mobile-drawer-footer {
  padding: 16px;
  border-top: 1px solid var(--border-subtle);
}

/* ===================================================================
   6. MOBILE BOTTOM APP BAR
   =================================================================== */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: var(--bottom-bar-height);
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-hairline);
  z-index: 1500;
  padding: 0 2px env(safe-area-inset-bottom, 0px);
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.25);
}

.bottom-bar-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
  padding: 9px 2px 7px;
  border-radius: 12px;
  transition: color var(--transition-fast), transform 0.12s ease;
  flex: 1 1 0;
  min-width: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-main);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Faol bo'lim tepasidagi kichik ko'rsatkich — qaysi bo'limdaligi
   rangdan tashqari shakl bilan ham bilinadi */
.bottom-bar-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 26px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--accent-blue);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.bottom-bar-item.active::before {
  transform: translateX(-50%) scaleX(1);
}

.bottom-bar-item:active {
  transform: scale(0.94);
}

/* Imtihon rejimida sayt navigatsiyasi yashiriladi — savollar palitrasi
   va "Tekshirish" tugmasi pastki menyu ostida qolib ketmasin */
body.exam-mode .mobile-bottom-bar {
  display: none !important;
}

body.exam-mode {
  padding-bottom: 0 !important;
}

/* Imtihon boshlangach sahifaning tanishtiruv qismi kerak emas.
   Telefonda u ~450px joy egallar edi: o'quvchi savolga yetguncha
   modul yorliqlari, sarlavha va tavsifni aylantirib o'tishi kerak
   bo'lardi — vaqt esa ketayotgan bo'ladi. */
body.exam-mode .section-nav-tabs,
body.exam-mode .page-header {
  display: none !important;
}

/* Yozuv ikkinchi qatorga o'tib panelni cho'zib yubormasin: eng tor
   telefonda ("AI Coach" kabi ikki so'zli yorliqda) panel balandligi
   o'zgarib, sahifa pastki chekkasi silkinardi. */
.bottom-bar-item > span:not(.material-symbols-rounded):not(.ss-icon) {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.bottom-bar-item .material-symbols-rounded {
  font-size: 22px;
  transition: transform 0.2s ease;
}

.bottom-bar-item:hover,
.bottom-bar-item.active {
  color: var(--accent-blue-text);
}

.bottom-bar-item.active .material-symbols-rounded {
  color: var(--accent-blue-text);
  transform: translateY(-2px);
}

.btn-ghost-bottom {
  cursor: pointer;
}

/* ===================================================================
   7. LAYOUT
   =================================================================== */
.app-container {
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px;
  flex: 1;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header h1,
.page-header h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.page-header p {
  color: var(--text-secondary);
  font-size: 14.5px;
  margin-top: 4px;
}

.section-nav-tabs {
  display: flex;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 6px;
  border-radius: var(--radius-md);
  margin-bottom: 28px;
  overflow-x: auto;
}

.section-tab-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.section-tab-link:hover {
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
}

.section-tab-link.active {
  color: var(--accent-blue-text);
  background: var(--bg-surface-elevated);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

/* ===================================================================
   8. CARDS & GRIDS
   =================================================================== */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  min-width: 0;
}

.card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: var(--shadow-md);
}

.category-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-glow);
}

.category-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}

.cat-icon-blue { background: var(--wash-blue); color: var(--accent-blue-text); }
.cat-icon-emerald { background: var(--wash-emerald); color: var(--accent-emerald-text); }
.cat-icon-amber { background: var(--wash-amber); color: var(--accent-amber-text); }
.cat-icon-rose { background: var(--wash-rose); color: var(--accent-rose-text); }
.cat-icon-cyan { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan-text); }

.brand-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-emerald-text);
  background: var(--wash-emerald);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

/* ===================================================================
   9. BUTTONS
   =================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), opacity var(--transition-fast);
}

.btn:disabled,
.btn[disabled],
.btn.is-loading {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  opacity: 0.94;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-focus);
}

.btn-emerald {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-emerald:hover {
  opacity: 0.94;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

/* ===================================================================
   10. FORM CONTROLS
   =================================================================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
select,
textarea {
  font-family: var(--font-main);
  color: var(--text-primary);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--border-focus);
}

/* ===================================================================
   11. QUIZ & SPLIT VIEWS
   =================================================================== */
.quiz-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.question-text {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 26px;
  line-height: 1.5;
  color: var(--text-primary);
}

.options-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 26px;
}

.option-btn {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.option-btn:hover:not(:disabled) {
  border-color: var(--border-focus);
  background-color: var(--wash-blue);
}

.option-btn.correct {
  background-color: var(--wash-emerald) !important;
  border-color: var(--accent-emerald) !important;
  color: var(--accent-emerald-text) !important;
}

.option-btn.wrong {
  background-color: var(--wash-rose) !important;
  border-color: var(--accent-rose) !important;
  color: var(--accent-rose-text) !important;
}

/* IELTS Split View */
.ielts-split-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.passage-container,
.questions-container {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  overscroll-behavior: contain;
  min-width: 0;
}

.passage-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
  white-space: pre-line;
}

/* Voice Coach Visualizer */
.voice-visualizer {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 3px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin: 24px auto;
  transition: all var(--transition-normal);
}

.voice-visualizer.listening {
  border-color: var(--border-focus);
  box-shadow: 0 0 35px rgba(56, 189, 248, 0.5);
  animation: pulseScale 1.4s infinite ease-in-out;
}

.voice-visualizer.speaking {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.5);
  animation: pulseScale 1s infinite ease-in-out;
}

@keyframes pulseScale {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* Flashcards */
.flashcard {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
  min-width: 0;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.flashcard:hover {
  border-color: var(--border-focus);
  transform: translateY(-3px);
}

.flashcard-word {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.flashcard-trans {
  font-size: 15px;
  color: var(--accent-blue-text);
  font-weight: 600;
  margin-top: 4px;
}

.flashcard-example {
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 10px;
  background: var(--bg-surface-elevated);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

/* Table */
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table th {
  padding: 14px 18px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 14px;
  color: var(--text-primary);
}

.table tr:hover td {
  background-color: var(--bg-surface-elevated);
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  right: 16px;
  left: 16px;
  max-width: 380px;
  margin: 0 0 0 auto;
  z-index: 1600;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInToast 0.25s ease;
  pointer-events: auto;
  max-width: 100%;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.success { border-left: 4px solid var(--accent-emerald); }
.toast.error { border-left: 4px solid var(--accent-rose); }
.toast.info { border-left: 4px solid var(--accent-blue); }

@keyframes slideInToast {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===================================================================
   12. AUTH & ONBOARDING
   =================================================================== */
.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.auth-logo-badge {
  width: 56px;
  height: 56px;
  background: var(--wash-blue);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 12px auto;
}

.auth-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-tab-switch {
  display: flex;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
}

.auth-tab-btn {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  font-family: var(--font-main);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.auth-tab-btn.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.auth-form-group {
  margin-bottom: 16px;
  text-align: left;
}

.auth-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.auth-input {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 14.5px;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.auth-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.auth-input[aria-invalid="true"] {
  border-color: var(--accent-rose);
}

.field-error {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-rose-text);
}

.otp-cells-container {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 14px;
}

.otp-cell {
  width: 46px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  font-family: var(--font-mono);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.otp-cell:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.info-banner {
  background: var(--wash-blue);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--accent-blue-text);
  margin-bottom: 16px;
}

/* Onboarding */
.onboarding-stepper {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 32px;
}

.stepper-line {
  position: absolute;
  top: 18px;
  left: 30px;
  right: 30px;
  height: 2px;
  background: var(--border-subtle);
  z-index: 1;
}

.step-item {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13.5px;
  color: var(--text-muted);
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.step-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.step-item.active .step-circle {
  border-color: var(--border-focus);
  background: var(--accent-blue);
  color: #fff;
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.4);
}

.step-item.active .step-title {
  color: var(--text-primary);
}

.step-item.completed .step-circle {
  border-color: var(--accent-emerald);
  background: var(--accent-emerald);
  color: #fff;
}

.onboarding-step-content {
  display: none;
}

.onboarding-step-content.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

.goals-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.goal-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.goal-card:hover {
  border-color: var(--border-focus);
  background: var(--bg-surface-hover);
}

.goal-card.selected {
  border-color: var(--border-focus);
  background: var(--wash-blue);
  box-shadow: 0 0 18px rgba(37, 99, 235, 0.15);
}

.goal-icon {
  font-size: 26px;
}

.goal-info h4 {
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 3px;
  color: var(--text-primary);
}

.goal-info p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.interests-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 24px;
}

.interest-chip {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-main);
  transition: border-color var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast);
}

.interest-chip:hover {
  border-color: var(--border-focus);
  color: var(--text-primary);
}

.interest-chip.selected {
  background: var(--wash-blue);
  border-color: var(--border-focus);
  color: var(--accent-blue-text);
  font-weight: 700;
}

/* ===================================================================
   12.5 TOUCH TARGETS
   Sensorli ekranlarda kichik tugmalarni bosish qiyin —
   WCAG 2.5.8 bo'yicha minimal o'lcham ta'minlanadi.
   =================================================================== */
/* ===================================================================
   TEGINISH BILAN BOSHQARISH (telefon, planshet)

   Apple va Google tavsiyasi — bosiladigan element kamida 44×44 px.
   Quyidagi qoidalar butun sayt bo'ylab ishlaydi, shuning uchun har bir
   sahifada alohida tuzatish shart emas.
   =================================================================== */
@media (pointer: coarse) {
  .btn,
  .section-tab-link,
  .speed-chip,
  .difficulty-chip,
  .filter-btn-pill,
  .topic-pill-btn,
  .interest-chip,
  .auth-tab-btn,
  .part-tab-btn,
  .plan-cta-btn,
  .dropdown-item,
  .mobile-nav-item,
  .mobile-sub-item,
  .mode-btn,
  .mini-btn,
  .wr-tab,
  .sp-tab,
  .lst-tab,
  .lst-mini,
  .wr-switch button,
  .sp-filter button,
  .lb-period-btn,
  .lst-pal-btn,
  .coach-voice-opt,
  .transcript-tool-btn,
  .tfng-option-btn,
  .task-tab-btn {
    min-height: 44px !important;
  }

  /* Kvadrat ikonka tugmalari */
  .theme-toggle-btn,
  .mobile-toggle-btn,
  .mobile-drawer-close,
  .profile-btn,
  .icon-btn,
  .lst-flag,
  .ssc-hbtn,
  .ssc-send,
  .mini {
    min-width: 44px !important;
    min-height: 44px !important;
  }

  /* Logotip havolasi ham qulay bosilsin */
  .brand-link {
    min-height: 44px;
    justify-content: center;
  }

  /* Maydonlar ham barmoq uchun qulay bo'lsin */
  .auth-input,
  .lst-gap,
  .gap-input,
  .wr-editor,
  .sp-answer,
  .lst-select,
  .heading-select,
  select,
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"] {
    min-height: 44px;
    font-size: 16px;   /* iOS bu o'lchamdan kichigida sahifani kattalashtiradi */
  }

  /* Kichik belgilash katakchalari uchun kengaytirilgan maydon */
  input[type="checkbox"],
  input[type="radio"] {
    min-width: 22px;
    min-height: 22px;
  }

  /* Variant qatorlari — butun qator bosiladigan bo'lsin */
  .option-label-box,
  .lst-opt,
  .lst-letter-row {
    min-height: 48px;
  }

  /* Hoverga bog'liq bezaklar teginishda o'chadi */
  .wr-card:hover,
  .sp-card:hover,
  .lst-part-card:hover {
    transform: none;
  }
}

/* ===================================================================
   13. UTILITIES
   =================================================================== */
.surface-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skeleton yuklanish holati */
.skeleton {
  background: linear-gradient(90deg, var(--bg-surface-elevated) 25%, var(--bg-surface-hover) 37%, var(--bg-surface-elevated) 63%);
  background-size: 400% 100%;
  animation: skeletonShine 1.4s ease infinite;
  border-radius: var(--radius-md);
}

@keyframes skeletonShine {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* Bo'sh holat (empty state) */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-secondary);
}

.empty-state .material-symbols-rounded {
  font-size: 48px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 14px;
  max-width: 420px;
  margin: 0 auto;
}

/* ===================================================================
   14. RESPONSIVE
   =================================================================== */
/* Menyu 5 ta elementga tushirilgan bo'lsa ham, HUD (streak, tanga, XP)
   tor ekranlarda joyni yeb qo'yadi va menyu matni kesila boshlaydi.
   Shuning uchun avval ikkilamchi ko'rsatkichlar yashiriladi, XP qoladi. */
@media (max-width: 1500px) {
  .header-hud-strip .hud-item.streak,
  .header-hud-strip .hud-item.coins,
  .header-hud-strip .hud-divider {
    display: none !important;
  }
}

/* Bundan tor ekranda HUD butunlay olib tashlanadi — aks holda menyu
   siqilib, matn kesila boshlaydi. Streak, tanga va XP profil sahifasida
   hamda boshqaruv panelida baribir ko'rinadi. */
@media (max-width: 1400px) {
  .header-hud-strip {
    display: none !important;
  }
}

@media (max-width: 1360px) {
  .profile-name,
  .profile-btn .drop-arrow,
  .profile-btn .plan-pill {
    display: none !important;
  }
  .profile-btn {
    padding: 3px !important;
    border-radius: 50% !important;
  }
}

@media (max-width: 1280px) {
  .nav-links {
    display: none !important;
  }
  .mobile-toggle-btn {
    display: flex !important;
  }
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ielts-split-view {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .passage-container {
    max-height: 480px;
  }
  .questions-container {
    max-height: none;
  }
}

@media (max-width: 768px) {
  html, body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: clip !important;
  }
  body {
    padding-bottom: calc(var(--bottom-bar-height) + 16px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .mobile-bottom-bar {
    display: flex !important;
  }
  .app-container {
    padding: 14px 12px 28px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .main-navbar, .nav-container {
    width: 100% !important;
    max-width: 100% !important;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    width: 100% !important;
  }
  .page-header h1 {
    font-size: clamp(20px, 5.5vw, 24px);
    line-height: 1.25;
  }
  .page-header p {
    font-size: 13px;
  }
  .grid-2, .grid-3, .grid-4, .criteria-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px;
    width: 100% !important;
  }
  .section-nav-tabs {
    gap: 6px;
    padding: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    margin-bottom: 18px;
    width: 100% !important;
    max-width: 100% !important;
  }
  .section-nav-tabs::-webkit-scrollbar {
    display: none;
  }
  .section-tab-link {
    padding: 10px 14px;
    font-size: 13px;
  }
  .nav-guest-start-btn {
    display: none !important;
  }
  .nav-guest-login-btn {
    display: inline-flex !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
  }
  .header-hud-strip {
    display: none !important;
  }
  .profile-name,
  .profile-btn .drop-arrow,
  .profile-btn .plan-pill {
    display: none !important;
  }
  .profile-btn {
    padding: 2px !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: none !important;
  }
  .user-avatar-badge {
    width: 34px !important;
    height: 34px !important;
    font-size: 16px !important;
    background: var(--bg-surface-elevated) !important;
  }
  .nav-container {
    padding: 0 14px;
    height: 58px;
  }
  .card, .category-card, .flashcard, .quiz-box {
    padding: 18px 16px;
    border-radius: 16px;
    width: 100% !important;
    max-width: 100% !important;
  }
  .passage-container, .questions-container {
    padding: 18px 16px;
  }
  .podium-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    width: 100% !important;
  }
  .podium-card.first {
    order: -1;
  }
  .audio-player-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    width: 100% !important;
  }
  .table-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
  }
  .table th, .table td {
    padding: 12px 8px;
    font-size: 12.5px;
  }
  /* iOS Safari 16px dan kichik inputga zoom qiladi */
  input, select, textarea {
    font-size: 16px !important;
  }
  .modal-content, .reading-modal-content {
    width: 95vw !important;
    max-width: 95vw !important;
    padding: 20px 16px !important;
    border-radius: 20px !important;
  }
  .quiz-option-btn {
    padding: 14px 16px !important;
    font-size: 14px !important;
    min-height: 50px !important;
  }
  .toast-container {
    bottom: calc(var(--bottom-bar-height) + 16px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 700px) {
  .goals-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 480px) {
  .brand-sub {
    display: none;
  }
  .brand-name {
    font-size: 15.5px;
  }
  .brand-icon {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
  .theme-toggle-btn {
    width: 36px !important;
    height: 36px !important;
  }
  .mobile-toggle-btn {
    width: 36px !important;
    height: 36px !important;
  }
  .nav-right {
    gap: 6px !important;
  }
  .bottom-bar-item {
    font-size: 9.5px;
    padding: 8px 1px;
  }
  .bottom-bar-item .material-symbols-rounded {
    font-size: 21px;
  }
  .otp-cells-container {
    gap: 6px;
  }
  .otp-cell {
    width: clamp(36px, 11vw, 44px);
    height: clamp(44px, 13vw, 50px);
    font-size: 18px;
  }
  .filter-btn-pill {
    padding: 8px 12px;
    font-size: 12px;
  }
  .vocab-search-input {
    max-width: 100%;
  }
  .btn-cta-primary, .btn-cta-secondary {
    width: 100%;
    padding: 12px 18px;
    font-size: 14px;
  }
  .quiz-box {
    padding: 16px 14px;
  }
}

/* ===================================================================
   MOBIL TAJRIBA — telefonda ilovadek his qilinishi uchun

   Bu blok IELTS bo'limlarining yangi tarkiblariga (.lst-, .wr-, .sp-)
   va umumiy teginish xatti-harakatiga tegishli.
   =================================================================== */

/* Bosilganda ko'k "flash" chiqmasin va ikki marta bosish sahifani
   kattalashtirmasin — bu ikkisi mobil saytni web-sayt emas, ilovaga
   o'xshatadigan eng sezilarli tafsilotlar. */
a, button, [role="button"], .lst-opt, .lst-letter-row, .option-label-box,
.wr-card, .sp-card, .lst-part-card, .bottom-bar-item {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Gorizontal siljiydigan qatorlar (chiplar, palitra, jadval) barmoq
   bilan silliq va "yopishqoq" siljisin */
.lst-pal-scroll,
.wr-switch,
.sp-filter,
.section-nav-tabs,
.lst-map-scroll,
.wr-vis-box {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.lst-pal-scroll::-webkit-scrollbar,
.wr-switch::-webkit-scrollbar,
.sp-filter::-webkit-scrollbar,
.lst-map-scroll::-webkit-scrollbar,
.wr-vis-box::-webkit-scrollbar {
  display: none;
}

@media (max-width: 768px) {
  /* --- Kartalar ichidagi bo'shliq: kichik ekranda kontentga joy --- */
  .lst-paper,
  .wr-panel,
  .sp-mic-panel,
  .sp-examiner,
  .lst-part-card,
  .wr-card,
  .sp-card {
    padding: 15px !important;
    border-radius: 18px !important;
  }

  /* --- Yuqoridagi yopishqoq panel: ixchamroq --- */
  .lst-topbar,
  .wr-topbar,
  .sp-topbar {
    padding: 8px 11px !important;
    gap: 8px !important;
    border-radius: 14px !important;
  }

  /* --- Modal oynalar telefonda pastdan chiqadigan varaq ko'rinishida --- */
  .lst-modal,
  .sp-modal {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .lst-modal-card,
  .sp-modal-card {
    border-radius: 24px 24px 0 0 !important;
    max-height: 92vh;
    overflow-y: auto;
    /* margin:auto varaqni markazga tortib qo'yadi — pastga bosamiz */
    margin: auto 0 0 0 !important;
    padding: 20px 16px calc(24px + env(safe-area-inset-bottom, 0px)) !important;
    animation: sheetUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }

  /* Varaqning tepasida "tortish" chizig'i — mobil odat */
  .lst-modal-card::before,
  .sp-modal-card::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 99px;
    background: var(--border-strong);
    margin: -6px auto 14px;
  }
  @keyframes sheetUp {
    from { transform: translateY(24px); opacity: 0.6; }
    to { transform: translateY(0); opacity: 1; }
  }

  /* --- Savol paneli: raqam va matn bir qatorga sig'sin --- */
  .lst-q,
  .question-card-item {
    padding: 14px 13px !important;
  }
  .lst-form-row {
    padding: 10px 13px !important;
  }
  .lst-note-line {
    line-height: 1.75;
  }

  /* --- Audio pleyer: tugmalar barmoqqa qulay --- */
  .lst-play {
    width: 54px !important;
    height: 54px !important;
  }
  .lst-scrub {
    height: 10px !important;
  }
  .lst-ctrl-row {
    gap: 6px !important;
  }
  .lst-vol {
    width: 74px;
  }

  /* --- Savollar palitrasi: raqamlar kattaroq --- */
  .lst-pal-btn {
    width: 34px !important;
    height: 34px !important;
    font-size: 12.5px !important;
  }

  /* --- Writing muharriri: ekranning yarmidan ko'pini egallamasin --- */
  .wr-editor {
    min-height: 260px !important;
    font-size: 16px !important;
  }

  /* --- Mikrofon tugmasi va daraja ko'rsatkichi --- */
  .sp-mic-btn {
    width: 66px !important;
    height: 66px !important;
  }
  .sp-level {
    height: 34px !important;
  }

  /* --- Reading: sarlavhalar ro'yxati va matn o'qish qulayligi --- */
  .headings-box li {
    font-size: 13px;
    line-height: 1.5;
  }
  .passage-text,
  .lst-tr-txt,
  .wr-sample {
    font-size: 15px !important;
    line-height: 1.75 !important;
  }

  /* --- Natija kartochkalari ikki ustunga --- */
  .lst-kpi b,
  .wr-kpi b,
  .sp-kpi b {
    font-size: 20px !important;
  }
}

/* Juda tor ekranlar (iPhone SE va shunga o'xshash) */
@media (max-width: 380px) {
  .lst-pal-btn {
    width: 31px !important;
    height: 31px !important;
  }
  .tfng-btn-grid {
    grid-template-columns: 1fr !important;
  }
  .lst-form-row {
    grid-template-columns: 1fr !important;
  }
  .bottom-bar-item {
    font-size: 9.5px;
  }
}

/* =====================================================================
   Mobil kenglik himoyasi

   `body` ko'p sahifada flex konteyner. Flex elementining standart
   `min-width: auto` qiymati uni ichidagi kontentdan tor bo'lishga
   qo'ymaydi — natijada sahifa ekrandan kengroq bo'lib, `overflow-x:
   clip` sababli o'ng tomoni ko'rinmay qoladi (profil sahifasida
   telefonda 375px o'rniga 647px kenglik chiqardi).

   Quyidagi qoidalar shu tuzoqni butun sayt bo'ylab yopadi.
   ===================================================================== */
body > main,
body > section,
body > .page-container,
main > section {
  min-width: 0;
}

/* Uzun matnli input flex qatorini cho'zib yubormasin */
input,
textarea,
select {
  min-width: 0;
  max-width: 100%;
}

/* Rasm va media hech qachon ekrandan chiqmasin */
img,
svg,
video,
canvas {
  max-width: 100%;
}

/* Uzun so'z va havolalar (email, URL, promo-kod) qatorni buzmasin */
@media (max-width: 640px) {
  h1, h2, h3, p, li, td, .form-label {
    overflow-wrap: anywhere;
  }

  /* Keng jadvallar sahifani emas, o'z konteynerini siljitsin */
  table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}


/* ===================================================================
   MOBIL QULAYLIK TUZATISHLARI
   -------------------------------------------------------------------
   Telefonda o'lchab topilgan aniq muammolar bo'yicha (iPhone SE, 375px).
   Har bir qoida ostida nima o'lchangani yozilgan.

   Umumiy mezonlar:
     - bosiladigan element kamida 44x44 px (barmoq izi shuncha);
     - ikki bosiladigan element orasida kamida 8 px (xato bosish);
     - matn kamida 11 px, asosiy matn 12 px dan past emas;
     - kiritish maydonida shrift 16 px — aks holda iOS fokusda
       sahifani kattalashtirib yuboradi va foydalanuvchi adashadi.
   =================================================================== */

@media (max-width: 768px) {

  /* Pastki panel yorliqlari 9.5 px edi — o'qib bo'lmasdi.
     Panel balandligi o'zgarmasin deb qatorlar zichligi ham sozlandi. */
  .bottom-bar-item > span:not(.material-symbols-rounded):not(.ss-icon) {
    font-size: 11px;
    line-height: 1.15;
    letter-spacing: -0.01em;
  }

  /* Yuqoridagi uchta tugma (profil / rejim / menyu) orasi 6 px edi:
     barmoq bilan bosganda qo'shnisi bosilib ketardi. */
  .nav-right {
    gap: 10px;
  }

  /* Kolonka sarlavhalari va statistika yorliqlari 11.5 px edi */
  .stat-lbl-text,
  .stat-title {
    font-size: 12px;
  }
}

/* Sensorli qurilmalar — sichqoncha aniqligi yo'q joyda */
@media (pointer: coarse) {

  /* --- Pastki kolontitul havolalari 41 px edi (44 dan past) --- */
  .footer-links a,
  .landing-footer a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* --- Bo'lim ichidagi tab havolalari orasi 6 px edi --- */
  .section-tabs,
  .section-tab-row {
    gap: 10px;
  }

  /* --- Profil sahifasidagi tablar orasi atigi 2 px edi --- */
  .tab-btn {
    min-height: 44px;
  }
  .profile-tabs,
  .tab-row,
  .tabs-row {
    gap: 10px;
  }

  /* --- Lug'at rejim tugmalari va reyting davri tugmalari: 4 px --- */
  .mode-switch,
  .mode-btn-row,
  .lb-period-row,
  .lb-period-switch {
    gap: 10px;
  }
  .mode-btn,
  .lb-period-btn,
  .pill-btn {
    min-height: 44px;
  }

  /* --- Matn ichidagi havolalar (masalan bot manzili) 18 px edi --- */
  .inline-link,
  .text-link,
  a.mono-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 2px;
  }

  /* --- Nusxalash / faollashtirish tugmalari 42-43 px edi --- */
  .ref-btn,
  .redeem-btn,
  .btn-login-link,
  .hero-tertiary-link,
  .preview-btn,
  .doc-back,
  .doc-brand {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}


/* -------------------------------------------------------------------
   Sensorli qurilmada bosiladigan elementlar orasidagi masofa

   Bu qoidalarda `!important` bor, chunki ustidan yozilayotgan
   qiymatlarning bir qismi ham `!important` bilan, bir qismi esa
   sahifaning o'z <style> bloki ichida yozilgan (u tashqi CSS'dan
   keyin qo'llanadi). Boshqa yo'l bilan yetib bo'lmaydi.

   Segment tugmalarga (`.lb-periods`, `.mode-switch`) ataylab tegilmadi:
   ular bitta yaxlit boshqaruv sifatida ko'rinishi kerak va tugmalari
   allaqachon 44px balandlikda — xato bosish xavfi past.
   ------------------------------------------------------------------- */
@media (pointer: coarse) {

  /* Alohida turgan uchta ikonka tugma (profil / rejim / menyu) orasi
     6px edi — barmoq bilan qo'shnisini bosib yuborish oson edi. */
  .nav-right {
    gap: 12px !important;
  }

  /* Bo'lim tablari: gorizontal aylanadi, shuning uchun masofani
     oshirish sig'imga ta'sir qilmaydi. */
  .section-nav-tabs {
    gap: 12px !important;
  }

  /* Profil sahifasidagi tablar orasi atigi 2px edi. Bu qator ham
     gorizontal aylanadi. */
  .profile-nav-tabs {
    gap: 12px !important;
  }

  /* Matn ichidagi aloqa havolalari (bot, email, telefon) atigi
     18-22px balandlikda edi — barmoq bilan tegish qiyin. */
  a[href^="mailto:"],
  a[href^="tel:"],
  a[href*="t.me/"] {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 2px;
  }

  /* Hujjat sahifalaridagi (maxfiylik, yuklab olish) havolalar */
  .doc-back,
  .doc-brand,
  .preview-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}


/* -------------------------------------------------------------------
   O'raladigan filtr chiplari

   Bu qatorlar `flex-wrap: wrap` bilan ishlaydi: chiplar erkin
   joylashadi va yangi qatorga o'tadi. Ular orasida 4-6px masofa bor
   edi — barmoq bilan qo'shnisini bosib yuborish oson.

   Aylanadigan segment boshqaruvlarga (`.mode-switch`, `.lb-periods` —
   `flex-wrap: nowrap` + `overflow-x: auto`) ataylab tegilmadi: ular
   bitta yaxlit tugmalar guruhi bo'lib ko'rinishi kerak.
   ------------------------------------------------------------------- */
@media (pointer: coarse) {
  .filter-group,
  .pill-group,
  .wr-switch,
  .sp-filter,
  .lst-filter,
  .topic-filter {
    gap: 8px !important;
  }
}


/* ===================================================================
   TARIF LIMITI OYNASI (.ss-limit-*)

   Limitga urilganda chiqadigan yagona oyna. Ilgari har bir sahifa
   o'zicha `alert()` yoki toast ko'rsatardi — telefon ekranida matn
   kesilib qolar, "Tarifni yangilash" havolasi esa umuman yo'q edi.

   Mobil ekranda pastdan chiqadigan varaq (bottom sheet), 560px dan
   kengida esa markazdagi oyna bo'lib ko'rinadi.
   =================================================================== */
.ss-limit-overlay {
  position: fixed;
  inset: 0;
  /* Eng yuqori qatlam: chat vidjeti ham, imtihon paneli ham ustidan
     tushmasin — bu oyna ko'rinmasa foydalanuvchi nima uchun to'silganini
     bilmay qoladi. */
  z-index: 2147483002;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--bg-scrim, rgba(0, 0, 0, 0.7));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0;
  animation: ssLimitFade var(--transition-fast, 0.18s) ease-out;
}

@keyframes ssLimitFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes ssLimitRise {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.ss-limit-sheet {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--bg-surface, #0f172a);
  color: var(--text-primary, #f1f5f9);
  border: 1px solid var(--border-subtle, #1e293b);
  border-bottom: none;
  border-radius: var(--radius-xl, 24px) var(--radius-xl, 24px) 0 0;
  box-shadow: var(--shadow-lg, 0 10px 30px rgba(0, 0, 0, 0.5));
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: ssLimitRise var(--transition-normal, 0.28s) cubic-bezier(0.16, 1, 0.3, 1);
}

/* Barmoq bilan tortish uchun tutqich — faqat varaq ko'rinishida */
.ss-limit-grip {
  width: 42px;
  height: 4px;
  border-radius: var(--radius-full, 9999px);
  background: var(--border-strong, rgba(255, 255, 255, 0.16));
  margin: 0 auto 14px;
}

.ss-limit-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  background: var(--wash-amber, rgba(245, 158, 11, 0.14));
  color: var(--accent-amber-text, #fcd34d);
}

.ss-limit-icon.is-premium {
  background: var(--wash-violet, rgba(139, 92, 246, 0.14));
  color: var(--accent-violet-text, #c4b5fd);
}

.ss-limit-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  margin: 0 0 8px;
}

.ss-limit-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary, #cbd5e1);
  text-align: center;
  margin: 0 0 16px;
}

.ss-limit-meter {
  background: var(--bg-surface-elevated, #1e293b);
  border: 1px solid var(--border-subtle, #1e293b);
  border-radius: var(--radius-md, 12px);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.ss-limit-meter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary, #cbd5e1);
  margin-bottom: 8px;
}

.ss-limit-meter-row b {
  color: var(--text-primary, #f1f5f9);
  font-variant-numeric: tabular-nums;
}

.ss-limit-bar {
  height: 7px;
  border-radius: var(--radius-full, 9999px);
  background: var(--bg-surface-hover, #27354f);
  overflow: hidden;
}

.ss-limit-bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-amber, #f59e0b);
  transition: width var(--transition-normal, 0.28s);
}

.ss-limit-bar.is-full > i {
  background: var(--accent-rose, #f43f5e);
}

.ss-limit-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ss-limit-actions .btn {
  width: 100%;
  justify-content: center;
  min-height: 48px;
}

.ss-limit-note {
  font-size: 11.5px;
  color: var(--text-muted, #94a3b8);
  text-align: center;
  margin: 14px 0 0;
  line-height: 1.5;
}

/* Sahifa orqada aylanmasin */
body.ss-limit-open {
  overflow: hidden;
}

@media (min-width: 561px) {
  .ss-limit-overlay {
    align-items: center;
    padding: 20px;
  }
  .ss-limit-sheet {
    max-width: 420px;
    border-radius: var(--radius-xl, 24px);
    border-bottom: 1px solid var(--border-subtle, #1e293b);
    padding: 24px 24px 22px;
    max-height: 86vh;
  }
  .ss-limit-grip {
    display: none;
  }
  .ss-limit-actions {
    flex-direction: row-reverse;
  }
  .ss-limit-actions .btn {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ss-limit-overlay,
  .ss-limit-sheet {
    animation: none;
  }
}


/* ===================================================================
   LIMIT KARTOCHKALARI (profil sahifasidagi "Limitlaringiz" bo'limi)
   =================================================================== */
.ss-limit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.ss-limit-cell {
  background: var(--bg-surface-elevated, #1e293b);
  border: 1px solid var(--border-subtle, #1e293b);
  border-radius: var(--radius-md, 12px);
  padding: 14px;
  min-width: 0;
}

.ss-limit-cell-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text-primary, #f1f5f9);
}

.ss-limit-cell-head .ss-icon {
  color: var(--accent-blue-text, #93c5fd);
  flex: 0 0 auto;
}

.ss-limit-cell-head span:not(.ss-icon) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ss-limit-cell-sub {
  font-size: 11.5px;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 10px;
}

.ss-limit-cell-value {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary, #f1f5f9);
  margin-bottom: 8px;
}

.ss-limit-cell-value.is-unlimited {
  color: var(--accent-emerald-text, #6ee7b7);
}

@media (max-width: 480px) {
  .ss-limit-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ===================================================================
   15. HARAKAT VA O'ZARO TA'SIR QATLAMI
   -------------------------------------------------------------------
   Ilgari animatsiyalar sahifalar bo'ylab tarqoq edi: har sahifa o'z
   `transition: all 0.2s ease` ini yozardi, natijada bosish va olib
   borish sezgisi joydan joyga farq qilardi.

   Bu yerda yagona lug'at bor:
     · davomiylik va yumshatish tokenlari
     · kirish animatsiyalari (.ss-rise, .ss-stagger)
     · o'zaro ta'sir (.ss-lift, .ss-press)
     · yuklanish holati (.ss-skeleton)

   Barcha harakat `prefers-reduced-motion` ostida o'chadi — bu shart,
   chunki animatsiya ba'zi foydalanuvchilarda bosh aylanishiga sabab
   bo'ladi.
   =================================================================== */

:root {
  /* Davomiylik: bir maqsad — bitta qiymat */
  --dur-instant: 90ms;   /* bosish javobi */
  --dur-quick: 160ms;    /* hover, rang o'zgarishi */
  --dur-base: 260ms;     /* karta ko'tarilishi, ochilish */
  --dur-slow: 420ms;     /* sahifa elementi kirishi */

  /* Yumshatish */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);      /* tabiiy sekinlashuv */
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1); /* yengil sakrash */
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Ko'tarilish chuqurligi */
  --lift-sm: translateY(-2px);
  --lift-md: translateY(-4px);
}

/* -------------------------------------------------------------------
   Kirish animatsiyalari
   ------------------------------------------------------------------- */
@keyframes ssRise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@keyframes ssFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes ssPop {
  0%   { opacity: 0; transform: scale(0.94); }
  60%  { opacity: 1; transform: scale(1.02); }
  100% { opacity: 1; transform: scale(1); }
}

.ss-rise {
  animation: ssRise var(--dur-slow) var(--ease-out) both;
}

.ss-fade {
  animation: ssFade var(--dur-base) var(--ease-out) both;
}

.ss-pop {
  animation: ssPop var(--dur-base) var(--ease-spring) both;
}

/* Ro'yxat elementlari ketma-ket chiqadi — bir vaqtda emas.
   Kechikish 8-elementdan keyin to'xtaydi: uzun ro'yxat kutdirmasin. */
.ss-stagger > * {
  animation: ssRise var(--dur-slow) var(--ease-out) both;
}
.ss-stagger > *:nth-child(1) { animation-delay: 0ms; }
.ss-stagger > *:nth-child(2) { animation-delay: 45ms; }
.ss-stagger > *:nth-child(3) { animation-delay: 90ms; }
.ss-stagger > *:nth-child(4) { animation-delay: 135ms; }
.ss-stagger > *:nth-child(5) { animation-delay: 180ms; }
.ss-stagger > *:nth-child(6) { animation-delay: 225ms; }
.ss-stagger > *:nth-child(7) { animation-delay: 270ms; }
.ss-stagger > *:nth-child(n + 8) { animation-delay: 300ms; }

/* -------------------------------------------------------------------
   O'zaro ta'sir: ko'tarilish va bosish
   ------------------------------------------------------------------- */
.ss-lift {
  transition:
    transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    border-color var(--dur-quick) var(--ease-out);
  will-change: transform;
}
.ss-lift:hover {
  transform: var(--lift-md);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.ss-lift:active {
  transform: translateY(-1px);
  transition-duration: var(--dur-instant);
}

.ss-press {
  transition: transform var(--dur-instant) var(--ease-out),
              background-color var(--dur-quick) var(--ease-out);
}
.ss-press:active {
  transform: scale(0.97);
}

/* Mavjud komponentlarga bir xil sezgi beramiz — sahifalar
   o'z-o'zidan yangilanadi, har birini qo'lda tahrirlash shart emas. */
.card,
.feat-card,
.lesson-item-card,
.master-track-card,
.pane-card,
.stat-box-item {
  transition:
    transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    border-color var(--dur-quick) var(--ease-out),
    background-color var(--dur-quick) var(--ease-out);
}

.card:hover,
.feat-card:hover,
.lesson-item-card:hover,
.master-track-card:hover {
  transform: var(--lift-md);
  box-shadow: var(--shadow-lg);
}

.btn,
.btn-primary,
.btn-secondary,
.opt-btn,
.filter-chip,
.switch-tab,
.audio-mini-btn,
.audio-rate-btn,
.icon-circle-btn {
  transition:
    transform var(--dur-instant) var(--ease-out),
    background-color var(--dur-quick) var(--ease-out),
    border-color var(--dur-quick) var(--ease-out),
    color var(--dur-quick) var(--ease-out);
}

.btn:active,
.btn-primary:active,
.btn-secondary:active,
.opt-btn:active,
.filter-chip:active,
.switch-tab:active,
.audio-mini-btn:active,
.icon-circle-btn:active {
  transform: scale(0.97);
}

/* Navigatsiya elementi ostida yupqa faol chiziq — joriy bo'lim
   qayerdaligi bir qarashda ko'rinadi. */
.nav-item,
.dropdown-trigger {
  position: relative;
}
.nav-item::after,
.dropdown-trigger::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-blue);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--dur-base) var(--ease-out);
}
.nav-item.active::after,
.dropdown-trigger.active::after {
  transform: scaleX(1);
}

/* -------------------------------------------------------------------
   Fokus halqasi — klaviatura bilan yurish uchun
   ------------------------------------------------------------------- */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: 8px;
}

/* -------------------------------------------------------------------
   Yuklanish holati — bo'sh joy o'rniga shakl ko'rsatiladi
   ------------------------------------------------------------------- */
@keyframes ssShimmer {
  from { background-position: -200% 0; }
  to   { background-position: 200% 0; }
}

.ss-skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-surface-elevated) 25%,
    var(--bg-surface-hover) 50%,
    var(--bg-surface-elevated) 75%
  );
  background-size: 200% 100%;
  animation: ssShimmer 1.4s linear infinite;
  border-radius: 10px;
  color: transparent !important;
  user-select: none;
}

/* -------------------------------------------------------------------
   Harakatni kamaytirish so'ralgan bo'lsa — hammasi o'chadi
   ------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .ss-rise,
  .ss-fade,
  .ss-pop,
  .ss-stagger > * {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .ss-lift:hover,
  .card:hover,
  .feat-card:hover,
  .lesson-item-card:hover,
  .master-track-card:hover {
    transform: none !important;
  }
  .ss-skeleton {
    animation: none !important;
  }
}

/* ===================================================================
   16. SKROLL BO'YICHA OCHILISH, FON SHARLARI VA CTA YORUG'LIGI
   -------------------------------------------------------------------
   15-bo'limdagi kirish animatsiyalari sahifa yuklanganda bir vaqtda
   ishga tushardi — ekrandan pastdagi kartalar ko'rinmasdan animatsiya
   qilib bo'lardi va foydalanuvchi ularni umuman sezmasdi.

   Bu yerda:
     · elementlar ekranga kirganda ochiladi (IntersectionObserver)
     · hero ortida sekin suzuvchi yumshoq nur sharlari
     · asosiy tugmada yorug'lik yugurishi
     · jonli holat nuqtasida nafas olish
   =================================================================== */

/* -------------------------------------------------------------------
   Skroll bo'yicha ochilish.

   `js-reveal` sinfini common.js <html> ga qo'yadi. JS ishlamasa bu sinf
   ham bo'lmaydi va kontent oddiy holda, to'liq ko'rinib turadi — hech
   narsa yashirin qolib ketmaydi.
   ------------------------------------------------------------------- */
.js-reveal .ss-rise,
.js-reveal .ss-fade,
.js-reveal .ss-pop,
.js-reveal .ss-stagger > * {
  animation-play-state: paused;
  opacity: 0;
}

.js-reveal .ss-rise.is-visible,
.js-reveal .ss-fade.is-visible,
.js-reveal .ss-pop.is-visible,
.js-reveal .ss-stagger.is-visible > * {
  animation-play-state: running;
  opacity: 1;
}

/* Zaxira yo'l. Faqat opacity ni tiklash yetarli emas: animation-fill-mode
   both bilan animatsiya 0-kadrda turib qolsa, u oddiy e'lonni bosib ketadi
   va element ko'rinmay qolaveradi. Shuning uchun animatsiyaning o'zi
   bekor qilinadi. */
.js-reveal .ss-no-anim,
.js-reveal .ss-no-anim > * {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* -------------------------------------------------------------------
   Fon nur sharlari — hero ortida sekin suzadi.
   `pointer-events: none` shart: ular bosishga xalaqit bermasligi kerak.
   ------------------------------------------------------------------- */
@keyframes ssOrbDrift1 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(6%, -8%, 0) scale(1.08); }
}
@keyframes ssOrbDrift2 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.05); }
  50%      { transform: translate3d(-7%, 6%, 0) scale(0.95); }
}
@keyframes ssOrbDrift3 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(0.98); }
  50%      { transform: translate3d(4%, 9%, 0) scale(1.1); }
}

.ss-orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.ss-orbs > i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
}
.ss-orbs > i:nth-child(1) {
  width: 46vw; height: 46vw; max-width: 620px; max-height: 620px;
  top: -14%; left: -8%;
  background: var(--glow-primary);
  animation: ssOrbDrift1 19s var(--ease-in-out) infinite;
}
.ss-orbs > i:nth-child(2) {
  width: 38vw; height: 38vw; max-width: 520px; max-height: 520px;
  top: 6%; right: -10%;
  background: var(--wash-violet);
  animation: ssOrbDrift2 23s var(--ease-in-out) infinite;
}
.ss-orbs > i:nth-child(3) {
  width: 30vw; height: 30vw; max-width: 420px; max-height: 420px;
  bottom: -18%; left: 28%;
  background: var(--glow-secondary);
  animation: ssOrbDrift3 27s var(--ease-in-out) infinite;
}

/* Yorug' mavzuda nur kuchsizroq bo'lishi kerak — aks holda oq fon
   ustida kir dog'dek ko'rinadi. */
html.theme-light .ss-orbs > i { opacity: 0.35; filter: blur(90px); }

/* Sharlar ortidagi kontent ular ustida turishi kerak */
.ss-orbs ~ * { position: relative; z-index: 1; }

/* -------------------------------------------------------------------
   Asosiy tugmada yorug'lik yugurishi
   ------------------------------------------------------------------- */
@keyframes ssSheen {
  0%        { transform: translateX(-120%) skewX(-18deg); }
  55%, 100% { transform: translateX(220%) skewX(-18deg); }
}

.ss-sheen {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.ss-sheen::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 45%;
  background: linear-gradient(
    100deg,
    transparent,
    rgba(255, 255, 255, 0.28),
    transparent
  );
  transform: translateX(-120%) skewX(-18deg);
  animation: ssSheen 4.5s var(--ease-in-out) infinite;
  pointer-events: none;
}

/* -------------------------------------------------------------------
   Jonli holat nuqtasi — nafas olish
   ------------------------------------------------------------------- */
@keyframes ssBreathe {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.28); opacity: 0.65; }
}
.ss-pulse {
  animation: ssBreathe 2.4s var(--ease-in-out) infinite;
}

/* -------------------------------------------------------------------
   Gradient sarlavha — namunadagidek ikkinchi qatorni ajratish uchun
   ------------------------------------------------------------------- */
.ss-gradient-text {
  background: linear-gradient(
    92deg,
    var(--accent-emerald) 0%,
    var(--accent-cyan) 45%,
    var(--accent-blue) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* -------------------------------------------------------------------
   Harakatni kamaytirish so'ralganda
   ------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .js-reveal .ss-rise,
  .js-reveal .ss-fade,
  .js-reveal .ss-pop,
  .js-reveal .ss-stagger > * {
    opacity: 1 !important;
    animation: none !important;
  }
  .ss-orbs > i,
  .ss-sheen::after,
  .ss-pulse {
    animation: none !important;
  }
  .ss-sheen::after { display: none; }
}
