/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
@layer theme {
  :root, :host {
    --spacing: 0.25rem;
    --color-white: #fff;
    --color-black: #000;
    --color-surface-0: #0f172a;
    --color-surface-1: #1e293b;
    --color-surface-2: #334155;
    --color-ink-0: #f1f5f9;
    --color-ink-1: #e2e8f0;
    --color-ink-2: #94a3b8;
    --color-line: #334155;
    --color-brand-400: #818cf8;
    --color-brand-500: #6366f1;
    --color-brand-600: #4f46e5;
    --color-ok: #22c55e;
    --color-ok-strong: #10b981;
    --color-warn: #f59e0b;
    --color-warn-ink: #fbbf24;
    --color-danger: #ef4444;
    --color-danger-ink: #f87171;
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --spacing-touch: 2.75rem;
    --spacing-touch-lg: 3rem;
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.25rem;
    --radius-full: 9999px;
    --shadow-e1: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-e2: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --breakpoint-xs: 30rem;
  }
}
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #10b981;
  --accent: #f59e0b;
  --danger: #ef4444;
  --danger-text: #f87171;
  --warning-text: #fbbf24;
  --success: #22c55e;
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #e2e8f0;
  --text-muted: #94a3b8;
  --border: #334155;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s ease;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --touch-target: 44px;
  --touch-target-large: 48px;
  --nav-h: 72px;
}
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #e2e8f0;
  --text-muted: #d1d5db;
  --border: #475569;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
}
.subject-item-meta span {
  color: var(--text-primary);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
img {
  max-width: 100%;
  height: auto;
}
@supports (-webkit-touch-callout: none) {
  input, select, textarea {
    font-size: 16px !important;
  }
}
.scrollable {
  -webkit-overflow-scrolling: touch;
  overflow-y: auto;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  transition: var(--transition);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
.landing-page, .browse-page, .lessons-page, .study-page, .about-page, .materials-page, .profile-page, .admin-page {
  display: none;
}
.landing-page.active, .browse-page.active, .lessons-page.active, .study-page.active, .about-page.active, .materials-page.active, .profile-page.active, .admin-page.active {
  display: flex;
  flex-direction: column;
}
.landing-page {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow: hidden;
}
.landing-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.45;
  animation: float 20s ease-in-out infinite;
}
.orb-1 {
  width: 650px;
  height: 650px;
  background: linear-gradient(135deg, #6366f1, #a78bfa);
  top: -200px;
  right: -180px;
  animation-delay: 0s;
}
.orb-2 {
  width: 450px;
  height: 450px;
  background: linear-gradient(135deg, #0ea5e9, #22d3ee);
  bottom: 10%;
  left: -120px;
  animation-delay: -5s;
}
.orb-3 {
  width: 380px;
  height: 380px;
  background: linear-gradient(135deg, #ec4899, #f472b6);
  bottom: -120px;
  right: 10%;
  animation-delay: -10s;
}
.orb-4 {
  width: 320px;
  height: 320px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  top: 35%;
  left: 25%;
  animation-delay: -7s;
  filter: blur(130px);
  opacity: 0.3;
}
@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(20px, -30px) scale(1.05);
  }
  50% {
    transform: translate(-20px, 20px) scale(0.95);
  }
  75% {
    transform: translate(30px, 10px) scale(1.02);
  }
}
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(99, 102, 241, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(99, 102, 241, 0.07) 1px, transparent 1px);
  background-size: 40px 40px;
}
.landing-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, transparent 30%, rgba(15, 23, 42, 0.65) 100%);
  pointer-events: none;
  z-index: 1;
}
.landing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  padding-top: calc(1rem + var(--safe-top));
  position: relative;
  z-index: 10;
}
.landing-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.logo-wrapper {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  max-width: 44px;
  max-height: 44px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.logo-image:hover {
  transform: scale(1.05);
}
.logo-icon-wrapper {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.landing-logo .logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.landing-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  position: relative;
  z-index: 10;
  gap: 3rem;
}
@media (min-width: 768px) {
  .landing-hero {
    flex-direction: row;
    padding: 2rem 4rem;
  }
}
.hero-content {
  text-align: center;
  max-width: 600px;
}
@media (min-width: 768px) {
  .hero-content {
    text-align: left;
  }
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.875rem;
  color: var(--primary-light);
  margin-bottom: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.badge-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: badgePulse 2.5s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes badgePulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  }
  50% {
    opacity: 0.8;
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
}
.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
.gradient-text {
  background: linear-gradient(135deg, var(--primary), #8b5cf6, var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 500px;
}
@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 1.25rem;
  }
}
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 480px) {
  .hero-actions {
    flex-direction: row;
    justify-content: center;
  }
}
@media (min-width: 768px) {
  .hero-actions {
    justify-content: flex-start;
  }
}
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  min-height: var(--touch-target-large);
}
.cta-button.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.45);
  position: relative;
  overflow: hidden;
}
.cta-button.primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.cta-button.primary:hover::after {
  opacity: 1;
}
.cta-button.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.65), 0 0 60px rgba(99, 102, 241, 0.15);
}
.cta-button.secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.cta-button.secondary:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.4);
  color: var(--primary-light);
}
.hero-visual {
  position: relative;
  width: 300px;
  height: 300px;
}
@media (min-width: 768px) {
  .hero-visual {
    width: 400px;
    height: 400px;
  }
}
.floating-cards {
  position: relative;
  width: 100%;
  height: 100%;
}
.float-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: floatCard 6s ease-in-out infinite;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.float-card i {
  font-size: 1.5rem;
}
.float-card span {
  font-weight: 600;
  font-size: 0.95rem;
}
.float-card.card-1 {
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}
.float-card.card-1 i {
  color: var(--primary);
}
.float-card.card-2 {
  top: 5%;
  right: 10%;
  animation-delay: -1.5s;
}
.float-card.card-2 i {
  color: var(--secondary);
}
.float-card.card-3 {
  bottom: 25%;
  left: 0;
  animation-delay: -3s;
}
.float-card.card-3 i {
  color: var(--accent);
}
.float-card.card-4 {
  bottom: 10%;
  right: 5%;
  animation-delay: -4.5s;
}
.float-card.card-4 i {
  color: var(--danger);
}
@keyframes floatCard {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}
.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 2rem 1.5rem;
  position: relative;
  z-index: 10;
  max-width: 1000px;
  margin: 0 auto;
}
.landing-features .feature-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: var(--transition);
}
.landing-features .feature-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(99, 102, 241, 0.1);
}
.landing-features .feature-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.6rem;
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.2);
  transition: var(--transition);
}
.landing-features .feature-card:hover .feature-icon {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.28), rgba(139, 92, 246, 0.28));
  box-shadow: 0 0 28px rgba(99, 102, 241, 0.45);
  transform: scale(1.08) translateY(-2px);
}
.landing-features .feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.landing-features .feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.25rem 2rem;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  width: calc(100% - 3rem);
  max-width: 620px;
  margin: 0 auto 1.5rem;
  position: relative;
  z-index: 10;
  flex-wrap: wrap;
}
.stat-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}
.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary-light), #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.stat-divider {
  width: 1px;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .hero-stats {
    gap: 1rem;
    padding: 1rem 1.25rem;
  }
  .stat-num {
    font-size: 1.4rem;
  }
  .stat-divider {
    height: 1.75rem;
  }
}
.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.5rem;
  padding-top: calc(0.7rem + var(--safe-top));
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.landing-nav .landing-logo {
  text-decoration: none;
}
.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-left: auto;
}
.landing-nav-links a, .nav-link-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 0;
  white-space: nowrap;
}
.landing-nav-links a:hover, .nav-link-btn:hover {
  color: var(--primary-light);
}
.nav-link-btn--accent {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(99, 102, 241, 0.45);
  color: var(--primary-light);
}
.nav-link-btn--accent:hover {
  color: var(--text-primary);
  border-color: var(--primary-light);
  background: rgba(99, 102, 241, 0.24);
}
.cta-button.nav-cta {
  padding: 0.6rem 1.15rem;
  font-size: 0.9rem;
  min-height: 0;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  flex-shrink: 0;
  white-space: nowrap;
  width: auto;
}
.landing-nav .landing-logo, .landing-nav .lang-toggle, .landing-nav .nav-auth-btn {
  flex-shrink: 0;
}
.landing-hero {
  padding-top: calc(var(--nav-h) + var(--safe-top) + 1.25rem);
}
.landing-section, .landing-cta, #top {
  scroll-margin-top: calc(var(--nav-h) + var(--safe-top) + 0.5rem);
}
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
  margin-top: 1.5rem;
  justify-content: center;
}
@media (min-width: 768px) {
  .hero-trust {
    justify-content: flex-start;
  }
}
.hero-trust li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.hero-trust i {
  color: var(--success);
  font-size: 0.8rem;
}
.landing-section {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  min-width: 0;
}
.section-head {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  text-align: center;
}
.section-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary-light);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}
.section-head h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}
.section-head p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}
.landing-subjects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  min-width: 0;
}
.landing-subject-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  font-family: inherit;
  color: inherit;
  min-width: 0;
  overflow: hidden;
}
.landing-subject-card:hover, .landing-subject-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--card-accent, var(--primary));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  outline: none;
}
.landing-subject-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.landing-subject-info {
  flex: 1;
  min-width: 0;
}
.landing-subject-info h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.landing-subject-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.landing-subject-arrow {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: var(--transition);
  flex-shrink: 0;
}
.landing-subject-card:hover .landing-subject-arrow {
  color: var(--card-accent, var(--primary));
  transform: translateX(4px);
}
.how-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  min-width: 0;
}
.how-step {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem 1.75rem;
  text-align: center;
}
.how-step-num {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}
.how-step-icon {
  font-size: 1.8rem;
  color: var(--primary-light);
  margin: 0.5rem 0 1rem;
}
.how-step h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.how-step p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  min-width: 0;
}
.mode-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
  text-align: center;
}
.mode-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-accent, var(--primary));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}
.mode-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.4rem;
  color: var(--card-accent, var(--primary));
  background: var(--card-accent, var(--primary));
  @supports (color: color-mix(in lab, red, red)) {
    background: color-mix(in srgb, var(--card-accent, var(--primary)) 16%, transparent);
  }
  border: 1px solid var(--card-accent, var(--primary));
  @supports (color: color-mix(in lab, red, red)) {
    border: 1px solid color-mix(in srgb, var(--card-accent, var(--primary)) 35%, transparent);
  }
}
.mode-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}
.mode-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.landing-cta {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}
.landing-cta-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: 3rem 2rem;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.25);
}
.landing-cta-inner h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.6rem, 5vw, 2.3rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}
.landing-cta-inner p {
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
}
.landing-cta-inner .cta-button {
  margin: 0 auto;
}
.landing-footer {
  padding: 2.5rem 1.5rem 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  position: relative;
  z-index: 10;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.landing-footer i {
  color: var(--danger);
}
.footer-cols {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  text-align: left;
}
.footer-brand p {
  margin-top: 0.85rem;
  max-width: 32ch;
  line-height: 1.55;
}
.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
}
.footer-col h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.footer-col a, .footer-link-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
  text-align: left;
}
.footer-col a:hover, .footer-link-btn:hover {
  color: var(--primary-light);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  max-width: 1000px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
}
@media (max-width: 1120px) {
  .landing-nav .logo-text {
    display: none;
  }
  .landing-nav {
    gap: 0.85rem;
  }
  .landing-nav-links {
    gap: 1rem;
  }
}
@media (max-width: 1280px) {
  .landing-nav-links {
    gap: 0.6rem;
  }
  .landing-nav-links a, .landing-nav-links .nav-link-btn:not(.nav-link-btn--accent) {
    display: none;
  }
}
@media (max-width: 720px) {
  .landing-section {
    padding: 3rem 1.25rem;
  }
  .footer-cols {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .footer-bottom {
    justify-content: center;
    text-align: center;
  }
}
@media (max-width: 480px) {
  .landing-nav {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
    gap: 0.5rem;
  }
  .lang-toggle {
    padding: 0.4rem 0.6rem;
    gap: 0.3rem;
  }
  .cta-button.nav-cta {
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
  }
}
@media (max-width: 560px) {
  .nav-link-btn--accent span {
    display: none;
  }
  .nav-link-btn--accent {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
}
@media (max-width: 400px) {
  .landing-nav {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
    gap: 0.25rem;
  }
  .landing-nav .lang-toggle-label {
    display: none;
  }
  .lang-toggle {
    padding: 0.4rem 0.5rem;
  }
  .cta-button.nav-cta {
    padding: 0.5rem 0.65rem;
  }
  .cta-button.nav-cta i {
    display: none;
  }
}
.subjects-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}
.subjects-overlay.active {
  opacity: 1;
  visibility: visible;
}
.subjects-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: var(--bg-secondary);
  z-index: 1000;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
}
.subjects-sidebar.active {
  transform: translateX(0);
}
.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  padding-top: calc(1.25rem + var(--safe-top));
  border-bottom: 1px solid var(--border);
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.sidebar-logo .logo-wrapper {
  width: 40px;
  height: 40px;
}
.sidebar-logo span {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.sidebar-header h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
}
.sidebar-header h2 i {
  color: var(--primary);
}
.close-sidebar-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
}
.close-sidebar-btn:hover {
  background: var(--danger);
  color: white;
}
.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}
.subjects-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.subject-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}
.subject-item:hover {
  border-color: var(--primary);
  transform: translateX(5px);
}
.subject-item-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.subject-item-info {
  flex: 1;
  min-width: 0;
}
.subject-item-info h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.subject-item-info p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.subject-item-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.subject-item-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.subject-arrow {
  color: var(--text-muted);
  transition: var(--transition);
}
.subject-item:hover .subject-arrow {
  color: var(--primary);
  transform: translateX(3px);
}
.browse-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-primary);
}
.browse-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  padding-top: calc(1rem + var(--safe-top));
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.browse-title {
  flex: 1;
  min-width: 0;
}
.browse-title h1 {
  font-size: 1.25rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browse-logo .logo-wrapper {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.browse-content {
  padding: 1.5rem;
  padding-bottom: calc(2rem + var(--safe-bottom));
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  min-width: 0;
}
.browse-intro {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.browse-intro:empty {
  display: none;
}
.browse-grid-wrap {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 0;
}
.browse-section {
  min-width: 0;
}
.browse-section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.browse-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  min-width: 0;
}
.browse-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.35rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition);
  min-width: 0;
  overflow: hidden;
  text-align: left;
  font-family: inherit;
  color: inherit;
}
.browse-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 0% 0%, var(--card-accent, var(--primary)), transparent 60%);
  @supports (color: color-mix(in lab, red, red)) {
    background: radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--card-accent, var(--primary)) 14%, transparent), transparent 60%);
  }
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.browse-card:hover, .browse-card:focus-visible {
  border-color: var(--card-accent, var(--primary));
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  outline: none;
}
.browse-card:hover::before, .browse-card:focus-visible::before {
  opacity: 1;
}
.browse-card-top {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}
.browse-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}
.browse-card-icon.is-year {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
}
.browse-card-headings {
  flex: 1;
  min-width: 0;
}
.browse-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  word-break: break-word;
}
.browse-card-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.browse-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.browse-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.9rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.browse-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.browse-card-meta i {
  color: var(--card-accent, var(--primary));
}
.browse-card-arrow {
  position: absolute;
  right: 1.1rem;
  bottom: 1.1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: var(--transition);
}
.browse-card:hover .browse-card-arrow {
  color: var(--card-accent, var(--primary));
  transform: translateX(4px);
}
.browse-progress {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.15rem;
}
.browse-progress-track {
  flex: 1;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 999px;
  overflow: hidden;
}
.browse-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--card-accent, var(--primary)), var(--primary-light));
  transition: width 0.4s ease;
}
.browse-progress-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 2.5rem;
  text-align: right;
}
.browse-card.is-soon {
  cursor: not-allowed;
  opacity: 0.6;
}
.browse-card.is-soon:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: none;
}
.browse-card.is-soon:hover::before {
  opacity: 0;
}
.browse-badge {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
}
.browse-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 1rem;
}
.browse-empty i {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  opacity: 0.6;
}
@media (max-width: 600px) {
  .browse-content {
    padding: 1.25rem 1rem;
  }
  .browse-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .browse-card {
    padding: 1.1rem;
  }
}
.lessons-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-primary);
}
.lessons-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  padding-top: calc(1rem + var(--safe-top));
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.back-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.back-btn:hover {
  background: var(--primary);
  color: white;
}
.lessons-title {
  flex: 1;
  min-width: 0;
}
.breadcrumb {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.lessons-title h1 {
  font-size: 1.25rem;
  font-weight: 700;
}
.lessons-content {
  padding: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}
.lessons-intro {
  text-align: center;
  margin-bottom: 2rem;
}
.lessons-intro p {
  color: var(--text-secondary);
}
.lessons-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.lesson-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.lesson-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.lesson-number {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.lesson-info {
  flex: 1;
}
.lesson-info h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.lesson-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.lesson-arrow {
  color: var(--text-muted);
  font-size: 1.25rem;
  transition: var(--transition);
}
.lesson-card:hover .lesson-arrow {
  color: var(--primary);
  transform: translateX(5px);
}
.study-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-primary);
  padding-bottom: calc(80px + var(--safe-bottom));
}
.study-loading {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.study-loading[hidden] {
  display: none;
}
.study-loading-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--bg-tertiary);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: studySpin 0.8s linear infinite;
}
@keyframes studySpin {
  to {
    transform: rotate(360deg);
  }
}
.study-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  padding-top: calc(1rem + var(--safe-top));
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.study-title {
  flex: 1;
  min-width: 0;
}
.study-title h1 {
  font-size: 1.1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.study-nav {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.study-nav::-webkit-scrollbar {
  display: none;
}
.study-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.study-nav-btn:hover {
  background: var(--bg-tertiary);
  color: var(--primary);
}
.study-nav-btn.active {
  background: var(--primary);
  color: white;
}
.study-nav-btn.active span, .study-nav-btn.active i {
  color: white;
}
.study-content {
  padding: 1rem;
  width: 100%;
  max-width: 1200px;
  min-width: 0;
  margin: 0 auto;
}
.study-mobile-nav {
  display: none;
}
@media (max-width: 767px) {
  .study-nav {
    display: none !important;
  }
  .study-mobile-nav {
    display: flex !important;
    flex-direction: row;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 0.5rem 0;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  }
  .study-mobile-nav .mobile-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.15rem;
    min-height: 58px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.6rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    gap: 0.2rem;
    position: relative;
  }
  .study-mobile-nav .mobile-nav-btn i {
    font-size: 1.2rem;
    transition: var(--transition);
  }
  .study-mobile-nav .mobile-nav-btn span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .study-mobile-nav .mobile-nav-btn.active {
    color: var(--primary);
  }
  .study-mobile-nav .mobile-nav-btn.active i {
    transform: scale(1.1);
  }
  .study-mobile-nav .mobile-nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 3px 3px;
    transition: transform 0.3s ease;
  }
  .study-mobile-nav .mobile-nav-btn.active::before {
    transform: translateX(-50%) scaleX(1);
  }
  .study-page .study-content {
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px) + 1rem);
  }
}
.about-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-primary);
}
.about-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  padding-top: calc(1rem + var(--safe-top));
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}
.about-header h1 {
  font-size: 1.25rem;
}
.about-content {
  padding: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}
.about-hero-section {
  text-align: center;
  margin-bottom: 2rem;
}
.logo-wrapper-large {
  width: 120px;
  height: 120px;
  min-width: 120px;
  min-height: 120px;
  max-width: 120px;
  max-height: 120px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
}
.logo-wrapper-large:hover {
  transform: scale(1.05);
}
.about-icon-large {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 2rem;
  color: white;
}
.about-tagline {
  color: var(--text-secondary);
  font-size: 1.1rem;
}
.about-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.about-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--border);
}
.about-card-icon {
  width: 45px;
  height: 45px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  color: var(--primary);
}
.about-card h2 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}
.about-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}
.about-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.about-features span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: var(--bg-tertiary);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.about-features span i {
  color: var(--primary);
}
.email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}
.email-link:hover {
  background: var(--primary);
  color: white;
}
.about-card.creator {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.creator-avatar {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.creator-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}
.creator-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: min(90vw, 420px);
  padding: 0.85rem 1.25rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(140px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.toast i {
  color: var(--primary);
  flex-shrink: 0;
}
.toast--action {
  cursor: pointer;
}
.footer {
  margin-top: auto;
  padding: 1.75rem 1rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}
.footer p {
  margin: 0;
}
body:has(.landing-page.active) .footer, body:has(.browse-page.active) .footer {
  display: none;
}
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: var(--transition);
  min-height: var(--touch-target);
  white-space: nowrap;
}
.lang-toggle:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.lang-toggle i {
  font-size: 0.85rem;
}
.header-lang-toggle {
  padding: 0.35rem 0.6rem;
}
.header {
  background: var(--bg-secondary);
  padding: 0.75rem 1rem;
  padding-left: calc(1rem + var(--safe-left));
  padding-right: calc(1rem + var(--safe-right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  position: sticky;
  top: var(--safe-top);
  z-index: 100;
  gap: 0.5rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  cursor: pointer;
}
.logo-img {
  height: 36px !important;
  max-height: 36px !important;
  max-width: 60px !important;
  width: auto !important;
  object-fit: contain !important;
  flex-shrink: 0;
}
.logo i {
  font-size: 1.5rem;
}
.nav-menu {
  display: none;
  gap: 0.5rem;
}
.mobile-nav {
  display: none;
}
@media (max-width: 767px) {
  .nav-menu, .nav-menu.nav-visible, #mainNav {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    pointer-events: none !important;
  }
  .mobile-nav.nav-visible {
    display: flex !important;
    visibility: visible !important;
    width: auto !important;
    height: auto !important;
    position: fixed !important;
    pointer-events: auto !important;
  }
}
@media (min-width: 768px) {
  .nav-menu.nav-visible {
    display: flex !important;
  }
  .mobile-nav, .mobile-nav.nav-visible {
    display: none !important;
  }
}
.nav-btn {
  background: transparent;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--touch-target);
}
.nav-btn:hover {
  background: var(--bg-tertiary);
  color: var(--primary);
}
.nav-btn.active {
  background: #312e81;
  color: #e0e7ff;
}
.theme-toggle {
  background: var(--bg-tertiary);
  border: none;
  width: var(--touch-target);
  height: var(--touch-target);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-secondary);
  transition: var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--primary);
  color: white;
  transform: rotate(20deg);
}
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding-bottom: var(--safe-bottom);
  border-top: 1px solid var(--border);
}
.mobile-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.25rem;
  min-height: 60px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  gap: 0.25rem;
  position: relative;
}
.mobile-nav-btn i {
  font-size: 1.25rem;
  transition: var(--transition);
}
.mobile-nav-btn.active {
  color: #312e81;
}
[data-theme="dark"] .mobile-nav-btn.active {
  color: #a5b4fc;
}
.mobile-nav-btn.active i {
  transform: scale(1.1);
}
.mobile-nav-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 50%;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 3px 3px;
  transition: transform 0.3s ease;
}
.mobile-nav-btn.active::before {
  transform: translateX(-50%) scaleX(1);
}
.main-content {
  padding: 1rem;
  padding-left: calc(1rem + var(--safe-left));
  padding-right: calc(1rem + var(--safe-right));
  max-width: 1400px;
  margin: 0 auto;
}
.section {
  display: none;
  animation: fadeIn 0.5s ease;
}
.section.active {
  display: block;
}
#subject-selector.active {
  display: flex !important;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
sokrat-modal.sokrat-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.62);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
sokrat-modal.sokrat-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
sokrat-modal.sokrat-modal > * {
  transform: translateY(8px) scale(0.98);
  transition: transform 0.25s ease;
  max-width: 100%;
  max-height: 100%;
  overflow: auto;
}
sokrat-modal.sokrat-modal.is-open > * {
  transform: translateY(0) scale(1);
}
@media (prefers-reduced-motion: reduce) {
  sokrat-modal.sokrat-modal, sokrat-modal.sokrat-modal > * {
    transition: none;
  }
}
sokrat-modal.sokrat-confirm-modal > * {
  max-width: 420px;
}
.sokrat-confirm__card {
  width: 100%;
  padding: 1.6rem 1.5rem 1.35rem;
  background: var(--bg-card, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.sokrat-confirm__title {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary, #f8fafc);
}
.sokrat-confirm__msg {
  margin: 0 0 1.35rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-secondary, #cbd5e1);
}
.sokrat-confirm__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.sokrat-confirm__btn {
  padding: 0.6rem 1.15rem;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.sokrat-confirm__cancel {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--text-secondary, #cbd5e1);
}
.sokrat-confirm__cancel:hover {
  color: var(--text-primary, #f8fafc);
  border-color: rgba(255, 255, 255, 0.28);
}
.sokrat-confirm__ok {
  background: var(--primary, #6366f1);
  color: #fff;
}
.sokrat-confirm__ok:hover {
  background: var(--primary-light, #818cf8);
}
.sokrat-confirm__ok.is-danger {
  background: #dc2626;
}
.sokrat-confirm__ok.is-danger:hover {
  background: #ef4444;
}
.sokrat-confirm__btn:focus-visible {
  outline: 2px solid var(--primary-light, #818cf8);
  outline-offset: 2px;
}
@media (max-width: 640px) {
  .sokrat-confirm__actions {
    flex-direction: column-reverse;
  }
  .sokrat-confirm__btn {
    width: 100%;
  }
}
#subject-selector {
  min-height: calc(100vh - 80px);
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.subject-hero {
  text-align: center;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}
.subject-hero > h1, .main-title {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.subject-hero > .subtitle, .main-subtitle {
  color: var(--text-secondary);
  font-size: 1.2rem;
  margin-bottom: 3rem;
}
.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.te2-title {
  color: #4338ca !important;
}
.ent-title {
  color: #047857 !important;
}
[data-theme="dark"] .te2-title {
  color: #a5b4fc !important;
}
[data-theme="dark"] .ent-title {
  color: #6ee7b7 !important;
}
.card-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}
.subject-icon {
  width: 90px !important;
  height: 90px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto 1.75rem !important;
  font-size: 2.25rem !important;
  color: white !important;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.3) !important;
}
.subject-card .subject-icon.te2-icon, .te2-icon {
  background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
}
.subject-card .subject-icon.ent-icon, .ent-icon {
  background: linear-gradient(135deg, #10b981, #059669) !important;
}
.subject-btn {
  color: white !important;
  border: none !important;
  padding: 1rem 2.5rem !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  font-family: inherit !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}
.subject-card .subject-btn.te2-btn, .subject-card button.te2-btn, button.te2-btn, .te2-btn {
  background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
  color: white !important;
}
.subject-card .subject-btn.ent-btn, .subject-card button.ent-btn, button.ent-btn, .ent-btn {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: white !important;
}
.subject-btn:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3) !important;
}
.subject-btn:active {
  transform: scale(0.98);
}
.te2-accent {
  color: #6366f1 !important;
}
.ent-accent {
  color: #10b981 !important;
}
.subject-cards {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
  padding: 0 1rem;
}
div.subject-card {
  background-color: #ffffff !important;
  border-radius: 24px !important;
  padding: 2.5rem 2rem !important;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.2) !important;
  border: 2px solid #e2e8f0 !important;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] div.subject-card {
  background-color: #1e293b !important;
  border-color: #475569 !important;
}
.subject-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transition: transform 0.4s ease;
}
.subject-card:hover::before {
  transform: scaleX(1);
}
.subject-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 25px 50px -15px rgba(99, 102, 241, 0.3);
}
.subject-card:active {
  transform: translateY(-4px) scale(0.98);
}
.subject-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}
.subject-card > p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}
.subject-meta {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.subject-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}
.subject-meta span i {
  color: var(--primary);
  font-size: 1rem;
}
.back-to-subjects-btn {
  background: #312e81;
  border: none;
  color: #e0e7ff;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
}
.back-to-subjects-btn:hover {
  background: #3730a3;
  color: white;
}
.about-link-container {
  margin-top: 3rem;
  text-align: center;
  padding-bottom: 2rem;
}
.about-link-btn {
  background: rgba(99, 102, 241, 0.1);
  border: 2px solid rgba(99, 102, 241, 0.3);
  color: var(--primary);
  padding: 0.875rem 1.75rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  min-height: var(--touch-target);
  min-width: 150px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.about-link-btn:hover, .about-link-btn:active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -5px rgba(99, 102, 241, 0.4);
}
.about-link-btn:active {
  transform: scale(0.98);
}
.about-link-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}
.about-link-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
[data-theme="dark"] .about-link-btn {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
}
[data-theme="dark"] .about-link-btn:hover, [data-theme="dark"] .about-link-btn:active {
  background: var(--primary);
  color: white;
}
#about-us {
  padding: 1rem;
}
.about-container {
  max-width: 800px;
  margin: 0 auto;
}
.back-btn {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-secondary);
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
  margin-bottom: 2rem;
}
.back-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.about-hero {
  text-align: center;
  margin-bottom: 3rem;
}
.about-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2.5rem;
  color: white;
  box-shadow: 0 15px 40px -10px rgba(99, 102, 241, 0.4);
}
.about-title {
  font-size: 2.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}
.about-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-style: italic;
}
.about-card {
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}
.about-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  margin-bottom: 1rem;
}
.mission-card .about-card-icon {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}
.whatwedo-card .about-card-icon {
  background: linear-gradient(135deg, #10b981, #059669);
}
.contribute-card .about-card-icon {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}
.future-card .about-card-icon {
  background: linear-gradient(135deg, #ec4899, #db2777);
}
.about-card h2 {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}
.about-card p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.about-card strong {
  color: var(--primary);
}
.about-card em {
  color: var(--secondary);
  font-style: normal;
  font-weight: 600;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}
.feature-item {
  background: var(--bg-tertiary);
  padding: 1rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: var(--transition);
}
.feature-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.feature-item i {
  color: var(--primary);
  font-size: 1.2rem;
}
.feature-item span {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
}
.email-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(16, 185, 129, 0.1));
  padding: 1.25rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
  border: 2px dashed var(--primary);
}
.email-box i {
  color: var(--primary);
  font-size: 1.3rem;
}
.email-box a {
  color: var(--primary);
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  transition: var(--transition);
}
.email-box a:hover {
  color: var(--secondary);
}
.email-note {
  font-size: 0.9rem;
  text-align: center;
  color: var(--text-muted) !important;
}
.quote-box {
  background: var(--bg-tertiary);
  padding: 1.5rem;
  border-radius: 12px;
  border-left: 4px solid var(--primary);
  margin-top: 1.5rem;
  position: relative;
}
.quote-box i {
  color: var(--primary);
  font-size: 1.5rem;
  opacity: 0.5;
  position: absolute;
  top: 1rem;
  left: 1rem;
}
.quote-box p {
  color: var(--text-primary) !important;
  font-style: italic;
  font-size: 1.1rem;
  padding-left: 2rem;
  margin: 0 !important;
}
.creator-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
}
.creator-card::before {
  background: linear-gradient(90deg, #6366f1, #10b981);
}
.creator-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  flex-shrink: 0;
}
.creator-info h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.creator-role {
  color: var(--primary) !important;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.5rem !important;
}
.creator-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0 !important;
}
@media (max-width: 480px) {
  .about-title {
    font-size: 1.8rem;
  }
  .about-icon {
    width: 80px;
    height: 80px;
    font-size: 2rem;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .creator-card {
    flex-direction: column;
    text-align: center;
  }
  .email-box {
    flex-direction: column;
    gap: 0.5rem;
  }
}
@media (min-width: 768px) {
  .about-title {
    font-size: 2.8rem;
  }
  .about-card {
    padding: 2.5rem;
  }
  .about-icon {
    width: 120px;
    height: 120px;
    font-size: 3rem;
  }
}
@media (min-width: 640px) {
  .subject-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 0;
  }
  .subject-hero > h1 {
    font-size: 3rem;
  }
  .subject-hero > .subtitle {
    font-size: 1.3rem;
  }
}
@media (min-width: 768px) {
  .subject-card {
    padding: 3rem 2.5rem;
  }
  .subject-icon {
    width: 110px;
    height: 110px;
    font-size: 2.75rem;
  }
  .subject-card h2 {
    font-size: 1.75rem;
  }
}
.hero {
  text-align: center;
  padding: 1rem 0;
}
.hero h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.3;
}
.subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}
.stats-overview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.stat-card i {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
}
.stat-card h3, .stat-card .stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
}
.stat-card p {
  color: var(--text-muted);
  font-size: 0.75rem;
}
.category-selector {
  margin-bottom: 2rem;
}
.category-selector h2 {
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-size: 1.1rem;
}
.categories {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
.category-btn {
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  padding: 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  font-family: inherit;
  min-height: var(--touch-target-large);
  text-align: left;
}
.category-btn:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.category-btn.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}
.category-btn i {
  font-size: 1.5rem;
  color: var(--primary);
  width: 40px;
  text-align: center;
  flex-shrink: 0;
}
.category-btn.active i {
  color: white;
}
.category-btn span {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
  flex: 1;
}
.category-btn.active span {
  color: white;
}
.category-btn small {
  color: var(--text-muted);
  font-size: 0.75rem;
  flex-shrink: 0;
}
.category-btn.active small {
  color: rgba(255,255,255,0.8);
}
.quick-start h2 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.action-btn {
  padding: 1rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
  min-height: var(--touch-target-large);
  width: 100%;
}
.action-btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}
.action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}
.action-btn.secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid var(--border);
}
.action-btn.secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.action-btn.tertiary {
  background: linear-gradient(135deg, var(--secondary), #059669);
  color: white;
}
.flashcard-container {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}
.flashcard-container h1 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
}
.flashcard-progress {
  margin-bottom: 1rem;
}
.flashcard-progress span {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
}
.progress-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 0.5rem;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 10px;
  transition: width 0.5s ease;
  width: 0%;
}
.flashcard-wrapper {
  perspective: 1000px;
  margin-bottom: 1.5rem;
}
.flashcard {
  width: 100%;
  min-height: 280px;
  height: auto;
  cursor: pointer;
  position: relative;
  touch-action: manipulation;
}
.flashcard-inner {
  width: 100%;
  min-height: 280px;
  height: auto;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  position: relative;
  display: grid;
}
.flashcard.flipped .flashcard-inner {
  transform: rotateY(180deg);
}
.flashcard-front, .flashcard-back {
  position: relative;
  grid-area: 1 / 1;
  width: 100%;
  min-height: 280px;
  height: auto;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.25rem;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
}
.flashcard-front {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: inset 0 0 0 3px var(--item-acc, transparent), var(--shadow-lg);
}
.flashcard-back {
  background: var(--bg-secondary);
  transform: rotateY(180deg);
  border: 3px solid var(--item-acc, var(--secondary));
}
.card-category {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(255,255,255,0.2);
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 500;
}
.flashcard-front p {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}
.flip-hint {
  position: absolute;
  bottom: 0.75rem;
  font-size: 0.75rem;
  opacity: 0.8;
}
.flashcard-back p {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.4;
  text-align: center;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}
.flashcard-back .explanation {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.flashcard-controls {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.control-btn {
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
  min-height: var(--touch-target);
}
.control-btn.wrong {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-text);
  border: 2px solid var(--danger);
}
.control-btn.wrong:hover {
  background: var(--danger);
  color: white;
}
.control-btn.correct {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  border: 2px solid var(--success);
}
.control-btn.correct:hover {
  background: var(--success);
  color: white;
}
.control-btn.prev, .control-btn.next {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}
.control-btn.prev:hover, .control-btn.next:hover {
  background: var(--primary);
  color: white;
}
.flashcard-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
}
.flashcard-stats .stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}
.flashcard-stats .stat.correct {
  color: var(--success);
}
.flashcard-stats .stat.wrong {
  color: var(--danger-text);
}
.quiz-container {
  max-width: 800px;
  margin: 0 auto;
}
.quiz-setup {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.quiz-setup h1 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}
.quiz-setup > p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.option-group {
  text-align: left;
}
.option-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.option-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  min-height: var(--touch-target);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.option-group select:focus {
  outline: none;
  border-color: var(--primary);
}
.start-quiz-btn {
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
  min-height: var(--touch-target-large);
}
.start-quiz-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}
.quiz-game {
  animation: fadeIn 0.5s ease;
}
.quiz-header {
  margin-bottom: 1rem;
}
.quiz-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.question-card {
  --item-wash: var(--item-acc, transparent);
  @supports (color: color-mix(in lab, red, red)) {
    --item-wash: color-mix(in srgb, var(--item-acc, transparent) 10%, transparent);
  }
  background-color: var(--bg-secondary);
  background-image: linear-gradient(0deg, var(--item-wash), var(--item-wash));
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--item-acc, transparent);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.question-category {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}
.question-card h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.quiz-question-image {
  display: block;
  width: 100%;
  max-width: 680px;
  margin: 0 0 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  object-fit: cover;
  background: var(--bg-tertiary);
}
.answers {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.answer-btn {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-tertiary);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  text-align: left;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  min-height: var(--touch-target-large);
}
.answer-btn:hover:not(.disabled) {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}
.answer-btn.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}
.answer-btn.correct {
  border-color: var(--success);
  background: var(--success);
  color: white;
}
.answer-btn.wrong {
  border-color: var(--danger);
  background: var(--danger);
  color: white;
}
.answer-btn.disabled {
  cursor: not-allowed;
  opacity: 0.7;
}
.answer-letter {
  width: 28px;
  height: 28px;
  background: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.answer-btn.selected .answer-letter, .answer-btn.correct .answer-letter, .answer-btn.wrong .answer-letter {
  background: rgba(255,255,255,0.3);
}
.quiz-score {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.text-success {
  color: var(--success);
}
.text-danger {
  color: var(--danger);
}
.quiz-nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  gap: 0.75rem;
}
.quiz-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  min-height: var(--touch-target);
}
.quiz-nav-btn:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}
.quiz-nav-btn:active {
  transform: scale(0.97);
}
.quiz-restart-btn {
  border-color: var(--danger, #ef4444);
  color: var(--danger, #ef4444);
}
.quiz-restart-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger, #ef4444);
}
.quiz-results {
  animation: fadeIn 0.5s ease;
}
.results-card {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.results-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}
.results-card h1 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}
.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.score-circle span {
  font-size: 2rem;
  font-weight: 700;
  color: white;
}
.results-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}
.result-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.result-stat i {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}
.result-stat i.fa-check-circle {
  color: var(--success);
}
.result-stat i.fa-times-circle {
  color: var(--danger);
}
.result-stat i.fa-clock {
  color: var(--accent);
}
.result-stat span {
  font-size: 1.25rem;
  font-weight: 700;
}
.result-stat small {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.wrong-answers-review {
  text-align: left;
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
}
.wrong-answers-review h3 {
  margin-bottom: 0.75rem;
  color: var(--danger);
  font-size: 1rem;
}
.wrong-answer-item {
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  border-left: 4px solid var(--danger);
  font-size: 0.9rem;
}
.wrong-answer-item p {
  margin-bottom: 0.35rem;
}
.wrong-answer-item .your-answer {
  color: var(--danger);
}
.wrong-answer-item .correct-answer-review {
  color: var(--success);
  font-weight: 600;
}
.results-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.fill-container {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}
.fill-container h1 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
}
.fill-progress {
  margin-bottom: 1rem;
}
.fill-card {
  --item-wash: var(--item-acc, transparent);
  @supports (color: color-mix(in lab, red, red)) {
    --item-wash: color-mix(in srgb, var(--item-acc, transparent) 10%, transparent);
  }
  background-color: var(--bg-secondary);
  background-image: linear-gradient(0deg, var(--item-wash), var(--item-wash));
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--item-acc, transparent);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.fill-category {
  display: inline-block;
  background: var(--accent);
  color: var(--bg-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 1rem;
}
.fill-sentence {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}
.fill-sentence .blank {
  display: inline-block;
  min-width: 100px;
  border-bottom: 3px dashed var(--primary);
  margin: 0 0.25rem;
  color: var(--primary);
  font-weight: 600;
}
.fill-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}
.fill-input-wrapper input {
  width: 100%;
  max-width: 100%;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition);
  min-height: var(--touch-target);
}
.fill-input-wrapper input:focus {
  outline: none;
  border-color: var(--primary);
}
.check-btn {
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--primary-dark);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
  min-height: var(--touch-target);
}
.check-btn:hover {
  background: #4338ca;
}
.fill-feedback {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: var(--radius);
}
.fill-feedback.correct {
  background: rgba(34, 197, 94, 0.1);
  border: 2px solid var(--success);
}
.fill-feedback.wrong {
  background: rgba(239, 68, 68, 0.1);
  border: 2px solid var(--danger);
}
.fill-feedback p {
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}
.fill-hint {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: rgba(245, 158, 11, 0.1);
  border-radius: var(--radius);
  color: var(--accent);
  font-size: 0.9rem;
}
.fill-controls {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.control-btn.hint {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent);
  border: 2px solid var(--accent);
}
.control-btn.hint:hover {
  background: var(--accent);
  color: white;
}
.progress-container {
  max-width: 900px;
  margin: 0 auto;
}
.progress-container h1 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}
.progress-overview {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}
.progress-card {
  background: var(--bg-secondary);
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.progress-card.main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.big-progress-circle {
  position: relative;
  width: 150px;
  height: 150px;
}
.big-progress-circle svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.circle-bg {
  fill: none;
  stroke: var(--bg-tertiary);
  stroke-width: 3;
}
.circle-progress {
  fill: none;
  stroke: url(#gradient);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dasharray 1s ease;
}
.big-progress-circle span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}
.progress-card h3 {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}
.mini-progress {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 0.5rem;
}
.mini-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 10px;
  width: 0%;
  transition: width 0.5s ease;
}
.category-progress h2 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}
.category-bars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.category-bar {
  background: var(--bg-secondary);
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.category-bar i {
  font-size: 1.25rem;
  color: var(--primary);
  width: 30px;
}
.category-bar-info {
  flex: 1;
}
.category-bar-info span {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}
.study-history {
  margin-top: 1.5rem;
}
.study-history h2 {
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}
.history-list {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  overflow: hidden;
}
.history-item {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}
.history-item:last-child {
  border-bottom: none;
}
.history-item .date {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.reset-btn {
  margin-top: 1.5rem;
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: transparent;
  border: 2px solid var(--danger);
  color: var(--danger-text);
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  min-height: var(--touch-target);
}
.reset-btn:hover {
  background: var(--danger);
  color: white;
}
.blind-map-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
}
.blind-map-header {
  text-align: center;
  margin-bottom: 1.5rem;
}
.blind-map-header h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.blind-map-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.map-difficulty-selector {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.map-diff-btn {
  padding: 0.6rem 1.2rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md, 12px);
  background: var(--card-bg, #fff);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.map-diff-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}
.map-diff-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary, var(--primary)));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.map-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--border);
  aspect-ratio: 10 / 7;
  background: #0f0d2e;
}
.blank-map-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #0f0d2e;
  cursor: crosshair;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.map-marker {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10;
}
.map-marker.correct {
  background: radial-gradient(circle, var(--success), #059669);
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.5);
  animation: correctMarkerPulse 1s ease;
}
.map-marker.incorrect {
  background: radial-gradient(circle, var(--danger), #dc2626);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
  animation: incorrectMarkerShake 0.5s ease;
}
.map-answer-section {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.map-question {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}
.map-coordinates {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-family: monospace;
}
.map-input-group {
  margin-bottom: 1rem;
}
.map-input-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}
.map-location-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition);
}
.map-location-input:focus {
  outline: none;
  border-color: var(--primary);
}
.map-action-buttons {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.map-submit-btn, .map-clear-btn, .map-skip-btn {
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
  min-height: var(--touch-target);
}
.map-submit-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}
.map-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(99, 102, 241, 0.3);
}
.map-clear-btn {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 2px solid var(--danger);
}
.map-clear-btn:hover {
  background: var(--danger);
  color: white;
}
.map-skip-btn {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}
.map-skip-btn:hover {
  background: var(--primary);
  color: white;
}
.map-feedback {
  display: none;
  padding: 1rem;
  border-radius: var(--radius);
  margin-top: 1rem;
}
.map-feedback.show {
  display: block;
}
.map-feedback.correct {
  background: rgba(34, 197, 94, 0.1);
  border: 2px solid var(--success);
}
.map-feedback.incorrect {
  background: rgba(239, 68, 68, 0.1);
  border: 2px solid var(--danger);
}
.map-feedback-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.map-feedback-icon {
  font-size: 1.5rem;
}
.map-feedback.correct .map-feedback-icon {
  color: var(--success);
}
.map-feedback.incorrect .map-feedback-icon {
  color: var(--danger);
}
.map-feedback-message {
  font-weight: 600;
  font-size: 1rem;
}
.map-feedback-details {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}
.map-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.map-progress-bar {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  overflow: hidden;
}
.map-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 10px;
  transition: width 0.5s ease;
  width: 0%;
}
@keyframes correctMarkerPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.6);
  }
}
@keyframes incorrectMarkerShake {
  0%, 100% {
    transform: translate(-50%, -50%);
  }
  25% {
    transform: translate(calc(-50% + 3px), -50%);
  }
  75% {
    transform: translate(calc(-50% - 3px), -50%);
  }
}
@media (max-width: 640px) {
  .map-action-buttons {
    grid-template-columns: 1fr;
  }
  .blind-map-header h1 {
    font-size: 1.3rem;
  }
  .blind-map-container {
    padding: 0.5rem;
  }
  .map-answer-section {
    padding: 1rem;
  }
  .map-question {
    font-size: 1rem;
  }
  .map-difficulty-selector {
    gap: 0.35rem;
  }
  .map-diff-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
  }
  .map-submit-btn, .map-clear-btn, .map-skip-btn {
    min-height: 48px;
    font-size: 0.95rem;
  }
}
@media (min-width: 768px) {
  .blind-map-container {
    padding: 2rem;
  }
  .map-answer-section {
    padding: 2rem;
  }
}
.ex-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem;
}
.ex-header {
  margin-bottom: 1.25rem;
}
.ex-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.ex-header p {
  color: var(--text-muted);
  margin-top: 0.35rem;
  font-size: 0.95rem;
}
.ex-modes {
  display: inline-flex;
  gap: 0.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.25rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.ex-mode-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 0.9rem;
  border-radius: calc(var(--radius) - 4px);
  cursor: pointer;
  transition: var(--transition);
  min-height: var(--touch-target);
}
.ex-mode-btn.active {
  background: var(--primary);
  color: #fff;
}
.ex-modes:has(+ .ex-mode-desc) {
  margin-bottom: 0.5rem;
}
.ex-mode-desc {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}
.ex-list {
  display: grid;
  gap: 0.85rem;
}
.ex-list-head {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-top: 0.5rem;
}
.ex-list-head:first-child {
  margin-top: 0;
}
.ex-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 4px solid var(--card-accent, var(--primary));
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
}
.ex-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.ex-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.ex-card-title {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1rem;
}
.ex-card-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.ex-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ex-card-status {
  font-size: 1.1rem;
  flex-shrink: 0;
}
.ex-card-status.is-done {
  color: var(--success);
}
.ex-card-status.is-todo {
  color: var(--text-muted);
}
.ex-widget {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-lg);
}
.ex-prompt {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.ex-fields {
  display: grid;
  gap: 0.75rem;
}
.ex-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.ex-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.ex-unit {
  font-weight: 500;
  opacity: 0.8;
}
.ex-input, .ex-select {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
  min-height: var(--touch-target);
  transition: var(--transition);
}
.ex-input:focus, .ex-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}
.ex-input.is-correct {
  border-color: var(--success);
}
.ex-input.is-incorrect {
  border-color: var(--danger);
}
.ex-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}
.ex-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1.1rem;
}
.ex-btn {
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.65rem 1.1rem;
  cursor: pointer;
  min-height: var(--touch-target);
  transition: var(--transition);
}
.ex-btn-primary {
  background: var(--primary);
  color: #fff;
}
.ex-btn-primary:hover {
  background: var(--primary-dark);
}
.ex-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.ex-btn-ghost:hover {
  background: var(--bg-tertiary);
}
.ex-feedback {
  margin-top: 1rem;
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-weight: 600;
  line-height: 1.5;
}
.ex-feedback.is-correct {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid var(--success);
  color: var(--success);
}
.ex-feedback.is-incorrect {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid var(--danger);
  color: var(--danger);
}
.ex-solution {
  margin-top: 1rem;
  background: var(--bg-primary);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.ex-solution ol {
  margin: 0.4rem 0 0 1.2rem;
}
.ex-solution li {
  margin-bottom: 0.35rem;
}
.ex-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.25rem;
}
.ex-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 420px;
}
.ex-table th, .ex-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.6rem;
  text-align: left;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.ex-table th {
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}
.ex-choice {
  display: grid;
  gap: 1.1rem;
}
.ex-choice-item {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}
.ex-choice-q {
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 0.7rem;
}
.ex-choice-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ex-opt {
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: var(--radius);
  padding: 0.55rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  min-height: var(--touch-target);
  transition: var(--transition);
}
.ex-opt:hover {
  border-color: var(--primary);
}
.ex-opt.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.ex-opt.is-correct {
  border-color: var(--success);
  box-shadow: inset 0 0 0 1px var(--success);
}
.ex-opt.selected.is-correct {
  background: var(--success);
  border-color: var(--success);
}
.ex-opt.is-incorrect {
  background: rgba(239, 68, 68, 0.18);
  border-color: var(--danger);
  color: var(--text-primary);
}
.ex-statement {
  display: grid;
  gap: 1rem;
}
.ex-st-section {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.9rem;
}
.ex-st-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 0.5rem 0 0.35rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.25rem;
}
.ex-st-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.4rem 0;
}
.ex-st-label {
  color: var(--text-secondary);
  font-size: 0.92rem;
}
.ex-st-input {
  width: 140px;
  max-width: 45%;
  text-align: right;
  padding: 0.45rem 0.6rem;
  font-size: 0.95rem;
  min-height: 40px;
}
.ex-st-row.is-total {
  border-top: 2px solid var(--border);
  margin-top: 0.25rem;
  padding-top: 0.7rem;
}
.ex-st-row.is-total .ex-st-label {
  font-weight: 800;
  color: var(--text-primary);
}
.ex-classify {
  display: grid;
  gap: 1.1rem;
}
.ex-cl-row {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}
.ex-cl-text {
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 0.7rem;
}
.ex-cl-entry {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.45rem 0.55rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  margin-bottom: 0.4rem;
}
.ex-cl-account {
  flex: 1 1 140px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.92rem;
}
.ex-cl-selects {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.ex-cl-select {
  min-height: 40px;
  padding: 0.4rem 0.55rem;
  font-size: 0.9rem;
}
.ex-cl-entry.is-correct {
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.08);
}
.ex-cl-entry.is-incorrect {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.08);
}
.ex-journal {
  display: grid;
  gap: 1.1rem;
}
.ex-jr-trans {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}
.ex-jr-text {
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 0.7rem;
}
.ex-jr-lines {
  display: grid;
  gap: 0.5rem;
}
.ex-jr-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.ex-jr-acc {
  flex: 1 1 150px;
  min-height: 40px;
  padding: 0.4rem 0.55rem;
  font-size: 0.9rem;
}
.ex-jr-side {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0.4rem 0.55rem;
  font-size: 0.9rem;
}
.ex-jr-amount {
  flex: 0 1 130px;
  text-align: right;
  min-height: 40px;
  padding: 0.45rem 0.6rem;
}
.ex-jr-status {
  margin-top: 0.55rem;
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 1em;
}
.ex-jr-trans.is-correct {
  border-color: var(--success);
}
.ex-jr-trans.is-correct .ex-jr-status {
  color: var(--success);
}
.ex-jr-trans.is-incorrect {
  border-color: var(--danger);
}
.ex-jr-trans.is-incorrect .ex-jr-status {
  color: var(--danger);
}
.ex-jr-free-lines {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.ex-jr-del {
  flex: 0 0 auto;
  width: 36px;
  min-height: 36px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-muted);
  border-radius: var(--radius);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}
.ex-jr-del:hover {
  border-color: var(--danger);
  color: var(--danger);
}
.ex-jr-add {
  margin-bottom: 1rem;
}
.ex-jr-tpanel {
  margin-top: 0.75rem;
}
.ex-tpanel-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.ex-jr-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  align-items: center;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.ex-jr-bar-flag {
  margin-left: auto;
}
.ex-jr-bar.is-balanced {
  border-color: var(--success);
  color: var(--success);
}
.ex-jr-bar.is-unbalanced {
  border-color: var(--danger);
  color: var(--danger);
}
.ex-tacc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.6rem;
}
.ex-tacc {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.7rem;
}
.ex-tacc-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}
.ex-tacc-cols {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.ex-tacc-dr {
  color: #93c5fd;
}
.ex-tacc-cr {
  color: #fca5a5;
}
.ex-tacc-bal {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  padding-top: 0.3rem;
}
.ex-tacc-empty {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-style: italic;
}
.ex-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 1rem;
}
.ex-empty i {
  font-size: 2.5rem;
  opacity: 0.5;
  margin-bottom: 0.75rem;
  display: block;
}
.ex-cite-item {
  margin-bottom: 1.1rem;
}
.ex-cite-given {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--card-accent, var(--primary));
  border-radius: calc(var(--radius) - 4px);
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.5;
}
.ex-cite-tag {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.ex-cite-input {
  width: 100%;
  resize: vertical;
  min-height: 2.6rem;
  font-family: inherit;
  line-height: 1.5;
}
.ex-cite-expected {
  margin-top: 0.4rem;
  font-size: 0.86rem;
  line-height: 1.5;
}
.ex-cite-ok {
  color: var(--success);
  font-weight: 600;
}
.ex-cite-no {
  color: var(--danger);
  font-weight: 600;
}
.ex-cite-ans {
  color: var(--text-primary);
}
@media (max-width: 640px) {
  .ex-container {
    padding: 0.75rem;
  }
  .ex-header h1 {
    font-size: 1.35rem;
  }
  .ex-actions .ex-btn {
    flex: 1 1 auto;
  }
}
.hidden {
  display: none !important;
}
@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
  .header {
    padding: 1rem 2rem;
  }
  .logo {
    font-size: 1.5rem;
  }
  .logo-img {
    height: 42px !important;
    max-height: 42px !important;
    max-width: 80px !important;
  }
  .logo i {
    font-size: 2rem;
  }
  .main-content {
    padding: 2rem;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .subtitle {
    font-size: 1.1rem;
  }
  .stats-overview {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
  .stat-card {
    padding: 1.5rem;
  }
  .stat-card i {
    font-size: 2rem;
  }
  .stat-card h3, .stat-card .stat-number {
    font-size: 2rem;
  }
  .stat-card p {
    font-size: 0.9rem;
  }
  .categories {
    grid-template-columns: repeat(2, 1fr);
  }
  .category-btn {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }
  .category-btn i {
    font-size: 2rem;
    width: auto;
  }
  .quick-actions {
    flex-direction: row;
    justify-content: center;
  }
  .action-btn {
    width: auto;
  }
  .flashcard {
    min-height: 350px;
  }
  .flashcard-front p {
    font-size: 1.4rem;
  }
  .flashcard-back p {
    font-size: 1.2rem;
  }
  .flashcard-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
  }
  .quiz-setup {
    padding: 2.5rem;
  }
  .quiz-options {
    flex-direction: row;
    gap: 1.5rem;
  }
  .option-group {
    flex: 1;
  }
  .start-quiz-btn {
    width: auto;
  }
  .question-card {
    padding: 2rem;
  }
  .question-card h2 {
    font-size: 1.3rem;
  }
  .fill-input-wrapper {
    flex-direction: row;
  }
  .fill-input-wrapper input {
    max-width: 300px;
  }
  .check-btn {
    width: auto;
  }
  .fill-controls {
    display: flex;
    justify-content: center;
  }
  .progress-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
  .progress-card.main {
    grid-row: 1 / 3;
  }
  .results-actions {
    flex-direction: row;
    justify-content: center;
  }
  .toast {
    bottom: 2rem;
  }
}
@media (min-width: 1024px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .subtitle {
    font-size: 1.2rem;
  }
  .categories {
    grid-template-columns: repeat(3, 1fr);
  }
  .progress-overview {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .big-progress-circle {
    width: 200px;
    height: 200px;
  }
  .big-progress-circle span {
    font-size: 2.5rem;
  }
}
@media (min-width: 1200px) {
  .main-content {
    padding: 2rem 3rem;
  }
}
@media (max-width: 374px) {
  .hero h1 {
    font-size: 1.3rem;
  }
  .stat-card h3, .stat-card .stat-number {
    font-size: 1.25rem;
  }
  .category-btn span {
    font-size: 0.8rem;
  }
  .flashcard {
    min-height: 280px;
  }
  .flashcard-front p {
    font-size: 1rem;
  }
  .mobile-nav-btn {
    font-size: 0.6rem;
  }
  .mobile-nav-btn i {
    font-size: 1.1rem;
  }
  .hero-title {
    font-size: 2rem !important;
  }
  .hero-subtitle {
    font-size: 0.95rem;
  }
  .hero-visual {
    width: 250px;
    height: 250px;
  }
  .float-card {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
  }
  .float-card i {
    font-size: 1.1rem;
  }
  .subject-card {
    padding: 1.5rem 1rem !important;
  }
  .subject-icon {
    width: 70px !important;
    height: 70px !important;
    font-size: 1.75rem !important;
  }
  .card-title {
    font-size: 1.2rem;
  }
  .question-card h2 {
    font-size: 1rem;
  }
  .answer-btn {
    padding: 0.75rem;
    font-size: 0.85rem;
  }
}
@media (min-width: 390px) and (max-width: 427px) {
  .flashcard {
    min-height: 320px;
  }
  .hero h1 {
    font-size: 1.6rem;
  }
  .hero-visual {
    width: 280px;
    height: 280px;
  }
}
@media (min-width: 428px) and (max-width: 767px) {
  .stats-overview {
    gap: 1rem;
  }
  .stat-card {
    padding: 1.25rem;
  }
  .hero h1 {
    font-size: 1.75rem;
  }
  .flashcard {
    min-height: 340px;
  }
  .hero-visual {
    width: 320px;
    height: 320px;
  }
}
@media (max-width: 767px) {
  .landing-hero {
    padding: 1.5rem 1rem;
    gap: 2rem;
    padding-top: calc(var(--nav-h) + var(--safe-top) + 1.25rem);
  }
  .hero-content {
    padding: 0 0.5rem;
  }
  .hero-badge {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
  .hero-title {
    font-size: clamp(2rem, 7vw, 2.5rem);
    margin-bottom: 1rem;
  }
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
  }
  .hero-actions {
    padding: 0 0.5rem;
  }
  .cta-button {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    width: 100%;
  }
  .hero-visual {
    margin-top: 1rem;
  }
  .float-card {
    padding: 0.875rem 1rem;
  }
  .float-card span {
    font-size: 0.85rem;
  }
  .subject-cards {
    padding: 0 0.5rem;
    gap: 1.25rem;
  }
  .subject-card {
    padding: 2rem 1.5rem !important;
  }
  .subject-icon {
    width: 80px !important;
    height: 80px !important;
    font-size: 2rem !important;
    margin-bottom: 1.25rem !important;
  }
  .card-title {
    font-size: 1.35rem;
  }
  .card-desc {
    font-size: 0.9rem;
    max-width: 100%;
  }
  .subject-meta {
    gap: 1rem;
  }
  .subject-meta span {
    font-size: 0.85rem;
  }
  .subject-btn {
    padding: 0.875rem 2rem !important;
    font-size: 0.95rem !important;
    width: 100%;
  }
  .categories {
    gap: 0.75rem;
  }
  .category-btn {
    padding: 1rem;
    min-height: 70px;
  }
  .category-btn i {
    font-size: 1.25rem;
    width: 35px;
  }
  .category-btn span {
    font-size: 0.9rem;
  }
  .flashcard-container {
    padding: 0;
  }
  .flashcard {
    min-height: 300px;
    margin: 0 0.25rem;
  }
  .flashcard-front, .flashcard-back {
    padding: 1.5rem 1rem;
  }
  .flashcard-front p {
    font-size: 1.05rem;
    line-height: 1.6;
  }
  .flashcard-back p {
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: pre-wrap;
  }
  .flashcard-back .explanation {
    font-size: 0.8rem;
    padding: 0.6rem;
  }
  .card-category {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
  }
  .flip-hint {
    font-size: 0.75rem;
  }
  .flashcard-controls {
    gap: 0.75rem;
    padding: 0 0.25rem;
  }
  .control-btn {
    padding: 0.875rem 0.75rem;
    font-size: 0.85rem;
    min-height: 48px;
  }
  .quiz-container {
    padding: 0;
  }
  .quiz-setup {
    padding: 1.25rem;
    margin: 0 0.25rem;
  }
  .quiz-setup h1 {
    font-size: 1.2rem;
  }
  .option-group select {
    padding: 0.875rem;
    font-size: 1rem;
  }
  .start-quiz-btn {
    padding: 0.875rem 1.5rem;
  }
  .question-card {
    padding: 1.25rem;
    margin: 0 0.25rem 1rem;
  }
  .question-card h2 {
    font-size: 1.05rem;
    line-height: 1.5;
  }
  .answers {
    gap: 0.6rem;
  }
  .answer-btn {
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
    min-height: 52px;
    line-height: 1.4;
  }
  .answer-letter {
    width: 26px;
    height: 26px;
    font-size: 0.8rem;
  }
  .quiz-score {
    gap: 1rem;
    font-size: 0.9rem;
  }
  .results-card {
    padding: 1.25rem;
    margin: 0 0.25rem;
  }
  .results-card h1 {
    font-size: 1.3rem;
  }
  .score-circle {
    width: 100px;
    height: 100px;
  }
  .score-circle span {
    font-size: 1.75rem;
  }
  .results-stats {
    gap: 1rem;
  }
  .result-stat span {
    font-size: 1.1rem;
  }
  .wrong-answers-review {
    padding: 0.875rem;
  }
  .wrong-answer-item {
    padding: 0.6rem;
    font-size: 0.85rem;
  }
  .fill-container {
    padding: 0;
  }
  .fill-card {
    padding: 1.25rem;
    margin: 0 0.25rem 1rem;
  }
  .fill-sentence {
    font-size: 1rem;
    line-height: 1.8;
  }
  .fill-sentence .blank {
    min-width: 80px;
  }
  .fill-input-wrapper input {
    padding: 0.875rem;
    font-size: 1rem;
  }
  .check-btn {
    padding: 0.875rem 1.25rem;
  }
  .fill-controls {
    gap: 0.6rem;
  }
  .progress-container {
    padding: 0;
  }
  .progress-container h1 {
    padding: 0 0.5rem;
  }
  .progress-overview {
    padding: 0 0.25rem;
  }
  .progress-card {
    padding: 1rem;
  }
  .big-progress-circle {
    width: 130px;
    height: 130px;
  }
  .big-progress-circle span {
    font-size: 1.75rem;
  }
  .category-progress {
    padding: 0 0.25rem;
  }
  .category-bar {
    padding: 0.75rem;
  }
  .study-history {
    padding: 0 0.25rem;
  }
  .mobile-nav {
    padding: 0.25rem 0;
  }
  .mobile-nav-btn {
    min-height: 56px;
    padding: 0.4rem 0.25rem;
    gap: 0.2rem;
  }
  .mobile-nav-btn i {
    font-size: 1.3rem;
  }
  .mobile-nav-btn span {
    font-size: 0.7rem;
  }
  .about-content {
    padding: 1rem;
  }
  .about-card {
    padding: 1.25rem;
  }
  .about-title {
    font-size: 1.6rem;
  }
  .about-icon {
    width: 70px;
    height: 70px;
    font-size: 1.75rem;
  }
  .features-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .feature-item {
    padding: 0.875rem;
  }
  .creator-card {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem;
  }
  .creator-avatar {
    width: 70px;
    height: 70px;
    font-size: 1.75rem;
  }
  .email-box {
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
  }
  .email-box a {
    font-size: 1rem;
  }
  .main-content {
    padding: 0.75rem;
    padding-bottom: calc(0.75rem + 70px + var(--safe-bottom));
  }
  .study-content {
    padding: 0.75rem;
  }
  .hero {
    padding: 0.75rem 0;
  }
  .hero h1 {
    font-size: 1.5rem;
    padding: 0 0.5rem;
  }
  .subtitle {
    padding: 0 0.5rem;
    font-size: 0.9rem;
  }
  .stats-overview {
    padding: 0 0.25rem;
    gap: 0.6rem;
  }
  .stat-card {
    padding: 0.875rem;
  }
  .stat-card i {
    font-size: 1.25rem;
  }
  .stat-card h3, .stat-card .stat-number {
    font-size: 1.4rem;
  }
  .stat-card p {
    font-size: 0.7rem;
  }
  .quick-actions {
    padding: 0 0.25rem;
    gap: 0.6rem;
  }
  .action-btn {
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
  }
  .toast {
    bottom: calc(70px + var(--safe-bottom) + 10px);
    left: 1rem;
    right: 1rem;
    transform: translateX(0) translateY(100px);
    max-width: none;
  }
  .toast.show {
    transform: translateX(0) translateY(0);
  }
  .footer {
    padding: 1rem;
    padding-bottom: calc(1rem + 65px + var(--safe-bottom));
    font-size: 0.8rem;
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  body {
    padding-bottom: calc(var(--safe-bottom) + 60px);
  }
  .mobile-nav {
    padding-bottom: calc(var(--safe-bottom) / 2);
  }
  .mobile-nav-btn {
    min-height: 50px;
    padding: 0.35rem 0.25rem;
  }
  .flashcard {
    height: auto;
  }
  .hero {
    padding: 0.5rem 0;
  }
  .stats-overview {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .quiz-options {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (hover: hover) and (pointer: fine) {
  .category-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
  }
  .action-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
  }
  .stat-card:hover {
    transform: translateY(-5px);
  }
}
@media (hover: none) {
  .category-btn:hover, .action-btn:hover, .stat-card:hover {
    transform: none;
  }
  .theme-toggle:hover {
    transform: none;
  }
  .category-btn:active, .action-btn:active, .cta-button:active {
    transform: scale(0.98);
    opacity: 0.9;
  }
  .answer-btn:active:not(.disabled) {
    transform: scale(0.99);
  }
  .subject-card:active {
    transform: translateY(-2px) scale(0.99);
  }
  .flashcard:active {
    transform: scale(0.99);
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  }
}
@media (prefers-contrast: high) {
  :root {
    --border: #000;
  }
  .answer-btn {
    border-width: 3px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .flashcard-inner {
    transition: none;
  }
}
@media print {
  .mobile-nav, .header, .theme-toggle {
    display: none !important;
  }
  body {
    padding: 0;
  }
  .main-content {
    max-width: 100%;
  }
}
.swipe-indicator {
  display: none;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0.5rem;
  margin-top: 0.5rem;
}
.swipe-indicator i {
  margin: 0 0.25rem;
  animation: swipeHint 2s ease-in-out infinite;
}
@keyframes swipeHint {
  0%, 100% {
    transform: translateX(0);
    opacity: 0.5;
  }
  50% {
    transform: translateX(5px);
    opacity: 1;
  }
}
@media (max-width: 767px) and (hover: none) {
  .swipe-indicator {
    display: block;
  }
}
@supports (padding-top: env(safe-area-inset-top)) {
  .landing-header {
    padding-top: calc(1rem + env(safe-area-inset-top));
  }
  .header {
    padding-top: calc(0.75rem + env(safe-area-inset-top));
  }
  .about-header {
    padding-top: calc(1rem + env(safe-area-inset-top));
  }
  .mobile-nav {
    padding-bottom: env(safe-area-inset-bottom);
  }
  .footer {
    padding-bottom: calc(1rem + 65px + env(safe-area-inset-bottom));
  }
  @media (max-width: 767px) {
    .main-content {
      padding-bottom: calc(0.75rem + 70px + env(safe-area-inset-bottom));
    }
    .toast {
      bottom: calc(70px + env(safe-area-inset-bottom) + 10px);
    }
  }
}
.pull-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  z-index: 9999;
}
.pull-indicator.visible {
  transform: translateY(0);
}
.pull-indicator i {
  font-size: 1.5rem;
  color: var(--primary);
  animation: sokratSpin 1s linear infinite;
}
@keyframes sokratSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 767px) {
  .landing-features {
    display: flex !important;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 1rem;
    max-width: 100%;
  }
  .landing-features .feature-card {
    padding: 1.25rem;
    margin: 0;
  }
  .landing-features .feature-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }
  .landing-features .feature-card h3 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
  }
  .landing-features .feature-card p {
    font-size: 0.85rem;
    line-height: 1.4;
  }
  .landing-footer {
    padding: 1.25rem 1rem;
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    font-size: 0.8rem;
  }
  .subjects-sidebar {
    max-width: 100%;
    width: 100%;
  }
  .sidebar-header {
    padding: 1rem;
    padding-top: calc(1rem + env(safe-area-inset-top, 0px));
  }
  .sidebar-header h2 {
    font-size: 1.1rem;
  }
  .sidebar-content {
    padding: 1rem;
  }
  .subject-option {
    padding: 1rem;
    min-height: 60px;
  }
  .subject-option-icon {
    width: 45px;
    height: 45px;
    font-size: 1.25rem;
  }
  .subject-option-info h3 {
    font-size: 1rem;
  }
  .subject-option-info p {
    font-size: 0.8rem;
  }
  .study-home-header {
    padding: 1rem;
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  .study-home-header h2 {
    font-size: 1.1rem;
  }
  .study-home-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }
  .study-home-actions .btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
  .categories-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
    padding: 0.5rem;
  }
  .category-card {
    padding: 1rem;
  }
  .category-icon {
    width: 45px;
    height: 45px;
    font-size: 1.25rem;
  }
  .category-info h3 {
    font-size: 0.95rem;
  }
  .category-info p {
    font-size: 0.8rem;
  }
  .quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
  }
  .quick-action-card {
    flex-direction: row;
    padding: 1rem;
    gap: 1rem;
    text-align: left;
  }
  .quick-action-card .action-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
  }
  .quick-action-card .action-content {
    flex: 1;
  }
  .study-stats {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
  }
  .stat-card {
    padding: 1rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
  .stat-value {
    font-size: 1.5rem;
  }
  .stat-label {
    font-size: 0.85rem;
  }
  .flashcards-section {
    padding: 0.75rem;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
  .flashcards-header {
    padding: 0.75rem;
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  .flashcards-header h2 {
    font-size: 1.1rem;
  }
  .flashcards-controls {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }
  .flashcard-container {
    padding: 0.5rem;
  }
  .flashcard {
    min-height: 220px;
    height: auto;
  }
  .flashcard-inner {
    min-height: 220px;
    height: auto;
  }
  .flashcard-front, .flashcard-back {
    min-height: 220px;
    height: auto;
    padding: 1rem 0.75rem;
  }
  .flashcard-front p {
    font-size: 0.85rem;
    line-height: 1.35;
  }
  .flashcard-back p {
    font-size: 0.8rem;
    line-height: 1.35;
  }
  .flashcard-content h3 {
    font-size: 1rem;
  }
  .flashcard-content p {
    font-size: 0.85rem;
  }
  .card-category {
    font-size: 0.6rem;
    padding: 0.2rem 0.5rem;
  }
  .flip-hint {
    font-size: 0.7rem;
  }
  .flashcard-back .explanation {
    font-size: 0.7rem;
    padding: 0.5rem;
  }
  .flashcard-navigation {
    padding: 0.75rem;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .flashcard-navigation .btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    flex: 1;
    min-width: auto;
    max-width: 120px;
  }
  .quiz-section {
    padding: 0.75rem;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
  .quiz-header {
    padding: 0.75rem;
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  .quiz-header h2 {
    font-size: 1.1rem;
  }
  .quiz-info {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }
  .quiz-content {
    padding: 0.5rem;
  }
  .quiz-question {
    padding: 1rem;
    margin-bottom: 0.75rem;
  }
  .question-text {
    font-size: 1rem;
    line-height: 1.5;
  }
  .quiz-options {
    gap: 0.6rem;
  }
  .quiz-option {
    padding: 0.9rem 1rem;
    font-size: 0.9rem;
    min-height: 50px;
  }
  .quiz-navigation {
    padding: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
  }
  .quiz-navigation .btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    flex: 1;
    max-width: 150px;
  }
  .quiz-results {
    padding: 1rem;
  }
  .results-score {
    font-size: 2.5rem;
  }
  .results-message {
    font-size: 1rem;
  }
  .results-stats {
    flex-direction: column;
    gap: 0.5rem;
  }
  .results-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  .results-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .fill-section {
    padding: 0.75rem;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
  .fill-header {
    padding: 0.75rem;
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  .fill-header h2 {
    font-size: 1.1rem;
  }
  .fill-info {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }
  .fill-content {
    padding: 0.5rem;
  }
  .fill-question {
    padding: 1rem;
    margin-bottom: 0.75rem;
  }
  .fill-text {
    font-size: 1rem;
    line-height: 1.7;
  }
  .fill-blank {
    min-width: 80px;
    padding: 0.35rem 0.5rem;
    font-size: 0.9rem;
  }
  .fill-navigation {
    padding: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
  }
  .fill-navigation .btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    flex: 1;
    max-width: 150px;
  }
  .analytics-section, .progress-section {
    padding: 0.75rem;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
  .analytics-header, .progress-header {
    padding: 0.75rem;
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  .analytics-header h2, .progress-header h2 {
    font-size: 1.1rem;
  }
  .analytics-grid, .progress-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
  }
  .analytics-card, .progress-card {
    padding: 1rem;
  }
  .analytics-card h3, .progress-card h3 {
    font-size: 1rem;
  }
  .chart-container {
    height: 180px;
  }
  .progress-item {
    padding: 0.75rem;
  }
  .progress-label {
    font-size: 0.9rem;
  }
  .progress-value {
    font-size: 0.85rem;
  }
}
@media (max-width: 374px) {
  .study-mobile-nav .mobile-nav-btn {
    padding: 0.35rem 0.1rem;
    font-size: 0.55rem;
    min-height: 54px;
  }
  .study-mobile-nav .mobile-nav-btn i {
    font-size: 1.1rem;
  }
  .landing-features .feature-card {
    padding: 1rem;
  }
  .flashcard {
    min-height: 180px;
    padding: 1rem;
  }
  .quiz-option {
    padding: 0.75rem;
    font-size: 0.85rem;
  }
  .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
  .filter-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    min-height: 40px;
  }
}
@media (max-width: 900px) and (orientation: landscape) {
  .study-mobile-nav {
    padding: 0.25rem 0;
  }
  .study-mobile-nav .mobile-nav-btn {
    min-height: 50px;
    padding: 0.25rem 0.1rem;
  }
  .study-mobile-nav .mobile-nav-btn i {
    font-size: 1rem;
  }
  .flashcard {
    min-height: 150px;
  }
}
@media (max-width: 767px) {
  .study-page .study-mobile-nav {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  .study-page .mobile-nav:not(.study-mobile-nav) {
    display: none !important;
  }
}
@media screen and (max-width: 374px) {
  .hero-title {
    font-size: 1.8rem;
  }
  .hero-subtitle {
    font-size: 0.9rem;
  }
  .cta-button {
    padding: 12px 20px;
    font-size: 0.9rem;
  }
  .subject-card {
    padding: 12px;
  }
  .lesson-card {
    padding: 12px;
  }
  .flashcard {
    min-height: 280px;
  }
  .quiz-option {
    padding: 12px;
    font-size: 0.9rem;
  }
}
@media screen and (min-width: 375px) and (max-width: 413px) {
  .hero-title {
    font-size: 2rem;
  }
  .subject-card {
    padding: 14px;
  }
  .flashcard {
    min-height: 300px;
  }
}
@media screen and (min-width: 414px) and (max-width: 479px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .subject-card {
    padding: 16px;
  }
  .flashcard {
    min-height: 320px;
  }
}
@media screen and (min-width: 480px) and (max-width: 599px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .subjects-grid {
    gap: 16px;
  }
  .flashcard {
    min-height: 350px;
  }
  .quiz-container {
    padding: 20px;
  }
}
@media screen and (min-width: 600px) and (max-width: 767px) {
  .hero-title {
    font-size: 2.8rem;
  }
  .hero-subtitle {
    font-size: 1.1rem;
  }
  .subjects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .lessons-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .flashcard {
    min-height: 380px;
  }
}
@media screen and (min-width: 768px) and (max-width: 1023px) {
  .hero-title {
    font-size: 3rem;
  }
  .hero-subtitle {
    font-size: 1.2rem;
    max-width: 500px;
  }
  .hero-actions {
    flex-direction: row;
    gap: 16px;
  }
  .subjects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 700px;
    margin: 0 auto;
  }
  .lessons-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 700px;
    margin: 0 auto;
  }
  .subject-card {
    padding: 24px;
  }
  .lesson-card {
    padding: 20px;
  }
  .flashcard {
    min-height: 400px;
    max-width: 600px;
    margin: 0 auto;
  }
  .quiz-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px;
  }
  .fill-container {
    max-width: 600px;
    margin: 0 auto;
  }
  .bottom-nav {
    max-width: 600px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 20px 20px 0 0;
  }
}
@media screen and (min-width: 1024px) and (max-width: 1279px) {
  .hero-title {
    font-size: 3.5rem;
  }
  .hero-subtitle {
    font-size: 1.25rem;
    max-width: 550px;
  }
  .subjects-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
  }
  .lessons-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
  }
  .flashcard {
    min-height: 420px;
    max-width: 700px;
    margin: 0 auto;
  }
  .quiz-container {
    max-width: 700px;
    margin: 0 auto;
  }
  .bottom-nav {
    max-width: 700px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 20px 20px 0 0;
  }
}
@media screen and (min-width: 1280px) and (max-width: 1535px) {
  .hero-title {
    font-size: 4rem;
  }
  .hero-subtitle {
    font-size: 1.3rem;
    max-width: 600px;
  }
  .subjects-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 1000px;
    margin: 0 auto;
  }
  .lessons-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
  }
  .flashcard {
    min-height: 450px;
    max-width: 800px;
    margin: 0 auto;
  }
  .quiz-container {
    max-width: 800px;
    margin: 0 auto;
  }
  .bottom-nav {
    max-width: 800px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 24px 24px 0 0;
  }
}
@media screen and (min-width: 1536px) {
  .hero-title {
    font-size: 4.5rem;
  }
  .hero-subtitle {
    font-size: 1.4rem;
    max-width: 700px;
  }
  .hero-content {
    padding: 60px;
  }
  .subjects-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
  }
  .lessons-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 1200px;
    margin: 0 auto;
  }
  .subject-card {
    padding: 28px;
  }
  .lesson-card {
    padding: 24px;
  }
  .flashcard {
    min-height: 500px;
    max-width: 900px;
    margin: 0 auto;
  }
  .quiz-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px;
  }
  .fill-container {
    max-width: 900px;
    margin: 0 auto;
  }
  .bottom-nav {
    max-width: 900px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
  }
}
@media screen and (max-height: 500px) and (orientation: landscape) {
  .landing-hero {
    padding-top: 60px;
  }
  .hero-title {
    font-size: 1.8rem;
  }
  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 12px;
  }
  .hero-actions {
    flex-direction: row;
    gap: 12px;
  }
  .cta-button {
    padding: 10px 20px;
  }
  .flashcard {
    min-height: 220px;
  }
  .bottom-nav {
    padding: 8px 16px;
  }
  .nav-btn {
    padding: 6px 10px;
  }
}
@media screen and (min-height: 501px) and (max-height: 900px) and (orientation: landscape) {
  .flashcard {
    min-height: 300px;
    max-width: 70%;
    margin: 0 auto;
  }
  .quiz-container {
    max-width: 70%;
    margin: 0 auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .gradient-orb {
    animation: none !important;
  }
  .flashcard-inner {
    transition: none !important;
  }
}
@media (prefers-contrast: high) {
  :root {
    --border: #374151;
    --text-secondary: #374151;
  }
  .subject-card, .lesson-card, .flashcard, .quiz-container {
    border: 2px solid var(--text-primary);
  }
}
@media print {
  .landing-page, .bottom-nav, .subjects-sidebar, .subjects-overlay, .flashcard-nav, .theme-toggle {
    display: none !important;
  }
  .study-page {
    padding: 0;
  }
}
@media (min-width: 480px) {
  .categories {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 768px) {
  .categories {
    grid-template-columns: repeat(3, 1fr);
  }
  .stats-overview {
    grid-template-columns: repeat(4, 1fr);
  }
  .quick-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .action-btn {
    flex: 1;
    min-width: 200px;
  }
}
@media (min-width: 1024px) {
  .categories {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (min-width: 480px) {
  .flashcard-container {
    padding: 0 1rem;
  }
  .flashcard-wrapper {
    max-width: 500px;
    margin: 0 auto;
  }
  .flashcard-controls {
    max-width: 500px;
    margin: 1rem auto;
  }
}
@media (min-width: 768px) {
  .flashcard-container h1 {
    font-size: 1.5rem;
  }
  .flashcard-wrapper {
    max-width: 600px;
  }
  .flashcard-controls {
    max-width: 600px;
    gap: 1rem;
  }
  .control-btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }
}
@media (min-width: 480px) {
  .quiz-container {
    max-width: 500px;
    margin: 0 auto;
  }
  .quiz-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .results-actions {
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
  }
  .results-actions .action-btn {
    flex: 0 1 auto;
    min-width: 150px;
  }
}
@media (min-width: 768px) {
  .quiz-container {
    max-width: 650px;
  }
  .question-card {
    padding: 2rem;
  }
  .question-card h2 {
    font-size: 1.25rem;
  }
  .answer-btn {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }
  .score-circle {
    width: 140px;
    height: 140px;
  }
  .score-circle span {
    font-size: 2.5rem;
  }
}
@media (min-width: 480px) {
  .fill-container {
    max-width: 500px;
    margin: 0 auto;
  }
  .fill-input-wrapper {
    flex-direction: row;
  }
  .fill-input-wrapper input {
    flex: 1;
  }
  .check-btn {
    width: auto;
    padding: 1rem 2rem;
  }
}
@media (min-width: 768px) {
  .fill-container {
    max-width: 650px;
  }
  .fill-card {
    padding: 2rem;
  }
  .fill-sentence {
    font-size: 1.2rem;
  }
  .fill-controls {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 480px) {
  .progress-overview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .progress-card.main {
    grid-column: span 2;
  }
}
@media (min-width: 768px) {
  .progress-container {
    max-width: 800px;
    margin: 0 auto;
  }
  .progress-overview {
    grid-template-columns: repeat(3, 1fr);
  }
  .progress-card.main {
    grid-column: span 3;
  }
  .category-bars {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}
@media (min-width: 1024px) {
  .progress-overview {
    grid-template-columns: repeat(4, 1fr);
  }
  .progress-card.main {
    grid-column: span 4;
  }
}
@media (min-width: 768px) {
  .subjects-sidebar {
    max-width: 450px;
  }
  .subject-item {
    padding: 1.25rem;
  }
  .subject-item-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  .subject-item-info h3 {
    font-size: 1.1rem;
  }
  .subject-item-info p {
    font-size: 0.9rem;
  }
  .lessons-content {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
  }
  .lessons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .lesson-card {
    padding: 1.5rem;
  }
}
@media (min-width: 1024px) {
  .lessons-content {
    max-width: 1000px;
  }
  .lessons-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 768px) {
  .study-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
  }
  #home .hero {
    padding: 2rem;
  }
  #home .hero h1 {
    font-size: 2rem;
  }
}
@media (min-width: 1024px) {
  .study-content {
    max-width: 1100px;
  }
}
@media (max-width: 767px) and (hover: none) and (pointer: coarse) {
  .answer-btn, .control-btn, .action-btn, .filter-btn, .category-btn {
    min-height: 48px;
  }
  .flashcard {
    min-height: 280px;
  }
}
@media (min-width: 768px) and (max-width: 1023px) and (orientation: landscape) {
  .study-content {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  }
  .flashcard-wrapper {
    max-width: 70%;
  }
  .quiz-container {
    max-width: 70%;
  }
}
@media (max-width: 480px) {
  .logo-wrapper {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
  }
  .logo-text {
    font-size: 1.25rem !important;
  }
  .sidebar-logo .logo-wrapper {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    max-height: 36px;
  }
  .sidebar-logo span {
    font-size: 1rem;
  }
  .logo-wrapper-large {
    width: 100px;
    height: 100px;
    min-width: 100px;
    min-height: 100px;
    max-width: 100px;
    max-height: 100px;
  }
  .flashcard {
    min-height: 200px;
  }
  .flashcard-inner {
    min-height: 200px;
  }
  .flashcard-front, .flashcard-back {
    min-height: 200px;
    padding: 0.75rem;
  }
  .flashcard-front p {
    font-size: 0.8rem !important;
    line-height: 1.3 !important;
  }
  .flashcard-back p {
    font-size: 0.75rem !important;
    line-height: 1.3 !important;
  }
  .flashcard-back .explanation {
    font-size: 0.65rem !important;
  }
}
@media (min-width: 768px) {
  .logo-wrapper {
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    max-width: 50px;
    max-height: 50px;
  }
  .logo-text {
    font-size: 1.6rem !important;
  }
  .logo-wrapper-large {
    width: 150px;
    height: 150px;
    min-width: 150px;
    min-height: 150px;
    max-width: 150px;
    max-height: 150px;
  }
}
@media (min-width: 1024px) {
  .logo-wrapper {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    max-width: 48px;
    max-height: 48px;
  }
  .logo-wrapper-large {
    width: 140px;
    height: 140px;
    min-width: 140px;
    min-height: 140px;
    max-width: 140px;
    max-height: 140px;
  }
}
#learn {
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow-x: hidden;
}
#learn .learn-container {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 14px;
  padding-bottom: 24px;
  box-sizing: border-box;
}
#learn .learn-container > h1 {
  font-size: 1.15rem;
  text-align: center;
  margin: 0 0 14px 0;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 14px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}
#learn .learn-container > h1 i {
  font-size: 1.2rem;
  color: white;
}
#learn .learn-filter {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  padding: 4px 0 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
#learn .learn-filter::-webkit-scrollbar {
  height: 6px;
}
#learn .learn-filter::-webkit-scrollbar-track {
  background: transparent;
}
#learn .learn-filter::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
#learn .learn-filter::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary, var(--border));
}
#learn .learn-filter.can-scroll-right {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
}
#learn .learn-filter.can-scroll-left {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 36px);
  mask-image: linear-gradient(to right, transparent, #000 36px);
}
#learn .learn-filter.can-scroll-left.can-scroll-right {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent);
}
#learn .learn-filter.is-scrollable {
  justify-content: flex-start;
}
#learn .filter-btn {
  padding: 10px 16px;
  border: 2px solid var(--border);
  background: var(--bg-secondary);
  border-radius: 22px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-primary);
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}
#learn .filter-btn:hover, #learn .filter-btn.active {
  border-color: var(--primary);
  background: var(--primary-dark);
  color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}
#learn .filter-btn:active {
  transform: scale(0.96);
}
#learn .learn-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: 0;
}
#learn .learn-card {
  background: var(--bg-secondary);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
  border-left: 4px solid var(--st-acc, var(--border));
  margin: 0;
}
#learn .learn-card-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 14px 16px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
#learn .learn-card-header h2, #learn .learn-card-header h3, #learn .learn-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
#learn .learn-card-header i {
  font-size: 1.1rem;
  flex-shrink: 0;
  color: white;
}
#learn .learn-card-header span {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  padding: 4px 10px;
  border-radius: 12px;
  flex-shrink: 0;
}
#learn .learn-card-content {
  padding: 16px;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-primary);
  word-wrap: break-word;
  overflow-wrap: break-word;
  overflow-x: hidden;
  max-width: 100%;
  box-sizing: border-box;
}
#learn .learn-card-content * {
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  box-sizing: border-box;
}
#learn .learn-card-content h3 {
  font-size: 1.1rem;
  color: var(--primary-light);
  margin: 18px 0 10px 0;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--primary);
  font-weight: 600;
  line-height: 1.3;
}
#learn .learn-card-content h3:first-child {
  margin-top: 0;
}
#learn .learn-card-content h4 {
  font-size: 1rem;
  color: var(--text-primary);
  margin: 14px 0 8px 0;
  font-weight: 600;
  line-height: 1.3;
}
#learn .learn-card-content h5 {
  font-size: 0.95rem;
  color: var(--primary);
  margin: 12px 0 6px 0;
  font-weight: 600;
  line-height: 1.3;
}
#learn .learn-card-content p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0 0 10px 0;
  color: var(--text-secondary);
}
#learn .learn-card-content ul {
  list-style: none;
  margin: 10px 0;
  padding-left: 0;
}
#learn .learn-card-content ul li {
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 5px 0 5px 22px;
  position: relative;
  color: var(--text-secondary);
}
#learn .learn-card-content ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: bold;
  font-size: 0.85rem;
}
#learn .learn-card-content ol {
  margin: 10px 0;
  padding-left: 20px;
}
#learn .learn-card-content ol li {
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 4px 0;
  color: var(--text-secondary);
}
#learn .learn-card-content .highlight {
  background: rgba(99, 102, 241, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
  color: var(--primary);
}
#learn .learn-card-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}
#learn .tip-box, #learn .warning-box, #learn .example-box, #learn .formula-box, #learn .learn-card-content .tip-box, #learn .learn-card-content .warning-box, #learn .learn-card-content .example-box, #learn .learn-card-content .formula-box {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  margin: 14px 0;
  border-radius: 8px;
  border-left: 3px solid;
  overflow: hidden;
  word-wrap: break-word;
}
#learn .tip-box, #learn .learn-card-content .tip-box {
  background: rgba(16, 185, 129, 0.1);
  border-left-color: var(--secondary);
}
#learn .warning-box, #learn .learn-card-content .warning-box {
  background: rgba(239, 68, 68, 0.1);
  border-left-color: var(--danger);
}
#learn .example-box, #learn .learn-card-content .example-box {
  background: rgba(99, 102, 241, 0.1);
  border-left-color: var(--primary);
}
#learn .formula-box, #learn .learn-card-content .formula-box {
  background: rgba(99, 102, 241, 0.06);
  border-left-color: var(--primary);
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.6;
  white-space: normal;
}
#learn .tip-box h4, #learn .warning-box h4, #learn .example-box h4 {
  font-size: 0.9rem;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
}
#learn .tip-box h4 i {
  color: var(--secondary);
}
#learn .warning-box h4 i {
  color: var(--danger-text);
}
#learn .example-box h4 i {
  color: var(--primary-light);
}
#learn .tip-box p, #learn .warning-box p, #learn .example-box p, #learn .formula-box p {
  font-size: 0.88rem;
  margin: 4px 0;
  line-height: 1.55;
}
#learn .tip-box ul, #learn .warning-box ul, #learn .example-box ul {
  margin: 6px 0 0 0;
}
#learn .formula-box strong {
  color: var(--primary);
  font-weight: 600;
}
#learn .learn-card-content table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 0.85rem;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#learn .learn-card-content th, #learn .learn-card-content td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
#learn .learn-card-content code, #learn .learn-card-content pre, #learn .learn-card-content .formula, #learn .learn-card-content .equation {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
#learn .learn-card-content th {
  background: var(--primary-dark);
  color: white;
  font-weight: 600;
}
#learn .learn-card-content tr:nth-child(even) {
  background: var(--bg-tertiary);
}
#learn .learn-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 14px 0;
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
}
#learn .learn-zoomable {
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#learn .learn-zoomable:hover, #learn .learn-zoomable:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  outline: none;
}
body.modal-open {
  overflow: hidden;
}
sokrat-modal.image-modal {
  z-index: 2000;
  padding: calc(14px + var(--safe-top)) max(14px, var(--safe-right)) calc(14px + var(--safe-bottom)) max(14px, var(--safe-left));
  background: rgba(2, 6, 23, 0.9);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: none;
}
sokrat-modal.image-modal > * {
  transform: none;
  transition: none;
  max-width: none;
  max-height: none;
  overflow: visible;
}
.image-modal-content {
  position: relative;
  z-index: 2;
  width: min(95vw, 1100px);
  max-height: calc(100dvh - (var(--safe-top) + var(--safe-bottom) + 56px));
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.image-modal-content img {
  width: 100%;
  height: auto;
  max-height: calc(100dvh - (var(--safe-top) + var(--safe-bottom) + 110px));
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #020617;
}
.image-modal-content figcaption {
  color: #e2e8f0;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.4;
}
.image-modal-close {
  position: absolute;
  top: calc(8px + var(--safe-top));
  right: max(8px, var(--safe-right));
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  color: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.image-modal-close:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}
@media screen and (min-width: 768px) {
  #learn .learn-container {
    padding: 24px;
    max-width: 850px;
    margin: 0 auto;
  }
  #learn .learn-container > h1 {
    font-size: 1.35rem;
    padding: 18px 26px;
  }
  #learn .learn-filter {
    gap: 12px;
    margin-bottom: 20px;
  }
  #learn .filter-btn {
    padding: 12px 20px;
    font-size: 0.92rem;
  }
  #learn .learn-content {
    gap: 24px;
  }
  #learn .learn-card-header {
    padding: 18px 24px;
  }
  #learn .learn-card-header h2, #learn .learn-card-header h3, #learn .learn-card-title {
    font-size: 1.1rem;
  }
  #learn .learn-card-content {
    padding: 26px;
    font-size: 1rem;
    line-height: 1.8;
  }
  #learn .learn-card-content h3 {
    font-size: 1.25rem;
    margin: 24px 0 14px 0;
  }
  #learn .learn-card-content h4 {
    font-size: 1.12rem;
  }
  #learn .learn-card-content p, #learn .learn-card-content ul li, #learn .learn-card-content ol li {
    font-size: 0.98rem;
  }
  #learn .tip-box, #learn .warning-box, #learn .example-box, #learn .formula-box {
    padding: 18px 20px;
    margin: 20px 0;
  }
  #learn .learn-image {
    max-width: 760px;
    margin: 20px auto;
    display: block;
  }
}
@media screen and (min-width: 1024px) {
  #learn .learn-container {
    padding: 28px;
    max-width: 950px;
  }
  #learn .learn-container > h1 {
    font-size: 1.45rem;
    padding: 20px 30px;
    margin-bottom: 24px;
  }
  #learn .learn-filter {
    gap: 14px;
    margin-bottom: 26px;
    justify-content: center;
  }
  #learn .filter-btn {
    padding: 14px 26px;
    font-size: 0.98rem;
  }
  #learn .learn-card-header {
    padding: 20px 28px;
  }
  #learn .learn-card-header h2, #learn .learn-card-header h3, #learn .learn-card-title {
    font-size: 1.2rem;
  }
  #learn .learn-card-content {
    padding: 34px;
    font-size: 1.02rem;
    line-height: 1.85;
  }
  #learn .learn-card-content h3 {
    font-size: 1.4rem;
  }
  #learn .learn-card-content h4 {
    font-size: 1.2rem;
  }
}
@media screen and (max-width: 380px) {
  #learn .learn-container {
    padding: 10px;
  }
  #learn .learn-container > h1 {
    font-size: 1rem;
    padding: 12px 14px;
  }
  #learn .filter-btn {
    padding: 6px 10px;
    font-size: 0.78rem;
    min-height: 44px;
  }
  #learn .learn-card-header {
    padding: 12px 14px;
  }
  #learn .learn-card-header h2, #learn .learn-card-header h3, #learn .learn-card-title {
    font-size: 0.92rem;
  }
  #learn .learn-card-content {
    padding: 14px;
    font-size: 0.88rem;
  }
  #learn .learn-card-content h3 {
    font-size: 1.02rem;
  }
  #learn .learn-card-content h4 {
    font-size: 0.94rem;
  }
  #learn .learn-card-content p, #learn .learn-card-content ul li, #learn .learn-card-content ol li {
    font-size: 0.86rem;
  }
  #learn .learn-card-header {
    align-items: flex-start;
  }
  #learn .learn-card-header h2, #learn .learn-card-header h3, #learn .learn-card-title {
    line-height: 1.35;
  }
  #learn .tip-box, #learn .warning-box, #learn .example-box, #learn .formula-box {
    padding: 10px 12px;
  }
}
@media screen and (max-width: 767px) {
  #learn .learn-filter {
    scroll-snap-type: x proximity;
  }
  #learn .filter-btn {
    scroll-snap-align: start;
  }
  #learn .learn-card-content table {
    font-size: 0.82rem;
  }
}
@media screen and (max-width: 430px) {
  #learn .learn-card-header span {
    font-size: 0.74rem;
    padding: 3px 8px;
  }
  #learn .learn-card-header h2, #learn .learn-card-header h3, #learn .learn-card-title {
    font-size: 0.94rem;
  }
  .image-modal-content {
    width: 100%;
    max-height: calc(100dvh - (var(--safe-top) + var(--safe-bottom) + 36px));
  }
  .image-modal-content figcaption {
    font-size: 0.82rem;
  }
}
@supports (-webkit-touch-callout: none) {
  #learn .learn-container {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
  #learn .learn-card-content {
    -webkit-overflow-scrolling: touch;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
}
@media (orientation: landscape) {
  #learn .learn-container {
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
  }
}
[data-theme="dark"] #learn .learn-card {
  border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] #learn .learn-card-content {
  color: rgba(255, 255, 255, 0.9);
}
[data-theme="dark"] #learn .learn-card-content p, [data-theme="dark"] #learn .learn-card-content li {
  color: rgba(255, 255, 255, 0.8);
}
[data-theme="dark"] #learn .tip-box {
  background: rgba(16, 185, 129, 0.15);
}
[data-theme="dark"] #learn .warning-box {
  background: rgba(239, 68, 68, 0.15);
}
[data-theme="dark"] #learn .example-box {
  background: rgba(99, 102, 241, 0.15);
}
[data-theme="dark"] #learn .formula-box {
  background: rgba(255, 255, 255, 0.05);
}
[data-theme="dark"] #learn .formula-box strong {
  color: #a5b4fc;
}
[data-theme="dark"] #learn .learn-card-content th {
  background: var(--primary-dark);
}
[data-theme="dark"] #learn .learn-card-content tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}
@media (prefers-reduced-motion: reduce) {
  #learn .learn-card, #learn .filter-btn {
    transition: none;
  }
}
@media (prefers-contrast: high) {
  #learn .learn-card {
    border-width: 2px;
  }
  #learn .learn-card-content p, #learn .learn-card-content li {
    color: var(--text-primary);
  }
}
.lb-heading {
  font-family: 'Space Grotesk', var(--font-family, sans-serif);
  color: var(--text-primary);
  line-height: 1.25;
  margin: 1.5em 0 0.5em;
  font-weight: 600;
}
.lb-heading:first-child {
  margin-top: 0;
}
h2.lb-heading {
  font-size: 1.6rem;
}
h3.lb-heading {
  font-size: 1.3rem;
}
h4.lb-heading {
  font-size: 1.1rem;
}
.lb-paragraph {
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 0 1em;
}
.lb-list {
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 0 1em;
  padding-left: 1.4em;
}
.lb-list li {
  margin: 0.25em 0;
}
.lb-color-indigo {
  color: #818cf8;
}
.lb-color-green {
  color: #34d399;
}
.lb-color-amber {
  color: #fbbf24;
}
.lb-color-red {
  color: var(--danger-text, #f87171);
}
.lb-color-cyan {
  color: #22d3ee;
}
.lb-color-blue {
  color: #60a5fa;
}
.lb-color-violet {
  color: #c084fc;
}
.lb-color-pink {
  color: #f472b6;
}
.lb-callout {
  border-left: 3px solid var(--primary);
  border-radius: 10px;
  padding: 0.9em 1.1em;
  margin: 1.2em 0;
  background: rgba(99, 102, 241, 0.08);
}
.lb-callout__title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35em;
}
.lb-callout__body {
  color: var(--text-secondary);
  line-height: 1.6;
}
.lb-callout--info {
  border-left-color: #06b6d4;
  background: rgba(6, 182, 212, 0.08);
}
.lb-callout--warning {
  border-left-color: var(--accent);
  background: rgba(245, 158, 11, 0.08);
}
.lb-callout--tip {
  border-left-color: var(--secondary);
  background: rgba(16, 185, 129, 0.08);
}
.lb-figure {
  margin: 1.4em 0;
  text-align: center;
}
.lb-figure__img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.lb-figure__cap {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.5em;
}
.lb-video {
  position: relative;
  margin: 1.4em 0;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 45%, #1e293b, #0f172a);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.lb-video__play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  cursor: pointer;
  color: var(--text-primary);
  background: transparent;
  transition: background 0.2s ease;
}
.lb-video__play:hover {
  background: rgba(99, 102, 241, 0.12);
}
.lb-video__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--grad, linear-gradient(135deg, #6366f1, #8b5cf6));
  color: #fff;
  font-size: 1.5rem;
  padding-left: 4px;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}
.lb-video__label {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.lb-video__frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.lb-table-wrap {
  overflow-x: auto;
  margin: 1.4em 0;
}
.lb-table {
  border-collapse: collapse;
  width: 100%;
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.lb-table th, .lb-table td {
  border: 1px solid var(--border-color, rgba(148, 163, 184, 0.25));
  padding: 0.55em 0.8em;
  text-align: left;
}
.lb-table th {
  color: var(--text-primary);
  font-weight: 600;
  background: rgba(148, 163, 184, 0.08);
}
.lb-formula {
  margin: 1.2em 0;
  text-align: center;
  overflow-x: auto;
}
.lb-formula--inline {
  display: inline;
  margin: 0;
}
.lb-imath {
  display: inline;
}
.lb-imath[data-be-math] {
  font-family: var(--font-mono, ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace);
  font-size: 0.92em;
  padding: 0.05em 0.36em;
  border-radius: 5px;
  background: var(--accent, #6366f1);
  @supports (color: color-mix(in lab, red, red)) {
    background: color-mix(in srgb, var(--accent, #6366f1) 14%, transparent);
  }
  box-shadow: inset 0 0 0 1px var(--accent, #6366f1);
  @supports (color: color-mix(in lab, red, red)) {
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent, #6366f1) 34%, transparent);
  }
  white-space: pre-wrap;
}
.lb-legacy {
  color: var(--text-secondary);
  line-height: 1.7;
}
.lb-tint {
  --lb-tint-bg: var(--lb-acc, var(--st-acc, transparent));
  @supports (color: color-mix(in lab, red, red)) {
    --lb-tint-bg: color-mix(in srgb, var(--lb-acc, var(--st-acc, transparent)) 10%, transparent);
  }
  border-left: 3px solid var(--lb-acc, var(--st-acc, transparent));
  background: var(--lb-tint-bg);
  border-radius: 0 10px 10px 0;
  padding: 2px 14px;
  margin: 10px 0;
}
.lb-tint > :first-child {
  margin-top: 0;
}
.lb-tint > :last-child {
  margin-bottom: 0;
}
@supports not (background: color-mix(in srgb, red 10%, transparent)) {
  .lb-tint {
    background: transparent;
  }
}
.be-root {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
}
.be-empty {
  border: 2px dashed rgba(148, 163, 184, .25);
  border-radius: 14px;
  padding: 22px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  background: rgba(15, 23, 42, .3);
}
.be-block {
  position: relative;
  border: 1px solid rgba(148, 163, 184, .09);
  border-radius: 12px;
  background: rgba(148, 163, 184, .022);
  padding: 6px 12px 9px 34px;
  transition: background .14s, border-color .14s;
}
.be-block:hover, .be-block:focus-within {
  background: rgba(148, 163, 184, .06);
  border-color: rgba(148, 163, 184, .2);
}
.be-grip {
  position: absolute;
  left: 4px;
  top: 7px;
  width: 22px;
  height: 26px;
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  opacity: .4;
  border-radius: 6px;
  cursor: grab;
  touch-action: none;
  transition: opacity .13s, background .13s, color .13s;
}
.be-block:hover .be-grip {
  opacity: .85;
}
.be-grip:hover {
  opacity: 1;
  color: #c7d2fe;
  background: rgba(148, 163, 184, .16);
}
.be-grip:active {
  cursor: grabbing;
}
@keyframes bePop {
  from {
    opacity: 0;
    transform: translateY(4px) scale(.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.be-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.be-n {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 6px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(148, 163, 184, .1);
  border: 1px solid rgba(148, 163, 184, .16);
  transition: color .14s;
}
.be-block:hover .be-n, .be-block:focus-within .be-n {
  color: #c7d2fe;
}
.be-ctrls {
  display: flex;
  gap: 3px;
  margin-left: auto;
  opacity: 0;
  transition: .15s;
}
.be-block:hover .be-ctrls, .be-block:focus-within .be-ctrls {
  opacity: 1;
}
.be-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(15, 23, 42, .5);
  border: 1px solid rgba(148, 163, 184, .2);
  cursor: pointer;
  transition: .13s;
}
.be-btn:hover:not([disabled]) {
  color: #fff;
  border-color: var(--primary-light);
  background: rgba(99, 102, 241, .18);
}
.be-btn[disabled] {
  opacity: .3;
  cursor: default;
}
.be-del:hover:not([disabled]) {
  color: #fff;
  border-color: var(--danger);
  background: var(--danger);
}
.be-block.be-dragging {
  opacity: .4;
  border-style: dashed;
  border-color: rgba(129, 140, 248, .5);
}
.be-dropline {
  position: fixed;
  height: 3px;
  border-radius: 3px;
  pointer-events: none;
  z-index: 1450;
  background: var(--primary-light, #818cf8);
  box-shadow: 0 0 8px 1px rgba(129, 140, 248, .6);
}
.be-ghost {
  position: fixed;
  z-index: 1500;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 260px;
  padding: 6px 12px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: #e5e7eb;
  background: rgba(30, 41, 59, .97);
  border: 1px solid rgba(129, 140, 248, .55);
  box-shadow: 0 10px 26px -6px rgba(0, 0, 0, .65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.be-ghost i {
  opacity: .65;
}
.be-ghost b {
  color: #c7d2fe;
}
.be-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.be-body > *:first-child {
  margin-top: 0;
}
.be-body > *:last-child {
  margin-bottom: 0;
}
.be-adder {
  position: relative;
  height: 26px;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity .16s;
}
.be-adder:hover, .be-root:hover .be-adder, .be-adder:focus-within {
  opacity: .5;
}
.be-adder:hover, .be-adder:focus-within {
  opacity: 1;
}
.be-adder::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, .4) 18%, rgba(139, 92, 246, .4) 82%, transparent);
}
.be-add {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  z-index: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 16px;
  line-height: 1;
  color: #c7d2fe;
  background: rgba(20, 27, 45, .96);
  border: 1.5px solid rgba(99, 102, 241, .55);
  box-shadow: 0 3px 12px rgba(99, 102, 241, .22);
  transition: .14s;
}
.be-add:hover {
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: transparent;
  transform: scale(1.1);
}
.be-bigplus {
  width: 100%;
  margin-top: 10px;
  padding: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px dashed rgba(99, 102, 241, .34);
  border-radius: 14px;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  background: rgba(99, 102, 241, .05);
  transition: .16s;
}
.be-bigplus:hover {
  border-color: var(--primary);
  color: #c7d2fe;
  background: rgba(99, 102, 241, .12);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .09);
}
.be-menu {
  position: fixed;
  z-index: 1400;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-width: 150px;
  padding: 5px;
  background: rgba(20, 27, 45, .98);
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5);
  animation: bePop .16s ease;
}
.be-menu-item {
  text-align: left;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  transition: .12s;
}
.be-menu-item:hover {
  background: rgba(99, 102, 241, .16);
  color: #fff;
}
.be-mount {
  margin-top: 8px;
}
.be-edit {
  outline: none;
  border-radius: 8px;
  padding: 4px 8px;
  margin: 0 -8px;
  transition: background .13s, box-shadow .13s;
  min-height: 1.4em;
  cursor: text;
}
.be-edit:hover {
  background: rgba(148, 163, 184, .06);
}
.be-edit:focus {
  background: rgba(99, 102, 241, .08);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, .45);
}
.be-edit:empty::before {
  content: attr(data-be-ph);
  color: var(--text-muted);
  opacity: .6;
  pointer-events: none;
}
.be-edit--h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}
.be-edit--h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}
.be-edit--h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.be-editlist {
  margin: 0;
  padding-left: 22px;
}
.be-editlist .be-edit {
  display: list-item;
  margin: 2px -8px;
}
.be-edit a[data-be-link] {
  color: var(--primary-light);
  text-decoration: underline;
  cursor: text;
}
.be-toolbar {
  position: fixed;
  display: none;
  gap: 3px;
  z-index: 1400;
  padding: 4px;
  border-radius: 10px;
  background: rgba(20, 27, 45, .97);
  border: 1px solid rgba(148, 163, 184, .25);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .55);
  backdrop-filter: blur(8px);
  animation: bePop .13s ease;
}
.be-toolbar.on {
  display: flex;
}
.be-tb {
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 7px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  transition: .12s;
}
.be-tb:hover {
  background: rgba(99, 102, 241, .18);
  color: #fff;
}
.be-tbsep {
  width: 1px;
  align-self: stretch;
  margin: 3px 2px;
  background: rgba(148, 163, 184, .25);
}
.be-tbmath {
  font-size: 13px;
  letter-spacing: .5px;
}
.be-tbmath i {
  font-family: var(--font-serif, Georgia, "Times New Roman", serif);
  font-style: italic;
}
.be-tbc {
  min-width: 24px;
  padding: 0 5px;
}
.be-tbc::after {
  content: '';
  width: 15px;
  height: 15px;
  border-radius: 5px;
  background: var(--sw, #64748b);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
}
.be-tbc:hover::after {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45), 0 0 0 2px rgba(99, 102, 241, .4);
}
.be-media {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.be-media__preview {
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}
.be-media__preview img {
  max-width: 100%;
  display: block;
  border-radius: 10px;
}
.be-media--image .be-media__preview .lb-figure__img {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  margin: 0 auto;
}
.be-media--image .be-media__preview .lb-figure {
  margin: 0;
}
.be-imgresize {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: nwse-resize;
  touch-action: none;
  color: #fff;
  font-size: 15px;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(15, 23, 42, .75);
  backdrop-filter: blur(3px);
  transition: .13s;
}
.be-imgresize:hover {
  background: rgba(99, 102, 241, .85);
}
.be-imgw {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 2;
  pointer-events: none;
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 700;
  color: #e2e8f0;
  background: rgba(15, 23, 42, .75);
}
.be-cvars {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.be-cvar {
  padding: 6px 11px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(15, 23, 42, .4);
  border: 1px solid rgba(148, 163, 184, .2);
  transition: .12s;
}
.be-cvar:hover {
  color: #fff;
  border-color: rgba(99, 102, 241, .5);
}
.be-cvar.on {
  color: #fff;
  background: rgba(99, 102, 241, .25);
  border-color: var(--primary);
}
.be-cvtitle {
  flex: 1;
  min-width: 160px;
  width: auto;
}
.be-media__ph {
  border: 2px dashed rgba(148, 163, 184, .25);
  border-radius: 10px;
  padding: 22px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  background: rgba(15, 23, 42, .3);
}
.be-media__fields {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.be-mfield {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-primary);
  background: rgba(15, 23, 42, .5);
  border: 1px solid rgba(148, 163, 184, .2);
  outline: none;
  transition: .13s;
}
.be-mfield:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, .2);
}
.be-mfield::placeholder {
  color: var(--text-muted);
}
.be-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 12px;
  margin-bottom: 2px;
  border: 2px dashed rgba(148, 163, 184, .28);
  border-radius: 10px;
  background: rgba(15, 23, 42, .3);
  transition: .13s;
}
.be-upload--over {
  border-color: var(--primary-light, #818cf8);
  background: rgba(99, 102, 241, .14);
}
.be-upload__file {
  display: none;
}
.be-upload__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, var(--primary, #6366f1), var(--primary-light, #818cf8));
  transition: .13s;
}
.be-upload__btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.be-upload__hint {
  font-size: 12px;
  color: var(--text-muted);
}
.be-upload__status {
  font-size: 12.5px;
  font-weight: 600;
  margin-left: auto;
  min-height: 1em;
}
.be-upload__status.is-busy {
  color: var(--text-muted);
}
.be-upload__status.is-ok {
  color: #34d399;
}
.be-upload__status.is-err {
  color: #f87171;
}
.be-media--formula .be-media__preview {
  padding: 10px 4px;
  text-align: center;
  min-height: 2.2em;
}
.be-mcheck {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 2px 1px;
  user-select: none;
}
.be-mcheck input {
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}
.be-mathfield {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 19px;
  color: var(--text-primary);
  background: rgba(15, 23, 42, .5);
  border: 1px solid rgba(148, 163, 184, .2);
  outline: none;
  transition: .13s;
  --caret-color: var(--primary-light);
  --selection-background-color: rgba(99, 102, 241, .35);
}
.be-mathfield:focus-within {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, .2);
}
.be-mathfield::part(virtual-keyboard-toggle), .be-mathfield::part(menu-toggle) {
  display: none;
}
.be-mathpad {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  align-items: flex-start;
}
.be-mathpad__group {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 6px;
  border-radius: 10px;
  background: rgba(15, 23, 42, .4);
  border: 1px solid rgba(148, 163, 184, .14);
}
.be-mathpad__group[data-be-padgroup="Brojevi"] {
  display: grid;
  grid-template-columns: repeat(3, 40px);
  gap: 5px;
}
.be-mathkey {
  min-width: 42px;
  height: 44px;
  padding: 0 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, .12);
  border: 1px solid rgba(99, 102, 241, .3);
  transition: .12s;
}
.be-mathpad__group[data-be-padgroup="Brojevi"] {
  grid-template-columns: repeat(3, 44px);
}
.be-mathpad__group[data-be-padgroup="Brojevi"] .be-mathkey {
  min-width: 0;
  width: 100%;
}
.be-mathkey:hover {
  background: rgba(99, 102, 241, .26);
  border-color: var(--primary-light);
}
.be-mathkey:active {
  transform: translateY(1px);
}
.be-mathkey .katex {
  font-size: 1.02em;
  color: inherit;
}
.be-mathkey .katex .frac-line {
  border-color: currentColor;
}
.be-tgrid-wrap {
  overflow-x: auto;
}
.be-tgrid {
  border-collapse: separate;
  border-spacing: 4px;
}
.be-tgrid td {
  padding: 0;
}
.be-tcell {
  min-width: 90px;
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--text-primary);
  background: rgba(15, 23, 42, .5);
  border: 1px solid rgba(148, 163, 184, .2);
  outline: none;
  transition: .13s;
}
.be-tcell:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, .2);
}
.be-tcell::placeholder {
  color: var(--text-muted);
  opacity: .5;
}
.be-tcell--h {
  font-weight: 700;
  background: rgba(99, 102, 241, .12);
  border-color: rgba(99, 102, 241, .3);
}
.be-tgrid-rc {
  width: 30px;
  text-align: center;
  vertical-align: middle;
}
.be-tgrid-crow .be-btn, .be-tgrid-rc .be-btn {
  opacity: 0;
  transition: opacity .12s;
}
.be-tgrid tr:hover .be-tgrid-rc .be-btn {
  opacity: 1;
}
.be-tgrid:hover .be-tgrid-crow .be-btn, .be-tgrid:focus-within .be-btn {
  opacity: 1;
}
.be-tgrid-add {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.be-tbtn {
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(99, 102, 241, .06);
  border: 1px dashed rgba(99, 102, 241, .32);
  transition: .14s;
}
.be-tbtn:hover {
  border-color: var(--primary);
  color: #c7d2fe;
  background: rgba(99, 102, 241, .12);
}
.be-cdots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  opacity: 0;
  transition: opacity .12s;
}
.be-block:hover .be-cdots, .be-block:focus-within .be-cdots {
  opacity: 1;
}
.be-cdot {
  width: 15px;
  height: 15px;
  padding: 0;
  border-radius: 5px;
  cursor: pointer;
  background: var(--dot, #64748b);
  border: 1px solid rgba(255, 255, 255, .22);
  transition: .12s;
  font-size: 10px;
  line-height: 1;
  color: var(--text-muted);
}
.be-cdot:hover {
  transform: scale(1.15);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, .4);
}
.be-cdot.on {
  box-shadow: 0 0 0 2px #fff inset, 0 0 0 2px var(--dot, #64748b);
}
.be-cdot--none {
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.be-cdot--none.on {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .35);
}
#editor-page {
  --st-violet: #8b5cf6;
  --st-glass: rgba(30,41,59,.72);
  --st-line: rgba(148,163,184,.14);
  --st-grad: linear-gradient(135deg,var(--primary),var(--st-violet));
  --st-glow: 0 0 22px rgba(99,102,241,.35);
  --st-radius-lg: 20px;
}
#editor-page.studio-page {
  display: none;
}
#editor-page.studio-page.active {
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
}
#editor-page .st-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--st-glass);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--st-line);
  flex-shrink: 0;
  box-shadow: 0 4px 24px rgba(0,0,0,.25);
  z-index: 10;
}
#editor-page .st-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 15px;
}
#editor-page .st-logo .st-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--st-grad);
  display: grid;
  place-items: center;
  font-size: 15px;
  box-shadow: var(--st-glow);
}
#editor-page .st-logo .st-ed {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  background: rgba(99,102,241,.16);
  color: var(--primary-light);
  border: 1px solid rgba(99,102,241,.35);
  border-radius: 99px;
  padding: 3px 8px;
}
#editor-page .st-crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
#editor-page .st-crumb .st-c {
  background: rgba(51,65,85,.5);
  border: 1px solid var(--st-line);
  border-radius: 8px;
  padding: 4px 9px;
}
#editor-page .st-crumb .st-sep {
  opacity: .5;
}
#editor-page .st-crumb .st-c.now {
  color: var(--text-primary);
  font-weight: 600;
  background: rgba(99,102,241,.14);
  border-color: rgba(99,102,241,.35);
}
#editor-page .st-spacer {
  flex: 1;
}
#editor-page .st-chip {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 99px;
  font-weight: 600;
  background: rgba(148,163,184,.12);
  color: var(--text-muted);
  border: 1px solid var(--st-line);
}
#editor-page .st-chip.dirty {
  background: rgba(245,158,11,.12);
  color: #fbbf24;
  border-color: rgba(245,158,11,.35);
}
#editor-page .st-btn {
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 13.5px;
  transition: .18s;
  border: none;
  cursor: pointer;
  color: inherit;
  background: none;
  font-family: inherit;
}
#editor-page .st-btn.primary {
  background: var(--st-grad);
  color: #fff;
  box-shadow: 0 4px 18px rgba(99,102,241,.4);
}
#editor-page .st-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 26px rgba(99,102,241,.55);
}
#editor-page .st-btn.ghost {
  border: 1px solid var(--st-line);
  color: var(--text-secondary);
  background: rgba(51,65,85,.25);
}
#editor-page .st-btn.ghost:hover {
  border-color: var(--primary-light);
  color: var(--text-primary);
}
#editor-page .st-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
#editor-page .st-iconbtn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid var(--st-line);
  background: rgba(51,65,85,.25);
  color: var(--text-secondary);
  cursor: pointer;
  transition: .15s;
  font-size: 15px;
}
#editor-page .st-iconbtn:hover {
  border-color: var(--primary-light);
  color: var(--text-primary);
}
#editor-page .st-layout {
  display: grid;
  grid-template-columns: 262px 1fr 250px;
  flex: 1;
  min-height: 0;
}
@media (max-width:1020px) {
  #editor-page .st-layout {
    grid-template-columns: 220px 1fr;
  }
  #editor-page .st-inspector {
    display: none;
  }
}
@media (max-width:680px) {
  #editor-page .st-layout {
    grid-template-columns: 1fr;
  }
  #editor-page .st-tree {
    display: none;
  }
}
#editor-page .st-tree {
  background: linear-gradient(180deg,rgba(30,41,59,.55),rgba(15,23,42,.3));
  border-right: 1px solid var(--st-line);
  overflow-y: auto;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
}
#editor-page .st-newscript {
  margin: 0 2px 16px;
  padding: 11px;
  border-radius: 14px;
  background: var(--st-grad);
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
  box-shadow: 0 6px 22px rgba(99,102,241,.4);
  transition: .18s;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
#editor-page .st-newscript:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(99,102,241,.55);
}
#editor-page .st-tree h3 {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--text-muted);
  padding: 0 8px 10px;
  margin: 0;
  display: flex;
  gap: 6px;
  align-items: center;
  font-weight: 700;
}
#editor-page .st-node .st-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: .15s;
  position: relative;
}
#editor-page .st-node .st-row:hover {
  background: rgba(51,65,85,.45);
}
#editor-page .st-node .st-row.active {
  background: linear-gradient(90deg,rgba(99,102,241,.22),rgba(139,92,246,.10));
  color: #c7d2fe;
  font-weight: 600;
}
#editor-page .st-node .st-row.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 99px;
  background: var(--st-grad);
}
#editor-page .st-node .st-row.soon {
  opacity: .5;
  cursor: not-allowed;
}
#editor-page .st-node .st-kids {
  margin-left: 14px;
  border-left: 1px solid var(--st-line);
  padding-left: 7px;
  display: none;
}
#editor-page .st-node.open>.st-kids {
  display: block;
}
#editor-page .st-node .st-tw {
  width: 12px;
  font-size: 9px;
  color: var(--text-muted);
  transition: .18s;
  flex-shrink: 0;
}
#editor-page .st-node.open>.st-row .st-tw {
  transform: rotate(90deg);
}
#editor-page .st-node .st-lbl {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#editor-page .st-canvas {
  overflow-y: auto;
  min-width: 0;
  background: radial-gradient(900px 300px at 50% -80px,rgba(99,102,241,.10),transparent), radial-gradient(rgba(148,163,184,.055) 1px,transparent 1px);
  background-size: auto,24px 24px;
}
#editor-page .st-empty {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
  padding: 40px;
}
#editor-page .st-empty .st-emoji {
  font-size: 40px;
  margin-bottom: 14px;
  opacity: .7;
}
#editor-page .st-head {
  padding: 24px 30px 0;
}
#editor-page .st-head h1 {
  font-size: 24px;
  letter-spacing: -.01em;
  margin: 0;
}
#editor-page .st-metas {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
#editor-page .st-metas .st-m {
  font-size: 11.5px;
  color: var(--text-muted);
  background: rgba(30,41,59,.7);
  border: 1px solid var(--st-line);
  border-radius: 99px;
  padding: 4px 11px;
  display: flex;
  gap: 5px;
  align-items: center;
}
#editor-page .st-tabs {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 18px 30px 0;
  padding: 6px;
  background: rgba(30,41,59,.65);
  border: 1px solid var(--st-line);
  border-radius: 16px;
  width: max-content;
  max-width: calc(100% - 60px);
  flex-wrap: wrap;
}
#editor-page .st-tab {
  padding: 8px 16px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: .18s;
  border: none;
  cursor: pointer;
  background: none;
  font-family: inherit;
}
#editor-page .st-tab:hover {
  color: var(--text-primary);
}
#editor-page .st-tab.on {
  background: var(--st-grad);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99,102,241,.45);
}
#editor-page .st-pane {
  display: none;
  padding: 22px 30px 90px;
  max-width: 820px;
}
#editor-page .st-pane.on {
  display: block;
}
#editor-page .st-pane .st-hint {
  color: var(--text-muted);
  font-size: 12.5px;
  margin: 0 0 16px;
}
#editor-page .st-kv {
  background: linear-gradient(180deg,rgba(30,41,59,.92),rgba(30,41,59,.55));
  border: 1px solid var(--st-line);
  border-radius: 18px;
  padding: 18px 20px 18px 24px;
  margin-bottom: 12px;
  position: relative;
  box-shadow: var(--shadow);
}
#editor-page .st-kv::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  border-radius: 18px 0 0 18px;
  background: var(--st-acc,var(--bg-tertiary));
}
#editor-page .st-kv .st-kvhead {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 9px;
}
#editor-page .st-kv .st-n, #editor-page .st-learn-cat .st-n {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 12px;
  flex-shrink: 0;
  background: linear-gradient(135deg,rgba(99,102,241,.25),rgba(139,92,246,.12));
  color: #c7d2fe;
  font-weight: 800;
  border: 1px solid rgba(99,102,241,.3);
}
#editor-page .st-kv h2 {
  font-size: 16.5px;
  margin: 0;
}
#editor-page .st-kv .st-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}
#editor-page .st-kv .st-body :is(h1,h2,h3,h4) {
  color: var(--text-primary);
  margin: .6em 0 .3em;
}
#editor-page .st-kv .st-body p {
  margin: .5em 0;
}
#editor-page .st-kv .st-body ul,#editor-page .st-kv .st-body ol {
  margin: .4em 0 .4em 1.2em;
}
#editor-page .st-editing {
  color: #fbbf24 !important;
  background: rgba(245,158,11,.12) !important;
  border-color: rgba(245,158,11,.35) !important;
}
#editor-page .st-learn-cat {
  position: relative;
  margin-bottom: 16px;
  background: linear-gradient(180deg,rgba(30,41,59,.92),rgba(30,41,59,.55));
  border: 1px solid var(--st-line);
  border-radius: 18px;
  padding: 18px 20px 18px 24px;
  box-shadow: var(--shadow);
}
#editor-page .st-learn-cat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  border-radius: 18px 0 0 18px;
  background: var(--st-acc,var(--bg-tertiary));
  box-shadow: 2px 0 14px -2px var(--st-acc,transparent);
}
#editor-page .st-learn-cathead {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
#editor-page .st-learn-cat .st-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}
#editor-page .st-learn-cat .st-body :is(h1,h2,h3,h4) {
  color: var(--text-primary);
  margin: .6em 0 .3em;
}
#editor-page .st-learn-cat .st-body p {
  margin: .5em 0;
}
#editor-page .st-learn-cat .st-body ul,#editor-page .st-learn-cat .st-body ol {
  margin: .4em 0 .4em 1.2em;
}
#editor-page .st-cat-name {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  cursor: text;
  border-radius: 7px;
  padding: 2px 8px;
  margin: 0 -4px;
  min-width: 40px;
  outline: 1px solid transparent;
  transition: background .12s, outline-color .12s;
}
#editor-page .st-cat-name:hover {
  background: rgba(148,163,184,.12);
}
#editor-page .st-cat-name:focus {
  background: rgba(148,163,184,.16);
  outline-color: var(--st-acc,var(--primary));
}
#editor-page .st-cat-name:empty::before {
  content: 'naziv sekcije';
  color: var(--text-muted);
  font-weight: 400;
  opacity: .5;
}
#editor-page .st-catdrag {
  flex-shrink: 0;
  width: 24px;
  height: 26px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1;
  cursor: grab;
  touch-action: none;
  border-radius: 7px;
  opacity: .55;
  transition: .13s;
}
#editor-page .st-catdrag:hover {
  opacity: 1;
  color: #c7d2fe;
  background: rgba(148,163,184,.12);
}
#editor-page .st-catdrag:active {
  cursor: grabbing;
}
#editor-page .st-learn-cat.st-dragging {
  opacity: .5;
  outline: 1px dashed rgba(129,140,248,.5);
}
#editor-page .st-catdel {
  flex-shrink: 0;
  margin-left: auto;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  border-radius: 7px;
  opacity: .45;
  transition: .13s;
}
#editor-page .st-catdel:hover {
  opacity: 1;
  color: var(--danger-text,#f87171);
  background: rgba(248,113,113,.12);
}
#editor-page .st-catdel:focus-visible {
  opacity: 1;
  outline: 2px solid rgba(248,113,113,.6);
  outline-offset: 1px;
}
#editor-page .st-cdots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}
#editor-page .st-cdot {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 6px;
  cursor: pointer;
  background: var(--dot,#64748b);
  border: 1px solid rgba(255,255,255,.22);
  transition: .12s;
}
#editor-page .st-cdot:hover {
  transform: scale(1.15);
  box-shadow: 0 0 0 2px rgba(99,102,241,.4);
}
#editor-page .st-cdot.on {
  box-shadow: 0 0 0 2px #fff inset, 0 0 0 2px var(--dot,#64748b);
}
#editor-page .st-cdot--custom {
  background: conic-gradient(#ef4444,#f59e0b,#10b981,#06b6d4,#6366f1,#a855f7,#ef4444);
}
#editor-page .st-cdot--custom::-webkit-color-swatch-wrapper {
  padding: 0;
  opacity: 0;
}
#editor-page .st-cdot--custom::-webkit-color-swatch {
  border: none;
  opacity: 0;
}
#editor-page .st-legacy-note {
  font-size: 12px;
  color: var(--text-muted);
  margin: 12px 0 8px;
}
#editor-page .st-migrate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 11px;
  border: 1.5px dashed rgba(99,102,241,.5);
  background: rgba(99,102,241,.06);
  color: var(--primary-light);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: .15s;
  font-family: inherit;
}
#editor-page .st-migrate:hover {
  border-color: var(--primary);
  background: rgba(99,102,241,.12);
  box-shadow: var(--st-glow);
}
#editor-page .st-cardgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(230px,1fr));
  gap: 14px;
}
#editor-page .st-fcard {
  border-radius: 16px;
  min-height: 120px;
  background: linear-gradient(180deg,rgba(30,41,59,.95),rgba(30,41,59,.6));
  border: 1px solid var(--st-line);
  border-top: 3px solid var(--st-acc,var(--bg-tertiary));
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
#editor-page .st-fcard .st-q {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
}
#editor-page .st-fcard .st-a {
  color: #6ee7b7;
  font-size: 13.5px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(148,163,184,.25);
}
#editor-page .st-seclbl {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
}
#editor-page .st-qz {
  background: linear-gradient(180deg,rgba(30,41,59,.92),rgba(30,41,59,.55));
  border: 1px solid var(--st-line);
  border-left: 5px solid var(--st-acc,var(--bg-tertiary));
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
#editor-page .st-qz .st-qtext {
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 14.5px;
}
#editor-page .st-qz .st-opt {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--text-secondary);
  border: 1px solid transparent;
  margin-bottom: 4px;
}
#editor-page .st-qz .st-opt.correct {
  background: rgba(34,197,94,.10);
  border-color: rgba(34,197,94,.35);
}
#editor-page .st-qz .st-ok {
  font-size: 9.5px;
  background: rgba(34,197,94,.18);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,.4);
  font-weight: 800;
  border-radius: 99px;
  padding: 2px 8px;
  letter-spacing: .06em;
  margin-left: auto;
}
#editor-page .st-fill {
  background: linear-gradient(180deg,rgba(30,41,59,.92),rgba(30,41,59,.55));
  border: 1px solid var(--st-line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
#editor-page .st-fill .st-fsent {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}
#editor-page .st-fill .st-fans {
  font-size: 12.5px;
  color: var(--primary-light);
  margin-top: 6px;
}
#editor-page .st-edit-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(180deg,rgba(30,41,59,.92),rgba(30,41,59,.55));
  border: 1px solid var(--st-line);
  border-left: 4px solid var(--st-acc,var(--bg-tertiary));
  border-radius: 14px;
  padding: 13px 15px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
#editor-page .st-edit-item .st-edit-body {
  flex: 1;
  min-width: 0;
}
#editor-page .st-idots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .12s;
}
#editor-page .st-edit-item:hover .st-idots, #editor-page .st-edit-item:focus-within .st-idots {
  opacity: 1;
}
#editor-page .st-edit-item .st-q,#editor-page .st-edit-item .st-qtext {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
}
#editor-page .st-edit-item .st-a {
  color: #6ee7b7;
  font-size: 13px;
  margin-top: 6px;
}
#editor-page .st-edit-item .st-opt {
  font-size: 13px;
  padding: 6px 9px;
  margin-top: 4px;
  border-radius: 8px;
  color: var(--text-secondary);
}
#editor-page .st-edit-item .st-opt.correct {
  background: rgba(34,197,94,.10);
}
#editor-page .st-edit-item .st-fsent {
  font-size: 14px;
  color: var(--text-secondary);
}
#editor-page .st-edit-item .st-fans {
  font-size: 12.5px;
  color: var(--primary-light);
  margin-top: 5px;
}
#editor-page .st-edit-item .admin-card-ctrls {
  flex-shrink: 0;
  display: flex;
  gap: 4px;
  align-items: flex-start;
}
#editor-page .st-addwrap {
  margin: 4px 0 22px;
}
#editor-page :is(.st-learn-cat,.st-kv,.st-fcard,.st-qz,.st-fill,.st-edit-item) {
  --st-wash: var(--st-acc, transparent);
  @supports (color: color-mix(in lab, red, red)) {
    --st-wash: color-mix(in srgb, var(--st-acc, transparent) 12%, transparent);
  }
  background: linear-gradient(var(--st-wash), var(--st-wash)), linear-gradient(180deg, rgba(30,41,59,.92), rgba(30,41,59,.55));
}
#editor-page .st-inspector {
  background: linear-gradient(180deg,rgba(30,41,59,.55),rgba(15,23,42,.3));
  border-left: 1px solid var(--st-line);
  padding: 16px 14px;
  overflow-y: auto;
}
#editor-page .st-icard {
  background: rgba(30,41,59,.7);
  border: 1px solid var(--st-line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}
#editor-page .st-icard h3 {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-muted);
  margin: 0 0 10px;
  display: flex;
  gap: 6px;
  align-items: center;
}
#editor-page .st-icard p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}
#editor-page .st-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
#editor-page .st-sw {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 2px solid transparent;
}
#editor-page .st-premium {
  background: linear-gradient(120deg,rgba(99,102,241,.16),rgba(245,158,11,.12),rgba(99,102,241,.16));
  border: 1px solid rgba(129,140,248,.4);
  border-radius: 16px;
  padding: 14px;
}
#editor-page .st-premium h4 {
  font-size: 13px;
  margin: 0 0 7px;
}
#editor-page .st-premium p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 12px;
}
#editor-page .st-pill {
  font-size: 9.5px;
  background: linear-gradient(135deg,#f59e0b,#fbbf24);
  color: #1a1206;
  font-weight: 800;
  border-radius: 99px;
  padding: 2.5px 9px;
  margin-left: 6px;
  letter-spacing: .05em;
}
@keyframes stpop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes stshimmer {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
#editor-page ::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
#editor-page ::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 99px;
  border: 2px solid var(--bg-primary);
}
#editor-page ::-webkit-scrollbar-track {
  background: transparent;
}
#editor-page .st-tabs {
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 15;
}
#editor-page .st-tab {
  display: flex;
  align-items: center;
}
#editor-page .st-kv {
  transition: border-color .2s,box-shadow .2s,transform .2s;
  animation: stpop .22s ease;
}
#editor-page .st-kv:hover {
  border-color: rgba(148,163,184,.28);
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(0,0,0,.38);
}
#editor-page .st-kv::before {
  box-shadow: 2px 0 14px -2px var(--st-acc,transparent);
  transition: box-shadow .2s,background .2s;
}
#editor-page .st-cardgrid {
  perspective: 1000px;
}
#editor-page .st-fcard {
  transition: border-color .2s,box-shadow .2s,transform .2s;
  animation: stpop .22s ease;
}
#editor-page .st-fcard:hover {
  transform: translateY(-3px) rotateX(2deg);
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
}
#editor-page .st-qz,#editor-page .st-fill {
  transition: border-color .2s,box-shadow .2s,transform .2s;
  animation: stpop .22s ease;
}
#editor-page .st-qz:hover,#editor-page .st-fill:hover {
  border-color: rgba(148,163,184,.26);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(0,0,0,.34);
}
#editor-page .st-edit-item {
  transition: border-color .2s,box-shadow .2s,transform .2s;
}
#editor-page .st-edit-item:hover {
  border-color: rgba(148,163,184,.26);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(0,0,0,.3);
}
#editor-page .st-metas .st-m {
  transition: .15s;
}
#editor-page .st-metas .st-m:hover {
  border-color: rgba(99,102,241,.35);
  color: var(--text-secondary);
}
#editor-page .st-premium {
  background-size: 220% 220%;
  animation: stshimmer 6s ease infinite;
}
#editor-page .st-nodecard {
  margin-top: 10px;
  padding: 16px 14px;
  border-radius: 14px;
  text-align: center;
  background: linear-gradient(180deg, rgba(99,102,241,.14), rgba(99,102,241,.04));
  border: 1px solid rgba(99,102,241,.28);
}
#editor-page .st-nodeicon {
  font-size: 26px;
  line-height: 1;
  margin-bottom: 8px;
}
#editor-page .st-nodename {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}
#editor-page .st-nodecard .st-hint {
  margin-top: 6px;
  font-size: 12px;
}
.nav-auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.nav-auth-btn:hover {
  color: var(--text-primary);
  border-color: rgba(99, 102, 241, 0.55);
  background: rgba(99, 102, 241, 0.12);
}
.nav-auth-btn.is-signed-in {
  color: var(--primary-light);
  border-color: rgba(99, 102, 241, 0.45);
}
sokrat-modal.auth-modal {
  background: rgba(2, 6, 23, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
sokrat-modal.auth-modal > * {
  max-width: 420px;
}
.auth-modal__card {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 1.75rem 1.6rem 1.6rem;
  background: var(--bg-card, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.auth-modal__close {
  position: absolute;
  top: 0.6rem;
  right: 0.85rem;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
}
.auth-modal__close:hover {
  color: var(--text-primary);
}
.auth-modal__title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
  color: var(--text-primary);
}
.auth-modal__title i {
  color: var(--primary-light);
}
.auth-modal__text {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-secondary);
}
.auth-modal__tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}
.auth-modal__tab {
  flex: 1;
  padding: 0.5rem 0.6rem;
  background: none;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.auth-modal__tab:hover {
  color: var(--text-primary);
}
.auth-modal__tab.is-active {
  background: rgba(99, 102, 241, 0.18);
  color: var(--primary-light);
}
.auth-modal__form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.auth-modal__form[hidden] {
  display: none;
}
.auth-modal__text--tight {
  margin-bottom: 0.1rem;
}
.auth-modal__link {
  align-self: center;
  padding: 0.15rem 0.25rem;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color 0.2s ease;
}
.auth-modal__link:hover {
  color: var(--primary-light);
}
.auth-modal__input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease;
}
.auth-modal__input:focus {
  border-color: rgba(99, 102, 241, 0.65);
}
.auth-pass-wrap {
  position: relative;
}
.auth-pass-wrap .auth-modal__input {
  padding-right: 2.8rem;
}
.auth-pass-toggle {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.2s ease;
}
.auth-pass-toggle:hover {
  color: var(--text-primary);
}
.auth-modal__submit {
  justify-content: center;
}
.auth-modal__status {
  margin: 0.85rem 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #4ade80;
}
.auth-modal__status.is-error {
  color: #f87171;
}
.auth-modal__sync {
  font-size: 0.82rem;
  opacity: 0.85;
}
.auth-modal__terms {
  margin: 0.9rem 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-secondary);
  opacity: 0.85;
}
.auth-modal__terms a {
  color: var(--primary-light);
}
@media (max-width: 640px) {
  .nav-auth-btn {
    padding: 0.5rem 0.65rem;
  }
  .nav-auth-btn span {
    display: none;
  }
  .auth-modal__card {
    padding: 1.4rem 1.15rem 1.25rem;
  }
}
.profile-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-primary);
}
.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  padding-top: calc(1rem + var(--safe-top));
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}
.profile-header h1 {
  font-size: 1.25rem;
}
.profile-content {
  width: 100%;
  padding: 1.5rem;
  max-width: 860px;
  margin: 0 auto;
}
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.profile-card {
  background: var(--bg-card, var(--bg-secondary));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.4rem 1.3rem;
  min-width: 0;
}
.profile-card--wide {
  grid-column: 1 / -1;
}
.profile-card--center {
  text-align: center;
  max-width: 420px;
  margin: 2rem auto 0;
}
.profile-card--center h2 {
  margin: 0.75rem 0 0.5rem;
}
.profile-card--center p {
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
}
.profile-card--center .cta-button {
  justify-content: center;
}
.profile-empty-icon {
  font-size: 2rem;
  color: var(--primary-light);
}
.profile-avatar {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}
.profile-email {
  font-size: 1.05rem;
  margin: 0 0 0.25rem;
  overflow-wrap: anywhere;
}
.profile-meta {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0 0 0.9rem;
}
.profile-meta a {
  color: var(--primary-light);
}
.profile-meta--sub {
  margin-bottom: 0.25rem;
}
.profile-pass-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}
.profile-pass-form[hidden] {
  display: none;
}
.profile-pass-form .cta-button {
  align-self: flex-start;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  min-height: 0;
}
.profile-pass-status {
  margin: 0;
  font-size: 0.85rem;
  color: #4ade80;
}
.profile-pass-status.is-error {
  color: #f87171;
}
.profile-card-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1rem;
  margin: 0 0 0.7rem;
}
.profile-card-title i {
  color: var(--primary-light);
}
.profile-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.profile-actions .cta-button {
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  min-height: 0;
}
.profile-stat-totals {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.profile-total {
  flex: 1;
  min-width: 120px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  text-align: center;
}
.profile-total strong {
  display: block;
  font-size: 1.35rem;
  color: var(--primary-light);
}
.profile-total span {
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.profile-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.2rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.profile-stat-row:last-child {
  border-bottom: none;
}
.profile-stat-subject {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.92rem;
  min-width: 0;
}
.profile-stat-subject i {
  color: var(--primary-light);
}
.profile-stat-vals {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.profile-stat-vals i {
  margin-right: 0.25rem;
}
.profile-card--danger {
  border-color: rgba(248, 113, 113, 0.35);
}
.profile-card--danger .profile-card-title i {
  color: #f87171;
}
.profile-danger-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.45);
  border-radius: 10px;
  color: #f87171;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}
.profile-danger-btn:hover {
  background: rgba(248, 113, 113, 0.2);
}
.profile-danger-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.profile-danger-sep {
  margin: 1rem 0 0.9rem;
  border: 0;
  border-top: 1px solid rgba(248, 113, 113, 0.25);
}
.profile-danger-btn--hard {
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(248, 113, 113, 0.7);
}
.profile-danger-btn--hard:hover {
  background: rgba(248, 113, 113, 0.3);
}
.profile-delete-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(248, 113, 113, 0.25);
}
.profile-delete-form[hidden] {
  display: none;
}
.profile-delete-form .profile-danger-btn {
  align-self: flex-start;
}
.profile-delete-status {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.profile-delete-status.is-error {
  color: var(--danger-text, #f87171);
}
.header-auth-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.header-auth-btn:hover {
  color: var(--text-primary);
  border-color: rgba(99, 102, 241, 0.55);
  background: rgba(99, 102, 241, 0.12);
}
.header-auth-btn.is-signed-in {
  color: var(--primary-light);
}
.header-materials-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(99, 102, 241, 0.45);
  border-radius: 50%;
  color: var(--primary-light);
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.header-materials-btn:hover {
  color: var(--text-primary);
  border-color: var(--primary-light);
  background: rgba(99, 102, 241, 0.24);
}
@media (max-width: 640px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .profile-content {
    padding: 1rem;
  }
  .profile-stat-vals {
    gap: 0.7rem;
  }
}
.admin-pickers {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
}
.admin-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1 1 220px;
}
.admin-field span {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.admin-field select {
  color-scheme: dark;
}
.admin-field select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}
.admin-cat {
  margin-top: 1rem;
}
.admin-count {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 999px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}
.admin-card-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.admin-card {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  border: 1px solid var(--border-color, #334155);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  background: var(--bg-secondary);
}
.admin-card-body {
  flex: 1 1 auto;
  min-width: 0;
}
.admin-card-q {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  white-space: pre-wrap;
}
.admin-card-a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  white-space: pre-wrap;
}
.admin-editbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.8rem 1rem;
}
.admin-editbar.is-active {
  justify-content: space-between;
  border: 1px solid var(--primary, #6366f1);
}
.admin-editbar__status {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.admin-editbar__status i {
  color: var(--primary, #6366f1);
}
.admin-editbar__count {
  display: inline-block;
  min-width: 1.5rem;
  text-align: center;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: var(--primary, #6366f1);
  color: #fff;
}
.admin-editbar__actions {
  display: inline-flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.admin-editbar .cta-button {
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
}
.admin-editbar .cta-button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.admin-edit-btn {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border-color, #334155);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.admin-edit-btn:hover {
  background: var(--primary-dark, #4338ca);
  color: #fff;
  border-color: var(--primary, #6366f1);
}
.admin-add-btn {
  margin-top: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px dashed var(--border-color, #334155);
  background: transparent;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.admin-add-btn:hover {
  background: var(--bg-tertiary);
  color: var(--primary-light, #818cf8);
  border-color: var(--primary, #6366f1);
}
.admin-cat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.admin-cat-head .profile-card-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.admin-cat-ctrls {
  flex: 0 0 auto;
  display: inline-flex;
  gap: 0.35rem;
}
.admin-card-ctrls {
  flex: 0 0 auto;
  display: inline-flex;
  gap: 0.35rem;
}
.admin-cat-del:hover, .admin-del:hover {
  background: var(--danger-bg, #7f1d1d);
  color: #fff;
  border-color: var(--danger-text, #f87171);
}
.admin-edit-btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}
.admin-edit-btn[disabled]:hover {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-color: var(--border-color, #334155);
}
.admin-add-btn--cat {
  margin-top: 1rem;
  width: 100%;
  justify-content: center;
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
}
.admin-edit .admin-edit__card {
  position: relative;
  width: min(92vw, 460px);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color, #334155);
  border-radius: 14px;
  padding: 1.4rem 1.3rem 1.2rem;
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.55);
}
.admin-edit__close {
  position: absolute;
  top: 0.6rem;
  right: 0.7rem;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
}
.admin-edit__close:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}
.admin-edit__title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  color: var(--text-primary);
}
.admin-edit__title i {
  color: var(--primary-light, #818cf8);
  margin-right: 0.4rem;
}
.admin-edit__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}
.admin-edit__field span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.admin-edit__input {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  padding: 0.6rem 0.7rem;
  border-radius: 9px;
  border: 1px solid var(--border-color, #334155);
  background: var(--bg-primary, #0f172a);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.4;
}
.admin-edit__input:focus {
  outline: none;
  border-color: var(--primary, #6366f1);
}
.admin-edit__count {
  align-self: flex-end;
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  opacity: 0.65;
  transition: color 0.15s ease, opacity 0.15s ease;
}
.admin-edit__count.is-warn {
  color: var(--warning-text, #fbbf24);
  opacity: 1;
}
.admin-edit__count.is-over {
  color: var(--danger-text, #f87171);
  opacity: 1;
}
.admin-edit__actions .cta-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
}
.admin-edit__field--color {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.admin-edit__color {
  width: 52px;
  height: 34px;
  padding: 2px;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid var(--border-color, #334155);
  background: var(--bg-primary, #0f172a);
}
.admin-edit__note {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 0 0 0.5rem;
}
.admin-edit__status {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 0.7rem;
}
.admin-edit__status.is-error {
  color: var(--danger-text, #f87171);
}
.admin-edit__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}
.admin-subhead {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.admin-quiz-opts {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.admin-quiz-opts li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding-left: 1.1rem;
  text-indent: -1.1rem;
}
.admin-quiz-opts li.is-correct {
  color: var(--text-primary);
  font-weight: 600;
}
.admin-quiz-opts li.is-correct i {
  color: #22c55e;
  margin-right: 0.15rem;
}
.admin-quiz-editopts {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.admin-quiz-optrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.admin-quiz-optrow input[type="radio"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: var(--primary, #6366f1);
  cursor: pointer;
}
.admin-quiz-optinput {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border-color, #334155);
  background: var(--bg-primary, #0f172a);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
}
.admin-quiz-optinput:focus {
  outline: none;
  border-color: var(--primary, #6366f1);
}
.admin-quiz-delopt {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--border-color, #334155);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.admin-quiz-delopt:hover {
  background: var(--danger-text, #f87171);
  color: #fff;
  border-color: var(--danger-text, #f87171);
}
.admin-quiz-addopt {
  align-self: flex-start;
  margin-top: 0.55rem;
  padding: 0.35rem 0.7rem;
  border: 1px dashed var(--border-color, #334155);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.82rem;
  font-family: inherit;
}
.admin-quiz-addopt:hover {
  border-color: var(--primary, #6366f1);
  color: var(--text-primary);
}
.admin-learn .admin-edit__card {
  width: min(94vw, 640px);
}
.admin-learn__content {
  min-height: 280px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
}
.mm {
  margin-top: 16px;
}
.mm-busy {
  pointer-events: none;
  opacity: 0.65;
}
.mm-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.mm-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.mm-add:hover {
  border-color: var(--primary);
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.12);
}
.mm-add i {
  color: var(--primary-light);
}
.mm-tree {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.35);
}
.mm-row {
  --mm-depth: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 10px 4px calc(10px + var(--mm-depth) * 22px);
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
  transition: background 0.18s ease;
}
.mm-row:last-child {
  border-bottom: 0;
}
.mm-row:hover {
  background: rgba(99, 102, 241, 0.08);
}
.mm-grip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  width: 16px;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: grab;
  opacity: 0;
  touch-action: none;
  transition: opacity 0.18s ease, color 0.18s ease;
}
.mm-row:hover .mm-grip, .mm-row:focus-within .mm-grip {
  opacity: 0.55;
}
.mm-grip:hover {
  opacity: 1;
  color: var(--text-primary);
}
.mm-row--dragging {
  opacity: 0.45;
}
.mm-row--into {
  background: rgba(99, 102, 241, 0.22);
  box-shadow: inset 0 0 0 1px var(--primary);
}
.mm-dropline {
  position: fixed;
  z-index: 1400;
  height: 2px;
  display: none;
  pointer-events: none;
  background: var(--primary);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.8);
}
body.mm-dragging {
  cursor: grabbing;
  user-select: none;
}
.mm-twisty {
  display: inline-flex;
  justify-content: center;
  width: 20px;
  flex: 0 0 20px;
}
.mm-twisty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.mm-twisty-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}
.mm-twisty-btn i {
  font-size: 0.7rem;
  transition: transform 0.18s ease;
}
.mm-twisty-btn[aria-expanded="true"] i {
  transform: rotate(90deg);
}
.mm-icon {
  display: inline-flex;
  flex: 0 0 auto;
  width: 20px;
  justify-content: center;
  font-size: 0.9rem;
}
.mm-row--folder .mm-icon {
  color: var(--accent);
}
.mm-row--study .mm-icon {
  color: var(--primary-light);
}
.mm-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 0.94rem;
}
.mm-row--folder .mm-name {
  font-weight: 600;
  color: var(--text-primary);
}
.mm-count {
  flex: 0 0 auto;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}
.mm-acts {
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.mm-row:hover .mm-acts, .mm-row:focus-within .mm-acts {
  opacity: 1;
}
.mm-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}
.mm-act:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}
.mm-act--danger:hover {
  color: var(--danger-text);
  background: rgba(239, 68, 68, 0.12);
}
.mm-add--undo {
  border-color: rgba(245, 158, 11, 0.45);
  color: var(--accent);
}
.mm-add--undo:hover {
  border-color: var(--accent);
  background: rgba(245, 158, 11, 0.12);
}
.mm-add--undo i {
  color: var(--accent);
}
.mm-row--edit {
  background: rgba(99, 102, 241, 0.1);
}
.mm-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.94rem;
}
.mm-input:focus {
  outline: 2px solid var(--primary-light);
  outline-offset: 1px;
}
.mm-acts--edit {
  opacity: 1;
}
.mm-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 34px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.mm-state-icon {
  font-size: 1.6rem;
  color: var(--text-muted);
  opacity: 0.7;
}
.mm-state-title {
  margin: 0;
  color: var(--text-secondary);
  font-weight: 600;
}
.mm-state-sub {
  margin: 0;
  max-width: 46ch;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}
.mm-spin {
  animation: mmSpin 1s linear infinite;
}
@keyframes mmSpin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 640px) {
  .mm-row {
    padding-left: calc(8px + var(--mm-depth) * 14px);
  }
  .mm-acts, .mm-grip {
    opacity: 1;
  }
  .mm-add {
    flex: 1 1 auto;
    justify-content: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mm-spin {
    animation: none;
  }
}
.katex {
  font-size: 1.05em;
}
.katex-display {
  margin: 0.9em 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0;
  -webkit-overflow-scrolling: touch;
}
.katex-error {
  color: #ff6b6b;
}
@media (max-width: 767px) {
  .katex {
    font-size: 1em;
  }
  .katex-display {
    font-size: 0.98em;
  }
}
