    * { margin: 0; padding: 0; box-sizing: border-box; }
    body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #0a0a1a; color: #ffffff; overflow-x: hidden; }
    @keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
    @keyframes glow { 0%, 100% { text-shadow: 0 0 10px rgba(126, 180, 255, 0.5), 0 0 20px rgba(126, 180, 255, 0.3); } 50% { text-shadow: 0 0 20px rgba(126, 180, 255, 0.8), 0 0 40px rgba(126, 180, 255, 0.5); } }
    @keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
    @keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
    @keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
    @keyframes levelup { 0% { transform: scale(0.5); opacity: 0; } 50% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
    @keyframes slideIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
    @keyframes heartBreak { 0% { transform: scale(1); } 50% { transform: scale(1.2) rotate(20deg); } 100% { transform: scale(0) rotate(-20deg); opacity: 0; } }
    .top-bar { background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3a 100%); border-bottom: 2px solid #7eb4ff; padding: 15px 20px; padding-top: max(15px, env(safe-area-inset-top, 0px)); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; box-shadow: 0 0 20px rgba(126, 180, 255, 0.2); position: sticky; top: 0; z-index: 100; }
    .logo { font-size: 24px; font-weight: bold; letter-spacing: 2px; animation: glow 2s ease-in-out infinite; white-space: nowrap; }
    .xp-display { text-align: center; flex: 1; min-width: 250px; }
    .level-badge { display: inline-block; background: linear-gradient(135deg, #7eb4ff, #6ee7b7); color: #0a0a1a; padding: 8px 16px; border-radius: 20px; font-weight: bold; margin-bottom: 5px; font-size: 14px; }
    .xp-bar { width: 100%; height: 12px; background: #1a1a3a; border: 2px solid #7eb4ff; border-radius: 10px; overflow: hidden; box-shadow: inset 0 0 10px rgba(126, 180, 255, 0.2); }
    .xp-fill { height: 100%; background: linear-gradient(90deg, #7eb4ff, #6ee7b7); width: 0%; transition: width 0.3s ease; box-shadow: 0 0 10px rgba(126, 180, 255, 0.8); }
    .total-xp { font-size: 14px; color: #6ee7b7; font-weight: bold; white-space: nowrap; }
    .nav-tabs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; padding: 0 10px; }
    .nav-tab { padding: 12px 16px; background: transparent; border: 2px solid #7eb4ff; color: #7eb4ff; cursor: pointer; font-size: 14px; font-weight: 600; border-radius: 8px; transition: all 0.3s ease; white-space: nowrap; box-shadow: 0 0 10px rgba(126, 180, 255, 0.2); min-height: 44px; }
    @media (hover: hover) { .nav-tab:hover { background: rgba(126, 180, 255, 0.1); box-shadow: 0 0 20px rgba(126, 180, 255, 0.5); } }
    .nav-tab.active { background: linear-gradient(135deg, #7eb4ff, #6ee7b7); color: #0a0a1a; box-shadow: 0 0 30px rgba(126, 180, 255, 0.8); }
    .container { max-width: 1200px; margin: 20px auto; padding: 0 15px; min-height: calc(100vh - 200px); }
    .screen { display: none; animation: slideIn 0.3s ease-in-out; padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
    .screen.active { display: block; }
    .category-select { margin-bottom: 20px; }
    .category-select select { padding: 10px 15px; background: #1a1a3a; border: 2px solid #7eb4ff; color: #7eb4ff; border-radius: 8px; cursor: pointer; font-size: 14px; box-shadow: 0 0 10px rgba(126, 180, 255, 0.3); }
    .timer { font-size: 48px; font-weight: bold; color: #7eb4ff; text-align: center; margin: 20px 0; font-family: 'JetBrains Mono', 'Courier New', monospace; animation: glow 0.5s ease-in-out; letter-spacing: 3px; }
    .timer.warning { color: #f87171; animation: pulse 0.5s ease-in-out infinite; }
    .game-info { display: flex; justify-content: space-around; margin: 20px 0; flex-wrap: wrap; gap: 20px; }
    .info-box { text-align: center; padding: 15px 25px; background: linear-gradient(135deg, rgba(126, 180, 255, 0.1), rgba(110, 231, 183, 0.1)); border: 2px solid #7eb4ff; border-radius: 10px; box-shadow: 0 0 15px rgba(126, 180, 255, 0.3); flex: 1; min-width: 120px; }
    .info-label { font-size: 12px; color: #6ee7b7; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
    .info-value { font-size: 28px; font-weight: bold; color: #7eb4ff; }
    .combo-counter { font-size: 32px; color: #fbbf24; animation: pulse 0.6s ease-in-out; }
    .question-card { background: linear-gradient(135deg, rgba(126, 180, 255, 0.1), rgba(110, 231, 183, 0.1)); border: 2px solid #7eb4ff; border-radius: 15px; padding: 30px; margin: 20px 0; box-shadow: 0 0 30px rgba(126, 180, 255, 0.3); animation: slideIn 0.3s ease-in-out; will-change: transform, opacity; }
    .question-text { font-size: 20px; font-weight: 600; margin-bottom: 25px; color: #ffffff; line-height: 1.6; max-width: 65ch; }
    .answers { display: grid; grid-template-columns: 1fr; gap: 12px; }
    @media (min-width: 768px) { .answers { grid-template-columns: 1fr 1fr; } }
    .answer-btn { padding: 15px 20px; background: linear-gradient(135deg, rgba(126, 180, 255, 0.15), rgba(110, 231, 183, 0.15)); border: 2px solid #7eb4ff; color: #ffffff; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 500; transition: all 0.2s ease; box-shadow: 0 0 10px rgba(126, 180, 255, 0.2); text-align: left; line-height: 1.4; min-height: 48px; }
    @media (hover: hover) { .answer-btn:hover { background: linear-gradient(135deg, rgba(126, 180, 255, 0.3), rgba(110, 231, 183, 0.3)); box-shadow: 0 0 20px rgba(126, 180, 255, 0.5); transform: translateY(-2px); } }
    .answer-btn.correct { background: linear-gradient(135deg, rgba(110, 231, 183, 0.5), rgba(126, 180, 255, 0.3)); border-color: #6ee7b7; box-shadow: 0 0 30px rgba(110, 231, 183, 0.6); animation: slideIn 0.3s ease; }
    .answer-btn.wrong { background: linear-gradient(135deg, rgba(248, 113, 113, 0.5), rgba(255, 0, 0, 0.3)); border-color: #f87171; box-shadow: 0 0 30px rgba(248, 113, 113, 0.6); animation: shake 0.3s ease; }
    .results-screen { text-align: center; padding: 40px 20px; }
    .results-title { font-size: 48px; font-weight: bold; margin-bottom: 20px; color: #6ee7b7; animation: bounce 1s ease-in-out; }
    .results-stat { font-size: 24px; margin: 15px 0; color: #ffffff; }
    .results-stat-value { color: #7eb4ff; font-weight: bold; }
    .star-rating { font-size: 48px; margin: 20px 0; letter-spacing: 10px; }
    .btn-primary { background: linear-gradient(135deg, #7eb4ff, #6ee7b7); color: #0a0a1a; padding: 15px 40px; border: none; border-radius: 10px; font-size: 16px; font-weight: bold; cursor: pointer; margin: 20px auto; display: inline-block; transition: all 0.3s ease-in-out; box-shadow: 0 0 20px rgba(126, 180, 255, 0.4); min-height: 48px; }
    @media (hover: hover) { .btn-primary:hover { transform: scale(1.05); box-shadow: 0 0 40px rgba(126, 180, 255, 0.6); } }
    .matching-container { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }
    @media (max-width: 768px) { .matching-container { grid-template-columns: 1fr; } }

/* Practice screen mode card enhancements */
.mode-card-time { font-size: 10px; color: rgba(255,255,255,0.25); margin-top: 4px; }
.mode-card-best { font-size: 10px; color: #7eb4ff; margin-top: 6px; font-weight: 600; }
    .matching-column { display: flex; flex-direction: column; gap: 15px; }
    .match-card { padding: 20px; background: linear-gradient(135deg, rgba(126, 180, 255, 0.1), rgba(110, 231, 183, 0.1)); border: 2px solid #7eb4ff; border-radius: 10px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 0 10px rgba(126, 180, 255, 0.2); min-height: 60px; display: flex; align-items: center; font-weight: 500; }
    @media (hover: hover) { .match-card:hover { background: linear-gradient(135deg, rgba(126, 180, 255, 0.2), rgba(110, 231, 183, 0.2)); box-shadow: 0 0 20px rgba(126, 180, 255, 0.4); transform: translateY(-3px); } }
    .match-card.selected { background: linear-gradient(135deg, #7eb4ff, #6ee7b7); color: #0a0a1a; box-shadow: 0 0 30px rgba(126, 180, 255, 0.8); }
    .match-card.matched { background: linear-gradient(135deg, rgba(110, 231, 183, 0.4), rgba(126, 180, 255, 0.2)); border-color: #6ee7b7; opacity: 0.6; cursor: default; }
    .hearts-display { font-size: 48px; text-align: center; margin: 20px 0; letter-spacing: 10px; animation: pulse 0.6s ease-in-out; }
    .flashcard-container { perspective: 1000px; margin: 40px 0; }
    .flashcard { background: linear-gradient(135deg, rgba(126, 180, 255, 0.1), rgba(110, 231, 183, 0.1)); border: 2px solid #7eb4ff; border-radius: 15px; padding: 40px 30px; min-height: 200px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 24px; font-weight: 600; text-align: center; transition: all 0.3s ease; box-shadow: 0 0 30px rgba(126, 180, 255, 0.3); position: relative; line-height: 1.6; }
    @media (hover: hover) { .flashcard:hover { box-shadow: 0 0 50px rgba(126, 180, 255, 0.6); transform: scale(1.02); } }
    .flashcard.flip { background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(255, 100, 0, 0.1)); border-color: #fbbf24; box-shadow: 0 0 30px rgba(251, 191, 36, 0.3); }
    .card-label { position: absolute; top: 10px; right: 15px; font-size: 12px; color: #6ee7b7; text-transform: uppercase; letter-spacing: 1px; }
    .flashcard-actions { display: flex; gap: 15px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
    .btn-secondary { padding: 12px 30px; background: linear-gradient(135deg, rgba(126, 180, 255, 0.2), rgba(110, 231, 183, 0.2)); border: 2px solid #7eb4ff; color: #7eb4ff; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; transition: all 0.3s ease-in-out; box-shadow: 0 0 10px rgba(126, 180, 255, 0.2); min-height: 48px; }
    @media (hover: hover) { .btn-secondary:hover { background: linear-gradient(135deg, rgba(126, 180, 255, 0.4), rgba(110, 231, 183, 0.4)); box-shadow: 0 0 20px rgba(126, 180, 255, 0.4); } }
    .glossary-container { margin-top: 20px; }
    .glossary-search { margin-bottom: 20px; }
    .glossary-search input { width: 100%; padding: 12px 15px; background: #1a1a3a; border: 2px solid #7eb4ff; color: #ffffff; border-radius: 8px; font-size: 14px; box-shadow: 0 0 10px rgba(126, 180, 255, 0.2); }
    .glossary-search input::placeholder { color: #7eb4ff; opacity: 0.5; }
    .glossary-items { display: grid; grid-template-columns: 1fr; gap: 15px; }
    .glossary-item { background: linear-gradient(135deg, rgba(126, 180, 255, 0.1), rgba(110, 231, 183, 0.1)); border: 2px solid #7eb4ff; border-radius: 10px; padding: 20px; box-shadow: 0 0 15px rgba(126, 180, 255, 0.2); }
    .glossary-term { font-size: 16px; font-weight: 700; color: #7eb4ff; margin-bottom: 8px; }
    .glossary-def { font-size: 14px; color: #cccccc; line-height: 1.6; }
    .glossary-cat { display: inline-block; padding: 4px 10px; background: rgba(126, 180, 255, 0.2); border-radius: 4px; font-size: 12px; color: #6ee7b7; margin-top: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
    .game-over-screen { text-align: center; padding: 60px 20px; animation: slideIn 0.5s ease; }
    .game-over-title { font-size: 56px; font-weight: bold; margin-bottom: 30px; color: #f87171; animation: bounce 1s ease-in-out infinite; }
    .game-over-stats { margin: 40px 0; }
    .stat-line { font-size: 20px; margin: 15px 0; color: #ffffff; }
    .stat-highlight { color: #7eb4ff; font-weight: bold; font-size: 28px; }
    .explanation { background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(255, 100, 0, 0.1)); border-left: 4px solid #fbbf24; padding: 20px; margin: 20px 0; border-radius: 8px; font-size: 14px; line-height: 1.7; color: #cccccc; }
    .explanation-title { color: #fbbf24; font-weight: bold; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
    .dashboard-grid { display: grid; grid-template-columns: 1fr; gap: 30px; margin-top: 30px; }
    @media (min-width: 768px) { .dashboard-grid { grid-template-columns: 1fr 1fr; } }
    .dashboard-card { background: linear-gradient(135deg, rgba(126, 180, 255, 0.1), rgba(110, 231, 183, 0.1)); border: 2px solid #7eb4ff; border-radius: 15px; padding: 30px; box-shadow: 0 0 30px rgba(126, 180, 255, 0.3); }
    .dashboard-title { font-size: 20px; font-weight: bold; color: #6ee7b7; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; }
    .dashboard-stat { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(126, 180, 255, 0.2); font-size: 14px; }
    .dashboard-stat:last-child { border-bottom: none; }
    .dashboard-stat-label { color: #cccccc; }
    .dashboard-stat-value { color: #7eb4ff; font-weight: bold; }
    .speed-counter { font-size: 18px; color: #7eb4ff; font-weight: bold; margin: 10px 0; }
    .streak-display { font-size: 20px; color: #fbbf24; font-weight: bold; margin: 10px 0; animation: pulse 0.6s ease-in-out infinite; }
    @media (max-width: 768px) { .top-bar { flex-direction: column; gap: 15px; } .xp-display { min-width: 100%; } .nav-tabs { gap: 5px; overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; -webkit-overflow-scrolling: touch; scrollbar-width: none; } .nav-tabs::-webkit-scrollbar { display: none; } .nav-tab { padding: 8px 12px; font-size: 12px; flex-shrink: 0; } .question-text { font-size: 18px; } .timer { font-size: 36px; } .info-box { flex: 1; min-width: 100px; } .info-value { font-size: 24px; } }
    /* K1: Responsive grid for daily challenge + drills (< 400px) */
    @media (max-width: 400px) { #dailyChallengeCard, #drillsBanner { grid-column: 1 / -1 !important; } }
    .level-up-animation { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 72px; font-weight: bold; animation: levelup 1s ease-out forwards; pointer-events: none; z-index: 1000; text-shadow: 0 0 20px rgba(110, 231, 183, 0.8); color: #6ee7b7; }
    .streak-celebration { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 48px; font-weight: bold; animation: levelup 0.8s ease-out forwards; pointer-events: none; z-index: 1000; text-align: center; text-shadow: 0 0 30px rgba(126, 180, 255, 0.8); color: #fbbf24; }
    /* === CHANGE 1: Correct-answer reinforcement panel === */
    .speed-hint-panel { background: rgba(0,180,80,0.25); border: 1px solid rgba(110,231,183,0.4); border-radius: 10px; padding: 14px 20px; margin: 14px 0 0 0; color: #ffffff; font-size: 15px; line-height: 1.5; animation: hintFadeIn 0.2s ease-out; transition: opacity 0.3s ease; }
    .speed-hint-panel.fading { opacity: 0; }
    @keyframes hintFadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

    /* === CHANGE 2A: Combo visual escalation === */
    .combo-1x { color: #7eb4ff; }
    .combo-2x { color: #fbbf24; }
    .combo-3x { color: #fb923c; animation: comboPulse 0.8s ease-in-out infinite; }
    .combo-4x { color: #f87171; animation: comboPulse 0.5s ease-in-out infinite; }
    .combo-5x { color: #f87171; animation: comboPulse 0.3s ease-in-out infinite; text-shadow: 0 0 15px rgba(248,113,113,0.8); }
    @keyframes comboPulse { 0%,100%{transform:scale(1);} 50%{transform:scale(1.15);} }
    .combo-break-desat { animation: desatFlash 0.3s ease-out; }
    @keyframes desatFlash { 0%{filter:saturate(0.2) brightness(0.7);} 100%{filter:saturate(1) brightness(1);} }

    /* === CHANGE 2B: Timer urgency escalation === */
    .timer.timer-yellow { color: #fbbf24; animation: timerPulseGentle 1.2s ease-in-out infinite; }
    .timer.timer-orange { color: #fb923c; animation: timerPulseMed 0.8s ease-in-out infinite; }
    .timer.timer-red { color: #f87171; animation: timerPulseRapid 0.4s ease-in-out infinite; }
    @keyframes timerPulseGentle { 0%,100%{opacity:1;} 50%{opacity:0.7;} }
    @keyframes timerPulseMed { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:0.8;transform:scale(1.05);} }
    @keyframes timerPulseRapid { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:0.7;transform:scale(1.1);} }
    /* === Speed Round slide transition === */
    #speedGame, #survivalGame, #drillsGame, #examGame { position: relative; overflow: hidden; }
    .speed-slide-out { animation: speedSlideOut 200ms ease-in forwards; }
    .speed-slide-in { animation: speedSlideIn 200ms ease-out forwards; }
    @keyframes speedSlideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(-100%); opacity: 0; } }
    @keyframes speedSlideIn { from { transform: translateX(60%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

    .speed-vignette { position:fixed;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:50;box-shadow:inset 0 0 120px 60px rgba(0,0,0,0.6);opacity:0;transition:opacity 0.4s ease; }
    .speed-vignette.active { opacity:1; }

    /* === CHANGE 2C: Mid-round streak acknowledgment === */
    .speed-streak-flash { position:fixed;top:38%;left:50%;transform:translate(-50%,-50%);font-size:36px;font-weight:900;letter-spacing:2px;pointer-events:none;z-index:1001;text-align:center;animation:streakFlash 0.8s ease-out forwards; }
    .speed-streak-flash.big { font-size:44px; animation-duration:1s; }
    @keyframes streakFlash { 0%{opacity:0;transform:translate(-50%,-50%) scale(0.5);} 20%{opacity:1;transform:translate(-50%,-50%) scale(1.15);} 70%{opacity:1;transform:translate(-50%,-50%) scale(1);} 100%{opacity:0;transform:translate(-50%,-50%) scale(0.9);} }

    /* === CHANGE 3C: Particle burst on correct answer === */
    .speed-particle { position:absolute;width:6px;height:6px;border-radius:50%;pointer-events:none;animation:particleBurst 0.6s ease-out forwards; }
    @keyframes particleBurst { 0%{opacity:1;transform:translate(0,0) scale(1);} 100%{opacity:0;transform:translate(var(--px),var(--py)) scale(0);} }

    /* === CHANGE 3D: Repeat-miss explanation indicator === */
    .explanation.repeat-miss { border-left-color:#f87171; }
    .repeat-miss-label { color:#ff6b6b; font-size:13px; font-weight:600; margin-bottom:8px; letter-spacing:0.3px; }

    /* === CHANGE 2B: Combo 5x question card glow === */
    .question-card.combo-glow { box-shadow: 0 0 30px rgba(248,113,113,0.3), 0 0 60px rgba(248,113,113,0.15); }

    /* === FIX 6: Speed mode selector === */
    .speed-mode-btn.active { background: linear-gradient(135deg, #7eb4ff, #6ee7b7) !important; color: #0a0a1a !important; box-shadow: 0 0 20px rgba(126,180,255,0.4); }
    @media (hover: hover) { .speed-mode-btn:hover:not(.active) { background: rgba(126,180,255,0.1) !important; } }

    /* === FOCUS MODE — Warm analog study theme === */
    body.focus-mode {
      background: #f5f0e8 !important;
      color: #2c2c2c !important;
      font-family: 'Georgia', 'Times New Roman', serif !important;
    }

    /* Top bar / header */
    body.focus-mode .top-bar {
      background: #ece6da !important;
      border-bottom: 1px solid #d4cdbf !important;
      box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
    }
    body.focus-mode .logo {
      animation: none !important; color: #6b5b4e !important; text-shadow: none !important;
      font-size: 16px !important; font-family: 'Georgia', serif !important; letter-spacing: 1px !important;
      visibility: hidden !important; position: relative !important;
    }
    body.focus-mode .logo::before {
      content: 'MLO STUDY' !important; visibility: visible !important;
      position: absolute !important; left: 20px !important;
    }

    /* Bottom nav */
    body.focus-mode .bottom-nav {
      background: #ece6da !important;
      border-top: 1px solid #d4cdbf !important;
      box-shadow: 0 -1px 3px rgba(0,0,0,0.06) !important;
    }
    body.focus-mode .bottom-nav-tab { color: #8a7e72 !important; }
    body.focus-mode .bottom-nav-tab.active { color: #5c4a3a !important; }
    body.focus-mode .bottom-nav-tab svg { stroke: currentColor !important; }

    /* Question cards */
    body.focus-mode .question-card {
      background: #ffffff !important;
      border: 1px solid #e0d9cc !important;
      border-radius: 8px !important;
      box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
      animation: none !important;
    }
    body.focus-mode .question-text {
      color: #2c2c2c !important;
      font-family: 'Georgia', serif !important;
      font-size: 16px !important;
      line-height: 1.8 !important;
    }

    /* Answer buttons */
    body.focus-mode .answer-btn {
      background: #faf8f4 !important;
      border: 1px solid #d4cdbf !important;
      border-radius: 8px !important;
      color: #3a3a3a !important;
      box-shadow: none !important;
      font-family: 'Georgia', serif !important;
      transition: background 0.15s ease !important;
    }
    @media (hover: hover) {
      body.focus-mode .answer-btn:hover {
        background: #f0ebe0 !important;
        box-shadow: none !important;
        transform: none !important;
      }
    }
    body.focus-mode .answer-btn.correct {
      background: #e8f5e9 !important;
      border-color: #81c784 !important;
      color: #2e7d32 !important;
      box-shadow: none !important;
      animation: none !important;
    }
    body.focus-mode .answer-btn.wrong {
      background: #fbe9e7 !important;
      border-color: #e57373 !important;
      color: #c62828 !important;
      box-shadow: none !important;
      animation: none !important;
    }

    /* Explanation box */
    body.focus-mode .explanation {
      background: #faf8f4 !important;
      border: 1px solid #e0d9cc !important;
      border-left: 3px solid #81c784 !important;
      color: #4a4a4a !important;
      font-family: 'Georgia', serif !important;
      line-height: 1.7 !important;
    }

    /* Primary buttons */
    body.focus-mode .btn-primary {
      background: #5c4a3a !important;
      color: #f5f0e8 !important;
      border: none !important;
      box-shadow: none !important;
      border-radius: 8px !important;
      font-family: 'Georgia', serif !important;
    }
    @media (hover: hover) {
      body.focus-mode .btn-primary:hover { background: #4a3a2c !important; transform: none !important; }
    }
    body.focus-mode .btn-secondary {
      background: transparent !important;
      border: 1px solid #d4cdbf !important;
      color: #5c4a3a !important;
      font-family: 'Georgia', serif !important;
    }

    /* Info boxes / stats */
    body.focus-mode .info-box {
      background: #ffffff !important;
      border: 1px solid #e0d9cc !important;
      box-shadow: none !important;
    }
    body.focus-mode .info-label { color: #8a7e72 !important; }
    body.focus-mode .info-value { color: #3a3a3a !important; }

    /* Game info bar */
    body.focus-mode .game-info { border: none !important; }

    /* Timer */
    body.focus-mode .timer {
      color: #6b5b4e !important;
      font-family: 'Georgia', serif !important;
      animation: none !important;
      text-shadow: none !important;
    }
    body.focus-mode .timer.warning { color: #c62828 !important; animation: none !important; }

    /* Flashcards */
    body.focus-mode .flashcard {
      background: #ffffff !important;
      border: 1px solid #e0d9cc !important;
      box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
      color: #2c2c2c !important;
      font-family: 'Georgia', serif !important;
    }
    @media (hover: hover) {
      body.focus-mode .flashcard:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.08) !important; transform: none !important; }
    }

    /* Mode cards */
    body.focus-mode .mode-card {
      background: #ffffff !important;
      border: 1px solid #e0d9cc !important;
      box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
      color: #3a3a3a !important;
    }
    body.focus-mode .mode-card-name { color: #3a3a3a !important; }
    body.focus-mode .mode-card-desc { color: #8a7e72 !important; }
    body.focus-mode .mode-card-time { color: #7a6e62 !important; }

    /* Headings */
    body.focus-mode h1, body.focus-mode h2 {
      color: #3a3a3a !important;
      font-family: 'Georgia', serif !important;
      text-shadow: none !important;
    }
    body.focus-mode p { color: #5a5a5a !important; }

    /* Screen backgrounds */
    body.focus-mode .screen {
      background: transparent !important;
    }

    /* Hide gamification elements */
    body.focus-mode .xp-display,
    body.focus-mode .level-badge,
    body.focus-mode .xp-bar,
    body.focus-mode .combo-counter,
    body.focus-mode .streak-display,
    body.focus-mode .speed-vignette,
    body.focus-mode .level-up-animation,
    body.focus-mode .streak-celebration,
    body.focus-mode .speed-streak-flash,
    body.focus-mode .speed-particle,
    body.focus-mode .speed-slide-out { opacity: 0 !important; position: absolute !important; }
    body.focus-mode .speed-slide-in { animation: none !important; opacity: 1 !important; }

    /* Kill decorative animations but keep functional transitions */
    body.focus-mode * { animation-duration: 0s !important; animation-delay: 0s !important; }
    body.focus-mode .xp-fill,
    body.focus-mode .readiness-meter-fill,
    body.focus-mode .readiness-progress-fill,
    body.focus-mode .mastery-bar-fill { transition: width 0.3s ease !important; }

    /* Calculator */
    body.focus-mode .calc-toggle {
      background: #5c4a3a !important;
      box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important;
    }
    body.focus-mode .calc-panel {
      background: #ffffff !important;
      border: 1px solid #d4cdbf !important;
      box-shadow: 0 4px 16px rgba(0,0,0,0.1) !important;
    }
    body.focus-mode .calc-display {
      background: #faf8f4 !important;
      color: #2c2c2c !important;
      border-color: #d4cdbf !important;
      font-family: 'Georgia', monospace !important;
    }
    body.focus-mode .calc-btn {
      background: #faf8f4 !important;
      border-color: #e0d9cc !important;
      color: #3a3a3a !important;
    }

    /*
     * GLOBAL INLINE STYLE OVERRIDES
     * The app sets ~200 inline styles with dark-mode colors.
     * These wildcard rules force readable colors on cream background.
     */

    /* Force ALL text to dark by default */
    body.focus-mode,
    body.focus-mode div,
    body.focus-mode span,
    body.focus-mode p,
    body.focus-mode label,
    body.focus-mode button,
    body.focus-mode h1,
    body.focus-mode h2,
    body.focus-mode h3,
    body.focus-mode h4 {
      color: #2c2c2c !important;
    }

    /* Muted secondary text — catch all inline gray/muted colors (3-digit AND 6-digit hex) */
    body.focus-mode [style*="color:#888"],
    body.focus-mode [style*="color:#888888"],
    body.focus-mode [style*="color: #888"],
    body.focus-mode [style*="color:#aaa"],
    body.focus-mode [style*="color:#aaaaaa"],
    body.focus-mode [style*="color: #aaa"],
    body.focus-mode [style*="color:#666"],
    body.focus-mode [style*="color:#666666"],
    body.focus-mode [style*="color: #666"],
    body.focus-mode [style*="color:#555"],
    body.focus-mode [style*="color:#555555"],
    body.focus-mode [style*="color: #555"],
    body.focus-mode [style*="color:#ccc"],
    body.focus-mode [style*="color:#cccccc"],
    body.focus-mode [style*="color: #ccc"],
    body.focus-mode [style*="color:#999"],
    body.focus-mode [style*="color:#999999"],
    body.focus-mode [style*="color: #999"],
    body.focus-mode [style*="color:rgba(255,255,255"],
    body.focus-mode [style*="color: rgba(255,255,255"],
    body.focus-mode [style*="color:rgba(238,242,255"] {
      color: rgba(0,0,0,0.15) !important;
    }

    /* White text on dark backgrounds — catch all white variants */
    body.focus-mode [style*="color:#fff"],
    body.focus-mode [style*="color:#ffffff"],
    body.focus-mode [style*="color:white"],
    body.focus-mode [style*="color: #fff"],
    body.focus-mode [style*="color: #ffffff"],
    body.focus-mode [style*="color: white"],
    body.focus-mode [style*="color:#0a"],
    body.focus-mode [style*="color: #0a"] {
      color: #2c2c2c !important;
    }

    /* Accent colors → warm brown in focus mode */
    body.focus-mode [style*="color:#7eb4ff"],
    body.focus-mode [style*="color:#6ee7b7"],
    body.focus-mode [style*="color:#fbbf24"],
    body.focus-mode [style*="color:#fb923c"],
    body.focus-mode [style*="color:#c084fc"] {
      color: #5c4a3a !important;
    }

    /* Error/wrong stays visible red */
    body.focus-mode [style*="color:#f87171"] {
      color: #c62828 !important;
    }

    /* Dark backgrounds → white */
    body.focus-mode [style*="background:#1a"],
    body.focus-mode [style*="background:#0a"],
    body.focus-mode [style*="background:#0f"],
    body.focus-mode [style*="background: #1a"],
    body.focus-mode [style*="background: #0a"],
    body.focus-mode [style*="background:rgba(10,"],
    body.focus-mode [style*="background:rgba(0,0,0"],
    body.focus-mode [style*="background:rgba(255,255,255,0.0"],
    body.focus-mode [style*="background:rgba(255,255,255,0.02"],
    body.focus-mode [style*="background:rgba(255,255,255,0.03"],
    body.focus-mode [style*="background:rgba(255,255,255,0.04"] {
      background: #ffffff !important;
    }

    /* Gradient backgrounds → clean white */
    body.focus-mode [style*="background:linear-gradient"],
    body.focus-mode [style*="background: linear-gradient"] {
      background: #ffffff !important;
    }

    /* Neon borders → warm subtle borders */
    body.focus-mode [style*="border-color:#7eb4ff"],
    body.focus-mode [style*="border-color:#6ee7b7"],
    body.focus-mode [style*="border-color:#fbbf24"],
    body.focus-mode [style*="border-color:#f87171"],
    body.focus-mode [style*="border:1px solid rgba(255,255,255"],
    body.focus-mode [style*="border:2px solid"],
    body.focus-mode [style*="border:3px solid"],
    body.focus-mode [style*="border-left:3px solid"] {
      border-color: #d4cdbf !important;
    }

    /* Box shadows → subtle */
    body.focus-mode [style*="box-shadow"] {
      box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
    }

    /* Text shadows → none */
    body.focus-mode [style*="text-shadow"] {
      text-shadow: none !important;
    }

    /* Answer buttons — specific overrides that beat inline styles */
    body.focus-mode .answer-btn,
    body.focus-mode .answer-btn[style] {
      background: #faf8f4 !important;
      border: 1px solid #d4cdbf !important;
      color: #3a3a3a !important;
    }
    body.focus-mode .answer-btn.correct,
    body.focus-mode .answer-btn.correct[style] {
      background: #e8f5e9 !important;
      border-color: #81c784 !important;
      color: #2e7d32 !important;
    }
    body.focus-mode .answer-btn.wrong,
    body.focus-mode .answer-btn.wrong[style] {
      background: #fbe9e7 !important;
      border-color: #e57373 !important;
      color: #c62828 !important;
    }

    /* Question cards */
    body.focus-mode .question-card,
    body.focus-mode .question-card[style] {
      background: #ffffff !important;
      border: 1px solid #e0d9cc !important;
      box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
    }

    /* Duel mode */
    body.focus-mode .duel-term,
    body.focus-mode .duel-term[style] {
      background: #ffffff !important;
      border: 1px solid #d4cdbf !important;
      color: #2c2c2c !important;
      box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
    }
    body.focus-mode .duel-option,
    body.focus-mode .duel-option[style] {
      background: #faf8f4 !important;
      border: 1px solid #d4cdbf !important;
      color: #3a3a3a !important;
      box-shadow: none !important;
    }
    body.focus-mode .duel-option.correct { background: #e8f5e9 !important; border-color: #81c784 !important; }
    body.focus-mode .duel-option.wrong { background: #fbe9e7 !important; border-color: #e57373 !important; }

    /* Explanation boxes */
    body.focus-mode .explanation,
    body.focus-mode .explanation[style] {
      background: #faf8f4 !important;
      border: 1px solid #e0d9cc !important;
      border-left: 3px solid #81c784 !important;
      color: #4a4a4a !important;
    }

    /* Category select dropdown */
    body.focus-mode .category-select select {
      background: #ffffff !important;
      border: 1px solid #d4cdbf !important;
      color: #3a3a3a !important;
      box-shadow: none !important;
    }
    body.focus-mode .category-select label { color: #6b5b4e !important; }

    /* Timer */
    body.focus-mode .timer,
    body.focus-mode [id*="Timer"],
    body.focus-mode [id*="timer"] {
      color: #6b5b4e !important;
      text-shadow: none !important;
      font-family: 'Georgia', serif !important;
    }

    /* Hearts */
    body.focus-mode #survivalHearts { color: #c62828 !important; }

    /* Glossary */
    body.focus-mode .glossary-search input {
      background: #ffffff !important;
      border: 1px solid #d4cdbf !important;
      color: #3a3a3a !important;
    }
    body.focus-mode .glossary-items { color: #3a3a3a !important; }

    /* Reinforcement toggle */
    body.focus-mode #reinforceToggle button {
      background: #ffffff !important;
      border: 1px solid #d4cdbf !important;
    }
    body.focus-mode #reinforceToggle span { color: #6b5b4e !important; }
    body.focus-mode #reinforceToggle svg { fill: #6b5b4e !important; }

    /* Back button */
    body.focus-mode .mode-back-btn {
      color: #5c4a3a !important;
      border-color: #d4cdbf !important;
      background: #ffffff !important;
    }

    /* Speed mode buttons */
    body.focus-mode .speed-mode-btn,
    body.focus-mode .speed-mode-btn[style] {
      background: #ffffff !important;
      border: 1px solid #d4cdbf !important;
      color: #5c4a3a !important;
    }
    body.focus-mode .speed-mode-btn.active,
    body.focus-mode .speed-mode-btn.active[style] {
      background: #5c4a3a !important;
      color: #f5f0e8 !important;
      border-color: #5c4a3a !important;
    }

    /* Exam nav bar */
    body.focus-mode #examNavBar button,
    body.focus-mode #examNavBar button[style] {
      background: #faf8f4 !important;
      border-color: #d4cdbf !important;
      color: #3a3a3a !important;
    }
    body.focus-mode #examNavBar button.current {
      background: #5c4a3a !important;
      color: #f5f0e8 !important;
    }
    body.focus-mode #examNavBar button.answered {
      background: #e8f5e9 !important;
      border-color: #81c784 !important;
    }
    body.focus-mode #examNavBar button.flagged {
      background: #fff8e1 !important;
      border-color: #fbbf24 !important;
    }

    /* Progress bars */
    body.focus-mode [style*="background:linear-gradient(90deg"] {
      background: #5c4a3a !important;
    }

    /* Fixed overlays (completion screens, modals) */
    body.focus-mode [style*="position:fixed"][style*="background:rgba(0,0,0"],
    body.focus-mode [style*="position:fixed"][style*="background:rgba(10,10,26"] {
      background: rgba(245,240,232,0.97) !important;
    }
    body.focus-mode [style*="position:fixed"] [style*="background:#1a"],
    body.focus-mode [style*="position:fixed"] [style*="background:#0a"] {
      background: #ffffff !important;
      border-color: #d4cdbf !important;
    }

    /* Leaderboard */
    body.focus-mode .lb-row { background: #ffffff !important; border-color: #e0d9cc !important; }
    body.focus-mode .lb-row.me { background: #faf8f4 !important; }
    body.focus-mode .lb-mode-tab { background: #ffffff !important; border-color: #d4cdbf !important; color: #5c4a3a !important; }
    body.focus-mode .lb-mode-tab.active { background: #5c4a3a !important; color: #f5f0e8 !important; }

    /* Profile screen */
    body.focus-mode #profileScreen [style*="background:rgba(255,255,255,0.0"] {
      background: #ffffff !important;
      border: 1px solid #e0d9cc !important;
    }
    body.focus-mode #profileScreen [style*="background:linear-gradient"] {
      background: #d4cdbf !important;
    }

    /* Inputs */
    body.focus-mode input[type="text"],
    body.focus-mode input[type="email"],
    body.focus-mode input[type="password"],
    body.focus-mode input[type="date"] {
      background: #ffffff !important;
      border: 1px solid #d4cdbf !important;
      color: #3a3a3a !important;
    }

    /* Buttons with colored backgrounds and white text — keep white text readable */
    body.focus-mode [style*="color:white"][style*="background:#"],
    body.focus-mode [style*="color:#ffffff"][style*="background:linear-gradient"],
    body.focus-mode [style*="color:#fff"][style*="background:linear-gradient"] {
      color: #ffffff !important;
    }
    body.focus-mode button[style*="background:#f87171"],
    body.focus-mode button[style*="background:#c084fc"],
    body.focus-mode button[style*="background:#5c4a3a"],
    body.focus-mode button[style*="background:#fb923c"] {
      color: #ffffff !important;
    }

    /* Hint tooltips */
    body.focus-mode [id^="hint-"] {
      background: #ffffff !important;
      border: 1px solid #d4cdbf !important;
      box-shadow: 0 4px 16px rgba(0,0,0,0.1) !important;
    }

    /* Toast notifications */
    body.focus-mode .unlock-toast,
    body.focus-mode [class*="toast"] {
      background: #ffffff !important;
      border: 1px solid #d4cdbf !important;
      color: #2c2c2c !important;
    }

    /* Force-hide legacy dashboard compatibility elements */
    #dashboard > #readinessIndicator,
    #dashboard > #examCountdownDash,
    #dashboard > #reviewDueBanner,
    #dashboard > #recommendedNextCard,
    #dashboard > #dailyChallengeCard,
    #dashboard > #categoryMasteryPanel,
    #dashboard > #drillsBanner,
    #dashboard > #returningBanner,
    #dashboard > #levelAnticipationBar,
    #dashboard > #sessionSummary,
    #dashboard > #sessionPlannerCard,
    #dashboard > #passProbabilityPanel,
    #dashboard > #coverageMapPanel,
    #dashboard > #coverageTrackerPanel,
    #dashboard > #categoryRankingPanel,
    #dashboard > #totalXP,
    #dashboard > #dashXP,
    #dashboard > #dashLevel,
    #dashboard > #dashLevelName,
    #dashboard > #totalGames,
    #dashboard > #bestCombo,
    #dashboard > #questionsAnswered,
    #dashboard > #speedHighScore,
    #dashboard > #survivalHighScore,
    #dashboard > #matchingHighScore,
    #dashboard > #flashcardsReviewed,
    #dashboard > #examSimBest,
    #dashboard > #reviewDueCount {
      display: none !important;
    }

    /* SVGs — darken strokes/fills */
    body.focus-mode .mode-card svg { opacity: 0.7 !important; }
    body.focus-mode .bottom-nav-tab svg { stroke: currentColor !important; }

    /* Scrollbar */
    body.focus-mode ::-webkit-scrollbar-track { background: #f5f0e8 !important; }
    body.focus-mode ::-webkit-scrollbar-thumb { background: #d4cdbf !important; }

    .hidden { display: none !important; }
    /* Post-Exam Recommendation Panel */
    .post-exam-panel { background: linear-gradient(135deg, #0d1b2a 0%, #1b2838 100%); border: 2px solid #7eb4ff; border-radius: 15px; padding: 35px 30px; margin: 30px auto; max-width: 600px; text-align: center; animation: slideIn 0.5s ease; box-shadow: 0 0 40px rgba(126, 180, 255, 0.2); }
    .post-exam-panel.urgent { border-color: #ff6b35; box-shadow: 0 0 40px rgba(255, 107, 53, 0.3); }
    .post-exam-panel-title { font-size: 20px; font-weight: bold; color: #7eb4ff; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
    .post-exam-panel.urgent .post-exam-panel-title { color: #ff6b35; }
    .post-exam-panel-message { font-size: 15px; color: #cccccc; line-height: 1.7; margin-bottom: 25px; }
    .post-exam-panel-message strong { color: #ffffff; }
    .post-exam-cta { display: inline-block; background: linear-gradient(135deg, #7eb4ff, #6ee7b7); color: #0a0a1a; padding: 14px 36px; border: none; border-radius: 10px; font-size: 16px; font-weight: bold; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 0 20px rgba(126, 180, 255, 0.4); margin: 5px; }
    @media (hover: hover) { .post-exam-cta:hover { transform: scale(1.05); box-shadow: 0 0 40px rgba(126, 180, 255, 0.6); } }
    .post-exam-cta.secondary { background: linear-gradient(135deg, rgba(126, 180, 255, 0.2), rgba(110, 231, 183, 0.2)); color: #7eb4ff; border: 2px solid #7eb4ff; box-shadow: none; padding: 12px 30px; font-size: 14px; }
    @media (hover: hover) { .post-exam-cta.secondary:hover { box-shadow: 0 0 15px rgba(126, 180, 255, 0.3); } }
    .post-exam-dismiss { display: block; margin-top: 15px; color: #555; font-size: 12px; text-decoration: underline; cursor: pointer; transition: color 0.2s; background: none; border: none; }
    @media (hover: hover) { .post-exam-dismiss:hover { color: #888; } }
    .post-exam-panel.urgent .post-exam-cta { background: linear-gradient(135deg, #ff6b35, #fbbf24); }
    @media (hover: hover) { .post-exam-panel.urgent .post-exam-cta:hover { box-shadow: 0 0 40px rgba(255, 107, 53, 0.6); } }
    /* Focused drill mini-result */
    .focused-drill-result { background: linear-gradient(135deg, rgba(110, 231, 183, 0.1), rgba(126, 180, 255, 0.1)); border: 2px solid #6ee7b7; border-radius: 12px; padding: 25px; margin: 20px auto; max-width: 500px; text-align: center; }
    .focused-drill-result .score-big { font-size: 42px; font-weight: bold; color: #6ee7b7; }
    .focused-drill-result .comparison { font-size: 14px; color: #cccccc; margin-top: 10px; }
    .focused-drill-result .comparison strong { color: #7eb4ff; }
    /* Dashboard ignored recommendations badge */
    .ignored-badge { display: inline-block; background: rgba(255, 107, 53, 0.2); border: 1px solid #ff6b35; border-radius: 6px; padding: 6px 12px; font-size: 12px; color: #ff6b35; margin-top: 8px; }
    /* ===== READINESS INDICATOR ===== */
    .readiness-card { border: 2px solid #333; transition: all 0.5s ease; }
    .readiness-card.state-just-starting { border-color: #555; background: linear-gradient(135deg, rgba(80,80,80,0.1), rgba(40,40,40,0.1)); }
    .readiness-card.state-building { border-color: #7eb4ff; background: linear-gradient(135deg, rgba(126,180,255,0.08), rgba(110,231,183,0.05)); box-shadow: 0 0 20px rgba(126,180,255,0.15); }
    .readiness-card.state-getting-there { border-color: #fbbf24; background: linear-gradient(135deg, rgba(251,191,36,0.08), rgba(255,165,0,0.05)); box-shadow: 0 0 25px rgba(251,191,36,0.15); }
    .readiness-card.state-almost-ready { border-color: #6ee7b7; background: linear-gradient(135deg, rgba(110,231,183,0.1), rgba(126,180,255,0.08)); box-shadow: 0 0 30px rgba(110,231,183,0.2); }
    .readiness-card.state-guarantee-earned { border-color: #6ee7b7; background: linear-gradient(135deg, rgba(110,231,183,0.15), rgba(126,180,255,0.12)); box-shadow: 0 0 40px rgba(110,231,183,0.35); animation: pulse 3s ease-in-out infinite; }
    .readiness-emoji { font-size: 40px; margin-bottom: 8px; }
    .readiness-title { font-size: 22px; font-weight: bold; margin-bottom: 6px; }
    .readiness-subtitle { font-size: 14px; color: #cccccc; margin-bottom: 16px; line-height: 1.5; }
    .readiness-meter { width: 100%; max-width: 400px; height: 14px; background: #1a1a3a; border-radius: 7px; overflow: hidden; margin: 0 auto 12px; border: 1px solid #333; }
    .readiness-meter-fill { height: 100%; border-radius: 7px; transition: width 0.8s ease, background 0.5s ease; }
    .readiness-pct { font-size: 13px; color: #888; }
    .readiness-next-step { margin-top: 14px; padding: 10px 16px; background: rgba(126,180,255,0.08); border: 1px solid rgba(126,180,255,0.2); border-radius: 8px; font-size: 13px; color: #cccccc; display: inline-block; }
    .readiness-next-step strong { color: #7eb4ff; }
    /* ===== READINESS BREAKDOWN ===== */
    .readiness-breakdown { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.1); }
    .readiness-breakdown-item { margin-bottom: 14px; }
    .readiness-breakdown-label { font-size: 12px; font-weight: bold; color: #7eb4ff; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
    .readiness-breakdown-score { font-size: 13px; font-weight: bold; }
    .readiness-breakdown-score.strong { color: #6ee7b7; }
    .readiness-breakdown-score.medium { color: #fbbf24; }
    .readiness-breakdown-score.weak { color: #f87171; }
    .readiness-progress-bar { width: 100%; height: 10px; background: #1a1a3a; border-radius: 5px; overflow: hidden; border: 1px solid #333; }
    .readiness-progress-fill { height: 100%; border-radius: 5px; transition: width 0.6s ease, background 0.4s ease; }
    .readiness-coverage-text { font-size: 12px; color: #aaa; margin-top: 6px; }
    .readiness-actionable { margin-top: 16px; padding: 12px 14px; background: rgba(126,180,255,0.12); border: 1px solid rgba(126,180,255,0.3); border-radius: 8px; font-size: 13px; color: #cccccc; line-height: 1.5; }
    .readiness-actionable strong { color: #6ee7b7; }
    /* ===== CATEGORY MASTERY UPGRADE ===== */
    .mastery-status { font-size: 10px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; padding: 2px 6px; border-radius: 3px; flex-shrink: 0; }
    .mastery-status.strong { background: rgba(110,231,183,0.2); color: #6ee7b7; }
    .mastery-status.developing { background: rgba(251,191,36,0.2); color: #fbbf24; }
    .mastery-status.needs-work { background: rgba(248,113,113,0.2); color: #f87171; }
    .mastery-status.not-started { background: rgba(100,100,100,0.2); color: #666; }
    .mastery-drill-cta { font-size: 11px; color: #7eb4ff; cursor: pointer; text-decoration: none; flex-shrink: 0; transition: color 0.2s; white-space: nowrap; background: none; border: none; padding: 0; }
    @media (hover: hover) { .mastery-drill-cta:hover { color: #6ee7b7; text-decoration: underline; } }
    .mastery-trend { font-size: 13px; flex-shrink: 0; width: 20px; text-align: center; }
    .mastery-trend.up { color: #6ee7b7; }
    .mastery-trend.flat { color: #fbbf24; }
    .mastery-trend.down { color: #f87171; }
    /* ===== RETURNING STUDENT BANNER ===== */
    .returning-banner { background: linear-gradient(135deg, rgba(126,180,255,0.08), rgba(110,231,183,0.05)); border: 2px solid #7eb4ff; border-radius: 12px; padding: 18px 24px; margin-bottom: 20px; display: flex; align-items: center; gap: 16px; animation: slideIn 0.4s ease; }
    .returning-banner-icon { font-size: 28px; flex-shrink: 0; }
    .returning-banner-text { flex: 1; font-size: 14px; color: #cccccc; line-height: 1.5; }
    .returning-banner-text strong { color: #ffffff; }
    .returning-banner-action { flex-shrink: 0; }
    .returning-banner-action button { background: linear-gradient(135deg, #7eb4ff, #6ee7b7); color: #0a0a1a; border: none; padding: 10px 20px; border-radius: 8px; font-size: 13px; font-weight: bold; cursor: pointer; transition: all 0.3s; }
    @media (hover: hover) { .returning-banner-action button:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(126,180,255,0.4); } }
    /* Onboarding */
    .onboarding-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #0a0a1a; z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; overflow-y: auto; }
    .ob-container { max-width: 500px; width: 100%; text-align: center; }
    .ob-screen { animation: obFadeIn 0.5s ease; }
    @keyframes obFadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
    @keyframes obFlicker { 0% { opacity: 0; } 10% { opacity: 1; } 12% { opacity: 0.3; } 14% { opacity: 1; } 30% { opacity: 1; } 32% { opacity: 0.6; } 34% { opacity: 1; } 100% { opacity: 1; } }
    .ob-logo { font-size: 42px; font-weight: 900; letter-spacing: 3px; color: #7eb4ff; margin-bottom: 20px; animation: obFlicker 1.5s ease-out forwards, glow 2s ease-in-out 1.5s infinite; }
    .ob-cta { font-size: 16px; padding: 16px 32px; }
    .onboarding-progress { display: flex; gap: 8px; margin-bottom: 30px; justify-content: center; }
    .onboarding-dot { width: 12px; height: 12px; border-radius: 50%; background: #1a1a3a; border: 2px solid #7eb4ff; transition: all 0.3s; }
    .onboarding-dot.active { background: #7eb4ff; box-shadow: 0 0 10px rgba(126, 180, 255, 0.5); }
    .onboarding-dot.done { background: #6ee7b7; border-color: #6ee7b7; }
    .ob-cat-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
    .ob-cat-label { width: 100px; text-align: right; font-size: 13px; color: #cccccc; }
    .ob-cat-fill { height: 20px; border-radius: 4px; min-width: 20px; transition: width 0.5s ease; }
    /* Mode locked card overlay */
    .mode-card.locked { opacity: 0.4; filter: grayscale(0.8); pointer-events: none; position: relative; }
    .mode-card-lock { position: absolute; top: 8px; right: 8px; color: #666; }
    .mode-card-unlock-hint { font-size: 11px; color: #666; margin-top: 6px; font-style: italic; }
    /* Unlock celebration overlay */
    .unlock-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(10,10,26,0.92); z-index: 1500; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; animation: obFadeIn 0.3s ease; }
    .unlock-title { font-size: 14px; color: #888; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 10px; }
    .unlock-name { font-size: 32px; font-weight: 900; color: #7eb4ff; margin-bottom: 15px; animation: glow 1s ease-in-out infinite; }
    /* Streak-at-risk banner */
    .streak-risk-banner { background: linear-gradient(135deg, rgba(251,191,36,0.1), rgba(251,146,60,0.08)); border: 2px solid #fbbf24; border-radius: 12px; padding: 14px 18px; margin-bottom: 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; animation: obFadeIn 0.3s ease; }
    .streak-risk-banner button { background: none; border: none; color: #666; font-size: 18px; cursor: pointer; padding: 4px; }
    /* Category Mastery bars */
    .mastery-bar-bg { width: 100%; height: 10px; background: #1a1a3a; border-radius: 5px; overflow: hidden; }
    .mastery-bar-fill { height: 100%; border-radius: 5px; transition: width 0.5s ease; }
    .mastery-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(126,180,255,0.1); }
    .mastery-row:last-child { border-bottom: none; }
    .mastery-label { width: 80px; font-size: 12px; color: #cccccc; flex-shrink: 0; }
    .mastery-pct { width: 40px; text-align: right; font-size: 12px; font-weight: bold; color: #7eb4ff; flex-shrink: 0; }
    /* Definition Duel game */
    .duel-term { font-size: 28px; font-weight: bold; color: #7eb4ff; text-align: center; padding: 25px; margin: 20px 0; background: linear-gradient(135deg, rgba(126,180,255,0.1), rgba(110,231,183,0.05)); border: 2px solid #7eb4ff; border-radius: 15px; animation: slideIn 0.4s ease; }
    .duel-options { display: flex; flex-direction: column; gap: 12px; margin: 20px 0; }
    .duel-option { padding: 18px 20px; background: linear-gradient(135deg, rgba(126,180,255,0.08), rgba(110,231,183,0.05)); border: 2px solid #444; border-radius: 12px; cursor: pointer; font-size: 15px; line-height: 1.5; color: #ffffff; transition: all 0.3s ease; text-align: left; }
    @media (hover: hover) { .duel-option:hover { border-color: #7eb4ff; background: linear-gradient(135deg, rgba(126,180,255,0.15), rgba(110,231,183,0.1)); transform: translateY(-2px); box-shadow: 0 0 15px rgba(126,180,255,0.3); } }
    .duel-option.correct { border-color: #6ee7b7; background: linear-gradient(135deg, rgba(110,231,183,0.3), rgba(126,180,255,0.15)); box-shadow: 0 0 25px rgba(110,231,183,0.5); animation: slideIn 0.3s ease; }
    .duel-option.wrong { border-color: #f87171; background: linear-gradient(135deg, rgba(248,113,113,0.3), rgba(255,0,0,0.15)); box-shadow: 0 0 25px rgba(248,113,113,0.5); animation: shake 0.3s ease; }
    .duel-option.disabled { pointer-events: none; opacity: 0.5; }
    .duel-option.highlight { border-color: #6ee7b7; opacity: 1; }
    .duel-progress { display: flex; gap: 6px; justify-content: center; margin: 15px 0; }
    .duel-dot { width: 12px; height: 12px; border-radius: 50%; background: #333; border: 1px solid #555; transition: all 0.3s; }
    .duel-dot.correct { background: #6ee7b7; border-color: #6ee7b7; box-shadow: 0 0 8px rgba(110,231,183,0.5); }
    .duel-dot.wrong { background: #f87171; border-color: #f87171; box-shadow: 0 0 8px rgba(248,113,113,0.5); }
    .duel-dot.current { border-color: #7eb4ff; box-shadow: 0 0 8px rgba(126,180,255,0.5); }
    .duel-streak { text-align: center; font-size: 14px; color: #fbbf24; margin: 5px 0; min-height: 20px; }
    @media (max-width: 480px) { .duel-term { font-size: 22px; padding: 18px; } .duel-option { font-size: 14px; padding: 14px 16px; } }
    /* Calculator */
    .calc-toggle { position: fixed; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); right: 20px; width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg, #7eb4ff, #6ee7b7); border: none; color: #0a0a1a; font-size: 22px; font-weight: bold; cursor: pointer; z-index: 250; box-shadow: 0 4px 20px rgba(126,180,255,0.5); display: none; transition: all 0.3s; }
    @media (hover: hover) { .calc-toggle:hover { transform: scale(1.1); } }
    .calc-panel { position: fixed; bottom: 130px; right: 20px; width: 260px; background: #1a1a3a; border: 2px solid #7eb4ff; border-radius: 15px; padding: 15px; z-index: 250; display: none; box-shadow: 0 8px 40px rgba(0,0,0,0.6); }
    .calc-display { width: 100%; padding: 12px; background: #0a0a1a; border: 1px solid #333; border-radius: 8px; color: #6ee7b7; font-size: 22px; font-family: monospace; text-align: right; margin-bottom: 10px; }
    .calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
    .calc-btn { padding: 12px; background: rgba(126,180,255,0.1); border: 1px solid #444; border-radius: 8px; color: #ffffff; font-size: 16px; cursor: pointer; transition: all 0.2s; font-family: monospace; }
    @media (hover: hover) { .calc-btn:hover { background: rgba(126,180,255,0.25); border-color: #7eb4ff; } }
    .calc-btn.op { background: rgba(251,191,36,0.15); color: #fbbf24; }
    .calc-btn.eq { background: linear-gradient(135deg, #7eb4ff, #6ee7b7); color: #0a0a1a; font-weight: bold; }
    .calc-btn.clear { background: rgba(248,113,113,0.15); color: #f87171; }
    @media (max-width: 480px) { .calc-panel { width: 240px; right: 10px; bottom: 130px; } .calc-toggle { bottom: calc(70px + env(safe-area-inset-bottom, 0px)); right: 15px; width: 44px; height: 44px; font-size: 18px; } }
    /* Drills callout banner */
    .drills-banner { background: linear-gradient(135deg, rgba(251,191,36,0.1), rgba(255,100,0,0.1)); border: 2px solid #fbbf24; border-radius: 15px; padding: 20px; margin-bottom: 20px; text-align: center; cursor: pointer; transition: all 0.3s; }
    @media (hover: hover) { .drills-banner:hover { box-shadow: 0 0 30px rgba(251,191,36,0.3); transform: translateY(-2px); } }
    /* Review screen cards */
    .review-card { background: linear-gradient(135deg, rgba(126,180,255,0.05), rgba(110,231,183,0.05)); border: 2px solid #333; border-radius: 10px; margin: 8px 0; overflow: hidden; }
    .review-card-header { padding: 12px 15px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
    .review-card-header.correct-header { border-left: 4px solid #6ee7b7; }
    .review-card-header.wrong-header { border-left: 4px solid #f87171; background: rgba(248,113,113,0.05); }
    .review-card-body { padding: 0 15px 15px; display: none; }
    .review-card-body.expanded { display: block; }
    /* Mute button */
    .mute-btn { background: transparent; border: none; color: #7eb4ff; font-size: 20px; cursor: pointer; padding: 5px; }
    /* Survival timer */
    .survival-timer { font-size: 24px; font-weight: bold; color: #f87171; text-align: center; margin: 5px 0; font-family: 'Courier New', monospace; }
    .difficulty-badge { display: inline-block; padding: 4px 10px; border-radius: 4px; font-size: 11px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; }
    .difficulty-badge.easy { background: rgba(110,231,183,0.2); color: #6ee7b7; }
    .difficulty-badge.medium { background: rgba(251,191,36,0.2); color: #fbbf24; }
    .difficulty-badge.hard { background: rgba(248,113,113,0.2); color: #f87171; }
    button, .answer-btn, .match-card, .flashcard, .nav-tab, .btn-primary, .btn-secondary {
      -webkit-tap-highlight-color: transparent;
      touch-action: manipulation;
    }
    @media (max-width: 480px) {
      .nav-tabs { overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; padding-bottom: 5px; -webkit-overflow-scrolling: touch; }
      .nav-tab { flex-shrink: 0; padding: 8px 14px; font-size: 13px; min-height: 44px; }
      .answer-btn { min-height: 44px; padding: 12px 14px !important; font-size: 13px !important; }
      .flashcard { font-size: 16px; padding: 25px 15px; min-height: 150px; }
      .question-text { font-size: 15px !important; line-height: 1.5 !important; }
      .question-card { padding: 16px 14px !important; margin: 12px 0 !important; }
      .match-card { font-size: 13px; padding: 12px; min-height: 44px; }
      .matching-container { gap: 10px; }
      .answers { gap: 6px !important; }
      .results-title { font-size: 32px; }
      .game-over-title { font-size: 36px; }
      .timer { font-size: 28px !important; margin: 8px 0 !important; }
      .game-info { gap: 6px !important; margin: 8px 0 !important; }
      .info-box { padding: 8px 10px !important; }
      .info-label { font-size: 9px !important; }
      .info-value { font-size: 18px !important; }
      .container { padding: 0 10px; }
      h1 { font-size: 20px !important; margin: 12px 0 !important; }
      h1 + p { margin-bottom: 10px !important; }
      .dashboard-card { padding: 20px; }
      .glossary-item { padding: 15px; }
      .btn-primary { padding: 12px 30px; font-size: 14px; }
      .duel-term { padding: 16px !important; font-size: 20px !important; margin: 10px 0 !important; }
      .duel-option { padding: 12px 14px !important; font-size: 13px !important; }
      .duel-options { gap: 8px !important; }
      .explanation { padding: 12px !important; font-size: 13px !important; margin-top: 8px !important; }
      .screen { padding-left: 10px !important; padding-right: 10px !important; }
    }
    /* FIX 1: Responsive two-column dashboard cards */
    @media (max-width: 600px) {
      #dashboard > div[style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
    }
    .icon { display: inline-block; width: 1em; height: 1em; vertical-align: -0.125em; }
    .icon-lg { width: 1.5em; height: 1.5em; }
    .icon-xl { width: 2em; height: 2em; }
    /* Touch feedback — fires instantly on touch-start */
    .answer-btn:active, .nav-tab:active, .btn-primary:active, .btn-secondary:active, .match-card:active, .flashcard:active, .calc-toggle:active, .calc-btn:active, .duel-option:active, .mode-card:active, .bottom-nav-tab:active { transform: scale(0.97); opacity: 0.9; transition: transform 0ms, opacity 0ms; }

    /* ========== BOTTOM NAV BAR ========== */
    .bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: 60px; background: #0a0a1a; border-top: 2px solid #7eb4ff; display: flex; justify-content: space-around; align-items: center; z-index: 200; padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 -4px 20px rgba(126, 180, 255, 0.15); }
    .bottom-nav-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: none; border: none; color: #666; cursor: pointer; padding: 6px 0; min-width: 64px; min-height: 48px; font-size: 11px; font-weight: 600; transition: color 0.2s; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
    .bottom-nav-tab svg { width: 24px; height: 24px; }
    .bottom-nav-tab.active { color: #7eb4ff; }
    .bottom-nav-tab.active svg { filter: drop-shadow(0 0 6px rgba(126, 180, 255, 0.5)); }
    body.focus-mode .bottom-nav { border-top-color: #5a8a9a; box-shadow: none; }
    body.focus-mode .bottom-nav-tab.active { color: #5a8a9a; }

    /* Container padding to clear bottom nav */
    .container { padding-bottom: 80px; }

    /* ========== MODE GRID (Practice/Test screens) ========== */
    .mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .mode-card { background: linear-gradient(135deg, rgba(126, 180, 255, 0.08), rgba(110, 231, 183, 0.05)); border: 2px solid rgba(126, 180, 255, 0.3); border-radius: 12px; padding: 20px 15px; cursor: pointer; transition: all 0.2s; text-align: center; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
    @media (hover: hover) { .mode-card:hover { border-color: #7eb4ff; box-shadow: 0 0 20px rgba(126, 180, 255, 0.3); transform: translateY(-2px); } }
    .mode-card-icon { margin-bottom: 8px; }
    .mode-card-name { font-size: 15px; font-weight: 700; color: #ffffff; margin-bottom: 4px; }
    .mode-card-desc { font-size: 12px; color: #888; line-height: 1.4; }
    .mode-card-time { font-size: 11px; color: #555; margin-top: 6px; }
    @media (max-width: 480px) { .mode-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .mode-card { padding: 16px 12px; } }

    /* ========== BACK BUTTON (game mode screens) ========== */
    .mode-back-btn { display: inline-flex; align-items: center; gap: 4px; background: none; border: 1px solid #444; color: #888; padding: 10px 14px; border-radius: 6px; font-size: 12px; cursor: pointer; margin-bottom: 10px; transition: all 0.2s; touch-action: manipulation; -webkit-tap-highlight-color: transparent; min-height: 48px; }
    @media (hover: hover) { .mode-back-btn:hover { border-color: #7eb4ff; color: #7eb4ff; } }

    /* ========== Sprint 4: Toast notification ========== */
    .unlock-toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px); background: linear-gradient(135deg, #0a0a1a, #1a1a3a); border: 2px solid #7eb4ff; border-radius: 10px; padding: 12px 24px; font-size: 14px; color: #ffffff; z-index: 1600; opacity: 0; transition: opacity 0.3s, transform 0.3s; box-shadow: 0 4px 20px rgba(126,180,255,0.3); white-space: nowrap; }
    .unlock-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
    /* ========== Sprint 4: Confetti ========== */
    @keyframes confettiFall { 0% { transform: translateY(-10px) rotate(0deg); opacity: 1; } 100% { transform: translateY(100vh) rotate(720deg); opacity: 0; } }
    .confetti-piece { position: fixed; top: -10px; width: 8px; height: 8px; border-radius: 2px; z-index: 1500; pointer-events: none; animation: confettiFall 2.5s ease-in forwards; }
    /* ========== Sprint 4: Keyboard help overlay ========== */
    .kb-help-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(10,10,26,0.92); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; animation: obFadeIn 0.2s ease; }
    .kb-help-card { background: #1a1a3a; border: 2px solid #7eb4ff; border-radius: 15px; padding: 30px; max-width: 400px; width: 100%; }
    .kb-help-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #222; }
    .kb-help-key { display: inline-block; background: rgba(126,180,255,0.15); border: 1px solid #7eb4ff; border-radius: 4px; padding: 2px 8px; font-family: monospace; color: #7eb4ff; font-size: 13px; }

    /* Old paywall CSS removed — app is now ad-supported */

    /* ========== Sprint 6 Task 3: Combo milestone visuals ========== */
    @keyframes comboPop { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
    .combo-milestone-5 { color: #6ee7b7; text-shadow: 0 0 8px rgba(110,231,183,0.5); animation: comboPop 0.4s ease-out; }
    .combo-milestone-10 { color: #fbbf24; text-shadow: 0 0 12px rgba(251,191,36,0.6); animation: comboPop 0.4s ease-out; }
    .combo-milestone-15 { color: #fb923c; text-shadow: 0 0 15px rgba(251,146,60,0.7); animation: comboPop 0.4s ease-out; }
    .combo-milestone-25 { color: #f87171; text-shadow: 0 0 20px rgba(248,113,113,0.8); animation: comboPop 0.4s ease-out; }

    /* ========== Sprint 6 Task 4: Flashcard 3D flip ========== */
    .flashcard-container { perspective: 800px; }
    .flashcard { transform-style: preserve-3d; will-change: transform; transition: transform 0.4s ease-in-out; backface-visibility: hidden; }
    .flashcard.flip { transform: rotateY(180deg); }
    .flashcard.flip > * { transform: rotateY(180deg); }

    /* ========== Sprint 6 Task 5: Exam Sim visual shift ========== */
    .exam-mode-active .container { max-width: 600px; }
    .exam-mode-active .question-card { border-color: #333; box-shadow: 0 0 10px rgba(0,0,0,0.4); background: linear-gradient(135deg, rgba(20,20,40,0.9), rgba(10,10,26,0.95)); }
    .exam-mode-active .timer { font-size: 36px; padding: 10px; background: linear-gradient(90deg, rgba(126,180,255,0.08), transparent); border-radius: 8px; margin: 10px 0; }

    /* ========== Sprint 6 Task 10: Tomorrow preview ========== */
    .tomorrow-preview { background: linear-gradient(135deg, rgba(126,180,255,0.05), rgba(110,231,183,0.03)); border: 1px solid #222; border-radius: 10px; padding: 12px 16px; margin-top: 10px; text-align: center; }
    .tomorrow-preview-label { font-size: 11px; color: #555; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
    .tomorrow-preview-mode { font-size: 14px; color: #7eb4ff; font-weight: 600; }

    /* ========== Sprint 7 Task 1: Personal best banner ========== */
    .pb-banner { position: fixed; top: -60px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, #fbbf24, #fb923c); color: #0a0a1a; font-size: 16px; font-weight: 900; padding: 14px 28px; border-radius: 0 0 12px 12px; z-index: 1600; transition: top 0.4s ease-out; white-space: nowrap; box-shadow: 0 4px 20px rgba(251,191,36,0.5); letter-spacing: 1px; }
    .pb-banner.show { top: 0; }
    /* ========== Sprint 7 Task 2: Heart loss upgrade ========== */
    @keyframes heartDie { 0% { transform: scale(1); opacity: 1; color: #f87171; } 50% { transform: scale(1.2); color: #ff0000; } 100% { transform: scale(0); opacity: 0; } }
    .heart-dying { animation: heartDie 0.5s ease-out forwards; display: inline-block; }
    .danger-vignette { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 999; box-shadow: inset 0 0 80px rgba(255,0,0,0.4); animation: dangerPulse 1s ease-in-out infinite; }
    @keyframes dangerPulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
    @keyframes microShake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
    /* ========== Sprint 7 Task 3: Enhanced game over ========== */
    .go-xp-earned { color: #6ee7b7; font-size: 18px; font-weight: bold; margin: 8px 0; }
    .go-percentile { display: inline-block; padding: 6px 16px; background: linear-gradient(135deg, rgba(126,180,255,0.15), rgba(110,231,183,0.1)); border: 1px solid #7eb4ff; border-radius: 20px; color: #7eb4ff; font-size: 14px; font-weight: 600; margin: 10px 0; }
    /* ========== Sprint 7 Task 4: Exam question navigator ========== */
    .exam-nav-bar { position: sticky; top: 0; z-index: 50; background: #0a0a1a; padding: 8px 0; margin-bottom: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; border-bottom: 1px solid #1a1a3a; }
    .exam-nav-btn { display: inline-block; width: 32px; height: 32px; border: 1px solid #333; background: transparent; color: #666; border-radius: 4px; font-size: 10px; cursor: pointer; margin: 0 2px; vertical-align: middle; position: relative; touch-action: manipulation; }
    .exam-nav-btn.current { border-color: #7eb4ff; color: #fff; background: rgba(126,180,255,0.2); }
    .exam-nav-btn.answered { border-color: #6ee7b7; }
    .exam-nav-btn.answered::after { content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); width: 6px; height: 6px; border-radius: 50%; background: #6ee7b7; }
    .exam-nav-btn.flagged { border-color: #fbbf24; }
    .exam-nav-btn.flagged::after { background: #fbbf24; }

    /* ========== Sprint 10: Leaderboard ========== */
    .lb-mode-tab.active { background: linear-gradient(135deg, #fbbf24, #fb923c); color: #0a0a1a; border-color: #fbbf24; }
    .lb-row { display: grid; grid-template-columns: 40px 1fr 80px; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid #1a1a2a; font-size: 13px; }
    .lb-row.me { background: rgba(126,180,255,0.1); border-left: 3px solid #7eb4ff; }
    .lb-rank { font-weight: bold; color: #888; text-align: center; }
    .lb-rank.gold { color: #fbbf24; } .lb-rank.silver { color: #c0c0c0; } .lb-rank.bronze { color: #cd7f32; }
    .lb-name { color: #cccccc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .lb-score { color: #7eb4ff; font-weight: bold; text-align: right; }
    /* ========== Sprint 10: Share card ========== */
    .share-card { width: 400px; padding: 30px; background: linear-gradient(135deg, #0a0a1a, #1a1a3a); border: 2px solid #7eb4ff; border-radius: 16px; text-align: center; font-family: 'Inter', sans-serif; }
    .share-card-logo { font-size: 20px; font-weight: 900; color: #7eb4ff; letter-spacing: 2px; margin-bottom: 15px; }
    .share-card-score { font-size: 48px; font-weight: 900; margin: 10px 0; }
    .share-card-mode { font-size: 14px; color: #888; margin-bottom: 8px; }
    .share-card-tagline { font-size: 13px; color: #666; font-style: italic; margin-top: 12px; }
    /* ========== Sprint 10: I Passed celebration ========== */
    .pass-celebration { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(10,10,26,0.95); z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; animation: obFadeIn 0.5s ease; }
    .pass-trophy { font-size: 80px; margin-bottom: 10px; animation: bounce 1s ease-in-out infinite; }
    .pass-title { font-size: 28px; font-weight: 900; color: #fbbf24; margin-bottom: 8px; text-shadow: 0 0 20px rgba(251,191,36,0.5); }
    .pass-score { font-size: 48px; font-weight: 900; color: #6ee7b7; margin: 10px 0; }
    .pass-subtitle { font-size: 15px; color: #cccccc; margin-bottom: 20px; }
    /* ========== Reinforcement toggle ========== */
    .reinforce-toggle { position: absolute; top: 8px; right: 8px; z-index: 10; }
    .reinforce-toggle-btn { background: rgba(126,180,255,0.1); border: 1px solid #333; color: #666; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; touch-action: manipulation; }
    @media (hover: hover) { .reinforce-toggle-btn:hover { border-color: #7eb4ff; color: #7eb4ff; } }
    .reinforce-menu { position: absolute; top: 32px; right: 0; background: #1a1a3a; border: 1px solid #333; border-radius: 8px; padding: 10px; min-width: 160px; box-shadow: 0 4px 20px rgba(0,0,0,0.5); z-index: 20; }
    .reinforce-menu-item { display: block; width: 100%; background: none; border: none; color: #cccccc; padding: 8px 10px; font-size: 12px; text-align: left; cursor: pointer; border-radius: 4px; transition: background 0.2s; }
    @media (hover: hover) { .reinforce-menu-item:hover { background: rgba(126,180,255,0.1); color: #7eb4ff; } }
    /* ========== Ad placeholders ========== */
    .ad-placeholder { background: rgba(255,255,255,0.03); border: 1px dashed #333; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #444; font-size: 12px; font-weight: bold; letter-spacing: 1px; }
    .ad-interstitial { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(10,10,26,0.95); z-index: 2500; display: flex; align-items: center; justify-content: center; padding: 20px; animation: obFadeIn 0.3s ease; }
    /* ========== I6 S2e: Calm Mode ========== */
    body.calm-mode .confetti-piece,
    body.calm-mode .streak-celebration,
    body.calm-mode .level-up-animation,
    body.calm-mode .pb-banner,
    body.calm-mode #trophyModal { display: none !important; }
    body.calm-mode .xp-popup { display: none !important; }
    /* ========== I6 P4: Why Is This Wrong? Panel ========== */
    .wiw-panel { margin-top: 15px; padding: 16px; background: linear-gradient(135deg, rgba(251,191,36,0.08), rgba(251,146,60,0.06)); border: 1px solid rgba(251,191,36,0.3); border-radius: 12px; animation: obFadeIn 0.3s ease; }
    .wiw-title { color: #fbbf24; font-size: 14px; font-weight: bold; text-transform: uppercase; margin-bottom: 8px; letter-spacing: 1px; }
    .wiw-option { display: block; width: 100%; padding: 10px 14px; margin: 6px 0; background: rgba(255,255,255,0.03); border: 1px solid rgba(251,191,36,0.2); color: #cccccc; border-radius: 8px; cursor: pointer; font-size: 13px; text-align: left; transition: all 0.2s; }
    @media (hover: hover) { .wiw-option:hover { background: rgba(251,191,36,0.1); border-color: rgba(251,191,36,0.4); } }
    .wiw-option.correct { background: rgba(110,231,183,0.15); border-color: #6ee7b7; color: #6ee7b7; }
    .wiw-option.wrong { background: rgba(248,113,113,0.15); border-color: #f87171; color: #f87171; }

    /* ============================================================================
       VISUAL REDESIGN — APPENDED (overrides above rules via !important)
       ============================================================================ */
/* ============================================================================
   MLO ARCADE — COMPREHENSIVE REDESIGN STYLESHEET v2

   Design: Premium fintech — clean, minimal, no neon arcade glow
   Font: Satoshi (Fontshare)
   Palette: Dark base, subtle accents, thin borders, soft shadows

   EVERY class in the app is covered. All rules use !important to
   override both inline <style> blocks and JS-set inline styles.
   ============================================================================ */

/* Font loaded via <link> in index.html for faster rendering */

/* ============================================================================
   DESIGN TOKENS
   ============================================================================ */
:root {
  --font-primary: 'Satoshi', system-ui, -apple-system, sans-serif;
  --bg-base: #0a0a1a;
  --bg-card: rgba(255,255,255,0.02);
  --bg-card-hover: rgba(255,255,255,0.05);
  --bg-elevated: #1a1a3a;
  --border-subtle: rgba(255,255,255,0.06);
  --border-accent: rgba(126,180,255,0.15);
  --border-accent-hover: rgba(126,180,255,0.3);
  --text-primary: #ffffff;
  --text-secondary: rgba(255,255,255,0.65);
  --text-tertiary: rgba(255,255,255,0.4);
  --text-muted: rgba(255,255,255,0.25);
  --accent-cyan: #7eb4ff;
  --accent-green: #6ee7b7;
  --accent-gold: #fbbf24;
  --accent-orange: #fb923c;
  --accent-red: #ff3c64;
  --accent-yellow: #ffc832;
  --gradient-primary: linear-gradient(90deg, #7eb4ff, #6ee7b7);
  --gradient-card: linear-gradient(160deg, rgba(126,180,255,0.04), rgba(110,231,183,0.02), transparent);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 100px;
  --shadow-card: 0 2px 8px rgba(0,0,0,0.2);
  --shadow-elevated: 0 4px 16px rgba(0,0,0,0.3);
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* ============================================================================
   GLOBAL RESETS
   ============================================================================ */
body {
  font-family: var(--font-primary) !important;
  background: var(--bg-base) !important;
  color: var(--text-primary) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*, *::before, *::after {
  font-family: inherit;
}

h1, h2, h3, h4 {
  font-family: var(--font-primary) !important;
  letter-spacing: -0.3px;
}

/* Kill ALL glow/pulse/bounce animations from old theme */
@keyframes glow { 0%, 100% { text-shadow: none; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } }

/* Clean animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

/* ============================================================================
   TOP BAR / HEADER
   ============================================================================ */
.top-bar {
  background: linear-gradient(135deg, #0a0a1a, #1a1a3a) !important;
  border-bottom: 1px solid rgba(126,180,255,0.15) !important;
  box-shadow: none !important;
  padding: 14px 20px !important;
  padding-top: max(14px, env(safe-area-inset-top, 0px)) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 50 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 16px !important;
}

.logo {
  font-family: var(--font-primary) !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  text-shadow: none !important;
  animation: none !important;
  color: #7eb4ff !important;
}

/* ============================================================================
   XP DISPLAY / LEVEL BADGE / PROGRESS BAR
   ============================================================================ */
.xp-display {
  font-family: var(--font-primary) !important;
  flex: 1 !important;
  text-align: center !important;
  min-width: 0 !important;
}

.level-badge {
  background: linear-gradient(90deg, #7eb4ff, #6ee7b7) !important;
  color: #0a0a1a !important;
  border-radius: 20px !important;
  font-family: var(--font-primary) !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  padding: 4px 12px !important;
  box-shadow: none !important;
  border: none !important;
  letter-spacing: 0.5px !important;
}

.xp-bar {
  background: rgba(255,255,255,0.06) !important;
  border: none !important;
  border-radius: 4px !important;
  height: 4px !important;
  box-shadow: none !important;
  overflow: hidden !important;
  margin-top: 6px !important;
}

.xp-fill {
  background: linear-gradient(90deg, #7eb4ff, #6ee7b7) !important;
  box-shadow: none !important;
  border-radius: 4px !important;
}

.total-xp {
  font-family: var(--font-primary) !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  color: rgba(255,255,255,0.5) !important;
  text-shadow: none !important;
}

/* ============================================================================
   BOTTOM NAV BAR (redesign override)
   ============================================================================ */
.bottom-nav {
  background: linear-gradient(135deg, #0a0a1a, #1a1a3a) !important;
  border-top: 1px solid rgba(126,180,255,0.15) !important;
  box-shadow: none !important;
  height: auto !important;
  padding: 8px 0 !important;
  padding-bottom: max(8px, env(safe-area-inset-bottom, 0px)) !important;
}

.bottom-nav-tab {
  color: rgba(255,255,255,0.35) !important;
  font-family: var(--font-primary) !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  gap: 4px !important;
  transition: color 0.2s !important;
}

.bottom-nav-tab svg {
  width: 22px !important;
  height: 22px !important;
  stroke-width: 1.5 !important;
}

.bottom-nav-tab.active {
  color: #7eb4ff !important;
}

.bottom-nav-tab.active svg {
  filter: none !important;
}

/* ============================================================================
   NAVIGATION TABS
   ============================================================================ */
.nav-tabs {
  gap: 6px !important;
  padding: 4px 10px !important;
  border-bottom: none !important;
}

.nav-tab {
  font-family: var(--font-primary) !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 10px 14px !important;
  background: transparent !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-secondary) !important;
  box-shadow: none !important;
  transition: all var(--transition-fast) !important;
  cursor: pointer !important;
}

.nav-tab:hover {
  background: var(--bg-card-hover) !important;
  border-color: var(--border-accent) !important;
  color: var(--text-primary) !important;
  box-shadow: none !important;
}

.nav-tab.active {
  background: var(--gradient-primary) !important;
  color: #0a0a1a !important;
  border-color: transparent !important;
  box-shadow: none !important;
  font-weight: 700 !important;
}

/* ============================================================================
   CONTAINER & SCREENS
   ============================================================================ */
.container {
  max-width: 520px !important;
  margin: 0 auto !important;
}

.screen {
  animation: fadeIn 0.25s ease !important;
}

/* ============================================================================
   GAME INFO BOXES
   ============================================================================ */
.game-info {
  gap: 12px !important;
}

.info-box {
  font-family: var(--font-primary) !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: none !important;
  padding: 12px 16px !important;
}

.info-label {
  font-family: var(--font-primary) !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  color: var(--text-tertiary) !important;
  letter-spacing: 0.8px !important;
  text-transform: uppercase !important;
}

.info-value {
  font-family: var(--font-primary) !important;
  font-weight: 700 !important;
  font-size: 22px !important;
  color: var(--accent-cyan) !important;
  text-shadow: none !important;
}

/* ============================================================================
   TIMER
   ============================================================================ */
.timer {
  font-family: var(--font-primary) !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  color: var(--accent-cyan) !important;
  text-shadow: none !important;
  animation: none !important;
}

.timer.warning {
  color: var(--accent-red) !important;
  animation: none !important;
}

.survival-timer {
  font-family: var(--font-primary) !important;
  font-weight: 700 !important;
  text-shadow: none !important;
}

/* ============================================================================
   QUESTION CARDS
   ============================================================================ */
.question-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-card) !important;
  padding: 28px 22px !important;
}

.question-text {
  font-family: var(--font-primary) !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1.65 !important;
  color: var(--text-primary) !important;
}

/* ============================================================================
   ANSWER BUTTONS
   ============================================================================ */
.answer-btn {
  font-family: var(--font-primary) !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-md) !important;
  padding: 16px 18px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  color: var(--text-primary) !important;
  box-shadow: none !important;
  transition: all var(--transition-fast) !important;
}

.answer-btn:hover {
  background: var(--bg-card-hover) !important;
  border-color: var(--border-accent) !important;
  box-shadow: none !important;
  transform: none !important;
}

.answer-btn.correct,
.answer-btn[style*="border-color: #6ee7b7"],
.answer-btn[style*="border-color:#6ee7b7"] {
  background: rgba(110,231,183,0.06) !important;
  border-color: rgba(110,231,183,0.35) !important;
  box-shadow: none !important;
  animation: fadeIn 0.2s ease !important;
}

.answer-btn.wrong,
.answer-btn[style*="border-color: #f87171"],
.answer-btn[style*="border-color:#f87171"] {
  background: rgba(248,113,113,0.06) !important;
  border-color: rgba(248,113,113,0.35) !important;
  box-shadow: none !important;
}

/* ============================================================================
   PRIMARY & SECONDARY BUTTONS
   ============================================================================ */
.btn-primary {
  font-family: var(--font-primary) !important;
  background: var(--gradient-primary) !important;
  border: none !important;
  border-radius: var(--radius-md) !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
  box-shadow: none !important;
  color: #0a0a1a !important;
  transition: all var(--transition-normal) !important;
}

.btn-primary:hover {
  box-shadow: 0 4px 16px rgba(126,180,255,0.15) !important;
  transform: translateY(-1px) !important;
}

.btn-secondary {
  font-family: var(--font-primary) !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-accent) !important;
  border-radius: var(--radius-md) !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
  box-shadow: none !important;
}

.btn-secondary:hover {
  background: var(--bg-card-hover) !important;
  border-color: var(--border-accent-hover) !important;
}

/* ============================================================================
   CATEGORY SELECT DROPDOWN
   ============================================================================ */
.category-select select {
  font-family: var(--font-primary) !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-primary) !important;
  box-shadow: none !important;
  font-weight: 500 !important;
  padding: 10px 14px !important;
}

/* ============================================================================
   HEARTS DISPLAY (Survival mode)
   ============================================================================ */
.hearts-display {
  font-family: var(--font-primary) !important;
  letter-spacing: 4px !important;
}

/* ============================================================================
   COMBO COUNTER
   ============================================================================ */
.combo-counter {
  font-family: var(--font-primary) !important;
  font-weight: 700 !important;
  color: var(--accent-gold) !important;
  text-shadow: none !important;
  animation: fadeIn 0.3s ease !important;
}

.combo-milestone-5,
.combo-milestone-10,
.combo-milestone-15,
.combo-milestone-25 {
  text-shadow: none !important;
}

/* ============================================================================
   STAR RATING
   ============================================================================ */
.star-rating {
  letter-spacing: 6px !important;
}

/* ============================================================================
   SPEED ROUND
   ============================================================================ */
.speed-counter {
  font-family: var(--font-primary) !important;
  font-weight: 700 !important;
  text-shadow: none !important;
}

.speed-mode-btn {
  font-family: var(--font-primary) !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: none !important;
  font-weight: 600 !important;
  transition: all var(--transition-fast) !important;
}

.speed-mode-btn:hover {
  border-color: var(--border-accent) !important;
  background: var(--bg-card-hover) !important;
}

.speed-vignette {
  opacity: 0.3 !important;
}

.speed-slide-in {
  animation: slideIn 0.25s ease both !important;
}

/* ============================================================================
   STREAK DISPLAY
   ============================================================================ */
.streak-display {
  font-family: var(--font-primary) !important;
  font-weight: 700 !important;
  text-shadow: none !important;
}

/* ============================================================================
   RESULTS & GAME OVER SCREENS
   ============================================================================ */
.results-screen {
  animation: fadeUp 0.4s ease both !important;
}

.results-title {
  font-family: var(--font-primary) !important;
  font-weight: 800 !important;
  letter-spacing: -0.5px !important;
  text-shadow: none !important;
  animation: none !important;
}

.results-stat {
  font-family: var(--font-primary) !important;
}

.results-stat-value {
  font-family: var(--font-primary) !important;
  font-weight: 700 !important;
}

.game-over-screen {
  animation: fadeUp 0.4s ease both !important;
}

.game-over-title {
  font-family: var(--font-primary) !important;
  font-weight: 800 !important;
  letter-spacing: -0.5px !important;
  text-shadow: none !important;
}

.game-over-stats {
  font-family: var(--font-primary) !important;
}

.score-big {
  font-family: var(--font-primary) !important;
  font-weight: 800 !important;
  text-shadow: none !important;
}

.stat-highlight {
  font-family: var(--font-primary) !important;
  font-weight: 700 !important;
}

.stat-line {
  font-family: var(--font-primary) !important;
}

/* ============================================================================
   EXPLANATION BLOCKS
   ============================================================================ */
.explanation {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-md) !important;
  padding: 18px !important;
  font-family: var(--font-primary) !important;
  font-size: 14px !important;
  line-height: 1.65 !important;
  color: var(--text-secondary) !important;
  animation: fadeIn 0.3s ease both !important;
}

.explanation-title {
  font-family: var(--font-primary) !important;
  font-weight: 700 !important;
}

/* ============================================================================
   DASHBOARD
   ============================================================================ */
.dashboard-card {
  font-family: var(--font-primary) !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: none !important;
}

.dashboard-grid {
  gap: 12px !important;
}

.dashboard-title {
  font-family: var(--font-primary) !important;
  font-weight: 700 !important;
  letter-spacing: -0.2px !important;
  text-shadow: none !important;
}

.dashboard-stat {
  font-family: var(--font-primary) !important;
}

.dashboard-stat-value {
  font-family: var(--font-primary) !important;
  font-weight: 700 !important;
  text-shadow: none !important;
}

.dashboard-stat-label {
  font-family: var(--font-primary) !important;
  font-weight: 500 !important;
  color: var(--text-tertiary) !important;
}

/* ============================================================================
   READINESS INDICATOR
   ============================================================================ */
.readiness-card {
  font-family: var(--font-primary) !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: none !important;
}

.readiness-title {
  font-family: var(--font-primary) !important;
  font-weight: 700 !important;
  text-shadow: none !important;
}

.readiness-subtitle {
  font-family: var(--font-primary) !important;
  color: var(--text-secondary) !important;
}

.readiness-emoji {
  filter: none !important;
}

.readiness-meter {
  background: rgba(255,255,255,0.04) !important;
  border-radius: 6px !important;
  overflow: hidden !important;
}

.readiness-meter-fill {
  border-radius: 6px !important;
}

.readiness-progress-bar {
  background: rgba(255,255,255,0.04) !important;
  border-radius: 4px !important;
  overflow: hidden !important;
}

.readiness-progress-fill {
  border-radius: 4px !important;
}

.readiness-breakdown {
  font-family: var(--font-primary) !important;
}

.readiness-breakdown-item {
  font-family: var(--font-primary) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  padding: 8px 0 !important;
}

.readiness-breakdown-label {
  font-family: var(--font-primary) !important;
  font-weight: 500 !important;
}

.readiness-breakdown-score {
  font-family: var(--font-primary) !important;
  font-weight: 700 !important;
}

.readiness-actionable {
  font-family: var(--font-primary) !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-md) !important;
}

.readiness-coverage-text {
  font-family: var(--font-primary) !important;
}

/* ============================================================================
   MODE CARDS (Practice Grid)
   ============================================================================ */
.mode-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-lg) !important;
  padding: 22px 16px !important;
  transition: all var(--transition-normal) !important;
  box-shadow: none !important;
}

.mode-card:hover {
  background: var(--bg-card-hover) !important;
  border-color: var(--border-accent-hover) !important;
  box-shadow: none !important;
  transform: translateY(-1px) !important;
}

.mode-card.locked {
  opacity: 0.35 !important;
  filter: none !important;
}

/* ============================================================================
   MASTERY BARS
   ============================================================================ */
.mastery-bar-bg {
  background: rgba(255,255,255,0.04) !important;
  border-radius: 4px !important;
  height: 8px !important;
}

.mastery-bar-fill {
  border-radius: 4px !important;
}

.mastery-row {
  border-bottom: 1px solid var(--border-subtle) !important;
  padding: 10px 0 !important;
}

.mastery-label {
  font-family: var(--font-primary) !important;
  font-weight: 600 !important;
  font-size: 12px !important;
}

.mastery-pct {
  font-family: var(--font-primary) !important;
  font-weight: 700 !important;
}

.mastery-status {
  font-family: var(--font-primary) !important;
}

.mastery-trend {
  font-family: var(--font-primary) !important;
}

.mastery-drill-cta {
  font-family: var(--font-primary) !important;
}

/* ============================================================================
   FLASHCARDS
   ============================================================================ */
.flashcard {
  font-family: var(--font-primary) !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-card) !important;
}

.flashcard-container {
  font-family: var(--font-primary) !important;
}

.flashcard-actions {
  font-family: var(--font-primary) !important;
}

/* ============================================================================
   DEFINITION DUEL / MATCHING
   ============================================================================ */
.duel-term {
  font-family: var(--font-primary) !important;
  background: var(--gradient-card) !important;
  border: 1px solid var(--border-accent) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: none !important;
  font-weight: 700 !important;
}

.duel-option {
  font-family: var(--font-primary) !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-md) !important;
  padding: 16px 18px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
  transition: all var(--transition-fast) !important;
}

.duel-option:hover {
  border-color: var(--border-accent) !important;
  background: var(--bg-card-hover) !important;
  transform: none !important;
  box-shadow: none !important;
}

.duel-option.correct {
  border-color: rgba(110,231,183,0.4) !important;
  background: rgba(110,231,183,0.06) !important;
  box-shadow: none !important;
}

.duel-option.wrong {
  border-color: rgba(248,113,113,0.4) !important;
  background: rgba(248,113,113,0.06) !important;
  box-shadow: none !important;
}

.duel-options {
  gap: 10px !important;
}

.duel-progress {
  font-family: var(--font-primary) !important;
}

.duel-streak {
  font-family: var(--font-primary) !important;
  text-shadow: none !important;
}

/* ============================================================================
   CALCULATOR
   ============================================================================ */
.calc-toggle {
  background: var(--gradient-primary) !important;
  box-shadow: none !important;
  font-family: var(--font-primary) !important;
  border-radius: var(--radius-md) !important;
}

.calc-panel {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-accent) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-elevated) !important;
}

.calc-display {
  font-family: var(--font-primary) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-sm) !important;
}

.calc-btn {
  font-family: var(--font-primary) !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: none !important;
}

.calc-btn.eq {
  background: var(--gradient-primary) !important;
}

/* ============================================================================
   REVIEW CARDS
   ============================================================================ */
.review-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: none !important;
}

.review-card-header {
  font-family: var(--font-primary) !important;
  font-weight: 500 !important;
}

.review-card-body {
  font-family: var(--font-primary) !important;
}

/* ============================================================================
   GLOSSARY
   ============================================================================ */
.glossary-container {
  font-family: var(--font-primary) !important;
}

.glossary-search {
  font-family: var(--font-primary) !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-primary) !important;
  box-shadow: none !important;
}

.glossary-cat {
  font-family: var(--font-primary) !important;
  font-weight: 700 !important;
}

.glossary-item {
  font-family: var(--font-primary) !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: none !important;
}

.glossary-term {
  font-family: var(--font-primary) !important;
  font-weight: 600 !important;
}

.glossary-def {
  font-family: var(--font-primary) !important;
  color: var(--text-secondary) !important;
}

.glossary-items {
  gap: 8px !important;
}

/* ============================================================================
   ONBOARDING
   ============================================================================ */
.onboarding-overlay {
  background: var(--bg-base) !important;
}

.onboarding-progress {
  font-family: var(--font-primary) !important;
}

.onboarding-dot {
  border: 1.5px solid var(--accent-cyan) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.onboarding-dot.active {
  background: var(--accent-cyan) !important;
  box-shadow: none !important;
}

/* ============================================================================
   BANNERS
   ============================================================================ */
.returning-banner {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-accent) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: none !important;
}

.returning-banner-icon {
  font-family: var(--font-primary) !important;
}

.returning-banner-text {
  font-family: var(--font-primary) !important;
}

.returning-banner-action button {
  background: var(--gradient-primary) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: none !important;
}

.drills-banner {
  background: var(--bg-card) !important;
  border: 1px solid rgba(251,191,36,0.12) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: none !important;
}

.drills-banner:hover {
  border-color: rgba(251,191,36,0.25) !important;
  box-shadow: none !important;
}

/* ============================================================================
   DIFFICULTY BADGES
   ============================================================================ */
.difficulty-badge {
  font-family: var(--font-primary) !important;
  font-weight: 700 !important;
  border-radius: 4px !important;
  letter-spacing: 0.5px !important;
  font-size: 10px !important;
}

.ignored-badge {
  font-family: var(--font-primary) !important;
}

/* ============================================================================
   EXAM MODE
   ============================================================================ */
.exam-mode-active .question-card {
  border-color: var(--border-subtle) !important;
  box-shadow: var(--shadow-card) !important;
  background: var(--bg-card) !important;
}

/* ============================================================================
   LEADERBOARD
   ============================================================================ */
.lb-mode-tab {
  font-family: var(--font-primary) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: none !important;
}

.lb-mode-tab.active {
  background: var(--gradient-primary) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* ============================================================================
   MUTE BUTTON
   ============================================================================ */
.mute-btn {
  font-family: var(--font-primary) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-sm) !important;
  background: var(--bg-card) !important;
  box-shadow: none !important;
}

/* ============================================================================
   POST-EXAM PANEL
   ============================================================================ */
.post-exam-panel {
  font-family: var(--font-primary) !important;
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-accent) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-elevated) !important;
}

.post-exam-panel-title {
  font-family: var(--font-primary) !important;
  font-weight: 700 !important;
}

.post-exam-panel-message {
  font-family: var(--font-primary) !important;
}

.post-exam-cta {
  font-family: var(--font-primary) !important;
  background: var(--gradient-primary) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: none !important;
}

.post-exam-dismiss {
  font-family: var(--font-primary) !important;
}

/* ============================================================================
   FOCUSED DRILL
   ============================================================================ */
.focused-drill-result {
  font-family: var(--font-primary) !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-md) !important;
}

/* ============================================================================
   COVERAGE FILTER
   ============================================================================ */
.coverage-filter-btn {
  font-family: var(--font-primary) !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: none !important;
  font-weight: 500 !important;
}

.coverage-filter-btn.active,
.coverage-filter-btn:hover {
  border-color: var(--border-accent) !important;
  background: var(--bg-card-hover) !important;
}

/* ============================================================================
   COMPARISON / REPEAT-MISS LABELS
   ============================================================================ */
.comparison {
  font-family: var(--font-primary) !important;
}

.repeat-miss-label {
  font-family: var(--font-primary) !important;
  font-weight: 600 !important;
}

/* ============================================================================
   TOAST / OVERLAY NOTIFICATIONS
   ============================================================================ */
.unlock-toast {
  font-family: var(--font-primary) !important;
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-accent) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-elevated) !important;
}

.unlock-overlay {
  background: rgba(10,10,26,0.95) !important;
}

.pb-banner {
  font-family: var(--font-primary) !important;
  background: var(--gradient-primary) !important;
  border-radius: 0 0 var(--radius-md) var(--radius-md) !important;
  box-shadow: none !important;
}

/* ============================================================================
   INLINE SVG ICON SYSTEM
   ============================================================================ */
.icon-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
}

.icon-svg svg {
  width: 1em; height: 1em;
  stroke-width: 1.5;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 480px) {
  .container { padding: 0 12px !important; }
  .question-card { padding: 22px 16px !important; }
  .answer-btn { padding: 14px 16px !important; font-size: 13px !important; }
  .mode-card { padding: 18px 14px !important; }
  .duel-term { font-size: 20px !important; padding: 18px !important; }
  .duel-option { font-size: 13px !important; padding: 14px 16px !important; }
  .nav-tab { padding: 8px 10px !important; font-size: 11px !important; }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

/* ============================================================================
   WILDCARD: Kill ALL neon glows, heavy borders, and text-shadows
   Attribute selectors catch inline styles set by JS.
   Covers all color variants: cyan, green, red, gold, pink.
   Both with and without spaces in style strings.
   ============================================================================ */

/* --- Box shadows: kill ALL glow patterns --- */
[style*="box-shadow: 0 0"],
[style*="box-shadow:0 0"],
[style*="box-shadow: 0 4px 20px rgba(126,180,255"],
[style*="box-shadow: 0 0 30px"],
[style*="box-shadow: 0 0 20px"],
[style*="box-shadow: 0 0 15px"],
[style*="box-shadow: 0 0 10px"],
[style*="box-shadow: 0 0 80px"],
[style*="box-shadow: 0 0 160px"],
[style*="box-shadow:0 0 30px"],
[style*="box-shadow:0 0 20px"],
[style*="box-shadow:0 0 15px"],
[style*="box-shadow:0 0 10px"],
[style*="box-shadow:0 0 80px"] {
  box-shadow: none !important;
}

/* --- Text shadows: kill ALL glow text --- */
[style*="text-shadow: 0 0"],
[style*="text-shadow:0 0"] {
  text-shadow: none !important;
}

/* --- Heavy borders: ALL neon colors, 2px and 3px --- */
/* Cyan */
[style*="border: 2px solid #7eb4ff"],
[style*="border:2px solid #7eb4ff"],
[style*="border: 1px solid #7eb4ff"],
[style*="border:1px solid #7eb4ff"] {
  border: 1px solid var(--border-accent) !important;
}

/* Green */
[style*="border: 2px solid #6ee7b7"],
[style*="border:2px solid #6ee7b7"],
[style*="border: 3px solid #6ee7b7"],
[style*="border:3px solid #6ee7b7"] {
  border: 1px solid rgba(110,231,183,0.25) !important;
}

/* Red / Pink */
[style*="border: 2px solid #f87171"],
[style*="border:2px solid #f87171"],
[style*="border: 2px solid #ff3c64"],
[style*="border:2px solid #ff3c64"],
[style*="border: 2px solid red"],
[style*="border:2px solid red"],
[style*="border: 3px solid #f87171"],
[style*="border:3px solid #f87171"] {
  border: 1px solid rgba(255,60,100,0.25) !important;
}

/* Gold */
[style*="border: 2px solid #fbbf24"],
[style*="border:2px solid #fbbf24"],
[style*="border: 1px solid #fbbf24"],
[style*="border:1px solid #fbbf24"] {
  border: 1px solid rgba(251,191,36,0.2) !important;
}

/* Any 3px border */
[style*="border: 3px solid"],
[style*="border:3px solid"] {
  border-width: 1px !important;
}

/* Any 2px border */
[style*="border: 2px solid"],
[style*="border:2px solid"] {
  border-width: 1px !important;
}

/* --- Inline border-color overrides --- */
[style*="border-color: #7eb4ff"],
[style*="border-color:#7eb4ff"] {
  border-color: var(--border-accent) !important;
}

[style*="border-color: #6ee7b7"],
[style*="border-color:#6ee7b7"] {
  border-color: rgba(110,231,183,0.25) !important;
}

[style*="border-color: #f87171"],
[style*="border-color:#f87171"] {
  border-color: rgba(255,60,100,0.25) !important;
}

/* --- Inline border-bottom/top that are neon --- */
[style*="border-bottom: 2px solid #7eb4ff"],
[style*="border-bottom:2px solid #7eb4ff"] {
  border-bottom: 1px solid var(--border-subtle) !important;
}

[style*="border-top: 2px solid #7eb4ff"],
[style*="border-top:2px solid #7eb4ff"] {
  border-top: 1px solid var(--border-subtle) !important;
}

/* --- Kill the glow animation on all elements --- */
[style*="animation: glow"],
[style*="animation:glow"] {
  animation: none !important;
}

/* --- Specific inline inset shadows from XP bar --- */
[style*="inset 0 0"] {
  box-shadow: none !important;
}
