/* Bonjour French — CartoonCoders Inspired Dark Visual Design System */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@500;600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Sora:wght@500;600;700;800&display=swap');

:root, [data-theme="dark"] {
  --bg-dark: #0b0f17;
  --bg-card: #131927;
  --bg-card-hover: #1e293b;
  --bg-card-glass: rgba(19, 25, 39, 0.75);
  --surface: #131927;
  --surface-soft: rgba(255, 255, 255, 0.04);
  --surface-card: #182234;
  --border-line: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(20, 184, 166, 0.35);
  
  --ink: #f8fafc;
  --muted: #94a3b8;
  --subtle: #64748b;
  
  --teal: #14b8a6;
  --teal-glow: rgba(20, 184, 166, 0.25);
  --violet: #8b5cf6;
  --violet-glow: rgba(139, 92, 246, 0.25);
  --pink: #f43f5e;
  --pink-glow: rgba(244, 63, 94, 0.25);
  --amber: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.25);
  --cyan: #06b6d4;
  --blue: #3b82f6;
  --emerald: #10b981;
  
  --font-display: 'Sora', -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  
  --shadow-bento: 0 16px 40px -12px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.1);
  --shadow-glow: 0 0 35px -5px rgba(20, 184, 166, 0.22);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

/* Light Theme Design System — High-Contrast, Clean & Comfortable */
[data-theme="light"] {
  --bg-dark: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-card-glass: rgba(255, 255, 255, 0.9);
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --surface-card: #ffffff;
  --border-line: rgba(15, 23, 42, 0.1);
  --border-glow: rgba(13, 148, 136, 0.4);
  
  --ink: #0f172a;
  --muted: #334155;
  --subtle: #64748b;
  
  --teal: #0d9488;
  --teal-glow: rgba(13, 148, 136, 0.15);
  --violet: #7c3aed;
  --violet-glow: rgba(124, 58, 237, 0.15);
  --pink: #e11d48;
  --pink-glow: rgba(225, 29, 72, 0.15);
  --amber: #d97706;
  --amber-glow: rgba(217, 119, 6, 0.15);
  --cyan: #0284c7;
  --blue: #2563eb;
  --emerald: #059669;
  
  --shadow-bento: 0 14px 35px -10px rgba(15, 23, 42, 0.08), 0 0 1px rgba(15, 23, 42, 0.1);
  --shadow-glow: 0 0 35px -5px rgba(13, 148, 136, 0.18);
}

[data-theme="light"] .site-header {
  background: rgba(248, 250, 252, 0.9);
  border-bottom-color: rgba(15, 23, 42, 0.1);
}
[data-theme="light"] .logo { color: #0f172a; }
[data-theme="light"] .nav a { color: #475569; }
[data-theme="light"] .nav a:hover, [data-theme="light"] .nav a.active { color: #0f172a; }
[data-theme="light"] .hero-bg {
  background:
    radial-gradient(circle at 80% 20%, rgba(13, 148, 136, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(124, 58, 237, 0.12) 0%, transparent 50%),
    linear-gradient(135deg, #f8fafc 0%, #edf2f7 50%, #e2e8f0 100%);
}
[data-theme="light"] .hero { color: #0f172a; }
[data-theme="light"] .hero-brand { color: #0f172a; }
[data-theme="light"] .hero-lead { color: #334155; }
[data-theme="light"] .hero-stat-item strong { color: #0f172a; }
[data-theme="light"] .hero-stat-item span { color: #64748b; }
[data-theme="light"] .hero-tag-badge {
  background: rgba(13, 148, 136, 0.12);
  color: #0d9488;
  border-color: rgba(13, 148, 136, 0.25);
}
[data-theme="light"] .floating-vocab-card {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}
[data-theme="light"] .floating-vocab-card strong { color: #0f172a; }
[data-theme="light"] .floating-vocab-card span { color: #475569; }
[data-theme="light"] .phrase-banner {
  background: #ffffff;
  border-color: rgba(13, 148, 136, 0.3);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}
[data-theme="light"] .phrase-fr { color: #0f172a; }
[data-theme="light"] .phrase-en { color: #334155; }
[data-theme="light"] .placement-banner {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}
[data-theme="light"] .placement-banner h3 { color: #0f172a; }
[data-theme="light"] .placement-banner p { color: #334155; }
[data-theme="light"] .level-tile {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
}
[data-theme="light"] .level-tile:hover {
  background: #f8fafc;
  border-color: var(--teal);
  box-shadow: 0 12px 30px rgba(13, 148, 136, 0.15);
}
[data-theme="light"] .level-tile .code { color: #0f172a; }
[data-theme="light"] .level-tile strong { color: #0f172a; }
[data-theme="light"] .level-tile .meta { color: #475569; }
[data-theme="light"] .studio-home-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
}
[data-theme="light"] .studio-card-body h3 { color: #0f172a; }
[data-theme="light"] .studio-card-body p { color: #334155; }
[data-theme="light"] .studio-card-img-wrap { background: #f1f5f9; }
[data-theme="light"] .feature-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
}
[data-theme="light"] .feature-card h3 { color: #0f172a; }
[data-theme="light"] .feature-card p { color: #334155; }
[data-theme="light"] .btn-outline {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.2);
  color: #0f172a !important;
}
[data-theme="light"] .btn-outline:hover {
  background: rgba(13, 148, 136, 0.08);
  border-color: var(--teal);
}
[data-theme="light"] .btn-coffee {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e !important;
}
[data-theme="light"] .btn-coffee:hover {
  background: #fde68a;
}
[data-theme="light"] .section-alt {
  background: #f1f5f9;
  border-top-color: rgba(15, 23, 42, 0.08);
  border-bottom-color: rgba(15, 23, 42, 0.08);
}
[data-theme="light"] .site-footer {
  background: #f1f5f9;
  border-top-color: rgba(15, 23, 42, 0.1);
}
[data-theme="light"] .footer-logo { color: #0f172a; }
[data-theme="light"] .footer-bio { color: #334155; }
[data-theme="light"] .footer-col-title { color: #0f172a; }
[data-theme="light"] .footer-links a { color: #475569; }
[data-theme="light"] .footer-links a:hover { color: #0f172a; }
[data-theme="light"] .footer-bottom {
  border-top-color: rgba(15, 23, 42, 0.1);
  color: #475569;
}
[data-theme="light"] .footer-copy strong { color: #0f172a; }
[data-theme="light"] .footer-badge-item {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.1);
  color: #334155;
}

/* Comprehensive Light Theme Fixes across all modules */
[data-theme="light"] body {
  background-color: #f8fafc;
  color: #0f172a;
}
[data-theme="light"] .card,
[data-theme="light"] .bento-card,
[data-theme="light"] .card-glass,
[data-theme="light"] .dialog-box,
[data-theme="light"] .auth-card-box {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  color: #0f172a !important;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08), 0 0 1px rgba(15, 23, 42, 0.1) !important;
}
[data-theme="light"] .card h1,
[data-theme="light"] .card h2,
[data-theme="light"] .card h3,
[data-theme="light"] .card h4,
[data-theme="light"] .bento-card h1,
[data-theme="light"] .bento-card h2,
[data-theme="light"] .bento-card h3,
[data-theme="light"] .bento-card h4 {
  color: #0f172a !important;
}
[data-theme="light"] .form-control,
[data-theme="light"] .input,
[data-theme="light"] select.form-control,
[data-theme="light"] textarea.form-control {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.18) !important;
  color: #0f172a !important;
}
[data-theme="light"] .form-control:focus {
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2) !important;
}
[data-theme="light"] .badge,
[data-theme="light"] .pill-badge {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.12);
  color: #1e293b;
}
[data-theme="light"] .table,
[data-theme="light"] table {
  color: #0f172a;
}
[data-theme="light"] table th {
  background: #f1f5f9;
  color: #1e293b;
  border-bottom-color: rgba(15, 23, 42, 0.12);
}
[data-theme="light"] table td {
  border-bottom-color: rgba(15, 23, 42, 0.08);
  color: #334155;
}
[data-theme="light"] table tr:hover td {
  background: #f8fafc;
}
[data-theme="light"] .tabs-header,
[data-theme="light"] .tab-bar,
[data-theme="light"] .level-bar {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}
[data-theme="light"] .listening-control-bar {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
}
[data-theme="light"] .quote-band {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-top-color: rgba(15, 23, 42, 0.1);
}
[data-theme="light"] .quote-band blockquote {
  background: linear-gradient(135deg, #0f172a, #334155);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="light"] .checkout-summary-box,
[data-theme="light"] .receipt-box {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}
[data-theme="light"] .stat-card,
[data-theme="light"] .metric-box {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
  color: #0f172a;
}
[data-theme="light"] .btn-outline {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.22) !important;
  color: #0f172a !important;
}
[data-theme="light"] .btn-outline:hover {
  background: rgba(13, 148, 136, 0.08) !important;
  border-color: var(--teal) !important;
  color: var(--teal) !important;
}
[data-theme="light"] .mobile-toggle-btn {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.15);
}
[data-theme="light"] .mobile-toggle-btn span {
  background: #0f172a;
}
@media (max-width: 1400px) {
  [data-theme="light"] .nav {
    background: #ffffff;
    border-bottom-color: rgba(15, 23, 42, 0.1);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-dark);
  line-height: 1.65;
  font-size: 1.02rem;
  overflow-x: hidden;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; transition: color 0.2s; }
a:hover { color: #5eead4; }

h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.6rem;
}
h1 { font-size: clamp(2.5rem, 5.5vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1rem; color: var(--muted); }

.phonetic {
  font-family: var(--font-mono);
  color: var(--teal);
  font-weight: 500;
  font-size: 0.9em;
}
.muted { color: var(--muted); }
.container,
.container-wide {
  width: 100%;
  margin-inline: auto;
  padding-inline: clamp(1rem, 2.2vw, 1.5rem);
  box-sizing: border-box;
}
.container { max-width: 1200px; }
.container-wide { max-width: 1320px; }

/* Responsive Layout Utilities */
.grid { display: grid !important; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 0.75rem !important; }
.gap-4 { gap: 1rem !important; }
.gap-6 { gap: 1.5rem !important; }
.gap-8 { gap: 2rem !important; }

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}


/* Sticky Dark Glass Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 15, 23, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-line);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 66px;
  width: 100%;
  max-width: none;
  margin-inline: auto;
  padding-inline: clamp(1rem, 2.2vw, 1.5rem);
  box-sizing: border-box;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  white-space: nowrap;
}
.site-mascot-logo {
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 12px rgba(20, 184, 166, 0.35);
  border: 1.5px solid rgba(20, 184, 166, 0.5);
  transition: transform 0.25s var(--ease);
}
.logo:hover .site-mascot-logo {
  transform: scale(1.08) rotate(4deg);
}
.logo-text { color: var(--ink); }
.logo-accent {
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Center Nav */
/* Center Nav - Modern Pill Dock Layout */
.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-line);
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
  backdrop-filter: blur(14px);
  white-space: nowrap;
}
[data-theme="light"] .nav {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
}
.nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  position: relative;
  text-decoration: none;
  transition: all 0.22s var(--ease);
  white-space: nowrap;
}
.nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
}
[data-theme="light"] .nav a:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
}
.nav a.active {
  color: var(--ink);
  background: rgba(20, 184, 166, 0.15);
  font-weight: 700;
  box-shadow: 0 0 12px rgba(20, 184, 166, 0.2);
}
[data-theme="light"] .nav a.active {
  background: rgba(13, 148, 136, 0.12);
  color: var(--teal);
}
.nav-pricing {
  color: var(--teal) !important;
  font-weight: 700 !important;
  background: rgba(20, 184, 166, 0.08) !important;
}
.nav-pricing:hover {
  background: rgba(20, 184, 166, 0.2) !important;
}
.nav-translate,
.nav-notes {
  color: #818cf8 !important;
  font-weight: 700 !important;
  background: rgba(99, 102, 241, 0.1) !important;
  border: 1px solid rgba(99, 102, 241, 0.25) !important;
  border-radius: 999px !important;
  padding: 0.38rem 0.85rem !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.nav-translate:hover,
.nav-notes:hover {
  background: rgba(99, 102, 241, 0.22) !important;
  color: #a5b4fc !important;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.35) !important;
  transform: translateY(-1px) !important;
}
.nav-translate.active,
.nav-notes.active {
  background: rgba(99, 102, 241, 0.28) !important;
  border-color: #818cf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 18px rgba(99, 102, 241, 0.45) !important;
}
[data-theme="light"] .nav-translate,
[data-theme="light"] .nav-notes {
  color: #4f46e5 !important;
  background: rgba(99, 102, 241, 0.08) !important;
  border-color: rgba(99, 102, 241, 0.2) !important;
}

/* Nav Dropdown & Popovers */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-drop-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.22s var(--ease);
  white-space: nowrap;
}
.nav-drop-btn:hover, .nav-dropdown:hover .nav-drop-btn, .nav-drop-btn.active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
}
[data-theme="light"] .nav-drop-btn:hover, 
[data-theme="light"] .nav-dropdown:hover .nav-drop-btn, 
[data-theme="light"] .nav-drop-btn.active {
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
}
.drop-caret {
  font-size: 0.65rem;
  transition: transform 0.22s var(--ease);
  opacity: 0.8;
}
.nav-dropdown:hover .drop-caret {
  transform: translateY(2px);
}
.nav-popover {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 270px;
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: 16px;
  padding: 0.65rem;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.5), 0 0 25px rgba(20, 184, 166, 0.1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 1100;
}
[data-theme="light"] .nav-popover {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.15), 0 2px 8px rgba(15, 23, 42, 0.05);
}
.nav-dropdown:hover .nav-popover,
.nav-dropdown:focus-within .nav-popover {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  animation: dropFadeIn 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.popover-link {
  display: flex !important;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem !important;
  border-radius: 10px;
  text-decoration: none !important;
  transition: all 0.15s ease;
}
.popover-link:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}
[data-theme="light"] .popover-link:hover {
  background: #f1f5f9 !important;
}
.popover-icon {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}
.popover-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.popover-desc {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.25;
  margin-top: 2px;
}

/* Futuristic Sleek Capsule Theme Switch */
.theme-toggle-switch {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  outline: none;
  flex-shrink: 0;
}
.toggle-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 58px;
  height: 30px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 2px 4px;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
}
[data-theme="light"] .toggle-track {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.18);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.05);
}
.theme-toggle-switch:hover .toggle-track {
  border-color: rgba(20, 184, 166, 0.5);
  box-shadow: 0 0 14px rgba(20, 184, 166, 0.3);
}
.toggle-icon {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #94a3b8;
  transition: all 0.22s ease;
  pointer-events: none;
}
.toggle-icon svg {
  display: block;
}
.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #14b8a6, #6366f1);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.5);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s ease;
  z-index: 1;
}

/* Dark Mode: Thumb sits on the Right over Moon */
:root:not([data-theme="light"]) .toggle-thumb,
[data-theme="dark"] .toggle-thumb {
  transform: translateX(28px);
  background: linear-gradient(135deg, #14b8a6, #6366f1);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
}
:root:not([data-theme="light"]) .icon-moon,
[data-theme="dark"] .icon-moon {
  color: #fff !important;
}
:root:not([data-theme="light"]) .icon-sun,
[data-theme="dark"] .icon-sun {
  color: #475569;
}

/* Light Mode: Thumb sits on the Left over Sun */
[data-theme="light"] .toggle-thumb {
  transform: translateX(0);
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.5);
}
[data-theme="light"] .icon-sun {
  color: #fff !important;
}
[data-theme="light"] .icon-moon {
  color: #94a3b8;
}

/* Header Right Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  white-space: nowrap;
}
.header-actions .nav-link {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.84rem;
  text-decoration: none;
  padding: 0.35rem 0.4rem;
  transition: color 0.2s;
}
.header-actions .nav-link:hover,
.header-actions .nav-link.active {
  color: var(--ink);
}

/* Candidate User Header Capsule */
.user-header-capsule {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-line);
  padding: 0.2rem 0.35rem 0.2rem 0.35rem;
  border-radius: 999px;
  backdrop-filter: blur(12px);
  max-width: 100%;
}
[data-theme="light"] .user-header-capsule {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.1);
}

.user-profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  padding: 0.2rem 0.55rem 0.2rem 0.2rem;
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  transition: all 0.2s ease;
}
.user-profile-pill:hover,
.user-profile-pill.active {
  background: rgba(20, 184, 166, 0.15);
  color: var(--teal);
}
.user-avatar-initials {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), #6366f1);
  color: #0b0f17;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
}
.user-pill-name {
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge-pro-micro {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #f59e0b;
  color: #0b0f17;
  letter-spacing: 0.02em;
}

/* Consolidated User Account Dropdown in Site Header */
.user-account-dropdown {
  position: relative;
  display: inline-flex;
}
.user-account-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-line);
  padding: 0.28rem 0.65rem 0.28rem 0.35rem;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  transition: all 0.22s var(--ease);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
[data-theme="light"] .user-account-btn {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}
.user-account-btn:hover,
.user-account-dropdown:hover .user-account-btn,
.user-account-btn.active {
  background: rgba(20, 184, 166, 0.14);
  border-color: rgba(20, 184, 166, 0.4);
  color: var(--teal);
  box-shadow: 0 0 16px rgba(20, 184, 166, 0.2);
}
.user-account-popover {
  right: 0 !important;
  left: auto !important;
  transform: none !important;
  min-width: 290px;
}
.user-popover-header {
  padding: 0.5rem 0.65rem 0.65rem;
  border-bottom: 1px solid var(--border-line);
  margin-bottom: 0.35rem;
}
.user-popover-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}
.user-popover-meta {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--teal);
  margin-top: 0.2rem;
}
.popover-divider {
  height: 1px;
  background: var(--border-line);
  margin: 0.35rem 0;
  opacity: 0.7;
}
.popover-signout:hover {
  background: rgba(244, 63, 94, 0.12) !important;
}

.btn-header-signout {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: #fb7185;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 700;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-header-signout:hover {
  background: rgba(244, 63, 94, 0.25);
  color: #fff;
  border-color: #f43f5e;
}
[data-theme="light"] .btn-header-signout {
  background: rgba(244, 63, 94, 0.08);
  color: #e11d48;
}
[data-theme="light"] .btn-header-signout:hover {
  background: #e11d48;
  color: #ffffff !important;
}

.badge-pro-status {
  background: #f59e0b;
  color: #0b0f17;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.btn-pro-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), #0d9488);
  color: #0b0f17 !important;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  box-shadow: 0 0 14px rgba(20, 184, 166, 0.35);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-pro-nav:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(20, 184, 166, 0.6);
}

.mobile-toggle-btn {
  display: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-line);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  transition: all 0.22s var(--ease);
  z-index: 1002;
}
[data-theme="light"] .mobile-toggle-btn {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.12);
}
.mobile-toggle-btn .bar {
  display: block;
  width: 19px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  transform-origin: center;
}
.mobile-toggle-btn.active .bar-top {
  transform: translateY(7px) rotate(45deg);
}
.mobile-toggle-btn.active .bar-mid {
  opacity: 0;
  transform: scaleX(0);
}
.mobile-toggle-btn.active .bar-bot {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer Backdrop */
.site-nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 9999;
}
.site-nav-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}
body.menu-open {
  overflow: hidden !important;
}


.mobile-nav-header {
  display: none;
}

@media (max-width: 1480px) {
  .site-header-inner {
    gap: 0.85rem;
  }
  .nav {
    padding: 0.22rem 0.3rem;
    gap: 0.12rem;
  }
  .nav a,
  .nav-drop-btn {
    padding: 0.32rem 0.55rem;
    font-size: 0.78rem;
  }
  .btn-pro-nav {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 1280px) {
  .site-header-inner {
    gap: 0.65rem;
  }
  .nav {
    padding: 0.2rem 0.28rem;
    gap: 0.1rem;
  }
  .nav a, .nav-drop-btn {
    padding: 0.3rem 0.48rem;
    font-size: 0.74rem;
  }
  .logo {
    font-size: 1.15rem;
  }
  .header-actions {
    gap: 0.35rem;
  }
}

/* Responsive Mobile Navigation Off-Canvas Drawer */
@media (max-width: 1400px) {
  /* Prevent header backdrop-filter from creating a containing block for fixed drawer */
  .site-header {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(11, 15, 23, 0.98) !important;
  }
  [data-theme="light"] .site-header {
    background: rgba(255, 255, 255, 0.98) !important;
  }
  .mobile-toggle-btn {
    display: inline-flex !important;
  }
  .mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-line);
  }
  .mobile-nav-close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-line);
    color: var(--ink);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    transition: background 0.2s ease, transform 0.2s ease;
  }
  .mobile-nav-close:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: scale(1.05);
  }
  [data-theme="light"] .mobile-nav-close {
    background: rgba(15, 23, 42, 0.06);
  }
  .nav {
    display: flex;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: min(340px, 86vw) !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    background: var(--bg-card) !important;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-left: 1px solid var(--border-line) !important;
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.6) !important;
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 1.25rem 1.15rem 6.5rem !important;
    gap: 0.35rem !important;
    z-index: 10000 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain !important;
    touch-action: pan-y !important;
    scrollbar-width: thin;
    border-radius: 0 !important;
    transform: translateX(105%) !important;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  .nav.open {
    transform: translateX(0) !important;
  }
  .nav a {
    padding: 0.65rem 0.75rem;
    font-size: 0.95rem;
    color: var(--ink);
    border-radius: 10px;
    border: none;
  }
  .nav a:hover,
  .nav a.active {
    background: rgba(20, 184, 166, 0.12);
    color: var(--teal);
  }
  .nav-dropdown {
    display: flex;
    flex-direction: column;
    width: 100%;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-line);
    overflow: hidden;
    transition: background 0.2s ease, border-color 0.2s ease;
  }
  [data-theme="light"] .nav-dropdown {
    background: rgba(15, 23, 42, 0.02);
  }
  .nav-dropdown.is-open {
    background: rgba(20, 184, 166, 0.05);
    border-color: rgba(20, 184, 166, 0.3);
  }
  .nav-drop-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0.85rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ink);
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 10px;
    transition: color 0.2s ease;
  }
  .nav-drop-btn .drop-caret {
    transition: transform 0.22s ease;
  }
  .nav-dropdown.is-open .drop-caret {
    transform: rotate(180deg);
    color: var(--teal);
  }
  .nav-popover {
    display: none;
    position: static;
    transform: none;
    min-width: unset;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0.2rem 0.4rem 0.6rem;
    gap: 0.25rem;
    animation: none;
  }
  .nav-dropdown.is-open .nav-popover {
    display: flex;
    flex-direction: column;
  }
  .popover-link {
    padding: 0.55rem 0.65rem !important;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 0.2rem;
  }
  [data-theme="light"] .popover-link {
    background: rgba(15, 23, 42, 0.03);
  }
  .popover-title {
    font-size: 0.86rem;
    font-weight: 700;
  }
  .popover-desc {
    font-size: 0.72rem;
    opacity: 0.75;
  }
  .mobile-user-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-line);
    border-radius: 12px;
  }
  [data-theme="light"] .mobile-user-card {
    background: rgba(15, 23, 42, 0.04);
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--teal), #0d9488);
  color: #0b0f17 !important;
  box-shadow: 0 8px 25px -4px rgba(20, 184, 166, 0.4);
}
.btn-primary:hover {
  box-shadow: 0 12px 32px rgba(20, 184, 166, 0.6);
}
.btn-violet {
  background: linear-gradient(135deg, var(--violet), #7c3aed);
  color: #fff !important;
  box-shadow: 0 8px 25px -4px rgba(139, 92, 246, 0.4);
}
.btn-pink {
  background: linear-gradient(135deg, var(--pink), #e11d48);
  color: #fff !important;
  box-shadow: 0 8px 25px -4px rgba(244, 63, 94, 0.4);
}
.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff !important;
  backdrop-filter: blur(10px);
}
.btn-outline:hover {
  border-color: var(--teal);
  background: rgba(20, 184, 166, 0.1);
}
.btn-coffee {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.05));
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fef08a !important;
}
.btn-sm { padding: 0.5rem 1rem; font-size: 0.88rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 1rem 1.8rem; font-size: 1.05rem; }
.btn-icon {
  width: 42px; height: 42px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.2s, background 0.2s;
}
.btn-icon:hover { transform: scale(1.08); background: var(--teal); color: #0b0f17; }

/* Hero Section — CartoonCoders Atmospheric Dark Glow */
.hero {
  position: relative;
  padding: 5.5rem 0 6.5rem;
  overflow: hidden;
  background: var(--bg-dark);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 25%, rgba(20, 184, 166, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 20% 75%, rgba(139, 92, 246, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(244, 63, 94, 0.12) 0%, transparent 60%);
  pointer-events: none;
  animation: heroPulse 12s ease-in-out infinite alternate;
}
@keyframes heroPulse {
  0% { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.08) rotate(3deg); }
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center;
  /* Never override .container width — gutters come from container padding */
  width: auto;
  max-width: none;
}

/* When hero uses both container + hero-grid classes */
.container.hero-grid {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 2.2vw, 1.5rem);
  box-sizing: border-box;
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 2.5rem; }
}

.hero-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.3);
  color: var(--teal);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 25px rgba(20, 184, 166, 0.15);
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--teal);
  box-shadow: 0 0 10px var(--teal);
  animation: pulseDot 1.8s infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 3.8vw, 3.35rem);
  margin: 0 0 0.85rem;
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: #fff;
}
.hero-brand em {
  font-style: normal;
  background: linear-gradient(135deg, var(--teal), var(--cyan), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.05rem;
  max-width: 52ch;
  color: var(--muted);
  margin-bottom: 1.85rem;
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 2rem;
}
.hero-actions .btn {
  padding: 0.72rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-actions .btn:hover {
  transform: translateY(-2px);
}
@media (max-width: 960px) {
  .hero-actions { justify-content: center; }
}

.hero-stats-row {
  display: flex;
  gap: 1.8rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border-line);
}
@media (max-width: 960px) {
  .hero-stats-row { justify-content: center; gap: 1.25rem; flex-wrap: wrap; }
}
.hero-stat-item {
  display: flex;
  flex-direction: column;
}
.hero-stat-item strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
[data-theme="light"] .hero-stat-item strong {
  color: #0f172a;
}
.hero-stat-item span {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.2rem;
  font-weight: 500;
}

/* ==========================================================================
   SMART CLASSROOM BOARD & ANIMATED FRENCH TEACHER STUDIO
   ========================================================================== */
.hero-visual-side {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.hero-classroom-stage {
  position: relative;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
}

.smart-classroom-board {
  position: relative;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(10, 15, 29, 0.98));
  border: 2px solid rgba(20, 184, 166, 0.35);
  border-radius: 24px;
  box-shadow:
    0 25px 60px -15px rgba(0, 0, 0, 0.8),
    0 0 45px rgba(20, 184, 166, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.smart-classroom-board:hover {
  border-color: rgba(20, 184, 166, 0.55);
  box-shadow:
    0 30px 70px -15px rgba(0, 0, 0, 0.85),
    0 0 55px rgba(20, 184, 166, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Board Top Bar */
.board-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1.15rem;
  background: rgba(30, 41, 59, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.board-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-blink-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: pulseDot 1.4s infinite;
}

.board-tabs-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.2rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.board-tab-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.32rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.board-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.board-tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.35), rgba(56, 189, 248, 0.25));
  border: 1px solid rgba(20, 184, 166, 0.5);
  box-shadow: 0 2px 8px rgba(20, 184, 166, 0.25);
}

/* Blackboard Screen Area */
.board-chalk-screen {
  position: relative;
  min-height: 290px;
  padding: 1.5rem 1.65rem;
  background: radial-gradient(circle at top right, rgba(20, 184, 166, 0.08), transparent 65%),
              radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.08), transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.board-slide {
  display: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.board-slide.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: boardSlideFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes boardSlideFade {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide Elements */
.slide-badge-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
  gap: 0.5rem;
}

.badge-cat-tag {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.24rem 0.65rem;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.16);
  color: var(--teal);
  border: 1px solid rgba(20, 184, 166, 0.3);
}

.badge-cat-level {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

.slide-main-phrase {
  margin-bottom: 0.75rem;
}

.phrase-french {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.62rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-bottom: 0.2rem;
}

.phrase-phonetic {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86rem;
  color: #38bdf8;
  letter-spacing: 0.03em;
}

.slide-translation {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin-bottom: 0.95rem;
  font-size: 0.92rem;
}

.trans-label {
  font-weight: 700;
  color: #94a3b8;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.trans-val {
  color: #e2e8f0;
  font-weight: 600;
}

.slide-example-box {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--teal);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-bottom: 1.15rem;
}

.example-french {
  color: #f1f5f9;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.2rem;
}

.example-english {
  color: #94a3b8;
  font-size: 0.82rem;
  line-height: 1.35;
}

.slide-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.5rem;
}

.board-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--teal), #0284c7);
  color: #fff;
  border: none;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(20, 184, 166, 0.3);
  transition: all 0.25s ease;
}

.board-play-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.45);
}

.board-play-btn.is-active {
  transform: scale(0.98);
  filter: brightness(1.15);
}

.board-play-icon {
  font-size: 1rem;
  line-height: 1;
}

/* 5-Bar Dancing Audio Equalizer */
.board-audio-waves {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
}

.board-audio-waves span {
  display: inline-block;
  width: 3px;
  height: 6px;
  background: rgba(20, 184, 166, 0.4);
  border-radius: 999px;
  transition: height 0.2s ease, background-color 0.2s ease;
}

.board-audio-waves.is-playing span {
  background: var(--teal);
  animation: soundwaveLive 0.8s ease-in-out infinite alternate;
}

.board-audio-waves.is-playing span:nth-child(1) { animation-delay: 0.0s; }
.board-audio-waves.is-playing span:nth-child(2) { animation-delay: 0.15s; }
.board-audio-waves.is-playing span:nth-child(3) { animation-delay: 0.3s; }
.board-audio-waves.is-playing span:nth-child(4) { animation-delay: 0.2s; }
.board-audio-waves.is-playing span:nth-child(5) { animation-delay: 0.35s; }

@keyframes soundwaveLive {
  0% { height: 4px; }
  50% { height: 20px; }
  100% { height: 8px; }
}

/* Board Bottom Bar */
.board-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.15rem;
  background: rgba(15, 23, 42, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.board-dots-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
}

.board-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.25s ease;
}

.board-dot.active {
  width: 22px;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 10px rgba(20, 184, 166, 0.6);
}

.board-controls-side {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.board-pause-toggle,
.board-next-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.26rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.board-pause-toggle:hover,
.board-next-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* French Teacher Presenter Floating Badge */
.teacher-presenter-badge {
  position: absolute;
  bottom: -22px;
  left: 20px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(20, 184, 166, 0.45);
  border-radius: 999px;
  padding: 0.35rem 1rem 0.35rem 0.4rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(20, 184, 166, 0.2);
  transition: transform 0.3s ease;
}

.teacher-presenter-badge:hover {
  transform: translateY(-3px) scale(1.02);
}

.teacher-avatar-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--teal);
  object-fit: cover;
  box-shadow: 0 0 10px rgba(20, 184, 166, 0.5);
}

.teacher-speech-bubble {
  display: flex;
  flex-direction: column;
}

.teacher-name {
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
}

.teacher-quote {
  font-size: 0.72rem;
  color: var(--teal);
  font-weight: 600;
}

/* Light Theme Overrides for Smart Classroom Board */
[data-theme="light"] .smart-classroom-board {
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border: 2px solid rgba(20, 184, 166, 0.4);
  box-shadow:
    0 25px 50px -12px rgba(15, 23, 42, 0.12),
    0 0 35px rgba(20, 184, 166, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .board-top-bar {
  background: #f1f5f9;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .board-tabs-nav {
  background: #e2e8f0;
  border-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .board-tab-btn {
  color: #475569;
}

[data-theme="light"] .board-tab-btn:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .board-tab-btn.active {
  color: #0d9488;
  background: #ffffff;
  border: 1px solid rgba(20, 184, 166, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .board-chalk-screen {
  background: radial-gradient(circle at top right, rgba(20, 184, 166, 0.06), transparent 70%),
              radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.05), transparent 60%);
}

[data-theme="light"] .phrase-french {
  color: #0f172a;
}

[data-theme="light"] .phrase-phonetic {
  color: #0284c7;
}

[data-theme="light"] .trans-label {
  color: #64748b;
}

[data-theme="light"] .trans-val {
  color: #1e293b;
}

[data-theme="light"] .slide-example-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid var(--teal);
}

[data-theme="light"] .example-french {
  color: #0f172a;
}

[data-theme="light"] .example-english {
  color: #475569;
}

[data-theme="light"] .board-bottom-bar {
  background: #f8fafc;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .board-dot {
  background: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .board-pause-toggle,
[data-theme="light"] .board-next-btn {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #475569;
}

[data-theme="light"] .board-pause-toggle:hover,
[data-theme="light"] .board-next-btn:hover {
  background: #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .teacher-presenter-badge {
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid rgba(20, 184, 166, 0.45);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12), 0 0 20px rgba(20, 184, 166, 0.12);
}

[data-theme="light"] .teacher-name {
  color: #0f172a;
}

@media (max-width: 640px) {
  .board-chalk-screen {
    padding: 1.15rem 1rem;
    min-height: 280px;
  }
  .board-top-bar {
    padding: 0.6rem 0.85rem;
  }
  .board-tab-btn {
    font-size: 0.72rem;
    padding: 0.28rem 0.45rem;
  }
  .phrase-french {
    font-size: 1.2rem;
  }
  .teacher-presenter-badge {
    left: 10px;
    bottom: -18px;
    padding: 0.3rem 0.75rem 0.3rem 0.35rem;
  }
  .teacher-avatar-img {
    width: 36px;
    height: 36px;
  }
}

.floating-vocab-card {
  position: absolute;
  background: rgba(19, 25, 39, 0.88);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(20, 184, 166, 0.15);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  z-index: 3;
  animation: floatCard 6s ease-in-out infinite alternate;
}
.floating-card-1 { top: 12px; right: 12px; left: auto; animation-delay: 0s; }
.floating-card-2 { bottom: 16px; left: 16px; right: auto; animation-delay: 2s; }
.floating-card-3 { display: none; }

@media (max-width: 960px) {
  .floating-vocab-card { display: none; }
}

@keyframes floatCard {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-16px); }
}

.floating-vocab-card .icon { font-size: 1.5rem; }
.floating-vocab-card .text { display: flex; flex-direction: column; }
.floating-vocab-card strong { font-size: 0.98rem; color: #fff; line-height: 1.1; }
.floating-vocab-card span { font-size: 0.78rem; color: var(--muted); }

/* Section Styling */
.section { padding: 5rem 0; }
.section-alt {
  background: #0f1523;
  border-top: 1px solid var(--border-line);
  border-bottom: 1px solid var(--border-line);
}
.section-head { max-width: 46rem; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(2rem, 3.5vw, 2.75rem); }
.section-head p { color: var(--muted); font-size: 1.12rem; margin-top: 0.4rem; }

/* Bento Grid Components */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-bento);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.bento-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-bento), var(--shadow-glow);
}

/* Phrase du jour Bento Banner */
.phrase-banner {
  background: linear-gradient(135deg, #131927 0%, #1e293b 100%);
  border: 1px solid rgba(20, 184, 166, 0.3);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2.8rem;
  box-shadow: var(--shadow-bento), 0 0 40px rgba(20, 184, 166, 0.12);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 4rem;
}
@media (max-width: 768px) {
  .phrase-banner { grid-template-columns: 1fr; text-align: center; }
}
.phrase-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(20, 184, 166, 0.15);
  color: var(--teal);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(20, 184, 166, 0.3);
  margin-bottom: 0.8rem;
}
.phrase-fr {
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}
.phrase-phonetic {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  margin-top: 0.2rem;
}
.phrase-en { font-size: 1.12rem; color: var(--muted); margin-top: 0.4rem; }

/* Placement Diagnostic Bento Banner */
.placement-banner {
  background: linear-gradient(135deg, #131927, #1e293b);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-lg);
  padding: 2.8rem;
  box-shadow: var(--shadow-bento);
}
.placement-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 840px) {
  .placement-grid { grid-template-columns: 1fr; text-align: center; }
}
.placement-img-wrapper img {
  width: 100%;
  max-width: 320px;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-inline: auto;
}
.level-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.4rem 0 1.8rem;
}
@media (max-width: 840px) {
  .level-pills-row { justify-content: center; }
}
.level-pill {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  border: 1px solid transparent;
}
.pill-a0 { background: rgba(16, 185, 129, 0.15); color: #34d399; border-color: rgba(16, 185, 129, 0.3); }
.pill-a1 { background: rgba(6, 182, 212, 0.15); color: #38bdf8; border-color: rgba(6, 182, 212, 0.3); }
.pill-a2 { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border-color: rgba(59, 130, 246, 0.3); }
.pill-b1 { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border-color: rgba(245, 158, 11, 0.3); }
.pill-b2 { background: rgba(139, 92, 246, 0.15); color: #c084fc; border-color: rgba(139, 92, 246, 0.3); }
.pill-c1 { background: rgba(244, 63, 94, 0.15); color: #fb7185; border-color: rgba(244, 63, 94, 0.3); }
.pill-c2 { background: rgba(225, 29, 72, 0.15); color: #f87171; border-color: rgba(225, 29, 72, 0.3); }

/* CEFR Bento Level Mosaic */
/* CEFR Bento Level Mosaic & Animated Cards */
@keyframes levelTileEnter {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pulsePillGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(16, 185, 129, 0.2); }
  50% { box-shadow: 0 0 18px rgba(16, 185, 129, 0.45); }
}

.level-mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.35rem;
  align-items: stretch;
}

.level-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 1.35rem 1.45rem 1.3rem;
  background: var(--surface, #131927);
  border: 1px solid var(--border-line);
  border-radius: 18px;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s var(--ease), border-color 0.35s;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  animation: levelTileEnter 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
[data-theme="light"] .level-tile {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.09) !important;
  box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.05) !important;
}
[data-theme="light"] .level-tile:hover {
  box-shadow: 0 16px 35px -6px rgba(15, 23, 42, 0.12), 0 0 20px rgba(20, 184, 166, 0.1) !important;
}

/* Background Level Watermark */
.level-tile .level-watermark {
  position: absolute;
  top: 10px;
  right: 18px;
  font-family: var(--font-display);
  font-size: 5.5rem;
  font-weight: 900;
  line-height: 1;
  color: rgba(255, 255, 255, 0.04);
  pointer-events: none;
  user-select: none;
  transition: transform 0.4s var(--ease), color 0.4s;
  z-index: 0;
}

/* Top Accent Line */
.level-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--teal), #06b6d4);
  transition: height 0.25s ease;
  z-index: 2;
}
.level-tile:hover::before {
  height: 6px;
}

.level-tile.tile-lvl-a0::before { background: linear-gradient(90deg, #10b981, #34d399); }
.level-tile.tile-lvl-a1::before { background: linear-gradient(90deg, #06b6d4, #38bdf8); }
.level-tile.tile-lvl-a2::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.level-tile.tile-lvl-b1::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.level-tile.tile-lvl-b2::before { background: linear-gradient(90deg, #8b5cf6, #c084fc); }
.level-tile.tile-lvl-c1::before { background: linear-gradient(90deg, #ec4899, #f472b6); }
.level-tile.tile-lvl-c2::before { background: linear-gradient(90deg, #e11d48, #fb7185); }

/* Hover effects */
.level-tile:hover {
  transform: translateY(-8px) scale(1.012);
  color: var(--ink);
}
.level-tile.tile-lvl-a0:hover {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 20px 40px -10px rgba(16, 185, 129, 0.25), 0 0 0 1px rgba(16, 185, 129, 0.3);
}
.level-tile.tile-lvl-a1:hover {
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 20px 40px -10px rgba(6, 182, 212, 0.25), 0 0 0 1px rgba(6, 182, 212, 0.3);
}
.level-tile.tile-lvl-a2:hover {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.25), 0 0 0 1px rgba(59, 130, 246, 0.3);
}
.level-tile.tile-lvl-b1:hover {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 20px 40px -10px rgba(245, 158, 11, 0.25), 0 0 0 1px rgba(245, 158, 11, 0.3);
}
.level-tile.tile-lvl-b2:hover {
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 20px 40px -10px rgba(139, 92, 246, 0.3), 0 0 0 1px rgba(139, 92, 246, 0.35);
}
.level-tile.tile-lvl-c1:hover {
  border-color: rgba(236, 72, 153, 0.5);
  box-shadow: 0 20px 40px -10px rgba(236, 72, 153, 0.25), 0 0 0 1px rgba(236, 72, 153, 0.3);
}
.level-tile.tile-lvl-c2:hover {
  border-color: rgba(225, 29, 72, 0.5);
  box-shadow: 0 20px 40px -10px rgba(225, 29, 72, 0.25), 0 0 0 1px rgba(225, 29, 72, 0.3);
}

.level-tile:hover .level-watermark {
  transform: scale(1.1) translateX(-6px);
  color: rgba(255, 255, 255, 0.08);
}

/* Card Header */
.level-tile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}
.level-badge-squircle {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s var(--ease);
}
.level-tile:hover .level-badge-squircle {
  transform: scale(1.08) rotate(-3deg);
}

.level-tile strong.level-name {
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  line-height: 1.3;
}

.level-tile .level-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 1.15rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}

/* Metric Chips Container */
.level-metric-chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}
.level-metric-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-line);
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}
.level-tile:hover .level-metric-chip {
  border-color: rgba(255, 255, 255, 0.15);
}
.level-metric-chip strong {
  color: var(--ink);
  font-weight: 700;
}

/* Footer Action */
.level-tile-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}
.tile-arrow {
  display: inline-block;
  transition: transform 0.25s var(--ease);
}
.level-tile:hover .tile-arrow {
  transform: translateX(6px);
}

/* Learning Studios Bento Grid with Illustrations */
.studios-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.85rem;
}
.studio-home-card {
  display: flex;
  flex-direction: column;
  background: var(--surface, #131927);
  border: 1px solid var(--border-line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.studio-home-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4), 0 0 30px rgba(20, 184, 166, 0.18);
  border-color: rgba(20, 184, 166, 0.4);
}
.studio-card-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: 220px;
  background: #0f1523;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-line);
  position: relative;
}
.studio-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.studio-home-card:hover .studio-card-img-wrap img {
  transform: scale(1.05);
}
.studio-tag-badge {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.28rem 0.65rem;
  border-radius: 8px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  letter-spacing: 0.02em;
}
.studio-tag-badge.badge-teal {
  background: rgba(13, 148, 136, 0.85);
  color: #f0fdfa;
  border: 1px solid rgba(45, 212, 191, 0.4);
}
.studio-tag-badge.badge-blue {
  background: rgba(37, 99, 235, 0.85);
  color: #eff6ff;
  border: 1px solid rgba(96, 165, 250, 0.4);
}
.studio-tag-badge.badge-purple {
  background: rgba(124, 58, 237, 0.85);
  color: #f5f3ff;
  border: 1px solid rgba(167, 139, 250, 0.4);
}
.studio-tag-badge.badge-gold {
  background: rgba(217, 119, 6, 0.85);
  color: #fffbeb;
  border: 1px solid rgba(251, 191, 36, 0.4);
}
.studio-tag-badge.badge-maple {
  background: rgba(220, 38, 38, 0.85);
  color: #fef2f2;
  border: 1px solid rgba(248, 113, 113, 0.4);
}
.studio-card-body {
  padding: 1.25rem 1.4rem 1.45rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.studio-card-body h3 {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--ink);
  margin-top: 0;
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}
.studio-card-body p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
  flex-grow: 1;
  margin-bottom: 1.25rem;
}
[data-theme="light"] .studio-home-card {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.09) !important;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05) !important;
}
[data-theme="light"] .studio-home-card:hover {
  box-shadow: 0 20px 40px -8px rgba(15, 23, 42, 0.12), 0 0 25px rgba(20, 184, 166, 0.1) !important;
}
[data-theme="light"] .studio-card-body h3 {
  color: #0f172a !important;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.8rem;
  margin-top: 3rem;
}
.feature-card {
  background: var(--bg-card);
  padding: 2rem 1.6rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-line);
  box-shadow: var(--shadow-bento);
}
.feature-icon {
  font-size: 2.4rem;
  margin-bottom: 1rem;
}
.feature-card h3 {
  font-size: 1.28rem;
  color: #fff;
  margin-bottom: 0.4rem;
}
.feature-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

/* Quote Band */
.quote-band {
  background: linear-gradient(135deg, #0b0f17 0%, #1e293b 100%);
  border-top: 1px solid var(--border-line);
  color: #fff;
  padding: 4.5rem 0;
  text-align: center;
}
.quote-band blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  font-style: italic;
  background: linear-gradient(135deg, #fff, var(--muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 auto 1rem;
  max-width: 32ch;
}

/* Modern Bento Footer with Top Highlights Strip */
.site-footer {
  background: rgba(11, 15, 23, 0.96);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-line);
  padding: 3.5rem 0 2rem;
  position: relative;
  overflow: hidden;
  transition: background 0.3s var(--ease), border-color 0.3s;
}
[data-theme="light"] .site-footer {
  background: #f8fafc;
  border-top-color: rgba(15, 23, 42, 0.1);
}
.footer-ambient-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 750px;
  height: 250px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.14) 0%, rgba(99, 102, 241, 0.08) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
[data-theme="light"] .footer-ambient-glow {
  background: radial-gradient(circle, rgba(13, 148, 136, 0.08) 0%, rgba(99, 102, 241, 0.05) 45%, transparent 70%);
}
.footer-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2.35rem;
}

/* Top Feature Badges Strip */
.footer-top-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.08), transparent 55%),
    rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(20, 184, 166, 0.18);
  border-radius: 18px;
}
@media (max-width: 960px) {
  .footer-top-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .footer-top-strip { grid-template-columns: 1fr; }
}
[data-theme="light"] .footer-top-strip {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.08), #fff 50%);
  border-color: rgba(20, 184, 166, 0.2);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}
.footer-top-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.ft-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.25);
}
.ft-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.25;
}
.ft-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.25;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1.15fr;
  gap: 3rem;
}
@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}
@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 1rem;
}
.footer-logo-icon { font-size: 1.4rem; }
.footer-logo-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.15);
  color: var(--teal);
  border: 1px solid rgba(20, 184, 166, 0.3);
  margin-left: 0.3rem;
}
[data-theme="light"] .footer-logo-badge {
  background: rgba(13, 148, 136, 0.1);
  color: var(--teal);
  border-color: rgba(13, 148, 136, 0.25);
}
.footer-bio {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.6;
  margin-bottom: 1.4rem;
  max-width: 38ch;
}
.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-badge-item {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-line);
  color: var(--muted);
}
[data-theme="light"] .footer-badge-item {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
  color: var(--muted);
}
.footer-col-title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer-links a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}
.footer-links a:hover {
  color: var(--teal);
  padding-left: 0.35rem;
}
.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 0.75rem 1.3rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 55%, #0891b2 100%);
  color: #fff !important;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(20, 184, 166, 0.35);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
  margin-bottom: 0.95rem;
}
.footer-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.55);
}
.footer-cta-copy {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 1rem;
  line-height: 1.55;
}
.footer-auth-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.15rem;
  margin-top: 0;
  font-size: 0.82rem;
  color: var(--subtle);
}
.footer-dot {
  color: var(--muted);
  opacity: 0.5;
  margin: 0 0.15rem;
}
.footer-sub-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}
.footer-sub-link:hover {
  color: var(--teal);
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 1.8rem;
  border-top: 1px solid var(--border-line);
  font-size: 0.88rem;
  color: var(--muted);
}
[data-theme="light"] .footer-bottom {
  border-top-color: rgba(15, 23, 42, 0.08);
  color: var(--muted);
}
.footer-copy strong { color: var(--ink); }
.footer-level-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.lvl-chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-line);
}
[data-theme="light"] .lvl-chip {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
}
.lvl-a0 { color: #10b981; border-color: rgba(16, 185, 129, 0.3); }
.lvl-a1 { color: #06b6d4; border-color: rgba(6, 182, 212, 0.3); }
.lvl-a2 { color: #3b82f6; border-color: rgba(59, 130, 246, 0.3); }
.lvl-b1 { color: #f59e0b; border-color: rgba(245, 158, 11, 0.3); }
.lvl-b2 { color: #8b5cf6; border-color: rgba(139, 92, 246, 0.3); }
.lvl-c1 { color: #f43f5e; border-color: rgba(244, 63, 94, 0.3); }
.lvl-c2 { color: #ef4444; border-color: rgba(239, 68, 68, 0.3); }

/* --- Fabulang Listening Studio & Inner Studio Bento Design --- */
.level-bar-wrap {
  margin: 1.8rem 0 2.2rem;
  display: flex;
  justify-content: center;
}
.level-bar {
  display: flex;
  gap: 0.6rem;
  padding: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: 999px;
  box-shadow: var(--shadow-bento);
  flex-wrap: wrap;
  justify-content: center;
}
.level-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s var(--ease);
}
.level-btn:hover {
  background: var(--bg-card-hover);
  color: var(--ink);
}
.level-btn.active {
  background: var(--teal);
  color: #0b0f17 !important;
  box-shadow: 0 4px 18px rgba(20, 184, 166, 0.35);
}

.listening-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.2rem 1.8rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.ctrl-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.speed-selector {
  display: flex;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-line);
}
.speed-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.speed-btn.active, .speed-btn:hover {
  background: var(--teal);
  color: #0b0f17;
}

.studio-tabs {
  display: flex;
  gap: 1rem;
  border-bottom: 2px solid var(--border-line);
  margin-bottom: 2.2rem;
}
.studio-tabs .tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.8rem 1.2rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  margin-bottom: -2px;
}
.studio-tabs .tab-btn.active, .studio-tabs .tab-btn:hover {
  color: var(--ink);
  border-bottom-color: var(--teal);
}

.tab-content.hidden { display: none; }

/* Fabulang Story Cards */
.fabulang-stories-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-bento);
  transition: transform 0.2s var(--ease), border-color 0.2s;
}
.bento-card:hover {
  border-color: rgba(20, 184, 166, 0.4);
}
.story-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.story-meta-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.reading-time {
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 600;
}
.story-title-fr {
  font-size: 1.75rem;
  color: var(--ink);
  margin: 0 0 0.2rem;
}
.story-title-en {
  font-size: 1.1rem;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 1.8rem;
}

/* Sentence-by-Sentence Paired Rows */
.fabulang-sentence-pairs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}
.sentence-pair-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.1rem 1.4rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-line);
  transition: background 0.2s, border-color 0.2s;
}
[data-theme="light"] .sentence-pair-row {
  background: #f8fafc;
}
.sentence-pair-row:hover {
  background: rgba(20, 184, 166, 0.06);
  border-color: rgba(20, 184, 166, 0.3);
}
.pair-fr {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
}
.btn-play-sentence {
  background: rgba(20, 184, 166, 0.15);
  border: 1px solid rgba(20, 184, 166, 0.3);
  color: var(--teal);
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: transform 0.2s, background 0.2s;
}
.btn-play-sentence:hover {
  transform: scale(1.12);
  background: var(--teal);
  color: #0b0f17;
}
.text-ph {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--teal);
  font-weight: 500;
}
.pair-en-toggle {
  margin-left: 2.8rem;
}
.btn-reveal-en {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.btn-reveal-en:hover { color: var(--teal); }
.text-en {
  display: block;
  font-size: 0.98rem;
  color: var(--muted);
  margin-top: 0.2rem;
}
.text-en.hidden { display: none; }

/* Vocabulary Highlights Box */
.vocab-highlights-box {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.6rem;
  margin-bottom: 2rem;
}
.vocab-highlights-box h4 {
  margin: 0 0 1rem;
  color: var(--ink);
  font-size: 1.05rem;
}
.vocab-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.vocab-pill-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}
.vocab-pill-item:hover {
  transform: translateY(-2px);
  border-color: var(--violet);
}
.v-word { color: var(--ink); }
.v-meaning { color: var(--muted); font-size: 0.84rem; }

/* Story Quiz Section */
.story-comprehension-quiz {
  background: rgba(6, 182, 212, 0.06);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: var(--radius-md);
  padding: 1.6rem;
}
.story-comprehension-quiz h4 {
  margin: 0 0 1.2rem;
  font-size: 1.1rem;
  color: var(--ink);
}
.quiz-q-item {
  margin-bottom: 1.2rem;
}
.q-text {
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 0.6rem;
}
.q-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.6rem;
}
.opt-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s;
}
.opt-label:hover {
  border-color: var(--teal);
  background: var(--bg-card-hover);
}
.opt-label input[type="radio"] {
  accent-color: var(--teal);
}

/* Listening Grid Exercises */
.listening-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 2rem;
}
.listening-player-box {
  background: rgba(20, 184, 166, 0.08);
  border: 1px solid rgba(20, 184, 166, 0.25);
  padding: 1.2rem;
  border-radius: var(--radius-md);
  margin: 1.2rem 0;
}
.audio-instr {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.6rem 0 0;
}

/* Studio Controls Bar & Forms */
.controls-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-bento);
  margin-bottom: 2.2rem;
  flex-wrap: wrap;
}
.form-control {
  background: var(--bg-dark);
  border: 1px solid var(--border-line);
  color: var(--ink);
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-control:focus {
  border-color: var(--teal);
  box-shadow: 0 0 12px rgba(20, 184, 166, 0.25);
}

/* --- Grammar Studio Bento Styling --- */
.grammar-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.grammar-topic-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.grammar-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.topic-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.topic-title {
  font-size: 1.75rem;
  color: var(--ink);
  margin: 0;
}
.grammar-section h4 {
  font-size: 1.1rem;
  color: var(--ink);
  margin: 0 0 0.8rem;
}
.explanation-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-line);
  padding: 1.2rem 1.6rem;
  border-radius: var(--radius-md);
}
[data-theme="light"] .explanation-box {
  background: #f8fafc;
}
.exp-simple, .exp-en {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
  color: var(--ink);
}
.rules-box {
  background: rgba(20, 184, 166, 0.06);
  border: 1px solid rgba(20, 184, 166, 0.25);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.6rem;
}
.formula-code-block pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--teal);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}
.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.example-card-item {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-line);
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.ex-fr-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.ex-fr-text {
  font-size: 1.08rem;
  color: var(--ink);
}
.ex-phonetic {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--teal);
}
.ex-en-text {
  font-size: 0.92rem;
  color: var(--muted);
}
.mistakes-box {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.6rem;
}
.mistakes-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.mistake-item-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-line);
}
.mistake-bad {
  color: #ef4444;
  font-weight: 600;
  font-size: 0.95rem;
}
.mistake-good {
  color: #10b981;
  font-weight: 700;
  font-size: 1rem;
}
.mistake-exp {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}
.quiz-box {
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--radius-md);
  padding: 1.6rem;
}

/* --- Vocabulary Studio Hero Bento & 3D Mascot --- */
.vocab-hero-bento {
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-line);
}
.vocab-hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  align-items: center;
}
@media (max-width: 992px) {
  .vocab-hero-grid {
    grid-template-columns: 1fr;
  }
}
.vocab-hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
}
.v-stat {
  display: flex;
  flex-direction: column;
}
.v-stat strong {
  font-size: 1.5rem;
  color: var(--teal);
  font-weight: 800;
}
.v-stat span {
  font-size: 0.85rem;
  color: var(--muted);
}
.vocab-hero-illustration {
  position: relative;
  display: flex;
  justify-content: center;
}
.illustration-wrapper {
  position: relative;
  width: 100%;
  max-width: 320px;
}
.vocab-mascot-img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-line);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  object-fit: cover;
  transition: transform 0.3s ease;
}
.vocab-mascot-img:hover {
  transform: scale(1.03);
}
.floating-speech-chip {
  position: absolute;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-teal);
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
[data-theme="light"] .floating-speech-chip {
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
}
.float-top {
  top: -12px;
  right: -10px;
  animation: floatAnim 4s ease-in-out infinite;
}
.float-bottom {
  bottom: -12px;
  left: -10px;
  animation: floatAnim 4s ease-in-out infinite 2s;
}

/* Badge Gender */
.badge-gender {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.3);
}
.badge-pos {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  background: var(--bg-dark);
  color: var(--muted);
  border: 1px solid var(--border-line);
}
.btn-play-audio {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: 20px;
  background: rgba(20, 184, 166, 0.15);
  border: 1px solid rgba(20, 184, 166, 0.35);
  color: var(--teal);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-play-audio:hover {
  background: var(--teal);
  color: #0b0f17;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(20, 184, 166, 0.3);
}
.btn-play-audio.playing-audio {
  background: #10b981 !important;
  color: #0b0f17 !important;
  border-color: #10b981 !important;
  animation: pulseAudio 1.2s infinite;
}
@keyframes pulseAudio {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.btn.playing-audio,
.btn-primary.playing-audio {
  background: #10b981 !important;
  color: #0b0f17 !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5) !important;
}

.sentence-row-card.playing-row {
  border-color: var(--teal) !important;
  background: rgba(20, 184, 166, 0.08) !important;
  box-shadow: 0 4px 20px rgba(20, 184, 166, 0.2) !important;
  transform: translateX(4px);
}
[data-theme="light"] .sentence-row-card.playing-row {
  background: #f0fdfa !important;
  border-color: #0d9488 !important;
}

/* --- Clean Animated Multi-Column Vocab Bento Grid --- */
.vocab-bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}
.vocab-grid-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  box-shadow: var(--shadow-bento);
  transition: all 0.25s var(--ease);
  position: relative;
  overflow: hidden;
}
.vocab-grid-card:hover {
  transform: translateY(-5px);
  border-color: var(--teal);
  box-shadow: 0 12px 30px rgba(20, 184, 166, 0.2);
  background: var(--bg-card-hover);
}
.vcard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}
.vcard-mot {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 0.2rem;
  letter-spacing: -0.01em;
}
.vcard-phonetic {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--teal);
  margin: 0 0 0.6rem;
  font-weight: 600;
}
.vcard-meaning {
  font-size: 1.02rem;
  color: var(--ink);
  margin: 0 0 0.35rem;
  line-height: 1.4;
  font-weight: 650;
}
.vcard-meaning-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.28);
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  margin-right: 0.4rem;
  vertical-align: middle;
}
.vcard-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: auto;
}

/* --- Modern Vector Audio & Microphone Icon Styles --- */
.icon-speaker, .icon-mic {
  display: inline-block;
  vertical-align: -2px;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.2s;
}
.btn-play-audio {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.1);
  border: 1px solid rgba(20, 184, 166, 0.25);
  color: var(--teal);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-play-audio:hover {
  background: rgba(20, 184, 166, 0.2);
  border-color: var(--teal);
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(20, 184, 166, 0.35);
}
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-line);
  color: var(--teal);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-icon:hover {
  background: rgba(20, 184, 166, 0.15);
  border-color: var(--teal);
  transform: scale(1.08);
  box-shadow: 0 0 16px rgba(20, 184, 166, 0.3);
}
.btn-icon.btn-sm {
  width: 30px;
  height: 30px;
}
.btn-speech-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-line);
  color: var(--teal);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}
.btn-speech-sm:hover {
  background: rgba(20, 184, 166, 0.15);
  border-color: var(--teal);
}

/* Modern Cartoon French Audio Button */
.cf-play-btn {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(20, 184, 166, 0.35);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  color: #2dd4bf;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
  user-select: none;
}
.cf-play-btn:hover {
  background: rgba(20, 184, 166, 0.28);
  border-color: #2dd4bf;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(20, 184, 166, 0.35);
}
.cf-play-btn:active {
  transform: scale(0.96);
}
.cf-play-btn .cf-play-icon {
  font-size: 0.76rem;
  line-height: 1;
}
.cf-play-btn .cf-play-wave {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 12px;
}
.cf-play-btn .cf-play-wave span {
  display: inline-block;
  width: 2px;
  height: 6px;
  background: currentColor;
  border-radius: 2px;
  transition: height 0.15s ease;
}
.cf-play-btn.is-active {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #fff !important;
  border-color: #34d399 !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.6) !important;
}
.cf-play-btn.is-active .cf-play-wave span:nth-child(1) {
  animation: waveBar 0.5s infinite ease-in-out alternate;
}
.cf-play-btn.is-active .cf-play-wave span:nth-child(2) {
  animation: waveBar 0.5s infinite ease-in-out alternate 0.15s;
}
.cf-play-btn.is-active .cf-play-wave span:nth-child(3) {
  animation: waveBar 0.5s infinite ease-in-out alternate 0.3s;
}
@keyframes waveBar {
  0% { height: 4px; }
  100% { height: 14px; }
}

[data-theme="light"] .cf-play-btn {
  background: rgba(13, 148, 136, 0.09);
  border-color: rgba(13, 148, 136, 0.32);
  color: #0f766e;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}
[data-theme="light"] .cf-play-btn:hover {
  background: #0d9488;
  border-color: #0d9488;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.28);
}
[data-theme="light"] .cf-play-btn.is-active {
  background: #0d9488 !important;
  color: #ffffff !important;
  border-color: #0f766e !important;
  box-shadow: 0 0 16px rgba(13, 148, 136, 0.45) !important;
}

/* ==========================================================================
   VISUAL INTERACTIVE ROADMAP DESIGN SYSTEM (CartoonCoders Style)
   ========================================================================== */
.roadmap-visual-container {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}
.roadmap-track-line {
  position: absolute;
  top: 40px;
  bottom: 80px;
  left: 36px;
  width: 4px;
  background: linear-gradient(180deg, #10b981 0%, #14b8a6 25%, #06b6d4 50%, #8b5cf6 75%, #f59e0b 100%);
  border-radius: 999px;
  box-shadow: 0 0 16px rgba(20, 184, 166, 0.4);
}
@media (max-width: 768px) {
  .roadmap-track-line {
    left: 24px;
  }
}

.roadmap-milestone-item {
  position: relative;
  display: flex;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.roadmap-milestone-pin {
  position: relative;
  flex-shrink: 0;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #0f1522;
  border: 3px solid var(--teal);
  box-shadow: 0 0 20px rgba(20, 184, 166, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  z-index: 2;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.roadmap-milestone-item:hover .roadmap-milestone-pin {
  transform: scale(1.08);
  box-shadow: 0 0 30px rgba(20, 184, 166, 0.7);
}
.roadmap-milestone-item.is-target .roadmap-milestone-pin {
  border-color: #f59e0b;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.6);
  animation: targetPulse 2s infinite alternate;
}
@keyframes targetPulse {
  0% { transform: scale(1); box-shadow: 0 0 15px rgba(245, 158, 11, 0.5); }
  100% { transform: scale(1.06); box-shadow: 0 0 32px rgba(245, 158, 11, 0.9); }
}

.roadmap-milestone-card {
  flex: 1;
  background: rgba(15, 21, 32, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.roadmap-milestone-card:hover {
  transform: translateY(-3px);
  border-color: rgba(20, 184, 166, 0.35);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6), 0 0 25px rgba(20, 184, 166, 0.15);
}
.roadmap-milestone-card.card-target-b2 {
  border: 2px solid rgba(245, 158, 11, 0.4);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, rgba(20, 184, 166, 0.04) 50%, rgba(15, 21, 32, 0.95) 100%);
}

@media (max-width: 768px) {
  .roadmap-milestone-item {
    flex-direction: column;
    gap: 1rem;
  }
  .roadmap-milestone-pin {
    width: 52px;
    height: 52px;
    font-size: 1.2rem;
  }
}

.playing-audio {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.3), rgba(6, 182, 212, 0.3)) !important;
  border-color: var(--teal) !important;
  color: #2dd4bf !important;
  box-shadow: 0 0 20px rgba(20, 184, 166, 0.5) !important;
  animation: audioPulseWave 1s infinite alternate !important;
}
.playing-audio .icon-speaker {
  animation: speakerBounce 0.4s infinite alternate;
}
@keyframes audioPulseWave {
  0% { transform: scale(1); box-shadow: 0 0 12px rgba(20, 184, 166, 0.3); }
  100% { transform: scale(1.05); box-shadow: 0 0 24px rgba(20, 184, 166, 0.65); }
}
@keyframes speakerBounce {
  from { transform: translateX(0); }
  to { transform: translateX(2px) scale(1.1); }
}

/* ==========================================================================
   CARTOONCODERS BENTO DESIGN SYSTEM & TEF/TCF HUB STYLES
   ========================================================================== */

/* Bento Cards with 1px Neon Border Glow */
.bento-card-glow {
  background: rgba(16, 22, 34, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.75rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

/* TEF & TCF Canada Interactive & Bento Enhancements */
.hero-stats-bento {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.85rem;
  margin-top: 1.5rem;
}
.hero-stat-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-line);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.hero-stat-box:hover {
  transform: translateY(-3px);
  border-color: rgba(20, 184, 166, 0.4);
}
.hero-stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.hero-stat-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
}

/* Quick Compare Profile Cards — Anti-Merge Distinct Card Architecture */
.compare-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.25rem;
  margin-top: 1.5rem;
  position: relative;
}

@keyframes compareCardEnterLeft {
  from { opacity: 0; transform: translateX(-18px) translateY(12px); }
  to { opacity: 1; transform: translateX(0) translateY(0); }
}
@keyframes compareCardEnterRight {
  from { opacity: 0; transform: translateX(18px) translateY(12px); }
  to { opacity: 1; transform: translateX(0) translateY(0); }
}

.compare-profile-card {
  background: var(--surface, #131927);
  border: 1.5px solid var(--border-line);
  border-radius: 22px;
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.compare-profile-card:hover {
  transform: translateY(-8px) scale(1.015);
}

/* Card TEF: Royal Blue Identity */
.compare-profile-card.card-tef {
  background: linear-gradient(165deg, rgba(30, 58, 138, 0.18) 0%, rgba(15, 23, 42, 0.95) 70%);
  border: 1.5px solid rgba(59, 130, 246, 0.4);
  border-top: 5px solid #3b82f6;
  animation: compareCardEnterLeft 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.compare-profile-card.card-tef:hover {
  border-color: rgba(59, 130, 246, 0.7);
  box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.65), 0 0 35px rgba(59, 130, 246, 0.3);
}

/* Card TCF: Canada Emerald Identity */
.compare-profile-card.card-tcf {
  background: linear-gradient(165deg, rgba(13, 148, 136, 0.18) 0%, rgba(15, 23, 42, 0.95) 70%);
  border: 1.5px solid rgba(20, 184, 166, 0.4);
  border-top: 5px solid #14b8a6;
  animation: compareCardEnterRight 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}
.compare-profile-card.card-tcf:hover {
  border-color: rgba(20, 184, 166, 0.7);
  box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.65), 0 0 35px rgba(20, 184, 166, 0.3);
}

/* Light Theme: 100% Crisp Separation & No Merging */
[data-theme="light"] .compare-profile-card.card-tef {
  background: linear-gradient(165deg, #eff6ff 0%, #ffffff 85%) !important;
  border: 2px solid #93c5fd !important;
  border-top: 5px solid #2563eb !important;
  box-shadow: 0 14px 35px -8px rgba(37, 99, 235, 0.18), 0 0 0 1px rgba(59, 130, 246, 0.1) !important;
}
[data-theme="light"] .compare-profile-card.card-tef:hover {
  box-shadow: 0 24px 50px -10px rgba(37, 99, 235, 0.28), 0 0 25px rgba(59, 130, 246, 0.2) !important;
  border-color: #3b82f6 !important;
}

[data-theme="light"] .compare-profile-card.card-tcf {
  background: linear-gradient(165deg, #f0fdfa 0%, #ffffff 85%) !important;
  border: 2px solid #99f6e4 !important;
  border-top: 5px solid #0d9488 !important;
  box-shadow: 0 14px 35px -8px rgba(13, 148, 136, 0.18), 0 0 0 1px rgba(20, 184, 166, 0.1) !important;
}
[data-theme="light"] .compare-profile-card.card-tcf:hover {
  box-shadow: 0 24px 50px -10px rgba(13, 148, 136, 0.28), 0 0 25px rgba(20, 184, 166, 0.2) !important;
  border-color: #14b8a6 !important;
}

/* Center VS Badge */
.compare-vs-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #14b8a6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  box-shadow: 0 0 25px rgba(20, 184, 166, 0.5), 0 4px 15px rgba(0,0,0,0.35);
  border: 3px solid var(--surface, #131927);
  z-index: 10;
  pointer-events: none;
}
[data-theme="light"] .compare-vs-badge {
  border-color: #ffffff;
  box-shadow: 0 0 20px rgba(20, 184, 166, 0.35), 0 4px 12px rgba(15, 23, 42, 0.12);
}
@media (max-width: 768px) {
  .compare-vs-badge {
    position: static;
    transform: none;
    margin: -0.75rem auto;
  }
}

/* Module Spec Pills & Grids */
.module-spec-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.85rem 0 1.15rem;
}
.module-pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.28rem 0.65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-line);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Strategy & Tips Box */
.pro-tip-box {
  background: rgba(245, 158, 11, 0.07);
  border-left: 3px solid #f59e0b;
  border-radius: 0 10px 10px 0;
  padding: 0.75rem 1rem;
  font-size: 0.86rem;
  color: var(--ink);
  margin-top: 1.15rem;
  line-height: 1.5;
}

/* Exam Module Items (4 Skill Cards) Animation & Hover */
.exam-module-item {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.exam-module-item:hover {
  transform: translateY(-7px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 25px rgba(20, 184, 166, 0.2);
}
[data-theme="light"] .exam-module-item:hover {
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.12), 0 0 20px rgba(20, 184, 166, 0.12) !important;
}

/* Golden CLB 7 Target Banner */
.golden-clb-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(20, 184, 166, 0.08) 100%);
  border: 2px solid rgba(245, 158, 11, 0.35);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.1);
}

/* Light Mode Overrides for TEF/TCF */
[data-theme="light"] .bento-card-glow {
  background: #ffffff !important;
  border-color: rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
}
[data-theme="light"] .hero-bento-card {
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%) !important;
  border-color: rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
}
[data-theme="light"] .compare-profile-card:not(.card-tef):not(.card-tcf) {
  background: #ffffff !important;
  border-color: rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
}
[data-theme="light"] .crs-comparison-box {
  background: #ffffff !important;
  border-color: rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04) !important;
}
[data-theme="light"] .hero-stat-box {
  background: #ffffff !important;
  border-color: rgba(226, 232, 240, 0.9) !important;
}
[data-theme="light"] .module-pill {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #475569 !important;
}
[data-theme="light"] .exam-matrix-table {
  background: #ffffff !important;
}
[data-theme="light"] .exam-matrix-table th {
  background: #f8fafc !important;
  color: #0f766e !important;
  border-bottom-color: #e2e8f0 !important;
}
[data-theme="light"] .exam-matrix-table td {
  color: #1e293b !important;
  border-bottom-color: #f1f5f9 !important;
}
[data-theme="light"] .exam-matrix-table tr:hover td {
  background: #f8fafc !important;
}
[data-theme="light"] .golden-clb-banner {
  background: linear-gradient(135deg, #fffbeb 0%, #f0fdfa 100%) !important;
  border-color: #fde68a !important;
}
[data-theme="light"] .pro-tip-box {
  background: #fffbeb !important;
  color: #92400e !important;
}

.bento-card-glow:hover {
  transform: translateY(-3px);
  border-color: rgba(20, 184, 166, 0.35);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.6), 0 0 24px rgba(20, 184, 166, 0.12);
}
.bento-card-accent {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(6, 182, 212, 0.04));
  border-color: rgba(20, 184, 166, 0.3);
}

/* 3D Mascot Hero Card */
.hero-bento-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  background: radial-gradient(circle at 85% 20%, rgba(20, 184, 166, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 15% 85%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
              rgba(15, 21, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
}
@media (max-width: 960px) {
  .hero-bento-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 1.75rem;
  }
}
.hero-mascot-frame {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-mascot-img {
  width: 100%;
  max-width: 440px;
  border-radius: 20px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 32px rgba(20, 184, 166, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: floatIllustration 6s ease-in-out infinite alternate;
}
@keyframes floatIllustration {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

/* Interactive Pill Tab Switcher */
.tab-pill-bar {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-line);
  padding: 0.35rem;
  border-radius: 999px;
  gap: 0.35rem;
}
.tab-pill-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.tab-pill-btn:hover {
  color: #fff;
}
.tab-pill-btn.active {
  background: linear-gradient(135deg, var(--teal), #0d9488);
  color: #0b0f17;
  box-shadow: 0 0 16px rgba(20, 184, 166, 0.4);
}

/* Exam Matrix Table */
.exam-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--border-line);
}
.exam-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
  background: rgba(15, 21, 32, 0.7);
}
.exam-matrix-table th {
  background: rgba(255, 255, 255, 0.05);
  color: var(--teal);
  font-weight: 700;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-line);
  white-space: nowrap;
}
.exam-matrix-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  vertical-align: top;
}
.exam-matrix-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* CLB Badges */
.badge-clb {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
}
.clb-gold { background: rgba(245, 158, 11, 0.2); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.4); }
.clb-teal { background: rgba(20, 184, 166, 0.2); color: #2dd4bf; border: 1px solid rgba(20, 184, 166, 0.4); }
.clb-purple { background: rgba(139, 92, 246, 0.2); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.4); }

/* Cutoff Comparison Widget */
.crs-comparison-box {
  background: rgba(11, 15, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.5rem;
}
.crs-bar-track {
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  margin: 0.5rem 0 0.8rem;
}
.crs-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 1s ease-out;
}
.bar-general { background: linear-gradient(90deg, #ef4444, #f97316); }
.bar-francophone { background: linear-gradient(90deg, var(--teal), var(--cyan)); }

/* CartoonCoders Accordion FAQs */
.faq-accordion-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(16, 22, 34, 0.6);
  margin-bottom: 0.85rem;
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-accordion-item[open] {
  border-color: rgba(20, 184, 166, 0.4);
  background: rgba(16, 22, 34, 0.85);
}
.faq-summary {
  padding: 1.1rem 1.4rem;
  font-weight: 700;
  font-size: 1.02rem;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
}
.faq-summary::-webkit-details-marker { display: none; }
.faq-summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--teal);
  transition: transform 0.2s ease;
}
.faq-accordion-item[open] .faq-summary::after {
  content: '−';
}
.faq-content {
  padding: 0 1.4rem 1.25rem;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.7;
}

/* ==========================================================================
   INTERACTIVE REAL-TIME CRS SCORE CALCULATOR
   ========================================================================== */
.crs-calculator-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 2.25rem;
  align-items: start;
  margin-top: 2rem;
}
@media (max-width: 992px) {
  .crs-calculator-layout {
    grid-template-columns: 1fr;
  }
}

/* Accordion Step Cards */
.crs-step-card {
  background: rgba(16, 22, 34, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  margin-bottom: 1.15rem;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.crs-step-card:hover {
  border-color: rgba(20, 184, 166, 0.3);
}
.crs-step-card.is-open {
  border-color: rgba(20, 184, 166, 0.4);
}
.crs-step-header {
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.15s;
}
.crs-step-header:hover {
  background: rgba(255, 255, 255, 0.04);
}
.crs-step-header h3 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.crs-step-sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}
.crs-caret-icon {
  font-size: 0.85rem;
  color: var(--teal);
  transition: transform 0.25s ease;
}
.crs-step-card.is-open .crs-caret-icon {
  transform: rotate(180deg);
}
.crs-step-body {
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(11, 15, 23, 0.4);
}

/* CRS Form Inputs */
.crs-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 640px) {
  .crs-input-row {
    grid-template-columns: 1fr;
  }
}
.crs-input-group {
  margin-bottom: 1.25rem;
}
.crs-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.45rem;
}
.crs-label small {
  font-weight: 400;
  color: var(--muted);
  display: block;
  margin-top: 2px;
  font-size: 0.76rem;
}
.crs-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background-color: #0f1522;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2314b8a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.crs-select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.25);
}

/* Language Ability Grid */
.crs-abilities-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 0.5rem;
}
@media (max-width: 768px) {
  .crs-abilities-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Sticky Scorecard Column */
.crs-scorecard-sticky {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.crs-total-card {
  background: rgba(16, 22, 34, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 2rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 24px rgba(20, 184, 166, 0.1);
}
.crs-total-card .label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.crs-score-display {
  font-family: var(--font-display);
  font-size: 4.4rem;
  font-weight: 800;
  line-height: 1;
  margin: 0.85rem 0;
  color: #fff;
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
}
.crs-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 0.25rem;
  line-height: 1.2;
}
.status-red {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.status-gold {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.status-green {
  background: rgba(20, 184, 166, 0.18);
  color: #2dd4bf;
  border: 1px solid rgba(20, 184, 166, 0.4);
}

/* Breakdown Card */
.crs-breakdown-card {
  background: rgba(16, 22, 34, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.6rem 1.5rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.crs-breakdown-card h4 {
  font-size: 1.05rem;
  color: #fff;
  margin: 0 0 1.25rem;
}
.crs-progress-row {
  margin-bottom: 1.15rem;
}
.crs-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.86rem;
  font-weight: 600;
  color: #cbd5e1;
}
.crs-progress-header span:last-child {
  color: #fff;
  font-family: var(--font-mono);
}
.crs-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.45rem;
}
.crs-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sub-metrics breakdown grid */
.crs-mini-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 1.25rem;
  padding-top: 1.15rem;
  margin-top: 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
}
.crs-mini-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
}
.crs-mini-item strong {
  color: #fff;
  font-family: var(--font-mono);
}
.crs-mini-item.highlight-french {
  grid-column: span 2;
  background: rgba(20, 184, 166, 0.1);
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  color: var(--teal);
  border: 1px solid rgba(20, 184, 166, 0.25);
}

/* Reset Button */
.btn-reset-crs {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
}
.btn-reset-crs:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

/* Quick Profile Presets */
.crs-presets-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-line);
  border-radius: 12px;
}
.crs-preset-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.crs-preset-btn:hover {
  background: rgba(20, 184, 166, 0.18);
  border-color: var(--teal);
  color: #fff;
}
.crs-preset-btn.active {
  background: rgba(20, 184, 166, 0.25);
  border-color: var(--teal);
  color: #2dd4bf;
  box-shadow: 0 0 12px rgba(20, 184, 166, 0.3);
}
[data-theme="light"] .crs-preset-btn {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.15);
  color: #334155;
}
[data-theme="light"] .crs-preset-btn:hover {
  background: rgba(13, 148, 136, 0.08);
  border-color: var(--teal);
  color: var(--teal);
}
[data-theme="light"] .crs-preset-btn.active {
  background: #0d9488 !important;
  border-color: #0d9488 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25) !important;
}

/* ==========================================================================
   INTERACTIVE GRAMMAR JOURNEY & LEARNING MAP (Matching Reference UI)
   ========================================================================== */
.grammar-journey-layout {
  display: grid;
  grid-template-columns: 240px 1fr 340px;
  gap: 1.5rem;
  align-items: start;
  margin-top: 1.5rem;
}
@media (max-width: 1280px) {
  .grammar-journey-layout {
    grid-template-columns: 210px 1fr 310px;
    gap: 1.15rem;
  }
}
@media (max-width: 1024px) {
  .grammar-journey-layout {
    grid-template-columns: 1fr;
  }
}

/* Left Sidebar */
.g-sidebar {
  background: rgba(16, 22, 34, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.5rem 1.25rem;
  backdrop-filter: blur(16px);
}
.g-progress-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 1.5rem;
}
.g-progress-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: conic-gradient(var(--teal) var(--g-pct, 0%), rgba(255, 255, 255, 0.1) 0%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.g-progress-ring::before {
  content: '';
  position: absolute;
  inset: 5px;
  background: #0f1522;
  border-radius: 50%;
}
.g-progress-ring span {
  position: relative;
  font-size: 0.76rem;
  font-weight: 800;
  color: #fff;
}
.g-nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.75rem;
}
.g-nav-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  text-align: left;
}
.g-nav-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}
.g-nav-btn.active {
  background: rgba(20, 184, 166, 0.14);
  color: #2dd4bf;
  border-color: rgba(20, 184, 166, 0.3);
}
.g-diagnostic-card {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 14px;
  padding: 1.25rem 1.1rem;
}

/* Center Learning Map Canvas */
.g-canvas {
  background: rgba(16, 22, 34, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.75rem;
  backdrop-filter: blur(16px);
  min-height: 600px;
}
.g-map-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 1rem;
  margin-bottom: 1.75rem;
}

/* Tree Grid & Connected Nodes */
.g-tree-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  margin-bottom: 2rem;
}
.g-tree-header-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(20, 184, 166, 0.05));
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 16px;
  padding: 1.25rem 1.6rem;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.12);
  flex-wrap: wrap;
  gap: 1rem;
}
.g-branch-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  align-items: center;
  background: rgba(15, 21, 32, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
@media (max-width: 860px) {
  .g-branch-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
.g-branch-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
}
.g-branch-card.area-pink::before {
  background: linear-gradient(180deg, #f43f5e, #fb7185);
}
.g-branch-card.area-green::before {
  background: linear-gradient(180deg, #10b981, #34d399);
}
.g-branch-card.area-blue::before {
  background: linear-gradient(180deg, #06b6d4, #38bdf8);
}
.g-branch-card.area-purple::before {
  background: linear-gradient(180deg, #8b5cf6, #c084fc);
}
.g-branch-card.area-gold::before {
  background: linear-gradient(180deg, #f59e0b, #fbbf24);
}
.g-branch-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(18, 25, 38, 0.85);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.g-branch-card.is-active-card {
  border-color: rgba(20, 184, 166, 0.4);
  background: rgba(20, 184, 166, 0.05);
  box-shadow: 0 0 25px rgba(20, 184, 166, 0.15);
}

.g-area-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  cursor: pointer;
}
.g-area-badge-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.g-area-icon-pill {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.area-pink .g-area-icon-pill {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
}
.area-green .g-area-icon-pill {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.area-blue .g-area-icon-pill {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
}
.area-purple .g-area-icon-pill {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
}
.area-gold .g-area-icon-pill {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Lesson Pills along branches */
.g-pill-stream {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  flex-grow: 1;
}
.g-pill-node {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  font-weight: 600;
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.g-pill-node:hover {
  background: rgba(20, 184, 166, 0.18);
  border-color: var(--teal);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(20, 184, 166, 0.3);
}
.g-pill-node.is-active {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.25), rgba(6, 182, 212, 0.15));
  border-color: var(--teal);
  color: #2dd4bf;
  box-shadow: 0 0 16px rgba(20, 184, 166, 0.4);
}
.g-pill-node.is-done {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}

/* ==========================================================================
   EXPLORE GRID CARDS (Attractive Bento Cards)
   ========================================================================== */
.grammar-grid-bento {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}
.grammar-bento-card {
  background: rgba(15, 21, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.6rem 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(14px);
}
.grammar-bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}
.grammar-bento-card.card-tenses::before {
  background: linear-gradient(90deg, #f43f5e, #fb7185);
}
.grammar-bento-card.card-verbs::before {
  background: linear-gradient(90deg, #10b981, #34d399);
}
.grammar-bento-card.card-parts_of_speech::before {
  background: linear-gradient(90deg, #06b6d4, #38bdf8);
}
.grammar-bento-card.card-structure::before {
  background: linear-gradient(90deg, #8b5cf6, #c084fc);
}
.grammar-bento-card.card-practice::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.grammar-bento-card:hover {
  transform: translateY(-4px);
  border-color: rgba(20, 184, 166, 0.4);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 25px rgba(20, 184, 166, 0.2);
  background: rgba(18, 25, 38, 0.95);
}
.grammar-bento-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: #fff;
  margin: 0.65rem 0 0.45rem;
  line-height: 1.35;
}
.grammar-bento-desc {
  font-size: 0.86rem;
  color: #94a3b8;
  line-height: 1.55;
  margin-bottom: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.grammar-bento-rule-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 1.1rem;
}
.grammar-bento-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.85rem;
  font-size: 0.8rem;
}

/* Right Inspector Panel */
.g-inspector {
  background: rgba(16, 22, 34, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.6rem 1.4rem;
  position: sticky;
  top: 84px;
  backdrop-filter: blur(20px);
}
.btn-start-next {
  width: 100%;
  background: #059669;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.4);
}
.btn-start-next:hover {
  background: #10b981;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

/* Modal Lesson Reader */
.lesson-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.lesson-modal-overlay.open {
  display: flex;
}
.lesson-modal-card {
  background: #0f1522;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  max-width: 840px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.25rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(20, 184, 166, 0.2);
  position: relative;
}
.lesson-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  font-size: 1.1rem;
}

/* ==========================================================================
   DETAILED ORGANIZED GRAMMAR GRID CARDS (Direct Rich Card Layout)
   ========================================================================== */
/* ==========================================================================
   ORGANIZED & PROFESSIONAL CEFR GRAMMAR STUDIO (A0 -> C2)
   Executive Student-Friendly Curriculum Architecture
   ========================================================================== */

/* 1. Student Mastery & Telemetry Cockpit */
.grammar-student-cockpit {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.08) 0%, rgba(15, 21, 32, 0.95) 100%);
  border: 1px solid rgba(20, 184, 166, 0.25);
  border-radius: 18px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
}
.cockpit-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.15rem;
}
.cockpit-progress-box {
  flex: 1;
  min-width: 260px;
}
.cockpit-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 0.45rem;
}
.cockpit-progress-track {
  width: 100%;
  height: 9px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.cockpit-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #06b6d4, #8b5cf6);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.45);
}

.cockpit-controls {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.cockpit-stats-strip {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.cockpit-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.cockpit-stat-item strong {
  color: #fff;
}

/* 2. Sticky Chapter Stepper / Roadmap Jump Bar */
.grammar-roadmap-stepper {
  position: sticky;
  top: 72px;
  z-index: 30;
  background: rgba(11, 17, 29, 0.88);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.5rem 0.65rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.grammar-roadmap-stepper::-webkit-scrollbar {
  display: none;
}
.stepper-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  padding: 0.4rem 0.85rem;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  font-family: inherit;
  text-decoration: none;
}
.stepper-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}
.stepper-btn.active {
  background: rgba(20, 184, 166, 0.18);
  color: #2dd4bf;
  border-color: rgba(20, 184, 166, 0.4);
  box-shadow: 0 2px 10px rgba(20, 184, 166, 0.2);
}

/* 3. Chapter Milestone Banner */
.grammar-chapter-section {
  margin-bottom: 3.5rem;
  scroll-margin-top: 130px;
}
.grammar-chapter-banner {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(20, 184, 166, 0.04) 50%, rgba(15, 21, 32, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 5px solid var(--ch-accent, var(--teal));
  border-radius: 16px;
  padding: 1.35rem 1.65rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}
.grammar-chapter-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--ch-accent, var(--teal)), transparent 80%);
}
.ch-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.15);
  color: #2dd4bf;
  border: 1px solid rgba(20, 184, 166, 0.3);
  margin-bottom: 0.35rem;
}
.ch-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.25rem;
}
.ch-desc {
  font-size: 0.86rem;
  color: #94a3b8;
  margin: 0;
  max-width: 680px;
  line-height: 1.5;
}
.ch-counter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #cbd5e1;
}

/* 4. Balanced 2-Column Bento Grid */
.grammar-detailed-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.65rem;
  width: 100%;
}
.grammar-detailed-grid.grid-single-col {
  grid-template-columns: 1fr;
  max-width: 1100px;
  margin-inline: auto;
}
@media (max-width: 1024px) {
  .grammar-detailed-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* 5. Executive Student Bento Card */
.grammar-detailed-card {
  background: linear-gradient(165deg, rgba(17, 24, 39, 0.94) 0%, rgba(12, 17, 29, 0.97) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid var(--area-accent, var(--teal));
  border-radius: 18px;
  padding: 1.65rem 1.85rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(16px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  animation: grammarCardRise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--card-index, 0) * 0.03s);
}
@media (max-width: 768px) {
  .grammar-detailed-card {
    padding: 1.35rem 1.15rem;
    border-radius: 16px;
  }
}
.grammar-detailed-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5), 0 0 28px var(--area-glow, rgba(20, 184, 166, 0.2));
  border-color: rgba(255, 255, 255, 0.2);
}
.grammar-detailed-card.is-mastered {
  border-left-color: #10b981;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 20px rgba(16, 185, 129, 0.15);
}

.grammar-detailed-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--area-accent, var(--teal)), transparent 75%);
}
.grammar-detailed-card::after {
  content: '';
  position: absolute;
  top: -45px;
  right: -45px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--area-glow, rgba(20, 184, 166, 0.15)) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.45;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.grammar-detailed-card:hover::after {
  opacity: 0.9;
  transform: scale(1.2);
}

.grammar-detailed-card.card-wide {
  grid-column: 1 / -1;
}

/* Area-specific accents */
.grammar-detailed-card.card-tenses {
  --area-accent: #f43f5e;
  --area-glow: rgba(244, 63, 94, 0.22);
}
.grammar-detailed-card.card-verbs {
  --area-accent: #10b981;
  --area-glow: rgba(16, 185, 129, 0.22);
}
.grammar-detailed-card.card-parts_of_speech {
  --area-accent: #06b6d4;
  --area-glow: rgba(6, 182, 212, 0.22);
}
.grammar-detailed-card.card-structure {
  --area-accent: #8b5cf6;
  --area-glow: rgba(139, 92, 246, 0.22);
}
.grammar-detailed-card.card-practice {
  --area-accent: #f59e0b;
  --area-glow: rgba(245, 158, 11, 0.22);
}

/* Card Header & Controls */
.g-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.g-unit-pill {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  padding: 0.22rem 0.6rem;
  border-radius: 6px;
  font-family: var(--font-mono);
}
.g-master-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
  font-family: inherit;
}
.g-master-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}
.g-master-btn.is-active {
  background: rgba(16, 185, 129, 0.18);
  border-color: #10b981;
  color: #34d399;
  font-weight: 800;
}

/* Card Titles */
.g-title-block {
  margin-bottom: 0.85rem;
}
.g-card-title {
  font-size: clamp(1.22rem, 2.2vw, 1.42rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
}
.g-sub-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.g-en-subtitle {
  font-size: 0.8rem;
  font-weight: 600;
  color: #2dd4bf;
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.25);
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
}
.g-read-time {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Clear Student Explanation */
.g-card-explanation {
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.65;
  margin-bottom: 1.15rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-left: 3px solid var(--area-accent, var(--teal));
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
}

/* 6. Cheatsheet Formula & Conjugations Box */
.g-cheatsheet-box {
  background: rgba(8, 12, 20, 0.75);
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: 12px;
  padding: 0.95rem 1.15rem;
  margin-bottom: 1.15rem;
}
.g-cheatsheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.55rem;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.g-cheatsheet-content {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #e2e8f0;
  white-space: pre-wrap;
  line-height: 1.6;
  margin: 0;
}

/* 7. Real-Life Examples Stack */
.g-examples-wrap {
  margin-bottom: 1.15rem;
}
.g-examples-heading {
  font-size: 0.78rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.g-examples-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.grammar-detailed-card.card-wide .g-examples-grid,
.grammar-detailed-grid.grid-single-col .g-examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.g-example-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 11px;
  padding: 0.75rem 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  transition: all 0.2s ease;
}
.g-example-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(3px);
}
.g-example-text-fr {
  font-weight: 700;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.35;
  margin-bottom: 0.2rem;
}
.g-pronunciation-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(20, 184, 166, 0.12);
  color: #2dd4bf;
  border: 1px solid rgba(20, 184, 166, 0.25);
  border-radius: 5px;
  padding: 0.12rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  margin-bottom: 0.2rem;
}
.g-example-text-en {
  font-size: 0.84rem;
  color: #94a3b8;
}

/* 8. TEF / TCF Traps Card */
.g-trap-container {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.22);
  border-radius: 12px;
  padding: 0.85rem 1.05rem;
  margin-bottom: 1.15rem;
  font-size: 0.84rem;
}
.g-trap-title {
  font-size: 0.74rem;
  font-weight: 800;
  color: #f87171;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* 9. Interactive Practice Quiz */
.g-quiz-container {
  background: rgba(20, 184, 166, 0.05);
  border: 1px solid rgba(20, 184, 166, 0.2);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  margin-top: 0.65rem;
}
.g-quiz-title {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.g-quiz-q {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}
.g-quiz-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}
.grammar-detailed-card.card-wide .g-quiz-options,
.grammar-detailed-grid.grid-single-col .g-quiz-options {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.g-quiz-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.g-quiz-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}
.g-quiz-btn.is-correct {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
  font-weight: 700;
}
.g-quiz-btn.is-wrong {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #ef4444 !important;
  color: #f87171 !important;
}

/* Light Theme High-Contrast Overrides */
[data-theme="light"] .grammar-student-cockpit {
  background: #ffffff;
  border-color: rgba(13, 148, 136, 0.25);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .cockpit-progress-header {
  color: #1e293b;
}
[data-theme="light"] .cockpit-progress-track {
  background: #e2e8f0;
}
[data-theme="light"] .cockpit-stat-item {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}
[data-theme="light"] .cockpit-stat-item strong {
  color: #0f172a;
}
[data-theme="light"] .grammar-roadmap-stepper {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .stepper-btn {
  color: #64748b;
}
[data-theme="light"] .stepper-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}
[data-theme="light"] .stepper-btn.active {
  background: rgba(13, 148, 136, 0.12);
  color: #0d9488;
  border-color: rgba(13, 148, 136, 0.35);
}
[data-theme="light"] .grammar-chapter-banner {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .ch-title {
  color: #0f172a;
}
[data-theme="light"] .ch-desc {
  color: #475569;
}
[data-theme="light"] .ch-counter-pill {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}
[data-theme="light"] .grammar-detailed-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .grammar-detailed-card:hover {
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.08), 0 0 20px var(--area-glow, rgba(20, 184, 166, 0.12));
  border-color: rgba(15, 23, 42, 0.2);
}
[data-theme="light"] .g-unit-pill {
  background: #f1f5f9;
  color: #334155;
}
[data-theme="light"] .g-master-btn {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #475569;
}
[data-theme="light"] .g-master-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}
[data-theme="light"] .g-card-title {
  color: #0f172a;
}
[data-theme="light"] .g-read-time {
  color: #64748b;
}
[data-theme="light"] .g-card-explanation {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
  color: #334155;
}
[data-theme="light"] .g-cheatsheet-box {
  background: #0f172a;
}
[data-theme="light"] .g-example-card {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}
[data-theme="light"] .g-example-card:hover {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.16);
}
[data-theme="light"] .g-example-text-fr {
  color: #0f172a;
}
[data-theme="light"] .g-example-text-en {
  color: #64748b;
}
[data-theme="light"] .g-trap-container {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.2);
}
[data-theme="light"] .g-quiz-container {
  background: rgba(20, 184, 166, 0.04);
  border-color: rgba(20, 184, 166, 0.2);
}
[data-theme="light"] .g-quiz-q {
  color: #0f172a;
}
[data-theme="light"] .g-quiz-btn {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  color: #334155;
}
[data-theme="light"] .g-quiz-btn:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.25);
}
.g-quiz-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.g-quiz-q {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}
.g-quiz-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.6rem;
}
.g-quiz-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  font-size: 0.86rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.g-quiz-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}
.g-quiz-btn.is-correct {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
}
.g-quiz-btn.is-wrong {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #ef4444 !important;
  color: #f87171 !important;
}

/* Master Syllabus & Grammar Studio Data Tables */
.hud-table-wrap {
  overflow-x: auto;
  margin: 1.15rem 0 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 10, 17, 0.65);
}
[data-theme="light"] .hud-table-wrap {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
}
.hud-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  text-align: left;
}
.hud-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--teal);
  padding: 0.7rem 0.95rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
[data-theme="light"] .hud-table th {
  background: #f8fafc;
  border-bottom-color: rgba(15, 23, 42, 0.1);
  color: var(--teal);
}
.hud-table td {
  padding: 0.65rem 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}
[data-theme="light"] .hud-table td {
  border-bottom-color: rgba(15, 23, 42, 0.06);
  color: #334155;
}
.hud-table tr:hover td {
  background: rgba(45, 212, 191, 0.04);
  color: #fff;
}
[data-theme="light"] .hud-table tr:hover td {
  background: rgba(13, 148, 136, 0.05);
  color: #0f172a;
}

/* Grammar Studio Milestone Card */
.grammar-milestone-card {
  grid-column: 1 / -1;
  margin: 1rem 0 1.5rem;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.12) 0%, rgba(99, 102, 241, 0.08) 50%, rgba(15, 21, 32, 0.95) 100%);
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 20px;
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
}
[data-theme="light"] .grammar-milestone-card {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(99, 102, 241, 0.06), #ffffff);
  border-color: rgba(13, 148, 136, 0.3);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   Cartoon French — Theme-Aligned Auth System (Login & Registration)
   Integrated with Cartoon French Dark & Light Design System Tokens
   ========================================================================== */
.auth-modern-section {
  min-height: calc(100vh - 100px);
  padding: 4rem 1.5rem 6rem;
  background-color: var(--bg-dark, #0b0f17);
  background-image: 
    radial-gradient(circle at 12% 20%, rgba(20, 184, 166, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 88% 75%, rgba(139, 92, 246, 0.14) 0%, transparent 45%),
    linear-gradient(to right, rgba(20, 184, 166, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(20, 184, 166, 0.06) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 44px 44px, 44px 44px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

[data-theme="light"] .auth-modern-section {
  background-color: #f8fafc;
  background-image: 
    radial-gradient(circle at 12% 20%, rgba(13, 148, 136, 0.09) 0%, transparent 40%),
    radial-gradient(circle at 88% 75%, rgba(124, 58, 237, 0.08) 0%, transparent 45%),
    linear-gradient(to right, rgba(13, 148, 136, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(13, 148, 136, 0.06) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 44px 44px, 44px 44px;
}

.auth-modern-container {
  max-width: 1220px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.auth-modern-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

@media (max-width: 980px) {
  .auth-modern-grid {
    grid-template-columns: 1fr;
    gap: 2.75rem;
  }
}

/* Monospace Kicker */
.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teal, #14b8a6);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.3);
  padding: 0.28rem 0.85rem;
  border-radius: 999px;
  width: fit-content;
}

[data-theme="light"] .auth-kicker {
  color: #0d9488;
  background: rgba(13, 148, 136, 0.1);
  border-color: rgba(13, 148, 136, 0.3);
}

/* Left Showcase Pane */
.auth-features-pane {
  display: flex;
  flex-direction: column;
}

.auth-main-headline {
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.16;
  color: var(--ink, #f8fafc);
  letter-spacing: -0.025em;
  margin: 0.5rem 0 1.75rem;
  max-width: 520px;
}

[data-theme="light"] .auth-main-headline {
  color: #0f172a;
}

.auth-gradient-text {
  background: linear-gradient(90deg, #2dd4bf, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Dynamic Slide Header Info */
.auth-slide-header {
  margin-bottom: 1.25rem;
  min-height: 76px;
}

.auth-slide-step {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  color: #2dd4bf;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

[data-theme="light"] .auth-slide-step {
  color: #0d9488;
}

.auth-slide-heading {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink, #f8fafc);
  margin: 0 0 0.35rem;
  line-height: 1.28;
  letter-spacing: -0.015em;
}

[data-theme="light"] .auth-slide-heading {
  color: #0f172a;
}

.auth-slide-desc {
  font-size: 0.94rem;
  color: var(--muted, #94a3b8);
  margin: 0;
  line-height: 1.55;
  max-width: 480px;
}

[data-theme="light"] .auth-slide-desc {
  color: #475569;
}

/* Tablet Device Frame */
.auth-tablet-shell {
  background: #0d121d;
  border-radius: 28px;
  padding: 14px;
  box-shadow: 
    0 25px 65px -15px rgba(0, 0, 0, 0.85),
    0 0 35px rgba(20, 184, 166, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(20, 184, 166, 0.35);
  position: relative;
  width: 100%;
  max-width: 560px;
  box-sizing: border-box;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-tablet-shell:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 30px 75px -15px rgba(0, 0, 0, 0.9),
    0 0 45px rgba(20, 184, 166, 0.28);
}

[data-theme="light"] .auth-tablet-shell {
  background: #1e293b;
  border-color: rgba(13, 148, 136, 0.35);
  box-shadow: 0 20px 50px -10px rgba(15, 23, 42, 0.2), 0 0 25px rgba(13, 148, 136, 0.15);
}

.auth-tablet-camera {
  width: 7px;
  height: 7px;
  background: #2dd4bf;
  border-radius: 50%;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 8px rgba(45, 212, 191, 0.6);
}

.auth-tablet-screen {
  background: linear-gradient(180deg, #131927 0%, #0d121d 100%);
  border-radius: 18px;
  padding: 1.25rem 1.4rem;
  min-height: 330px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  box-sizing: border-box;
}

[data-theme="light"] .auth-tablet-screen {
  background: #ffffff;
  border-color: rgba(13, 148, 136, 0.2);
  color: #0f172a;
}

/* Slides Transition Handling */
.auth-tablet-slide {
  display: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  width: 100%;
}

.auth-tablet-slide.active {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 1;
  transform: translateY(0);
  height: 100%;
  min-height: 295px;
}

/* Top bar inside tablet */
.tablet-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #94a3b8;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
  margin-bottom: 0.85rem;
}

[data-theme="light"] .tablet-topbar {
  color: #64748b;
  border-bottom-color: rgba(15, 23, 42, 0.12);
}

.tablet-badge-green {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(20, 184, 166, 0.18);
  color: #2dd4bf;
  border: 1px solid rgba(45, 212, 191, 0.35);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
}

[data-theme="light"] .tablet-badge-green {
  background: rgba(13, 148, 136, 0.12);
  color: #0d9488;
  border-color: rgba(13, 148, 136, 0.25);
}

/* Tablet Slide 1: Flashcards */
.srs-substrip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: #94a3b8;
  font-family: 'IBM Plex Mono', monospace;
  margin-bottom: 0.85rem;
}

[data-theme="light"] .srs-substrip {
  color: #64748b;
}

.srs-card-box {
  background: #182234;
  border: 1.5px solid rgba(45, 212, 191, 0.3);
  border-radius: 14px;
  padding: 1.25rem 1.15rem;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 15px rgba(20, 184, 166, 0.1);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 1rem;
}

.srs-card-box:hover {
  transform: translateY(-2px);
  border-color: #2dd4bf;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 25px rgba(45, 212, 191, 0.2);
}

[data-theme="light"] .srs-card-box {
  background: #f8fafc;
  border-color: rgba(13, 148, 136, 0.35);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.srs-card-lang {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: #2dd4bf;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

[data-theme="light"] .srs-card-lang {
  color: #0d9488;
}

.srs-card-word {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}

[data-theme="light"] .srs-card-word {
  color: #0f172a;
}

.srs-card-phonetic {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

[data-theme="light"] .srs-card-phonetic {
  color: #64748b;
}

.srs-revealed-trans {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px dashed rgba(45, 212, 191, 0.3);
  font-size: 0.85rem;
  font-weight: 600;
  color: #2dd4bf;
}

[data-theme="light"] .srs-revealed-trans {
  border-top-color: rgba(13, 148, 136, 0.25);
  color: #0d9488;
}

.srs-rating-row {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.srs-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.srs-btn:hover {
  background: rgba(20, 184, 166, 0.2);
  border-color: #2dd4bf;
  color: #2dd4bf;
}

[data-theme="light"] .srs-btn {
  background: #ffffff;
  border-color: rgba(13, 148, 136, 0.25);
  color: #334155;
}

[data-theme="light"] .srs-btn:hover {
  background: #0d9488;
  color: #ffffff;
  border-color: #0d9488;
}

.srs-tap-hint {
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

[data-theme="light"] .srs-tap-hint {
  color: #64748b;
}

/* Tablet Slide 2: Listening Practice */
.audio-player-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #182234;
  border: 1px solid rgba(45, 212, 191, 0.25);
  border-radius: 12px;
  padding: 0.65rem 0.95rem;
  margin-bottom: 0.95rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .audio-player-bar {
  background: #f8fafc;
  border-color: rgba(13, 148, 136, 0.25);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.audio-play-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  color: #0b0f17;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(20, 184, 166, 0.45);
}

.audio-waves-wrap {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  flex: 1;
}

.wave-bar {
  width: 3px;
  background: #2dd4bf;
  border-radius: 2px;
  height: 35%;
  animation: wavePulse 1.2s ease-in-out infinite alternate;
}

[data-theme="light"] .wave-bar {
  background: #0d9488;
}

.wave-bar:nth-child(2) { animation-delay: 0.1s; }
.wave-bar:nth-child(3) { animation-delay: 0.25s; }
.wave-bar:nth-child(4) { animation-delay: 0.4s; }
.wave-bar:nth-child(5) { animation-delay: 0.15s; }
.wave-bar:nth-child(6) { animation-delay: 0.35s; }
.wave-bar:nth-child(7) { animation-delay: 0.05s; }
.wave-bar:nth-child(8) { animation-delay: 0.5s; }
.wave-bar:nth-child(9) { animation-delay: 0.2s; }
.wave-bar:nth-child(10) { animation-delay: 0.45s; }
.wave-bar:nth-child(11) { animation-delay: 0.1s; }
.wave-bar:nth-child(12) { animation-delay: 0.3s; }
.wave-bar:nth-child(13) { animation-delay: 0.2s; }
.wave-bar:nth-child(14) { animation-delay: 0.4s; }

@keyframes wavePulse {
  0% { height: 20%; opacity: 0.4; }
  50% { height: 100%; opacity: 1; }
  100% { height: 35%; opacity: 0.6; }
}

.audio-timer {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
}

[data-theme="light"] .audio-timer {
  color: #64748b;
}

.listening-question {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

[data-theme="light"] .listening-question {
  color: #0f172a;
}

.listening-options {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.listening-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  background: #182234;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  font-size: 0.86rem;
  color: #cbd5e1;
  transition: all 0.2s;
  cursor: pointer;
}

[data-theme="light"] .listening-opt {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.1);
  color: #334155;
}

.listening-opt:hover {
  border-color: rgba(45, 212, 191, 0.4);
  background: rgba(20, 184, 166, 0.08);
}

.listening-opt.selected {
  border-color: #2dd4bf;
  background: rgba(20, 184, 166, 0.16);
  color: #2dd4bf;
  font-weight: 700;
  box-shadow: 0 0 15px rgba(20, 184, 166, 0.15);
}

[data-theme="light"] .listening-opt.selected {
  background: rgba(13, 148, 136, 0.12);
  border-color: #0d9488;
  color: #0d9488;
}

/* Tablet Slide 3: AI Translator */
.translator-preview-box {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.trans-card {
  background: #182234;
  border: 1px solid rgba(45, 212, 191, 0.25);
  border-radius: 12px;
  padding: 0.75rem 0.95rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .trans-card {
  background: #f8fafc;
  border-color: rgba(13, 148, 136, 0.25);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.trans-card-header {
  display: flex;
  justify-content: space-between;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

[data-theme="light"] .trans-card-header {
  color: #64748b;
}

.trans-text {
  font-size: 0.92rem;
  color: #f1f5f9;
  line-height: 1.45;
}

[data-theme="light"] .trans-text {
  color: #0f172a;
}

.trans-highlight {
  background: rgba(45, 212, 191, 0.2);
  color: #2dd4bf;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
  border: 1px solid rgba(45, 212, 191, 0.35);
}

[data-theme="light"] .trans-highlight {
  background: rgba(13, 148, 136, 0.15);
  color: #0d9488;
  border-color: rgba(13, 148, 136, 0.3);
}

.trans-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.45rem;
  flex-wrap: wrap;
}

.trans-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .trans-tag {
  background: #e2e8f0;
  color: #475569;
  border-color: transparent;
}

/* Tablet Slide 4: Grammar Engine */
.grammar-breakdown-card {
  background: #182234;
  border: 1px solid rgba(45, 212, 191, 0.25);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .grammar-breakdown-card {
  background: #f8fafc;
  border-color: rgba(13, 148, 136, 0.25);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.grammar-rule-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 0.65rem;
}

[data-theme="light"] .grammar-rule-title {
  color: #0f172a;
}

.grammar-tokens {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.grammar-chip {
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  flex-direction: column;
  line-height: 1.25;
}

.grammar-chip-role {
  font-size: 0.62rem;
  text-transform: uppercase;
  font-family: 'IBM Plex Mono', monospace;
  opacity: 0.85;
}

.chip-blue { 
  background: rgba(59, 130, 246, 0.22); 
  color: #93c5fd; 
  border: 1px solid rgba(59, 130, 246, 0.35); 
}
.chip-purple { 
  background: rgba(139, 92, 246, 0.22); 
  color: #c4b5fd; 
  border: 1px solid rgba(139, 92, 246, 0.35); 
}
.chip-teal { 
  background: rgba(20, 184, 166, 0.25); 
  color: #5eead4; 
  border: 1.5px solid #2dd4bf; 
}
.chip-amber { 
  background: rgba(245, 158, 11, 0.22); 
  color: #fde68a; 
  border: 1px solid rgba(245, 158, 11, 0.35); 
}

[data-theme="light"] .chip-blue { background: #dbeafe; color: #1e40af; border-color: transparent; }
[data-theme="light"] .chip-purple { background: #ede9fe; color: #5b21b6; border-color: transparent; }
[data-theme="light"] .chip-teal { background: #ccfbf1; color: #115e59; border: 1.5px solid #0d9488; }
[data-theme="light"] .chip-amber { background: #fef3c7; color: #92400e; border-color: transparent; }

.grammar-explainer {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.45;
  background: #0b0f17;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 3px solid #14b8a6;
}

[data-theme="light"] .grammar-explainer {
  background: #ffffff;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #0d9488;
}

/* Tablet Slide 5: Vocabulary Bank */
.vocab-showcase-box {
  background: #182234;
  border: 1px solid rgba(45, 212, 191, 0.25);
  border-radius: 14px;
  padding: 1.1rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .vocab-showcase-box {
  background: #f8fafc;
  border-color: rgba(13, 148, 136, 0.25);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.vocab-head-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.vocab-main-word {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
}

[data-theme="light"] .vocab-main-word {
  color: #0f172a;
}

.vocab-gender {
  font-size: 0.8rem;
  color: #2dd4bf;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
}

[data-theme="light"] .vocab-gender {
  color: #0d9488;
}

.vocab-def {
  font-size: 0.95rem;
  font-weight: 600;
  color: #2dd4bf;
  margin-bottom: 0.65rem;
}

[data-theme="light"] .vocab-def {
  color: #0d9488;
}

.vocab-example {
  font-size: 0.85rem;
  font-style: italic;
  color: #cbd5e1;
  line-height: 1.45;
  margin-bottom: 0.65rem;
}

[data-theme="light"] .vocab-example {
  color: #374151;
}

.vocab-collocs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.vocab-pill {
  font-size: 0.72rem;
  background: rgba(20, 184, 166, 0.12);
  color: #2dd4bf;
  border: 1px solid rgba(45, 212, 191, 0.25);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}

[data-theme="light"] .vocab-pill {
  background: rgba(13, 148, 136, 0.1);
  color: #0d9488;
  border-color: rgba(13, 148, 136, 0.2);
}

/* Tablet Slide 6: Simulator / Practice Hub */
.sim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.sim-stat-card {
  background: #182234;
  border: 1px solid rgba(45, 212, 191, 0.25);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .sim-stat-card {
  background: #f8fafc;
  border-color: rgba(13, 148, 136, 0.25);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.sim-stat-label {
  font-size: 0.72rem;
  color: #94a3b8;
  font-family: 'IBM Plex Mono', monospace;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

[data-theme="light"] .sim-stat-label {
  color: #64748b;
}

.sim-stat-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
}

[data-theme="light"] .sim-stat-val {
  color: #0f172a;
}

.sim-crs-bonus {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(139, 92, 246, 0.18));
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #2dd4bf;
}

[data-theme="light"] .sim-crs-bonus {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.12), rgba(124, 58, 237, 0.1));
  border-color: rgba(13, 148, 136, 0.3);
  color: #0d9488;
}

/* Pagination Bar (Pills matching platform theme) */
.auth-pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  max-width: 560px;
}

.auth-pagination-pills {
  display: flex;
  align-items: center;
  gap: 7px;
}

.auth-pill {
  height: 6px;
  width: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .auth-pill {
  background: #cbd5e1;
}

.auth-pill:hover {
  background: rgba(45, 212, 191, 0.5);
}

.auth-pill.active {
  width: 44px;
  background: linear-gradient(90deg, #14b8a6, #2dd4bf);
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.6);
}

.auth-slider-arrows {
  display: flex;
  gap: 6px;
}

.auth-nav-arrow {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #182234;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.auth-nav-arrow:hover {
  background: rgba(20, 184, 166, 0.2);
  color: #2dd4bf;
  border-color: #2dd4bf;
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.35);
}

[data-theme="light"] .auth-nav-arrow {
  background: #ffffff;
  border-color: rgba(13, 148, 136, 0.25);
  color: #475569;
}

[data-theme="light"] .auth-nav-arrow:hover {
  background: #0d9488;
  color: #ffffff;
  border-color: #0d9488;
}

/* ==========================================================================
   Right Column: Bento Glass Brand Auth Card
   ========================================================================= */
.auth-form-pane {
  display: flex;
  flex-direction: column;
}

.auth-form-title {
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.025em;
  margin: 0 0 0.35rem;
}

[data-theme="light"] .auth-form-title {
  color: #0f172a;
}

.auth-form-subtitle {
  font-size: 0.95rem;
  color: #94a3b8;
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

[data-theme="light"] .auth-form-subtitle {
  color: #475569;
}

/* Bento Glass Auth Card with Signature Top Gradient Line */
.auth-clean-card {
  background: linear-gradient(180deg, #131927 0%, #0d121d 100%);
  border: 1px solid rgba(20, 184, 166, 0.35);
  border-radius: 20px;
  padding: 2.25rem 2rem;
  box-shadow: 
    0 25px 60px -15px rgba(0, 0, 0, 0.8),
    0 0 35px -5px rgba(20, 184, 166, 0.22);
  width: 100%;
  max-width: 440px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.auth-clean-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #14b8a6 0%, #2dd4bf 50%, #8b5cf6 100%);
}

[data-theme="light"] .auth-clean-card {
  background: #ffffff;
  border-color: rgba(13, 148, 136, 0.25);
  box-shadow: 0 14px 35px -10px rgba(15, 23, 42, 0.08), 0 0 25px rgba(13, 148, 136, 0.12);
}

/* Google OAuth Button */
.auth-google-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1.25rem;
  background: #182234;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f8fafc;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.auth-google-cta:hover {
  background: #1e293b;
  border-color: rgba(45, 212, 191, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3), 0 0 15px rgba(20, 184, 166, 0.15);
}

[data-theme="light"] .auth-google-cta {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #1e2937;
}

[data-theme="light"] .auth-google-cta:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.auth-google-svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

/* Delicate Divider */
.auth-subtle-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: 'IBM Plex Mono', monospace;
}

.auth-subtle-divider::before,
.auth-subtle-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .auth-subtle-divider {
  color: #64748b;
}

[data-theme="light"] .auth-subtle-divider::before,
[data-theme="light"] .auth-subtle-divider::after {
  border-bottom-color: rgba(15, 23, 42, 0.1);
}

.auth-subtle-divider span {
  padding: 0 0.85rem;
}

/* Clean Input Fields */
.auth-field-row {
  margin-bottom: 1.15rem;
}

.auth-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}

.auth-field-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #e2e8f0;
}

[data-theme="light"] .auth-field-title {
  color: #1f2937;
}

.auth-forgot-link {
  font-size: 0.82rem;
  color: #2dd4bf;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.auth-forgot-link:hover {
  color: #5eead4;
  text-decoration: underline;
}

[data-theme="light"] .auth-forgot-link {
  color: #0d9488;
}

[data-theme="light"] .auth-forgot-link:hover {
  color: #0f766e;
}

.auth-input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-clean-input {
  width: 100%;
  padding: 0.8rem 1rem;
  background: #0b0f17;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  font-size: 0.95rem;
  color: #ffffff;
  font-family: inherit;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.auth-clean-input:focus {
  outline: none;
  border-color: #2dd4bf;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.25);
  background: #0d121d;
}

[data-theme="light"] .auth-clean-input {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #0f172a;
}

[data-theme="light"] .auth-clean-input:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
  background: #ffffff;
}

.auth-clean-input::placeholder {
  color: #64748b;
}

.auth-pwd-icon-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.auth-pwd-icon-btn:hover {
  color: #2dd4bf;
}

[data-theme="light"] .auth-pwd-icon-btn:hover {
  color: #0d9488;
}

/* Brand Primary Action Button (Signature Vibrant Teal) */
.auth-black-btn {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  color: #0b0f17 !important;
  font-size: 0.98rem;
  font-weight: 800;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 25px -4px rgba(20, 184, 166, 0.5);
}

.auth-black-btn:hover {
  background: linear-gradient(135deg, #2dd4bf 0%, #14b8a6 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(20, 184, 166, 0.7);
  color: #0b0f17 !important;
}

[data-theme="light"] .auth-black-btn {
  background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
  color: #ffffff !important;
  box-shadow: 0 8px 25px -4px rgba(13, 148, 136, 0.45);
}

[data-theme="light"] .auth-black-btn:hover {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  box-shadow: 0 12px 30px rgba(13, 148, 136, 0.6);
  color: #ffffff !important;
}

/* Secondary Actions: OTP & Demo */
.auth-secondary-actions {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.auth-otp-link-btn {
  background: rgba(20, 184, 166, 0.06);
  border: 1px dashed rgba(45, 212, 191, 0.35);
  border-radius: 10px;
  padding: 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #2dd4bf;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.auth-otp-link-btn:hover {
  background: rgba(20, 184, 166, 0.16);
  border-color: #2dd4bf;
  color: #5eead4;
  box-shadow: 0 0 15px rgba(20, 184, 166, 0.15);
}

[data-theme="light"] .auth-otp-link-btn {
  background: rgba(13, 148, 136, 0.06);
  border-color: rgba(13, 148, 136, 0.35);
  color: #0d9488;
}

[data-theme="light"] .auth-otp-link-btn:hover {
  background: rgba(13, 148, 136, 0.14);
  border-color: #0d9488;
  color: #0f766e;
}

.auth-quick-demo-tray {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.auth-demo-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(45, 212, 191, 0.25);
  background: rgba(20, 184, 166, 0.1);
  color: #2dd4bf;
  cursor: pointer;
  transition: all 0.15s;
}

.auth-demo-pill:hover {
  background: #14b8a6;
  color: #0b0f17;
  border-color: #14b8a6;
}

[data-theme="light"] .auth-demo-pill {
  background: rgba(13, 148, 136, 0.1);
  border-color: rgba(13, 148, 136, 0.25);
  color: #0d9488;
}

[data-theme="light"] .auth-demo-pill:hover {
  background: #0d9488;
  color: #ffffff;
  border-color: #0d9488;
}

/* Card Bottom Switch Link */
.auth-switch-text {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.92rem;
  color: #94a3b8;
}

.auth-switch-text a {
  color: #2dd4bf;
  font-weight: 700;
  text-decoration: none;
  margin-left: 0.25rem;
}

.auth-switch-text a:hover {
  color: #5eead4;
  text-decoration: underline;
}

[data-theme="light"] .auth-switch-text {
  color: #64748b;
}

[data-theme="light"] .auth-switch-text a {
  color: #0d9488;
}

/* Legacy Backwards Compatibility for OTP Page & Other Dialogs */
.auth-section {
  padding: 3rem 1rem 5.5rem;
  position: relative;
  overflow: hidden;
}
.auth-container {
  max-width: 1040px;
  margin: 0 auto;
}
.auth-card-box {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 2.25rem 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
[data-theme="dark"] .auth-card-box {
  background: #111520;
  border-color: rgba(255,255,255,0.1);
}
.auth-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.95rem;
  background: #ffffff;
}
[data-theme="dark"] .auth-control {
  background: #18202f;
  border-color: rgba(255,255,255,0.12);
  color: #ffffff;
}
.auth-submit-btn {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  background: #0f1115;
  color: #ffffff;
  font-weight: 700;
  border: none;
  cursor: pointer;
}
.auth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1.25rem;
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  font-weight: 600;
  color: #1f2937;
  text-decoration: none;
}
.auth-google-icon {
  width: 20px;
  height: 20px;
}
.auth-pwd-toggle {
  background: none;
  border: none;
  cursor: pointer;
}
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.4rem 0;
  color: #9ca3af;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #f1f2f4;
}
.auth-divider span {
  padding: 0 0.85rem;
}
.auth-otp-btn {
  width: 100%;
  padding: 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  color: #374151;
  cursor: pointer;
}


/* Header Navbar Google Sign In Button */
.nav-google-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9999px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-google-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(66, 133, 244, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.25);
  color: #ffffff;
}

[data-theme="light"] .nav-google-btn {
  background: #ffffff;
  border-color: #dadce0;
  color: #3c4043;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .nav-google-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1a73e8;
}

.nav-mobile-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.nav-mobile-google:hover {
  background: rgba(255, 255, 255, 0.14);
}

[data-theme="light"] .nav-mobile-google {
  background: #ffffff;
  border-color: #dadce0;
  color: #202124;
}

/* ==========================================================================
   FLOATING QUICK SUPPORT BUTTON & CANDIDATE SUPPORT MODAL
   Official 24/7 Candidate Support Infrastructure
   ========================================================================== */

/* Floating Quick Support Trigger Button */
.floating-support-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
  color: #ffffff !important;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 30px rgba(13, 148, 136, 0.45), 0 0 1px rgba(255, 255, 255, 0.5) inset;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.floating-support-btn-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  position: relative;
  display: inline-block;
  box-shadow: 0 0 10px #10b981;
}

.floating-support-btn-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: #10b981;
  opacity: 0.6;
  animation: pulseRipple 1.8s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

.floating-support-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 16px 42px rgba(13, 148, 136, 0.6), 0 0 25px rgba(2, 132, 199, 0.4);
}

.floating-support-btn:active {
  transform: translateY(-1px) scale(0.99);
}

/* Floating Quick Translate Action Button (Bottom-Left) */
.floating-translate-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #c026d3 100%);
  color: #ffffff !important;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.45), 0 0 1px rgba(255, 255, 255, 0.5) inset;
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.floating-translate-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a855f7;
  position: relative;
  display: inline-block;
  box-shadow: 0 0 10px #c084fc;
}
.floating-translate-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: #a855f7;
  opacity: 0.6;
  animation: pulseRipple 1.8s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}
.floating-translate-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 16px 42px rgba(99, 102, 241, 0.6), 0 0 25px rgba(168, 85, 247, 0.45);
  color: #ffffff !important;
}
.floating-translate-btn:active {
  transform: translateY(-1px) scale(0.99);
}

/* Modal Overlay Backdrop */
.floating-support-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 15, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2100;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.floating-support-modal.open {
  display: flex;
  opacity: 1;
  animation: modalOverlayFade 0.22s ease forwards;
}

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

/* Modal Dialog Window */
.floating-support-dialog {
  background: linear-gradient(175deg, rgba(22, 30, 46, 0.96) 0%, rgba(11, 15, 23, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  width: min(540px, 95vw);
  max-height: 92vh;
  overflow-y: auto;
  padding: 1.85rem 2rem 2rem;
  box-shadow: 0 30px 80px -15px rgba(0, 0, 0, 0.75), 0 0 45px rgba(20, 184, 166, 0.15);
  position: relative;
  transform: scale(0.95) translateY(10px);
  animation: modalPopUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

[data-theme="light"] .floating-support-dialog {
  background: linear-gradient(175deg, #ffffff 0%, #f8fafc 100%);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 25px 65px -10px rgba(15, 23, 42, 0.25), 0 0 35px rgba(13, 148, 136, 0.12);
}

@keyframes modalPopUp {
  to {
    transform: scale(1) translateY(0);
  }
}

/* Ambient Top Line Glow */
.modal-ambient-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  background: linear-gradient(90deg, transparent 0%, #14b8a6 25%, #3b82f6 75%, transparent 100%);
  border-radius: 24px 24px 0 0;
}

/* Sleek Circular Close Button */
.support-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

[data-theme="light"] .support-close-btn {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.1);
  color: #64748b;
}

.support-close-btn:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
  color: #f43f5e;
  transform: rotate(90deg) scale(1.08);
}

/* Modal Header Components */
.support-modal-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.15rem;
  padding-right: 2.25rem;
}

.support-modal-avatar-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.support-modal-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--teal);
  box-shadow: 0 0 16px rgba(20, 184, 166, 0.35);
  object-fit: cover;
}

.support-modal-status-dot {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 13px;
  height: 13px;
  background: #10b981;
  border: 2.5px solid var(--bg-card, #131927);
  border-radius: 50%;
}

.support-modal-title {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
}

.support-modal-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--teal);
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.28);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.support-modal-sub {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.support-email-highlight {
  color: var(--teal);
  font-weight: 700;
}

/* Quick Topic Chips */
.support-modal-quick-topics {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.15rem;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-line);
  border-radius: 12px;
}

[data-theme="light"] .support-modal-quick-topics {
  background: rgba(15, 23, 42, 0.03);
}

.support-modal-quick-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.25rem;
}

.modal-topic-chip {
  background: var(--surface-soft, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--border-line);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

[data-theme="light"] .modal-topic-chip {
  background: #ffffff;
}

.modal-topic-chip:hover {
  border-color: var(--teal);
  background: rgba(20, 184, 166, 0.12);
  color: var(--teal);
  transform: translateY(-1px);
}

.modal-topic-chip.active {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.2) 0%, rgba(37, 99, 235, 0.18) 100%);
  border-color: var(--teal);
  color: var(--teal);
  box-shadow: 0 2px 8px rgba(20, 184, 166, 0.2);
}

/* Modal Form Fields & Inputs */
.modal-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.modal-form-group {
  position: relative;
}

.modal-field-label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.req-star {
  color: #f43f5e;
  font-weight: 800;
}

.modal-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.modal-input-icon {
  position: absolute;
  left: 0.75rem;
  font-size: 0.95rem;
  pointer-events: none;
  opacity: 0.7;
}

.modal-text-input {
  width: 100%;
  padding: 0.68rem 0.85rem 0.68rem 2.25rem !important;
  font-size: 0.88rem !important;
  border-radius: 10px !important;
  border: 1.5px solid var(--border-line) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--ink) !important;
  transition: all 0.2s ease !important;
}

[data-theme="light"] .modal-text-input {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
}

.modal-text-input:focus {
  border-color: var(--teal) !important;
  background: rgba(20, 184, 166, 0.04) !important;
  box-shadow: 0 0 0 3.5px rgba(20, 184, 166, 0.18) !important;
  outline: none !important;
}

.modal-select-wrap {
  position: relative;
}

.modal-select-input {
  width: 100%;
  padding: 0.68rem 0.85rem !important;
  font-size: 0.88rem !important;
  border-radius: 10px !important;
  border: 1.5px solid var(--border-line) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--ink) !important;
  cursor: pointer;
  transition: all 0.2s ease !important;
}

[data-theme="light"] .modal-select-input {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
}

.modal-select-input:focus {
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 3.5px rgba(20, 184, 166, 0.18) !important;
  outline: none !important;
}

.modal-textarea-input {
  width: 100%;
  padding: 0.68rem 0.85rem !important;
  font-size: 0.88rem !important;
  line-height: 1.5 !important;
  font-family: inherit !important;
  border-radius: 10px !important;
  border: 1.5px solid var(--border-line) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--ink) !important;
  resize: vertical;
  min-height: 78px;
  transition: all 0.2s ease !important;
}

[data-theme="light"] .modal-textarea-input {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
}

.modal-textarea-input:focus {
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 3.5px rgba(20, 184, 166, 0.18) !important;
  outline: none !important;
}

.modal-char-count {
  font-size: 0.74rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* Modal Submit Button */
.modal-submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.88rem 1.25rem;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #0d9488 0%, #0284c7 50%, #2563eb 100%);
  background-size: 200% 200%;
  color: #ffffff !important;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.35);
  animation: btnGlowPulse 4s ease infinite;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-submit-btn:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 10px 28px rgba(13, 148, 136, 0.5);
}

.modal-submit-btn:active {
  transform: translateY(0) scale(0.99);
}

.modal-submit-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none !important;
}

.modal-footer-note {
  font-size: 0.74rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.75rem;
  line-height: 1.4;
}

/* Celebratory Modal Success Screen */
.modal-success-screen {
  text-align: center;
  padding: 1.5rem 0.5rem 0.5rem;
}

.modal-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1rem;
  animation: badgePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.modal-success-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 0.35rem;
}

.modal-success-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 420px;
  margin: 0 auto 1.25rem;
}

.modal-ref-card {
  background: rgba(20, 184, 166, 0.08);
  border: 1.5px dashed var(--teal);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  max-width: 360px;
  margin: 0 auto 1.25rem;
}

.modal-ref-sub {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.modal-ref-code {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}

.modal-ref-status {
  font-size: 0.78rem;
  color: var(--teal);
  margin-top: 0.35rem;
}

.modal-success-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* Mobile Responsiveness for Modal */
@media (max-width: 580px) {
  .floating-support-dialog {
    padding: 1.35rem 1.15rem 1.5rem;
  }
  .modal-input-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .floating-support-btn {
    bottom: 16px;
    right: 14px;
    padding: 0.6rem 1rem;
    font-size: 0.82rem;
  }
  .floating-translate-btn {
    bottom: 16px;
    left: 14px;
    padding: 0.6rem 0.95rem;
    font-size: 0.82rem;
  }
  .support-modal-title {
    font-size: 1.15rem;
  }
}

@media (max-width: 420px) {
  .floating-translate-label {
    display: none;
  }
  .floating-translate-btn {
    padding: 0.65rem 0.75rem;
    border-radius: 50%;
  }
}


/* ==========================================================================
   Comprehensive Dark & Light Mode Harmonization & Level / Story Theme Fixes
   ========================================================================== */

/* Universal Heading & Text Theme Synchronization */
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6,
[data-theme="light"] .section-head h2,
[data-theme="light"] .section-head h3,
[data-theme="light"] .page-title,
[data-theme="light"] .module-title,
[data-theme="light"] .level-header-title {
  color: #0f172a !important;
}

[data-theme="light"] p,
[data-theme="light"] .lead,
[data-theme="light"] .section-head p {
  color: #334155 !important;
}

[data-theme="light"] .muted,
[data-theme="light"] .text-muted {
  color: #64748b !important;
}

/* ==========================================================================
   COMPREHENSIVE LIGHT THEME INVERSION ENGINE
   Ensures 100% contrast, eliminates blank/white text and stuck black boxes
   ========================================================================== */

/* 1. Global Headings & Text in Light Mode */
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6,
[data-theme="light"] .h1,
[data-theme="light"] .h2,
[data-theme="light"] .h3,
[data-theme="light"] .h4 {
  color: #0f172a !important;
}

[data-theme="light"] body {
  background-color: #f8fafc;
  color: #1e293b;
}

/* 2. Glass Cards, Bento Cards, Hero Banners & Surface Containers */
[data-theme="light"] .glass-card,
[data-theme="light"] .glass-card[style],
[data-theme="light"] .level-overview-banner,
[data-theme="light"] .story-card,
[data-theme="light"] .sentence-row-card,
[data-theme="light"] .vocab-hero-bento,
[data-theme="light"] .vocab-hero-banner,
[data-theme="light"] .bento-card,
[data-theme="light"] .bento-card-glow,
[data-theme="light"] .bento-card[style],
[data-theme="light"] .bento-card-glow[style],
[data-theme="light"] .controls-bar,
[data-theme="light"] .empty-state,
[data-theme="light"] .speaking-studio-card,
[data-theme="light"] .speaking-card,
[data-theme="light"] .writing-card,
[data-theme="light"] .level-card,
[data-theme="light"] .syllabus-card,
[data-theme="light"] .grammar-milestone-card,
[data-theme="light"] .grammar-studio .glass-card {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08), 0 0 1px rgba(15, 23, 42, 0.1) !important;
  color: #0f172a !important;
}

/* 3. Text Inversion within Cards */
[data-theme="light"] .glass-card strong,
[data-theme="light"] .bento-card strong,
[data-theme="light"] .grammar-detailed-card strong,
[data-theme="light"] .practice-mock-card strong,
[data-theme="light"] .vocab-hero-stats strong {
  color: #0f172a !important;
}

[data-theme="light"] .glass-card p,
[data-theme="light"] .bento-card p,
[data-theme="light"] .lead {
  color: #334155 !important;
}

/* 4. Fix Inline Colors that Turn Invisible in Light Mode */
[data-theme="light"] [style*="color: #fff"]:not(.btn-primary):not(.btn-primary *):not(.btn-pro-nav):not(.badge-pro-status):not(.lvl-chip):not(.icon-sun):not(.footer-cta-btn):not(.cf-play-btn *):not(.badge-cat):not(.badge-gender):not(.badge-level):not(.pm-badge *),
[data-theme="light"] [style*="color:#fff"]:not(.btn-primary):not(.btn-primary *):not(.btn-pro-nav):not(.badge-pro-status):not(.lvl-chip):not(.icon-sun):not(.footer-cta-btn):not(.cf-play-btn *):not(.badge-cat):not(.badge-gender):not(.badge-level):not(.pm-badge *),
[data-theme="light"] [style*="color: white"],
[data-theme="light"] [style*="color:white"] {
  color: #0f172a !important;
}

[data-theme="light"] [style*="color: #cbd5e1"],
[data-theme="light"] [style*="color:#cbd5e1"],
[data-theme="light"] [style*="color: #e2e8f0"],
[data-theme="light"] [style*="color:#e2e8f0"],
[data-theme="light"] [style*="color: #94a3b8"],
[data-theme="light"] [style*="color:#94a3b8"] {
  color: #475569 !important;
}

/* 5. Sub-Containers with Inline Backgrounds */
[data-theme="light"] [style*="background: rgba(255, 255, 255, 0.03)"],
[data-theme="light"] [style*="background: rgba(255, 255, 255, 0.04)"],
[data-theme="light"] [style*="background: rgba(255, 255, 255, 0.05)"],
[data-theme="light"] [style*="background: rgba(255, 255, 255, 0.06)"],
[data-theme="light"] [style*="background: rgba(255, 255, 255, 0.08)"],
[data-theme="light"] [style*="background: rgba(255,255,255,0.03)"],
[data-theme="light"] [style*="background: rgba(255,255,255,0.04)"],
[data-theme="light"] [style*="background: rgba(255,255,255,0.06)"],
[data-theme="light"] [style*="background: rgba(255,255,255,0.08)"],
[data-theme="light"] [style*="background: rgba(255,255,255,0.1)"],
[data-theme="light"] [style*="background: rgba(255, 255, 255, 0.1)"] {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  color: #0f172a !important;
}

/* 6. Dark Elements that Stays Black in Light Mode */
[data-theme="light"] [style*="background: rgba(15, 21, 32"],
[data-theme="light"] [style*="background: rgba(15, 23, 42"],
[data-theme="light"] [style*="background: radial-gradient"],
[data-theme="light"] [style*="background: #070a11"] {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  color: #0f172a !important;
}

/* 7. Form Controls, Inputs, Textareas & Selects */
[data-theme="light"] .form-control,
[data-theme="light"] .crs-select,
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="search"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="password"],
[data-theme="light"] textarea,
[data-theme="light"] select {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.18) !important;
}
[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
  color: #94a3b8 !important;
}

/* 8. HUD & Data Tables */
[data-theme="light"] .hud-table-wrap {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}
[data-theme="light"] .hud-table th {
  background: #f1f5f9 !important;
  color: #0d9488 !important;
  border-bottom-color: rgba(15, 23, 42, 0.1) !important;
}
[data-theme="light"] .hud-table td {
  background: #ffffff !important;
  color: #334155 !important;
  border-bottom-color: rgba(15, 23, 42, 0.06) !important;
}
[data-theme="light"] .hud-table td strong {
  color: #0f172a !important;
}

/* 9. Vocabulary Cards */
[data-theme="light"] .vocab-grid-card,
[data-theme="light"] .vocab-card-wrapper {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}
[data-theme="light"] .vcard-mot {
  color: #0f172a !important;
}
[data-theme="light"] .vcard-meaning {
  color: #334155 !important;
}
[data-theme="light"] .vcard-example-box {
  background: #f8fafc !important;
  border-left-color: var(--teal) !important;
}
[data-theme="light"] .vcard-example-box p {
  color: #0f172a !important;
}

/* 10. Grammar Feed & Practice Checks */
[data-theme="light"] .grammar-detailed-card {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}
[data-theme="light"] .g-card-title {
  color: #0f172a !important;
}
[data-theme="light"] .g-card-explanation {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.06) !important;
  color: #334155 !important;
}
[data-theme="light"] .g-example-card {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}
[data-theme="light"] .g-example-text-fr {
  color: #0f172a !important;
}
[data-theme="light"] .g-example-text-en {
  color: #475569 !important;
}
[data-theme="light"] .g-quiz-container {
  background: #f8fafc !important;
  border-color: rgba(20, 184, 166, 0.25) !important;
}
[data-theme="light"] .g-quiz-q {
  color: #0f172a !important;
}
[data-theme="light"] .g-quiz-btn {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  color: #1e293b !important;
}
[data-theme="light"] .g-quiz-btn:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.25) !important;
}
[data-theme="light"] .g-trap-container {
  background: rgba(239, 68, 68, 0.04) !important;
  border-color: rgba(239, 68, 68, 0.2) !important;
}
[data-theme="light"] .g-trap-container div {
  color: #334155 !important;
}

/* 11. Practice Mock Test Cards Light Theme styling is managed in the dedicated Mock Test section */

/* 12. Level Selector Bar & Paywalls */
[data-theme="light"] .level-bar {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}
[data-theme="light"] .level-btn {
  color: #475569 !important;
}
[data-theme="light"] .level-btn strong {
  color: #0f172a !important;
}
[data-theme="light"] .level-btn span {
  color: #64748b !important;
}
[data-theme="light"] .level-btn.active {
  background: var(--teal) !important;
}
[data-theme="light"] .level-btn.active strong,
[data-theme="light"] .level-btn.active span {
  color: #0b0f17 !important;
}
[data-theme="light"] .grammar-studio .glass-card[style*="rgba(244, 63, 94"],
[data-theme="light"] .vocab-studio .glass-card[style*="rgba(244, 63, 94"] {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.05), #ffffff 60%) !important;
  border-color: rgba(244, 63, 94, 0.25) !important;
}
[data-theme="light"] .grammar-studio .glass-card h2,
[data-theme="light"] .vocab-studio .glass-card h2 {
  color: #0f172a !important;
}
[data-theme="light"] .story-quiz-question {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}

/* Navigation Tabs Bar */
.module-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-line);
}
.module-nav a {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-line);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.module-nav a:hover,
.module-nav a.active {
  background: rgba(20, 184, 166, 0.15);
  border-color: var(--teal);
  color: var(--teal);
  box-shadow: 0 0 12px rgba(20, 184, 166, 0.2);
}
[data-theme="light"] .module-nav a {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  color: #475569;
}
[data-theme="light"] .module-nav a:hover,
[data-theme="light"] .module-nav a.active {
  background: rgba(13, 148, 136, 0.1);
  border-color: var(--teal);
  color: var(--teal);
}

/* Level Stories Bento Grid */
.story-bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}
.story-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  box-shadow: var(--shadow-bento);
  text-decoration: none;
  transition: all 0.25s var(--ease);
  position: relative;
  overflow: hidden;
}
.story-card:hover {
  transform: translateY(-5px);
  border-color: var(--teal);
  box-shadow: 0 14px 35px rgba(20, 184, 166, 0.22);
}
.story-card-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}
.story-badge-cat {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(20, 184, 166, 0.12);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(20, 184, 166, 0.25);
}
.story-badge-time {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.story-card-title-fr {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 0.35rem;
  line-height: 1.25;
}
.story-card-title-en {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 1rem;
  font-weight: 500;
}
.story-card-snippet {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.story-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-line);
}
.story-read-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--teal);
}

/* ==========================================================================
   PRACTICE & MOCK TEST 4-CARD BALANCED GRID (Expression Orale, Compréhension, etc.)
   ========================================================================== */
/* ==========================================================================
   PRACTICE & MOCK TEST 4-CARD BALANCED GRID & THEME STYLING
   ========================================================================== */
.mock-hero-banner {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.08) 0%, rgba(6, 182, 212, 0.04) 50%, rgba(139, 92, 246, 0.06) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.25s ease;
}
[data-theme="light"] .mock-hero-banner {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
}
.mock-hero-title {
  color: var(--ink);
}
.mock-hero-lead {
  color: var(--muted);
}

/* Paywall Banner */
.mock-paywall-banner {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.14) 0%, rgba(15, 23, 42, 0.92) 100%);
  border: 1px solid rgba(20, 184, 166, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.mock-paywall-heading {
  color: #ffffff;
}
.mock-paywall-sub {
  color: #94a3b8;
}
[data-theme="light"] .mock-paywall-banner {
  background: linear-gradient(135deg, #f0fdfa 0%, #ffffff 100%) !important;
  border-color: #99f6e4 !important;
  box-shadow: 0 10px 30px rgba(20, 184, 166, 0.1) !important;
}
[data-theme="light"] .mock-paywall-heading {
  color: #0f172a !important;
}
[data-theme="light"] .mock-paywall-sub {
  color: #334155 !important;
}

/* Unlocked Banner */
.mock-unlocked-banner {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
[data-theme="light"] .mock-unlocked-banner {
  background: #f0fdf4 !important;
  border-color: #bbf7d0 !important;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.08) !important;
}

/* Practice Mock Grid */
/* Practice Mock Grid - 2x2 Balanced Layout */
.practice-mock-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  align-items: stretch;
}
@media (max-width: 900px) {
  .practice-mock-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@keyframes mockCardRise {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.practice-mock-grid > :nth-child(1) { animation: mockCardRise 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both; }
.practice-mock-grid > :nth-child(2) { animation: mockCardRise 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both; }
.practice-mock-grid > :nth-child(3) { animation: mockCardRise 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both; }
.practice-mock-grid > :nth-child(4) { animation: mockCardRise 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both; }

.practice-mock-card {
  background: rgba(15, 21, 32, 0.92);
  border: 1.5px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  padding: 2rem 2rem 1.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.practice-mock-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.28);
}

.practice-mock-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  transition: height 0.3s ease;
}
.practice-mock-card:hover::before {
  height: 6px;
}

.pm-card-inner {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.pm-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}
.practice-mock-card:hover .pm-icon {
  transform: scale(1.1) rotate(4deg);
}

/* 2x2 Internal Spec Grid */
.pm-spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  margin: 1.25rem 0 1.5rem;
}
[data-theme="light"] .pm-spec-grid {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.pm-spec-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.pm-spec-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pm-spec-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}
[data-theme="light"] .pm-spec-val {
  color: #0f172a;
}

.pm-btn-arrow {
  display: inline-block;
  transition: transform 0.25s ease;
}
.pm-btn:hover .pm-btn-arrow {
  transform: translateX(5px);
}

/* Card 1: Speaking (Amber / Gold) */
.practice-mock-card.card-speaking::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.practice-mock-card.card-speaking:hover {
  box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.65), 0 0 35px rgba(245, 158, 11, 0.28);
  border-color: rgba(245, 158, 11, 0.45);
}

/* Card 2: Listening (Teal / Emerald) */
.practice-mock-card.card-listening::before {
  background: linear-gradient(90deg, #14b8a6, #2dd4bf);
}
.practice-mock-card.card-listening:hover {
  box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.65), 0 0 35px rgba(20, 184, 166, 0.28);
  border-color: rgba(20, 184, 166, 0.45);
}

/* Card 3: Reading (Cyan / Sky) */
.practice-mock-card.card-reading::before {
  background: linear-gradient(90deg, #06b6d4, #38bdf8);
}
.practice-mock-card.card-reading:hover {
  box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.65), 0 0 35px rgba(6, 182, 212, 0.28);
  border-color: rgba(6, 182, 212, 0.45);
}

/* Card 4: Writing (Purple / Violet) */
.practice-mock-card.card-writing::before {
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}
.practice-mock-card.card-writing:hover {
  box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.65), 0 0 35px rgba(139, 92, 246, 0.28);
  border-color: rgba(139, 92, 246, 0.45);
}

/* Light Theme Card Overrides */
[data-theme="light"] .practice-mock-card {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.06) !important;
}
[data-theme="light"] .practice-mock-card.card-speaking:hover {
  box-shadow: 0 20px 40px -8px rgba(217, 119, 6, 0.18), 0 0 25px rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
}
[data-theme="light"] .practice-mock-card.card-listening:hover {
  box-shadow: 0 20px 40px -8px rgba(13, 148, 136, 0.18), 0 0 25px rgba(20, 184, 166, 0.15) !important;
  border-color: rgba(20, 184, 166, 0.5) !important;
}
[data-theme="light"] .practice-mock-card.card-reading:hover {
  box-shadow: 0 20px 40px -8px rgba(2, 132, 199, 0.18), 0 0 25px rgba(6, 182, 212, 0.15) !important;
  border-color: rgba(6, 182, 212, 0.5) !important;
}
[data-theme="light"] .practice-mock-card.card-writing:hover {
  box-shadow: 0 20px 40px -8px rgba(124, 58, 237, 0.18), 0 0 25px rgba(139, 92, 246, 0.15) !important;
  border-color: rgba(139, 92, 246, 0.5) !important;
}

/* Header & Icons */
.pm-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}
.pm-icon {
  font-size: 1.75rem;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}
.practice-mock-card:hover .pm-icon {
  transform: scale(1.12) rotate(4deg);
}
.practice-mock-card.card-speaking:hover .pm-icon {
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}
.practice-mock-card.card-listening:hover .pm-icon {
  box-shadow: 0 0 20px rgba(20, 184, 166, 0.4);
}
.practice-mock-card.card-reading:hover .pm-icon {
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}
.practice-mock-card.card-writing:hover .pm-icon {
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}
.pm-icon-speaking {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.pm-icon-listening {
  background: rgba(20, 184, 166, 0.15);
  border: 1px solid rgba(20, 184, 166, 0.3);
}
.pm-icon-reading {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
}
.pm-icon-writing {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

[data-theme="light"] .pm-icon-speaking {
  background: #fef3c7 !important;
  border-color: #fde68a !important;
}
[data-theme="light"] .pm-icon-listening {
  background: #ccfbf1 !important;
  border-color: #99f6e4 !important;
}
[data-theme="light"] .pm-icon-reading {
  background: #e0f2fe !important;
  border-color: #bae6fd !important;
}
[data-theme="light"] .pm-icon-writing {
  background: #ede9fe !important;
  border-color: #ddd6fe !important;
}

/* Title, Badges, Desc */
.pm-title {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}
[data-theme="light"] .pm-title {
  color: #0f172a !important;
}

.pm-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  min-height: 3.8rem;
}
[data-theme="light"] .pm-desc {
  color: #475569 !important;
}

.pm-badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: 6px;
  margin-top: 0.3rem;
  letter-spacing: 0.03em;
}
.pm-badge-speaking {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.pm-badge-listening {
  background: rgba(20, 184, 166, 0.15);
  color: #2dd4bf;
  border: 1px solid rgba(20, 184, 166, 0.3);
}
.pm-badge-reading {
  background: rgba(6, 182, 212, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.3);
}
.pm-badge-writing {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

[data-theme="light"] .pm-badge-speaking {
  background: #fef3c7 !important;
  color: #b45309 !important;
  border-color: #fde68a !important;
}
[data-theme="light"] .pm-badge-listening {
  background: #ccfbf1 !important;
  color: #0f766e !important;
  border-color: #99f6e4 !important;
}
[data-theme="light"] .pm-badge-reading {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  border-color: #bae6fd !important;
}
[data-theme="light"] .pm-badge-writing {
  background: #ede9fe !important;
  color: #6d28d9 !important;
  border-color: #ddd6fe !important;
}

/* Highlight Pills */
.pm-highlight-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
  margin-bottom: 0.85rem;
}
.pm-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-line);
  color: var(--muted);
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
}
.practice-mock-card:hover .pm-pill {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}
[data-theme="light"] .pm-pill {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #475569 !important;
}
[data-theme="light"] .practice-mock-card:hover .pm-pill {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

/* Lock Status Pills */
.pm-lock-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
  white-space: nowrap;
}
[data-theme="light"] .pm-lock-pill {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border-color: #fca5a5 !important;
}

.pm-unlocked-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  white-space: nowrap;
}
[data-theme="light"] .pm-unlocked-pill {
  background: #dcfce7 !important;
  color: #15803d !important;
  border-color: #86efac !important;
}

/* Spec Box */
.pm-spec-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.82rem;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pm-spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  line-height: 1.4;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.pm-spec-row:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(2px);
}
.pm-spec-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.pm-spec-val {
  font-weight: 700;
  color: #fff;
  font-size: 0.82rem;
  text-align: right;
}

[data-theme="light"] .pm-spec-box {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
}
[data-theme="light"] .pm-spec-row:hover {
  background: rgba(15, 23, 42, 0.04) !important;
}
[data-theme="light"] .pm-spec-label {
  color: #64748b !important;
}
[data-theme="light"] .pm-spec-val {
  color: #0f172a !important;
}

/* Actions & Lock CTA */
.pm-actions {
  margin-top: auto;
  padding-top: 0.5rem;
}
.pm-btn {
  width: 100%;
  text-align: center;
  justify-content: center;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.pm-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -70%;
  width: 50%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: rotate(25deg);
  transition: none;
}
.pm-btn:hover::after {
  left: 140%;
  transition: left 0.75s ease;
}
.pm-btn:hover {
  transform: translateY(-2px);
}

.btn-lock-cta {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(20, 184, 166, 0.32));
  color: #2dd4bf;
  border: 1px solid rgba(20, 184, 166, 0.5);
  font-weight: 800;
  box-shadow: 0 4px 20px rgba(20, 184, 166, 0.25);
  text-decoration: none;
}
.btn-lock-cta:hover {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.3), rgba(20, 184, 166, 0.5));
  color: #ffffff;
  box-shadow: 0 6px 25px rgba(20, 184, 166, 0.45);
}
[data-theme="light"] .btn-lock-cta {
  background: #f0fdfa !important;
  color: #0f766e !important;
  border-color: #99f6e4 !important;
  box-shadow: 0 4px 15px rgba(20, 184, 166, 0.12) !important;
}
[data-theme="light"] .btn-lock-cta:hover {
  background: #14b8a6 !important;
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.3) !important;
}

[data-theme="light"] .btn-lock-cta {
  background: linear-gradient(135deg, #0d9488, #0f766e) !important;
  color: #ffffff !important;
  border-color: #0d9488 !important;
  box-shadow: 0 4px 18px rgba(13, 148, 136, 0.35) !important;
}
[data-theme="light"] .btn-lock-cta:hover {
  background: linear-gradient(135deg, #0f766e, #115e59) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 22px rgba(13, 148, 136, 0.45) !important;
}

/* Reference Card at bottom */
.mock-reference-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
[data-theme="light"] .mock-reference-card {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
}

/* Light Mode Overrides for Curriculum Level Tiles */
[data-theme="light"] .level-tile {
  background: #ffffff !important;
  border-color: rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 8px 25px -4px rgba(0, 0, 0, 0.06) !important;
}
[data-theme="light"] .level-tile:hover {
  background: #ffffff !important;
  border-color: rgba(203, 213, 225, 1) !important;
  box-shadow: 0 20px 35px -6px rgba(15, 23, 42, 0.1) !important;
}
[data-theme="light"] .level-tile strong.level-name {
  color: #0f172a !important;
}
[data-theme="light"] .level-tile .level-desc {
  color: #64748b !important;
}
[data-theme="light"] .level-metric-chip {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #64748b !important;
}
[data-theme="light"] .level-metric-chip strong {
  color: #0f172a !important;
}
[data-theme="light"] .level-tile-footer {
  border-top-color: #f1f5f9 !important;
}


/* Canadian CLB 7 (NCLC 7) Passing Requirements Showcase - 2x2 Grid */
.clb-benchmarks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1.25rem;
}
@media (max-width: 860px) {
  .clb-benchmarks-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

.clb-benchmark-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 1.75rem 1.85rem;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.clb-benchmark-box:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.55);
}

.clb-benchmark-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  transition: height 0.3s ease;
}
.clb-benchmark-box:hover::before {
  height: 5px;
}

/* Accent lines for CLB 7 boxes */
.clb-box-speaking::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.clb-box-listening::before { background: linear-gradient(90deg, #14b8a6, #2dd4bf); }
.clb-box-reading::before { background: linear-gradient(90deg, #06b6d4, #38bdf8); }
.clb-box-writing::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }

.clb-box-speaking:hover { box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.6), 0 0 30px rgba(245, 158, 11, 0.18); }
.clb-box-listening:hover { box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.6), 0 0 30px rgba(20, 184, 166, 0.18); }
.clb-box-reading:hover { box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.6), 0 0 30px rgba(6, 182, 212, 0.18); }
.clb-box-writing:hover { box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.6), 0 0 30px rgba(139, 92, 246, 0.18); }

.clb-bm-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}
.clb-bm-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.clb-benchmark-box:hover .clb-bm-icon {
  transform: scale(1.08);
}

.clb-bm-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.08rem;
  color: #fff;
  line-height: 1.25;
}
.clb-bm-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.clb-bm-chips {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.15rem;
}
.clb-chip-tef {
  font-size: 0.82rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.28rem 0.75rem;
  border-radius: 8px;
  font-family: ui-monospace, monospace;
}
.clb-chip-tcf {
  font-size: 0.82rem;
  font-weight: 800;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.28rem 0.75rem;
  border-radius: 8px;
  font-family: ui-monospace, monospace;
}

.clb-bm-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.clb-bm-checklist li {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.45;
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}
.clb-bm-checklist li span {
  color: var(--teal);
  font-weight: 800;
  font-size: 0.95rem;
}

.clb-pro-tip-strip {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin-top: 2rem;
  padding: 1.25rem 1.65rem;
  background: rgba(20, 184, 166, 0.08);
  border: 1px solid rgba(20, 184, 166, 0.25);
  border-radius: 16px;
}
.clb-tip-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
}
.clb-tip-text {
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.6;
}
.clb-tip-text strong {
  color: var(--teal);
}

/* Light Theme Overrides for CLB 7 Section */
[data-theme="light"] .clb-benchmark-box {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.09) !important;
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.06) !important;
}
[data-theme="light"] .clb-bm-title {
  color: #0f172a !important;
}
[data-theme="light"] .clb-bm-subtitle {
  color: #64748b !important;
}
[data-theme="light"] .clb-bm-icon {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}
[data-theme="light"] .clb-bm-checklist li {
  color: #334155 !important;
}
[data-theme="light"] .clb-pro-tip-strip {
  background: #f0fdfa !important;
  border-color: rgba(20, 184, 166, 0.3) !important;
}
[data-theme="light"] .clb-tip-text {
  color: #0f172a !important;
}

/* ==========================================================================
   Pricing Page Styles & Light Theme Inversion
   ========================================================================== */
.pricing-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto 3rem;
}

.pricing-card {
  border-radius: 20px;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card:hover {
  transform: translateY(-4px);
}

.pricing-card.featured-card {
  border: 2px solid var(--teal);
  box-shadow: 0 0 35px rgba(20, 184, 166, 0.2);
}

.plan-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  margin-bottom: 1rem;
}

.plan-badge.badge-accent {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(6, 182, 212, 0.2));
  color: var(--teal);
  border: 1px solid rgba(20, 184, 166, 0.3);
}

.plan-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.plan-price .currency {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--teal);
}

.plan-price .amount {
  font-size: 3rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}

.plan-price .period {
  font-size: 0.85rem;
  color: var(--muted);
}

.plan-desc {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 1.75rem;
  min-height: 44px;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: var(--ink);
}

.plan-features .check {
  color: #10b981;
  font-weight: 800;
}

.plan-features .cross {
  color: #ef4444;
  font-weight: 800;
}

.table-matrix {
  width: 100%;
  border-collapse: collapse;
}

.table-matrix th,
.table-matrix td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-line);
  text-align: left;
}

.table-matrix th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.table-matrix td {
  color: var(--ink);
  font-size: 0.92rem;
}

/* Light Mode Rules for Pricing & Practice Cards */
[data-theme="light"] .pricing-card {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08) !important;
}

[data-theme="light"] .pricing-card.featured-card {
  border: 2px solid var(--teal) !important;
  box-shadow: 0 15px 35px -5px rgba(20, 184, 166, 0.25) !important;
}

[data-theme="light"] .plan-badge {
  background: #f1f5f9 !important;
  color: #475569 !important;
}

[data-theme="light"] .table-matrix th {
  background: #f8fafc !important;
  color: #334155 !important;
}

[data-theme="light"] .pm-spec-val {
  color: #0f172a !important;
}

/* ==========================================================================
   Candidate Dashboard Refined Bento UI & Metrics
   ========================================================================== */
.dash-avatar-box {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--teal), #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: #0b0f17;
  box-shadow: 0 10px 25px rgba(20, 184, 166, 0.35);
  flex-shrink: 0;
}

.dash-status-pill {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  display: inline-block;
}

.dash-status-pill.pro {
  background: #f59e0b;
  color: #0b0f17;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.3);
}

.dash-status-pill.free {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-line);
  color: var(--muted);
}

.dash-meta-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.dash-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* 4 Bento Metric Cards */
.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.dash-metric-card {
  padding: 1.75rem 1.5rem;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.dash-metric-card:hover {
  transform: translateY(-3px);
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.metric-tag {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.metric-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.metric-total {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
}

.dash-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  margin-top: 1rem;
  overflow: hidden;
}

.dash-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}

.metric-footer-text {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.metric-footer-text a {
  color: var(--teal);
  font-weight: 700;
  text-decoration: none;
}

.metric-footer-text a:hover {
  text-decoration: underline;
}

/* Exam Studios Bento Grid */
.dash-studios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.dash-studio-tile {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-line);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  transition: all 0.22s ease;
}

.dash-studio-tile:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(20, 184, 166, 0.3);
  transform: translateY(-2px);
}

.studio-tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.studio-tile-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}

.studio-tile-info strong {
  font-size: 0.95rem;
  color: var(--ink);
  font-weight: 700;
}

.studio-tile-info span {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.studio-tile-arrow {
  font-size: 1.1rem;
  color: var(--muted);
  transition: transform 0.2s;
}

.dash-studio-tile:hover .studio-tile-arrow {
  transform: translateX(3px);
  color: var(--teal);
}

/* CEFR Levels Progression Grid */
.dash-levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.dash-level-card {
  padding: 1.5rem;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.dash-level-card:hover {
  transform: translateY(-2px);
}

.dash-level-card.level-free {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), transparent);
}

.dash-level-card.level-unlocked {
  border-color: rgba(20, 184, 166, 0.35);
}

.dash-level-card.level-locked {
  opacity: 0.9;
}

.dash-level-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.level-code-badge {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink);
  font-family: var(--font-display);
}

.dash-level-status {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 8px;
  letter-spacing: 0.04em;
}

.status-free {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.status-pro {
  background: rgba(20, 184, 166, 0.15);
  border: 1px solid rgba(20, 184, 166, 0.3);
  color: #2dd4bf;
}

.status-locked {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: #fb7185;
}

.dash-level-label {
  font-size: 1.05rem;
  color: var(--ink);
  display: block;
  margin-bottom: 0.35rem;
}

.target-clb-chip {
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  background: rgba(20, 184, 166, 0.15);
  color: var(--teal);
  border-radius: 6px;
  margin-left: 0.35rem;
}

.dash-level-blurb {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 1rem;
}

.dash-level-counts {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.5rem 0;
  border-top: 1px solid var(--border-line);
  margin-bottom: 1rem;
}

.dash-level-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.dash-level-btn.btn-open {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-line);
  color: var(--ink);
}

.dash-level-btn.btn-open:hover {
  background: var(--teal);
  color: #0b0f17;
  border-color: var(--teal);
}

.dash-level-btn.btn-unlock {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fb7185;
  gap: 0.35rem;
}

.dash-level-btn.btn-unlock:hover {
  background: #f43f5e;
  color: #fff;
}

/* Light Theme Overrides for Dashboard */
[data-theme="light"] .dash-avatar-box {
  color: #0f172a;
}
[data-theme="light"] .dash-metric-card {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.07) !important;
}
[data-theme="light"] .dash-progress-track {
  background: #e2e8f0 !important;
}
[data-theme="light"] .dash-studio-tile {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}
[data-theme="light"] .dash-studio-tile:hover {
  background: #f1f5f9 !important;
  border-color: rgba(13, 148, 136, 0.3) !important;
}
[data-theme="light"] .dash-level-card {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.06) !important;
}
[data-theme="light"] .dash-level-btn.btn-open {
  background: #f1f5f9 !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  color: #1e293b !important;
}
[data-theme="light"] .dash-level-btn.btn-open:hover {
  background: var(--teal) !important;
  color: #0b0f17 !important;
}
[data-theme="light"] .dash-status-pill.free {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
}

/* ==========================================================================
   Candidate Profile & Edit Goal Studio Enhancements
   ========================================================================== */
@keyframes avatarPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.5);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(20, 184, 166, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(20, 184, 166, 0);
  }
}

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

.animate-fade-up {
  animation: fadeInUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.avatar-pulse-box {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--teal), #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 800;
  color: #0b0f17;
  box-shadow: 0 10px 25px rgba(20, 184, 166, 0.35);
  animation: avatarPulse 2.8s infinite;
  flex-shrink: 0;
}

/* Interactive Visual CEFR Target Cards */
.cefr-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-top: 0.6rem;
  margin-bottom: 0.5rem;
}

.cefr-card-label {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid var(--border-line);
  border-radius: 14px;
  padding: 0.85rem 0.8rem;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
}

[data-theme="light"] .cefr-card-label {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.1);
}

.cefr-card-label:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(20, 184, 166, 0.4);
  transform: translateY(-2px);
}

.cefr-card-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cefr-card-label:has(.cefr-card-radio:checked),
.cefr-card-label.selected {
  background: rgba(20, 184, 166, 0.12) !important;
  border-color: var(--teal) !important;
  box-shadow: 0 0 18px rgba(20, 184, 166, 0.25) !important;
  transform: translateY(-2px);
}

[data-theme="light"] .cefr-card-label:has(.cefr-card-radio:checked),
[data-theme="light"] .cefr-card-label.selected {
  background: rgba(20, 184, 166, 0.08) !important;
  border-color: #0d9488 !important;
}

.cefr-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 0.4rem;
}

.cefr-level-pill {
  font-size: 0.88rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.cefr-card-label:has(.cefr-card-radio:checked) .cefr-level-pill,
.cefr-card-label.selected .cefr-level-pill {
  background: var(--teal);
  color: #0b0f17;
}

.cefr-check-icon {
  font-size: 0.85rem;
  color: var(--teal);
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s ease;
}

.cefr-card-label:has(.cefr-card-radio:checked) .cefr-check-icon,
.cefr-card-label.selected .cefr-check-icon {
  opacity: 1;
  transform: scale(1);
}

.cefr-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 0.2rem;
}

.cefr-sub {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.3;
}

.cefr-bonus-chip {
  margin-top: 0.45rem;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Canadian Immigration Pathway Indicator */
.pathway-progress-hud {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem;
  background: rgba(20, 184, 166, 0.06);
  border: 1px solid rgba(20, 184, 166, 0.2);
  border-radius: 16px;
  margin-bottom: 1.25rem;
}

.pathway-milestones {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin: 0.75rem 0 0.35rem;
}

.pathway-track-line {
  position: absolute;
  top: 11px;
  left: 10px;
  right: 10px;
  height: 3px;
  background: var(--border-line);
  z-index: 1;
}

.pathway-track-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), #f59e0b);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.pathway-milestone-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  z-index: 2;
}

.milestone-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  background: var(--bg-card);
  border: 2px solid var(--border-line);
  color: var(--muted);
  transition: all 0.22s ease;
}

.milestone-dot.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #0b0f17;
  box-shadow: 0 0 10px rgba(20, 184, 166, 0.5);
}

.milestone-dot.target {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #0b0f17;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.milestone-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.milestone-label.active {
  color: var(--ink);
}

/* ==========================================================================
   CARTOON FRENCH - COMPREHENSIVE RESPONSIVE ENGINE & MOBILE PERFECTION
   ========================================================================== */

/* Global Anti-Overflow & Touch Polish */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw;
  box-sizing: border-box;
}

/* Floating Badges & Mascot Classes */
.hero-visual-side {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.hero-mascot-wrapper {
  position: relative;
  width: 100%;
  max-width: 430px;
  text-align: center;
}
.hero-mascot-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  max-width: 420px;
  border-radius: 26px;
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.6), 0 0 40px rgba(20, 184, 166, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.12);
  object-fit: cover;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.hero-mascot-wrapper:hover .hero-mascot-img {
  transform: scale(1.02);
  box-shadow: 0 30px 65px rgba(0, 0, 0, 0.7), 0 0 50px rgba(20, 184, 166, 0.45);
}

.floating-vocab-card {
  position: absolute;
  background: var(--bg-card-glass);
  border: 1px solid var(--border-glow);
  padding: 0.65rem 1rem;
  border-radius: 16px;
  box-shadow: var(--shadow-bento);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 5;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.floating-card-1 {
  top: -12px;
  right: -12px;
  animation: floatCard 6s ease-in-out infinite alternate;
}
.floating-card-2 {
  bottom: -15px;
  left: -15px;
  animation: floatCard 6s ease-in-out infinite alternate 2s;
}
.floating-badge-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--teal);
  object-fit: cover;
}
.floating-badge-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(20, 184, 166, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.floating-badge-text {
  text-align: left;
}
.floating-badge-title {
  font-size: 0.88rem;
  color: var(--ink);
  display: block;
}
.floating-badge-subtitle {
  font-size: 0.74rem;
  color: var(--teal);
  font-weight: 700;
}
.text-emerald {
  color: #10b981 !important;
}

/* Grammar Studio Hero Banner Classes */
.grammar-hero-banner {
  margin-bottom: 1.75rem;
  padding: 2.25rem 2.5rem;
  border-radius: 24px;
  border: 1px solid rgba(45, 212, 191, 0.25);
  background: radial-gradient(120% 120% at 50% 0%, rgba(20, 184, 166, 0.12) 0%, rgba(15, 23, 42, 0.9) 65%, #070a11 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.7);
}
[data-theme="light"] .grammar-hero-banner {
  background: radial-gradient(120% 120% at 50% 0%, rgba(20, 184, 166, 0.14) 0%, rgba(241, 245, 249, 0.95) 70%, #f8fafc 100%);
  border-color: rgba(13, 148, 136, 0.25);
  box-shadow: 0 15px 40px -10px rgba(15, 23, 42, 0.08);
}
.grammar-hero-glow-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #2dd4bf, #818cf8, #f43f5e, transparent);
}
.grammar-hero-text {
  flex: 1;
  min-width: 280px;
  z-index: 2;
}
.grammar-hero-title {
  font-size: clamp(1.85rem, 3.6vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.65rem;
  color: var(--ink);
}
.grammar-hero-desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.35rem;
  max-width: 660px;
}
.grammar-stats-pills {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.grammar-stat-pill {
  padding: 0.4rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-size: 0.8rem;
}
[data-theme="light"] .grammar-stat-pill {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
  color: #334155;
}
.grammar-hero-mascot-box {
  position: relative;
  flex-shrink: 0;
  z-index: 2;
}
.grammar-mascot-img {
  width: 280px;
  height: 175px;
  object-fit: cover;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  display: block;
}
.grammar-mascot-badge {
  position: absolute;
  bottom: -8px;
  right: 12px;
  background: rgba(15, 21, 32, 0.94);
  border: 1px solid rgba(45, 212, 191, 0.4);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #2dd4bf;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}
[data-theme="light"] .grammar-mascot-badge {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(13, 148, 136, 0.3);
  color: var(--teal);
}

/* Story Bilingual Reading Layout */
.story-bilingual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

/* Paywall Lock Screen Grid */
.lock-screen-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: start;
}

/* Checkout Page Grid System */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 2.25rem;
  align-items: start;
}

.gateway-switch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* Tablet Device Optimizations (769px to 1024px: iPad, iPad Air, Surface) */
@media (min-width: 769px) and (max-width: 1024px) {
  .checkout-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  .studios-home-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
  }
  .dash-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .pricing-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 1.5rem !important;
  }
  .level-mosaic {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.25rem !important;
  }
  .container,
  .container-wide,
  .container.hero-grid {
    width: 100% !important;
    max-width: 1200px !important;
    padding-inline: clamp(1rem, 2.5vw, 1.25rem) !important;
    box-sizing: border-box !important;
  }
  .container-wide {
    max-width: 1320px !important;
  }
}

/* Mobile Nav Drawer Auth Links */
.mobile-nav-auth-links {
  display: none;
}
@media (max-width: 1400px) {
  .mobile-nav-auth-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-line);
  }
  .nav-mobile-signin {
    padding: 0.65rem 1rem !important;
    font-weight: 700 !important;
    color: var(--ink) !important;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    text-align: center;
  }
  .nav-mobile-pro {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  .nav {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Tablet & Mobile Responsiveness (< 960px) */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
    text-align: center;
  }
  .hero-actions {
    justify-content: center !important;
  }
  .hero-stats-row {
    justify-content: center !important;
  }
  .lock-screen-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  .checkout-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
}

/* Core Mobile Screens (< 768px) */
@media (max-width: 768px) {
  /* Containers — padding gutters, never edge-stuck */
  .container,
  .container-wide,
  .container.hero-grid {
    width: 100% !important;
    max-width: 100% !important;
    padding-inline: max(1rem, env(safe-area-inset-left, 0px) + 0.5rem)
                    max(1rem, env(safe-area-inset-right, 0px) + 0.5rem) !important;
    box-sizing: border-box !important;
  }
  .section {
    padding: 3.5rem 0 !important;
  }

  /* Header & Navigation */
  .site-header-inner {
    padding-block: 0.35rem !important;
    padding-inline: max(1rem, env(safe-area-inset-left, 0px) + 0.5rem)
                    max(1rem, env(safe-area-inset-right, 0px) + 0.5rem) !important;
    gap: 0.5rem !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    box-sizing: border-box !important;
  }
  .logo {
    font-size: 1.15rem !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }
  .site-mascot-logo {
    width: 32px !important;
    height: 32px !important;
    flex-shrink: 0 !important;
  }
  .header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    flex-shrink: 0 !important;
  }
  .header-actions .theme-toggle-switch {
    display: inline-flex !important;
    flex-shrink: 0 !important;
  }
  .header-actions .nav-signin,
  .header-actions .btn-pro-nav {
    display: none !important; /* Prominently available inside the hamburger drawer */
  }
  .user-account-btn .user-pill-name,
  .user-account-btn .badge-pro-micro,
  .user-account-btn .drop-caret {
    display: none !important;
  }
  .user-account-btn {
    padding: 0.25rem !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    justify-content: center !important;
  }
  .mobile-toggle-btn {
    display: inline-flex !important;
    flex-shrink: 0 !important;
  }

  /* Hero Visual & Mascot */
  .hero-tag-badge {
    font-size: 0.78rem !important;
    padding: 0.35rem 0.75rem !important;
    max-width: 100% !important;
    white-space: normal !important;
    text-align: left !important;
    line-height: 1.3 !important;
    display: inline-flex !important;
  }
  .hero-brand {
    font-size: clamp(2rem, 7.5vw, 2.75rem) !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
  }
  .hero-lead {
    font-size: 1.02rem !important;
    max-width: 100% !important;
  }
  .hero-actions {
    flex-direction: column !important;
    gap: 0.65rem !important;
  }
  .hero-actions .btn {
    width: 100% !important;
    text-align: center;
    justify-content: center;
  }
  .hero-stats-row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.2rem !important;
    text-align: center;
  }
  .hero-stat-item strong {
    font-size: 1.65rem !important;
  }
  .hero-mascot-wrapper {
    max-width: 290px !important;
    margin-inline: auto !important;
  }
  .hero-mascot-img {
    border-radius: 20px !important;
  }
  .floating-vocab-card {
    display: none !important; /* Completely eliminates mobile horizontal viewport overflow */
  }

  /* Interactive Studios Bento Grid */
  .studios-home-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    margin-top: 1.75rem !important;
  }
  .studio-home-card {
    border-radius: 18px !important;
  }
  .studio-card-img-wrap {
    height: 180px !important;
    aspect-ratio: 16 / 9;
  }
  .studio-card-body {
    padding: 1.25rem 1.25rem 1.4rem !important;
  }
  .studio-card-body h3 {
    font-size: 1.3rem !important;
    margin-bottom: 0.4rem !important;
  }
  .studio-card-body p {
    font-size: 0.92rem !important;
    margin-bottom: 1.25rem !important;
  }
  .studio-card-body .btn {
    width: 100% !important;
    text-align: center;
    justify-content: center;
  }

  /* CEFR 7-Level Mosaic */
  .level-mosaic {
    grid-template-columns: 1fr !important;
    gap: 1.15rem !important;
  }
  .level-tile {
    padding: 1.35rem 1.2rem !important;
    border-radius: 16px !important;
  }

  /* Pricing Cards Grid */
  .pricing-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  .pricing-card {
    padding: 1.75rem 1.25rem !important;
    border-radius: 18px !important;
  }

  /* Stories Page & Bilingual Panels */
  .story-bilingual-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  .story-page-section .glass-card {
    padding: 1.35rem 1.1rem !important;
    border-radius: 16px !important;
  }
  .sentence-row-card {
    padding: 1rem 0.85rem !important;
    gap: 0.75rem !important;
  }
  .sentence-row-card strong {
    font-size: 0.96rem !important;
  }

  /* Grammar & Syllabus Studio */
  .grammar-hero-banner {
    padding: 1.5rem 1.25rem !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
    border-radius: 18px !important;
    text-align: left !important;
  }
  .grammar-hero-text {
    min-width: 0 !important;
    width: 100% !important;
  }
  .grammar-hero-title {
    font-size: 1.85rem !important;
  }
  .grammar-hero-mascot-box {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }
  .grammar-mascot-img {
    width: 100% !important;
    max-width: 280px !important;
    height: auto !important;
    aspect-ratio: 16 / 10;
  }
  .grammar-detailed-card {
    padding: 1.35rem 1.1rem !important;
    border-radius: 16px !important;
  }
  .hud-table-wrap {
    margin: 0.85rem 0 1.25rem !important;
    border-radius: 10px !important;
    -webkit-overflow-scrolling: touch;
  }
  .hud-table {
    min-width: 480px !important;
  }

  /* Vocabulary Studio */
  .controls-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    padding: 1rem !important;
    border-radius: 14px !important;
  }
  .vocab-search-input,
  .vocab-cat-select {
    width: 100% !important;
    min-width: 0 !important;
  }
  .vocab-bento-grid {
    grid-template-columns: 1fr !important;
    gap: 1.15rem !important;
  }
  .vocab-hero-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    text-align: center;
  }
  .vocab-hero-stats {
    justify-content: center !important;
    gap: 1.5rem !important;
  }
  .illustration-wrapper {
    max-width: 280px !important;
    margin-inline: auto !important;
  }
  .float-top {
    top: 8px !important;
    right: 8px !important;
  }
  .float-bottom {
    bottom: 8px !important;
    left: 8px !important;
  }

  /* Level Selector Pill Bar */
  .level-bar-wrap {
    margin: 1.25rem 0 1.75rem !important;
  }
  .level-bar {
    border-radius: 16px !important;
    padding: 0.35rem !important;
    gap: 0.35rem !important;
    width: 100% !important;
  }
  .level-btn {
    padding: 0.42rem 0.75rem !important;
    font-size: 0.82rem !important;
  }

  /* Success Stories ITA Grid */
  .ita-success-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Home PRO Banner Card & Actions */
  .home-pro-banner-card {
    padding: 2rem 1.25rem !important;
  }
  .home-pro-actions {
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.75rem !important;
  }
  .home-pro-btn-unlock,
  .home-pro-btn-compare {
    width: 100% !important;
    padding: 0.85rem 1rem !important;
    font-size: 0.98rem !important;
    text-align: center !important;
    justify-content: center !important;
    white-space: normal !important;
    border-radius: 999px !important;
  }

  /* Floating Support Modal on Mobile */
  .floating-support-btn {
    bottom: 18px !important;
    right: 16px !important;
    padding: 0.55rem 0.95rem !important;
    font-size: 0.84rem !important;
  }
  .floating-support-dialog {
    padding: 1.5rem 1.25rem !important;
    border-radius: 18px !important;
    width: 94% !important;
    margin-inline: auto !important;
  }

  /* Checkout & Dual Gateway Switcher Mobile Fit */
  .gateway-switch-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }
  .checkout-grid {
    grid-template-columns: 1fr !important;
    gap: 1.75rem !important;
  }
  .checkout-grid .card {
    padding: 1.4rem 1.15rem !important;
    border-radius: 18px !important;
  }

  /* Footer Mobile Fit */
  .footer-ambient-glow {
    width: 100% !important;
    max-width: 100vw !important;
    left: 0 !important;
    transform: none !important;
  }
}

/* Compact Smartphones (< 480px: iPhone SE, Galaxy S, Pixel) */
@media (max-width: 480px) {
  .hero-brand {
    font-size: 2.05rem !important;
  }
  .hero-stats-row {
    gap: 0.85rem !important;
  }
  .hero-stat-item strong {
    font-size: 1.45rem !important;
  }
  .grammar-hero-title {
    font-size: 1.65rem !important;
  }
  .level-bar {
    justify-content: center !important;
  }
  .level-btn strong {
    font-size: 0.85rem !important;
  }
  .level-btn span {
    font-size: 0.72rem !important;
  }
}

/* Razorpay Payment Button Integration & Interactive Checkout */
.razorpay-interactive-card {
  background: rgba(20, 184, 166, 0.05);
  border: 1px solid rgba(20, 184, 166, 0.25);
  border-radius: 16px;
  padding: 1.4rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.razorpay-interactive-card:hover {
  border-color: rgba(20, 184, 166, 0.4);
  box-shadow: 0 8px 30px rgba(20, 184, 166, 0.12);
}

.razorpay-embed-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1.25rem 0 0.75rem;
  width: 100%;
}

.razorpay-embed-wrapper form {
  width: 100%;
  display: flex;
  justify-content: center;
}

.razorpay-embed-wrapper .razorpay-payment-button,
.razorpay-embed-wrapper [class*="PaymentButton"] {
  width: 100% !important;
  max-width: 440px !important;
  min-height: 52px !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 25px rgba(20, 184, 166, 0.35), 0 0 15px rgba(37, 99, 235, 0.2) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.razorpay-embed-wrapper .razorpay-payment-button:hover,
.razorpay-embed-wrapper [class*="PaymentButton"]:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 32px rgba(20, 184, 166, 0.5), 0 0 20px rgba(37, 99, 235, 0.35) !important;
}

.payment-methods-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.76rem;
  color: #cbd5e1;
  margin: 0.85rem 0;
}

.payment-method-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.payment-method-pill:hover {
  background: rgba(20, 184, 166, 0.12);
  border-color: rgba(20, 184, 166, 0.3);
  color: #fff;
}

.verify-id-panel {
  margin-top: 1.25rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  padding-top: 1rem;
}

.verify-id-toggle {
  background: none;
  border: none;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  transition: color 0.2s ease;
}

.verify-id-toggle:hover {
  color: #5eead4;
  text-decoration: underline;
}

.verify-id-body {
  margin-top: 0.85rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(20, 184, 166, 0.2);
  border-radius: 12px;
  padding: 1.1rem;
}

/* ==========================================================================
   AUDIO NUMBER TRAINER & CONVERTER STUDIO STYLES
   ========================================================================== */
.number-hero-banner {
  background: radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 10% 80%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
              rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 2.25rem 2.5rem;
  margin-bottom: 2.25rem;
  position: relative;
  overflow: hidden;
}
[data-theme="light"] .number-hero-banner {
  background: linear-gradient(135deg, #f0fdfa 0%, #ede9fe 100%) !important;
  border-color: rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
}

/* Number Converter Bento Card */
.number-converter-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(20, 184, 166, 0.3);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.3), 0 0 25px rgba(20, 184, 166, 0.1);
  position: relative;
  overflow: hidden;
}
[data-theme="light"] .number-converter-card {
  background: #ffffff !important;
  border-color: rgba(20, 184, 166, 0.4) !important;
  box-shadow: 0 12px 30px rgba(20, 184, 166, 0.08) !important;
}

.converter-output-display {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
[data-theme="light"] .converter-output-display {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

.converter-french-word {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  font-weight: 800;
  color: var(--teal);
  line-height: 1.2;
}

/* Preset Quick Pill Buttons */
.num-preset-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-line);
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.3rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.num-preset-pill:hover {
  background: rgba(20, 184, 166, 0.2);
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-2px);
}
[data-theme="light"] .num-preset-pill {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #334155;
}

/* Tricky Numbers Grid */
.tricky-numbers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
.tricky-num-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-line);
  border-radius: 16px;
  padding: 1.25rem;
  position: relative;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s;
}
.tricky-num-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.15);
}
[data-theme="light"] .tricky-num-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

/* Number Tiles Grid */
.number-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.85rem;
}
.num-tile {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: 14px;
  padding: 1rem 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  user-select: none;
}
.num-tile:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: var(--teal);
  box-shadow: 0 10px 20px -5px rgba(20, 184, 166, 0.25);
}
[data-theme="light"] .num-tile {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}
[data-theme="light"] .num-tile:hover {
  background: #f0fdfa !important;
  border-color: var(--teal) !important;
}
.num-digit {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 0.35rem;
}
.num-french {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--teal);
  line-height: 1.2;
  margin-bottom: 0.2rem;
}
.num-phonetic {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.num-tile.playing-audio {
  border-color: var(--teal) !important;
  background: rgba(20, 184, 166, 0.15) !important;
  box-shadow: 0 0 20px rgba(20, 184, 166, 0.4) !important;
  transform: scale(1.06) !important;
}

/* Audio Number Ear Trainer Quiz Card */
.number-ear-quiz-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(20, 184, 166, 0.08) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2.5rem;
}
[data-theme="light"] .number-ear-quiz-card {
  background: linear-gradient(135deg, #eef2ff 0%, #f0fdfa 100%) !important;
  border-color: #c7d2fe !important;
}

/* ==========================================================================
   6-MONTH STUDY ROADMAP MODERN STYLES
   ========================================================================== */
.roadmap-step-pill-nav {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 2rem;
  scrollbar-width: thin;
}
.roadmap-step-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-line);
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.roadmap-step-btn:hover, .roadmap-step-btn.active {
  background: rgba(20, 184, 166, 0.15);
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-2px);
}
[data-theme="light"] .roadmap-step-btn {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #475569;
}
[data-theme="light"] .roadmap-step-btn:hover, [data-theme="light"] .roadmap-step-btn.active {
  background: #ccfbf1;
  color: #0f766e;
  border-color: #14b8a6;
}

.roadmap-milestone-card {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: 20px;
  padding: 2.25rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
  box-shadow: var(--shadow-bento);
  position: relative;
  overflow: hidden;
}
.roadmap-milestone-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4), 0 0 30px rgba(20, 184, 166, 0.18);
}
[data-theme="light"] .roadmap-milestone-card {
  background: #ffffff !important;
  border-color: rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
}

.roadmap-checklist-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-line);
  font-size: 0.88rem;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}
.roadmap-checklist-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
  cursor: pointer;
}

/* TEF & TCF Interactive CLB / CRS Calculator Widget */
.clb-calc-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-bento);
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}
[data-theme="light"] .clb-calc-widget {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}
.clb-calc-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 900px) {
  .clb-calc-grid {
    grid-template-columns: 1fr;
  }
}
.calc-input-group {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-line);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
  transition: border-color 0.25s ease, background 0.25s ease;
}
[data-theme="light"] .calc-input-group {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.calc-input-group:focus-within {
  border-color: var(--teal);
}
.calc-slider {
  width: 100%;
  accent-color: var(--teal);
  cursor: pointer;
}
.calc-result-card {
  background: linear-gradient(145deg, rgba(20, 184, 166, 0.1) 0%, rgba(15, 23, 42, 0.4) 100%);
  border: 1px solid rgba(20, 184, 166, 0.35);
  border-radius: 18px;
  padding: 1.75rem;
  text-align: center;
  position: sticky;
  top: 90px;
}
[data-theme="light"] .calc-result-card {
  background: linear-gradient(145deg, #f0fdf4 0%, #e0f2fe 100%);
  border-color: #86efac;
}
.calc-result-card.warning-state {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.1) 0%, rgba(15, 23, 42, 0.4) 100%);
  border-color: rgba(245, 158, 11, 0.35);
}
[data-theme="light"] .calc-result-card.warning-state {
  background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #fde68a;
}
.calc-badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
}
.clb-pill-met {
  background: rgba(20, 184, 166, 0.2);
  color: #14b8a6;
  border: 1px solid rgba(20, 184, 166, 0.4);
}
[data-theme="light"] .clb-pill-met {
  background: #ccfbf1;
  color: #0f766e;
  border-color: #5eead4;
}
.clb-pill-miss {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
[data-theme="light"] .clb-pill-miss {
  background: #fef3c7;
  color: #b45309;
  border-color: #fcd34d;
}
.calc-preset-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-line);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.calc-preset-chip:hover {
  background: rgba(20, 184, 166, 0.15);
  color: var(--teal);
  border-color: var(--teal);
}
[data-theme="light"] .calc-preset-chip {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}
[data-theme="light"] .calc-preset-chip:hover {
  background: #f0fdf4;
  color: #0f766e;
  border-color: #14b8a6;
}

/* ==========================================================================
   CARTOON FRENCH — MODERN RESPONSIVE ENGINE & HOMEPAGE UI REDESIGN
   ========================================================================== */

/* Universal Layout & Overflow Safety */
html, body {
  overflow-x: clip;
  max-width: 100vw;
}

/* 1. Base Grid Systems */
.ita-success-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.home-pro-banner-card {
  max-width: 1120px;
  margin: 0 auto;
  padding: 3.25rem 2.85rem;
  background: radial-gradient(circle at top, rgba(20, 184, 166, 0.12), transparent 70%),
              linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
  border: 1.5px solid rgba(20, 184, 166, 0.35);
  border-radius: 28px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 40px rgba(20, 184, 166, 0.15);
}
[data-theme="light"] .home-pro-banner-card {
  background: radial-gradient(circle at top, rgba(20, 184, 166, 0.08), transparent 70%),
              linear-gradient(145deg, #ffffff, #f0fdfa);
  border-color: rgba(20, 184, 166, 0.35);
  box-shadow: 0 20px 50px -12px rgba(15, 23, 42, 0.1);
}

.home-pro-checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  max-width: 960px;
  margin: 0 auto 2.25rem;
  text-align: left;
}

.studios-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

/* 2. Keyframe Animations & Micro-Interactions */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

@keyframes floatSlowRev {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(8px) rotate(-1deg); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(20, 184, 166, 0.35); }
  50% { box-shadow: 0 0 30px rgba(20, 184, 166, 0.7); }
}

@keyframes soundwaveAnim {
  0%, 100% { height: 6px; }
  50% { height: 18px; }
}

@keyframes shimmerAnim {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Floating Badges with Smooth Animation */
.floating-badge-animated-1 {
  animation: floatSlow 5s ease-in-out infinite;
}
.floating-badge-animated-2 {
  animation: floatSlowRev 6s ease-in-out infinite 0.5s;
}

/* 3. Hero Interactive Daily French Learning Card */
.hero-daily-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(20, 184, 166, 0.35);
  border-radius: 20px;
  padding: 1.35rem 1.5rem;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6), 0 0 25px rgba(20, 184, 166, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  margin-top: 1.5rem;
  transition: border-color 0.3s ease, transform 0.3s ease;
  text-align: left;
}
[data-theme="light"] .hero-daily-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(20, 184, 166, 0.3);
  box-shadow: 0 15px 35px -10px rgba(15, 23, 42, 0.1), 0 0 20px rgba(20, 184, 166, 0.08);
}
.hero-daily-card:hover {
  border-color: rgba(20, 184, 166, 0.6);
  transform: translateY(-2px);
}
.daily-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}
.daily-french-word-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}
.daily-french-word {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.daily-phonetic {
  font-family: var(--font-mono, monospace);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
}
.daily-translation {
  font-size: 0.98rem;
  color: #94a3b8;
  margin-bottom: 0.6rem;
}
[data-theme="light"] .daily-translation {
  color: #475569;
}
.daily-example-box {
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--teal);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.86rem;
  color: var(--ink);
  line-height: 1.4;
}
[data-theme="light"] .daily-example-box {
  background: rgba(15, 23, 42, 0.03);
}

/* Audio Playback Trigger Button */
.btn-play-audio {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(20, 184, 166, 0.5);
  color: var(--teal) !important;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.btn-play-audio:hover {
  background: var(--teal);
  color: #0b0f17 !important;
  box-shadow: 0 4px 18px rgba(20, 184, 166, 0.4);
  transform: scale(1.04);
}
.btn-play-audio.playing-audio {
  background: var(--teal);
  color: #0b0f17 !important;
  animation: pulseGlow 1.2s infinite;
}

/* 4. Interactive Learning Goal Selector */
.goal-selector-nav {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 1.75rem auto 2rem;
  max-width: 900px;
}
.goal-selector-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-line);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
[data-theme="light"] .goal-selector-pill {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}
.goal-selector-pill:hover {
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-2px);
}
.goal-selector-pill.active {
  background: linear-gradient(135deg, var(--teal), #0d9488);
  border-color: transparent;
  color: #0b0f17 !important;
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.35);
}
.goal-detail-card {
  display: none;
  animation: dropFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.goal-detail-card.active {
  display: block;
}

/* 5. Interactive 60-Second Mini-Quiz */
.mini-quiz-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.85), rgba(30, 41, 59, 0.75));
  border: 1px solid rgba(20, 184, 166, 0.3);
  border-radius: 24px;
  padding: 2.5rem 3rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 35px rgba(20, 184, 166, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  max-width: 920px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
[data-theme="light"] .mini-quiz-card {
  background: linear-gradient(145deg, #ffffff, #f0fdfa);
  border-color: rgba(20, 184, 166, 0.25);
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.08);
}
.mini-quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}
.mini-quiz-badge {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--teal);
  background: rgba(20, 184, 166, 0.15);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
}
.mini-quiz-step {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}
.mini-quiz-progress-bar {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}
[data-theme="light"] .mini-quiz-progress-bar {
  background: #e2e8f0;
}
.mini-quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  border-radius: 999px;
  transition: width 0.35s ease;
}
.mini-quiz-question {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 1.25rem;
  line-height: 1.35;
}
.mini-quiz-options {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}
.mini-quiz-opt-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.85rem 1.15rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border-line);
  border-radius: 12px;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}
[data-theme="light"] .mini-quiz-opt-btn {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.mini-quiz-opt-btn:hover:not(:disabled) {
  border-color: var(--teal);
  background: rgba(20, 184, 166, 0.08);
  transform: translateX(4px);
}
.mini-quiz-opt-btn .opt-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--teal);
  flex-shrink: 0;
}
.mini-quiz-opt-btn.is-correct {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
}
.mini-quiz-opt-btn.is-wrong {
  background: rgba(244, 63, 94, 0.15) !important;
  border-color: #f43f5e !important;
  color: #fb7185 !important;
  opacity: 0.7;
}
.mini-quiz-feedback {
  padding: 1.1rem;
  border-radius: 14px;
  margin-top: 0.75rem;
  animation: dropFadeIn 0.25s ease;
}
.mini-quiz-feedback.fb-correct {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--ink);
}
.mini-quiz-feedback.fb-wrong {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--ink);
}
.btn-play-mini-audio {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.mini-quiz-results {
  text-align: center;
  padding: 1rem 0;
}
.mini-quiz-trophy {
  font-size: 3rem;
  animation: floatSlow 3s ease-in-out infinite;
}

/* 6. Active Learning Flywheel Cards (The 4 Pillars) */
.flywheel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.85rem;
  margin-top: 2.5rem;
}
.flywheel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: 22px;
  padding: 2.25rem 1.85rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-bento);
  transition: transform 0.3s var(--ease), border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}
.flywheel-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.flywheel-card:hover {
  transform: translateY(-6px);
  border-color: rgba(20, 184, 166, 0.4);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5), 0 0 25px rgba(20, 184, 166, 0.15);
}
.flywheel-card:hover::before {
  opacity: 1;
}
.flywheel-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  margin-bottom: 1.25rem;
}
.flywheel-card h3 {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 0.5rem;
}
.flywheel-card p {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
  margin: 0;
  flex-grow: 1;
}

/* 7. Enhanced Bento Cards */
.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: 20px;
  box-shadow: var(--shadow-bento);
  transition: transform 0.25s var(--ease), border-color 0.25s ease, box-shadow 0.25s ease;
}
.bento-card:hover {
  border-color: rgba(20, 184, 166, 0.35);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(20, 184, 166, 0.1);
  transform: translateY(-3px);
}

/* 8. FAQ Accordion */
.faq-accordion {
  max-width: 980px;
  margin: 2.5rem auto 0;
  display: grid;
  gap: 1rem;
}
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.faq-item:hover {
  border-color: rgba(20, 184, 166, 0.4);
  box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.3);
}
.faq-item summary {
  padding: 1.25rem 1.65rem;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: '+';
  font-size: 1.35rem;
  color: var(--teal);
  transition: transform 0.25s ease;
}
.faq-item[open] summary::after {
  content: '−';
  transform: rotate(180deg);
}
.faq-content {
  padding: 0 1.65rem 1.45rem;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.7;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 0.85rem;
}
[data-theme="light"] .faq-content {
  border-top-color: rgba(15, 23, 42, 0.06);
}

/* 9. Scroll Reveal Utility */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* 10. Universal Responsive Enhancements */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 2.25rem !important;
    text-align: center;
  }
  .hero-actions {
    justify-content: center !important;
  }
  .hero-stats-row {
    justify-content: center !important;
  }
  .studios-home-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.25rem !important;
  }
  .flywheel-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  /* Header & Navigation Fixes */
  .site-header-inner {
    height: 60px !important;
    padding-inline: clamp(1rem, 2.2vw, 1.25rem) !important;
    padding-block: 0 !important;
  }
  .user-account-popover {
    right: 0 !important;
    left: auto !important;
    transform: none !important;
    min-width: 260px !important;
    max-width: calc(100vw - 1.5rem) !important;
  }

  /* Hero & Visuals */
  .hero {
    padding-top: 2rem !important;
    padding-bottom: 3rem !important;
  }
  .hero-brand {
    font-size: clamp(1.9rem, 7vw, 2.5rem) !important;
  }
  .hero-lead {
    font-size: 0.98rem !important;
  }
  .hero-actions {
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.65rem !important;
  }
  .hero-actions .btn {
    width: 100% !important;
    justify-content: center !important;
    min-height: 48px !important;
  }
  .hero-stats-row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }

  /* Studios & Content */
  .studios-home-grid {
    grid-template-columns: 1fr !important;
  }
  .flywheel-grid {
    grid-template-columns: 1fr !important;
  }
  .mini-quiz-card {
    padding: 1.5rem 1.25rem !important;
    border-radius: 20px !important;
  }
  .level-mosaic {
    grid-template-columns: 1fr !important;
  }
  .home-pro-actions {
    flex-direction: column !important;
    width: 100% !important;
  }
  .home-pro-actions .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Floating Support Button Positioning */
  .floating-support-btn {
    bottom: 16px !important;
    right: 14px !important;
    padding: 0.5rem 0.85rem !important;
    font-size: 0.82rem !important;
    z-index: 990;
  }
}

@media (max-width: 480px) {
  .hero-brand {
    font-size: 1.85rem !important;
  }
  .daily-french-word {
    font-size: 1.35rem !important;
  }
  .hero-stat-item strong {
    font-size: 1.35rem !important;
  }
  .goal-selector-pill {
    padding: 0.45rem 0.85rem !important;
    font-size: 0.8rem !important;
  }
  .mini-quiz-question {
    font-size: 1.1rem !important;
  }
  .mini-quiz-opt-btn {
    padding: 0.75rem 0.9rem !important;
    font-size: 0.9rem !important;
  }
}

/* ==========================================================================
   CANDIDATE HELP & SUPPORT DESK - WORLD-CLASS UI & ANIMATIONS
   Clean, Spacious, Beautiful & Fully Responsive
   ========================================================================== */

/* Hero Section & Trust Strip */
.support-hero-section {
  padding-top: 2rem;
}

.support-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(20, 184, 166, 0.1);
  border: 1px solid rgba(20, 184, 166, 0.3);
  padding: 0.45rem 1.15rem;
  border-radius: 999px;
  box-shadow: 0 0 20px rgba(20, 184, 166, 0.15);
}

.support-status-text {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--teal);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.support-hero-title-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.15rem;
  margin-bottom: 0.85rem;
}

.support-hero-mascot {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid var(--teal);
  box-shadow: 0 0 20px rgba(20, 184, 166, 0.35);
  object-fit: cover;
  flex-shrink: 0;
}

.support-hero-heading {
  margin: 0;
  font-size: clamp(2.1rem, 4.5vw, 3rem);
  color: var(--ink);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.support-hero-lead {
  max-width: 680px;
  margin: 0.85rem auto 1.35rem;
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
}

.support-trust-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.trust-pill {
  background: var(--surface-soft, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border-line);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
}

/* Channels Bento Grid */
.support-channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.support-channel-card {
  background: var(--surface);
  border: 1px solid var(--border-line);
  border-radius: 18px;
  padding: 1.5rem 1.35rem;
  display: flex;
  align-items: flex-start;
  gap: 1.15rem;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.support-channel-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--primary));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.support-channel-card:hover {
  transform: translateY(-4px);
  border-color: rgba(20, 184, 166, 0.45);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(20, 184, 166, 0.2);
}

.support-channel-card:hover::before {
  opacity: 1;
}

.support-channel-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.icon-pro { background: rgba(20, 184, 166, 0.15); color: var(--teal); }
.icon-canada { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.icon-audio { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.icon-priority { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }

.support-channel-card:hover .support-channel-icon {
  transform: scale(1.12) rotate(-4deg);
}

.support-channel-content h4 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.35rem;
  line-height: 1.35;
}

.support-channel-content p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

/* Support Form Card & Topbar */
.support-form-card {
  background: var(--surface);
  border: 1px solid var(--border-line);
  border-radius: 24px;
  padding: 2.75rem 2.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.07), 0 0 1px rgba(0, 0, 0, 0.08);
  position: relative;
  backdrop-filter: blur(12px);
}

.support-form-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-line);
}

.support-form-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 0.35rem;
  line-height: 1.25;
}

.support-form-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.support-priority-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
}

/* Section Labels & Hints */
.support-section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.support-section-label > span:first-child {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.support-label-hint {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

/* Category Grid & Cards (Clean 3-column / 2-column layout, no cramping) */
.support-category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.support-category-card {
  position: relative;
  cursor: pointer;
  border: 1.5px solid var(--border-line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  background: var(--surface-soft, rgba(255, 255, 255, 0.02));
  display: flex;
  align-items: center;
  gap: 0.85rem;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.support-category-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cat-card-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
}

.cat-card-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.cat-card-text strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.cat-card-text span {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.35;
}

.support-category-card:hover {
  border-color: var(--teal);
  background: rgba(20, 184, 166, 0.06);
  transform: translateY(-2px);
}

.support-category-card.active {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.16) 0%, rgba(37, 99, 235, 0.12) 100%);
  border-color: var(--teal);
  box-shadow: 0 4px 16px rgba(20, 184, 166, 0.22);
  transform: translateY(-1px);
}

.support-category-card.active .cat-card-text strong {
  color: var(--teal);
}

[data-theme="dark"] .support-category-card.active .cat-card-text strong {
  color: #5eead4;
}

/* Priority Options */
.support-priority-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.support-priority-pill {
  position: relative;
  cursor: pointer;
  border: 1.5px solid var(--border-line);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  background: var(--surface-soft, rgba(255, 255, 255, 0.02));
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  transition: all 0.2s ease;
  user-select: none;
}

.support-priority-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.priority-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-green { background: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }
.dot-amber { background: #f59e0b; box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); }
.dot-red { background: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }

.priority-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.priority-desc {
  font-size: 0.78rem;
  color: var(--muted);
}

.support-priority-pill:hover {
  border-color: var(--teal);
  background: rgba(20, 184, 166, 0.05);
}

.support-priority-pill.active {
  border-color: var(--teal);
  background: rgba(20, 184, 166, 0.12);
  box-shadow: 0 3px 12px rgba(20, 184, 166, 0.18);
}

/* Candidate Details 2-Column Row */
.support-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.support-field-group {
  position: relative;
}

.support-field-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.45rem;
  letter-spacing: 0.01em;
}

.text-rose {
  color: #f43f5e;
  font-weight: 800;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon {
  position: absolute;
  left: 0.95rem;
  font-size: 1.05rem;
  pointer-events: none;
  opacity: 0.7;
}

.support-input-field {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.85rem !important;
  font-size: 0.94rem !important;
  border-radius: 12px !important;
  border: 1.5px solid var(--border-line) !important;
  background: var(--surface-soft, rgba(255, 255, 255, 0.04)) !important;
  color: var(--ink) !important;
  transition: all 0.22s ease !important;
}

.support-input-field:focus {
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 3.5px rgba(20, 184, 166, 0.2) !important;
  outline: none !important;
}

/* Quick Topic Chips */
.support-hint-text {
  font-size: 0.8rem;
  color: var(--muted);
}

.support-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.support-chip-btn {
  background: var(--surface-soft, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border-line);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  line-height: 1.4;
}

.support-chip-btn:hover {
  background: rgba(20, 184, 166, 0.12);
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-1px);
}

/* Message Textarea */
.support-char-counter {
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.support-textarea-field {
  width: 100%;
  padding: 0.85rem 1rem !important;
  font-size: 0.94rem !important;
  line-height: 1.65 !important;
  font-family: inherit !important;
  border-radius: 12px !important;
  border: 1.5px solid var(--border-line) !important;
  background: var(--surface-soft, rgba(255, 255, 255, 0.04)) !important;
  color: var(--ink) !important;
  resize: vertical;
  min-height: 125px;
  transition: all 0.22s ease !important;
}

.support-textarea-field:focus {
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 3.5px rgba(20, 184, 166, 0.2) !important;
  outline: none !important;
}

/* Submit Button */
.btn-support-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.05rem 1.75rem;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #0d9488 0%, #0284c7 50%, #2563eb 100%);
  background-size: 200% 200%;
  color: #ffffff !important;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.35);
  animation: btnGlowPulse 4s ease infinite;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 0.5rem;
}

.btn-support-submit:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 14px 36px rgba(13, 148, 136, 0.5);
}

.btn-support-submit:active {
  transform: translateY(0) scale(0.99);
}

.btn-support-submit:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none !important;
}

.support-form-footer-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 1rem 0 0;
  line-height: 1.5;
}

/* Success View */
.support-success-view {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.support-success-title {
  font-size: 1.95rem;
  font-weight: 800;
  color: var(--ink);
  margin: 1rem 0 0.5rem;
  line-height: 1.25;
}

.support-success-desc {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto 1.75rem;
  line-height: 1.7;
}

.ticket-ref-banner {
  background: rgba(20, 184, 166, 0.08);
  border: 1.5px dashed var(--teal);
  border-radius: 16px;
  padding: 1.35rem 1.75rem;
  max-width: 480px;
  margin: 0 auto 1.75rem;
}

.ticket-ref-subtitle {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.ticket-ref-text {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}

.ticket-ref-status {
  font-size: 0.82rem;
  color: var(--teal);
  margin-top: 0.45rem;
  font-weight: 600;
}

.support-success-actions {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* FAQ Accordion Styling */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border-line);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  transition: all 0.2s ease;
}

.faq-item[open] {
  border-color: rgba(20, 184, 166, 0.4);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

.faq-item summary {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 1.75rem;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '▾';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: translateY(-50%) rotate(180deg);
  color: var(--teal);
}

.faq-content {
  margin-top: 0.95rem;
  font-size: 0.94rem;
  color: var(--muted);
  line-height: 1.7;
  border-top: 1px solid var(--border-line);
  padding-top: 0.95rem;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .support-category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .support-form-card {
    padding: 1.75rem 1.35rem;
    border-radius: 18px;
  }
  .support-input-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .support-priority-options {
    grid-template-columns: 1fr;
  }
  .ticket-ref-text {
    font-size: 1.45rem;
  }
  .btn-support-submit {
    font-size: 1rem;
    padding: 0.95rem 1.35rem;
  }
}

@media (max-width: 540px) {
  .support-category-grid {
    grid-template-columns: 1fr;
  }
  .support-hero-heading {
    font-size: 1.85rem;
  }
  .support-channel-card {
    padding: 1.15rem;
  }
}

/* ==========================================================================
   MASTER DUAL-THEME HARMONIZATION ENGINE (Light Mode & Dark Mode Integrity)
   Guarantees zero white-on-white, zero black-on-black, and 100% legibility
   ========================================================================== */

/* 1. Base Glass Card Dark / Light Integrity */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  color: var(--ink);
  box-shadow: var(--shadow-bento);
}

/* 2. Candidate Support Page Light Theme */
[data-theme="light"] .support-hero-heading {
  color: #0f172a !important;
}
[data-theme="light"] .support-hero-lead {
  color: #334155 !important;
}
[data-theme="light"] .trust-pill {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  color: #334155 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}
[data-theme="light"] .support-channel-card {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06) !important;
}
[data-theme="light"] .support-channel-content h4 {
  color: #0f172a !important;
}
[data-theme="light"] .support-channel-content p {
  color: #475569 !important;
}
[data-theme="light"] .support-form-card {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08) !important;
}
[data-theme="light"] .support-form-title {
  color: #0f172a !important;
}
[data-theme="light"] .support-form-subtitle {
  color: #475569 !important;
}
[data-theme="light"] .support-form-topbar {
  border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}
[data-theme="light"] .support-section-label > span:first-child {
  color: #0f172a !important;
}
[data-theme="light"] .support-label-hint {
  color: #64748b !important;
}
[data-theme="light"] .support-category-card {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}
[data-theme="light"] .support-category-card:hover {
  background: #f0fdfa !important;
  border-color: var(--teal) !important;
}
[data-theme="light"] .support-category-card.active {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.12) 0%, rgba(37, 99, 235, 0.06) 100%) !important;
  border-color: var(--teal) !important;
}
[data-theme="light"] .cat-card-text strong {
  color: #0f172a !important;
}
[data-theme="light"] .cat-card-text span {
  color: #64748b !important;
}
[data-theme="light"] .support-priority-pill {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}
[data-theme="light"] .support-priority-pill:hover {
  border-color: var(--teal) !important;
  background: rgba(20, 184, 166, 0.06) !important;
}
[data-theme="light"] .support-priority-pill.active {
  border-color: var(--teal) !important;
  background: rgba(20, 184, 166, 0.12) !important;
}
[data-theme="light"] .priority-title {
  color: #0f172a !important;
}
[data-theme="light"] .priority-desc {
  color: #64748b !important;
}
[data-theme="light"] .support-field-label {
  color: #0f172a !important;
}
[data-theme="light"] .support-input-field {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.18) !important;
  color: #0f172a !important;
}
[data-theme="light"] .support-input-field:focus {
  background: #ffffff !important;
  border-color: var(--teal) !important;
}
[data-theme="light"] .support-chip-btn {
  background: #f1f5f9 !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  color: #334155 !important;
}
[data-theme="light"] .support-chip-btn:hover {
  background: rgba(20, 184, 166, 0.12) !important;
  border-color: var(--teal) !important;
  color: var(--teal) !important;
}
[data-theme="light"] .support-textarea-field {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.18) !important;
  color: #0f172a !important;
}
[data-theme="light"] .support-textarea-field:focus {
  background: #ffffff !important;
  border-color: var(--teal) !important;
}
[data-theme="light"] .faq-item {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}
[data-theme="light"] .faq-item summary {
  color: #0f172a !important;
}
[data-theme="light"] .faq-content {
  color: #334155 !important;
  border-top-color: rgba(15, 23, 42, 0.08) !important;
}
[data-theme="light"] .ticket-ref-banner {
  background: rgba(13, 148, 136, 0.08) !important;
  border-color: var(--teal) !important;
}
[data-theme="light"] .ticket-ref-subtitle {
  color: #64748b !important;
}
[data-theme="light"] .ticket-ref-text {
  color: #0f172a !important;
}

/* 3. Checkout & Payment Page Light Theme */
[data-theme="light"] .checkout-panel {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07) !important;
  color: #0f172a !important;
}
[data-theme="light"] .gateway-segmented-control {
  background: #f1f5f9 !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}
[data-theme="light"] .seg-btn {
  color: #475569 !important;
}
[data-theme="light"] .seg-btn:hover {
  color: #0f172a !important;
  background: rgba(15, 23, 42, 0.04) !important;
}
[data-theme="light"] .seg-btn.active-india {
  background: #ffffff !important;
  border-color: var(--teal) !important;
  color: var(--teal) !important;
  box-shadow: 0 4px 15px rgba(20, 184, 166, 0.15) !important;
}
[data-theme="light"] .seg-btn.active-intl {
  background: #ffffff !important;
  border-color: #0284c7 !important;
  color: #0284c7 !important;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.15) !important;
}
[data-theme="light"] .compact-label {
  color: #334155 !important;
}
[data-theme="light"] .compact-input {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.18) !important;
  color: #0f172a !important;
}
[data-theme="light"] .compact-input:focus {
  background: #ffffff !important;
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15) !important;
}
[data-theme="light"] .paypal-hub-tabs {
  background: #f1f5f9 !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}
[data-theme="light"] .paypal-hub-tab {
  color: #64748b !important;
}
[data-theme="light"] .paypal-hub-tab:hover {
  color: #0f172a !important;
}
[data-theme="light"] .paypal-hub-tab.active {
  background: #ffffff !important;
  color: #0284c7 !important;
  border-color: rgba(2, 132, 199, 0.3) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}
[data-theme="light"] .paypal-qr-box,
[data-theme="light"] .paypal-link-card {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}
[data-theme="light"] .paypal-url-display {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  color: #0284c7 !important;
}
[data-theme="light"] .checkout-toast {
  background: #ffffff !important;
  border-color: var(--teal) !important;
  color: #0f172a !important;
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.15) !important;
}

/* 4. Auth Pages (Login & Register) Hero Pane Light Mode */
[data-theme="light"] .auth-hero-title {
  color: #0f172a !important;
}
[data-theme="light"] .auth-hero-desc {
  color: #334155 !important;
}
[data-theme="light"] .auth-benefit-item {
  color: #1e293b !important;
}
[data-theme="light"] .auth-mascot-card {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08) !important;
}
[data-theme="light"] .auth-mascot-card strong {
  color: #0f172a !important;
}
[data-theme="light"] .auth-mascot-card span {
  color: #475569 !important;
}

/* 5. Reverse Direction Dark Mode Safeguards (Avoid Stuck Dark Text or Light Backgrounds) */
:root:not([data-theme="light"]) [style*="color: #0f172a"]:not(.btn-primary):not(.btn-primary *):not(.badge-pro-status):not(.lvl-chip):not(.dot-green):not(.dot-amber):not(.dot-red),
[data-theme="dark"] [style*="color: #0f172a"]:not(.btn-primary):not(.btn-primary *):not(.badge-pro-status):not(.lvl-chip):not(.dot-green):not(.dot-amber):not(.dot-red) {
  color: #f8fafc !important;
}

:root:not([data-theme="light"]) [style*="color:#0f172a"]:not(.btn-primary):not(.btn-primary *):not(.badge-pro-status):not(.lvl-chip):not(.dot-green):not(.dot-amber):not(.dot-red),
[data-theme="dark"] [style*="color:#0f172a"]:not(.btn-primary):not(.btn-primary *):not(.badge-pro-status):not(.lvl-chip):not(.dot-green):not(.dot-amber):not(.dot-red) {
  color: #f8fafc !important;
}

:root:not([data-theme="light"]) [style*="color: #1e293b"]:not(.btn-primary):not(.btn-primary *),
[data-theme="dark"] [style*="color: #1e293b"]:not(.btn-primary):not(.btn-primary *) {
  color: #e2e8f0 !important;
}

:root:not([data-theme="light"]) [style*="color: #334155"],
[data-theme="dark"] [style*="color: #334155"] {
  color: #94a3b8 !important;
}

/* 6. Grammar & Syllabus HUD Table Borders in Light Mode */
[data-theme="light"] .hud-table th,
[data-theme="light"] .hud-table td {
  border-color: rgba(15, 23, 42, 0.1) !important;
}
[data-theme="light"] .hud-table tr:hover td {
  background: #f8fafc !important;
}

/* ==========================================================================
   FRENCH STUDY NOTES & DIGITAL WORKSPACE — 2026 ULTRA-MODERN SAAS AESTHETIC
   ========================================================================== */
.diary-workspace-section {
  padding-top: 1.5rem;
  padding-bottom: 3.5rem;
}

/* Master-Detail Dual Pane Grid */
.diary-desk {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.5rem;
  align-items: stretch;
  min-height: 740px;
}
@media (max-width: 960px) {
  .diary-desk {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
  }
}

/* --------------------------------------------------------------------------
   LEFT SIDEBAR: MODERN GLASS WORKBENCH
   -------------------------------------------------------------------------- */
.diary-sidebar {
  background: var(--surface, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.25);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
[data-theme="light"] .diary-sidebar {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 16px 40px -10px rgba(15, 23, 42, 0.06);
}

.diary-sidebar-header {
  padding: 1.35rem 1.35rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
[data-theme="light"] .diary-sidebar-header {
  border-bottom-color: rgba(15, 23, 42, 0.06);
}

.diary-sidebar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.diary-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.diary-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.diary-brand-title {
  font-family: var(--font-display, inherit);
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--ink, #f8fafc);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
[data-theme="light"] .diary-brand-title {
  color: #0f172a;
}
.diary-brand-sub {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted, #94a3b8);
  letter-spacing: 0.02em;
}

.diary-counter-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.24);
}

/* New Entry Button */
.btn-new-entry {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  border: none;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
  position: relative;
  overflow: hidden;
}
.btn-new-entry::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: rotate(30deg) translateY(-100%);
  transition: transform 0.6s ease;
}
.btn-new-entry:hover::after {
  transform: rotate(30deg) translateY(100%);
}
.btn-new-entry:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
}
.btn-new-entry:active {
  transform: scale(0.97);
}

/* Modern Search Box */
.diary-search-bar {
  position: relative;
  margin-top: 0.85rem;
}
.diary-search-bar input {
  width: 100%;
  padding: 0.58rem 2.2rem 0.58rem 2.3rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ink, #f8fafc);
  font-size: 0.84rem;
  outline: none;
  transition: all 0.2s ease;
}
[data-theme="light"] .diary-search-bar input {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.1);
  color: #0f172a;
}
.diary-search-bar input:focus {
  border-color: var(--accent, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background: rgba(255, 255, 255, 0.07);
}
[data-theme="light"] .diary-search-bar input:focus {
  background: #ffffff;
}
.diary-search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: var(--muted, #94a3b8);
  pointer-events: none;
}
.diary-search-kbd {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted, #94a3b8);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
[data-theme="light"] .diary-search-kbd {
  background: #e2e8f0;
  color: #64748b;
}

/* Category Filter Chips */
.diary-filter-chips {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.7rem 1.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  scrollbar-width: none;
}
.diary-filter-chips::-webkit-scrollbar {
  display: none;
}
.diary-chip {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted, #94a3b8);
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
[data-theme="light"] .diary-chip {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.06);
  color: #475569;
}
.diary-chip:hover {
  color: var(--ink, #f8fafc);
  transform: translateY(-1px);
  border-color: rgba(99, 102, 241, 0.4);
}
[data-theme="light"] .diary-chip:hover {
  color: #0f172a;
}
.diary-chip.active {
  background: #6366f1 !important;
  border-color: #6366f1 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.35);
  transform: scale(1.02);
}

/* Scrollable Entries List */
.diary-entries-list {
  flex: 1;
  overflow-y: auto;
  max-height: 600px;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}
.diary-entries-list::-webkit-scrollbar {
  width: 5px;
}
.diary-entries-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

/* Modern Item Card */
.diary-item-card {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  position: relative;
  background: rgba(255, 255, 255, 0.015);
}
.diary-item-card:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateX(3px);
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="light"] .diary-item-card {
  background: rgba(15, 23, 42, 0.015);
  border-color: rgba(15, 23, 42, 0.04);
}
[data-theme="light"] .diary-item-card:hover {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}
.diary-item-card.active {
  background: rgba(99, 102, 241, 0.1) !important;
  border-color: rgba(99, 102, 241, 0.35) !important;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12);
  transform: translateX(4px);
}
.diary-item-card.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 4px;
  background: #6366f1;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px #6366f1;
}
[data-theme="light"] .diary-item-card.active {
  background: rgba(99, 102, 241, 0.08) !important;
  border-color: rgba(99, 102, 241, 0.25) !important;
}

/* Date Stamp */
.diary-date-stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 0.35rem 0.25rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  transition: all 0.2s ease;
}
[data-theme="light"] .diary-date-stamp {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.08);
}
.diary-date-day {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  color: var(--ink, #f8fafc);
}
[data-theme="light"] .diary-date-day {
  color: #0f172a;
}
.diary-date-month {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted, #94a3b8);
  margin-top: 2px;
  letter-spacing: 0.05em;
}

.diary-item-body {
  flex: 1;
  min-width: 0;
}
.diary-item-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}
.diary-item-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink, #f8fafc);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s ease;
}
.diary-item-card:hover .diary-item-title,
.diary-item-card.active .diary-item-title {
  color: #6366f1;
}
[data-theme="light"] .diary-item-title {
  color: #0f172a;
}
.diary-item-snippet {
  font-size: 0.78rem;
  color: var(--muted, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.4rem;
  line-height: 1.4;
}
.diary-item-tags {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

/* Micro badges */
.badge-cat-micro {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
}
.badge-lvl-micro {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
}
.tag-media-icon {
  font-size: 0.72rem;
  color: var(--muted, #94a3b8);
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

/* CEFR Color Tokens */
.badge-lvl-a0, .badge-lvl-a1 {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.badge-lvl-a2, .badge-lvl-b1 {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.25);
}
.badge-lvl-b2 {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.25);
}
.badge-lvl-c1, .badge-lvl-c2 {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

/* --------------------------------------------------------------------------
   RIGHT PANE: MODERN CANVAS (CLEAN 2026 SaaS WORKSPACE)
   -------------------------------------------------------------------------- */
.diary-canvas {
  background: var(--surface, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.25);
}
[data-theme="light"] .diary-canvas {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 16px 40px -10px rgba(15, 23, 42, 0.06);
}

.diary-page-container {
  padding: 2.25rem 2.75rem 3.5rem;
  position: relative;
  flex: 1;
  animation: diarySlideUpFade 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@media (max-width: 640px) {
  .diary-page-container {
    padding: 1.5rem 1.25rem 2rem;
  }
}

@keyframes diarySlideUpFade {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.995);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Top Action Header */
.diary-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
[data-theme="light"] .diary-page-header {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

.diary-breadcrumb-strip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted, #94a3b8);
  flex-wrap: wrap;
}
.diary-meta-crumb {
  color: #818cf8;
  font-weight: 700;
}
.diary-crumb-sep {
  opacity: 0.4;
}

/* Floating Action Pill Bar */
.diary-actions-pill-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.btn-diary-act {
  padding: 0.4rem 0.85rem;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink, #f8fafc);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
[data-theme="light"] .btn-diary-act {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.1);
  color: #1e293b;
}
.btn-diary-act:hover {
  transform: translateY(-2px);
  border-color: #6366f1;
  color: #6366f1;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}
.btn-diary-act:active {
  transform: scale(0.96);
}
.btn-act-pdf:hover {
  border-color: #10b981 !important;
  color: #10b981 !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2) !important;
}
.btn-act-share:hover {
  border-color: #0ea5e9 !important;
  color: #0ea5e9 !important;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2) !important;
}
.btn-act-danger:hover {
  border-color: #ef4444 !important;
  color: #ef4444 !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2) !important;
}

/* Note Metadata Chips */
.diary-meta-chips {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.badge-cat-modern {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.22rem 0.75rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.25);
}
.badge-lvl-modern {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 0.22rem 0.75rem;
  border-radius: 999px;
}
.badge-pinned-modern {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.badge-words-count {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted, #94a3b8);
  margin-left: auto;
}

/* Note Title */
.diary-entry-title {
  font-family: var(--font-display, inherit);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 1.25rem;
  color: var(--ink, #f8fafc);
  letter-spacing: -0.025em;
}
[data-theme="light"] .diary-entry-title {
  color: #0f172a;
}
@media (max-width: 640px) {
  .diary-entry-title {
    font-size: 1.7rem;
  }
}

/* YouTube Cinema Frame */
.diary-video-box {
  margin: 1.5rem 0;
  border-radius: 16px;
  overflow: hidden;
  background: #000000;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.diary-video-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}
.diary-video-inner {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}
.diary-video-inner iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Modern Attached PDF Card */
.diary-pdf-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1.25rem;
  border-radius: 14px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.24);
  margin: 1.5rem 0;
  gap: 1rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.diary-pdf-card:hover {
  background: rgba(239, 68, 68, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(239, 68, 68, 0.18);
}
.diary-pdf-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}
.diary-pdf-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.diary-pdf-filename {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink, #f8fafc);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-theme="light"] .diary-pdf-filename {
  color: #0f172a;
}
.diary-pdf-sub {
  font-size: 0.76rem;
  color: var(--muted, #94a3b8);
  margin-top: 1px;
}
.diary-pdf-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.95rem;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  background: #ef4444;
  color: #ffffff;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}
.diary-pdf-download-btn:hover {
  background: #dc2626;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45);
}
.diary-pdf-download-btn:active {
  transform: scale(0.96);
}

/* Modern Photo Grid Gallery */
.diary-gallery-section {
  margin: 1.6rem 0;
}
.diary-gallery-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted, #94a3b8);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.diary-photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.85rem;
}
.diary-photo-card {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  aspect-ratio: 4/3;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
[data-theme="light"] .diary-photo-card {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}
.diary-photo-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  border-color: rgba(99, 102, 241, 0.5);
}
.diary-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-overlay-glass {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.diary-photo-card:hover .photo-overlay-glass {
  opacity: 1;
}

/* Modern Content Typography */
.diary-paper-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink, #f8fafc);
  margin-top: 1.5rem;
  word-break: break-word;
}
[data-theme="light"] .diary-paper-body {
  color: #1e293b;
}

/* Shared View Footer */
.diary-shared-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 1rem;
}
.diary-network-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDotAnim 2s infinite ease-in-out;
}
@keyframes pulseDotAnim {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

/* --------------------------------------------------------------------------
   INLINE MODERN EDITOR
   -------------------------------------------------------------------------- */
.diary-editor-view {
  padding: 2.25rem 2.75rem;
  animation: diarySlideUpFade 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@media (max-width: 640px) {
  .diary-editor-view {
    padding: 1.5rem 1.25rem;
  }
}
.diary-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
[data-theme="light"] .diary-editor-header {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}
.diary-editor-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.editor-icon-badge {
  font-size: 1.5rem;
}
.diary-editor-title {
  margin: 0;
  font-family: var(--font-display, inherit);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink, #f8fafc);
}
[data-theme="light"] .diary-editor-title {
  color: #0f172a;
}
.diary-editor-sub {
  font-size: 0.78rem;
  color: var(--muted, #94a3b8);
  margin-top: 2px;
}

.editor-field-block {
  margin-bottom: 1.35rem;
}
.diary-label {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  display: block;
  color: var(--muted, #94a3b8);
}
.diary-input-modern,
.diary-select-modern {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ink, #f8fafc);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}
[data-theme="light"] .diary-input-modern,
[data-theme="light"] .diary-select-modern {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}
.diary-input-modern:focus,
.diary-select-modern:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
  background: rgba(255, 255, 255, 0.07);
}
[data-theme="light"] .diary-input-modern:focus,
[data-theme="light"] .diary-select-modern:focus {
  background: #ffffff;
}

.diary-control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.35rem;
}
@media (max-width: 550px) {
  .diary-control-grid {
    grid-template-columns: 1fr;
  }
}

/* Media Attachment Dropzone Panel */
.diary-attach-panel {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.2rem;
  margin-bottom: 1.35rem;
}
[data-theme="light"] .diary-attach-panel {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}
.diary-attach-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.diary-attach-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink, #f8fafc);
}
[data-theme="light"] .diary-attach-title {
  color: #0f172a;
}
.diary-attach-hint {
  font-size: 0.74rem;
  color: var(--muted, #94a3b8);
}
.diary-attach-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.diary-attach-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.52rem 0.95rem;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink, #f8fafc);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="light"] .diary-attach-btn {
  border-color: rgba(15, 23, 42, 0.2);
  background: #ffffff;
  color: #1e293b;
}
.diary-attach-btn:hover {
  border-color: #6366f1;
  color: #6366f1;
  transform: translateY(-2px);
  background: rgba(99, 102, 241, 0.06);
}
.diary-attach-btn:active {
  transform: scale(0.96);
}

.diary-modern-textarea {
  width: 100%;
  min-height: 260px;
  padding: 1.1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ink, #f8fafc);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.8;
  outline: none;
  resize: vertical;
  transition: all 0.2s ease;
}
[data-theme="light"] .diary-modern-textarea {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}
.diary-modern-textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
  background: rgba(255, 255, 255, 0.07);
}
[data-theme="light"] .diary-modern-textarea:focus {
  background: #ffffff;
}

.diary-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  user-select: none;
  color: var(--ink, #f8fafc);
}
[data-theme="light"] .diary-toggle-label {
  color: #0f172a;
}
.diary-modern-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #6366f1;
}

.diary-editor-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
[data-theme="light"] .diary-editor-footer {
  border-top-color: rgba(15, 23, 42, 0.08);
}

/* --------------------------------------------------------------------------
   SMART MULTI-TARGET SHARE MODAL (LAN Wi-Fi, Domain, QR Code, Apps)
   -------------------------------------------------------------------------- */
.notes-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.notes-modal-backdrop.active {
  display: flex;
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.notes-modal-dialog {
  background: var(--surface, #1e293b);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  width: 100%;
  max-width: 580px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
[data-theme="light"] .notes-modal-dialog {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.15);
}

.notes-modal-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
[data-theme="light"] .notes-modal-header {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}
.modal-header-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.notes-modal-title {
  margin: 0;
  font-family: var(--font-display, inherit);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink, #f8fafc);
}
[data-theme="light"] .notes-modal-title {
  color: #0f172a;
}
.notes-modal-sub {
  font-size: 0.78rem;
  color: var(--muted, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}
.modal-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--ink, #f8fafc);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
[data-theme="light"] .modal-close-btn {
  background: #f1f5f9;
  color: #0f172a;
}
.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.notes-modal-body {
  padding: 1.35rem 1.5rem;
  max-height: 70vh;
  overflow-y: auto;
}

.share-info-banner {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  color: #c7d2fe;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
[data-theme="light"] .share-info-banner {
  background: rgba(99, 102, 241, 0.06);
  color: #4338ca;
}

.share-link-group {
  margin-bottom: 1.15rem;
}
.share-link-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}
.share-link-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink, #f8fafc);
}
[data-theme="light"] .share-link-label {
  color: #0f172a;
}
.share-icon-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.wifi-pill { color: #10b981; }
.web-pill { color: #38bdf8; }
.custom-pill { color: #c084fc; }

.share-link-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted, #94a3b8);
}
.share-input-copy-wrap {
  display: flex;
  gap: 0.5rem;
}
.share-link-input {
  flex: 1;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ink, #f8fafc);
  font-size: 0.82rem;
  outline: none;
  font-family: monospace;
}
[data-theme="light"] .share-link-input {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}
.btn-copy-link {
  padding: 0.6rem 0.95rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}
.btn-copy-link:hover {
  background: #6366f1;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.btn-copied-glow {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
}
.share-helper-text {
  font-size: 0.72rem;
  color: var(--muted, #94a3b8);
  margin-top: 0.35rem;
}

/* Extras Grid: QR & Quick Social */
.share-extras-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  align-items: center;
}
@media (max-width: 480px) {
  .share-extras-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}
.qr-code-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.qr-code-canvas-wrap {
  width: 130px;
  height: 130px;
  border-radius: 14px;
  background: #ffffff;
  padding: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.qr-code-canvas-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.qr-code-caption {
  font-size: 0.68rem;
  color: var(--muted, #94a3b8);
  text-align: center;
}

.direct-share-tray {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.direct-share-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink, #f8fafc);
}
[data-theme="light"] .direct-share-label {
  color: #0f172a;
}
.direct-share-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.btn-app-share {
  padding: 0.48rem 0.85rem;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-share-whatsapp {
  background: rgba(37, 211, 102, 0.15);
  color: #25d366;
  border: 1px solid rgba(37, 211, 102, 0.3);
}
.btn-share-whatsapp:hover {
  background: #25d366;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}
.btn-share-telegram {
  background: rgba(34, 158, 217, 0.15);
  color: #229ed9;
  border: 1px solid rgba(34, 158, 217, 0.3);
}
.btn-share-telegram:hover {
  background: #229ed9;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(34, 158, 217, 0.35);
}
.btn-share-native {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink, #f8fafc);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
[data-theme="light"] .btn-share-native {
  background: #f1f5f9;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.1);
}
.btn-share-native:hover {
  border-color: #6366f1;
  color: #6366f1;
  transform: translateY(-2px);
}

.notes-modal-footer {
  padding: 0.95rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
[data-theme="light"] .notes-modal-footer {
  border-top-color: rgba(15, 23, 42, 0.08);
}

/* --------------------------------------------------------------------------
   LIGHTBOX MODAL
   -------------------------------------------------------------------------- */
.notes-lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(8px);
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.notes-lightbox-backdrop.active {
  display: flex;
  animation: modalFadeIn 0.25s ease forwards;
}
.notes-lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
}
.notes-lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.notes-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* --------------------------------------------------------------------------
   TOAST NOTIFICATIONS
   -------------------------------------------------------------------------- */
.notes-toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 10002;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.notes-toast {
  background: #10b981;
  color: #ffffff;
  padding: 0.85rem 1.35rem;
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.88rem;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.35);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   CARTOON FRENCH — AUTHORITATIVE RESPONSIVE MOBILE & TOUCH SYSTEM (A0–C2)
   Universal viewport containment, fluid clamp typography, mobile drawer,
   touch target accessibility, and page-by-page fluid layouts
   ========================================================================== */

/* 1. Global Viewport Containment & Media Reset */
html {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  -webkit-text-size-adjust: 100%;
}
body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
  position: relative;
}
img, svg, video, picture, canvas {
  max-width: 100% !important;
  height: auto !important;
}

/* Studio Mascot Images (Speaking, Writing, Translation Studios) */
.studio-hero-mascot-img {
  width: 270px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.15);
}

/* Universal Table Horizontal Scroll Safety */
.table-responsive,
.hud-table-wrap,
.conjugation-table-wrap,
.crs-table-wrap,
.notes-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  margin-bottom: 1.25rem;
}
.table-responsive > table,
.hud-table-wrap > table,
.conjugation-table-wrap > table {
  min-width: 520px;
}

/* 2. Responsive Breakpoint: Large Tablets & Laptops (< 1140px) */
@media (max-width: 1400px) {
  /* Site Header & Navigation Drawer */
  .site-header {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(11, 15, 23, 0.98) !important;
    height: auto !important;
    min-height: 62px !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
  }
  [data-theme="light"] .site-header {
    background: rgba(255, 255, 255, 0.98) !important;
    border-bottom-color: rgba(226, 232, 240, 0.9) !important;
  }
  .site-header-inner {
    height: 62px !important;
    padding-inline: max(1rem, env(safe-area-inset-left, 0px) + 0.5rem)
                    max(1rem, env(safe-area-inset-right, 0px) + 0.5rem) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0.5rem !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
  }
  .logo {
    font-size: 1.2rem !important;
    gap: 0.45rem !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
  }
  .site-mascot-logo {
    width: 34px !important;
    height: 34px !important;
    flex-shrink: 0 !important;
  }
  .header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    flex-shrink: 0 !important;
  }
  .header-actions .nav-signin,
  .header-actions .btn-pro-nav {
    display: none !important;
  }
  .header-actions .mobile-toggle-btn {
    display: inline-flex !important;
    flex-shrink: 0 !important;
  }
  .user-account-btn .user-pill-name,
  .user-account-btn .badge-pro-micro,
  .user-account-btn .drop-caret {
    display: none !important;
  }
  .user-account-btn {
    padding: 0 !important;
    border-radius: 50% !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    justify-content: center !important;
  }

  /* Fullscreen Backdrop */
  .site-nav-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease !important;
    z-index: 9999 !important;
  }
  .site-nav-backdrop.visible {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Off-canvas Sliding Drawer */
  .nav {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: min(340px, 86vw) !important;
    max-width: 360px !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    background: var(--bg-card) !important;
    backdrop-filter: blur(28px) !important;
    -webkit-backdrop-filter: blur(28px) !important;
    border-left: 1px solid var(--border-line) !important;
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.6) !important;
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 1.25rem 1.15rem 6.5rem !important;
    gap: 0.35rem !important;
    z-index: 10000 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain !important;
    touch-action: pan-y !important;
    scrollbar-width: thin;
    border-radius: 0 !important;
    transform: translateX(105%) !important;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  [data-theme="light"] .nav {
    background: #ffffff !important;
  }
  .nav.open {
    transform: translateX(0) !important;
  }
  .nav-dropdown {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid var(--border-line) !important;
    overflow: visible !important;
    transition: background 0.2s ease, border-color 0.2s ease !important;
  }
  [data-theme="light"] .nav-dropdown {
    background: rgba(15, 23, 42, 0.02) !important;
  }
  .nav-dropdown.is-open {
    background: rgba(20, 184, 166, 0.05) !important;
    border-color: rgba(20, 184, 166, 0.35) !important;
  }
  .nav-popover {
    display: none !important;
    position: static !important;
    transform: none !important;
    min-width: unset !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    padding: 0.2rem 0.4rem 0.6rem !important;
    gap: 0.25rem !important;
    animation: none !important;
  }
  .nav-dropdown.is-open .nav-popover {
    display: flex !important;
    flex-direction: column !important;
  }
  .mobile-nav-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-bottom: 0.75rem !important;
    margin-bottom: 0.5rem !important;
    border-bottom: 1px solid var(--border-line) !important;
  }
  .mobile-nav-close {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid var(--border-line) !important;
    color: var(--ink) !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    border-radius: 10px !important;
    font-size: 1.35rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    line-height: 1 !important;
  }
  .nav a {
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0.65rem 0.85rem !important;
    font-size: 0.95rem !important;
    color: var(--ink) !important;
    border-radius: 10px !important;
    border: none !important;
  }
  .nav-drop-btn {
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.7rem 0.85rem !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
  }
  .popover-link {
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
  }
  .mobile-nav-auth-links {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.65rem !important;
    margin-top: 1rem !important;
    padding-top: 1rem !important;
    border-top: 1px solid var(--border-line) !important;
  }
  .nav-mobile-signin {
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
  }
  .nav-mobile-pro {
    min-height: 46px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
  }
}

/* 3. Responsive Breakpoint: Standard Tablets (< 960px) */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 2.25rem !important;
    text-align: center;
  }
  .hero-text-side {
    text-align: center;
    margin: 0 auto;
    max-width: 680px;
  }
  .hero-tag-badge {
    margin-inline: auto !important;
  }
  .hero-actions {
    justify-content: center !important;
  }
  .hero-stats-row {
    justify-content: center !important;
  }
  .clb-calc-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  .checkout-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  .lock-screen-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  .floating-vocab-card {
    display: none !important;
  }
}

/* 4. Responsive Breakpoint: Core Mobile (< 768px) */
@media (max-width: 768px) {
  /* Containers & Section Spacing */
  .container,
  .container-wide,
  .container.hero-grid {
    width: 100% !important;
    max-width: 100% !important;
    padding-inline: max(1rem, env(safe-area-inset-left, 0px) + 0.5rem)
                    max(1rem, env(safe-area-inset-right, 0px) + 0.5rem) !important;
    box-sizing: border-box !important;
  }
  .section {
    padding: 2.75rem 0 !important;
  }
  .hero {
    padding: 1.75rem 0 2.5rem !important;
  }

  /* Fluid Typography System */
  h1, .hero-brand {
    font-size: clamp(1.75rem, 6.2vw, 2.35rem) !important;
    line-height: 1.22 !important;
    margin-bottom: 0.65rem !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }
  h2, .section-head h2 {
    font-size: clamp(1.35rem, 4.8vw, 1.85rem) !important;
    line-height: 1.28 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }
  h3 {
    font-size: clamp(1.1rem, 3.8vw, 1.35rem) !important;
    line-height: 1.32 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }
  .hero-lead {
    font-size: 0.96rem !important;
    line-height: 1.6 !important;
    margin-bottom: 1.25rem !important;
  }
  .section-head {
    margin-bottom: 2rem !important;
    text-align: center !important;
  }
  .section-head p {
    font-size: 0.92rem !important;
    line-height: 1.55 !important;
  }

  /* Hero Actions Stack */
  .hero-actions {
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.65rem !important;
  }
  .hero-actions .btn {
    width: 100% !important;
    min-height: 48px !important;
    justify-content: center !important;
    text-align: center !important;
    font-size: 0.95rem !important;
  }
  .hero-stats-row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.85rem !important;
    margin-top: 1.75rem !important;
  }
  .hero-stat-item {
    padding: 0.75rem 0.5rem !important;
    text-align: center !important;
  }
  .hero-stat-item strong {
    font-size: 1.35rem !important;
  }
  .hero-stat-item span {
    font-size: 0.75rem !important;
  }

  /* Interactive Classroom Board & Mascot */
  .hero-classroom-stage {
    width: 100% !important;
    max-width: 100% !important;
  }
  .smart-classroom-board {
    border-radius: 18px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5) !important;
  }
  .board-top-bar {
    padding: 0.6rem 0.75rem !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    justify-content: center !important;
  }
  .board-live-pill {
    font-size: 0.72rem !important;
  }
  .board-tabs-nav {
    display: flex !important;
    gap: 0.35rem !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 0.2rem !important;
  }
  .board-tab-btn {
    font-size: 0.75rem !important;
    padding: 0.35rem 0.55rem !important;
    min-height: 38px !important;
  }
  .board-chalk-screen {
    padding: 1rem 0.85rem !important;
    min-height: auto !important;
  }
  .slide-badge-category {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.35rem !important;
  }
  .phrase-french {
    font-size: clamp(1.2rem, 5vw, 1.55rem) !important;
    line-height: 1.3 !important;
  }
  .phrase-phonetic {
    font-size: 0.82rem !important;
  }
  .slide-example-box {
    padding: 0.65rem 0.75rem !important;
    margin: 0.75rem 0 !important;
  }
  .example-french {
    font-size: 0.88rem !important;
  }
  .example-english {
    font-size: 0.78rem !important;
  }
  .slide-action-row {
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
  }
  .board-play-btn {
    min-height: 44px !important;
    font-size: 0.85rem !important;
  }
  .board-bottom-bar {
    padding: 0.6rem 0.75rem !important;
  }
  .teacher-presenter-badge {
    position: static !important;
    margin: 1.25rem auto 0 !important;
    width: 100% !important;
    max-width: 320px !important;
    justify-content: center !important;
    border-radius: 16px !important;
    padding: 0.5rem 0.85rem !important;
  }
  .teacher-avatar-img {
    width: 38px !important;
    height: 38px !important;
  }

  /* Goal Selector Section */
  .goal-selector-nav {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
    margin-bottom: 1.25rem !important;
  }
  .goal-selector-pill {
    width: 100% !important;
    min-height: 44px !important;
    font-size: 0.82rem !important;
    padding: 0.45rem 0.65rem !important;
    justify-content: center !important;
    text-align: center !important;
  }
  .goal-detail-card .bento-card {
    padding: 1.25rem 1.15rem !important;
    border-radius: 18px !important;
  }
  .goal-detail-card h3 {
    font-size: 1.25rem !important;
  }
  .goal-detail-card p {
    font-size: 0.92rem !important;
  }

  /* 6 Interactive Learning Studios Bento Grid */
  .studios-home-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
    margin-top: 1.5rem !important;
  }
  .studio-home-card {
    border-radius: 18px !important;
    overflow: hidden !important;
  }
  .studio-card-img-wrap {
    height: 190px !important;
  }
  .studio-card-img-wrap img {
    height: 100% !important;
    object-fit: cover !important;
  }
  .studio-card-body {
    padding: 1.25rem 1.15rem !important;
  }
  .studio-card-body h3 {
    font-size: 1.25rem !important;
  }
  .studio-card-body p {
    font-size: 0.88rem !important;
    line-height: 1.55 !important;
  }
  .studio-card-body .btn {
    min-height: 44px !important;
    width: 100% !important;
    justify-content: center !important;
  }

  /* 60-Second Mini Quiz Card */
  .mini-quiz-card {
    padding: 1.35rem 1.1rem !important;
    border-radius: 20px !important;
  }
  .mini-quiz-options {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.6rem !important;
  }
  .mini-quiz-opt-btn {
    min-height: 46px !important;
    width: 100% !important;
    justify-content: flex-start !important;
    padding: 0.65rem 0.85rem !important;
    font-size: 0.92rem !important;
  }

  /* CEFR 7-Level Mosaic */
  .level-mosaic {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  .level-tile {
    padding: 1.25rem 1.15rem !important;
    border-radius: 18px !important;
  }

  /* Pricing Cards Grid & Compare Grid */
  .pricing-cards-grid,
  .pricing-grid,
  .compare-profile-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  .pricing-card {
    padding: 1.5rem 1.25rem !important;
    border-radius: 18px !important;
  }
  .pricing-card .btn {
    min-height: 48px !important;
    width: 100% !important;
    justify-content: center !important;
  }

  /* Stories & Bilingual Immersion */
  .story-bilingual-grid {
    grid-template-columns: 1fr !important;
    gap: 1.15rem !important;
  }
  .story-page-section .glass-card {
    padding: 1.25rem 1rem !important;
    border-radius: 16px !important;
  }
  .sentence-row-card {
    padding: 0.85rem 0.75rem !important;
    gap: 0.6rem !important;
  }

  /* Vocabulary Studio & Search Controls */
  .controls-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    padding: 0.85rem !important;
  }
  .vocab-search-input,
  .vocab-cat-select {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
  }
  .vocab-bento-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  .vocab-card {
    padding: 1.15rem 1rem !important;
  }

  /* Grammar & Conjugator */
  .grammar-hero-banner {
    padding: 1.35rem 1.1rem !important;
    flex-direction: column !important;
    gap: 1.25rem !important;
  }
  .grammar-mascot-img {
    max-width: 240px !important;
    margin: 0 auto !important;
  }
  .conjugator-search-box {
    flex-direction: column !important;
    width: 100% !important;
  }
  .conjugator-search-box input,
  .conjugator-search-box button {
    width: 100% !important;
    min-height: 46px !important;
  }

  /* Studio Mascots on Mobile */
  .studio-hero-mascot-img {
    width: 100% !important;
    max-width: 260px !important;
    margin: 0.85rem auto 0 !important;
  }

  /* TEF / TCF Canada CLB & CRS Calculator */
  .clb-calc-widget {
    padding: 1.25rem 1.1rem !important;
    border-radius: 18px !important;
  }
  .calc-input-group {
    padding: 1rem 0.85rem !important;
  }
  .calc-slider {
    min-height: 38px !important;
  }

  /* Roadmap Timeline */
  .roadmap-step-selector {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }
  .roadmap-step-btn {
    min-height: 44px !important;
    font-size: 0.82rem !important;
    padding: 0.45rem 0.65rem !important;
    justify-content: center !important;
  }
  .roadmap-milestone-card {
    padding: 1.35rem 1.15rem !important;
    border-radius: 18px !important;
  }

  /* Checkout Experience */
  .checkout-panel {
    padding: 1.35rem 1.1rem !important;
    border-radius: 18px !important;
  }
  .checkout-btn {
    min-height: 50px !important;
    width: 100% !important;
  }

  /* Site Footer */
  .footer-top-strip {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  .footer-col-title {
    font-size: 1.05rem !important;
    margin-bottom: 0.75rem !important;
  }
  .footer-links li a {
    min-height: 36px !important;
    display: flex !important;
    align-items: center !important;
  }

  /* Floating Support Modal */
  .support-modal-box {
    width: calc(100vw - 1.5rem) !important;
    max-height: calc(100dvh - 2rem) !important;
    padding: 1.25rem 1rem !important;
    border-radius: 18px !important;
  }
  .floating-support-btn {
    bottom: 14px !important;
    right: 14px !important;
    padding: 0.45rem 0.75rem !important;
    font-size: 0.8rem !important;
    z-index: 990 !important;
  }

  /* Touch Targets Guarantee */
  .btn,
  button,
  .nav-drop-btn,
  .popover-link,
  .board-tab-btn,
  .board-play-btn,
  .goal-selector-pill,
  .mini-quiz-opt-btn,
  .level-nav-pill {
    touch-action: manipulation;
  }
}

/* 5. Responsive Breakpoint: Small Mobile Screens (< 480px) */
@media (max-width: 480px) {
  .container,
  .container-wide,
  .container.hero-grid,
  .site-header-inner {
    padding-inline: max(1rem, env(safe-area-inset-left, 0px) + 0.5rem)
                    max(1rem, env(safe-area-inset-right, 0px) + 0.5rem) !important;
  }
  .logo-text {
    font-size: 1.12rem !important;
  }
  .site-mascot-logo {
    width: 30px !important;
    height: 30px !important;
  }
  .theme-toggle-switch {
    width: 44px !important;
    height: 28px !important;
  }
  .mobile-toggle-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
  }
  .goal-selector-nav {
    grid-template-columns: 1fr !important;
  }
  .roadmap-step-selector {
    grid-template-columns: 1fr !important;
  }
  .hero-stats-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.65rem !important;
  }
  .hero-stat-item {
    padding: 0.6rem 0.4rem !important;
  }
  .hero-stat-item strong {
    font-size: 1.2rem !important;
  }
}

/* ==========================================================================
   TRANSLATION STUDIO (AI Instant English <-> French Translator)
   Mobile, Tablet & Desktop Responsive Layout System
   ========================================================================== */

.translate-page {
  padding-top: 1.5rem;
  padding-bottom: 4rem;
}

/* 1. Hero Card */
.translate-hero-card {
  margin-bottom: 2rem;
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(168, 85, 247, 0.08) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-sizing: border-box;
}
[data-theme="light"] .translate-hero-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(168, 85, 247, 0.05) 100%);
  border-color: rgba(99, 102, 241, 0.18);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.translate-hero-text {
  flex: 1;
  min-width: 0;
}
.translate-badge {
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
  margin-bottom: 0.75rem;
  display: inline-block;
}
[data-theme="light"] .translate-badge {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
}

.translate-hero-title {
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.22;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  overflow-wrap: break-word;
}
[data-theme="light"] .translate-hero-title {
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.translate-hero-lead {
  color: var(--muted);
  font-size: clamp(0.92rem, 2.5vw, 1.05rem);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  max-width: 560px;
}

.translate-stats-grid {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.translate-stat-chip {
  padding: 0.55rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  border: 1px solid var(--border-line);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 120px;
  box-sizing: border-box;
}
[data-theme="light"] .translate-stat-chip {
  background: rgba(15, 23, 42, 0.03);
}
.translate-stat-chip strong {
  font-size: 1.05rem;
  font-weight: 700;
}
.translate-stat-chip span {
  font-size: 0.76rem;
  color: var(--muted);
}
.stat-accent-teal { color: var(--teal) !important; }
.stat-accent-purple { color: #c084fc !important; }
.stat-accent-blue { color: #60a5fa !important; }

/* Hero Mascot Illustration */
.translate-hero-illustration {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}
.translate-illustration-wrapper {
  position: relative;
  display: inline-block;
}
.translate-hero-mascot-img {
  width: 250px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: block;
}
[data-theme="light"] .translate-hero-mascot-img {
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

/* 2. Main Studio Card */
.translate-studio {
  padding: clamp(1.15rem, 3.2vw, 2rem);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}
[data-theme="light"] .translate-studio {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

/* 3. Toolbar & Language Pair */
.translate-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-line);
  flex-wrap: wrap;
  gap: 1rem;
}
.lang-pair {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.45rem 0.75rem;
  border-radius: 16px;
  border: 1px solid var(--border-line);
  box-sizing: border-box;
}
[data-theme="light"] .lang-pair {
  background: rgba(15, 23, 42, 0.03);
}
.lang-select-box {
  flex: 1;
  min-width: 0;
}
.lang-select {
  background: transparent !important;
  border: none !important;
  font-weight: 700 !important;
  font-size: clamp(0.88rem, 2.8vw, 1rem) !important;
  color: var(--ink) !important;
  cursor: pointer;
  padding: 0.25rem 0.4rem !important;
  width: 100%;
}
.lang-select option {
  background: var(--bg-card);
  color: var(--ink);
}
[data-theme="light"] .lang-select option {
  background: #ffffff;
  color: #0f172a;
}
.swap-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(99, 102, 241, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  transition: transform 0.25s ease, background-color 0.2s ease;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.swap-btn:hover {
  background: rgba(99, 102, 241, 0.28);
  transform: rotate(180deg);
}
.swap-btn:active {
  transform: scale(0.92) rotate(180deg);
}
.translate-shortcut-hint {
  font-size: 0.84rem;
  color: var(--muted);
}
.translate-shortcut-hint kbd {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  font-size: 0.78rem;
  border: 1px solid var(--border-line);
}
[data-theme="light"] .translate-shortcut-hint kbd {
  background: rgba(15, 23, 42, 0.08);
}

/* 4. Textarea Grid */
.translate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.translate-pane {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-line);
  border-radius: 18px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  min-height: 250px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
[data-theme="light"] .translate-pane {
  background: rgba(15, 23, 42, 0.02);
}
.translate-pane:focus-within {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.15);
}
.translate-pane-tgt {
  background: rgba(99, 102, 241, 0.04);
  border-color: rgba(99, 102, 241, 0.2);
}
[data-theme="light"] .translate-pane-tgt {
  background: rgba(99, 102, 241, 0.03);
  border-color: rgba(99, 102, 241, 0.22);
}
.translate-pane-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}
.translate-pane-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.translate-btn-clear {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  transition: color 0.15s ease;
}
.translate-btn-clear:hover {
  color: #fb7185;
}
.translate-spinner {
  font-size: 0.85rem;
  color: #818cf8;
  animation: pulse 1.5s infinite;
}
.translate-textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: clamp(1rem, 2.6vw, 1.15rem);
  line-height: 1.6;
  resize: none;
  color: var(--ink);
  box-sizing: border-box;
  font-family: inherit;
}
.translate-textarea::placeholder {
  color: var(--muted);
  opacity: 0.7;
}
.translate-textarea-tgt {
  color: #38bdf8 !important;
  font-weight: 600;
}
[data-theme="light"] .translate-textarea-tgt {
  color: #0284c7 !important;
}

/* Phonetic box */
.translate-phonetic-wrap {
  margin-top: 0.85rem;
  padding: 0.65rem 0.95rem;
  background: rgba(168, 85, 247, 0.1);
  border-left: 3px solid #a855f7;
  border-radius: 8px;
  box-sizing: border-box;
}
.translate-phonetic-title {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #c084fc;
  display: block;
  margin-bottom: 0.2rem;
}
.translate-phonetic-text {
  margin: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  color: #e9d5ff;
  font-weight: 600;
}
[data-theme="light"] .translate-phonetic-text {
  color: #7e22ce;
}

/* Action Rows */
.translate-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-line);
}
.translate-actions-left,
.translate-actions-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.translate-char-count {
  font-size: 0.8rem;
  color: var(--muted);
}
.btn-speak {
  border-radius: 10px;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  min-height: 38px;
}
.btn-copy {
  border-radius: 10px;
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  min-height: 38px;
}
.btn-translate-submit {
  padding: 0.5rem 1.35rem;
  border-radius: 12px;
  font-weight: 700;
  min-height: 38px;
}

/* 5. Preset Hints */
.translate-hints {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-line);
}
.translate-hints-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.translate-hints-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.translate-hint-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-line);
  color: var(--ink);
  padding: 0.5rem 0.95rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.86rem;
  transition: all 0.2s ease;
  line-height: 1.4;
  text-align: left;
  max-width: 100%;
}
[data-theme="light"] .translate-hint-chip {
  background: rgba(15, 23, 42, 0.03);
}
.translate-hint-chip:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.35);
  color: #818cf8;
  transform: translateY(-1px);
}
[data-theme="light"] .translate-hint-chip:hover {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
}

/* 6. Recent History */
.translate-history {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-line);
}
.translate-history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}
.translate-history-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
  margin: 0;
}
.translate-history-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.translate-history-item {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border-line);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
[data-theme="light"] .translate-history-item {
  background: rgba(15, 23, 42, 0.02);
}
.translate-history-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.translate-history-lang-badge {
  font-weight: 700;
  font-size: 0.74rem;
  color: #818cf8;
  background: rgba(99, 102, 241, 0.15);
  padding: 0.18rem 0.45rem;
  border-radius: 6px;
}
.translate-history-orig {
  color: var(--ink);
}
.translate-history-arrow {
  color: var(--muted);
}
.translate-history-trans {
  color: #60a5fa;
  font-weight: 600;
}
[data-theme="light"] .translate-history-trans {
  color: #2563eb;
}
.translate-history-pron {
  font-family: 'IBM Plex Mono', monospace;
  color: #c084fc;
  font-size: 0.82rem;
}
.btn-history-load {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  transition: transform 0.2s ease, color 0.2s ease;
}
.btn-history-load:hover {
  color: var(--ink);
  transform: rotate(90deg);
}

/* --------------------------------------------------------------------------
   Mobile Viewport Responsive Adaptations for Translation & Global Elements
   -------------------------------------------------------------------------- */

@media (max-width: 860px) {
  .translate-hero-card {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 1.5rem;
  }
  .translate-hero-text {
    text-align: center;
  }
  .translate-hero-lead {
    margin-inline: auto;
  }
  .translate-stats-grid {
    justify-content: center;
  }
  .translate-hero-mascot-img {
    width: 210px;
    margin: 0 auto;
  }
  .translate-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

@media (max-width: 640px) {
  .translate-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .lang-pair {
    width: 100%;
    justify-content: space-between;
  }
  .translate-toolbar-meta {
    text-align: center;
  }
  .translate-shortcut-hint {
    font-size: 0.78rem;
  }
  .translate-pane {
    min-height: 210px;
    padding: 1.05rem 0.9rem;
  }
  .translate-actions {
    flex-direction: row;
    justify-content: space-between;
  }
  .translate-actions-left,
  .translate-actions-right {
    gap: 0.45rem;
  }
  .btn-translate-submit {
    padding: 0.5rem 1rem;
    font-size: 0.88rem;
  }
  .translate-history-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}

@media (max-width: 420px) {
  .translate-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .translate-stat-chip:last-child {
    grid-column: span 2;
  }
  .translate-stat-chip {
    min-width: unset;
    padding: 0.45rem 0.6rem;
  }
  .translate-stat-chip strong {
    font-size: 0.95rem;
  }
  .lang-select {
    font-size: 0.85rem !important;
  }
  .swap-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    font-size: 1.1rem;
  }
  .btn-speak, .btn-copy {
    padding: 0.4rem 0.65rem;
    font-size: 0.8rem;
  }
  .btn-translate-submit {
    padding: 0.45rem 0.85rem;
    font-size: 0.84rem;
  }
  .translate-hint-chip {
    font-size: 0.82rem;
    padding: 0.45rem 0.75rem;
  }
}

/* --------------------------------------------------------------------------
   PRINT STYLESHEET — FLAWLESS PDF DOWNLOAD (CONFIRMED WORKING)
   -------------------------------------------------------------------------- */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 12pt;
  }
  .site-header,
  .site-footer,
  .diary-sidebar,
  .diary-actions-pill-bar,
  .notes-toast-container,
  .theme-toggle-switch,
  .notes-modal-backdrop,
  .diary-shared-footer,
  .badge-pinned-modern {
    display: none !important;
  }
  .diary-desk {
    display: block !important;
  }
  .diary-canvas {
    border: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
  }
  .diary-page-container {
    padding: 0 !important;
  }
  .diary-entry-title {
    color: #000000 !important;
    font-size: 24pt !important;
  }
  .diary-paper-body {
    color: #111827 !important;
    font-size: 12pt !important;
    line-height: 1.6 !important;
  }
  .diary-pdf-card {
    border: 1px solid #d1d5db !important;
    background: #f9fafb !important;
  }
}

/* ==========================================================================
   CARTOON FRENCH — EXECUTIVE BRAND ANIMATED LOADER & PROGRESS BAR SYSTEM
   ========================================================================== */

/* Keyframe Animations */
@keyframes cfBrandFloat {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 20px rgba(20, 184, 166, 0.25), 0 8px 24px rgba(0, 0, 0, 0.4);
  }
  100% {
    transform: translateY(-5px) scale(1.04);
    box-shadow: 0 0 32px rgba(20, 184, 166, 0.45), 0 14px 30px rgba(0, 0, 0, 0.55);
  }
}

@keyframes cfHaloPulse {
  0% {
    transform: scale(0.92);
    opacity: 0.8;
  }
  50% {
    opacity: 0.35;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

@keyframes cfSheenGlance {
  0%, 15% {
    transform: translateX(-150%) rotate(25deg);
  }
  50%, 100% {
    transform: translateX(250%) rotate(25deg);
  }
}

@keyframes cfProgressSlide {
  0% {
    left: -35%;
    width: 30%;
  }
  45% {
    left: 20%;
    width: 60%;
  }
  100% {
    left: 102%;
    width: 35%;
  }
}

@keyframes cfDotsBlink {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

/* Base Brand Loader Container */
.cf-brand-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  user-select: none;
}

/* Icon Frame & Mascot */
.cf-loader-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: radial-gradient(circle at 35% 30%, rgba(20, 184, 166, 0.22), rgba(11, 15, 23, 0.88));
  border: 1.5px solid rgba(20, 184, 166, 0.4);
  box-shadow: 0 0 25px rgba(20, 184, 166, 0.25), 0 10px 24px -4px rgba(0, 0, 0, 0.5);
  animation: cfBrandFloat 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

[data-theme="light"] .cf-loader-icon-wrap {
  background: radial-gradient(circle at 35% 30%, rgba(13, 148, 136, 0.15), rgba(255, 255, 255, 0.95));
  border: 1.5px solid rgba(13, 148, 136, 0.35);
  box-shadow: 0 0 20px rgba(13, 148, 136, 0.2), 0 8px 20px -4px rgba(0, 0, 0, 0.12);
}

.cf-loader-halo {
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  border: 2px solid rgba(20, 184, 166, 0.5);
  animation: cfHaloPulse 2.4s cubic-bezier(0.2, 0.8, 0.4, 1) infinite;
  pointer-events: none;
}

.cf-loader-sheen {
  position: absolute;
  top: -50%;
  bottom: -50%;
  left: 0;
  width: 50%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: cfSheenGlance 2.6s ease-in-out infinite;
  pointer-events: none;
}

.cf-loader-logo {
  display: block;
  width: 78%;
  height: 78%;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
  position: relative;
  z-index: 1;
}

/* Sizing Variants for Icon */
.cf-loader-icon-wrap--lg {
  width: 76px;
  height: 76px;
  border-radius: 24px;
}
.cf-loader-icon-wrap--md {
  width: 60px;
  height: 60px;
  border-radius: 18px;
}
.cf-loader-icon-wrap--sm {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}
.cf-loader-icon-wrap--xs {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(20, 184, 166, 0.25);
  animation: cfBrandFloat 1.8s ease-in-out infinite alternate;
}
.cf-loader-icon-wrap--btn {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border-width: 1px;
  box-shadow: none;
  animation: cfBrandFloat 1.6s ease-in-out infinite alternate;
  flex-shrink: 0;
}

/* Progress Wrap & Bar */
.cf-loader-progress-wrap {
  width: 100%;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 14px;
}

.cf-loader-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .cf-loader-progress-track {
  background: rgba(15, 23, 42, 0.1);
}

.cf-loader-progress-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #14b8a6 0%, #06b6d4 50%, #6366f1 100%);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.65);
  animation: cfProgressSlide 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

/* Label & Typography */
.cf-loader-text {
  margin-top: 9px;
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted, #94a3b8);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.cf-loader-dots::after {
  content: '...';
  display: inline-block;
  width: 1.2em;
  text-align: left;
  animation: cfDotsBlink 1.6s infinite;
}

/* Card Mode (e.g. PayPal checkout placeholder, quiz, evaluation) */
.cf-brand-loader--card {
  padding: 1.75rem 1.25rem;
  background: rgba(11, 15, 23, 0.45);
  border: 1px solid rgba(20, 184, 166, 0.2);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  width: 100%;
}

[data-theme="light"] .cf-brand-loader--card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(13, 148, 136, 0.2);
}

/* Inline Mode (e.g. Translation header) */
.cf-brand-loader--inline {
  display: inline-flex !important;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 5px 12px;
  background: rgba(20, 184, 166, 0.1);
  border: 1px solid rgba(20, 184, 166, 0.25);
  border-radius: 12px;
}

.cf-loader-inline-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cf-loader-inline-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teal, #14b8a6);
  letter-spacing: 0.02em;
}

.cf-loader-progress-track--sm {
  width: 90px;
  height: 3px;
}

/* Button Mode (inside submit buttons) */
.cf-brand-loader--btn {
  display: inline-flex !important;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  vertical-align: middle;
}

.cf-btn-loader-content {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.cf-btn-loader-text {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
}

.cf-loader-progress-track--btn {
  width: 65px;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
}

/* ============================================================
   Fullscreen / Global Page Preloader — Premium Glassmorphism
   Transparent mirror effect · Dark & Light theme ready
   ============================================================ */

/* --- Core preloader backdrop: true glassmorphism / mirror --- */
.cf-page-preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Transparent glass over page — mirror effect */
  background: rgba(7, 10, 15, 0.55);
  backdrop-filter: blur(20px) saturate(180%) brightness(0.85);
  -webkit-backdrop-filter: blur(20px) saturate(180%) brightness(0.85);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              visibility 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] .cf-page-preloader {
  background: rgba(241, 245, 249, 0.45);
  backdrop-filter: blur(24px) saturate(200%) brightness(1.08);
  -webkit-backdrop-filter: blur(24px) saturate(200%) brightness(1.08);
}

.cf-page-preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* --- Ambient floating orbs (give depth to glass surface) --- */
.cf-preloader-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
  animation: cfOrbFloat 7s ease-in-out infinite alternate;
}
.cf-preloader-orb--1 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.38), transparent 70%);
  top: -10%; left: -8%;
  animation-delay: 0s;
}
.cf-preloader-orb--2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.35), transparent 70%);
  bottom: -5%; right: -6%;
  animation-delay: -2.5s;
}
.cf-preloader-orb--3 {
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.28), transparent 70%);
  top: 55%; left: 55%;
  animation-delay: -1.2s;
  animation-duration: 5.5s;
}
[data-theme="light"] .cf-preloader-orb--1 {
  background: radial-gradient(circle, rgba(13, 148, 136, 0.25), transparent 70%);
}
[data-theme="light"] .cf-preloader-orb--2 {
  background: radial-gradient(circle, rgba(79, 70, 229, 0.2), transparent 70%);
}
[data-theme="light"] .cf-preloader-orb--3 {
  background: radial-gradient(circle, rgba(6, 182, 212, 0.18), transparent 70%);
}

@keyframes cfOrbFloat {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(30px, -20px) scale(1.08); }
  100% { transform: translate(-20px, 25px) scale(0.94); }
}

/* --- Inner frosted glass card --- */
.cf-page-preloader-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90%;
  max-width: 300px;
  padding: 2.5rem 2rem 2rem;
  border-radius: 32px;
  /* Frosted glass card */
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 8px 32px 0 rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 0 60px -10px rgba(20, 184, 166, 0.28);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  animation: cfCardEntry 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

[data-theme="light"] .cf-page-preloader-inner {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.9) inset,
    0 0 40px rgba(13, 148, 136, 0.15);
}

@keyframes cfCardEntry {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

/* --- Orbit ring system --- */
.cf-loader-orbit-system {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cf-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid transparent;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.cf-orbit--1 {
  width: 110px; height: 110px;
  border-color: rgba(20, 184, 166, 0.25);
  animation: cfOrbit1 2.8s linear infinite;
}
.cf-orbit--2 {
  width: 130px; height: 130px;
  border-color: rgba(99, 102, 241, 0.2);
  animation: cfOrbit2 4.2s linear infinite reverse;
}
.cf-orbit--3 {
  width: 90px; height: 90px;
  border-color: rgba(6, 182, 212, 0.18);
  animation: cfOrbit3 3.5s linear infinite;
}
[data-theme="light"] .cf-orbit--1 { border-color: rgba(13, 148, 136, 0.3); }
[data-theme="light"] .cf-orbit--2 { border-color: rgba(79, 70, 229, 0.2); }
[data-theme="light"] .cf-orbit--3 { border-color: rgba(6, 182, 212, 0.22); }

.cf-orbit-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-top: -3.5px;
  box-shadow: 0 0 8px 2px currentColor;
}
.cf-orbit--1 .cf-orbit-dot { background: #14b8a6; color: #14b8a6; }
.cf-orbit--2 .cf-orbit-dot { background: #6366f1; color: #6366f1; width: 6px; height: 6px; margin-top: -3px; }
.cf-orbit--3 .cf-orbit-dot { background: #06b6d4; color: #06b6d4; width: 5px; height: 5px; margin-top: -2.5px; }

@keyframes cfOrbit1  { to { transform: rotate(360deg);  } }
@keyframes cfOrbit2  { to { transform: rotate(-360deg); } }
@keyframes cfOrbit3  { to { transform: rotate(360deg);  } }

/* --- Central icon (inside orbit system — absolute center) --- */
.cf-loader-orbit-system .cf-loader-icon-wrap {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

/* --- Second halo ring --- */
.cf-loader-halo--2 {
  position: absolute;
  inset: -12px;
  border-radius: inherit;
  border: 1.5px solid rgba(99, 102, 241, 0.3);
  animation: cfHaloPulse 3.2s cubic-bezier(0.2, 0.8, 0.4, 1) 0.6s infinite;
  pointer-events: none;
}

/* --- Brand name --- */
.cf-page-preloader-brand {
  margin-top: 18px;
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: 1.2rem;
  font-weight: 800;
  color: rgba(248, 250, 252, 0.92);
  letter-spacing: -0.02em;
  text-shadow: 0 0 20px rgba(20, 184, 166, 0.4);
}
[data-theme="light"] .cf-page-preloader-brand {
  color: rgba(15, 23, 42, 0.9);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.cf-page-preloader-brand span {
  color: var(--teal, #14b8a6);
}

/* --- Progress bar (wider, more polished) --- */
.cf-loader-progress-wrap {
  width: 100%;
  max-width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 18px;
  gap: 12px;
}

/* --- Pulsing dots (replacing "Chargement" text) --- */
.cf-loader-pulse-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}
.cf-loader-pulse-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #14b8a6, #06b6d4);
  box-shadow: 0 0 8px rgba(20, 184, 166, 0.6);
  animation: cfDotPulse 1.4s ease-in-out infinite;
}
.cf-loader-pulse-dots span:nth-child(1) { animation-delay: 0s; }
.cf-loader-pulse-dots span:nth-child(2) { animation-delay: 0.22s; }
.cf-loader-pulse-dots span:nth-child(3) { animation-delay: 0.44s; }
[data-theme="light"] .cf-loader-pulse-dots span {
  background: linear-gradient(135deg, #0d9488, #0891b2);
  box-shadow: 0 0 6px rgba(13, 148, 136, 0.45);
}

@keyframes cfDotPulse {
  0%, 100% { transform: scale(0.6); opacity: 0.35; }
  50%       { transform: scale(1.25); opacity: 1; }
}

/* Slim Top Navigation Progress Bar */
.cf-top-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #14b8a6, #06b6d4, #6366f1);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.75);
  z-index: 1000000;
  transition: width 0.22s ease, opacity 0.3s ease;
  pointer-events: none;
}